@nmshd/runtime 2.0.0 → 2.0.1

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,9 +1,9 @@
1
1
  /*! For license information please see nmshd.runtime.min.js.LICENSE.txt */
2
- var NMSHDRuntime;(()=>{var e={594:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseSchemaUpgrader=void 0;const o=r(194);let a=i=class RuntimeDatabaseSchemaMetadata extends o.Serializable{static preFrom(e){return e.id||(e.id=i.DATABASE_SCHEMA_ID),e}static from(e){return this.fromAny(e)}};a.DATABASE_SCHEMA_ID="databaseSchema",n([(0,o.serialize)(),(0,o.validate)({customValidator:e=>e===i.DATABASE_SCHEMA_ID?void 0:"Invalid database schema id"}),s("design:type",String)],a.prototype,"id",void 0),n([(0,o.serialize)(),(0,o.validate)({min:0}),s("design:type",Number)],a.prototype,"version",void 0),a=i=n([(0,o.type)("RuntimeDatabaseSchemaMetadata")],a);t.DatabaseSchemaUpgrader=class DatabaseSchemaUpgrader{constructor(e,t){this.accountController=e,this.consumptionController=t,this.CURRENT_DATABASE_SCHEMA_VERSION=1,this.DATABASE_SCHEMA_QUERY={id:a.DATABASE_SCHEMA_ID}}async upgradeSchemaVersion(){let e=await this.getVersionFromDB();for(;e<this.CURRENT_DATABASE_SCHEMA_VERSION;){e++;const t=c[e];if(!t)throw new Error(`No upgrade logic found for version '${e}'`);await t(this.accountController,this.consumptionController),await this.writeVersionToDB(e)}}async getVersionFromDB(){const e=await this.accountController.db.getCollection("meta"),t=await e.findOne(this.DATABASE_SCHEMA_QUERY);if(!t)return 0;return a.from(t).version}async writeVersionToDB(e){const t=await this.accountController.db.getCollection("meta"),r=a.from({version:e}),i=await t.findOne(this.DATABASE_SCHEMA_QUERY);i?await t.update(i,r):await t.create(r)}};const c={1:()=>{}}},6984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runtime=void 0;const i=r(5172),n=r(3850),s=r(9663),o=r(7071),a=r(2500),c=r(594),u=r(4086),l=r(2205),p=r(1496),d=r(5200),f=r(9662),y=r(986),h=r(485),m=r(2746);t.Runtime=class Runtime{constructor(e,t,r){this.runtimeConfig=e,this.loggerFactory=t,this._isInitialized=!1,this._isStarted=!1,this._logger=this.loggerFactory.getLogger(this.constructor.name),this._eventBus=r??new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the runtime event bus (namespace: '${t}'). Root error: ${e}`)}))}get logger(){return this._logger}get anonymousServices(){return this._anonymousServices}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw h.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw h.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}async login(e,t){this._accountController=e,this._consumptionController=t;const r=o.Container.get(d.TransportServices),i=o.Container.get(d.ConsumptionServices),n=o.Container.get(u.DataViewExpander);return await new c.DatabaseSchemaUpgrader(e,t).upgradeSchemaVersion(),{transportServices:r,consumptionServices:i,dataViewExpander:n}}get modules(){return this._modules}get eventBus(){return this._eventBus}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw h.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new l.RuntimeInitializingEvent),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new d.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._eventProxy=new p.EventProxy(this._eventBus,this.transport.eventBus).start(),this._isInitialized=!0,this.eventBus.publish(new l.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.logger.debug("Initializing Database connection... ");const e=await this.createDatabaseConnection(),t=this.createTransportConfigWithAdditionalHeaders({...this.runtimeConfig.transportLibrary,supportedIdentityVersion:1}),r=new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the transport event bus (namespace: '${t}'). Root error: ${e}`)}));this.transport=new s.Transport(e,t,r,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=o.Container.get(d.AnonymousServices)}createTransportConfigWithAdditionalHeaders(e){const t=e.platformAdditionalHeaders??{};return t["X-RUNTIME-VERSION"]=a.buildInformation.version,{...e,platformAdditionalHeaders:t}}async initDIContainer(){o.Container.bind(i.EventBus).factory((()=>this.eventBus)).scope(o.Scope.Singleton),o.Container.bind(y.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(o.Scope.Singleton),o.Container.bind(s.AccountController).factory((()=>this.getAccountController())).scope(o.Scope.Request),o.Container.bind(s.DevicesController).factory((()=>this.getAccountController().devices)).scope(o.Scope.Request),o.Container.bind(s.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(o.Scope.Request),o.Container.bind(s.FileController).factory((()=>this.getAccountController().files)).scope(o.Scope.Request),o.Container.bind(s.IdentityController).factory((()=>this.getAccountController().identity)).scope(o.Scope.Request),o.Container.bind(s.MessageController).factory((()=>this.getAccountController().messages)).scope(o.Scope.Request),o.Container.bind(s.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(o.Scope.Request),o.Container.bind(s.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(o.Scope.Request),o.Container.bind(s.TokenController).factory((()=>this.getAccountController().tokens)).scope(o.Scope.Request),o.Container.bind(s.ChallengeController).factory((()=>this.getAccountController().challenges)).scope(o.Scope.Request),o.Container.bind(n.ConsumptionController).factory((()=>this.getConsumptionController())).scope(o.Scope.Request),o.Container.bind(n.AttributesController).factory((()=>this.getConsumptionController().attributes)).scope(o.Scope.Request),o.Container.bind(n.AttributeListenersController).factory((()=>this.getConsumptionController().attributeListeners)).scope(o.Scope.Request),o.Container.bind(n.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(o.Scope.Request),o.Container.bind(n.IncomingRequestsController).factory((()=>this.getConsumptionController().incomingRequests)).scope(o.Scope.Request),o.Container.bind(n.OutgoingRequestsController).factory((()=>this.getConsumptionController().outgoingRequests)).scope(o.Scope.Request),o.Container.bind(n.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(o.Scope.Request),o.Container.bind(s.AnonymousTokenController).factory((()=>new s.AnonymousTokenController(this.transport.config))).scope(o.Scope.Singleton);const e=new m.SchemaRepository;await e.loadSchemas(),o.Container.bind(m.SchemaRepository).factory((()=>e)).scope(o.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const e in this.runtimeConfig.modules){const t=this.runtimeConfig.modules[e];t.enabled?t.location?t.location.startsWith("@nmshd/runtime:")?this.loadBuiltinModule(t):await this.loadModule(t):this.logger.error(`Skip loading module '${this.getModuleName(t)}' because has no location.`):this.logger.debug(`Skip loading module '${this.getModuleName(t)}' because it is not enabled.`)}this.eventBus.publish(new l.ModulesLoadedEvent)}loadBuiltinModule(e){switch(e.location.split(":")[1]){case"DeciderModule":const t=new f.DeciderModule(this,e,this.loggerFactory.getLogger(f.DeciderModule));this.modules.add(t);break;case"RequestModule":const r=new f.RequestModule(this,e,this.loggerFactory.getLogger(f.RequestModule));this.modules.add(r);break;case"MessageModule":const i=new f.MessageModule(this,e,this.loggerFactory.getLogger(f.MessageModule));this.modules.add(i);break;case"AttributeListenerModule":const n=new f.AttributeListenerModule(this,e,this.loggerFactory.getLogger(f.AttributeListenerModule));this.modules.add(n);break;default:throw new Error(`Module ${e.name} is not a builtin module.`)}}async initModules(){this.logger.info("Initializing modules...");for(const e of this.modules.toArray())try{await e.init(),this.logger.info(`Module '${this.getModuleName(e)}' was initialized successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be initialized.`,t),t}this.eventBus.publish(new l.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(this._isStarted)throw h.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw h.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),await this.transport.eventBus.close(),this._eventProxy.stop(),await this._eventBus.close(),this.logger.info("Closing AccountController..."),await(this._accountController?.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const e of this.modules.toArray())try{await e.stop(),this.logger.info(`Module '${this.getModuleName(e)}' was stopped successfully.`)}catch(t){this.logger.error(`An Error occured while stopping module '${this.getModuleName(e)}': `,t)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const e of this.modules.toArray())try{await e.start(),this.logger.info(`Module '${this.getModuleName(e)}' was started successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be started.`,t),t}this.eventBus.publish(new l.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(e){return e.displayName||e.name||JSON.stringify(e)}}},9757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeLoggerFactory=void 0;t.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInformation=void 0;const i=r(194),n=r(3850),s=r(5030),o=r(2890),a=r(9663);t.buildInformation={version:"2.0.0",build:"127",date:"2022-10-24T08:49:18+00:00",commit:"7eb98223c7ab00c72fe86105b6ea3f3a8c393edd",dependencies:{"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.5","@js-soft/ts-utils":"^2.3.0","@nmshd/consumption":"2.0.0","@nmshd/content":"2.0.0","@nmshd/crypto":"2.0.2","@nmshd/transport":"2.0.0",ajv:"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1",luxon:"^3.0.4",qrcode:"1.5.1","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:i.buildInformation,consumption:n.buildInformation,content:s.buildInformation,crypto:o.buildInformation,transport:a.buildInformation}}},4869:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewExpander=void 0;const o=r(194),a=r(3850),c=r(5030),u=r(9663),l=r(7071),p=r(5200),d=r(4629),f=r(485),y=r(2043),h=r(4700),m=r(2466);let g=class DataViewExpander{constructor(e,t,r,i){this.transport=e,this.consumption=t,this.consumptionController=r,this.identityController=i}async expand(e,t){let r=t;if(e["@type"]&&(r=e["@type"]),Array.isArray(e)){if(!(e.length>0))return[];r=e[0]["@type"]}if(!r)throw f.RuntimeErrors.general.invalidPayload("No type found.");switch(r){case"Message":return Array.isArray(e)?await this.expandMessageDTOs(e):await this.expandMessageDTO(e);case"Attribute":return Array.isArray(e)?await this.expandAttributes(e):await this.expandAttribute(e);case"Address":return Array.isArray(e)?await this.expandAddresses(e):await this.expandAddress(e);case"FileId":return Array.isArray(e)?await this.expandFileIds(e):await this.expandFileId(e);case"File":return Array.isArray(e)?await this.expandFileDTOs(e):await this.expandFileDTO(e);case"Recipient":return Array.isArray(e)?await this.expandRecipientDTOs(e):await this.expandAddress(e);case"Relationship":return Array.isArray(e)?await this.expandRelationshipDTOs(e):await this.expandRelationshipDTO(e);case"LocalAttribute":return Array.isArray(e)?await this.expandLocalAttributeDTOs(e):await this.expandLocalAttributeDTO(e);default:throw f.RuntimeErrors.general.notSupported(`No expander is defined for the @type '${r}'.`)}}async expandMessageDTO(e){const t=await this.expandRecipientDTOs(e.recipients),r={};t.forEach((e=>r[e.id]=e));const i=await this.expandAddress(e.createdBy),n=[],s=[];for(const t of e.attachments)"string"==typeof t?(s.push(this.expandFileId(t)),n.push(t)):(s.push(this.expandFileDTO(t)),n.push(t.id));const o=await Promise.all(s),a=this.identityController.isMe(u.CoreAddress.from(e.createdBy));let c,l=h.MessageStatus.Received;if(a){l=e.recipients.every((e=>!!e.receivedAt))?h.MessageStatus.Delivered:h.MessageStatus.Delivering,c={...t[0],type:"IdentityDVO"}}else c=i;const p=y.DataViewTranslateable.transport.messageName,d={id:e.id,name:p,date:e.createdAt,type:"MessageDVO",createdByDevice:e.createdByDevice,createdAt:e.createdAt,createdBy:i,recipients:t,attachments:o,isOwn:a,recipientCount:e.recipients.length,attachmentCount:e.attachments.length,status:l,statusText:`i18n://dvo.message.${l}`,image:"",peer:c,content:e.content};if("Mail"===e.content["@type"]||"RequestMail"===e.content["@type"]){const t=e.content,i=t.to.map((e=>r[e]));let n=[];t.cc&&(n=t.cc.map((e=>r[e])));return{...d,type:"MailDVO",name:t.subject?t.subject:y.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:t.subject,body:t.body,to:i,toCount:t.to.length,cc:n,ccCount:n.length}}if("Request"===e.content["@type"]){let t;if(a){const r=await this.consumption.outgoingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...d,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}if("Response"===e.content["@type"]){let t;if(a){const r=await this.consumption.incomingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.outgoingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...d,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}return d}async expandMessageDTOs(e){const t=e.map((e=>this.expandMessageDTO(e)));return await Promise.all(t)}async expandRelationshipTemplateDTO(e){let t,r;const i=await this.expandAddress(e.createdBy),n=e.isOwn?"RelationshipTemplateDVO":"PeerRelationshipTemplateDVO";let s=e.isOwn?"i18n://dvo.template.outgoing.name":"i18n://dvo.template.incoming.name";const o=e.isOwn?"i18n://dvo.template.outgoing.description":"i18n://dvo.template.incoming.description";let u;if("RelationshipTemplateContent"===e.content["@type"]){const i=c.RelationshipTemplateContent.from(e.content).toJSON();let n;if(i.title&&(s=i.title),!e.isOwn){const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:a.LocalRequestStatus.ManualDecisionRequired}});if(t.value.length>0)n=t.value[0],u=await this.expandLocalRequestDTO(n);else{const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:[a.LocalRequestStatus.Decided,a.LocalRequestStatus.Completed]}});t.value.length>0&&(n=t.value[0],u=await this.expandLocalRequestDTO(n))}}t=await this.expandRequest(i.onNewRelationship),i.onExistingRelationship&&(r=await this.expandRequest(i.onExistingRelationship))}return{name:s,description:o,type:n,date:e.createdAt,...e,createdBy:i,request:u,onNewRelationship:t,onExistingRelationship:r}}async expandRelationshipTemplateDTOs(e){const t=e.map((e=>this.expandRelationshipTemplateDTO(e)));return await Promise.all(t)}async expandRequest(e,t,r){const i=e.id?e.id:"",n=[];for(let i=0;i<e.items.length;i++){const s=e.items[i],o=r?.content.items[i];n.push(await this.expandRequestGroupOrItem(s,t,o))}return{id:i,name:`${e["@type"]} ${i}`,type:"RequestDVO",date:e.expiresAt,...e,items:n,response:r?.content}}async expandRequests(e){const t=e.map((e=>this.expandRequest(e)));return await Promise.all(t)}async expandRequestItem(e,t,r){let i,n=!1;switch(!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(n=!0),e["@type"]){case"ReadAttributeRequestItem":const s=e;if(n){const t=await this.processAttributeQuery(s.query);return"ProcessedThirdPartyRelationshipAttributeQueryDVO"===t.type&&0===t.results.length&&(n=!1,i={code:"dvo.requestItem.error.noResultsForThirdPartyRelationshipAttributeQuery",message:"There are no matching Attributes for this ThirdPartyRelationshipAttributeQuery. You cannot set any"}),{...s,type:"DecidableReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableReadAttributeRequestItem.name",query:t,isDecidable:n,error:i,response:r}}return{...s,type:"ReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ReadAttributeRequestItem.name",query:await this.expandAttributeQuery(s.query),isDecidable:n,response:r};case"CreateAttributeRequestItem":const o=e,a=await this.expandAttribute(o.attribute);let c=!1;"DraftIdentityAttributeDVO"===a.type&&(c=!0);const u=e.title,l=e.description;let p;return n?(p="i18n://dvo.requestItem.DecidableCreateRelationshipAttributeRequestItem.name",c&&(p="i18n://dvo.requestItem.DecidableCreateIdentityAttributeRequestItem.name"),{...o,type:"DecidableCreateAttributeRequestItemDVO",id:"",name:u??p,description:l??p,attribute:a,isDecidable:n,response:r}):(p="i18n://dvo.requestItem.CreateRelationshipAttributeRequestItem.name",c&&(p="i18n://dvo.requestItem.CreateIdentityAttributeRequestItem.name"),{...o,type:"CreateAttributeRequestItemDVO",id:"",name:u??p,description:l??p,attribute:a,isDecidable:n,response:r});case"ProposeAttributeRequestItem":const d=e;return t&&(d.attribute.owner=t.isOwn?t.peer:this.identityController.address.toString()),n?{...d,type:"DecidableProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:await this.expandAttribute(d.attribute),query:await this.processAttributeQuery(d.query),isDecidable:n,response:r}:{...d,type:"ProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:await this.expandAttribute(d.attribute),query:await this.expandAttributeQuery(d.query),isDecidable:n,response:r};case"ShareAttributeRequestItem":const f=e,y=await this.expandAttribute(f.attribute);if(n)return{...f,type:"DecidableShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:y,isDecidable:n,response:r};const h=r;return h&&(y.id=h.attributeId),{...f,type:"ShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:y,isDecidable:n,response:r};case"AuthenticationRequestItem":const m=e;return n?{...m,type:"DecidableAuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableAuthenticationRequestItem.name",isDecidable:n,response:r}:{...m,type:"AuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.AuthenticationRequestItem.name",isDecidable:n,response:r};case"ConsentRequestItem":const g=e;return n?{...g,type:"DecidableConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableConsentRequestItem.name",isDecidable:n,response:r}:{...g,type:"ConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ConsentRequestItem.name",isDecidable:n,response:r};case"RegisterAttributeListenerRequestItem":const v=e,b=await this.expandAttributeQuery(v.query);return n?{...v,type:"DecidableRegisterAttributeListenerRequestItemDVO",id:"",query:b,name:e.title?e.title:"i18n://dvo.requestItem.DecidableRegisterAttributeListenerRequestItem.name",isDecidable:n,response:r}:{...v,type:"RegisterAttributeListenerRequestItemDVO",id:"",query:b,name:e.title?e.title:"i18n://dvo.requestItem.RegisterAttributeListenerRequestItem.name",isDecidable:n,response:r};default:return{...e,type:"RequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.name",isDecidable:n,response:r}}}async expandRequestGroupOrItem(e,t,r){if("RequestItemGroup"===e["@type"]){let i=!1;!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(i=!0);const n=e,s=r,o=[];for(let e=0;e<n.items.length;e++){const r=n.items[e],i=s?.items[e];o.push(await this.expandRequestItem(r,t,i))}return{type:"RequestItemGroupDVO",items:o,isDecidable:i,title:e.title,description:e.description,mustBeAccepted:e.mustBeAccepted,response:s}}return await this.expandRequestItem(e,t,r)}async expandResponseItem(e){if("Accepted"!==e.result){if("Rejected"===e.result){return{...e,type:"RejectResponseItemDVO",id:"",name:"i18n://dvo.responseItem.rejected"}}return{...e,type:"ErrorResponseItemDVO",id:"",name:"i18n://dvo.responseItem.error"}}{const t=`i18n://dvo.responseItem.${e["@type"]}.acceptedName`;switch(e["@type"]){case"ReadAttributeAcceptResponseItem":const r=e,i=await this.consumption.attributes.getAttribute({id:r.attributeId}),n=await this.expandLocalAttributeDTO(i.value);return{...r,type:"ReadAttributeAcceptResponseItemDVO",id:r.attributeId,name:t,attribute:n};case"CreateAttributeAcceptResponseItem":const s=e,o=await this.consumption.attributes.getAttribute({id:s.attributeId}),a=await this.expandLocalAttributeDTO(o.value);return{...s,type:"CreateAttributeAcceptResponseItemDVO",id:s.attributeId,name:t,attribute:a};case"ProposeAttributeAcceptResponseItem":const c=e,u=await this.consumption.attributes.getAttribute({id:c.attributeId}),l=await this.expandLocalAttributeDTO(u.value);return{...c,type:"ProposeAttributeAcceptResponseItemDVO",id:c.attributeId,name:t,attribute:l};case"ShareAttributeAcceptResponseItem":const p=e,d=await this.consumption.attributes.getAttribute({id:p.attributeId}),f=await this.expandLocalAttributeDTO(d.value);return{...p,type:"ShareAttributeAcceptResponseItemDVO",id:p.attributeId,name:t,attribute:f};case"RegisterAttributeListenerAcceptResponseItem":const y=e,h=await this.consumption.attributeListeners.getAttributeListener({id:y.listenerId}),m=await this.expandLocalAttributeListenerDTO(h.value);return{...y,type:"RegisterAttributeListenerAcceptResponseItemDVO",id:y.listenerId,name:t,listener:m};default:return{...e,type:"AcceptResponseItemDVO",id:"",name:t}}}}async expandLocalAttributeListenerDTO(e){const t=await this.expandAttributeQuery(e.query),r=await this.expandIdentityForAddress(e.peer);return{type:"LocalAttributeListenerDVO",name:"dvo.localAttributeListener.name",description:"dvo.localAttributeListener.description",...e,query:t,peer:r}}async expandResponseGroupOrItem(e){if("ResponseItemGroup"===e["@type"]){const t=e,r=[];for(const e of t.items)r.push(await this.expandResponseItem(e));return{type:"ResponseItemGroupDVO",items:r}}return await this.expandResponseItem(e)}async expandLocalRequestDTO(e){const t=e.response?await this.expandLocalResponseDTO(e.response,e):void 0,r=await this.expandRequest(e.content,e,t),i=await this.expandAddress(e.peer);let n=!1;e.isOwn||"DecisionRequired"!==e.status&&"ManualDecisionRequired"!==e.status||(n=!0);const s=e.isOwn?"outgoing":"incoming",o=`i18n://dvo.localRequest.status.${e.status}`,a=e.source?.type??"unknown",c=e.response?e.response.content.requestId:"";return{...e,id:e.id?e.id:c,content:r,items:r.items,name:`i18n://dvo.localRequest.${a}.${s}.${e.status}.name`,directionText:`i18n://dvo.localRequest.direction.${s}`,description:`i18n://dvo.localRequest.${a}.${s}.${e.status}.description`,sourceTypeText:`i18n://dvo.localRequest.sourceType.${a}`,type:"LocalRequestDVO",date:e.createdAt,createdBy:e.isOwn?this.expandSelf():i,decider:e.isOwn?i:this.expandSelf(),peer:i,response:t,statusText:o,isDecidable:n}}async expandLocalRequestDTOs(e){const t=e.map((e=>this.expandLocalRequestDTO(e)));return await Promise.all(t)}async expandResponse(e,t){const r=[];for(const t of e.items)r.push(await this.expandResponseGroupOrItem(t));return{id:t.id,name:"i18n://dvo.response.name",type:"ResponseDVO",...e,items:r}}async expandLocalResponseDTO(e,t){const r=await this.expandResponse(e.content,t);return{...e,id:t.id,name:"i18n://dvo.localResponse.name",type:"LocalResponseDVO",date:e.createdAt,content:r,items:e.content.items}}async expandLocalAttributeDTO(e){const t=e.content.value["@type"],r=await this.consumptionController.attributes.getLocalAttribute(u.CoreId.from(e.id));if(!r)throw new Error("Attribute not found");const i=e.content.owner;let n=`i18n://dvo.attribute.name.${t}`,s=`i18n://dvo.attribute.description.${t}`;const o=r.content.value.renderHints.toJSON(),a=r.content.value.valueHints.toJSON();if(r.shareInfo){const u=r.shareInfo.peer.toString();if(r.content instanceof c.RelationshipAttribute){const c=r.content,l=c.value;return"title"in l&&(n=l.title),"description"in l&&l.description&&(s=l.description),c.owner===r.shareInfo.peer?{type:"PeerRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}:{type:"OwnRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}}const l=r.content;return r.shareInfo.sourceAttribute?{type:"SharedToPeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),sourceAttribute:r.shareInfo.sourceAttribute.toString(),tags:l.tags?l.tags:[],valueType:t}:{type:"PeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),tags:l.tags?l.tags:[],valueType:t}}const l=r.content,p=await this.consumption.attributes.getAttributes({query:{"shareInfo.sourceAttribute":e.id}}),d=await this.expandLocalAttributeDTOs(p.value);return{type:"RepositoryAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,isDraft:!1,sharedWith:d,tags:l.tags?l.tags:[],valueType:t}}async expandLocalAttributeDTOs(e){const t=e.map((e=>this.expandLocalAttributeDTO(e)));return await Promise.all(t)}async expandAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return this.expandIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.expandRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.expandThirdPartyRelationshipAttributeQuery(e);default:throw new Error("Wrong attribute query")}}expandIdentityAttributeQuery(e){const t=e.valueType,r=`i18n://dvo.attribute.name.${t}`,i=`i18n://dvo.attribute.description.${t}`,n=this.getHintsForValueType(t);return{type:"IdentityAttributeQueryDVO",id:"",name:r,description:i,valueType:t,validFrom:e.validFrom,validTo:e.validTo,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1}}async expandRelationshipAttributeQuery(e){const t=e.attributeCreationHints.valueType;let r="i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",i="i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery";e.attributeCreationHints.title&&(r=e.attributeCreationHints.title),e.attributeCreationHints.description&&(i=e.attributeCreationHints.description);const n=this.getHintsForValueType(t);return e.attributeCreationHints.valueHints&&(n.valueHints=e.attributeCreationHints.valueHints),{type:"RelationshipAttributeQueryDVO",id:"",name:r,description:i,validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),key:e.key,attributeCreationHints:e.attributeCreationHints,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1,valueType:t}}async expandThirdPartyRelationshipAttributeQuery(e){return{type:"ThirdPartyRelationshipAttributeQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",description:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),thirdParty:await this.expandAddress(e.thirdParty),key:e.key,isProcessed:!1}}getHintsForValueType(e){const t=o.SerializableBase.getModule(e,1);if(!t)throw new Error(`No class implementation found for ${e}`);let r={"@type":"RenderHints",editType:c.RenderHintsEditType.InputLike,technicalType:c.RenderHintsTechnicalType.String},i={"@type":"ValueHints",max:200};return t.renderHints&&t.renderHints instanceof c.RenderHints&&(r=t.renderHints.toJSON()),t.valueHints&&t.valueHints instanceof c.ValueHints&&(i=t.valueHints.toJSON()),{renderHints:r,valueHints:i}}async processAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return await this.processIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.processRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.processThirdPartyRelationshipAttributeQuery(e);default:throw new Error("Wrong attribute query")}}async processIdentityAttributeQuery(e){const t=await this.consumption.attributes.executeIdentityAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...this.expandIdentityAttributeQuery(e),type:"ProcessedIdentityAttributeQueryDVO",results:r,isProcessed:!0}}async processRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[r],isProcessed:!0}}async processThirdPartyRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeThirdPartyRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:[r],renderHints:r.renderHints,valueHints:r.valueHints,valueType:r.valueType,isProcessed:!0}}async expandIdentityAttribute(e,t){const r=e.value["@type"],i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`,s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=await this.expandAddress(e.owner);return{type:"DraftIdentityAttributeDVO",content:e,name:i,description:n,id:"",owner:a,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:a.isSelf,valueType:r,tags:t.tags?t.tags:[]}}async expandRelationshipAttribute(e,t){const r=e.value["@type"];let i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`;const s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=t.value;"title"in a&&(i=a.title),"description"in a&&a.description&&(n=a.description);const c=await this.expandAddress(e.owner);return{type:"DraftRelationshipAttributeDVO",content:e,name:i,description:n,key:e.key,confidentiality:e.confidentiality,isTechnical:!!e.isTechnical,id:"",owner:c,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:c.isSelf,valueType:r}}async expandAttribute(e){const t=o.Serializable.fromUnknown(e);if(t instanceof c.IdentityAttribute)return await this.expandIdentityAttribute(e,t);if(t instanceof c.RelationshipAttribute)return await this.expandRelationshipAttribute(e,t);throw new Error("Wrong attribute instance")}async expandAttributes(e){const t=e.map((e=>this.expandAttribute(e)));return await Promise.all(t)}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:u.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(e){const t=e.substring(3,9),r=(t.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:t,initials:r,realm:u.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAddress(e){if(this.identityController.isMe(u.CoreAddress.from(e)))return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});return t.isError?this.expandUnknown(e):await this.expandRelationshipDTO(t.value)}async expandAddresses(e){const t=e.map((e=>this.expandAddress(e)));return await Promise.all(t)}async expandRecipientDTO(e){return{...await this.expandAddress(e.address),type:"RecipientDVO",receivedAt:e.receivedAt,receivedByDevice:e.receivedByDevice}}async expandRecipientDTOs(e){const t=e.map((e=>this.expandRecipientDTO(e)));return await Promise.all(t)}expandRelationshipChangeDTO(e,t){const r=t.response?t.response.createdAt:t.request.createdAt;let i,n=!1;return this.identityController.isMe(u.CoreAddress.from(t.request.createdBy))&&(n=!0),t.response&&(i={...t.response,id:`${t.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:t.id,name:"",date:r,status:t.status,statusText:`i18n://dvo.relationshipChange.${t.status}`,changeType:t.type,changeTypeText:`i18n://dvo.relationshipChange.${t.type}`,isOwn:n,request:{...t.request,id:`${t.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:i})}async expandRelationshipChangeDTOs(e){const t=e.changes.map((t=>this.expandRelationshipChangeDTO(e,t)));return await Promise.all(t)}async createRelationshipDVO(e){let t;const r=await this.consumption.settings.getSettings({query:{reference:e.id}});t=r.value.length>0?r.value[0].value:{isPinned:!1};const i={},n=await this.consumption.attributes.getPeerAttributes({onlyValid:!0,peer:e.peer}),s=await this.expandLocalAttributeDTOs(n.value),o={};for(const e of s){const t=e.content.value["@type"],r=o[t];r?r.push(e):o[t]=[e];if(["DisplayName","GivenName","MiddleName","Surname","Sex"].includes(t)){const r=e.content.value;i[t]&&"GivenName"===t?i[t]+=` ${r.value}`:i[t]=r.value}}let a=m.RelationshipDirection.Incoming;this.identityController.isMe(u.CoreAddress.from(e.changes[0].request.createdBy))&&(a=m.RelationshipDirection.Outgoing);let c="";e.status===u.RelationshipStatus.Pending&&a===m.RelationshipDirection.Outgoing?c=y.DataViewTranslateable.transport.relationshipOutgoing:e.status===u.RelationshipStatus.Pending?c=y.DataViewTranslateable.transport.relationshipIncoming:e.status===u.RelationshipStatus.Rejected?c=y.DataViewTranslateable.transport.relationshipRejected:e.status===u.RelationshipStatus.Revoked?c=y.DataViewTranslateable.transport.relationshipRevoked:e.status===u.RelationshipStatus.Active&&(c=y.DataViewTranslateable.transport.relationshipActive);const l=await this.expandRelationshipChangeDTOs(e);let p;return p=i.DisplayName?i.DisplayName:i.MiddleName&&i.GivenName&&i.Surname?`${i.GivenName} ${i.MiddleName} ${i.Surname}`:i.GivenName&&i.Surname?`${i.GivenName} ${i.Surname}`:i.Sex&&i.Surname?`i18n://dvo.identity.Salutation.${i.Sex} ${i.Surname}`:i.Surname?`${i.Surname}`:e.peer.substring(3,9),{id:e.id,name:t.userTitle??p,description:t.userDescription??c,date:e.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:e.status,statusText:c,direction:a,isPinned:t.isPinned,attributeMap:o,items:s,nameMap:i,changes:l,changeCount:l.length,templateId:e.template.id}}async expandRelationshipDTO(e){const t=await this.createRelationshipDVO(e),r=(t.name.match(/\b\w/g)??[]).join("");return{type:"IdentityDVO",id:e.peer,name:t.name,date:t.date,description:t.description,publicKey:e.peerIdentity.publicKey,realm:e.peerIdentity.realm,initials:r,isSelf:!1,hasRelationship:!0,relationship:t,items:t.items}}async expandIdentityForAddress(e){if(e===this.identityController.address.toString())return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});if(t.isSuccess)return await this.expandRelationshipDTO(t.value);if(t.error.code!==f.RuntimeErrors.general.recordNotFound(u.Relationship).code)throw t.error;const r=e.substring(3,9),i=(r.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:r,initials:i,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentityDTO(e){return await this.expandIdentityForAddress(e.address)}async expandRelationshipDTOs(e){const t=e.map((e=>this.expandRelationshipDTO(e)));return await Promise.all(t)}async expandFileId(e){const t=await this.transport.files.getFile({id:e});if(t.isError)throw t.error;return await this.expandFileDTO(t.value)}async expandFileIds(e){const t=e.map((e=>this.expandFileId(e)));return await Promise.all(t)}async expandFileDTO(e){return{...e,type:"FileDVO",id:e.id,name:e.title?e.title:e.filename,date:e.createdAt,image:"",filename:e.filename,filesize:e.filesize,createdBy:await this.expandAddress(e.createdBy)}}async expandFileDTOs(e){const t=e.map((e=>this.expandFileDTO(e)));return await Promise.all(t)}};g=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),s(3,l.Inject),n("design:paramtypes",[p.TransportServices,d.ConsumptionServices,a.ConsumptionController,u.IdentityController])],g),t.DataViewExpander=g},9121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewTranslateable=void 0;class DataViewTranslateable{}t.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},2706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8306:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2706),t),n(r(6911),t)},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9542:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1403),t),n(r(8691),t),n(r(1952),t),n(r(2421),t),n(r(1600),t),n(r(8472),t)},1039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},166:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1039),t),n(r(6519),t),n(r(9802),t),n(r(9005),t),n(r(2161),t),n(r(843),t)},4086:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8306),t),n(r(9542),t),n(r(166),t),n(r(4869),t),n(r(9121),t),n(r(2043),t),n(r(6574),t)},4457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4700:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageStatus=void 0,function(e){e.Received="Received",e.Delivering="Delivering",e.Delivered="Delivered"}(t.MessageStatus||(t.MessageStatus={}))},2466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipDirection=void 0,function(e){e.Outgoing="Outgoing",e.Incoming="Incoming"}(t.RelationshipDirection||(t.RelationshipDirection={}))},9893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6574:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4457),t),n(r(6342),t),n(r(4700),t),n(r(2466),t),n(r(9893),t)},1291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(5172);class DataEvent extends i.Event{constructor(e,t,r){super(e),this.eventTargetAddress=t,this.data=r}}t.DataEvent=DataEvent},1496:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EventProxy=void 0;const o=s(r(3850)),a=s(r(9663)),c=r(485),u=r(2226),l=r(7747);t.EventProxy=class EventProxy{constructor(e,t){this.targetEventBus=e,this.sourceEventBus=t,this.subscriptionIds=[]}start(){if(this.subscriptionIds.length>0)throw new Error("EventProxy is already started");return this.proxyConsumptionEvents(),this.proxyTransportEvents(),this}proxyTransportEvents(){this.subscribeToSourceEvent(a.MessageDeliveredEvent,(e=>{this.targetEventBus.publish(new l.MessageDeliveredEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageReceivedEvent,(e=>{this.targetEventBus.publish(new l.MessageReceivedEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageSentEvent,(e=>{this.targetEventBus.publish(new l.MessageSentEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.PeerRelationshipTemplateLoadedEvent,(e=>{this.targetEventBus.publish(new l.PeerRelationshipTemplateLoadedEvent(e.eventTargetAddress,c.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.data)))})),this.subscribeToSourceEvent(a.RelationshipChangedEvent,(e=>{this.targetEventBus.publish(new l.RelationshipChangedEvent(e.eventTargetAddress,c.RelationshipMapper.toRelationshipDTO(e.data)))}))}proxyConsumptionEvents(){this.subscribeToSourceEvent(o.AttributeCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeDeletedEvent,(e=>{this.targetEventBus.publish(new u.AttributeDeletedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeSucceededEvent,(e=>{this.targetEventBus.publish(new u.AttributeSucceededEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeUpdatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeUpdatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestReceivedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestReceivedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestCreatedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.SharedAttributeCopyCreatedEvent,(e=>{this.targetEventBus.publish(new u.SharedAttributeCopyCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeListenerCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeListenerCreatedEvent(e.eventTargetAddress,c.AttributeListenerMapper.toAttributeListenerDTO(e.data)))}))}subscribeToSourceEvent(e,t){const r=this.sourceEventBus.subscribe(e,t);this.subscriptionIds.push(r)}stop(){this.subscriptionIds.forEach((e=>this.sourceEventBus.unsubscribe(e)))}}},3635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeCreatedEvent=void 0;const i=r(1291);class AttributeCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeCreatedEvent.namespace,e,t)}}t.AttributeCreatedEvent=AttributeCreatedEvent,AttributeCreatedEvent.namespace="consumption.attributeCreated"},5046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeDeletedEvent=void 0;const i=r(1291);class AttributeDeletedEvent extends i.DataEvent{constructor(e,t){super(AttributeDeletedEvent.namespace,e,t)}}t.AttributeDeletedEvent=AttributeDeletedEvent,AttributeDeletedEvent.namespace="consumption.attributeDeleted"},2593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerCreatedEvent=void 0;const i=r(1291);class AttributeListenerCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerCreatedEvent.namespace,e,t)}}t.AttributeListenerCreatedEvent=AttributeListenerCreatedEvent,AttributeListenerCreatedEvent.namespace="consumption.attributeListenerCreated"},1365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerTriggeredEvent=void 0;const i=r(1291);class AttributeListenerTriggeredEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerTriggeredEvent.namespace,e,t)}}t.AttributeListenerTriggeredEvent=AttributeListenerTriggeredEvent,AttributeListenerTriggeredEvent.namespace="consumption.attributeListenerTriggered"},2314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeSucceededEvent=void 0;const i=r(1291);class AttributeSucceededEvent extends i.DataEvent{constructor(e,t){super(AttributeSucceededEvent.namespace,e,t)}}t.AttributeSucceededEvent=AttributeSucceededEvent,AttributeSucceededEvent.namespace="consumption.attributeSucceded"},9846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeUpdatedEvent=void 0;const i=r(1291);class AttributeUpdatedEvent extends i.DataEvent{constructor(e,t){super(AttributeUpdatedEvent.namespace,e,t)}}t.AttributeUpdatedEvent=AttributeUpdatedEvent,AttributeUpdatedEvent.namespace="consumption.attributeUpdated"},8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestReceivedEvent=void 0;const i=r(1291);class IncomingRequestReceivedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestReceivedEvent.namespace,e,t),t.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestReceivedEvent=IncomingRequestReceivedEvent,IncomingRequestReceivedEvent.namespace="consumption.incomingRequestReceived"},4795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestStatusChangedEvent=void 0;const i=r(1291);class IncomingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestStatusChangedEvent.namespace,e,t),t.request.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestStatusChangedEvent=IncomingRequestStatusChangedEvent,IncomingRequestStatusChangedEvent.namespace="consumption.incomingRequestStatusChanged"},4209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailReceivedEvent=void 0;const i=r(1291);class MailReceivedEvent extends i.DataEvent{constructor(e,t,r){super(MailReceivedEvent.namespace,e,r),this.mail=t}}t.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},6425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageProcessedResult=t.MessageProcessedEvent=void 0;const i=r(1291);class MessageProcessedEvent extends i.DataEvent{constructor(e,t,r){super(MessageProcessedEvent.namespace,e,{message:t,result:r})}}t.MessageProcessedEvent=MessageProcessedEvent,MessageProcessedEvent.namespace="consumption.messageProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NoRequest="NoRequest",e.Error="Error"}(t.MessageProcessedResult||(t.MessageProcessedResult={}))},9260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedEvent=OutgoingRequestCreatedEvent,OutgoingRequestCreatedEvent.namespace="consumption.outgoingRequestCreated"},370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace="consumption.outgoingRequestFromRelationshipCreationChangeCreatedAndCompleted"},5107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestStatusChangedEvent=void 0;const i=r(1291);class OutgoingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestStatusChangedEvent.namespace,e,t),!t.request.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestStatusChangedEvent=OutgoingRequestStatusChangedEvent,OutgoingRequestStatusChangedEvent.namespace="consumption.outgoingRequestStatusChanged"},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipEvent=void 0;const i=r(1291);class RelationshipEvent extends i.DataEvent{constructor(e,t,r){super(RelationshipEvent.namespace+r.id,e,r),this.event=t}}t.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},1908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateProcessedResult=t.RelationshipTemplateProcessedEvent=void 0;const i=r(1291);class RelationshipTemplateProcessedEvent extends i.DataEvent{constructor(e,t,r){if(super(RelationshipTemplateProcessedEvent.namespace,e,{template:t,result:r}),t.isOwn)throw new Error("Cannot create this event for an own Relationship Template.")}}t.RelationshipTemplateProcessedEvent=RelationshipTemplateProcessedEvent,RelationshipTemplateProcessedEvent.namespace="consumption.relationshipTemplateProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NonCompletedRequestExists="NonCompletedRequestExists",e.RelationshipExists="RelationshipExists",e.NoRequest="NoRequest",e.Error="Error"}(t.RelationshipTemplateProcessedResult||(t.RelationshipTemplateProcessedResult={}))},43:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedAttributeCopyCreatedEvent=void 0;const i=r(1291);class SharedAttributeCopyCreatedEvent extends i.DataEvent{constructor(e,t){super(SharedAttributeCopyCreatedEvent.namespace,e,t)}}t.SharedAttributeCopyCreatedEvent=SharedAttributeCopyCreatedEvent,SharedAttributeCopyCreatedEvent.namespace="consumption.sharedAttributeCopyCreated"},2226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3635),t),n(r(5046),t),n(r(2593),t),n(r(1365),t),n(r(2314),t),n(r(9846),t),n(r(8099),t),n(r(4795),t),n(r(4209),t),n(r(6425),t),n(r(9260),t),n(r(370),t),n(r(5107),t),n(r(7834),t),n(r(1908),t),n(r(43),t)},2205:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2226),t),n(r(1291),t),n(r(4696),t),n(r(7747),t)},6762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesInitializedEvent=void 0;const i=r(5172);class ModulesInitializedEvent extends i.Event{constructor(){super(ModulesInitializedEvent.namespace)}}t.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesLoadedEvent=void 0;const i=r(5172);class ModulesLoadedEvent extends i.Event{constructor(){super(ModulesLoadedEvent.namespace)}}t.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesStartedEvent=void 0;const i=r(5172);class ModulesStartedEvent extends i.Event{constructor(){super(ModulesStartedEvent.namespace)}}t.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},7856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializedEvent=void 0;const i=r(5172);class RuntimeInitializedEvent extends i.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}t.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},8061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializingEvent=void 0;const i=r(5172);class RuntimeInitializingEvent extends i.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}t.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},4696:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6762),t),n(r(188),t),n(r(4737),t),n(r(7856),t),n(r(8061),t)},5984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeliveredEvent=void 0;const i=r(1291);class MessageDeliveredEvent extends i.DataEvent{constructor(e,t){super(MessageDeliveredEvent.namespace,e,t)}}t.MessageDeliveredEvent=MessageDeliveredEvent,MessageDeliveredEvent.namespace="transport.messageDelivered"},8994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageReceivedEvent=void 0;const i=r(1291);class MessageReceivedEvent extends i.DataEvent{constructor(e,t){super(MessageReceivedEvent.namespace,e,t)}}t.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSentEvent=void 0;const i=r(1291);class MessageSentEvent extends i.DataEvent{constructor(e,t){super(MessageSentEvent.namespace,e,t)}}t.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},2182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PeerRelationshipTemplateLoadedEvent=void 0;const i=r(1291);class PeerRelationshipTemplateLoadedEvent extends i.DataEvent{constructor(e,t){super(PeerRelationshipTemplateLoadedEvent.namespace,e,t)}}t.PeerRelationshipTemplateLoadedEvent=PeerRelationshipTemplateLoadedEvent,PeerRelationshipTemplateLoadedEvent.namespace="transport.peerRelationshipTemplateLoaded"},1690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangedEvent=void 0;const i=r(1291);class RelationshipChangedEvent extends i.DataEvent{constructor(e,t){super(RelationshipChangedEvent.namespace,e,t)}}t.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},7747:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5984),t),n(r(8994),t),n(r(4769),t),n(r(2182),t),n(r(1690),t)},7371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousServices=void 0;const o=r(7071),a=r(8346);let c=class AnonymousServices{constructor(e){this.tokens=e}};c=i([s(0,o.Inject),n("design:paramtypes",[a.AnonymousTokensFacade])],c),t.AnonymousServices=c},4629:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumptionServices=void 0;const o=r(7071),a=r(6013);let c=class ConsumptionServices{constructor(e,t,r,i,n,s){this.attributes=e,this.drafts=t,this.settings=r,this.incomingRequests=i,this.outgoingRequests=n,this.attributeListeners=s}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.AttributesFacade,a.DraftsFacade,a.SettingsFacade,a.IncomingRequestsFacade,a.OutgoingRequestsFacade,a.AttributeListenersFacade])],c),t.ConsumptionServices=c},4164:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransportServices=void 0;const o=r(7071),a=r(9728);let c=class TransportServices{constructor(e,t,r,i,n,s,o,a){this.files=e,this.messages=t,this.relationships=r,this.relationshipTemplates=i,this.tokens=n,this.account=s,this.devices=o,this.challenges=a}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.FilesFacade,a.MessagesFacade,a.RelationshipsFacade,a.RelationshipTemplatesFacade,a.TokensFacade,a.AccountFacade,a.DevicesFacade,a.ChallengesFacade])],c),t.TransportServices=c},7306:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousTokensFacade=void 0;const o=r(7071),a=r(485);let c=class AnonymousTokensFacade{constructor(e,t){this.loadPeerTokenByTruncatedReferenceUseCase=e,this.loadPeerTokenByIdAndKeyUseCase=t}async loadPeerTokenByTruncatedReference(e){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(e)}async loadPeerTokenByIdAndKey(e){return await this.loadPeerTokenByIdAndKeyUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,a.LoadPeerTokenAnonymousByIdAndKeyUseCase])],c),t.AnonymousTokensFacade=c},8346:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7306),t)},1582:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenersFacade=void 0;const o=r(7071),a=r(485);let c=class AttributeListenersFacade{constructor(e,t){this.getAttributeListenerUseCase=e,this.getAttributeListenersUseCase=t}async getAttributeListener(e){return await this.getAttributeListenerUseCase.execute(e)}async getAttributeListeners(){return await this.getAttributeListenersUseCase.execute()}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.GetAttributeListenerUseCase,a.GetAttributeListenersUseCase])],c),t.AttributeListenersFacade=c},2534:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributesFacade=void 0;const o=r(7071),a=r(485);let c=class AttributesFacade{constructor(e,t,r,i,n,s,o,a,c,u,l,p,d){this.createAttributeUseCase=e,this.createSharedAttributeCopyUseCase=t,this.deleteAttributeUseCase=r,this.getPeerAttributesUseCase=i,this.getSharedToPeerAttributesUseCase=n,this.getAttributeUseCase=s,this.getAttributesUseCase=o,this.succeedAttributeUseCase=a,this.updateAttributeUseCase=c,this.executeIdentityAttributeQueryUseCase=u,this.executeRelationshipAttributeQueryUseCase=l,this.executeThirdPartyRelationshipAttributeQueryUseCase=p,this.shareAttributeUseCase=d}async createAttribute(e){return await this.createAttributeUseCase.execute(e)}async createSharedAttributeCopy(e){return await this.createSharedAttributeCopyUseCase.execute(e)}async deleteAttribute(e){return await this.deleteAttributeUseCase.execute(e)}async getPeerAttributes(e){return await this.getPeerAttributesUseCase.execute(e)}async getSharedToPeerAttributes(e){return await this.getSharedToPeerAttributesUseCase.execute(e)}async getAttribute(e){return await this.getAttributeUseCase.execute(e)}async getAttributes(e){return await this.getAttributesUseCase.execute(e)}async executeIdentityAttributeQuery(e){return await this.executeIdentityAttributeQueryUseCase.execute(e)}async executeRelationshipAttributeQuery(e){return await this.executeRelationshipAttributeQueryUseCase.execute(e)}async executeThirdPartyRelationshipAttributeQuery(e){return await this.executeThirdPartyRelationshipAttributeQueryUseCase.execute(e)}async succeedAttribute(e){return await this.succeedAttributeUseCase.execute(e)}async updateAttribute(e){return await this.updateAttributeUseCase.execute(e)}async shareAttribute(e){return await this.shareAttributeUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),s(10,o.Inject),s(11,o.Inject),s(12,o.Inject),n("design:paramtypes",[a.CreateAttributeUseCase,a.CreateSharedAttributeCopyUseCase,a.DeleteAttributeUseCase,a.GetPeerAttributesUseCase,a.GetSharedToPeerAttributesUseCase,a.GetAttributeUseCase,a.GetAttributesUseCase,a.SucceedAttributeUseCase,a.UpdateAttributeUseCase,a.ExecuteIdentityAttributeQueryUseCase,a.ExecuteRelationshipAttributeQueryUseCase,a.ExecuteThirdPartyRelationshipAttributeQueryUseCase,a.ShareAttributeUseCase])],c),t.AttributesFacade=c},3514:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DraftsFacade=void 0;const o=r(7071),a=r(485);let c=class DraftsFacade{constructor(e,t,r,i,n){this.createDraftUseCase=e,this.deleteDraftUseCase=t,this.getDraftUseCase=r,this.getDraftsUseCase=i,this.updateDraftUseCase=n}async createDraft(e){return await this.createDraftUseCase.execute(e)}async deleteDraft(e){return await this.deleteDraftUseCase.execute(e)}async getDraft(e){return await this.getDraftUseCase.execute(e)}async getDrafts(e){return await this.getDraftsUseCase.execute(e)}async updateDraft(e){return await this.updateDraftUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateDraftUseCase,a.DeleteDraftUseCase,a.GetDraftUseCase,a.GetDraftsUseCase,a.UpdateDraftUseCase])],c),t.DraftsFacade=c},9617:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class IncomingRequestsFacade{constructor(e,t,r,i,n,s,o,a,c,u){this.receivedUseCase=e,this.checkPrerequisitesUseCase=t,this.requireManualDecisionUseCase=r,this.canAcceptUseCase=i,this.acceptUseCase=n,this.canRejectUseCase=s,this.rejectUseCase=o,this.completeUseCase=a,this.getRequestUseCase=c,this.getRequestsUseCase=u}async received(e){return await this.receivedUseCase.execute(e)}async checkPrerequisites(e){return await this.checkPrerequisitesUseCase.execute(e)}async requireManualDecision(e){return await this.requireManualDecisionUseCase.execute(e)}async canAccept(e){return await this.canAcceptUseCase.execute(e)}async accept(e){return await this.acceptUseCase.execute(e)}async canReject(e){return await this.canRejectUseCase.execute(e)}async reject(e){return await this.rejectUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),n("design:paramtypes",[a.ReceivedIncomingRequestUseCase,a.CheckPrerequisitesOfIncomingRequestUseCase,a.RequireManualDecisionOfIncomingRequestUseCase,a.CanAcceptIncomingRequestUseCase,a.AcceptIncomingRequestUseCase,a.CanRejectIncomingRequestUseCase,a.RejectIncomingRequestUseCase,a.CompleteIncomingRequestUseCase,a.GetIncomingRequestUseCase,a.GetIncomingRequestsUseCase])],c),t.IncomingRequestsFacade=c},1881:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class OutgoingRequestsFacade{constructor(e,t,r,i,n,s,o,a){this.canCreateUseCase=e,this.createUseCase=t,this.sentUseCase=r,this.createAndCompleteFromRelationshipCreationChangeUseCase=i,this.completeUseCase=n,this.getRequestUseCase=s,this.getRequestsUseCase=o,this.discardRequestUseCase=a}async canCreate(e){return await this.canCreateUseCase.execute(e)}async create(e){return await this.createUseCase.execute(e)}async createAndCompleteFromRelationshipCreationChange(e){return await this.createAndCompleteFromRelationshipCreationChangeUseCase.execute(e)}async sent(e){return await this.sentUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}async discard(e){return await this.discardRequestUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.CanCreateOutgoingRequestUseCase,a.CreateOutgoingRequestUseCase,a.SentOutgoingRequestUseCase,a.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase,a.CompleteOutgoingRequestUseCase,a.GetOutgoingRequestUseCase,a.GetOutgoingRequestsUseCase,a.DiscardOutgoingRequestUseCase])],c),t.OutgoingRequestsFacade=c},6615:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFacade=void 0;const o=r(7071),a=r(485);let c=class SettingsFacade{constructor(e,t,r,i,n){this.createSettingUseCase=e,this.updateSettingUseCase=t,this.deleteSettingUseCase=r,this.getSettingsUseCase=i,this.getSettingUseCase=n}async createSetting(e){return await this.createSettingUseCase.execute(e)}async getSetting(e){return await this.getSettingUseCase.execute(e)}async getSettings(e){return await this.getSettingsUseCase.execute(e)}async deleteSetting(e){return await this.deleteSettingUseCase.execute(e)}async updateSetting(e){return await this.updateSettingUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateSettingUseCase,a.UpdateSettingUseCase,a.DeleteSettingUseCase,a.GetSettingsUseCase,a.GetSettingUseCase])],c),t.SettingsFacade=c},6013:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1582),t),n(r(2534),t),n(r(3514),t),n(r(9617),t),n(r(1881),t),n(r(6615),t)},941:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFacade=void 0;const o=r(7071),a=r(485);let c=class AccountFacade{constructor(e,t,r,i,n,s,o,a,c){this.getIdentityInfoUseCase=e,this.getDeviceInfoUseCase=t,this.registerPushNotificationTokenUseCase=r,this.syncDatawalletUseCase=i,this.syncEverythingUseCase=n,this.getSyncInfoUseCase=s,this.disableAutoSyncUseCase=o,this.enableAutoSyncUseCase=a,this.loadItemFromTruncatedReferenceUseCase=c}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}async registerPushNotificationToken(e){return await this.registerPushNotificationTokenUseCase.execute(e)}async syncDatawallet(e={}){return await this.syncDatawalletUseCase.execute(e)}async syncEverything(e={}){return await this.syncEverythingUseCase.execute(e)}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}async loadItemFromTruncatedReference(e){return await this.loadItemFromTruncatedReferenceUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),n("design:paramtypes",[a.GetIdentityInfoUseCase,a.GetDeviceInfoUseCase,a.RegisterPushNotificationTokenUseCase,a.SyncDatawalletUseCase,a.SyncEverythingUseCase,a.GetSyncInfoUseCase,a.DisableAutoSyncUseCase,a.EnableAutoSyncUseCase,a.LoadItemFromTruncatedReferenceUseCase])],c),t.AccountFacade=c},4213:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengesFacade=void 0;const o=r(7071),a=r(485);let c=class ChallengesFacade{constructor(e,t){this.createChallengeUseCase=e,this.validateChallengeUseCase=t}async createChallenge(e){return await this.createChallengeUseCase.execute(e)}async validateChallenge(e){return await this.validateChallengeUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.CreateChallengeUseCase,a.ValidateChallengeUseCase])],c),t.ChallengesFacade=c},7974:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicesFacade=void 0;const o=r(7071),a=r(485);let c=class DevicesFacade{constructor(e,t,r,i,n,s,o){this.getDeviceUseCase=e,this.getDevicesUseCase=t,this.createDeviceUseCase=r,this.updateDeviceUseCase=i,this.deleteDeviceUseCase=n,this.getDeviceOnboardingInfoUseCase=s,this.getDeviceOnboardingTokenUseCase=o}async getDevice(e){return await this.getDeviceUseCase.execute(e)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(e){return await this.createDeviceUseCase.execute(e)}async getDeviceOnboardingInfo(e){return await this.getDeviceOnboardingInfoUseCase.execute(e)}async getDeviceOnboardingToken(e){return await this.getDeviceOnboardingTokenUseCase.execute(e)}async updateDevice(e){return await this.updateDeviceUseCase.execute(e)}async deleteDevice(e){return await this.deleteDeviceUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.GetDeviceUseCase,a.GetDevicesUseCase,a.CreateDeviceUseCase,a.UpdateDeviceUseCase,a.DeleteDeviceUseCase,a.GetDeviceOnboardingInfoUseCase,a.CreateDeviceOnboardingTokenUseCase])],c),t.DevicesFacade=c},360:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesFacade=void 0;const o=r(7071),a=r(485);let c=class FilesFacade{constructor(e,t,r,i,n,s,o,a){this.uploadOwnFileUseCase=e,this.getOrLoadFileUseCase=t,this.getFilesUseCase=r,this.downloadFileUseCase=i,this.getFileUseCase=n,this.createQrCodeForFileUseCase=s,this.createTokenForFileUseCase=o,this.createTokenQrCodeForFileUseCase=a}async getFiles(e){return await this.getFilesUseCase.execute(e)}async getOrLoadFile(e){return await this.getOrLoadFileUseCase.execute(e)}async downloadFile(e){return await this.downloadFileUseCase.execute(e)}async getFile(e){return await this.getFileUseCase.execute(e)}async uploadOwnFile(e){return await this.uploadOwnFileUseCase.execute(e)}async createQrCodeForFile(e){return await this.createQrCodeForFileUseCase.execute(e)}async createTokenForFile(e){return await this.createTokenForFileUseCase.execute(e)}async createTokenQrCodeForFile(e){return await this.createTokenQrCodeForFileUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.UploadOwnFileUseCase,a.GetOrLoadFileUseCase,a.GetFilesUseCase,a.DownloadFileUseCase,a.GetFileUseCase,a.CreateQrCodeForFileUseCase,a.CreateTokenForFileUseCase,a.CreateTokenQrCodeForFileUseCase])],c),t.FilesFacade=c},1106:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityFacade=void 0;const o=r(7071),a=r(485);let c=class IdentityFacade{constructor(e){this.checkIdentityUseCase=e}async checkIdentity(e){return await this.checkIdentityUseCase.execute(e)}};c=i([s(0,o.Inject),n("design:paramtypes",[a.CheckIdentityUseCase])],c),t.IdentityFacade=c},1532:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessagesFacade=void 0;const o=r(7071),a=r(485);let c=class MessagesFacade{constructor(e,t,r,i,n){this.getMessagesUseCase=e,this.getMessageUseCase=t,this.sendMessageUseCase=r,this.downloadAttachmentUseCase=i,this.getAttachmentMetadataUseCase=n}async sendMessage(e){return await this.sendMessageUseCase.execute(e)}async getMessages(e){return await this.getMessagesUseCase.execute(e)}async getMessage(e){return await this.getMessageUseCase.execute(e)}async downloadAttachment(e){return await this.downloadAttachmentUseCase.execute(e)}async getAttachmentMetadata(e){return await this.getAttachmentMetadataUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.GetMessagesUseCase,a.GetMessageUseCase,a.SendMessageUseCase,a.DownloadAttachmentUseCase,a.GetAttachmentMetadataUseCase])],c),t.MessagesFacade=c},7349:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplatesFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipTemplatesFacade{constructor(e,t,r,i,n,s,o){this.createOwnRelationshipTemplateUseCase=e,this.loadPeerRelationshipTemplateUseCase=t,this.getRelationshipTemplatesUseCase=r,this.getRelationshipTemplateUseCase=i,this.createQrCodeForOwnTemplateUseCase=n,this.createTokenQrCodeForOwnTemplateUseCase=s,this.createTokenForOwnTemplateUseCase=o}async createOwnRelationshipTemplate(e){return await this.createOwnRelationshipTemplateUseCase.execute(e)}async loadPeerRelationshipTemplate(e){return await this.loadPeerRelationshipTemplateUseCase.execute(e)}async getRelationshipTemplates(e){return await this.getRelationshipTemplatesUseCase.execute(e)}async getRelationshipTemplate(e){return await this.getRelationshipTemplateUseCase.execute(e)}async createQrCodeForOwnTemplate(e){return await this.createQrCodeForOwnTemplateUseCase.execute(e)}async createTokenQrCodeForOwnTemplate(e){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(e)}async createTokenForOwnTemplate(e){return await this.createTokenForOwnTemplateUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.CreateOwnRelationshipTemplateUseCase,a.LoadPeerRelationshipTemplateUseCase,a.GetRelationshipTemplatesUseCase,a.GetRelationshipTemplateUseCase,a.CreateQrCodeForOwnTemplateUseCase,a.CreateTokenQrCodeForOwnTemplateUseCase,a.CreateTokenForOwnTemplateUseCase])],c),t.RelationshipTemplatesFacade=c},8586:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipsFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipsFacade{constructor(e,t,r,i,n,s,o,a){this.getRelationshipsUseCase=e,this.getRelationshipUseCase=t,this.getRelationshipByAddressUseCase=r,this.createRelationshipUseCase=i,this.acceptRelationshipChangeUseCase=n,this.rejectRelationshipChangeUseCase=s,this.revokeRelationshipChangeUseCase=o,this.getAttributesForRelationshipUseCase=a}async getRelationships(e){return await this.getRelationshipsUseCase.execute(e)}async getRelationship(e){return await this.getRelationshipUseCase.execute(e)}async getRelationshipByAddress(e){return await this.getRelationshipByAddressUseCase.execute(e)}async createRelationship(e){return await this.createRelationshipUseCase.execute(e)}async acceptRelationshipChange(e){return await this.acceptRelationshipChangeUseCase.execute(e)}async rejectRelationshipChange(e){return await this.rejectRelationshipChangeUseCase.execute(e)}async revokeRelationshipChange(e){return await this.revokeRelationshipChangeUseCase.execute(e)}async getAttributesForRelationship(e){return await this.getAttributesForRelationshipUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.GetRelationshipsUseCase,a.GetRelationshipUseCase,a.GetRelationshipByAddressUseCase,a.CreateRelationshipUseCase,a.AcceptRelationshipChangeUseCase,a.RejectRelationshipChangeUseCase,a.RevokeRelationshipChangeUseCase,a.GetAttributesForRelationshipUseCase])],c),t.RelationshipsFacade=c},5392:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensFacade=void 0;const o=r(7071),a=r(485);let c=class TokensFacade{constructor(e,t,r,i,n){this.createOwnTokenUseCase=e,this.loadPeerTokenUseCase=t,this.getTokensUseCase=r,this.getTokenUseCase=i,this.getQRCodeForTokenUseCase=n}async createOwnToken(e){return await this.createOwnTokenUseCase.execute(e)}async loadPeerToken(e){return await this.loadPeerTokenUseCase.execute(e)}async getTokens(e){return await this.getTokensUseCase.execute(e)}async getToken(e){return await this.getTokenUseCase.execute(e)}async getQRCodeForToken(e){return await this.getQRCodeForTokenUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateOwnTokenUseCase,a.LoadPeerTokenUseCase,a.GetTokensUseCase,a.GetTokenUseCase,a.GetQRCodeForTokenUseCase])],c),t.TokensFacade=c},9728:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(941),t),n(r(4213),t),n(r(7974),t),n(r(360),t),n(r(1106),t),n(r(1532),t),n(r(8586),t),n(r(7349),t),n(r(5392),t)},5200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7371),t),n(r(4629),t),n(r(2432),t),n(r(5372),t),n(r(4164),t)},2432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeModule=void 0;t.RuntimeModule=class RuntimeModule{constructor(e,t,r){this.runtime=e,this.configuration=t,this.logger=r,this.subscriptionIds=[]}get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}subscribeToEvent(e,t){const r=this.runtime.eventBus.subscribe(e,t);this.subscriptionIds.push(r)}unsubscribeFromAllEvents(){this.subscriptionIds.forEach((e=>this.runtime.eventBus.unsubscribe(e))),this.subscriptionIds.splice(0)}}},5372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesIterator=t.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(e){return this.modules.find((t=>t.name.toLowerCase()===e.toLowerCase()))}add(e){this.modules.push(e)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}t.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(e){this.items=e,this.currentIndex=0}next(e){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}t.ModulesIterator=ModulesIterator},5590:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2500),t),n(r(4086),t),n(r(2205),t),n(r(5200),t),n(r(9662),t),n(r(6984),t),n(r(9757),t),n(r(986),t),n(r(3377),t),n(r(485),t)},8518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerModule=void 0;const i=r(5030),n=r(2205),s=r(5200);class AttributeListenerModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.AttributeCreatedEvent,this.handleAttributeCreated.bind(this))}async handleAttributeCreated(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data;if("IdentityAttribute"===r.content["@type"]&&r.shareInfo)return;if("RelationshipAttribute"===r.content["@type"]&&r.content.confidentiality===i.RelationshipAttributeConfidentiality.Private)return;const n=await t.consumptionServices.attributeListeners.getAttributeListeners();if(n.isError)return void this.logger.error("Could not get attribute listeners",n.error);const s=n.value.map((r=>this.createRequestIfAttributeMatchesQuery(t,r,e.data,e.eventTargetAddress)));await Promise.all(s)}async createRequestIfAttributeMatchesQuery(e,t,r,i){if(!await this.doesAttributeMatchQuery(e,t,r))return;const s={"@type":"ShareAttributeRequestItem",attribute:{...r.content,owner:i},sourceAttributeId:r.id,mustBeAccepted:!0,metadata:{attributeListenerId:t.id}},o=await e.consumptionServices.outgoingRequests.create({content:{items:[s]},peer:t.peer});o.isError?this.logger.error("Could not create request",o.error):this.runtime.eventBus.publish(new n.AttributeListenerTriggeredEvent(i,{attributeListener:t,attribute:r,request:o.value}))}async doesAttributeMatchQuery(e,t,r){const i=t.query;switch(i["@type"]){case"IdentityAttributeQuery":{if("IdentityAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeIdentityAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute IdentityAttributeQuery",t.error),!1):!!t.value.find((e=>e.id===r.id))}case"ThirdPartyRelationshipAttributeQuery":{if("RelationshipAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeThirdPartyRelationshipAttributeQuery({query:i});return t.isError?("error.runtime.recordNotFound"!==t.error.code&&this.logger.error("Could not execute ThirdPartyRelationshipAttributeQuery",t.error),!1):t.value.id===r.id}}}stop(){this.unsubscribeFromAllEvents()}}t.AttributeListenerModule=AttributeListenerModule},4777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeciderModule=void 0;const i=r(3850),n=r(2205),s=r(5200);class DeciderModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this))}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus===i.LocalRequestStatus.DecisionRequired)return e.data.request.content.items.some(flaggedAsManualDecisionRequired),await this.requireManualDecision(e)}async requireManualDecision(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress),i=await r.consumptionServices.incomingRequests.requireManualDecision({requestId:t.id});if(i.isError)return this.logger.error(`Could not require manual decision for request ${t.id}`,i.error),void await this.publishEvent(e,r,"Error");await this.publishEvent(e,r,"ManualRequestDecisionRequired")}async publishEvent(e,t,r){const i=e.data.request;switch(i.source.type){case"RelationshipTemplate":const s=(await t.transportServices.relationshipTemplates.getRelationshipTemplate({id:i.source.reference})).value;this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,s,r));break;case"Message":const o=await t.transportServices.messages.getMessage({id:i.source.reference}),a={...o.value,attachments:o.value.attachments.map((e=>e.id))};this.runtime.eventBus.publish(new n.MessageProcessedEvent(e.eventTargetAddress,a,r))}}stop(){this.unsubscribeFromAllEvents()}}function flaggedAsManualDecisionRequired(e){return e.requireManualDecision??e.items?.some((e=>e.requireManualDecision))}t.DeciderModule=DeciderModule},6432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageModule=void 0;const i=r(5030),n=r(2205),s=r(2432);class MessageModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.MessageReceivedEvent,this.handleMessageReceived.bind(this))}async handleMessageReceived(e){const t=e.data;this.logger.trace(`Incoming MessageReceivedEvent for ${t.id}`);let r;if("Mail"!==t.content["@type"])return;{const s=i.Mail.from(t.content);r=new n.MailReceivedEvent(e.eventTargetAddress,s,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published MailReceivedEvent for ${t.id}`)}const s=await this.runtime.getServices(e.eventTargetAddress),o=await s.transportServices.relationships.getRelationshipByAddress({address:t.createdBy});if(!o.isSuccess)return void this.logger.error(`Could not find relationship for address '${t.createdBy}'.`,o.error);const a=o.value;this.runtime.eventBus.publish(new n.RelationshipEvent(e.eventTargetAddress,r,a)),this.logger.trace(`Published RelationshipEvent for ${t.id} to ${a.id}`)}stop(){this.unsubscribeFromAllEvents()}}t.MessageModule=MessageModule},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModule=void 0;const i=r(3850),n=r(5030),s=r(2205),o=r(1908),a=r(2432),c=r(3377);class RequestModule extends a.RuntimeModule{init(){}start(){this.subscribeToEvent(s.PeerRelationshipTemplateLoadedEvent,this.handlePeerRelationshipTemplateLoaded.bind(this)),this.subscribeToEvent(s.MessageReceivedEvent,this.handleMessageReceivedEvent.bind(this)),this.subscribeToEvent(s.MessageSentEvent,this.handleMessageSentEvent.bind(this)),this.subscribeToEvent(s.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this)),this.subscribeToEvent(s.RelationshipChangedEvent,this.handleRelationshipChangedEvent.bind(this))}async handlePeerRelationshipTemplateLoaded(e){const t=e.data;if("RelationshipTemplateContent"!==t.content["@type"])return void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.NoRequest));const r=t.content,n=await this.runtime.getServices(e.eventTargetAddress);if((await n.consumptionServices.incomingRequests.getRequests({query:{"source.reference":t.id}})).value.some((e=>e.status!==i.LocalRequestStatus.Completed)))return this.logger.info(`There is already an open Request for the RelationshipTemplate '${t.id}'.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.NonCompletedRequestExists));const s=(await n.transportServices.relationships.getRelationships({query:{peer:t.createdBy}})).value;if(s.some((e=>e.status===c.RelationshipStatus.Pending)))return this.logger.info(`There is already a pending Relationship for the RelationshipTemplate '${t.id}'. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.RelationshipExists));if(s.some((e=>e.status===c.RelationshipStatus.Active))){if(r.onExistingRelationship){return void(await this.createIncomingRequest(n,r.onExistingRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.Error)))}return this.logger.info(`There is already an open Relationship for the RelationshipTemplate '${t.id}' and onExistingRelationship is not defined. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.RelationshipExists))}await this.createIncomingRequest(n,r.onNewRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.Error))}async handleMessageReceivedEvent(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data,i=r.content["@type"];switch(i){case"Request":await this.createIncomingRequest(t,r.content,r.id);break;case"Response":const e=r.content,i=await t.consumptionServices.outgoingRequests.complete({receivedResponse:e,messageId:r.id});i.isError&&this.logger.error(`Could not complete outgoing request for message id ${r.id} due to ${i.error}. Root error:`,i.error)}"Request"!==i&&this.runtime.eventBus.publish(new s.MessageProcessedEvent(e.eventTargetAddress,r,s.MessageProcessedResult.NoRequest))}async handleMessageSentEvent(e){const t=e.data;if("Request"!==t.content["@type"])return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.content,n=await r.consumptionServices.outgoingRequests.sent({requestId:i.id,messageId:t.id});n.isError&&this.logger.error(`Could not mark request '${i.id}' as sent using message '${t.id}'. Root error:`,n.error)}async createIncomingRequest(e,t,r){const i=await e.consumptionServices.incomingRequests.received({receivedRequest:t,requestSourceId:r});if(i.isError)return this.logger.error(`Could not receive request ${t.id}. Root error:`,i.error),!1;const n=await e.consumptionServices.incomingRequests.checkPrerequisites({requestId:i.value.id});return!n.isError||(this.logger.error(`Could not check prerequisites for request ${t.id}. Root error:`,n.error),!1)}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus!==i.LocalRequestStatus.Decided)return;const t=e.data.request;switch(t.source.type){case"RelationshipTemplate":await this.handleIncomingRequestDecidedForRelationship(e);break;case"Message":await this.handleIncomingRequestDecidedForMessage(e);break;default:throw new Error(`Cannot handle source.type '${t.source.type}'.`)}}async handleIncomingRequestDecidedForRelationship(e){const t=e.data.request,r=t.source.reference,i=await this.runtime.getServices(e.eventTargetAddress);if(t.response.content.result===n.ResponseResult.Rejected)return void await i.consumptionServices.incomingRequests.complete({requestId:t.id});const s=n.RelationshipCreationChangeRequestContent.from({response:t.response.content}),o=await i.transportServices.relationships.createRelationship({templateId:r,content:s});if(o.isError)return void this.logger.error(`Could not create relationship for templateId '${r}'. Root error:`,o.error);const a=t.id,c=await i.consumptionServices.incomingRequests.complete({requestId:a,responseSourceId:o.value.changes[0].id});c.isError&&this.logger.error(`Could not complete the request '${a}'. Root error:`,c.error)}async handleIncomingRequestDecidedForMessage(e){const t=e.data.request,r=t.id,i=await this.runtime.getServices(e.eventTargetAddress),n=await i.transportServices.messages.sendMessage({recipients:[t.peer],content:t.response.content});if(n.isError)return void this.logger.error(`Could not send message to answer the request '${r}'.`,n.error);const s=await i.consumptionServices.incomingRequests.complete({requestId:r,responseSourceId:n.value.id});s.isError&&this.logger.error(`Could not complete the request '${r}'. Root error:`,s.error)}async handleRelationshipChangedEvent(e){const t=e.data;if(t.status!==c.RelationshipStatus.Pending||!t.template.isOwn)return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.template,n=i.id;if("RelationshipTemplateContent"!==i.content["@type"])return;const s=t.changes[0],o=s.id;if("RelationshipCreationChangeRequestContent"!==s.request.content["@type"])return;const a=await r.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipCreationChange({templateId:n,relationshipChangeId:o});a.isError&&this.logger.error(`Could not create and complete request for templateId '${n}' and changeId '${o}'. Root error:`,a.error)}stop(){this.unsubscribeFromAllEvents()}}t.RequestModule=RequestModule},9662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8518),t),n(r(4777),t),n(r(6432),t),n(r(7570),t)},5953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7946:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5292),t),n(r(2693),t),n(r(7118),t),n(r(8678),t),n(r(9371),t),n(r(7564),t)},3377:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7946),t),n(r(5953),t),n(r(450),t)},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangeType=t.RelationshipChangeStatus=void 0,function(e){e.Pending="Pending",e.Rejected="Rejected",e.Revoked="Revoked",e.Accepted="Accepted"}(t.RelationshipChangeStatus||(t.RelationshipChangeStatus={})),function(e){e.Creation="Creation",e.Termination="Termination",e.TerminationCancellation="TerminationCancellation"}(t.RelationshipChangeType||(t.RelationshipChangeType={}))},2220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipStatus=void 0,function(e){e.Pending="Pending",e.Active="Active",e.Rejected="Rejected",e.Revoked="Revoked",e.Terminating="Terminating",e.Terminated="Terminated"}(t.RelationshipStatus||(t.RelationshipStatus={}))},6081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},450:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3456),t),n(r(7891),t),n(r(9475),t),n(r(3462),t),n(r(6261),t),n(r(6623),t),n(r(641),t),n(r(5968),t),n(r(2944),t),n(r(2220),t),n(r(6081),t),n(r(4561),t)},9365:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7771),t)},807:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),l=r(7049),p=r(7121);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByIdAndKeyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends l.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=a.CryptoSecretKey.fromBase64(e.secretKey),r=await this.anonymousTokenController.loadPeerToken(c.CoreId.from(e.id),t);return o.Result.ok(p.TokenMapper.toTokenDTO(r,!0))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[c.AnonymousTokenController,d])],f),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f},6297:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7121);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByTruncatedReferenceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends u.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await this.anonymousTokenController.loadPeerTokenByTruncated(e.reference);return o.Result.ok(l.TokenMapper.toTokenDTO(t,!0))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AnonymousTokenController,p])],d),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d},7771:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(807),t),n(r(6297),t)},2627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base64ForIdPrefix=void 0,function(e){e.RelationshipTemplate="UkxU",e.Token="VE9L",e.File="RklM"}(t.Base64ForIdPrefix||(t.Base64ForIdPrefix={}))},6819:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnerRestriction=void 0,function(e){e.Own="o",e.Peer="p"}(t.OwnerRestriction||(t.OwnerRestriction={}))},8728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(e){return e.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(e){return e.code.startsWith("error.platform.validation")}static isUnexpectedError(e){return e.code.startsWith("error.platform.validation")}}t.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},3832:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const o=s(r(2592));class QRCode{constructor(e){this.base64=e}asBase64(){return this.base64}static async from(e,t){const r=(await o.toDataURL(`nmshd://${t}#${e}`)).split(",")[1];return new QRCode(r)}static async forTruncateable(e){return await this.from(e.truncate(),"tr")}}t.QRCode=QRCode},6595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeErrors=void 0;const i=r(5172),n=r(2627);class RuntimeErrors{}t.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(e,t){return new i.ApplicationError("error.runtime.unknown",e,t)}alreadyInitialized(){return new i.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new i.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new i.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new i.ApplicationError("error.runtime.notStarted","The runtime is not started. You can only stop the runtime if you executed start before.")}recordNotFound(e){return this.recordNotFoundWithMessage(`${e instanceof Function?e.name:e} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(e){return new i.ApplicationError("error.runtime.recordNotFound",e)}invalidPropertyValue(e){return new i.ApplicationError("error.runtime.validation.invalidPropertyValue",e)}invalidPayload(e){return new i.ApplicationError("error.runtime.validation.invalidPayload",e??"The given combination of properties in the payload is not supported.")}notSupported(e){return new i.ApplicationError("error.runtime.notSupported",e)}invalidTokenContent(){return new i.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(e,t){return new i.ApplicationError("error.runtime.cacheEmpty",`The cache of ${e instanceof Function?e.name:e} with id '${t}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(e){return new i.ApplicationError("error.runtime.unknownType",e)}general(e){return new i.ApplicationError("error.runtime.servalError",e)}requestDeserialization(e){return new i.ApplicationError("error.runtime.requestDeserialization",e)}},RuntimeErrors.startup=new class Startup{noActiveAccount(){return new i.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new i.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new i.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}},RuntimeErrors.files=new class Files{invalidReference(e){return new i.ApplicationError("error.runtime.files.invalidReference",`The given reference '${e}' is not valid. The reference for a file must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.File}'.`)}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}cannotCreateQRCodeForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateQRCodeForPeerTemplate","You cannot create a QRCode for a peer template.")}invalidReference(e){return new i.ApplicationError("error.runtime.relationshipTemplates.invalidReference",`The given reference '${e}' is not valid. The reference for a relationship template must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.RelationshipTemplate}'.`)}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(e){return new i.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${e}' was not found in the given message.`)}},RuntimeErrors.challenges=new class Challenges{invalidSignature(){return new i.ApplicationError("error.runtime.challenges.invalidSignature","The signature is invalid.")}invalidChallengeString(){return new i.ApplicationError("error.runtime.challenges.invalidChallenge","The challengeString is invalid.")}}},2746:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema=t.SchemaRepository=void 0;const a=o(r(1581)),c=o(r(3351)),u=o(r(5477));t.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new a.default({allErrors:!0,allowUnionTypes:!0}),(0,u.default)(this.compiler),(0,c.default)(this.compiler)}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>s(r(1873))))}getSchema(e){return this.jsonSchemas.has(e)||this.jsonSchemas.set(e,new JsonSchema(this.getValidationFunction(e))),this.jsonSchemas.get(e)}getValidationFunction(e){return this.compiler.compile(this.getSchemaDefinition(e))}getSchemaDefinition(e){const t=this.schemaDefinitions[e];if(!t)throw new Error(`Schema ${e} not found`);return t}};class JsonSchema{constructor(e){this.validateSchema=e}validate(e){return{isValid:this.validateSchema(e),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}t.JsonSchema=JsonSchema},1873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateIdentityChallengeRequest=t.CreateRelationshipChallengeRequest=t.SyncEverythingRequest=t.DownloadAttachmentRequest=t.SyncDatawalletRequest=t.RegisterPushNotificationTokenRequest=t.LoadItemFromTruncatedReferenceRequest=t.DownloadFileRequest=t.UpdateSettingRequest=t.GetSettingsRequest=t.GetSettingRequest=t.DeleteSettingRequest=t.CreateSettingRequest=t.UpdateDraftRequest=t.GetDraftsRequest=t.GetDraftRequest=t.DeleteDraftRequest=t.CreateDraftRequest=t.UpdateAttributeRequest=t.SucceedAttributeRequest=t.ShareAttributeRequest=t.SentOutgoingRequestRequest=t.RequireManualDecisionOfIncomingRequestRequest=t.ReceivedIncomingRequestRequest=t.GetOutgoingRequestsRequest=t.GetOutgoingRequestRequest=t.GetIncomingRequestsRequest=t.GetIncomingRequestRequest=t.DiscardOutgoingRequestRequest=t.CreateOutgoingRequestRequest=t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest=t.CompleteOutgoingRequestRequest=t.CompleteIncomingRequestRequest=t.CheckPrerequisitesOfIncomingRequestRequest=t.RejectIncomingRequestRequest=t.CanCreateOutgoingRequestRequest=t.AcceptIncomingRequestRequest=t.GetSharedToPeerAttributesRequest=t.GetPeerAttributesRequest=t.GetAttributesRequest=t.GetAttributeRequest=t.ExecuteThirdPartyRelationshipAttributeQueryRequest=t.ExecuteRelationshipAttributeQueryRequest=t.ExecuteIdentityAttributeQueryRequest=t.DeleteAttributeRequest=t.CreateSharedAttributeCopyRequest=t.CreateAttributeRequest=t.GetAttributeListenerRequest=t.LoadPeerTokenAnonymousByTruncatedReferenceRequest=t.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,t.LoadPeerTokenRequest=t.LoadPeerTokenViaSecretRequest=t.LoadPeerTokenViaReferenceRequest=t.GetTokensRequest=t.GetTokenRequest=t.GetQRCodeForTokenRequest=t.CreateOwnTokenRequest=t.LoadPeerRelationshipTemplateRequest=t.LoadPeerRelationshipTemplateViaReferenceRequest=t.LoadPeerRelationshipTemplateViaSecretRequest=t.GetRelationshipTemplatesRequest=t.GetRelationshipTemplateRequest=t.CreateTokenQrCodeForOwnTemplateRequest=t.CreateTokenForOwnTemplateRequest=t.CreateQrCodeForOwnTemplateRequest=t.CreateOwnRelationshipTemplateRequest=t.RevokeRelationshipChangeRequest=t.RejectRelationshipChangeRequest=t.GetRelationshipsRequest=t.GetRelationshipByAddressRequest=t.GetRelationshipRequest=t.GetAttributesForRelationshipRequest=t.CreateRelationshipRequest=t.AcceptRelationshipChangeRequest=t.SendMessageRequest=t.GetMessagesRequest=t.GetMessageRequest=t.GetAttachmentMetadataRequest=t.CheckIdentityRequest=t.UploadOwnFileValidatableRequest=t.UploadOwnFileRequest=t.GetOrLoadFileRequest=t.GetOrLoadFileViaReferenceRequest=t.GetOrLoadFileViaSecretRequest=t.GetFilesRequest=t.GetFileRequest=t.CreateTokenQrCodeForFileRequest=t.CreateTokenForFileRequest=t.CreateQrCodeForFileRequest=t.UpdateDeviceRequest=t.GetDeviceOnboardingInfoRequest=t.GetDeviceRequest=t.DeleteDeviceRequest=t.CreateDeviceOnboardingTokenRequest=t.CreateDeviceRequest=t.ValidateChallengeRequest=t.CreateChallengeRequest=t.CreateDeviceChallengeRequest=void 0,t.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.GetAttributeListenerRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeListenerRequest",definitions:{GetAttributeListenerRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeListenerIdString"}},required:["id"],additionalProperties:!1},AttributeListenerIdString:{type:"string",pattern:"ATL[A-Za-z0-9]{17}"}}},t.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["content"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateSharedAttributeCopyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedAttributeCopyRequest",definitions:{CreateSharedAttributeCopyRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestReference:{$ref:"#/definitions/RequestIdString"}},required:["attributeId","peer","requestReference"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.ExecuteIdentityAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIdentityAttributeQueryRequest",definitions:{ExecuteIdentityAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIdentityAttributeQuery"},{$ref:"#/definitions/IdentityAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IIdentityAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1}}},t.ExecuteRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteRelationshipAttributeQueryRequest",definitions:{ExecuteRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IRelationshipAttributeQuery"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IRelationshipAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},attributeCreationHints:{$ref:"#/definitions/IRelationshipAttributeCreationHints"}},required:["key","owner","attributeCreationHints"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},IRelationshipAttributeCreationHints:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/IValueHints"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","Consent"]},IValueHints:{type:"object",properties:{editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/IValueHintsValue"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/IValueHints"}}},additionalProperties:!1},IValueHintsValue:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1}}},t.ExecuteThirdPartyRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteThirdPartyRelationshipAttributeQueryRequest",definitions:{ExecuteThirdPartyRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IThirdPartyRelationshipAttributeQuery"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IThirdPartyRelationshipAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},thirdParty:{$ref:"#/definitions/ICoreAddress"}},required:["key","owner","thirdParty"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1}}},t.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetAttributesRequestQuery"},onlyValid:{type:"boolean"}},additionalProperties:!1},GetAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},parentId:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.owner":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeeds:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeededBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.peer":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetPeerAttributesRequest",definitions:{GetPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetPeerAttributesRequestQuery"}},required:["peer"],additionalProperties:!1},GetPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetSharedToPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedToPeerAttributesRequest",definitions:{GetSharedToPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetSharedToPeerAttributesRequestQuery"}},required:["peer"],additionalProperties:!1},GetSharedToPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.AcceptIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptIncomingRequestRequest",definitions:{AcceptIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CanCreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CanCreateOutgoingRequestRequest",definitions:{CanCreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.RejectIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectIncomingRequestRequest",definitions:{RejectIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CheckPrerequisitesOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckPrerequisitesOfIncomingRequestRequest",definitions:{CheckPrerequisitesOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.CompleteIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteIncomingRequestRequest",definitions:{CompleteIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipChangeIdString"}]}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CompleteOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteOutgoingRequestRequest",definitions:{CompleteOutgoingRequestRequest:{type:"object",properties:{receivedResponse:{$ref:"#/definitions/ResponseJSON"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["receivedResponse","messageId"],additionalProperties:!1},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest",definitions:{CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},relationshipChangeId:{$ref:"#/definitions/RelationshipChangeIdString"}},required:["templateId","relationshipChangeId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOutgoingRequestRequest",definitions:{CreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content","peer"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.DiscardOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DiscardOutgoingRequestRequest",definitions:{DiscardOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestRequest",definitions:{GetIncomingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestsRequest",definitions:{GetIncomingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetIncomingRequestsRequestQuery"}},additionalProperties:!1},GetIncomingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestRequest",definitions:{GetOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetOutgoingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestsRequest",definitions:{GetOutgoingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetOutgoingRequestsRequestQuery"}},additionalProperties:!1},GetOutgoingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.ReceivedIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ReceivedIncomingRequestRequest",definitions:{ReceivedIncomingRequestRequest:{type:"object",properties:{receivedRequest:{$ref:"#/definitions/RequestJSON"},requestSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipTemplateIdString"}]}},required:["receivedRequest","requestSourceId"],additionalProperties:!1},RequestJSON:{type:"object",properties:{"@type":{type:"string",const:"Request"},"@context":{type:"string"},"@version":{type:"string"},id:{type:"string"},expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."}},required:["@type","items"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.RequireManualDecisionOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RequireManualDecisionOfIncomingRequestRequest",definitions:{RequireManualDecisionOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.SentOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SentOutgoingRequestRequest",definitions:{SentOutgoingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["requestId","messageId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.ShareAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ShareAttributeRequest",definitions:{ShareAttributeRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestTitle:{type:"string"},requestDescription:{type:"string"},requestMetadata:{},requestItemTitle:{type:"string"},requestItemDescription:{type:"string"}},required:["attributeId","peer"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{successorContent:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},succeeds:{$ref:"#/definitions/AttributeIdString"}},required:["successorContent","succeeds"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"},content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["id","content"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},t.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetDraftsQuery"}},additionalProperties:!1},GetDraftsQuery:{type:"object",properties:{type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},lastModifiedAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"},content:{}},required:["id","content"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{$ref:"#/definitions/GenericIdString"},scope:{type:"string",enum:["Identity","Device","Relationship"]},succeedsAt:{$ref:"#/definitions/ISO8601DateTimeString"},succeedsItem:{$ref:"#/definitions/LocalSettingIdString"}},required:["key","value"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetSettingsQuery"}},additionalProperties:!1},GetSettingsQuery:{type:"object",properties:{key:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},scope:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},reference:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsItem:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"},value:{}},required:["id","value"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.LoadItemFromTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadItemFromTruncatedReferenceRequest",definitions:{LoadItemFromTruncatedReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},installationId:{type:"string"},platform:{type:"string"}},required:["handle","installationId","platform"],additionalProperties:!1}}},t.SyncDatawalletRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncDatawalletRequest",definitions:{SyncDatawalletRequest:{type:"object",additionalProperties:!1}}},t.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.SyncEverythingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncEverythingRequest",definitions:{SyncEverythingRequest:{type:"object",additionalProperties:!1}}},t.CreateRelationshipChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChallengeRequest",definitions:{CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.CreateIdentityChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateIdentityChallengeRequest",definitions:{CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1}}},t.CreateDeviceChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceChallengeRequest",definitions:{CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.CreateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateChallengeRequest",definitions:{CreateChallengeRequest:{anyOf:[{$ref:"#/definitions/CreateRelationshipChallengeRequest"},{$ref:"#/definitions/CreateIdentityChallengeRequest"},{$ref:"#/definitions/CreateDeviceChallengeRequest"}]},CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1},CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.ValidateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateChallengeRequest",definitions:{ValidateChallengeRequest:{type:"object",properties:{challengeString:{type:"string"},signature:{type:"string"}},required:["challengeString","signature"],additionalProperties:!1}}},t.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},t.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{$ref:"#/definitions/GenericIdString"}},required:["id"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"}}},t.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.CreateQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForFileRequest",definitions:{CreateQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetFilesQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetFilesQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},description:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filename:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filesize:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},mimetype:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},title:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},isOwn:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.GetOrLoadFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaSecretRequest",definitions:{GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetOrLoadFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaReferenceRequest",definitions:{GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.GetOrLoadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileRequest",definitions:{GetOrLoadFileRequest:{anyOf:[{$ref:"#/definitions/GetOrLoadFileViaSecretRequest"},{$ref:"#/definitions/GetOrLoadFileViaReferenceRequest"}]},GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.UploadOwnFileValidatableRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileValidatableRequest",definitions:{UploadOwnFileValidatableRequest:{type:"object",properties:{filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"},content:{type:"object"}},required:["content","expiresAt","filename","mimetype","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"}},required:["id"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{$ref:"#/definitions/AddressString"},minItems:1},content:{},attachments:{type:"array",items:{$ref:"#/definitions/FileIdString"}}},required:["recipients","content"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},content:{}},required:["templateId","content"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetAttributesForRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesForRelationshipRequest",definitions:{GetAttributesForRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetRelationshipsQuery"}},additionalProperties:!1},GetRelationshipsQuery:{type:"object",properties:{peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"template.id":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},content:{},maxNumberOfAllocations:{type:"number",minimum:1}},required:["expiresAt","content"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForOwnTemplateRequest",definitions:{CreateQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["id"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerRelationshipTemplateViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest",definitions:{LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.LoadPeerRelationshipTemplateViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest",definitions:{LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{anyOf:[{$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest"},{$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest"}]},LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetTokensQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetTokensQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerTokenViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaReferenceRequest",definitions:{LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.LoadPeerTokenViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaSecretRequest",definitions:{LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{anyOf:[{$ref:"#/definitions/LoadPeerTokenViaReferenceRequest"},{$ref:"#/definitions/LoadPeerTokenViaSecretRequest"}]},LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}}},5420:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UseCase=void 0;const n=r(194),s=r(5172),o=r(9663),a=i(r(4530)),c=r(8728),u=r(6595);t.UseCase=class UseCase{constructor(e){this.requestValidator=e}async execute(e){if(this.requestValidator){const t=await this.requestValidator.validate(e);if(t.isInvalid())return this.validationFailed(t)}try{return await this.executeInternal(e)}catch(e){return this.failingResultFromUnknownError(e)}}failingResultFromUnknownError(e){return e instanceof Error?e instanceof o.RequestError?this.handleRequestError(e):e instanceof n.ServalError?this.handleServalError(e):e instanceof s.ApplicationError?s.Result.fail(e):e instanceof o.CoreError?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(u.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${e.message}`,e)):s.Result.fail(u.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,a.default)(e)}`,e))}handleServalError(e){let t;return t=e instanceof n.ParsingError||e instanceof n.ValidationError?u.RuntimeErrors.serval.requestDeserialization(e.message):e.message.match(/Type '.+' with version [0-9]+ was not found within reflection classes. You might have to install a module first./)?u.RuntimeErrors.serval.unknownType(e.message):u.RuntimeErrors.serval.general(e.message),t.stack=e.stack,s.Result.fail(t)}handleRequestError(e){return c.PlatformErrorCodes.isNotFoundError(e)?s.Result.fail(u.RuntimeErrors.general.recordNotFoundWithMessage(e.reason)):c.PlatformErrorCodes.isValidationError(e)||c.PlatformErrorCodes.isUnexpectedError(e)?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(e)}validationFailed(e){const t=e.getFailures()[0];return s.Result.fail(t.error)}}},7049:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2627),t),n(r(6819),t),n(r(3832),t),n(r(6595),t),n(r(2746),t),n(r(5420),t),n(r(3800),t),n(r(7674),t),n(r(9872),t),n(r(7111),t)},3800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaValidator=void 0;const i=r(6595),n=r(9872),s=r(7111);t.SchemaValidator=class SchemaValidator{constructor(e){this.schema=e}validate(e){const t=this.schema.validate(e);return this.convertValidationResult(t)}convertValidationResult(e){const t=new s.ValidationResult;return e.isValid||t.addFailures(e.errors.map(this.schemaErrorToValidationFailure)),t}schemaErrorToValidationFailure(e){const t=`${e.instancePath} ${e.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new n.ValidationFailure(i.RuntimeErrors.general.invalidPropertyValue(t),e.instancePath)}}},7674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationFailure=void 0;t.ValidationFailure=class ValidationFailure{constructor(e,t){this.error=e,this.propertyName=t}}},7111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResult=void 0;t.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailure(e){this.failures.push(e)}addFailures(e){this.failures.push(...e)}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.map((e=>e.error.message))}getFailureCodes(){return this.failures.map((e=>e.error.code))}}},4231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerMapper=void 0;t.AttributeListenerMapper=class AttributeListenerMapper{static toAttributeListenerDTO(e){return{id:e.id.toString(),query:e.query.toJSON(),peer:e.peer.toString()}}static toAttributeListenerDTOList(e){return e.map((e=>this.toAttributeListenerDTO(e)))}}},1316:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenerUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(4231);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeListenerRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class GetAttributeListenerUseCase extends l.UseCase{constructor(e,t){super(t),this.attributeListenersController=e}async executeInternal(e){const t=await this.attributeListenersController.getAttributeListener(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttributeListener));const r=p.AttributeListenerMapper.toAttributeListenerDTO(t);return o.Result.ok(r)}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributeListenersController,d])],f),t.GetAttributeListenerUseCase=f},5129:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenersUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),l=r(4231);let p=class GetAttributeListenersUseCase extends u.UseCase{constructor(e){super(),this.attributeListenersController=e}async executeInternal(){const e=await this.attributeListenersController.getAttributeListeners(),t=l.AttributeListenerMapper.toAttributeListenerDTOList(e);return o.Result.ok(t)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.AttributeListenersController])],p),t.GetAttributeListenersUseCase=p},4864:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4231),t),n(r(1316),t),n(r(5129),t)},1192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMapper=void 0;t.AttributeMapper=class AttributeMapper{static toAttributeDTO(e){return{id:e.id.toString(),parentId:e.parentId?.toString(),content:e.content.toJSON(),createdAt:e.createdAt.toString(),succeeds:e.succeeds?.toString(),succeededBy:e.succeededBy?.toString(),shareInfo:e.shareInfo?.toJSON()}}static toAttributeDTOList(e){return e.map((e=>this.toAttributeDTO(e)))}}},7716:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(1192);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class CreateAttributeUseCase extends l.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateLocalAttributeParams.from({content:e.content}),r=await this.attributeController.createLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(p.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.CreateAttributeUseCase=f},236:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSharedAttributeCopyUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(1192);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateSharedAttributeCopyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class CreateSharedAttributeCopyUseCase extends l.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateSharedLocalAttributeCopyParams.from({sourceAttributeId:c.CoreId.from(e.attributeId),peer:c.CoreAddress.from(e.peer),requestReference:c.CoreId.from(e.requestReference)}),r=await this.attributeController.createSharedLocalAttributeCopy(t);return await this.accountController.syncDatawallet(),o.Result.ok(p.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.CreateSharedAttributeCopyUseCase=f},6899:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049);let p=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("DeleteAttributeRequest"))}};p=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],p);let d=class DeleteAttributeUseCase extends l.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,p])],d),t.DeleteAttributeUseCase=d},6847:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIdentityAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),l=r(7049),p=r(1192);let d=class ExecuteIdentityAttributeQueryUseCase extends l.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeIdentityAttributeQuery(c.IdentityAttributeQuery.from(e.query));return o.Result.ok(p.AttributeMapper.toAttributeDTOList(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteIdentityAttributeQueryUseCase=d},4538:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),l=r(7049),p=r(1192);let d=class ExecuteRelationshipAttributeQueryUseCase extends l.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeRelationshipAttributeQuery(c.RelationshipAttributeQuery.from(e.query));return t?o.Result.ok(p.AttributeMapper.toAttributeDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteRelationshipAttributeQueryUseCase=d},4922:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),l=r(7049),p=r(1192);let d=class ExecuteThirdPartyRelationshipAttributeQueryUseCase extends l.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeThirdPartyRelationshipAttributeQuery(c.ThirdPartyRelationshipAttributeQuery.from(e.query));return t?o.Result.ok(p.AttributeMapper.toAttributeDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d},3421:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(1192);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class GetAttributeUseCase extends l.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?o.Result.ok(p.AttributeMapper.toAttributeDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f),t.GetAttributeUseCase=f},9536:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(8565),l=r(4714),p=r(7071),d=r(7049),f=r(8537),y=r(1192);let h=class GetAttributesUseCase extends d.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{},r=(0,f.flattenObject)(t),i=GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),a.Result.ok(y.AttributeMapper.toAttributeDTOList(n))}};h.queryTranslator=new o.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.parentId))]:!0,[(0,l.nameof)((e=>e.succeeds))]:!0,[(0,l.nameof)((e=>e.succeededBy))]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:!0},alias:{[(0,l.nameof)((e=>e.createdAt))]:[(0,l.nameof)((e=>e.createdAt))],[(0,l.nameof)((e=>e.parentId))]:[(0,l.nameof)((e=>e.parentId))],[(0,l.nameof)((e=>e.succeeds))]:[(0,l.nameof)((e=>e.succeeds))],[(0,l.nameof)((e=>e.succeededBy))]:[(0,l.nameof)((e=>e.succeededBy))],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`],[`${(0,l.nameof)((e=>e.content))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`],[`${(0,l.nameof)((e=>e.shareInfo))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]},custom:{[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:(e,t)=>{if(!t)return;const r=u.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]={$gte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:(e,t)=>{if(!t)return;const r=u.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]={$lte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:(e,t)=>{const r=[];for(const e of t){const t={[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:{$contains:e}};r.push(t)}e.$or=r}}}),h=i([s(0,p.Inject),n("design:paramtypes",[c.AttributesController])],h),t.GetAttributesUseCase=h},2089:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),l=r(8537),p=r(1192),d=r(9536);let f=class GetPeerAttributesUseCase extends u.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{};t["content.owner"]=e.peer;const r=(0,l.flattenObject)(t),i=d.GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),o.Result.ok(p.AttributeMapper.toAttributeDTOList(n))}};f=i([s(0,c.Inject),n("design:paramtypes",[a.AttributesController])],f),t.GetPeerAttributesUseCase=f},6823:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedToPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(8537),d=r(1192),f=r(9536);let y=class GetSharedToPeerAttributesUseCase extends l.UseCase{constructor(e,t){super(),this.attributeController=e,this.identityController=t}async executeInternal(e){const t=e.query??{};t["content.owner"]=this.identityController.address.toString(),t["shareInfo.peer"]=e.peer;const r=(0,p.flattenObject)(t),i=f.GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};y=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,c.IdentityController])],y),t.GetSharedToPeerAttributesUseCase=y},6438:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),l=r(7071),p=r(7049),d=r(3289);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ShareAttributeRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class ShareAttributeUseCase extends p.UseCase{constructor(e,t,r,i,n){super(n),this.attributeController=e,this.accountController=t,this.requestsController=r,this.messageController=i}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(u.CoreId.from(e.attributeId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute));const r=u.CoreAddress.from(e.peer),i={peer:r,content:{title:e.requestTitle,description:e.requestDescription,metadata:e.requestMetadata,items:[c.ShareAttributeRequestItem.from({attribute:t.content,sourceAttributeId:t.id,title:e.requestItemTitle,description:e.requestItemDescription,mustBeAccepted:!0})]}},n=await this.requestsController.canCreate(i);if(n.isError())return o.Result.fail(n.error);const s=await this.requestsController.create(i);return await this.messageController.sendMessage({recipients:[r],content:s.content}),await this.accountController.syncDatawallet(),o.Result.ok(d.RequestMapper.toLocalRequestDTO(s))}};y=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),s(3,l.Inject),s(4,l.Inject),n("design:paramtypes",[a.AttributesController,u.AccountController,a.OutgoingRequestsController,u.MessageController,f])],y),t.ShareAttributeUseCase=y},4415:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SucceedAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(1192);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("SucceedAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class SucceedAttributeUseCase extends l.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.SucceedLocalAttributeParams.from({successorContent:e.successorContent,succeeds:e.succeeds}),r=await this.attributeController.succeedLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(p.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.SucceedAttributeUseCase=f},9660:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(1192);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class UpdateAttributeUseCase extends l.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.UpdateLocalAttributeParams.from({id:e.id,content:e.content}),r=await this.attributeController.updateLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(p.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.UpdateAttributeUseCase=f},99:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1192),t),n(r(7716),t),n(r(236),t),n(r(6899),t),n(r(6847),t),n(r(4538),t),n(r(4922),t),n(r(3421),t),n(r(9536),t),n(r(2089),t),n(r(6823),t),n(r(6438),t),n(r(4415),t),n(r(9660),t)},7372:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(660);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class CreateDraftUseCase extends l.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.createDraft(e.content,e.type);return await this.accountController.syncDatawallet(),o.Result.ok(p.DraftMapper.toDraftDTO(t))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,d])],f),t.CreateDraftUseCase=f},9696:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049);let p=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("DeleteDraftRequest"))}};p=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],p);let d=class DeleteDraftUseCase extends l.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?(await this.draftController.deleteDraft(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.Draft))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,p])],d),t.DeleteDraftUseCase=d},660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraftMapper=void 0;t.DraftMapper=class DraftMapper{static toDraftDTO(e){return{id:e.id.toString(),type:e.type,createdAt:e.createdAt.toString(),lastModifiedAt:e.lastModifiedAt.toISOString(),content:e.content.toJSON()}}static toDraftDTOList(e){return e.map((e=>this.toDraftDTO(e)))}}},3165:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(660);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class GetDraftUseCase extends l.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?o.Result.ok(p.DraftMapper.toDraftDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.Draft))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.DraftsController,d])],f),t.GetDraftUseCase=f},6863:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),l=r(7071),p=r(7049),d=r(660);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetDraftsRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetDraftsUseCase extends p.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=GetDraftsUseCase.queryTranslator.parse(e.query),r=await this.draftController.getDrafts(t);return a.Result.ok(d.DraftMapper.toDraftDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.type))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.lastModifiedAt))]:!0}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.DraftsController,f])],y),t.GetDraftsUseCase=y},5760:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDraftUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),l=r(7071),p=r(7049),d=r(660);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("UpdateDraftRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class UpdateDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(u.CoreId.from(e.id));return t?(t.content=o.Serializable.fromUnknown(e.content),await this.draftController.updateDraft(t),await this.accountController.syncDatawallet(),a.Result.ok(d.DraftMapper.toDraftDTO(t))):a.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Draft))}};y=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.DraftsController,u.AccountController,f])],y),t.UpdateDraftUseCase=y},5966:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7372),t),n(r(9696),t),n(r(660),t),n(r(3165),t),n(r(6863),t),n(r(5760),t)},3742:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4864),t),n(r(99),t),n(r(5966),t),n(r(3289),t),n(r(1394),t)},4262:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class AcceptIncomingRequestUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.accept(e),o.Result.ok(p.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.AcceptIncomingRequestUseCase=d},3678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanAcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),l=r(8062);let p=class CanAcceptIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canAccept(e),r=l.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],p),t.CanAcceptIncomingRequestUseCase=p},8112:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanCreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(8062);let d=class CanCreateOutgoingRequestUseCase extends l.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.canCreate({content:e.content,peer:e.peer?c.CoreAddress.from(e.peer):void 0}),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.CanCreateOutgoingRequestUseCase=d},8197:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanRejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),l=r(8062);let p=class CanRejectIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canReject(e),r=l.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],p),t.CanRejectIncomingRequestUseCase=p},2113:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckPrerequisitesOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class CheckPrerequisitesOfIncomingRequestUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.checkPrerequisites({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(p.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.CheckPrerequisitesOfIncomingRequestUseCase=d},6353:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class CompleteIncomingRequestUseCase extends l.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipController=r}async executeInternal(e){const t=await this.getResponseSourceObject(e),r=c.CoreId.from(e.requestId),i=await this.incomingRequestsController.complete({requestId:r,responseSourceObject:t});return o.Result.ok(p.RequestMapper.toLocalRequestDTO(i))}async getResponseSourceObject(e){if(!e.responseSourceId)return;if(e.responseSourceId.startsWith("MSG")){const t=await this.messageController.getMessage(c.CoreId.from(e.responseSourceId));if(!t)throw l.RuntimeErrors.general.recordNotFound(c.Message);return t}const t=await this.relationshipController.getRelationships({"cache.changes.id":e.responseSourceId});if(0===t.length)throw l.RuntimeErrors.general.recordNotFound(c.RelationshipChange);return t[0].cache.creationChange}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.IncomingRequestsController,c.MessageController,c.RelationshipsController])],d),t.CompleteIncomingRequestUseCase=d},4464:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),l=r(7071),p=r(7049),d=r(3386);let f=class CompleteOutgoingRequestUseCase extends p.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(u.CoreId.from(e.messageId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Message));const r={requestId:u.CoreId.from(e.receivedResponse.requestId),receivedResponse:c.Response.from(e.receivedResponse),responseSourceObject:t},i=await this.outgoingRequestsController.complete(r);return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}};f=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.MessageController])],f),t.CompleteOutgoingRequestUseCase=f},8147:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase extends l.UseCase{constructor(e,t,r){super(),this.outgoingRequestsController=e,this.relationshipController=t,this.relationshipTemplateController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(c.CoreId.from(e.templateId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.RelationshipTemplate));const r=await this.relationshipController.getRelationships({"cache.changes.id":e.relationshipChangeId});if(0===r.length)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.RelationshipChange));const i={template:t,creationChange:r[0].cache.creationChange},n=await this.outgoingRequestsController.createFromRelationshipCreationChange(i);return o.Result.ok(p.RequestMapper.toLocalRequestDTO(n))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.RelationshipsController,c.RelationshipTemplateController])],d),t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase=d},2285:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class CreateOutgoingRequestUseCase extends l.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.create({content:e.content,peer:c.CoreAddress.from(e.peer)});return o.Result.ok(p.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.CreateOutgoingRequestUseCase=d},3923:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiscardOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049);let p=class DiscardOutgoingRequestUseCase extends l.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){return await this.outgoingRequestsController.discardOutgoingRequest(c.CoreId.from(e.id)),o.Result.ok(void 0)}};p=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],p),t.DiscardOutgoingRequestUseCase=p},3094:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class GetIncomingRequestUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=p.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.GetIncomingRequestUseCase=d},1697:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),l=r(7071),p=r(7049),d=r(8537),f=r(3386);let y=class GetIncomingRequestsUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=(0,d.flattenObject)(e.query),r=GetIncomingRequestsUseCase.queryTranslator.parse(t),i=await this.incomingRequestsController.getIncomingRequests(r),n=f.RequestMapper.toLocalRequestDTOList(i);return a.Result.ok(n)}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.id))]:!0,[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0},alias:{[(0,u.nameof)((e=>e.id))]:(0,u.nameof)((e=>e.id)),[(0,u.nameof)((e=>e.peer))]:(0,u.nameof)((e=>e.peer)),[(0,u.nameof)((e=>e.createdAt))]:(0,u.nameof)((e=>e.createdAt)),[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`}}),y=i([s(0,l.Inject),n("design:paramtypes",[c.IncomingRequestsController])],y),t.GetIncomingRequestsUseCase=y},6293:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class GetOutgoingRequestUseCase extends l.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.getOutgoingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=p.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.GetOutgoingRequestUseCase=d},5771:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),l=r(7071),p=r(7049),d=r(8537),f=r(3386);let y=class GetOutgoingRequestsUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=(0,d.flattenObject)(e.query),r=GetOutgoingRequestsUseCase.queryTranslator.parse(t),i=await this.outgoingRequestsController.getOutgoingRequests(r),n=f.RequestMapper.toLocalRequestDTOList(i);return a.Result.ok(n)}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.id))]:!0,[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0},alias:{[(0,u.nameof)((e=>e.id))]:(0,u.nameof)((e=>e.id)),[(0,u.nameof)((e=>e.peer))]:(0,u.nameof)((e=>e.peer)),[(0,u.nameof)((e=>e.createdAt))]:(0,u.nameof)((e=>e.createdAt)),[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`}}),y=i([s(0,l.Inject),n("design:paramtypes",[c.OutgoingRequestsController])],y),t.GetOutgoingRequestsUseCase=y},7782:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReceivedIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),l=r(7071),p=r(7049),d=r(3386);let f=class ReceivedIncomingRequestUseCase extends p.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipTemplateController=r}async executeInternal(e){let t;if(e.requestSourceId.startsWith("MSG")){if(t=await this.messageController.getMessage(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(u.Message))}else if(t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.incomingRequestsController.received({receivedRequest:c.Request.from(e.receivedRequest),requestSourceObject:t});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(r))}};f=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[a.IncomingRequestsController,u.MessageController,u.RelationshipTemplateController])],f),t.ReceivedIncomingRequestUseCase=f},5196:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class RejectIncomingRequestUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.reject(e),o.Result.ok(p.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.RejectIncomingRequestUseCase=d},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMapper=void 0;t.RequestMapper=class RequestMapper{static toLocalRequestDTO(e){return{id:e.id.toString(),isOwn:e.isOwn,peer:e.peer.toString(),createdAt:e.createdAt.toString(),content:e.content.toJSON(),source:e.source?{type:e.source.type,reference:e.source.reference.toString()}:void 0,response:e.response?{createdAt:e.response.createdAt.toString(),content:e.response.content.toJSON(),source:e.response.source?{type:e.response.source.type,reference:e.response.source.reference.toString()}:void 0}:void 0,status:e.status}}static toLocalRequestDTOList(e){return e.map((e=>this.toLocalRequestDTO(e)))}}},8062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestValidationResultMapper=void 0;t.RequestValidationResultMapper=class RequestValidationResultMapper{static toRequestValidationResultDTO(e){return{isSuccess:e.isSuccess(),code:e.isError()?e.error.code:void 0,message:e.isError()?e.error.message:void 0,items:e.items.map((e=>this.toRequestValidationResultDTO(e)))}}}},5943:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RequireManualDecisionOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class RequireManualDecisionOfIncomingRequestUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.requireManualDecision({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(p.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.RequireManualDecisionOfIncomingRequestUseCase=d},1938:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SentOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(3386);let d=class SentOutgoingRequestUseCase extends l.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(c.CoreId.from(e.messageId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Message));const r={requestId:c.CoreId.from(e.requestId),requestSourceObject:t},i=await this.outgoingRequestsController.sent(r);return o.Result.ok(p.RequestMapper.toLocalRequestDTO(i))}};d=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.MessageController])],d),t.SentOutgoingRequestUseCase=d},8537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=void 0,t.flattenObject=function flattenObject(e){const t={};for(const r in e){const i=e[r];if("object"!=typeof i||Array.isArray(i))t[r]=i;else{const e=flattenObject(i);for(const i in e)t[`${r}.${i}`]=e[i]}}return t}},3289:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4262),t),n(r(3678),t),n(r(8112),t),n(r(8197),t),n(r(2113),t),n(r(6353),t),n(r(4464),t),n(r(8147),t),n(r(2285),t),n(r(3923),t),n(r(3094),t),n(r(1697),t),n(r(6293),t),n(r(5771),t),n(r(7782),t),n(r(5196),t),n(r(3386),t),n(r(5943),t),n(r(1938),t)},3951:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(6950);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class CreateSettingUseCase extends l.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.createSetting({key:e.key,value:e.value,reference:e.reference?c.CoreId.from(e.reference):void 0,scope:e.scope,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0});return await this.accountController.syncDatawallet(),o.Result.ok(p.SettingMapper.toSettingDTO(t))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f),t.CreateSettingUseCase=f},678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(485),p=r(7049);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class DeleteSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?(await this.settingController.deleteSetting(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.Setting))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f),t.DeleteSettingUseCase=f},6798:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),l=r(7049),p=r(6950);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class GetSettingUseCase extends l.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?o.Result.ok(p.SettingMapper.toSettingDTO(t)):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.Setting))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.SettingsController,d])],f),t.GetSettingUseCase=f},6101:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),l=r(7071),p=r(7049),d=r(6950);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetSettingsRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetSettingsUseCase extends p.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=GetSettingsUseCase.queryTranslator.parse(e.query),r=await this.settingController.getSettings(t);return a.Result.ok(d.SettingMapper.toSettingDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.key))]:!0,[(0,u.nameof)((e=>e.scope))]:!0,[(0,u.nameof)((e=>e.reference))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.succeedsItem))]:!0,[(0,u.nameof)((e=>e.succeedsAt))]:!0}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.SettingsController,f])],y),t.GetSettingsUseCase=y},6950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMapper=void 0;t.SettingMapper=class SettingMapper{static toSettingDTO(e){return{id:e.id.toString(),key:e.key,scope:e.scope.toString(),reference:e.reference?.toString(),value:e.value.toJSON(),createdAt:e.createdAt.toISOString(),succeedsItem:e.succeedsItem?.toString(),succeedsAt:e.succeedsAt?.toString()}}static toSettingDTOList(e){return e.map((e=>this.toSettingDTO(e)))}}},1853:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSettingUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),l=r(7071),p=r(485),d=r(7049),f=r(6950);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("UpdateSettingRequest"))}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UpdateSettingUseCase extends d.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(u.CoreId.from(e.id));return t?(t.value=o.Serializable.fromUnknown(e.value),await this.settingController.updateSetting(t),await this.accountController.syncDatawallet(),a.Result.ok(f.SettingMapper.toSettingDTO(t))):a.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Setting))}};h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.SettingsController,u.AccountController,y])],h),t.UpdateSettingUseCase=h},1394:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3951),t),n(r(678),t),n(r(6798),t),n(r(6101),t),n(r(6950),t),n(r(1853),t)},485:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9365),t),n(r(6819),t),n(r(6595),t),n(r(3742),t),n(r(9667),t)},2737:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class DisableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}executeInternal(){return this.accountController.disableAutoSync(),o.Result.ok(void 0)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],l),t.DisableAutoSyncUseCase=l},9710:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class EnableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.enableAutoSync(),o.Result.ok(void 0)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],l),t.EnableAutoSyncUseCase=l},569:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067);let p=class GetDeviceInfoUseCase extends u.UseCase{constructor(e){super(),this.deviceController=e}executeInternal(){const e=this.deviceController.device;return o.Result.ok(l.DeviceMapper.toDeviceDTO(e))}};p=i([s(0,c.Inject),n("design:paramtypes",[a.DeviceController])],p),t.GetDeviceInfoUseCase=p},3378:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIdentityInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class GetIdentityInfoUseCase extends u.UseCase{constructor(e){super(),this.identityController=e}executeInternal(){const e=this.identityController.identity;return o.Result.ok({address:e.address.toString(),publicKey:e.publicKey.toString()})}};l=i([s(0,c.Inject),n("design:paramtypes",[a.IdentityController])],l),t.GetIdentityInfoUseCase=l},8562:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSyncInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class GetSyncInfoUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){const e=await this.accountController.getLastCompletedSyncTime(),t=await this.accountController.getLastCompletedDatawalletSyncTime();return o.Result.ok({lastSyncRun:e?{completedAt:e.toISOString()}:void 0,lastDatawalletSync:t?{completedAt:t.toISOString()}:void 0})}};l=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],l),t.GetSyncInfoUseCase=l},4614:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadItemFromTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067),p=r(5076),d=r(8434),f=r(7121);let y=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadItemFromTruncatedReferenceRequest"))}};y=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],y);let h=class LoadItemFromTruncatedReferenceUseCase extends u.UseCase{constructor(e,t,r,i,n){super(n),this.fileController=e,this.templateController=t,this.tokenController=r,this.accountController=i}async executeInternal(e){try{return await this._executeInternal(e)}finally{await this.accountController.syncDatawallet()}}async _executeInternal(e){const t=e.reference;if(t.startsWith(u.Base64ForIdPrefix.RelationshipTemplate)){const e=await this.templateController.loadPeerRelationshipTemplateByTruncated(t);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(t.startsWith(u.Base64ForIdPrefix.File)){const e=await this.fileController.getOrLoadFileByTruncated(t);return o.Result.ok({type:"File",value:p.FileMapper.toFileDTO(e)})}return await this.handleTokenReference(t)}async handleTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Token,t.id.toString());const r=t.cache.content;if(r instanceof a.TokenContentRelationshipTemplate){const e=await this.templateController.loadPeerRelationshipTemplate(r.templateId,r.secretKey);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(r instanceof a.TokenContentFile){const e=await this.fileController.getOrLoadFile(r.fileId,r.secretKey);return o.Result.ok({type:"File",value:p.FileMapper.toFileDTO(e)})}return r instanceof a.TokenContentDeviceSharedSecret?o.Result.ok({type:"DeviceOnboardingInfo",value:l.DeviceMapper.toDeviceOnboardingInfoDTO(r.sharedSecret)}):o.Result.ok({type:"Token",value:f.TokenMapper.toTokenDTO(t,!0)})}};h=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),s(4,c.Inject),n("design:paramtypes",[a.FileController,a.RelationshipTemplateController,a.TokenController,a.AccountController,y])],h),t.LoadItemFromTruncatedReferenceUseCase=h},3826:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterPushNotificationTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RegisterPushNotificationTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class RegisterPushNotificationTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.accountController=e}async executeInternal(e){return await this.accountController.registerPushNotificationToken({handle:e.handle,installationId:e.installationId,platform:e.platform}),o.Result.ok(void 0)}};p=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,l])],p),t.RegisterPushNotificationTokenUseCase=p},4204:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDatawalletUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class SyncDatawalletUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(e){return await this.accountController.syncDatawallet(!0,e.callback),o.Result.ok(void 0)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],l),t.SyncDatawalletUseCase=l},4773:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEverythingUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(986),l=r(7049),p=r(6881),d=r(4316);let f=class SyncEverythingUseCase extends l.UseCase{constructor(e,t){super(),this.accountController=e,this.logger=t.getLogger(SyncEverythingUseCase)}async executeInternal(e){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal(e);try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(e){const t=await this.accountController.syncEverything(e.callback),r=t.messages.map((e=>p.MessageMapper.toMessageDTO(e))),i=t.relationships.map((e=>d.RelationshipMapper.toRelationshipDTO(e)));return o.Result.ok({messages:r,relationships:i})}};f=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,u.RuntimeLoggerFactory])],f),t.SyncEverythingUseCase=f},9276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2737),t),n(r(9710),t),n(r(569),t),n(r(3378),t),n(r(8562),t),n(r(4614),t),n(r(3826),t),n(r(4204),t),n(r(4773),t)},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeMapper=void 0;t.ChallengeMapper=class ChallengeMapper{static toChallengeDTO(e){const t=JSON.parse(e.challenge);return{id:t.id,expiresAt:t.expiresAt,createdBy:t.createdBy,createdByDevice:t.createdByDevice,type:t.type,signature:e.signature.toBase64(),challengeString:e.challenge}}}},9936:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateChallengeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7661);function isCreateRelationshipChallengeRequest(e){return"Relationship"===e.challengeType&&"string"==typeof e.relationship}let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateChallengeRequest")),this.relationshipSchema=e.getSchema("CreateRelationshipChallengeRequest"),this.identitySchema=e.getSchema("CreateIdentityChallengeRequest"),this.deviceSchema=e.getSchema("CreateDeviceChallengeRequest")}validate(e){if(this.schema.validate(e).isValid)return new u.ValidationResult;if(isCreateRelationshipChallengeRequest(e))return this.convertValidationResult(this.relationshipSchema.validate(e));if(function isCreateIdentityChallengeRequest(e){return"Identity"===e.challengeType}(e))return this.convertValidationResult(this.identitySchema.validate(e));if(function isCreateDeviceChallengeRequest(e){return"Device"===e.challengeType}(e))return this.convertValidationResult(this.deviceSchema.validate(e));const t=new u.ValidationResult;return t.addFailure(new u.ValidationFailure(u.RuntimeErrors.general.invalidPayload())),t}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateChallengeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.challengeController=e,this.relationshipsController=t}async executeInternal(e){const t=await this.getRelationship(e);if(t.isError)return o.Result.fail(t.error);let r;switch(e.challengeType){case"Relationship":r=a.ChallengeType.Relationship;break;case"Identity":r=a.ChallengeType.Identity;break;case"Device":r=a.ChallengeType.Device;break;default:throw new Error("Unknown challenge type.")}const i=await this.challengeController.createChallenge(r,t.value);return o.Result.ok(l.ChallengeMapper.toChallengeDTO(i))}async getRelationship(e){if(!isCreateRelationshipChallengeRequest(e))return o.Result.ok(void 0);const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationship));return t?o.Result.ok(t):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.ChallengeController,a.RelationshipsController,p])],d),t.CreateChallengeUseCase=d},5573:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateChallengeUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(4316);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ValidateChallengeRequest"))}validate(e){const t=super.validate(e);if(t.isInvalid())return t;const r=this.validateSignature(e.signature);r.isError&&t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPropertyValue(r.error.message),(0,u.nameof)((e=>e.signature))));const i=this.validateChallenge(e.challengeString);return i.isError&&t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPropertyValue(i.error.message),(0,u.nameof)((e=>e.challengeString)))),t}validateSignature(e){try{return a.CryptoSignature.fromBase64(e),o.Result.ok(void 0)}catch{return o.Result.fail(p.RuntimeErrors.challenges.invalidSignature())}}validateChallenge(e){try{return c.Challenge.deserialize(e),o.Result.ok(void 0)}catch{return o.Result.fail(p.RuntimeErrors.challenges.invalidChallengeString())}}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class ValidateChallengeUseCase extends p.UseCase{constructor(e,t){super(t),this.challengeController=e}async executeInternal(e){const t=a.CryptoSignature.fromBase64(e.signature),r=c.ChallengeSigned.from({challenge:e.challengeString,signature:t});try{const e=await this.challengeController.validateChallenge(r),t=e.correspondingRelationship?d.RelationshipMapper.toRelationshipDTO(e.correspondingRelationship):void 0;return o.Result.ok({isValid:e.isValid,correspondingRelationship:t})}catch(e){if(!(e instanceof c.CoreError)||"error.transport.notSupported"!==e.code)throw e;return o.Result.fail(p.RuntimeErrors.general.notSupported("Validating challenges of the type 'Device' is not yet supported."))}}};y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.ChallengeController,f])],y),t.ValidateChallengeUseCase=y},5629:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9936),t),n(r(5573),t)},5188:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.sendDevice(e);return await this.accountController.syncDatawallet(),o.Result.ok(l.DeviceMapper.toDeviceDTO(t))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,p])],d),t.CreateDeviceUseCase=d},795:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceOnboardingTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7121);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceOnboardingTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateDeviceOnboardingTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.tokenController=t}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id)),r=e.expiresAt?a.CoreDate.from(e.expiresAt):a.CoreDate.utc().add({minutes:5}),i=a.TokenContentDeviceSharedSecret.from({sharedSecret:t}),n=await this.tokenController.sendToken({content:i,expiresAt:r,ephemeral:!0});return o.Result.ok(l.TokenMapper.toTokenDTO(n,!0))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.TokenController,p])],d),t.CreateDeviceOnboardingTokenUseCase=d},2137:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DeleteDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class DeleteDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(await this.devicesController.delete(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};p=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,l])],p),t.DeleteDeviceUseCase=p},3067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceMapper=void 0;const i=r(2890),n=r(9663);t.DeviceMapper=class DeviceMapper{static toDeviceDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,type:e.type.toString(),username:e.username,certificate:e.certificate,description:e.description,lastLoginAt:e.lastLoginAt?.toString(),operatingSystem:e.operatingSystem,publicKey:e.publicKey?.toString()}}static toDeviceOnboardingInfoDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,description:e.description,secretBaseKey:e.secretBaseKey.toBase64(),deviceIndex:e.deviceIndex,synchronizationKey:e.synchronizationKey.toBase64(),identityPrivateKey:e.identityPrivateKey?e.identityPrivateKey.toString():void 0,identity:{address:e.identity.address.toString(),publicKey:e.identity.publicKey.toString(),realm:e.identity.realm.toString()},password:e.password,username:e.username}}static toDeviceSharedSecret(e){return n.DeviceSharedSecret.from({id:n.CoreId.from(e.id),createdAt:n.CoreDate.from(e.createdAt),createdByDevice:n.CoreId.from(e.createdByDevice),name:e.name,description:e.description,secretBaseKey:i.CryptoSecretKey.fromBase64(e.secretBaseKey),deviceIndex:e.deviceIndex,synchronizationKey:i.CryptoSecretKey.fromBase64(e.synchronizationKey),identityPrivateKey:e.identityPrivateKey?i.CryptoSignaturePrivateKey.deserialize(e.identityPrivateKey):void 0,identity:{address:n.CoreAddress.from(e.identity.address),publicKey:i.CryptoSignaturePublicKey.deserialize(e.identity.publicKey),realm:e.identity.realm},password:e.password,username:e.username})}}},770:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetDeviceUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?o.Result.ok(l.DeviceMapper.toDeviceDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,p])],d),t.GetDeviceUseCase=d},8283:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceOnboardingInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceOnboardingInfoRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetDeviceOnboardingInfoUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id));return o.Result.ok(l.DeviceMapper.toDeviceOnboardingInfoDTO(t))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,p])],d),t.GetDeviceOnboardingInfoUseCase=d},3341:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDevicesUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(3067);let p=class GetDevicesUseCase extends u.UseCase{constructor(e){super(),this.devicesController=e}async executeInternal(){const e=(await this.devicesController.list()).map((e=>l.DeviceMapper.toDeviceDTO(e)));return o.Result.ok(e)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.DevicesController])],p),t.GetDevicesUseCase=p},189:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7802),l=r(7049);let p=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[l.SchemaRepository])],p);let d=class UpdateDeviceUseCase extends l.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(e.name&&(t.name=e.name),t.description=e.description,await this.devicesController.update(t),await this.accountController.syncDatawallet(),o.Result.ok(u.DeviceMapper.toDeviceDTO(t))):o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.Device))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,p])],d),t.UpdateDeviceUseCase=d},7802:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5188),t),n(r(795),t),n(r(2137),t),n(r(3067),t),n(r(770),t),n(r(8283),t),n(r(3341),t),n(r(189),t)},1828:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class CreateQrCodeForFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};p=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],p),t.CreateQrCodeForFileUseCase=p},542:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7121);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateTokenForFileUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(l.TokenMapper.toTokenDTO(c,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,a.AccountController,p])],d),t.CreateTokenForFileUseCase=d},6913:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class CreateTokenQrCodeForFileUseCase extends u.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.tokenController=t}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};p=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,l])],p),t.CreateTokenQrCodeForFileUseCase=p},8516:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(5076);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class DownloadFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=a.CoreId.from(e.id),r=await this.fileController.getFile(t);if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const i=await this.fileController.downloadFileContent(r.id);return o.Result.ok(l.FileMapper.toDownloadFileResponse(i,r))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,p])],d),t.DownloadFileUseCase=d},5076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMapper=void 0;const i=r(9663),n=r(7049);t.FileMapper=class FileMapper{static toDownloadFileResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toFileDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,e.id.toString());return{id:e.id.toString(),filename:e.cache.filename,filesize:e.cache.filesize,createdAt:e.cache.createdAt.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),expiresAt:e.cache.expiresAt.toString(),mimetype:e.cache.mimetype,isOwn:e.isOwn,title:e.cache.title??"",secretKey:e.secretKey.toBase64(),description:e.cache.description,truncatedReference:e.truncate()}}static toFileDTOList(e){return e.map((e=>this.toFileDTO(e)))}}},3520:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(5076);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.id));return t?o.Result.ok(l.FileMapper.toFileDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,p])],d),t.GetFileUseCase=d},5911:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(5076);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetFilesRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetFilesUseCase extends p.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=GetFilesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===p.OwnerRestriction.Own);const r=await this.fileController.getFiles(t);return a.Result.ok(d.FileMapper.toFileDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.description))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0,[(0,u.nameof)((e=>e.filename))]:!0,[(0,u.nameof)((e=>e.filesize))]:!0,[(0,u.nameof)((e=>e.mimetype))]:!0,[(0,u.nameof)((e=>e.title))]:!0,[(0,u.nameof)((e=>e.isOwn))]:!0},alias:{[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.description))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.description))}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.expiresAt))}`,[(0,u.nameof)((e=>e.filename))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.filename))}`,[(0,u.nameof)((e=>e.filesize))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.filesize))}`,[(0,u.nameof)((e=>e.mimetype))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.mimetype))}`,[(0,u.nameof)((e=>e.title))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.title))}`,[(0,u.nameof)((e=>e.isOwn))]:(0,u.nameof)((e=>e.isOwn))}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.FileController,f])],y),t.GetFilesUseCase=y},9918:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOrLoadFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),l=r(7049),p=r(5076);function isViaSecret(e){return"id"in e&&"secretKey"in e}function isViaReference(e){return"reference"in e}let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetOrLoadFileRequest")),this.loadViaSecretSchema=e.getSchema("GetOrLoadFileViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("GetOrLoadFileViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new l.ValidationResult;if(isViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new l.ValidationResult;return t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class GetOrLoadFileUseCase extends l.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadFile(c.CoreId.from(e.id),r)}else{if(!isViaReference(e))throw new Error("Invalid request format.");t=await this.loadFileFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadFileFromReference(e){if(e.startsWith(l.Base64ForIdPrefix.File))return await this.loadFileFromFileReference(e);if(e.startsWith(l.Base64ForIdPrefix.Token))return await this.loadFileFromTokenReference(e);throw l.RuntimeErrors.files.invalidReference(e)}async loadFileFromFileReference(e){const t=await this.fileController.getOrLoadFileByTruncated(e);return o.Result.ok(p.FileMapper.toFileDTO(t))}async loadFileFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw l.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentFile))return o.Result.fail(l.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadFile(r.fileId,r.secretKey)}async loadFile(e,t){const r=await this.fileController.getOrLoadFile(e,t);return o.Result.ok(p.FileMapper.toFileDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.FileController,c.TokenController,c.AccountController,d])],f),t.GetOrLoadFileUseCase=f},2109:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadOwnFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(8565),l=r(4714),p=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("UploadOwnFileValidatableRequest"))}set maxFileSize(e){this._maxFileSize=e}validate(e){const t=super.validate(e);return t.isValid()?(e.content.byteLength>this._maxFileSize&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,l.nameof)((e=>e.content))}' is too large`),(0,l.nameof)((e=>e.content)))),0===e.content.length&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,l.nameof)((e=>e.content))}' is empty`),(0,l.nameof)((e=>e.content)))),u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,l.nameof)((e=>e.expiresAt))}' must be in the future`),(0,l.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,p.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UploadOwnFileUseCase extends d.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.accountController=t,r.maxFileSize=e.config.platformMaxUnencryptedFileSize}async executeInternal(e){const t=await this.fileController.sendFile({buffer:a.CoreBuffer.from(e.content),title:e.title,description:e.description??"",filename:e.filename,mimetype:e.mimetype,expiresAt:c.CoreDate.from(e.expiresAt)});return await this.accountController.syncDatawallet(),o.Result.ok(f.FileMapper.toFileDTO(t))}};h=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.FileController,c.AccountController,y])],h),t.UploadOwnFileUseCase=h},4237:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1828),t),n(r(542),t),n(r(6913),t),n(r(8516),t),n(r(5076),t),n(r(3520),t),n(r(5911),t),n(r(9918),t),n(r(2109),t)},4824:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckIdentityUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CheckIdentityRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CheckIdentityUseCase extends u.UseCase{constructor(e,t,r){super(r),this.identityController=e,this.relationshipsController=t}async executeInternal(e){const t=a.CoreAddress.from(e.address);if(this.identityController.isMe(t))return o.Result.ok({self:!0});const r=await this.relationshipsController.getRelationshipToIdentity(t);if(r){const e=l.RelationshipMapper.toRelationshipDTO(r);return r.status===a.RelationshipStatus.Pending?o.Result.ok({peer:!0,relationshipPending:!0,relationship:e}):r.status===a.RelationshipStatus.Active||r.status===a.RelationshipStatus.Terminating?o.Result.ok({peer:!0,relationshipActive:!0,relationship:e}):o.Result.ok({peer:!0,relationshipTerminated:!0,relationship:e})}return o.Result.ok({unknown:!0})}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.IdentityController,a.RelationshipsController,p])],d),t.CheckIdentityUseCase=d},4847:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4824),t)},9667:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9276),t),n(r(5629),t),n(r(7802),t),n(r(4237),t),n(r(4847),t),n(r(2290),t),n(r(7831),t),n(r(3084),t),n(r(5631),t)},4860:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(6881);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadAttachmentRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class DownloadAttachmentUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);if(!i)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const n=await this.fileController.downloadFileContent(r);return o.Result.ok(l.MessageMapper.toDownloadAttachmentResponse(n,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,p])],d),t.DownloadAttachmentUseCase=d},9558:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttachmentMetadataUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(5076);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetAttachmentMetadataRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetAttachmentMetadataUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);return i?o.Result.ok(l.FileMapper.toFileDTO(i)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(File))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,p])],d),t.GetAttachmentMetadataUseCase=d},978:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(6881);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetMessageRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetMessageUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString()));const r=await Promise.all(t.cache.attachments.map((e=>this.fileController.getFile(e))));if(r.some((e=>!e)))throw new Error("A file could not be fetched.");return o.Result.ok(l.MessageMapper.toMessageWithAttachmentsDTO(t,r))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,p])],d),t.GetMessageUseCase=d},9231:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessagesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(6881);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetMessagesRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetMessagesUseCase extends p.UseCase{constructor(e,t){super(t),this.messageController=e}async executeInternal(e){const t=GetMessagesUseCase.queryTranslator.parse(e.query),r=await this.messageController.getMessages(t);return a.Result.ok(d.MessageMapper.toMessageDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[`${(0,u.nameof)((e=>e.content))}.@type`]:!0,[`${(0,u.nameof)((e=>e.content))}.body`]:!0,[`${(0,u.nameof)((e=>e.content))}.subject`]:!0,[(0,u.nameof)((e=>e.attachments))]:!0,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:!0,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.relationshipId))}`]:!0,participant:!0},alias:{[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`,[`${(0,u.nameof)((e=>e.content))}.@type`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.@type`,[`${(0,u.nameof)((e=>e.content))}.body`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.body`,[`${(0,u.nameof)((e=>e.content))}.subject`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.subject`},custom:{[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.relationshipId))}`]:(e,t)=>{e[(0,u.nameof)((e=>e.relationshipIds))]={$containsAny:Array.isArray(t)?t:[t]}},[(0,u.nameof)((e=>e.attachments))]:(e,t)=>{e[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.attachments))}`]={$containsAny:Array.isArray(t)?t:[t]}},participant:(e,t)=>{let r;if(Array.isArray(t)){if(0===t.length)return;r={};for(const e of t){const t=y.queryTranslator.parseString(e,!0);switch(t.field){case"$containsAny":case"$containsNone":r[t.field]=r[t.field]||[],r[t.field].push(t.value);break;default:r[t.field]=t.value}}}else r=y.queryTranslator.parseStringVal(t);e.$or=[{[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`]:r},{[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:r}]}}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.MessageController,f])],y),t.GetMessagesUseCase=y},6881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMapper=void 0;const i=r(9663),n=r(7049),s=r(5076);t.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toMessageWithAttachmentsDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:t.map((e=>s.FileMapper.toFileDTO(e)))}}static toMessageDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:e.cache.attachments.map((e=>e.toString()))}}static toMessageDTOList(e){return e.map((e=>this.toMessageDTO(e)))}static toRecipient(e,t){return{address:e.address.toString(),receivedAt:e.receivedAt?.toString(),receivedByDevice:e.receivedByDevice?.toString(),relationshipId:t.toString()}}}},8400:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(6881);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("SendMessageRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class SendMessageUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.messageController=e,this.fileController=t,this.accountController=r}async executeInternal(e){const t=await this.transformAttachments(e.attachments);if(t.isError)return o.Result.fail(t.error);const r=await this.messageController.sendMessage({recipients:e.recipients.map((e=>a.CoreAddress.from(e))),content:e.content,attachments:t.value});return await this.accountController.syncDatawallet(),o.Result.ok(l.MessageMapper.toMessageDTO(r))}async transformAttachments(e){if(!e||0===e.length)return o.Result.ok([]);const t=[];for(const r of e){const e=await this.fileController.getFile(a.CoreId.from(r));if(!e)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));t.push(e)}return o.Result.ok(t)}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,a.AccountController,p])],d),t.SendMessageUseCase=d},2290:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4860),t),n(r(9558),t),n(r(978),t),n(r(9231),t),n(r(6881),t),n(r(8400),t)},8580:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(8565),u=r(4714),l=r(7071),p=r(7049),d=r(8434);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnRelationshipTemplateRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(c.DateTime.fromISO(e.expiresAt)<=c.DateTime.utc()&&t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPropertyValue(`'${(0,u.nameof)((e=>e.expiresAt))}' must be in the future`),(0,u.nameof)((e=>e.expiresAt)))),t):t}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class CreateOwnRelationshipTemplateUseCase extends p.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.accountController=t}async executeInternal(e){const t=await this.templateController.sendRelationshipTemplate({content:e.content,expiresAt:a.CoreDate.from(e.expiresAt),maxNumberOfAllocations:e.maxNumberOfAllocations});return await this.accountController.syncDatawallet(),o.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}};y=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.AccountController,f])],y),t.CreateOwnRelationshipTemplateUseCase=y},7921:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForOwnTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class CreateQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.templateController=e}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateQRCodeForPeerTemplate());const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};p=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,l])],p),t.CreateQrCodeForOwnTemplateUseCase=p},7255:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7121);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateTokenForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(l.TokenMapper.toTokenDTO(c,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,a.AccountController,p])],d),t.CreateTokenForOwnTemplateUseCase=d},3683:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForOwnTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class CreateTokenQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.tokenController=t}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};p=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,l])],p),t.CreateTokenQrCodeForOwnTemplateUseCase=p},2603:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(8434);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetRelationshipTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.id));return t?o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,p])],d),t.GetRelationshipTemplateUseCase=d},1371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplatesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(8434);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplatesRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetRelationshipTemplatesUseCase extends p.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=GetRelationshipTemplatesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===p.OwnerRestriction.Own);const r=await this.relationshipTemplateController.getRelationshipTemplates(t);return a.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.isOwn))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.maxNumberOfAllocations))]:!0},alias:{[(0,u.nameof)((e=>e.isOwn))]:(0,u.nameof)((e=>e.isOwn)),[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.expiresAt))}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.maxNumberOfAllocations))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.maxNumberOfAllocations))}`}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.RelationshipTemplateController,f])],y),t.GetRelationshipTemplatesUseCase=y},3186:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),l=r(7049),p=r(8434);function isLoadPeerRelationshipTemplateViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerRelationshipTemplateViaReference(e){return"reference"in e}let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerRelationshipTemplateRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerRelationshipTemplateViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerRelationshipTemplateViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new l.ValidationResult;if(isLoadPeerRelationshipTemplateViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerRelationshipTemplateViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new l.ValidationResult;return t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class LoadPeerRelationshipTemplateUseCase extends l.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isLoadPeerRelationshipTemplateViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadTemplate(c.CoreId.from(e.id),r)}else{if(!isLoadPeerRelationshipTemplateViaReference(e))throw new Error("Invalid request format.");t=await this.loadRelationshipTemplateFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadRelationshipTemplateFromReference(e){if(e.startsWith(l.Base64ForIdPrefix.RelationshipTemplate))return await this.loadRelationshipTemplateFromRelationshipTemplateReference(e);if(e.startsWith(l.Base64ForIdPrefix.Token))return await this.loadRelationshipTemplateFromTokenReference(e);throw l.RuntimeErrors.relationshipTemplates.invalidReference(e)}async loadRelationshipTemplateFromRelationshipTemplateReference(e){const t=await this.templateController.loadPeerRelationshipTemplateByTruncated(e);return o.Result.ok(p.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}async loadRelationshipTemplateFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw l.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentRelationshipTemplate))return o.Result.fail(l.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadTemplate(r.templateId,r.secretKey)}async loadTemplate(e,t){const r=await this.templateController.loadPeerRelationshipTemplate(e,t);return o.Result.ok(p.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.RelationshipTemplateController,c.TokenController,c.AccountController,d])],f),t.LoadPeerRelationshipTemplateUseCase=f},8434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateMapper=void 0;const i=r(9663),n=r(7049);t.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.RelationshipTemplate,e.id.toString());return{id:e.id.toString(),isOwn:e.isOwn,createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),createdAt:e.cache.createdAt.toString(),content:e.cache.content.toJSON(),expiresAt:e.cache.expiresAt?.toString(),maxNumberOfAllocations:e.cache.maxNumberOfAllocations,truncatedReference:e.truncate()}}static toRelationshipTemplateDTOList(e){return e.map((e=>this.toRelationshipTemplateDTO(e)))}}},3084:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8580),t),n(r(7921),t),n(r(7255),t),n(r(3683),t),n(r(2603),t),n(r(1371),t),n(r(3186),t),n(r(8434),t)},3018:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("AcceptRelationshipChangeRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class AcceptRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.acceptChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(l.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,p])],d),t.AcceptRelationshipChangeUseCase=d},3986:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateRelationshipRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class CreateRelationshipUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.relationshipsController=e,this.relationshipTemplateController=t,this.accountController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));const r=await this.relationshipsController.sendRelationship({template:t,content:e.content});return await this.accountController.syncDatawallet(),o.Result.ok(l.RelationshipMapper.toRelationshipDTO(r))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.RelationshipTemplateController,a.AccountController,p])],d),t.CreateRelationshipUseCase=d},1041:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesForRelationshipUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(3742);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetAttributesForRelationshipUseCase extends p.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.attributesController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Relationship));const r=t.peer.address.toString(),i={$or:[{[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.owner))}`]:r},{[`${(0,u.nameof)((e=>e.shareInfo))}.${(0,u.nameof)((e=>e.peer))}`]:r}]},n=await this.attributesController.getLocalAttributes(i);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};y=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.RelationshipsController,a.AttributesController,f])],y),t.GetAttributesForRelationshipUseCase=y},9456:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetRelationshipUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.id));return t?o.Result.ok(l.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,p])],d),t.GetRelationshipUseCase=d},215:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipByAddressUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipByAddressRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetRelationshipByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationshipToIdentity(a.CoreAddress.from(e.address));return t?o.Result.ok(l.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,p])],d),t.GetRelationshipByAddressUseCase=d},3457:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipsUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(4316);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipsRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetRelationshipsUseCase extends p.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=GetRelationshipsUseCase.queryTranslator.parse(e.query),r=await this.relationshipsController.getRelationships(t);return a.Result.ok(d.RelationshipMapper.toRelationshipDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`]:!0},alias:{[`${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`,[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[(0,u.nameof)((e=>e.peer))]:`${(0,u.nameof)((e=>e.peer))}.${(0,u.nameof)((e=>e.address))}`}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.RelationshipsController,f])],y),t.GetRelationshipsUseCase=y},2214:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RejectRelationshipChangeRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class RejectRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.rejectChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(l.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,p])],d),t.RejectRelationshipChangeUseCase=d},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipMapper=void 0;const i=r(9663),n=r(7049),s=r(8434);t.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Relationship,e.id.toString());return{id:e.id.toString(),template:s.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.cache.template),status:e.status,peer:e.peer.address.toString(),peerIdentity:{address:e.peer.address.toString(),publicKey:e.peer.publicKey.toString(),realm:e.peer.realm},changes:e.cache.changes.map((e=>this.toRelationshipChangeDTO(e)))}}static toRelationshipDTOList(e){return e.map((e=>this.toRelationshipDTO(e)))}static toRelationshipChangeRequestDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeResponseDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeDTO(e){return{id:e.id.toString(),request:this.toRelationshipChangeRequestDTO(e.request),status:e.status,type:e.type,response:e.response?this.toRelationshipChangeResponseDTO(e.response):void 0}}}},5261:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RevokeRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(4316);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RevokeRelationshipChangeRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class RevokeRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.revokeChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(l.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,p])],d),t.RevokeRelationshipChangeUseCase=d},7831:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3018),t),n(r(3986),t),n(r(1041),t),n(r(9456),t),n(r(215),t),n(r(3457),t),n(r(2214),t),n(r(4316),t),n(r(5261),t)},429:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnTokenUseCase=void 0;const o=r(194),a=r(5172),c=r(9663),u=r(8565),l=r(4714),p=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnTokenRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,l.nameof)((e=>e.expiresAt))}' must be in the future`),(0,l.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,p.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class CreateOwnTokenUseCase extends d.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;try{t=o.Serializable.fromUnknown(e.content)}catch{throw d.RuntimeErrors.general.invalidTokenContent()}const r=await this.tokenController.sendToken({content:t,expiresAt:c.CoreDate.from(e.expiresAt),ephemeral:e.ephemeral});return e.ephemeral||await this.accountController.syncDatawallet(),a.Result.ok(f.TokenMapper.toTokenDTO(r,e.ephemeral))}};h=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,y])],h),t.CreateOwnTokenUseCase=h},7896:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetQRCodeForTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetQRCodeForTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let p=class GetQRCodeForTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Token));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};p=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,l])],p),t.GetQRCodeForTokenUseCase=p},858:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),l=r(7121);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let d=class GetTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));return t?o.Result.ok(l.TokenMapper.toTokenDTO(t,!1)):o.Result.fail(u.RuntimeErrors.general.recordNotFound("Token"))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,p])],d),t.GetTokenUseCase=d},2093:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokensUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),l=r(7071),p=r(7049),d=r(7121);let f=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetTokensRequest"))}};f=i([s(0,l.Inject),n("design:paramtypes",[p.SchemaRepository])],f);let y=class GetTokensUseCase extends p.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=GetTokensUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===p.OwnerRestriction.Own);const r=await this.tokenController.getTokens(t);return a.Result.ok(d.TokenMapper.toTokenDTOList(r,!1))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0},alias:{[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdAt))]}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdBy))]}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdByDevice))]}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.expiresAt))]}`}}),y=i([s(0,l.Inject),s(1,l.Inject),n("design:paramtypes",[c.TokenController,f])],y),t.GetTokensUseCase=y},8442:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),l=r(7049),p=r(7121);function isLoadPeerTokenViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerTokenViaReference(e){return"reference"in e}let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerTokenViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerTokenViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new l.ValidationResult;if(isLoadPeerTokenViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerTokenViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new l.ValidationResult;return t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class LoadPeerTokenUseCase extends l.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;if(isLoadPeerTokenViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.tokenController.loadPeerToken(c.CoreId.from(e.id),r,e.ephemeral)}else{if(!isLoadPeerTokenViaReference(e))throw new Error("Invalid request format.");t=await this.tokenController.loadPeerTokenByTruncated(e.reference,e.ephemeral)}return e.ephemeral||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(t,e.ephemeral))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,d])],f),t.LoadPeerTokenUseCase=f},7121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMapper=void 0;const i=r(9663),n=r(7049);class TokenMapper{static toTokenDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Token,e.id.toString());const r=e.toTokenReference();return{id:e.id.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),content:e.cache.content.toJSON(),createdAt:e.cache.createdAt.toString(),expiresAt:e.cache.expiresAt.toString(),secretKey:e.secretKey.toBase64(),truncatedReference:r.truncate(),isEphemeral:t}}static toTokenDTOList(e,t){return e.map((e=>TokenMapper.toTokenDTO(e,t)))}}t.TokenMapper=TokenMapper},5631:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(429),t),n(r(7896),t),n(r(858),t),n(r(2093),t),n(r(8442),t),n(r(7121),t)},9126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[A-z_@][A-z@0-9-_]*(\.[A-z_@][A-z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(e={}){this.ops=e.ops??["!","^","$","~",">","<","$containsAny","$containsNone"],this.alias=e.alias??{},this.blacklist=e.blacklist??{},this.whitelist=e.whitelist??{},this.custom=e.custom??{},e.string=e.string??{},this.string=e.string,this.string.toBoolean="boolean"!=typeof e.string.toBoolean||e.string.toBoolean,this.string.toNumber="boolean"!=typeof e.string.toNumber||e.string.toNumber,this.keyRegex=e.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=e.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=e.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(e){QueryTranslator.defaultKeyRegex=e}static setDefaultValRegex(e){QueryTranslator.defaultValRegex=e}static setDefaultArrRegex(e){QueryTranslator.defaultArrRegex=e}parseString(e,t){let r=e[0]||"";const i="="===e[1];let n=e.substr(i?2:1)||"";const s=this.parseStringVal(n),o={op:r,org:n,value:s};switch(r){case"!":t?o.field="$containsNone":""===n?(o.field="$exists",o.value=!1):o.field="$ne";break;case">":o.field=i?"$gte":"$gt";break;case"<":o.field=i?"$lte":"$lt";break;case"^":case"$":case"~":switch(o.field="$regex",o.options="i",o.value=this.valRegex?n.replace(this.valRegex,""):o.value.toString(),r){case"^":o.value=`^${s}`;break;case"$":o.value=`${s}$`}break;default:o.org=n=r+n,o.op=r="",o.value=this.parseStringVal(n),t?o.field="$containsAny":""===n?(o.field="$exists",o.value=!0):o.field="$eq"}return o.parsed={},o.parsed[o.field]=o.value,o.options&&(o.parsed.$options=o.options),o}parseStringVal(e){return!(!this.string.toBoolean||"true"!==e.toLowerCase())||(!this.string.toBoolean||"false"!==e.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(e,10))&&+e-+e+1>=0?parseFloat(e):e)}parse(e){if(!e)return{};const t={};for(let r of Object.keys(e)){const i=e[r];if(Array.isArray(i)&&(r=r.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[r])&&!this.blacklist[r]&&(this.alias[r]&&(r=this.alias[r]),("string"!=typeof i||this.keyRegex.test(r))&&(!Array.isArray(i)||this.arrRegex.test(r))))if("function"!=typeof this.custom[r])if(Array.isArray(i)){if(this.ops.includes("$containsAny")&&i.length>0){t[r]={};for(const e of i)if(this.ops.includes(e[0])){const i=this.parseString(e,!0);switch(i.field){case"$containsAny":case"$containsNone":t[r][i.field]=t[r][i.field]||[],t[r][i.field].push(i.value);break;case"$regex":t[r].$regex=i.value,t[r].$options=i.options;break;default:t[r][i.field]=i.value}}else t[r].$containsAny=t[r].$containsAny||[],t[r].$containsAny.push(this.parseStringVal(e))}}else"string"==typeof i&&(i?this.ops.includes(i[0])?t[r]=this.parseString(i).parsed:t[r]=this.parseStringVal(i):t[r]={$exists:!0});else this.custom[r].apply(null,[t,i])}return t}}t.QueryTranslator=QueryTranslator},2937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;var i=r(9126);Object.defineProperty(t,"QueryTranslator",{enumerable:!0,get:function(){return i.QueryTranslator}})},1174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventNamespaceFromObject=t.EventBus=void 0;t.EventBus=class EventBus{},t.getEventNamespaceFromObject=function getEventNamespaceFromObject(e){return e.namespace}},5970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(e){this.namespace=e}static from(e){return e instanceof Function?new ConstructorSubscriptionTargetInfo(e):new NamespaceSubscriptionTargetInfo(e)}}t.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(e){super(function getEventNamespaceFromClass(e){return e.namespace}(e)),this.constructorFunction=e}isCompatibleWith(e){return e instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(e){super(e)}isCompatibleWith(e){return!0}}},9729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter2EventBus=void 0;const i=r(6387);r(8660);const n=r(9159),s=r(5970);t.EventEmitter2EventBus=class EventEmitter2EventBus{errorCallback;emitter;listeners=new Map;nextId=0;invocationPromises=[];constructor(e,t){this.errorCallback=e,this.emitter=new i.EventEmitter2({maxListeners:50,verboseMemoryLeak:!0,...t,wildcard:!0})}subscribe(e,t){return this.registerHandler(e,t)}subscribeOnce(e,t){return this.registerHandler(e,t,!0)}unsubscribe(e){return this.unregisterHandler(e)}registerHandler(e,t,r=!1){const i=s.SubscriptionTargetInfo.from(e),n=this.nextId++,handlerWrapper=async e=>{if(!i.isCompatibleWith(e))return;const s=(async()=>await t(e))();this.invocationPromises.push(s),await s.catch((e=>this.errorCallback(e,i.namespace))),this.invocationPromises=this.invocationPromises.filter((e=>e!==s)),r&&this.listeners.delete(n)};if(r){const e=this.emitter.once(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,e),n}const o=this.emitter.on(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,o),n}unregisterHandler(e){const t=this.listeners.get(e);return!!t&&(t.off(),this.listeners.delete(e),!0)}publish(e){const t=(0,n.getEventNamespaceFromObject)(e);if(!t)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(t,e)}async close(e){this.emitter.removeAllListeners();const t=Promise.all(this.invocationPromises).catch((()=>{}));if(!e)return void await t;let r;const i=new Promise(((t,i)=>{r=setTimeout((()=>{i(new Error("timeout exceeded while waiting for events to process"))}),e)}));await Promise.race([t,i]),clearTimeout(r)}}},9256:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9159),t),n(r(9729),t)},5917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(8267);class DataEvent extends i.Event{data;constructor(e,t){super(e),this.data=t}}t.DataEvent=DataEvent},8267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{namespace;constructor(e){this.namespace=e}}},2636:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5917),t),n(r(8267),t)},5172:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9256),t),n(r(2636),t),n(r(9855),t),n(r(1809),t),n(r(4569),t),n(r(1174),t),n(r(7226),t),n(r(7374),t)},9855:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0;const n=i(r(4530));t.log=function log(e){return function(t,r,i){const s=i.value;return i.value=function(...t){const i=this;try{e?.logParams?i.log.trace(`Calling ${r}(${t.map((e=>(0,n.default)(e))).join(", ")})`):i.log.trace(`Calling ${r}`);const o=s.apply(this,t);return e?.logReturnValue?i.log.trace(`Returning from ${r} with: ${(0,n.default)(o)}`):i.log.trace(`Returning from ${r}`),o}catch(e){throw e instanceof Error&&e.stack&&(e.stack=e.stack.split("\n").filter((e=>!e.includes(".propertyDescriptorDoNotChangeMyNamePlease.value"))).join("\n")),i.log.error(`Error in ${r}:`,e),e}},i}}},1809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureExcecutionTime=void 0,t.measureExcecutionTime=function measureExcecutionTime(e,t,r){const i=r.value;return r.value=async function(...e){const t=Date.now(),r=await i.apply(this,e),n=Date.now();return console.info(`Execution time: ${n-t}ms`),r},r}},4569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=void 0,t.randomString=function randomString(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";const i=t.length;for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*i));return r}},7807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(e,t,r){super(t),this.code=e,this.data=r}equals(e){return this.code===e.code}toString(){return JSON.stringify({code:this.code,message:this.message,data:this.data},void 0,2)}}t.ApplicationError=ApplicationError},9278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;class Result{_isSuccess;_error;_value;constructor(e,t,r){if(e&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!e&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==t&&!e)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=t,this._isSuccess=e,this._error=r}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error(`Can't get the value of an error result. Use 'error' instead. Root error: \r\n${this.error}`);return this._value}static ok(e){return new Result(!0,e)}static fail(e){return new Result(!1,void 0,e)}}t.Result=Result},7226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7807),t),n(r(9278),t)},7374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function sleep(e){return new Promise((t=>{setTimeout(t,e)}))}},3351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(1581),n=r(3487),s=r(7023),o=r(4815),a=r(4181),c=r(2141),u="errorMessage",l=new i.Name("emUsed"),p={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,f=/\$\{([^}]+)\}/g,y=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(e){return{keyword:u,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:h,schema:m,schemaValue:g,it:v}=t;if(!1===v.createErrors)return;const b=m,R=n.strConcat(c.default.instancePath,v.errorPath);function matchKeywordError(e,t){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${l}`,i._`${e}.instancePath === ${R}`,i._`${e}.keyword in ${t}`,i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function getTemplatesCode(e,t){const i=[];for(const r in e){const e=t[r];d.test(e)&&i.push([r,templateFunc(e)])}return r.object(...i)}function templateExpr(e){return d.test(e)?new s._Code(s.safeStringify(e).replace(f,((e,t)=>`" + JSON.stringify(${o.getData(t,v)}) + "`)).replace(y,"")):i.stringify(e)}function templateFunc(e){return i._`function(){return ${templateExpr(e)}}`}r.if(i._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[s,o]=function keywordErrorsConfig(e){let t,r;for(const i in e){if("properties"===i||"items"===i)continue;const n=e[i];if("object"==typeof n){t||(t={});const e=t[i]={};for(const t in n)e[t]=[]}else r||(r={}),r[i]=[]}return[t,r]}(b);o&&function processKeywordErrors(n){const s=r.const("emErrors",i.stringify(n)),o=r.const("templates",getTemplatesCode(n,m));r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,s),(()=>r.code(i._`${s}[${e}.keyword].push(${e})`).assign(i._`${e}.${l}`,!0)))));const{singleError:u}=e;if(u){const e=r.let("message",i._`""`),n=r.let("paramsErrors",i._`[]`);loopErrors((t=>{r.if(e,(()=>r.code(i._`${e} += ${"string"==typeof u?u:";"}`))),r.code(i._`${e} += ${errMessage(t)}`),r.assign(n,i._`${n}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:i._`{errors: ${n}}`})}else loopErrors((e=>a.reportError(t,{message:errMessage(e),params:i._`{errors: ${s}[${e}]}`})));function loopErrors(e){r.forIn("key",s,(t=>r.if(i._`${s}[${t}].length`,(()=>e(t)))))}function errMessage(e){return i._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),s&&function processKeywordPropErrors(e){const n=r.const("emErrors",i.stringify(e)),s=[];for(const t in e)s.push([t,getTemplatesCode(e[t],m[t])]);const o=r.const("templates",r.object(...s)),u=r.scopeValue("obj",{ref:p,code:i.stringify(p)}),d=r.let("emPropParams"),f=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,n),(()=>{r.assign(d,i._`${u}[${e}.keyword]`),r.assign(f,i._`${n}[${e}.keyword][${e}.params[${d}]]`),r.if(f,(()=>r.code(i._`${f}.push(${e})`).assign(i._`${e}.${l}`,!0)))})))),r.forIn("key",n,(e=>r.forIn("keyProp",i._`${n}[${e}]`,(s=>{r.assign(f,i._`${n}[${e}][${s}]`),r.if(i._`${f}.length`,(()=>{const n=r.const("tmpl",i._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:i._`${n} ? ${n}() : ${g}[${e}][${s}]`,params:i._`{errors: ${f}}`})}))}))))}(s),function processChildErrors(e){const{props:s,items:o}=e;if(!s&&!o)return;const p=i._`typeof ${h} == "object"`,d=i._`Array.isArray(${h})`,f=r.let("emErrors");let y,v;const b=r.let("templates");s&&o?(y=r.let("emChildKwd"),r.if(p),r.if(d,(()=>{init(o,m.items),r.assign(y,i.str`items`)}),(()=>{init(s,m.properties),r.assign(y,i.str`properties`)})),v=i._`[${y}]`):o?(r.if(d),init(o,m.items),v=i._`.items`):s&&(r.if(n.and(p,n.not(d))),init(s,m.properties),v=i._`.properties`);function init(e,t){r.assign(f,i.stringify(e)),r.assign(b,getTemplatesCode(e,t))}r.forOf("err",c.default.vErrors,(e=>function ifMatchesChildError(e,t,s){r.if(n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${l}`,i._`${e}.instancePath.indexOf(${R}) === 0`),(()=>{const n=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=r.const("emMatches",i._`${n}.exec(${e}.instancePath.slice(${R}.length))`),a=r.const("emChild",i._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(i._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,f,(t=>r.code(i._`${f}[${t}].push(${e})`).assign(i._`${e}.${l}`,!0))))),r.forIn("key",f,(e=>r.if(i._`${f}[${e}].length`,(()=>{a.reportError(t,{message:i._`${e} in ${b} ? ${b}[${e}]() : ${g}${v}[${e}]`,params:i._`{errors: ${f}[${e}]}`}),r.assign(i._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,i._`${R} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function childErrorsConfig({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[]}return r}(b))}const s="string"==typeof b?b:b._;s&&function processAllErrors(e){const s=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(e=>r.if(function matchAnyError(e){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${l}`,n.or(i._`${e}.instancePath === ${R}`,n.and(i._`${e}.instancePath.indexOf(${R}) === 0`,i._`${e}.instancePath[${R}.length] === "/"`)),i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(i._`${s}.push(${e})`).assign(i._`${e}.${l}`,!0))))),r.if(i._`${s}.length`,(()=>a.reportError(t,{message:templateExpr(e),params:i._`{errors: ${s}}`})))}(s),e.keepErrors||function removeUsedErrors(){const e=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(i._`!${t}.${l}`,(()=>r.code(i._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,i._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(errorMessage(t))};t.default=ajvErrors,e.exports=ajvErrors,e.exports.default=ajvErrors},6870:(e,t)=>{"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(e){const t=e.split(s);return 2===t.length&&date(t[0])&&time(t[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return o.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(u.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return c.lastIndex=0,c.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:i[s])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=n.exec(e);if(!r)return!1;const i=+r[1],s=+r[2],o=+r[3],a=r[5];return(i<=23&&s<=59&&o<=59||23===i&&59===s&&60===o)&&(!t||""!==a)}function compareTime(e,t){if(!e||!t)return;const r=n.exec(e),i=n.exec(t);return r&&i?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=i[1]+i[2]+i[3]+(i[4]||""))?1:e<t?-1:0:void 0}const s=/t|\s/i;function compareDateTime(e,t){if(!e||!t)return;const[r,i]=e.split(s),[n,o]=t.split(s),a=compareDate(r,n);return void 0!==a?a||compareTime(i,o):void 0}const o=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}const u=/[^\\]\\Z/},5477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6870),n=r(7963),s=r(3487),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,i.fullFormats,o),e;const[r,s]="fast"===t.mode?[i.fastFormats,a]:[i.fullFormats,o];return addFormats(e,t.formats||i.formatNames,r,s),t.keywords&&n.default(e),e};function addFormats(e,t,r,i){var n,o;null!==(n=(o=e.opts.code).formats)&&void 0!==n||(o.formats=s._`require("ajv-formats/dist/formats").${i}`);for(const i of t)e.addFormat(i,r[i])}formatsPlugin.get=(e,t="full")=>{const r=("fast"===t?i.fastFormats:i.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},7963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const i=r(1581),n=r(3487),s=n.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:u,self:l}=c;if(!u.validateFormats)return;const p=new i.KeywordCxt(c,l.RULES.all.format.definition,"format");function compareCode(e){return n._`${e}.compare(${r}, ${s}) ${o[a].fail} 0`}p.$data?function validate$DataFormat(){const r=t.scopeValue("formats",{ref:l.formats,code:u.code.formats}),i=t.const("fmt",n._`${r}[${p.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,compareCode(i)))}():function validateFormat(){const r=p.schema,i=l.formats[r];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:i,code:u.code.formats?n._`${u.code.formats}${n.getProperty(r)}`:void 0});e.fail$data(compareCode(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=r(7159),n=r(3924),s=r(1240),o=r(98),a=["/properties"],c="http://json-schema.org/draft-07/schema";class Ajv extends i.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var u=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}})},7023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function _(e,...t){const r=[e[0]];let i=0;for(;i<t.length;)addCodeArg(r,t[i]),r.push(e[++i]);return new _Code(r)}t._Code=_Code,t.nil=new _Code(""),t._=_;const r=new _Code("+");function str(e,...t){const i=[safeStringify(e[0])];let n=0;for(;n<t.length;)i.push(r),addCodeArg(i,t[n]),i.push(r,safeStringify(e[++n]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(i),new _Code(i)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=r(7023),n=r(8490);var s=r(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=r(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof i.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let i=r.length;for(;i--;){const n=r[i];n.optimizeNames(e,t)||(subtractNames(e,n.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:s}=this;return`for(${t} ${r}=${i}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(i=this.finally)||void 0===i||i.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof i._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){return e instanceof i.Name?replaceName(e):function canOptimize(e){return e instanceof i._Code&&e._items.some((e=>e instanceof i.Name&&1===t[e.str]&&void 0!==r[e.str]))}(e)?new i._Code(e._items.reduce(((e,t)=>(t instanceof i.Name&&(t=replaceName(t)),t instanceof i._Code?e.push(...t._items):e.push(t),e)),[])):e;function replaceName(e){const i=r[e.str];return void 0===i||1!==t[e.str]?e:(delete t[e.str],i)}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:i._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){const n=this._scope.toName(t);return void 0!==r&&i&&(this._constants[n.str]=r),this._leafNode(new Def(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==i.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,n));return t.push("}"),new i._Code(t)}if(e,t,r){if(this._blockNode(new If(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,i,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(s,o,t,r),(()=>i(o)))}forOf(e,t,r,s=n.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${e}.length`,(t=>{this.var(o,i._`${e}[${t}]`),r(o)}))}return this._for(new ForIter("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,i._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new ForIter("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new Try;if(this._blockNode(i),this.code(e),t){const e=this.name("e");this._currNode=i.catch=new Catch(e),t(e)}return r&&(this._currNode=i.finally=new Finally,this.code(r)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=i.nil,r,n){return this._blockNode(new Func(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const a=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(a)};const c=mappend(t.operators.OR);function mappend(e){return(t,r)=>t===i.nil?r:r===i.nil?t:i._`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof i.Name?e:i._`(${e})`}t.or=function or(...e){return e.reduce(c)}},8490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=r(7023);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof i.Name?e:this.name(e)}name(e){return new i.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends i.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=i._`.${new i.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const s=i._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:i.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(e),{prefix:n}=i,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[n];if(o){const e=o.get(s);if(e)return e}else o=this._values[n]=new Map;o.set(s,i);const a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},o){let a=i.nil;for(const c in e){const u=e[c];if(!u)continue;const l=s[c]=s[c]||new Map;u.forEach((e=>{if(l.has(e))return;l.set(e,n.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;a=i._`${a}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(e)))throw new ValueError(e);a=i._`${a}${s}${this.opts._n}`}l.set(e,n.Completed)}))}return a}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=r(3487),n=r(6776),s=r(2141);function addError(e,t){const r=e.const("err",t);e.if(i._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,i._`[${r}]`)),i._`${s.default.vErrors}.push(${r})`),e.code(i._`${s.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(i._`new ${e.ValidationError}(${t})`):(r.assign(i._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>i.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?i.str`"${e}" keyword must be ${t} ($data)`:i.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,r=t.keywordError,n,s){const{it:o}=e,{gen:a,compositeRule:c,allErrors:u}=o,l=errorObjectCode(e,r,n);(null!=s?s:c||u)?addError(a,l):returnErrors(o,i._`[${l}]`)},t.reportExtraError=function reportExtraError(e,r=t.keywordError,i){const{it:n}=e,{gen:o,compositeRule:a,allErrors:c}=n;addError(o,errorObjectCode(e,r,i)),a||c||returnErrors(n,s.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(s.default.errors,t),e.if(i._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(i._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,i._`${s.default.vErrors}[${o}]`),e.if(i._`${c}.instancePath === undefined`,(()=>e.assign(i._`${c}.instancePath`,(0,i.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(i._`${c}.schemaPath`,i.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(i._`${c}.schema`,r),e.assign(i._`${c}.data`,n))}))};const o={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:n}=e.it;return!1===n?i._`{}`:function errorObject(e,t,r={}){const{gen:n,it:a}=e,c=[errorInstancePath(a,r),errorSchemaPath(e,r)];return function extraErrorProps(e,{params:t,message:r},n){const{keyword:a,data:c,schemaValue:u,it:l}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:y}=l;n.push([o.keyword,a],[o.params,"function"==typeof t?t(e):t||i._`{}`]),p.messages&&n.push([o.message,"function"==typeof r?r(e):r]);p.verbose&&n.push([o.schema,u],[o.parentSchema,i._`${f}${y}`],[s.default.data,c]);d&&n.push([o.propertyName,d])}(e,t,c),n.object(...c)}(e,t,r)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?i.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let a=s?t:i.str`${t}/${e}`;return r&&(a=i.str`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`),[o.schemaPath,a]}},5173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=r(3487),n=r(7426),s=r(2141),o=r(2531),a=r(6776),c=r(4815);class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:u}=this.opts.code,{ownProperties:l}=this.opts,p=new i.CodeGen(this.scope,{es5:a,lines:u,ownProperties:l});let d;e.$async&&(d=p.scopeValue("Error",{ref:n.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const f=p.scopeName("validate");e.validateName=f;const y={gen:p,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,i.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:i.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,c.validateFunctionCode)(y),p.optimize(this.opts.code.optimize);const t=p.toString();h=`${p.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof i.Name?void 0:e,items:t instanceof i.Name?void 0:t,dynamicProps:e instanceof i.Name,dynamicItems:t instanceof i.Name},r.source&&(r.source.evaluated=(0,i.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const i of this._compilations)if(r=e,(t=i).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i;var t,r}function resolve(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r);let n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return getJsonPointer.call(this,r,e);const s=(0,o.normalizeId)(i),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=resolveSchema.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||compileSchema.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:n})}return getJsonPointer.call(this,r,a)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let s=resolve.call(this,e,r);if(void 0===s){const n=null===(i=e.localRefs)||void 0===i?void 0:i[r],{schemaId:o}=this.opts;n&&(s=new SchemaEnv({schema:n,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[r]=inlineOrCompile.call(this,s):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:i}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(i)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!u.has(i)&&n&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=resolveSchema.call(this,i,e)}const{schemaId:c}=this.opts;return s=s||new SchemaEnv({schema:r,schemaId:c,root:i,baseId:t}),s.schema!==s.root.schema?s:void 0}},2141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=n},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(2531);class MissingRefError extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,i.resolveUrl)(e,t,r),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(e,this.missingRef))}}t.default=MissingRefError},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=r(6776),n=r(4063),s=r(9461),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return!0;if("object"==typeof r&&hasRef(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!o.has(r)&&("object"==typeof e[r]&&(0,i.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e,t="",r){!1!==r&&(t=normalizeId(t));const i=e.parse(t);return _getFullPath(e,i)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t,r){return r=normalizeId(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:i}=this.opts,o=normalizeId(e[r]||t),a={"":o},c=getFullPath(i,o,!1),l={},p=new Set;return s(e,{allKeys:!0},((e,t,i,n)=>{if(void 0===n)return;const s=c+t;let o=a[n];function addRef(t){const r=this.opts.uriResolver.resolve;if(t=normalizeId(o?r(o,t):t),p.has(t))throw ambiguos(t);p.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?checkAmbiguosRef(e,i.schema,t):t!==normalizeId(s)&&("#"===t[0]?(checkAmbiguosRef(e,l[t],t),l[t]=e):this.refs[t]=s),t}function addAnchor(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=addRef.call(this,e[r])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),a[t]=o})),l;function checkAmbiguosRef(e,t,r){if(void 0!==t&&!n(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&r.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=r(3487),n=r(7023);function checkUnknownRules(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=i.RULES.keywords;for(const r in t)n[r]||checkStrictMode(e,`unknown keyword: "${r}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,a,c)=>{const u=void 0===a?o:a instanceof i.Name?(o instanceof i.Name?e(s,o,a):t(s,o,a),a):o instanceof i.Name?(t(s,a,o),o):r(o,a);return c!==i.Name||u instanceof i.Name?u:n(s,u)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",i._`{}`);return void 0!==t&&setEvaluated(e,r,t),r}function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign(i._`${t}${(0,i.getProperty)(r)}`,!0)))}t.toHash=function toHash(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return i._`${r}`}return i._`${e}${t}${(0,i.getProperty)(n)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>{e.if(i._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,i._`${r} || {}`).code(i._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,i._`${r} || {}`),setEvaluated(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,i._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>e.assign(r,!0===t||i._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const s={};var o;function checkStrictMode(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(o=t.Type||(t.Type={})),t.getErrorPath=function getErrorPath(e,t,r){if(e instanceof i.Name){const n=t===o.Num;return r?n?i._`"[" + ${e} + "]"`:i._`"['" + ${e} + "']"`:n?i._`"/" + ${e}`:i._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,i.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},8876:(e,t)=>{"use strict";function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},r){const i=t.RULES.types[r];return i&&!0!==i&&shouldUseGroup(e,i)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},5667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=r(4181),n=r(3487),s=r(2141),o={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,i.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:i}=e;!1===r?falseSchemaError(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:r,schema:i}=e;!1===i?(r.var(t,!1),falseSchemaError(e)):r.var(t,!0)}},453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=r(3141),n=r(8876),s=r(4181),o=r(3487),a=r(6776);var c;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:r,data:i,opts:s}=e,a=function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(l){const n=checkDataTypes(t,i,s.strictNumbers,c.Wrong);r.if(n,(()=>{a.length?function coerceData(e,t,r){const{gen:i,data:n,opts:s}=e,a=i.let("dataType",o._`typeof ${n}`),c=i.let("coerced",o._`undefined`);"array"===s.coerceTypes&&i.if(o._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>i.assign(n,o._`${n}[0]`).assign(a,o._`typeof ${n}`).if(checkDataTypes(t,n,s.strictNumbers),(()=>i.assign(c,n)))));i.if(o._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void i.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${n}`).elseIf(o._`${n} === null`).assign(c,o._`""`);case"number":return void i.elseIf(o._`${a} == "boolean" || ${n} === null
2
+ var NMSHDRuntime;(()=>{var e={594:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseSchemaUpgrader=void 0;const o=r(194);let a=i=class RuntimeDatabaseSchemaMetadata extends o.Serializable{static preFrom(e){return e.id||(e.id=i.DATABASE_SCHEMA_ID),e}static from(e){return this.fromAny(e)}};a.DATABASE_SCHEMA_ID="databaseSchema",n([(0,o.serialize)(),(0,o.validate)({customValidator:e=>e===i.DATABASE_SCHEMA_ID?void 0:"Invalid database schema id"}),s("design:type",String)],a.prototype,"id",void 0),n([(0,o.serialize)(),(0,o.validate)({min:0}),s("design:type",Number)],a.prototype,"version",void 0),a=i=n([(0,o.type)("RuntimeDatabaseSchemaMetadata")],a);t.DatabaseSchemaUpgrader=class DatabaseSchemaUpgrader{constructor(e,t){this.accountController=e,this.consumptionController=t,this.CURRENT_DATABASE_SCHEMA_VERSION=1,this.DATABASE_SCHEMA_QUERY={id:a.DATABASE_SCHEMA_ID}}async upgradeSchemaVersion(){let e=await this.getVersionFromDB();for(;e<this.CURRENT_DATABASE_SCHEMA_VERSION;){e++;const t=c[e];if(!t)throw new Error(`No upgrade logic found for version '${e}'`);await t(this.accountController,this.consumptionController),await this.writeVersionToDB(e)}}async getVersionFromDB(){const e=await this.accountController.db.getCollection("meta"),t=await e.findOne(this.DATABASE_SCHEMA_QUERY);if(!t)return 0;return a.from(t).version}async writeVersionToDB(e){const t=await this.accountController.db.getCollection("meta"),r=a.from({version:e}),i=await t.findOne(this.DATABASE_SCHEMA_QUERY);i?await t.update(i,r):await t.create(r)}};const c={1:()=>{}}},6984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runtime=void 0;const i=r(5172),n=r(3850),s=r(9663),o=r(7071),a=r(2500),c=r(594),u=r(4086),p=r(2205),l=r(1496),d=r(5200),f=r(9662),y=r(986),h=r(485),m=r(2746);t.Runtime=class Runtime{constructor(e,t,r){this.runtimeConfig=e,this.loggerFactory=t,this._isInitialized=!1,this._isStarted=!1,this._logger=this.loggerFactory.getLogger(this.constructor.name),this._eventBus=r??new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the runtime event bus (namespace: '${t}'). Root error: ${e}`)}))}get logger(){return this._logger}get anonymousServices(){return this._anonymousServices}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw h.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw h.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}async login(e,t){this._accountController=e,this._consumptionController=t;const r=o.Container.get(d.TransportServices),i=o.Container.get(d.ConsumptionServices),n=o.Container.get(u.DataViewExpander);return await new c.DatabaseSchemaUpgrader(e,t).upgradeSchemaVersion(),{transportServices:r,consumptionServices:i,dataViewExpander:n}}get modules(){return this._modules}get eventBus(){return this._eventBus}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw h.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new p.RuntimeInitializingEvent),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new d.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._eventProxy=new l.EventProxy(this._eventBus,this.transport.eventBus).start(),this._isInitialized=!0,this.eventBus.publish(new p.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.logger.debug("Initializing Database connection... ");const e=await this.createDatabaseConnection(),t=this.createTransportConfigWithAdditionalHeaders({...this.runtimeConfig.transportLibrary,supportedIdentityVersion:1}),r=new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the transport event bus (namespace: '${t}'). Root error: ${e}`)}));this.transport=new s.Transport(e,t,r,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=o.Container.get(d.AnonymousServices)}createTransportConfigWithAdditionalHeaders(e){const t=e.platformAdditionalHeaders??{};return t["X-RUNTIME-VERSION"]=a.buildInformation.version,{...e,platformAdditionalHeaders:t}}async initDIContainer(){o.Container.bind(i.EventBus).factory((()=>this.eventBus)).scope(o.Scope.Singleton),o.Container.bind(y.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(o.Scope.Singleton),o.Container.bind(s.AccountController).factory((()=>this.getAccountController())).scope(o.Scope.Request),o.Container.bind(s.DevicesController).factory((()=>this.getAccountController().devices)).scope(o.Scope.Request),o.Container.bind(s.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(o.Scope.Request),o.Container.bind(s.FileController).factory((()=>this.getAccountController().files)).scope(o.Scope.Request),o.Container.bind(s.IdentityController).factory((()=>this.getAccountController().identity)).scope(o.Scope.Request),o.Container.bind(s.MessageController).factory((()=>this.getAccountController().messages)).scope(o.Scope.Request),o.Container.bind(s.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(o.Scope.Request),o.Container.bind(s.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(o.Scope.Request),o.Container.bind(s.TokenController).factory((()=>this.getAccountController().tokens)).scope(o.Scope.Request),o.Container.bind(s.ChallengeController).factory((()=>this.getAccountController().challenges)).scope(o.Scope.Request),o.Container.bind(n.ConsumptionController).factory((()=>this.getConsumptionController())).scope(o.Scope.Request),o.Container.bind(n.AttributesController).factory((()=>this.getConsumptionController().attributes)).scope(o.Scope.Request),o.Container.bind(n.AttributeListenersController).factory((()=>this.getConsumptionController().attributeListeners)).scope(o.Scope.Request),o.Container.bind(n.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(o.Scope.Request),o.Container.bind(n.IncomingRequestsController).factory((()=>this.getConsumptionController().incomingRequests)).scope(o.Scope.Request),o.Container.bind(n.OutgoingRequestsController).factory((()=>this.getConsumptionController().outgoingRequests)).scope(o.Scope.Request),o.Container.bind(n.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(o.Scope.Request),o.Container.bind(s.AnonymousTokenController).factory((()=>new s.AnonymousTokenController(this.transport.config))).scope(o.Scope.Singleton);const e=new m.SchemaRepository;await e.loadSchemas(),o.Container.bind(m.SchemaRepository).factory((()=>e)).scope(o.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const e in this.runtimeConfig.modules){const t=this.runtimeConfig.modules[e];t.enabled?t.location?t.location.startsWith("@nmshd/runtime:")?this.loadBuiltinModule(t):await this.loadModule(t):this.logger.error(`Skip loading module '${this.getModuleName(t)}' because has no location.`):this.logger.debug(`Skip loading module '${this.getModuleName(t)}' because it is not enabled.`)}this.eventBus.publish(new p.ModulesLoadedEvent)}loadBuiltinModule(e){switch(e.location.split(":")[1]){case"DeciderModule":const t=new f.DeciderModule(this,e,this.loggerFactory.getLogger(f.DeciderModule));this.modules.add(t);break;case"RequestModule":const r=new f.RequestModule(this,e,this.loggerFactory.getLogger(f.RequestModule));this.modules.add(r);break;case"MessageModule":const i=new f.MessageModule(this,e,this.loggerFactory.getLogger(f.MessageModule));this.modules.add(i);break;case"AttributeListenerModule":const n=new f.AttributeListenerModule(this,e,this.loggerFactory.getLogger(f.AttributeListenerModule));this.modules.add(n);break;default:throw new Error(`Module ${e.name} is not a builtin module.`)}}async initModules(){this.logger.info("Initializing modules...");for(const e of this.modules.toArray())try{await e.init(),this.logger.info(`Module '${this.getModuleName(e)}' was initialized successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be initialized.`,t),t}this.eventBus.publish(new p.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(this._isStarted)throw h.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw h.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),await this.transport.eventBus.close(),this._eventProxy.stop(),await this._eventBus.close(),this.logger.info("Closing AccountController..."),await(this._accountController?.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const e of this.modules.toArray())try{await e.stop(),this.logger.info(`Module '${this.getModuleName(e)}' was stopped successfully.`)}catch(t){this.logger.error(`An Error occured while stopping module '${this.getModuleName(e)}': `,t)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const e of this.modules.toArray())try{await e.start(),this.logger.info(`Module '${this.getModuleName(e)}' was started successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be started.`,t),t}this.eventBus.publish(new p.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(e){return e.displayName||e.name||JSON.stringify(e)}}},9757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeLoggerFactory=void 0;t.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInformation=void 0;const i=r(194),n=r(3850),s=r(5030),o=r(2890),a=r(9663);t.buildInformation={version:"2.0.1",build:"128",date:"2022-11-10T13:31:55+00:00",commit:"eeca3d189e5fad46f71c07edc3949246d9c5caad",dependencies:{"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.5","@js-soft/ts-utils":"^2.3.0","@nmshd/consumption":"2.0.0","@nmshd/content":"2.0.1","@nmshd/crypto":"2.0.2","@nmshd/transport":"2.0.0",ajv:"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1",luxon:"^3.1.0",qrcode:"1.5.1","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:i.buildInformation,consumption:n.buildInformation,content:s.buildInformation,crypto:o.buildInformation,transport:a.buildInformation}}},4869:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewExpander=void 0;const o=r(194),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(5200),d=r(4629),f=r(485),y=r(2043),h=r(4700),m=r(2466);let g=class DataViewExpander{constructor(e,t,r,i){this.transport=e,this.consumption=t,this.consumptionController=r,this.identityController=i}async expand(e,t){let r=t;if(e["@type"]&&(r=e["@type"]),Array.isArray(e)){if(!(e.length>0))return[];r=e[0]["@type"]}if(!r)throw f.RuntimeErrors.general.invalidPayload("No type found.");switch(r){case"Message":return Array.isArray(e)?await this.expandMessageDTOs(e):await this.expandMessageDTO(e);case"Attribute":return Array.isArray(e)?await this.expandAttributes(e):await this.expandAttribute(e);case"Address":return Array.isArray(e)?await this.expandAddresses(e):await this.expandAddress(e);case"FileId":return Array.isArray(e)?await this.expandFileIds(e):await this.expandFileId(e);case"File":return Array.isArray(e)?await this.expandFileDTOs(e):await this.expandFileDTO(e);case"Recipient":return Array.isArray(e)?await this.expandRecipientDTOs(e):await this.expandAddress(e);case"Relationship":return Array.isArray(e)?await this.expandRelationshipDTOs(e):await this.expandRelationshipDTO(e);case"LocalAttribute":return Array.isArray(e)?await this.expandLocalAttributeDTOs(e):await this.expandLocalAttributeDTO(e);default:throw f.RuntimeErrors.general.notSupported(`No expander is defined for the @type '${r}'.`)}}async expandMessageDTO(e){const t=await this.expandRecipientDTOs(e.recipients),r={};t.forEach((e=>r[e.id]=e));const i=await this.expandAddress(e.createdBy),n=[],s=[];for(const t of e.attachments)"string"==typeof t?(s.push(this.expandFileId(t)),n.push(t)):(s.push(this.expandFileDTO(t)),n.push(t.id));const o=await Promise.all(s),a=this.identityController.isMe(u.CoreAddress.from(e.createdBy));let c,p=h.MessageStatus.Received;if(a){p=e.recipients.every((e=>!!e.receivedAt))?h.MessageStatus.Delivered:h.MessageStatus.Delivering,c={...t[0],type:"IdentityDVO"}}else c=i;const l=y.DataViewTranslateable.transport.messageName,d={id:e.id,name:l,date:e.createdAt,type:"MessageDVO",createdByDevice:e.createdByDevice,createdAt:e.createdAt,createdBy:i,recipients:t,attachments:o,isOwn:a,recipientCount:e.recipients.length,attachmentCount:e.attachments.length,status:p,statusText:`i18n://dvo.message.${p}`,image:"",peer:c,content:e.content};if("Mail"===e.content["@type"]||"RequestMail"===e.content["@type"]){const t=e.content,i=t.to.map((e=>r[e]));let n=[];t.cc&&(n=t.cc.map((e=>r[e])));return{...d,type:"MailDVO",name:t.subject?t.subject:y.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:t.subject,body:t.body,to:i,toCount:t.to.length,cc:n,ccCount:n.length}}if("Request"===e.content["@type"]){let t;if(a){const r=await this.consumption.outgoingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...d,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}if("Response"===e.content["@type"]){let t;if(a){const r=await this.consumption.incomingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.outgoingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...d,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}return d}async expandMessageDTOs(e){const t=e.map((e=>this.expandMessageDTO(e)));return await Promise.all(t)}async expandRelationshipTemplateDTO(e){let t,r;const i=await this.expandAddress(e.createdBy),n=e.isOwn?"RelationshipTemplateDVO":"PeerRelationshipTemplateDVO";let s=e.isOwn?"i18n://dvo.template.outgoing.name":"i18n://dvo.template.incoming.name";const o=e.isOwn?"i18n://dvo.template.outgoing.description":"i18n://dvo.template.incoming.description";let u;if("RelationshipTemplateContent"===e.content["@type"]){const i=c.RelationshipTemplateContent.from(e.content).toJSON();let n;if(i.title&&(s=i.title),!e.isOwn){const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:a.LocalRequestStatus.ManualDecisionRequired}});if(t.value.length>0)n=t.value[0],u=await this.expandLocalRequestDTO(n);else{const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:[a.LocalRequestStatus.Decided,a.LocalRequestStatus.Completed]}});t.value.length>0&&(n=t.value[0],u=await this.expandLocalRequestDTO(n))}}t=await this.expandRequest(i.onNewRelationship),i.onExistingRelationship&&(r=await this.expandRequest(i.onExistingRelationship))}return{name:s,description:o,type:n,date:e.createdAt,...e,createdBy:i,request:u,onNewRelationship:t,onExistingRelationship:r}}async expandRelationshipTemplateDTOs(e){const t=e.map((e=>this.expandRelationshipTemplateDTO(e)));return await Promise.all(t)}async expandRequest(e,t,r){const i=e.id?e.id:"",n=[];for(let i=0;i<e.items.length;i++){const s=e.items[i],o=r?.content.items[i];n.push(await this.expandRequestGroupOrItem(s,t,o))}return{id:i,name:`${e["@type"]} ${i}`,type:"RequestDVO",date:e.expiresAt,...e,items:n,response:r?.content}}async expandRequests(e){const t=e.map((e=>this.expandRequest(e)));return await Promise.all(t)}async expandRequestItem(e,t,r){let i,n=!1;switch(!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(n=!0),e["@type"]){case"ReadAttributeRequestItem":const s=e;if(n){const t=await this.processAttributeQuery(s.query);return"ProcessedThirdPartyRelationshipAttributeQueryDVO"===t.type&&0===t.results.length&&(n=!1,i={code:"dvo.requestItem.error.noResultsForThirdPartyRelationshipAttributeQuery",message:"There are no matching Attributes for this ThirdPartyRelationshipAttributeQuery. You cannot set any"}),{...s,type:"DecidableReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableReadAttributeRequestItem.name",query:t,isDecidable:n,error:i,response:r}}return{...s,type:"ReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ReadAttributeRequestItem.name",query:await this.expandAttributeQuery(s.query),isDecidable:n,response:r};case"CreateAttributeRequestItem":const o=e,a=await this.expandAttribute(o.attribute);let c=!1;"DraftIdentityAttributeDVO"===a.type&&(c=!0);const u=e.title,p=e.description;let l;return n?(l="i18n://dvo.requestItem.DecidableCreateRelationshipAttributeRequestItem.name",c&&(l="i18n://dvo.requestItem.DecidableCreateIdentityAttributeRequestItem.name"),{...o,type:"DecidableCreateAttributeRequestItemDVO",id:"",name:u??l,description:p??l,attribute:a,isDecidable:n,response:r}):(l="i18n://dvo.requestItem.CreateRelationshipAttributeRequestItem.name",c&&(l="i18n://dvo.requestItem.CreateIdentityAttributeRequestItem.name"),{...o,type:"CreateAttributeRequestItemDVO",id:"",name:u??l,description:p??l,attribute:a,isDecidable:n,response:r});case"ProposeAttributeRequestItem":const d=e;return t&&(d.attribute.owner=t.isOwn?t.peer:this.identityController.address.toString()),n?{...d,type:"DecidableProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:await this.expandAttribute(d.attribute),query:await this.processAttributeQuery(d.query),isDecidable:n,response:r}:{...d,type:"ProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:await this.expandAttribute(d.attribute),query:await this.expandAttributeQuery(d.query),isDecidable:n,response:r};case"ShareAttributeRequestItem":const f=e,y=await this.expandAttribute(f.attribute);if(n)return{...f,type:"DecidableShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:y,isDecidable:n,response:r};const h=r;return h&&(y.id=h.attributeId),{...f,type:"ShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:y,isDecidable:n,response:r};case"AuthenticationRequestItem":const m=e;return n?{...m,type:"DecidableAuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableAuthenticationRequestItem.name",isDecidable:n,response:r}:{...m,type:"AuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.AuthenticationRequestItem.name",isDecidable:n,response:r};case"ConsentRequestItem":const g=e;return n?{...g,type:"DecidableConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableConsentRequestItem.name",isDecidable:n,response:r}:{...g,type:"ConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ConsentRequestItem.name",isDecidable:n,response:r};case"RegisterAttributeListenerRequestItem":const v=e,b=await this.expandAttributeQuery(v.query);return n?{...v,type:"DecidableRegisterAttributeListenerRequestItemDVO",id:"",query:b,name:e.title?e.title:"i18n://dvo.requestItem.DecidableRegisterAttributeListenerRequestItem.name",isDecidable:n,response:r}:{...v,type:"RegisterAttributeListenerRequestItemDVO",id:"",query:b,name:e.title?e.title:"i18n://dvo.requestItem.RegisterAttributeListenerRequestItem.name",isDecidable:n,response:r};default:return{...e,type:"RequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.name",isDecidable:n,response:r}}}async expandRequestGroupOrItem(e,t,r){if("RequestItemGroup"===e["@type"]){let i=!1;!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(i=!0);const n=e,s=r,o=[];for(let e=0;e<n.items.length;e++){const r=n.items[e],i=s?.items[e];o.push(await this.expandRequestItem(r,t,i))}return{type:"RequestItemGroupDVO",items:o,isDecidable:i,title:e.title,description:e.description,mustBeAccepted:e.mustBeAccepted,response:s}}return await this.expandRequestItem(e,t,r)}async expandResponseItem(e){if("Accepted"!==e.result){if("Rejected"===e.result){return{...e,type:"RejectResponseItemDVO",id:"",name:"i18n://dvo.responseItem.rejected"}}return{...e,type:"ErrorResponseItemDVO",id:"",name:"i18n://dvo.responseItem.error"}}{const t=`i18n://dvo.responseItem.${e["@type"]}.acceptedName`;switch(e["@type"]){case"ReadAttributeAcceptResponseItem":const r=e,i=await this.consumption.attributes.getAttribute({id:r.attributeId}),n=await this.expandLocalAttributeDTO(i.value);return{...r,type:"ReadAttributeAcceptResponseItemDVO",id:r.attributeId,name:t,attribute:n};case"CreateAttributeAcceptResponseItem":const s=e,o=await this.consumption.attributes.getAttribute({id:s.attributeId}),a=await this.expandLocalAttributeDTO(o.value);return{...s,type:"CreateAttributeAcceptResponseItemDVO",id:s.attributeId,name:t,attribute:a};case"ProposeAttributeAcceptResponseItem":const c=e,u=await this.consumption.attributes.getAttribute({id:c.attributeId}),p=await this.expandLocalAttributeDTO(u.value);return{...c,type:"ProposeAttributeAcceptResponseItemDVO",id:c.attributeId,name:t,attribute:p};case"ShareAttributeAcceptResponseItem":const l=e,d=await this.consumption.attributes.getAttribute({id:l.attributeId}),f=await this.expandLocalAttributeDTO(d.value);return{...l,type:"ShareAttributeAcceptResponseItemDVO",id:l.attributeId,name:t,attribute:f};case"RegisterAttributeListenerAcceptResponseItem":const y=e,h=await this.consumption.attributeListeners.getAttributeListener({id:y.listenerId}),m=await this.expandLocalAttributeListenerDTO(h.value);return{...y,type:"RegisterAttributeListenerAcceptResponseItemDVO",id:y.listenerId,name:t,listener:m};default:return{...e,type:"AcceptResponseItemDVO",id:"",name:t}}}}async expandLocalAttributeListenerDTO(e){const t=await this.expandAttributeQuery(e.query),r=await this.expandIdentityForAddress(e.peer);return{type:"LocalAttributeListenerDVO",name:"dvo.localAttributeListener.name",description:"dvo.localAttributeListener.description",...e,query:t,peer:r}}async expandResponseGroupOrItem(e){if("ResponseItemGroup"===e["@type"]){const t=e,r=[];for(const e of t.items)r.push(await this.expandResponseItem(e));return{type:"ResponseItemGroupDVO",items:r}}return await this.expandResponseItem(e)}async expandLocalRequestDTO(e){const t=e.response?await this.expandLocalResponseDTO(e.response,e):void 0,r=await this.expandRequest(e.content,e,t),i=await this.expandAddress(e.peer);let n=!1;e.isOwn||"DecisionRequired"!==e.status&&"ManualDecisionRequired"!==e.status||(n=!0);const s=e.isOwn?"outgoing":"incoming",o=`i18n://dvo.localRequest.status.${e.status}`,a=e.source?.type??"unknown",c=e.response?e.response.content.requestId:"";return{...e,id:e.id?e.id:c,content:r,items:r.items,name:`i18n://dvo.localRequest.${a}.${s}.${e.status}.name`,directionText:`i18n://dvo.localRequest.direction.${s}`,description:`i18n://dvo.localRequest.${a}.${s}.${e.status}.description`,sourceTypeText:`i18n://dvo.localRequest.sourceType.${a}`,type:"LocalRequestDVO",date:e.createdAt,createdBy:e.isOwn?this.expandSelf():i,decider:e.isOwn?i:this.expandSelf(),peer:i,response:t,statusText:o,isDecidable:n}}async expandLocalRequestDTOs(e){const t=e.map((e=>this.expandLocalRequestDTO(e)));return await Promise.all(t)}async expandResponse(e,t){const r=[];for(const t of e.items)r.push(await this.expandResponseGroupOrItem(t));return{id:t.id,name:"i18n://dvo.response.name",type:"ResponseDVO",...e,items:r}}async expandLocalResponseDTO(e,t){const r=await this.expandResponse(e.content,t);return{...e,id:t.id,name:"i18n://dvo.localResponse.name",type:"LocalResponseDVO",date:e.createdAt,content:r,items:e.content.items}}async expandLocalAttributeDTO(e){const t=e.content.value["@type"],r=await this.consumptionController.attributes.getLocalAttribute(u.CoreId.from(e.id));if(!r)throw new Error("Attribute not found");const i=e.content.owner;let n=`i18n://dvo.attribute.name.${t}`,s=`i18n://dvo.attribute.description.${t}`;const o=r.content.value.renderHints.toJSON(),a=r.content.value.valueHints.toJSON();if(r.shareInfo){const u=r.shareInfo.peer.toString();if(r.content instanceof c.RelationshipAttribute){const c=r.content,p=c.value;return"title"in p&&(n=p.title),"description"in p&&p.description&&(s=p.description),c.owner===r.shareInfo.peer?{type:"PeerRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}:{type:"OwnRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}}const p=r.content;return r.shareInfo.sourceAttribute?{type:"SharedToPeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),sourceAttribute:r.shareInfo.sourceAttribute.toString(),tags:p.tags?p.tags:[],valueType:t}:{type:"PeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),tags:p.tags?p.tags:[],valueType:t}}const p=r.content,l=await this.consumption.attributes.getAttributes({query:{"shareInfo.sourceAttribute":e.id}}),d=await this.expandLocalAttributeDTOs(l.value);return{type:"RepositoryAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,isDraft:!1,sharedWith:d,tags:p.tags?p.tags:[],valueType:t}}async expandLocalAttributeDTOs(e){const t=e.map((e=>this.expandLocalAttributeDTO(e)));return await Promise.all(t)}async expandAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return this.expandIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.expandRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.expandThirdPartyRelationshipAttributeQuery(e);default:throw new Error("Wrong attribute query")}}expandIdentityAttributeQuery(e){const t=e.valueType,r=`i18n://dvo.attribute.name.${t}`,i=`i18n://dvo.attribute.description.${t}`,n=this.getHintsForValueType(t);return{type:"IdentityAttributeQueryDVO",id:"",name:r,description:i,valueType:t,validFrom:e.validFrom,validTo:e.validTo,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1}}async expandRelationshipAttributeQuery(e){const t=e.attributeCreationHints.valueType;let r="i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",i="i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery";e.attributeCreationHints.title&&(r=e.attributeCreationHints.title),e.attributeCreationHints.description&&(i=e.attributeCreationHints.description);const n=this.getHintsForValueType(t);return e.attributeCreationHints.valueHints&&(n.valueHints=e.attributeCreationHints.valueHints),{type:"RelationshipAttributeQueryDVO",id:"",name:r,description:i,validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),key:e.key,attributeCreationHints:e.attributeCreationHints,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1,valueType:t}}async expandThirdPartyRelationshipAttributeQuery(e){return{type:"ThirdPartyRelationshipAttributeQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",description:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),thirdParty:await this.expandAddress(e.thirdParty),key:e.key,isProcessed:!1}}getHintsForValueType(e){const t=o.SerializableBase.getModule(e,1);if(!t)throw new Error(`No class implementation found for ${e}`);let r={"@type":"RenderHints",editType:c.RenderHintsEditType.InputLike,technicalType:c.RenderHintsTechnicalType.String},i={"@type":"ValueHints",max:200};return t.renderHints&&t.renderHints instanceof c.RenderHints&&(r=t.renderHints.toJSON()),t.valueHints&&t.valueHints instanceof c.ValueHints&&(i=t.valueHints.toJSON()),{renderHints:r,valueHints:i}}async processAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return await this.processIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.processRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.processThirdPartyRelationshipAttributeQuery(e);default:throw new Error("Wrong attribute query")}}async processIdentityAttributeQuery(e){const t=await this.consumption.attributes.executeIdentityAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...this.expandIdentityAttributeQuery(e),type:"ProcessedIdentityAttributeQueryDVO",results:r,isProcessed:!0}}async processRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[r],isProcessed:!0}}async processThirdPartyRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeThirdPartyRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:[r],renderHints:r.renderHints,valueHints:r.valueHints,valueType:r.valueType,isProcessed:!0}}async expandIdentityAttribute(e,t){const r=e.value["@type"],i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`,s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=await this.expandAddress(e.owner);return{type:"DraftIdentityAttributeDVO",content:e,name:i,description:n,id:"",owner:a,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:a.isSelf,valueType:r,tags:t.tags?t.tags:[]}}async expandRelationshipAttribute(e,t){const r=e.value["@type"];let i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`;const s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=t.value;"title"in a&&(i=a.title),"description"in a&&a.description&&(n=a.description);const c=await this.expandAddress(e.owner);return{type:"DraftRelationshipAttributeDVO",content:e,name:i,description:n,key:e.key,confidentiality:e.confidentiality,isTechnical:!!e.isTechnical,id:"",owner:c,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:c.isSelf,valueType:r}}async expandAttribute(e){const t=o.Serializable.fromUnknown(e);if(t instanceof c.IdentityAttribute)return await this.expandIdentityAttribute(e,t);if(t instanceof c.RelationshipAttribute)return await this.expandRelationshipAttribute(e,t);throw new Error("Wrong attribute instance")}async expandAttributes(e){const t=e.map((e=>this.expandAttribute(e)));return await Promise.all(t)}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:u.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(e){const t=e.substring(3,9),r=(t.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:t,initials:r,realm:u.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAddress(e){if(this.identityController.isMe(u.CoreAddress.from(e)))return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});return t.isError?this.expandUnknown(e):await this.expandRelationshipDTO(t.value)}async expandAddresses(e){const t=e.map((e=>this.expandAddress(e)));return await Promise.all(t)}async expandRecipientDTO(e){return{...await this.expandAddress(e.address),type:"RecipientDVO",receivedAt:e.receivedAt,receivedByDevice:e.receivedByDevice}}async expandRecipientDTOs(e){const t=e.map((e=>this.expandRecipientDTO(e)));return await Promise.all(t)}expandRelationshipChangeDTO(e,t){const r=t.response?t.response.createdAt:t.request.createdAt;let i,n=!1;return this.identityController.isMe(u.CoreAddress.from(t.request.createdBy))&&(n=!0),t.response&&(i={...t.response,id:`${t.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:t.id,name:"",date:r,status:t.status,statusText:`i18n://dvo.relationshipChange.${t.status}`,changeType:t.type,changeTypeText:`i18n://dvo.relationshipChange.${t.type}`,isOwn:n,request:{...t.request,id:`${t.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:i})}async expandRelationshipChangeDTOs(e){const t=e.changes.map((t=>this.expandRelationshipChangeDTO(e,t)));return await Promise.all(t)}async createRelationshipDVO(e){let t;const r=await this.consumption.settings.getSettings({query:{reference:e.id}});t=r.value.length>0?r.value[0].value:{isPinned:!1};const i={},n=await this.consumption.attributes.getPeerAttributes({onlyValid:!0,peer:e.peer}),s=await this.expandLocalAttributeDTOs(n.value),o={};for(const e of s){const t=e.content.value["@type"],r=o[t];r?r.push(e):o[t]=[e];if(["DisplayName","GivenName","MiddleName","Surname","Sex"].includes(t)){const r=e.content.value;i[t]&&"GivenName"===t?i[t]+=` ${r.value}`:i[t]=r.value}}let a=m.RelationshipDirection.Incoming;this.identityController.isMe(u.CoreAddress.from(e.changes[0].request.createdBy))&&(a=m.RelationshipDirection.Outgoing);let c="";e.status===u.RelationshipStatus.Pending&&a===m.RelationshipDirection.Outgoing?c=y.DataViewTranslateable.transport.relationshipOutgoing:e.status===u.RelationshipStatus.Pending?c=y.DataViewTranslateable.transport.relationshipIncoming:e.status===u.RelationshipStatus.Rejected?c=y.DataViewTranslateable.transport.relationshipRejected:e.status===u.RelationshipStatus.Revoked?c=y.DataViewTranslateable.transport.relationshipRevoked:e.status===u.RelationshipStatus.Active&&(c=y.DataViewTranslateable.transport.relationshipActive);const p=await this.expandRelationshipChangeDTOs(e);let l;return l=i.DisplayName?i.DisplayName:i.MiddleName&&i.GivenName&&i.Surname?`${i.GivenName} ${i.MiddleName} ${i.Surname}`:i.GivenName&&i.Surname?`${i.GivenName} ${i.Surname}`:i.Sex&&i.Surname?`i18n://dvo.identity.Salutation.${i.Sex} ${i.Surname}`:i.Surname?`${i.Surname}`:e.peer.substring(3,9),{id:e.id,name:t.userTitle??l,description:t.userDescription??c,date:e.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:e.status,statusText:c,direction:a,isPinned:t.isPinned,attributeMap:o,items:s,nameMap:i,changes:p,changeCount:p.length,templateId:e.template.id}}async expandRelationshipDTO(e){const t=await this.createRelationshipDVO(e),r=(t.name.match(/\b\w/g)??[]).join("");return{type:"IdentityDVO",id:e.peer,name:t.name,date:t.date,description:t.description,publicKey:e.peerIdentity.publicKey,realm:e.peerIdentity.realm,initials:r,isSelf:!1,hasRelationship:!0,relationship:t,items:t.items}}async expandIdentityForAddress(e){if(e===this.identityController.address.toString())return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});if(t.isSuccess)return await this.expandRelationshipDTO(t.value);if(t.error.code!==f.RuntimeErrors.general.recordNotFound(u.Relationship).code)throw t.error;const r=e.substring(3,9),i=(r.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:r,initials:i,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentityDTO(e){return await this.expandIdentityForAddress(e.address)}async expandRelationshipDTOs(e){const t=e.map((e=>this.expandRelationshipDTO(e)));return await Promise.all(t)}async expandFileId(e){const t=await this.transport.files.getFile({id:e});if(t.isError)throw t.error;return await this.expandFileDTO(t.value)}async expandFileIds(e){const t=e.map((e=>this.expandFileId(e)));return await Promise.all(t)}async expandFileDTO(e){return{...e,type:"FileDVO",id:e.id,name:e.title?e.title:e.filename,date:e.createdAt,image:"",filename:e.filename,filesize:e.filesize,createdBy:await this.expandAddress(e.createdBy)}}async expandFileDTOs(e){const t=e.map((e=>this.expandFileDTO(e)));return await Promise.all(t)}};g=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),n("design:paramtypes",[l.TransportServices,d.ConsumptionServices,a.ConsumptionController,u.IdentityController])],g),t.DataViewExpander=g},9121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewTranslateable=void 0;class DataViewTranslateable{}t.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},2706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8306:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2706),t),n(r(6911),t)},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9542:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1403),t),n(r(8691),t),n(r(1952),t),n(r(2421),t),n(r(1600),t),n(r(8472),t)},1039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},166:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1039),t),n(r(6519),t),n(r(9802),t),n(r(9005),t),n(r(2161),t),n(r(843),t)},4086:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8306),t),n(r(9542),t),n(r(166),t),n(r(4869),t),n(r(9121),t),n(r(2043),t),n(r(6574),t)},4457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4700:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageStatus=void 0,function(e){e.Received="Received",e.Delivering="Delivering",e.Delivered="Delivered"}(t.MessageStatus||(t.MessageStatus={}))},2466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipDirection=void 0,function(e){e.Outgoing="Outgoing",e.Incoming="Incoming"}(t.RelationshipDirection||(t.RelationshipDirection={}))},9893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6574:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4457),t),n(r(6342),t),n(r(4700),t),n(r(2466),t),n(r(9893),t)},1291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(5172);class DataEvent extends i.Event{constructor(e,t,r){super(e),this.eventTargetAddress=t,this.data=r}}t.DataEvent=DataEvent},1496:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EventProxy=void 0;const o=s(r(3850)),a=s(r(9663)),c=r(485),u=r(2226),p=r(7747);t.EventProxy=class EventProxy{constructor(e,t){this.targetEventBus=e,this.sourceEventBus=t,this.subscriptionIds=[]}start(){if(this.subscriptionIds.length>0)throw new Error("EventProxy is already started");return this.proxyConsumptionEvents(),this.proxyTransportEvents(),this}proxyTransportEvents(){this.subscribeToSourceEvent(a.MessageDeliveredEvent,(e=>{this.targetEventBus.publish(new p.MessageDeliveredEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageReceivedEvent,(e=>{this.targetEventBus.publish(new p.MessageReceivedEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageSentEvent,(e=>{this.targetEventBus.publish(new p.MessageSentEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.PeerRelationshipTemplateLoadedEvent,(e=>{this.targetEventBus.publish(new p.PeerRelationshipTemplateLoadedEvent(e.eventTargetAddress,c.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.data)))})),this.subscribeToSourceEvent(a.RelationshipChangedEvent,(e=>{this.targetEventBus.publish(new p.RelationshipChangedEvent(e.eventTargetAddress,c.RelationshipMapper.toRelationshipDTO(e.data)))}))}proxyConsumptionEvents(){this.subscribeToSourceEvent(o.AttributeCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeDeletedEvent,(e=>{this.targetEventBus.publish(new u.AttributeDeletedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeSucceededEvent,(e=>{this.targetEventBus.publish(new u.AttributeSucceededEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeUpdatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeUpdatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestReceivedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestReceivedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestCreatedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.SharedAttributeCopyCreatedEvent,(e=>{this.targetEventBus.publish(new u.SharedAttributeCopyCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeListenerCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeListenerCreatedEvent(e.eventTargetAddress,c.AttributeListenerMapper.toAttributeListenerDTO(e.data)))}))}subscribeToSourceEvent(e,t){const r=this.sourceEventBus.subscribe(e,t);this.subscriptionIds.push(r)}stop(){this.subscriptionIds.forEach((e=>this.sourceEventBus.unsubscribe(e)))}}},3635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeCreatedEvent=void 0;const i=r(1291);class AttributeCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeCreatedEvent.namespace,e,t)}}t.AttributeCreatedEvent=AttributeCreatedEvent,AttributeCreatedEvent.namespace="consumption.attributeCreated"},5046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeDeletedEvent=void 0;const i=r(1291);class AttributeDeletedEvent extends i.DataEvent{constructor(e,t){super(AttributeDeletedEvent.namespace,e,t)}}t.AttributeDeletedEvent=AttributeDeletedEvent,AttributeDeletedEvent.namespace="consumption.attributeDeleted"},2593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerCreatedEvent=void 0;const i=r(1291);class AttributeListenerCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerCreatedEvent.namespace,e,t)}}t.AttributeListenerCreatedEvent=AttributeListenerCreatedEvent,AttributeListenerCreatedEvent.namespace="consumption.attributeListenerCreated"},1365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerTriggeredEvent=void 0;const i=r(1291);class AttributeListenerTriggeredEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerTriggeredEvent.namespace,e,t)}}t.AttributeListenerTriggeredEvent=AttributeListenerTriggeredEvent,AttributeListenerTriggeredEvent.namespace="consumption.attributeListenerTriggered"},2314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeSucceededEvent=void 0;const i=r(1291);class AttributeSucceededEvent extends i.DataEvent{constructor(e,t){super(AttributeSucceededEvent.namespace,e,t)}}t.AttributeSucceededEvent=AttributeSucceededEvent,AttributeSucceededEvent.namespace="consumption.attributeSucceded"},9846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeUpdatedEvent=void 0;const i=r(1291);class AttributeUpdatedEvent extends i.DataEvent{constructor(e,t){super(AttributeUpdatedEvent.namespace,e,t)}}t.AttributeUpdatedEvent=AttributeUpdatedEvent,AttributeUpdatedEvent.namespace="consumption.attributeUpdated"},8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestReceivedEvent=void 0;const i=r(1291);class IncomingRequestReceivedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestReceivedEvent.namespace,e,t),t.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestReceivedEvent=IncomingRequestReceivedEvent,IncomingRequestReceivedEvent.namespace="consumption.incomingRequestReceived"},4795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestStatusChangedEvent=void 0;const i=r(1291);class IncomingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestStatusChangedEvent.namespace,e,t),t.request.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestStatusChangedEvent=IncomingRequestStatusChangedEvent,IncomingRequestStatusChangedEvent.namespace="consumption.incomingRequestStatusChanged"},4209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailReceivedEvent=void 0;const i=r(1291);class MailReceivedEvent extends i.DataEvent{constructor(e,t,r){super(MailReceivedEvent.namespace,e,r),this.mail=t}}t.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},6425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageProcessedResult=t.MessageProcessedEvent=void 0;const i=r(1291);class MessageProcessedEvent extends i.DataEvent{constructor(e,t,r){super(MessageProcessedEvent.namespace,e,{message:t,result:r})}}t.MessageProcessedEvent=MessageProcessedEvent,MessageProcessedEvent.namespace="consumption.messageProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NoRequest="NoRequest",e.Error="Error"}(t.MessageProcessedResult||(t.MessageProcessedResult={}))},9260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedEvent=OutgoingRequestCreatedEvent,OutgoingRequestCreatedEvent.namespace="consumption.outgoingRequestCreated"},370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace="consumption.outgoingRequestFromRelationshipCreationChangeCreatedAndCompleted"},5107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestStatusChangedEvent=void 0;const i=r(1291);class OutgoingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestStatusChangedEvent.namespace,e,t),!t.request.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestStatusChangedEvent=OutgoingRequestStatusChangedEvent,OutgoingRequestStatusChangedEvent.namespace="consumption.outgoingRequestStatusChanged"},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipEvent=void 0;const i=r(1291);class RelationshipEvent extends i.DataEvent{constructor(e,t,r){super(RelationshipEvent.namespace+r.id,e,r),this.event=t}}t.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},1908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateProcessedResult=t.RelationshipTemplateProcessedEvent=void 0;const i=r(1291);class RelationshipTemplateProcessedEvent extends i.DataEvent{constructor(e,t,r){if(super(RelationshipTemplateProcessedEvent.namespace,e,{template:t,result:r}),t.isOwn)throw new Error("Cannot create this event for an own Relationship Template.")}}t.RelationshipTemplateProcessedEvent=RelationshipTemplateProcessedEvent,RelationshipTemplateProcessedEvent.namespace="consumption.relationshipTemplateProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NonCompletedRequestExists="NonCompletedRequestExists",e.RelationshipExists="RelationshipExists",e.NoRequest="NoRequest",e.Error="Error"}(t.RelationshipTemplateProcessedResult||(t.RelationshipTemplateProcessedResult={}))},43:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedAttributeCopyCreatedEvent=void 0;const i=r(1291);class SharedAttributeCopyCreatedEvent extends i.DataEvent{constructor(e,t){super(SharedAttributeCopyCreatedEvent.namespace,e,t)}}t.SharedAttributeCopyCreatedEvent=SharedAttributeCopyCreatedEvent,SharedAttributeCopyCreatedEvent.namespace="consumption.sharedAttributeCopyCreated"},2226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3635),t),n(r(5046),t),n(r(2593),t),n(r(1365),t),n(r(2314),t),n(r(9846),t),n(r(8099),t),n(r(4795),t),n(r(4209),t),n(r(6425),t),n(r(9260),t),n(r(370),t),n(r(5107),t),n(r(7834),t),n(r(1908),t),n(r(43),t)},2205:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2226),t),n(r(1291),t),n(r(4696),t),n(r(7747),t)},6762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesInitializedEvent=void 0;const i=r(5172);class ModulesInitializedEvent extends i.Event{constructor(){super(ModulesInitializedEvent.namespace)}}t.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesLoadedEvent=void 0;const i=r(5172);class ModulesLoadedEvent extends i.Event{constructor(){super(ModulesLoadedEvent.namespace)}}t.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesStartedEvent=void 0;const i=r(5172);class ModulesStartedEvent extends i.Event{constructor(){super(ModulesStartedEvent.namespace)}}t.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},7856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializedEvent=void 0;const i=r(5172);class RuntimeInitializedEvent extends i.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}t.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},8061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializingEvent=void 0;const i=r(5172);class RuntimeInitializingEvent extends i.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}t.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},4696:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6762),t),n(r(188),t),n(r(4737),t),n(r(7856),t),n(r(8061),t)},5984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeliveredEvent=void 0;const i=r(1291);class MessageDeliveredEvent extends i.DataEvent{constructor(e,t){super(MessageDeliveredEvent.namespace,e,t)}}t.MessageDeliveredEvent=MessageDeliveredEvent,MessageDeliveredEvent.namespace="transport.messageDelivered"},8994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageReceivedEvent=void 0;const i=r(1291);class MessageReceivedEvent extends i.DataEvent{constructor(e,t){super(MessageReceivedEvent.namespace,e,t)}}t.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSentEvent=void 0;const i=r(1291);class MessageSentEvent extends i.DataEvent{constructor(e,t){super(MessageSentEvent.namespace,e,t)}}t.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},2182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PeerRelationshipTemplateLoadedEvent=void 0;const i=r(1291);class PeerRelationshipTemplateLoadedEvent extends i.DataEvent{constructor(e,t){super(PeerRelationshipTemplateLoadedEvent.namespace,e,t)}}t.PeerRelationshipTemplateLoadedEvent=PeerRelationshipTemplateLoadedEvent,PeerRelationshipTemplateLoadedEvent.namespace="transport.peerRelationshipTemplateLoaded"},1690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangedEvent=void 0;const i=r(1291);class RelationshipChangedEvent extends i.DataEvent{constructor(e,t){super(RelationshipChangedEvent.namespace,e,t)}}t.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},7747:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5984),t),n(r(8994),t),n(r(4769),t),n(r(2182),t),n(r(1690),t)},7371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousServices=void 0;const o=r(7071),a=r(8346);let c=class AnonymousServices{constructor(e){this.tokens=e}};c=i([s(0,o.Inject),n("design:paramtypes",[a.AnonymousTokensFacade])],c),t.AnonymousServices=c},4629:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumptionServices=void 0;const o=r(7071),a=r(6013);let c=class ConsumptionServices{constructor(e,t,r,i,n,s){this.attributes=e,this.drafts=t,this.settings=r,this.incomingRequests=i,this.outgoingRequests=n,this.attributeListeners=s}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.AttributesFacade,a.DraftsFacade,a.SettingsFacade,a.IncomingRequestsFacade,a.OutgoingRequestsFacade,a.AttributeListenersFacade])],c),t.ConsumptionServices=c},4164:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransportServices=void 0;const o=r(7071),a=r(9728);let c=class TransportServices{constructor(e,t,r,i,n,s,o,a){this.files=e,this.messages=t,this.relationships=r,this.relationshipTemplates=i,this.tokens=n,this.account=s,this.devices=o,this.challenges=a}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.FilesFacade,a.MessagesFacade,a.RelationshipsFacade,a.RelationshipTemplatesFacade,a.TokensFacade,a.AccountFacade,a.DevicesFacade,a.ChallengesFacade])],c),t.TransportServices=c},7306:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousTokensFacade=void 0;const o=r(7071),a=r(485);let c=class AnonymousTokensFacade{constructor(e,t){this.loadPeerTokenByTruncatedReferenceUseCase=e,this.loadPeerTokenByIdAndKeyUseCase=t}async loadPeerTokenByTruncatedReference(e){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(e)}async loadPeerTokenByIdAndKey(e){return await this.loadPeerTokenByIdAndKeyUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,a.LoadPeerTokenAnonymousByIdAndKeyUseCase])],c),t.AnonymousTokensFacade=c},8346:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7306),t)},1582:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenersFacade=void 0;const o=r(7071),a=r(485);let c=class AttributeListenersFacade{constructor(e,t){this.getAttributeListenerUseCase=e,this.getAttributeListenersUseCase=t}async getAttributeListener(e){return await this.getAttributeListenerUseCase.execute(e)}async getAttributeListeners(){return await this.getAttributeListenersUseCase.execute()}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.GetAttributeListenerUseCase,a.GetAttributeListenersUseCase])],c),t.AttributeListenersFacade=c},2534:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributesFacade=void 0;const o=r(7071),a=r(485);let c=class AttributesFacade{constructor(e,t,r,i,n,s,o,a,c,u,p,l,d){this.createAttributeUseCase=e,this.createSharedAttributeCopyUseCase=t,this.deleteAttributeUseCase=r,this.getPeerAttributesUseCase=i,this.getSharedToPeerAttributesUseCase=n,this.getAttributeUseCase=s,this.getAttributesUseCase=o,this.succeedAttributeUseCase=a,this.updateAttributeUseCase=c,this.executeIdentityAttributeQueryUseCase=u,this.executeRelationshipAttributeQueryUseCase=p,this.executeThirdPartyRelationshipAttributeQueryUseCase=l,this.shareAttributeUseCase=d}async createAttribute(e){return await this.createAttributeUseCase.execute(e)}async createSharedAttributeCopy(e){return await this.createSharedAttributeCopyUseCase.execute(e)}async deleteAttribute(e){return await this.deleteAttributeUseCase.execute(e)}async getPeerAttributes(e){return await this.getPeerAttributesUseCase.execute(e)}async getSharedToPeerAttributes(e){return await this.getSharedToPeerAttributesUseCase.execute(e)}async getAttribute(e){return await this.getAttributeUseCase.execute(e)}async getAttributes(e){return await this.getAttributesUseCase.execute(e)}async executeIdentityAttributeQuery(e){return await this.executeIdentityAttributeQueryUseCase.execute(e)}async executeRelationshipAttributeQuery(e){return await this.executeRelationshipAttributeQueryUseCase.execute(e)}async executeThirdPartyRelationshipAttributeQuery(e){return await this.executeThirdPartyRelationshipAttributeQueryUseCase.execute(e)}async succeedAttribute(e){return await this.succeedAttributeUseCase.execute(e)}async updateAttribute(e){return await this.updateAttributeUseCase.execute(e)}async shareAttribute(e){return await this.shareAttributeUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),s(10,o.Inject),s(11,o.Inject),s(12,o.Inject),n("design:paramtypes",[a.CreateAttributeUseCase,a.CreateSharedAttributeCopyUseCase,a.DeleteAttributeUseCase,a.GetPeerAttributesUseCase,a.GetSharedToPeerAttributesUseCase,a.GetAttributeUseCase,a.GetAttributesUseCase,a.SucceedAttributeUseCase,a.UpdateAttributeUseCase,a.ExecuteIdentityAttributeQueryUseCase,a.ExecuteRelationshipAttributeQueryUseCase,a.ExecuteThirdPartyRelationshipAttributeQueryUseCase,a.ShareAttributeUseCase])],c),t.AttributesFacade=c},3514:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DraftsFacade=void 0;const o=r(7071),a=r(485);let c=class DraftsFacade{constructor(e,t,r,i,n){this.createDraftUseCase=e,this.deleteDraftUseCase=t,this.getDraftUseCase=r,this.getDraftsUseCase=i,this.updateDraftUseCase=n}async createDraft(e){return await this.createDraftUseCase.execute(e)}async deleteDraft(e){return await this.deleteDraftUseCase.execute(e)}async getDraft(e){return await this.getDraftUseCase.execute(e)}async getDrafts(e){return await this.getDraftsUseCase.execute(e)}async updateDraft(e){return await this.updateDraftUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateDraftUseCase,a.DeleteDraftUseCase,a.GetDraftUseCase,a.GetDraftsUseCase,a.UpdateDraftUseCase])],c),t.DraftsFacade=c},9617:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class IncomingRequestsFacade{constructor(e,t,r,i,n,s,o,a,c,u){this.receivedUseCase=e,this.checkPrerequisitesUseCase=t,this.requireManualDecisionUseCase=r,this.canAcceptUseCase=i,this.acceptUseCase=n,this.canRejectUseCase=s,this.rejectUseCase=o,this.completeUseCase=a,this.getRequestUseCase=c,this.getRequestsUseCase=u}async received(e){return await this.receivedUseCase.execute(e)}async checkPrerequisites(e){return await this.checkPrerequisitesUseCase.execute(e)}async requireManualDecision(e){return await this.requireManualDecisionUseCase.execute(e)}async canAccept(e){return await this.canAcceptUseCase.execute(e)}async accept(e){return await this.acceptUseCase.execute(e)}async canReject(e){return await this.canRejectUseCase.execute(e)}async reject(e){return await this.rejectUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),n("design:paramtypes",[a.ReceivedIncomingRequestUseCase,a.CheckPrerequisitesOfIncomingRequestUseCase,a.RequireManualDecisionOfIncomingRequestUseCase,a.CanAcceptIncomingRequestUseCase,a.AcceptIncomingRequestUseCase,a.CanRejectIncomingRequestUseCase,a.RejectIncomingRequestUseCase,a.CompleteIncomingRequestUseCase,a.GetIncomingRequestUseCase,a.GetIncomingRequestsUseCase])],c),t.IncomingRequestsFacade=c},1881:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class OutgoingRequestsFacade{constructor(e,t,r,i,n,s,o,a){this.canCreateUseCase=e,this.createUseCase=t,this.sentUseCase=r,this.createAndCompleteFromRelationshipCreationChangeUseCase=i,this.completeUseCase=n,this.getRequestUseCase=s,this.getRequestsUseCase=o,this.discardRequestUseCase=a}async canCreate(e){return await this.canCreateUseCase.execute(e)}async create(e){return await this.createUseCase.execute(e)}async createAndCompleteFromRelationshipCreationChange(e){return await this.createAndCompleteFromRelationshipCreationChangeUseCase.execute(e)}async sent(e){return await this.sentUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}async discard(e){return await this.discardRequestUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.CanCreateOutgoingRequestUseCase,a.CreateOutgoingRequestUseCase,a.SentOutgoingRequestUseCase,a.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase,a.CompleteOutgoingRequestUseCase,a.GetOutgoingRequestUseCase,a.GetOutgoingRequestsUseCase,a.DiscardOutgoingRequestUseCase])],c),t.OutgoingRequestsFacade=c},6615:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFacade=void 0;const o=r(7071),a=r(485);let c=class SettingsFacade{constructor(e,t,r,i,n){this.createSettingUseCase=e,this.updateSettingUseCase=t,this.deleteSettingUseCase=r,this.getSettingsUseCase=i,this.getSettingUseCase=n}async createSetting(e){return await this.createSettingUseCase.execute(e)}async getSetting(e){return await this.getSettingUseCase.execute(e)}async getSettings(e){return await this.getSettingsUseCase.execute(e)}async deleteSetting(e){return await this.deleteSettingUseCase.execute(e)}async updateSetting(e){return await this.updateSettingUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateSettingUseCase,a.UpdateSettingUseCase,a.DeleteSettingUseCase,a.GetSettingsUseCase,a.GetSettingUseCase])],c),t.SettingsFacade=c},6013:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1582),t),n(r(2534),t),n(r(3514),t),n(r(9617),t),n(r(1881),t),n(r(6615),t)},941:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFacade=void 0;const o=r(7071),a=r(485);let c=class AccountFacade{constructor(e,t,r,i,n,s,o,a,c){this.getIdentityInfoUseCase=e,this.getDeviceInfoUseCase=t,this.registerPushNotificationTokenUseCase=r,this.syncDatawalletUseCase=i,this.syncEverythingUseCase=n,this.getSyncInfoUseCase=s,this.disableAutoSyncUseCase=o,this.enableAutoSyncUseCase=a,this.loadItemFromTruncatedReferenceUseCase=c}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}async registerPushNotificationToken(e){return await this.registerPushNotificationTokenUseCase.execute(e)}async syncDatawallet(e={}){return await this.syncDatawalletUseCase.execute(e)}async syncEverything(e={}){return await this.syncEverythingUseCase.execute(e)}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}async loadItemFromTruncatedReference(e){return await this.loadItemFromTruncatedReferenceUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),n("design:paramtypes",[a.GetIdentityInfoUseCase,a.GetDeviceInfoUseCase,a.RegisterPushNotificationTokenUseCase,a.SyncDatawalletUseCase,a.SyncEverythingUseCase,a.GetSyncInfoUseCase,a.DisableAutoSyncUseCase,a.EnableAutoSyncUseCase,a.LoadItemFromTruncatedReferenceUseCase])],c),t.AccountFacade=c},4213:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengesFacade=void 0;const o=r(7071),a=r(485);let c=class ChallengesFacade{constructor(e,t){this.createChallengeUseCase=e,this.validateChallengeUseCase=t}async createChallenge(e){return await this.createChallengeUseCase.execute(e)}async validateChallenge(e){return await this.validateChallengeUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.CreateChallengeUseCase,a.ValidateChallengeUseCase])],c),t.ChallengesFacade=c},7974:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicesFacade=void 0;const o=r(7071),a=r(485);let c=class DevicesFacade{constructor(e,t,r,i,n,s,o){this.getDeviceUseCase=e,this.getDevicesUseCase=t,this.createDeviceUseCase=r,this.updateDeviceUseCase=i,this.deleteDeviceUseCase=n,this.getDeviceOnboardingInfoUseCase=s,this.getDeviceOnboardingTokenUseCase=o}async getDevice(e){return await this.getDeviceUseCase.execute(e)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(e){return await this.createDeviceUseCase.execute(e)}async getDeviceOnboardingInfo(e){return await this.getDeviceOnboardingInfoUseCase.execute(e)}async getDeviceOnboardingToken(e){return await this.getDeviceOnboardingTokenUseCase.execute(e)}async updateDevice(e){return await this.updateDeviceUseCase.execute(e)}async deleteDevice(e){return await this.deleteDeviceUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.GetDeviceUseCase,a.GetDevicesUseCase,a.CreateDeviceUseCase,a.UpdateDeviceUseCase,a.DeleteDeviceUseCase,a.GetDeviceOnboardingInfoUseCase,a.CreateDeviceOnboardingTokenUseCase])],c),t.DevicesFacade=c},360:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesFacade=void 0;const o=r(7071),a=r(485);let c=class FilesFacade{constructor(e,t,r,i,n,s,o,a){this.uploadOwnFileUseCase=e,this.getOrLoadFileUseCase=t,this.getFilesUseCase=r,this.downloadFileUseCase=i,this.getFileUseCase=n,this.createQrCodeForFileUseCase=s,this.createTokenForFileUseCase=o,this.createTokenQrCodeForFileUseCase=a}async getFiles(e){return await this.getFilesUseCase.execute(e)}async getOrLoadFile(e){return await this.getOrLoadFileUseCase.execute(e)}async downloadFile(e){return await this.downloadFileUseCase.execute(e)}async getFile(e){return await this.getFileUseCase.execute(e)}async uploadOwnFile(e){return await this.uploadOwnFileUseCase.execute(e)}async createQrCodeForFile(e){return await this.createQrCodeForFileUseCase.execute(e)}async createTokenForFile(e){return await this.createTokenForFileUseCase.execute(e)}async createTokenQrCodeForFile(e){return await this.createTokenQrCodeForFileUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.UploadOwnFileUseCase,a.GetOrLoadFileUseCase,a.GetFilesUseCase,a.DownloadFileUseCase,a.GetFileUseCase,a.CreateQrCodeForFileUseCase,a.CreateTokenForFileUseCase,a.CreateTokenQrCodeForFileUseCase])],c),t.FilesFacade=c},1106:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityFacade=void 0;const o=r(7071),a=r(485);let c=class IdentityFacade{constructor(e){this.checkIdentityUseCase=e}async checkIdentity(e){return await this.checkIdentityUseCase.execute(e)}};c=i([s(0,o.Inject),n("design:paramtypes",[a.CheckIdentityUseCase])],c),t.IdentityFacade=c},1532:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessagesFacade=void 0;const o=r(7071),a=r(485);let c=class MessagesFacade{constructor(e,t,r,i,n){this.getMessagesUseCase=e,this.getMessageUseCase=t,this.sendMessageUseCase=r,this.downloadAttachmentUseCase=i,this.getAttachmentMetadataUseCase=n}async sendMessage(e){return await this.sendMessageUseCase.execute(e)}async getMessages(e){return await this.getMessagesUseCase.execute(e)}async getMessage(e){return await this.getMessageUseCase.execute(e)}async downloadAttachment(e){return await this.downloadAttachmentUseCase.execute(e)}async getAttachmentMetadata(e){return await this.getAttachmentMetadataUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.GetMessagesUseCase,a.GetMessageUseCase,a.SendMessageUseCase,a.DownloadAttachmentUseCase,a.GetAttachmentMetadataUseCase])],c),t.MessagesFacade=c},7349:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplatesFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipTemplatesFacade{constructor(e,t,r,i,n,s,o){this.createOwnRelationshipTemplateUseCase=e,this.loadPeerRelationshipTemplateUseCase=t,this.getRelationshipTemplatesUseCase=r,this.getRelationshipTemplateUseCase=i,this.createQrCodeForOwnTemplateUseCase=n,this.createTokenQrCodeForOwnTemplateUseCase=s,this.createTokenForOwnTemplateUseCase=o}async createOwnRelationshipTemplate(e){return await this.createOwnRelationshipTemplateUseCase.execute(e)}async loadPeerRelationshipTemplate(e){return await this.loadPeerRelationshipTemplateUseCase.execute(e)}async getRelationshipTemplates(e){return await this.getRelationshipTemplatesUseCase.execute(e)}async getRelationshipTemplate(e){return await this.getRelationshipTemplateUseCase.execute(e)}async createQrCodeForOwnTemplate(e){return await this.createQrCodeForOwnTemplateUseCase.execute(e)}async createTokenQrCodeForOwnTemplate(e){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(e)}async createTokenForOwnTemplate(e){return await this.createTokenForOwnTemplateUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.CreateOwnRelationshipTemplateUseCase,a.LoadPeerRelationshipTemplateUseCase,a.GetRelationshipTemplatesUseCase,a.GetRelationshipTemplateUseCase,a.CreateQrCodeForOwnTemplateUseCase,a.CreateTokenQrCodeForOwnTemplateUseCase,a.CreateTokenForOwnTemplateUseCase])],c),t.RelationshipTemplatesFacade=c},8586:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipsFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipsFacade{constructor(e,t,r,i,n,s,o,a){this.getRelationshipsUseCase=e,this.getRelationshipUseCase=t,this.getRelationshipByAddressUseCase=r,this.createRelationshipUseCase=i,this.acceptRelationshipChangeUseCase=n,this.rejectRelationshipChangeUseCase=s,this.revokeRelationshipChangeUseCase=o,this.getAttributesForRelationshipUseCase=a}async getRelationships(e){return await this.getRelationshipsUseCase.execute(e)}async getRelationship(e){return await this.getRelationshipUseCase.execute(e)}async getRelationshipByAddress(e){return await this.getRelationshipByAddressUseCase.execute(e)}async createRelationship(e){return await this.createRelationshipUseCase.execute(e)}async acceptRelationshipChange(e){return await this.acceptRelationshipChangeUseCase.execute(e)}async rejectRelationshipChange(e){return await this.rejectRelationshipChangeUseCase.execute(e)}async revokeRelationshipChange(e){return await this.revokeRelationshipChangeUseCase.execute(e)}async getAttributesForRelationship(e){return await this.getAttributesForRelationshipUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.GetRelationshipsUseCase,a.GetRelationshipUseCase,a.GetRelationshipByAddressUseCase,a.CreateRelationshipUseCase,a.AcceptRelationshipChangeUseCase,a.RejectRelationshipChangeUseCase,a.RevokeRelationshipChangeUseCase,a.GetAttributesForRelationshipUseCase])],c),t.RelationshipsFacade=c},5392:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensFacade=void 0;const o=r(7071),a=r(485);let c=class TokensFacade{constructor(e,t,r,i,n){this.createOwnTokenUseCase=e,this.loadPeerTokenUseCase=t,this.getTokensUseCase=r,this.getTokenUseCase=i,this.getQRCodeForTokenUseCase=n}async createOwnToken(e){return await this.createOwnTokenUseCase.execute(e)}async loadPeerToken(e){return await this.loadPeerTokenUseCase.execute(e)}async getTokens(e){return await this.getTokensUseCase.execute(e)}async getToken(e){return await this.getTokenUseCase.execute(e)}async getQRCodeForToken(e){return await this.getQRCodeForTokenUseCase.execute(e)}};c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateOwnTokenUseCase,a.LoadPeerTokenUseCase,a.GetTokensUseCase,a.GetTokenUseCase,a.GetQRCodeForTokenUseCase])],c),t.TokensFacade=c},9728:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(941),t),n(r(4213),t),n(r(7974),t),n(r(360),t),n(r(1106),t),n(r(1532),t),n(r(8586),t),n(r(7349),t),n(r(5392),t)},5200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7371),t),n(r(4629),t),n(r(2432),t),n(r(5372),t),n(r(4164),t)},2432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeModule=void 0;t.RuntimeModule=class RuntimeModule{constructor(e,t,r){this.runtime=e,this.configuration=t,this.logger=r,this.subscriptionIds=[]}get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}subscribeToEvent(e,t){const r=this.runtime.eventBus.subscribe(e,t);this.subscriptionIds.push(r)}unsubscribeFromAllEvents(){this.subscriptionIds.forEach((e=>this.runtime.eventBus.unsubscribe(e))),this.subscriptionIds.splice(0)}}},5372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesIterator=t.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(e){return this.modules.find((t=>t.name.toLowerCase()===e.toLowerCase()))}add(e){this.modules.push(e)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}t.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(e){this.items=e,this.currentIndex=0}next(e){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}t.ModulesIterator=ModulesIterator},5590:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2500),t),n(r(4086),t),n(r(2205),t),n(r(5200),t),n(r(9662),t),n(r(6984),t),n(r(9757),t),n(r(986),t),n(r(3377),t),n(r(485),t)},8518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerModule=void 0;const i=r(5030),n=r(2205),s=r(5200);class AttributeListenerModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.AttributeCreatedEvent,this.handleAttributeCreated.bind(this))}async handleAttributeCreated(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data;if("IdentityAttribute"===r.content["@type"]&&r.shareInfo)return;if("RelationshipAttribute"===r.content["@type"]&&r.content.confidentiality===i.RelationshipAttributeConfidentiality.Private)return;const n=await t.consumptionServices.attributeListeners.getAttributeListeners();if(n.isError)return void this.logger.error("Could not get attribute listeners",n.error);const s=n.value.map((r=>this.createRequestIfAttributeMatchesQuery(t,r,e.data,e.eventTargetAddress)));await Promise.all(s)}async createRequestIfAttributeMatchesQuery(e,t,r,i){if(!await this.doesAttributeMatchQuery(e,t,r))return;const s={"@type":"ShareAttributeRequestItem",attribute:{...r.content,owner:i},sourceAttributeId:r.id,mustBeAccepted:!0,metadata:{attributeListenerId:t.id}},o=await e.consumptionServices.outgoingRequests.create({content:{items:[s]},peer:t.peer});o.isError?this.logger.error("Could not create request",o.error):this.runtime.eventBus.publish(new n.AttributeListenerTriggeredEvent(i,{attributeListener:t,attribute:r,request:o.value}))}async doesAttributeMatchQuery(e,t,r){const i=t.query;switch(i["@type"]){case"IdentityAttributeQuery":{if("IdentityAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeIdentityAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute IdentityAttributeQuery",t.error),!1):!!t.value.find((e=>e.id===r.id))}case"ThirdPartyRelationshipAttributeQuery":{if("RelationshipAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeThirdPartyRelationshipAttributeQuery({query:i});return t.isError?("error.runtime.recordNotFound"!==t.error.code&&this.logger.error("Could not execute ThirdPartyRelationshipAttributeQuery",t.error),!1):t.value.id===r.id}}}stop(){this.unsubscribeFromAllEvents()}}t.AttributeListenerModule=AttributeListenerModule},4777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeciderModule=void 0;const i=r(3850),n=r(2205),s=r(5200);class DeciderModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this))}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus===i.LocalRequestStatus.DecisionRequired)return e.data.request.content.items.some(flaggedAsManualDecisionRequired),await this.requireManualDecision(e)}async requireManualDecision(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress),i=await r.consumptionServices.incomingRequests.requireManualDecision({requestId:t.id});if(i.isError)return this.logger.error(`Could not require manual decision for request ${t.id}`,i.error),void await this.publishEvent(e,r,"Error");await this.publishEvent(e,r,"ManualRequestDecisionRequired")}async publishEvent(e,t,r){const i=e.data.request;switch(i.source.type){case"RelationshipTemplate":const s=(await t.transportServices.relationshipTemplates.getRelationshipTemplate({id:i.source.reference})).value;this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,s,r));break;case"Message":const o=await t.transportServices.messages.getMessage({id:i.source.reference}),a={...o.value,attachments:o.value.attachments.map((e=>e.id))};this.runtime.eventBus.publish(new n.MessageProcessedEvent(e.eventTargetAddress,a,r))}}stop(){this.unsubscribeFromAllEvents()}}function flaggedAsManualDecisionRequired(e){return e.requireManualDecision??e.items?.some((e=>e.requireManualDecision))}t.DeciderModule=DeciderModule},6432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageModule=void 0;const i=r(5030),n=r(2205),s=r(2432);class MessageModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.MessageReceivedEvent,this.handleMessageReceived.bind(this))}async handleMessageReceived(e){const t=e.data;this.logger.trace(`Incoming MessageReceivedEvent for ${t.id}`);let r;if("Mail"!==t.content["@type"])return;{const s=i.Mail.from(t.content);r=new n.MailReceivedEvent(e.eventTargetAddress,s,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published MailReceivedEvent for ${t.id}`)}const s=await this.runtime.getServices(e.eventTargetAddress),o=await s.transportServices.relationships.getRelationshipByAddress({address:t.createdBy});if(!o.isSuccess)return void this.logger.error(`Could not find relationship for address '${t.createdBy}'.`,o.error);const a=o.value;this.runtime.eventBus.publish(new n.RelationshipEvent(e.eventTargetAddress,r,a)),this.logger.trace(`Published RelationshipEvent for ${t.id} to ${a.id}`)}stop(){this.unsubscribeFromAllEvents()}}t.MessageModule=MessageModule},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModule=void 0;const i=r(3850),n=r(5030),s=r(2205),o=r(1908),a=r(2432),c=r(3377);class RequestModule extends a.RuntimeModule{init(){}start(){this.subscribeToEvent(s.PeerRelationshipTemplateLoadedEvent,this.handlePeerRelationshipTemplateLoaded.bind(this)),this.subscribeToEvent(s.MessageReceivedEvent,this.handleMessageReceivedEvent.bind(this)),this.subscribeToEvent(s.MessageSentEvent,this.handleMessageSentEvent.bind(this)),this.subscribeToEvent(s.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this)),this.subscribeToEvent(s.RelationshipChangedEvent,this.handleRelationshipChangedEvent.bind(this))}async handlePeerRelationshipTemplateLoaded(e){const t=e.data;if("RelationshipTemplateContent"!==t.content["@type"])return void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.NoRequest));const r=t.content,n=await this.runtime.getServices(e.eventTargetAddress);if((await n.consumptionServices.incomingRequests.getRequests({query:{"source.reference":t.id}})).value.some((e=>e.status!==i.LocalRequestStatus.Completed)))return this.logger.info(`There is already an open Request for the RelationshipTemplate '${t.id}'.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.NonCompletedRequestExists));const s=(await n.transportServices.relationships.getRelationships({query:{peer:t.createdBy}})).value;if(s.some((e=>e.status===c.RelationshipStatus.Pending)))return this.logger.info(`There is already a pending Relationship for the RelationshipTemplate '${t.id}'. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.RelationshipExists));if(s.some((e=>e.status===c.RelationshipStatus.Active))){if(r.onExistingRelationship){return void(await this.createIncomingRequest(n,r.onExistingRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.Error)))}return this.logger.info(`There is already an open Relationship for the RelationshipTemplate '${t.id}' and onExistingRelationship is not defined. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.RelationshipExists))}await this.createIncomingRequest(n,r.onNewRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,t,o.RelationshipTemplateProcessedResult.Error))}async handleMessageReceivedEvent(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data,i=r.content["@type"];switch(i){case"Request":await this.createIncomingRequest(t,r.content,r.id);break;case"Response":const e=r.content,i=await t.consumptionServices.outgoingRequests.complete({receivedResponse:e,messageId:r.id});i.isError&&this.logger.error(`Could not complete outgoing request for message id ${r.id} due to ${i.error}. Root error:`,i.error)}"Request"!==i&&this.runtime.eventBus.publish(new s.MessageProcessedEvent(e.eventTargetAddress,r,s.MessageProcessedResult.NoRequest))}async handleMessageSentEvent(e){const t=e.data;if("Request"!==t.content["@type"])return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.content,n=await r.consumptionServices.outgoingRequests.sent({requestId:i.id,messageId:t.id});n.isError&&this.logger.error(`Could not mark request '${i.id}' as sent using message '${t.id}'. Root error:`,n.error)}async createIncomingRequest(e,t,r){const i=await e.consumptionServices.incomingRequests.received({receivedRequest:t,requestSourceId:r});if(i.isError)return this.logger.error(`Could not receive request ${t.id}. Root error:`,i.error),!1;const n=await e.consumptionServices.incomingRequests.checkPrerequisites({requestId:i.value.id});return!n.isError||(this.logger.error(`Could not check prerequisites for request ${t.id}. Root error:`,n.error),!1)}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus!==i.LocalRequestStatus.Decided)return;const t=e.data.request;switch(t.source.type){case"RelationshipTemplate":await this.handleIncomingRequestDecidedForRelationship(e);break;case"Message":await this.handleIncomingRequestDecidedForMessage(e);break;default:throw new Error(`Cannot handle source.type '${t.source.type}'.`)}}async handleIncomingRequestDecidedForRelationship(e){const t=e.data.request,r=t.source.reference,i=await this.runtime.getServices(e.eventTargetAddress);if(t.response.content.result===n.ResponseResult.Rejected)return void await i.consumptionServices.incomingRequests.complete({requestId:t.id});const s=n.RelationshipCreationChangeRequestContent.from({response:t.response.content}),o=await i.transportServices.relationships.createRelationship({templateId:r,content:s});if(o.isError)return void this.logger.error(`Could not create relationship for templateId '${r}'. Root error:`,o.error);const a=t.id,c=await i.consumptionServices.incomingRequests.complete({requestId:a,responseSourceId:o.value.changes[0].id});c.isError&&this.logger.error(`Could not complete the request '${a}'. Root error:`,c.error)}async handleIncomingRequestDecidedForMessage(e){const t=e.data.request,r=t.id,i=await this.runtime.getServices(e.eventTargetAddress),n=await i.transportServices.messages.sendMessage({recipients:[t.peer],content:t.response.content});if(n.isError)return void this.logger.error(`Could not send message to answer the request '${r}'.`,n.error);const s=await i.consumptionServices.incomingRequests.complete({requestId:r,responseSourceId:n.value.id});s.isError&&this.logger.error(`Could not complete the request '${r}'. Root error:`,s.error)}async handleRelationshipChangedEvent(e){const t=e.data;if(t.status!==c.RelationshipStatus.Pending||!t.template.isOwn)return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.template,n=i.id;if("RelationshipTemplateContent"!==i.content["@type"])return;const s=t.changes[0],o=s.id;if("RelationshipCreationChangeRequestContent"!==s.request.content["@type"])return;const a=await r.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipCreationChange({templateId:n,relationshipChangeId:o});a.isError&&this.logger.error(`Could not create and complete request for templateId '${n}' and changeId '${o}'. Root error:`,a.error)}stop(){this.unsubscribeFromAllEvents()}}t.RequestModule=RequestModule},9662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8518),t),n(r(4777),t),n(r(6432),t),n(r(7570),t)},5953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7946:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5292),t),n(r(2693),t),n(r(7118),t),n(r(8678),t),n(r(9371),t),n(r(7564),t)},3377:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7946),t),n(r(5953),t),n(r(450),t)},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangeType=t.RelationshipChangeStatus=void 0,function(e){e.Pending="Pending",e.Rejected="Rejected",e.Revoked="Revoked",e.Accepted="Accepted"}(t.RelationshipChangeStatus||(t.RelationshipChangeStatus={})),function(e){e.Creation="Creation",e.Termination="Termination",e.TerminationCancellation="TerminationCancellation"}(t.RelationshipChangeType||(t.RelationshipChangeType={}))},2220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipStatus=void 0,function(e){e.Pending="Pending",e.Active="Active",e.Rejected="Rejected",e.Revoked="Revoked",e.Terminating="Terminating",e.Terminated="Terminated"}(t.RelationshipStatus||(t.RelationshipStatus={}))},6081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},450:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3456),t),n(r(7891),t),n(r(9475),t),n(r(3462),t),n(r(6261),t),n(r(6623),t),n(r(641),t),n(r(5968),t),n(r(2944),t),n(r(2220),t),n(r(6081),t),n(r(4561),t)},9365:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7771),t)},807:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByIdAndKeyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends p.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=a.CryptoSecretKey.fromBase64(e.secretKey),r=await this.anonymousTokenController.loadPeerToken(c.CoreId.from(e.id),t);return o.Result.ok(l.TokenMapper.toTokenDTO(r,!0))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[c.AnonymousTokenController,d])],f),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f},6297:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByTruncatedReferenceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends u.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await this.anonymousTokenController.loadPeerTokenByTruncated(e.reference);return o.Result.ok(p.TokenMapper.toTokenDTO(t,!0))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AnonymousTokenController,l])],d),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d},7771:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(807),t),n(r(6297),t)},2627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base64ForIdPrefix=void 0,function(e){e.RelationshipTemplate="UkxU",e.Token="VE9L",e.File="RklM"}(t.Base64ForIdPrefix||(t.Base64ForIdPrefix={}))},6819:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OwnerRestriction=void 0,function(e){e.Own="o",e.Peer="p"}(t.OwnerRestriction||(t.OwnerRestriction={}))},8728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(e){return e.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(e){return e.code.startsWith("error.platform.validation")}static isUnexpectedError(e){return e.code.startsWith("error.platform.validation")}}t.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},3832:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const o=s(r(2592));class QRCode{constructor(e){this.base64=e}asBase64(){return this.base64}static async from(e,t){const r=(await o.toDataURL(`nmshd://${t}#${e}`)).split(",")[1];return new QRCode(r)}static async forTruncateable(e){return await this.from(e.truncate(),"tr")}}t.QRCode=QRCode},6595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeErrors=void 0;const i=r(5172),n=r(2627);class RuntimeErrors{}t.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(e,t){return new i.ApplicationError("error.runtime.unknown",e,t)}alreadyInitialized(){return new i.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new i.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new i.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new i.ApplicationError("error.runtime.notStarted","The runtime is not started. You can only stop the runtime if you executed start before.")}recordNotFound(e){return this.recordNotFoundWithMessage(`${e instanceof Function?e.name:e} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(e){return new i.ApplicationError("error.runtime.recordNotFound",e)}invalidPropertyValue(e){return new i.ApplicationError("error.runtime.validation.invalidPropertyValue",e)}invalidPayload(e){return new i.ApplicationError("error.runtime.validation.invalidPayload",e??"The given combination of properties in the payload is not supported.")}notSupported(e){return new i.ApplicationError("error.runtime.notSupported",e)}invalidTokenContent(){return new i.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(e,t){return new i.ApplicationError("error.runtime.cacheEmpty",`The cache of ${e instanceof Function?e.name:e} with id '${t}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(e){return new i.ApplicationError("error.runtime.unknownType",e)}general(e){return new i.ApplicationError("error.runtime.servalError",e)}requestDeserialization(e){return new i.ApplicationError("error.runtime.requestDeserialization",e)}},RuntimeErrors.startup=new class Startup{noActiveAccount(){return new i.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new i.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new i.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}},RuntimeErrors.files=new class Files{invalidReference(e){return new i.ApplicationError("error.runtime.files.invalidReference",`The given reference '${e}' is not valid. The reference for a file must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.File}'.`)}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}cannotCreateQRCodeForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateQRCodeForPeerTemplate","You cannot create a QRCode for a peer template.")}invalidReference(e){return new i.ApplicationError("error.runtime.relationshipTemplates.invalidReference",`The given reference '${e}' is not valid. The reference for a relationship template must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.RelationshipTemplate}'.`)}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(e){return new i.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${e}' was not found in the given message.`)}},RuntimeErrors.challenges=new class Challenges{invalidSignature(){return new i.ApplicationError("error.runtime.challenges.invalidSignature","The signature is invalid.")}invalidChallengeString(){return new i.ApplicationError("error.runtime.challenges.invalidChallenge","The challengeString is invalid.")}}},2746:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema=t.SchemaRepository=void 0;const a=o(r(1581)),c=o(r(3351)),u=o(r(5477));t.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new a.default({allErrors:!0,allowUnionTypes:!0}),(0,u.default)(this.compiler),(0,c.default)(this.compiler)}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>s(r(1873))))}getSchema(e){return this.jsonSchemas.has(e)||this.jsonSchemas.set(e,new JsonSchema(this.getValidationFunction(e))),this.jsonSchemas.get(e)}getValidationFunction(e){return this.compiler.compile(this.getSchemaDefinition(e))}getSchemaDefinition(e){const t=this.schemaDefinitions[e];if(!t)throw new Error(`Schema ${e} not found`);return t}};class JsonSchema{constructor(e){this.validateSchema=e}validate(e){return{isValid:this.validateSchema(e),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}t.JsonSchema=JsonSchema},1873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreateIdentityChallengeRequest=t.CreateRelationshipChallengeRequest=t.SyncEverythingRequest=t.DownloadAttachmentRequest=t.SyncDatawalletRequest=t.RegisterPushNotificationTokenRequest=t.LoadItemFromTruncatedReferenceRequest=t.DownloadFileRequest=t.UpdateSettingRequest=t.GetSettingsRequest=t.GetSettingRequest=t.DeleteSettingRequest=t.CreateSettingRequest=t.UpdateDraftRequest=t.GetDraftsRequest=t.GetDraftRequest=t.DeleteDraftRequest=t.CreateDraftRequest=t.UpdateAttributeRequest=t.SucceedAttributeRequest=t.ShareAttributeRequest=t.SentOutgoingRequestRequest=t.RequireManualDecisionOfIncomingRequestRequest=t.ReceivedIncomingRequestRequest=t.GetOutgoingRequestsRequest=t.GetOutgoingRequestRequest=t.GetIncomingRequestsRequest=t.GetIncomingRequestRequest=t.DiscardOutgoingRequestRequest=t.CreateOutgoingRequestRequest=t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest=t.CompleteOutgoingRequestRequest=t.CompleteIncomingRequestRequest=t.CheckPrerequisitesOfIncomingRequestRequest=t.RejectIncomingRequestRequest=t.CanCreateOutgoingRequestRequest=t.AcceptIncomingRequestRequest=t.GetSharedToPeerAttributesRequest=t.GetPeerAttributesRequest=t.GetAttributesRequest=t.GetAttributeRequest=t.ExecuteThirdPartyRelationshipAttributeQueryRequest=t.ExecuteRelationshipAttributeQueryRequest=t.ExecuteIdentityAttributeQueryRequest=t.DeleteAttributeRequest=t.CreateSharedAttributeCopyRequest=t.CreateAttributeRequest=t.GetAttributeListenerRequest=t.LoadPeerTokenAnonymousByTruncatedReferenceRequest=t.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,t.LoadPeerTokenRequest=t.LoadPeerTokenViaSecretRequest=t.LoadPeerTokenViaReferenceRequest=t.GetTokensRequest=t.GetTokenRequest=t.GetQRCodeForTokenRequest=t.CreateOwnTokenRequest=t.LoadPeerRelationshipTemplateRequest=t.LoadPeerRelationshipTemplateViaReferenceRequest=t.LoadPeerRelationshipTemplateViaSecretRequest=t.GetRelationshipTemplatesRequest=t.GetRelationshipTemplateRequest=t.CreateTokenQrCodeForOwnTemplateRequest=t.CreateTokenForOwnTemplateRequest=t.CreateQrCodeForOwnTemplateRequest=t.CreateOwnRelationshipTemplateRequest=t.RevokeRelationshipChangeRequest=t.RejectRelationshipChangeRequest=t.GetRelationshipsRequest=t.GetRelationshipByAddressRequest=t.GetRelationshipRequest=t.GetAttributesForRelationshipRequest=t.CreateRelationshipRequest=t.AcceptRelationshipChangeRequest=t.SendMessageRequest=t.GetMessagesRequest=t.GetMessageRequest=t.GetAttachmentMetadataRequest=t.CheckIdentityRequest=t.UploadOwnFileValidatableRequest=t.UploadOwnFileRequest=t.GetOrLoadFileRequest=t.GetOrLoadFileViaReferenceRequest=t.GetOrLoadFileViaSecretRequest=t.GetFilesRequest=t.GetFileRequest=t.CreateTokenQrCodeForFileRequest=t.CreateTokenForFileRequest=t.CreateQrCodeForFileRequest=t.UpdateDeviceRequest=t.GetDeviceOnboardingInfoRequest=t.GetDeviceRequest=t.DeleteDeviceRequest=t.CreateDeviceOnboardingTokenRequest=t.CreateDeviceRequest=t.ValidateChallengeRequest=t.CreateChallengeRequest=t.CreateDeviceChallengeRequest=void 0,t.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.GetAttributeListenerRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeListenerRequest",definitions:{GetAttributeListenerRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeListenerIdString"}},required:["id"],additionalProperties:!1},AttributeListenerIdString:{type:"string",pattern:"ATL[A-Za-z0-9]{17}"}}},t.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["content"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateSharedAttributeCopyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedAttributeCopyRequest",definitions:{CreateSharedAttributeCopyRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestReference:{$ref:"#/definitions/RequestIdString"}},required:["attributeId","peer","requestReference"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.ExecuteIdentityAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIdentityAttributeQueryRequest",definitions:{ExecuteIdentityAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIdentityAttributeQuery"},{$ref:"#/definitions/IdentityAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IIdentityAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1}}},t.ExecuteRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteRelationshipAttributeQueryRequest",definitions:{ExecuteRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IRelationshipAttributeQuery"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IRelationshipAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},attributeCreationHints:{$ref:"#/definitions/IRelationshipAttributeCreationHints"}},required:["key","owner","attributeCreationHints"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},IRelationshipAttributeCreationHints:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/IValueHints"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","Consent"]},IValueHints:{type:"object",properties:{editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/IValueHintsValue"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/IValueHints"}}},additionalProperties:!1},IValueHintsValue:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1}}},t.ExecuteThirdPartyRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteThirdPartyRelationshipAttributeQueryRequest",definitions:{ExecuteThirdPartyRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IThirdPartyRelationshipAttributeQuery"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IThirdPartyRelationshipAttributeQuery:{type:"object",properties:{validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"},key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},thirdParty:{$ref:"#/definitions/ICoreAddress"}},required:["key","owner","thirdParty"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1}}},t.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetAttributesRequestQuery"},onlyValid:{type:"boolean"}},additionalProperties:!1},GetAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},parentId:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.owner":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeeds:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeededBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.peer":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetPeerAttributesRequest",definitions:{GetPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetPeerAttributesRequestQuery"}},required:["peer"],additionalProperties:!1},GetPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetSharedToPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedToPeerAttributesRequest",definitions:{GetSharedToPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetSharedToPeerAttributesRequestQuery"}},required:["peer"],additionalProperties:!1},GetSharedToPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.AcceptIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptIncomingRequestRequest",definitions:{AcceptIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CanCreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CanCreateOutgoingRequestRequest",definitions:{CanCreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.RejectIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectIncomingRequestRequest",definitions:{RejectIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CheckPrerequisitesOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckPrerequisitesOfIncomingRequestRequest",definitions:{CheckPrerequisitesOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.CompleteIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteIncomingRequestRequest",definitions:{CompleteIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipChangeIdString"}]}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CompleteOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteOutgoingRequestRequest",definitions:{CompleteOutgoingRequestRequest:{type:"object",properties:{receivedResponse:{$ref:"#/definitions/ResponseJSON"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["receivedResponse","messageId"],additionalProperties:!1},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest",definitions:{CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},relationshipChangeId:{$ref:"#/definitions/RelationshipChangeIdString"}},required:["templateId","relationshipChangeId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOutgoingRequestRequest",definitions:{CreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content","peer"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.DiscardOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DiscardOutgoingRequestRequest",definitions:{DiscardOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestRequest",definitions:{GetIncomingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestsRequest",definitions:{GetIncomingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetIncomingRequestsRequestQuery"}},additionalProperties:!1},GetIncomingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestRequest",definitions:{GetOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetOutgoingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestsRequest",definitions:{GetOutgoingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetOutgoingRequestsRequestQuery"}},additionalProperties:!1},GetOutgoingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.ReceivedIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ReceivedIncomingRequestRequest",definitions:{ReceivedIncomingRequestRequest:{type:"object",properties:{receivedRequest:{$ref:"#/definitions/RequestJSON"},requestSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipTemplateIdString"}]}},required:["receivedRequest","requestSourceId"],additionalProperties:!1},RequestJSON:{type:"object",properties:{"@type":{type:"string",const:"Request"},"@context":{type:"string"},"@version":{type:"string"},id:{type:"string"},expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."}},required:["@type","items"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","FileReference","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","State","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","Consent"]},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.RequireManualDecisionOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RequireManualDecisionOfIncomingRequestRequest",definitions:{RequireManualDecisionOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.SentOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SentOutgoingRequestRequest",definitions:{SentOutgoingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["requestId","messageId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.ShareAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ShareAttributeRequest",definitions:{ShareAttributeRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestTitle:{type:"string"},requestDescription:{type:"string"},requestMetadata:{},requestItemTitle:{type:"string"},requestItemDescription:{type:"string"}},required:["attributeId","peer"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{successorContent:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},succeeds:{$ref:"#/definitions/AttributeIdString"}},required:["successorContent","succeeds"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"},content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["id","content"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/FileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"FileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},t.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetDraftsQuery"}},additionalProperties:!1},GetDraftsQuery:{type:"object",properties:{type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},lastModifiedAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"},content:{}},required:["id","content"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{$ref:"#/definitions/GenericIdString"},scope:{type:"string",enum:["Identity","Device","Relationship"]},succeedsAt:{$ref:"#/definitions/ISO8601DateTimeString"},succeedsItem:{$ref:"#/definitions/LocalSettingIdString"}},required:["key","value"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetSettingsQuery"}},additionalProperties:!1},GetSettingsQuery:{type:"object",properties:{key:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},scope:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},reference:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsItem:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"},value:{}},required:["id","value"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.LoadItemFromTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadItemFromTruncatedReferenceRequest",definitions:{LoadItemFromTruncatedReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},installationId:{type:"string"},platform:{type:"string"}},required:["handle","installationId","platform"],additionalProperties:!1}}},t.SyncDatawalletRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncDatawalletRequest",definitions:{SyncDatawalletRequest:{type:"object",additionalProperties:!1}}},t.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.SyncEverythingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncEverythingRequest",definitions:{SyncEverythingRequest:{type:"object",additionalProperties:!1}}},t.CreateRelationshipChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChallengeRequest",definitions:{CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.CreateIdentityChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateIdentityChallengeRequest",definitions:{CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1}}},t.CreateDeviceChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceChallengeRequest",definitions:{CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.CreateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateChallengeRequest",definitions:{CreateChallengeRequest:{anyOf:[{$ref:"#/definitions/CreateRelationshipChallengeRequest"},{$ref:"#/definitions/CreateIdentityChallengeRequest"},{$ref:"#/definitions/CreateDeviceChallengeRequest"}]},CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1},CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.ValidateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateChallengeRequest",definitions:{ValidateChallengeRequest:{type:"object",properties:{challengeString:{type:"string"},signature:{type:"string"}},required:["challengeString","signature"],additionalProperties:!1}}},t.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},t.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{$ref:"#/definitions/GenericIdString"}},required:["id"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"}}},t.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.CreateQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForFileRequest",definitions:{CreateQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetFilesQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetFilesQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},description:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filename:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filesize:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},mimetype:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},title:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},isOwn:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.GetOrLoadFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaSecretRequest",definitions:{GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetOrLoadFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaReferenceRequest",definitions:{GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.GetOrLoadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileRequest",definitions:{GetOrLoadFileRequest:{anyOf:[{$ref:"#/definitions/GetOrLoadFileViaSecretRequest"},{$ref:"#/definitions/GetOrLoadFileViaReferenceRequest"}]},GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.UploadOwnFileValidatableRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileValidatableRequest",definitions:{UploadOwnFileValidatableRequest:{type:"object",properties:{filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"},content:{type:"object"}},required:["content","expiresAt","filename","mimetype","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"}},required:["id"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{$ref:"#/definitions/AddressString"},minItems:1},content:{},attachments:{type:"array",items:{$ref:"#/definitions/FileIdString"}}},required:["recipients","content"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},content:{}},required:["templateId","content"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetAttributesForRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesForRelationshipRequest",definitions:{GetAttributesForRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetRelationshipsQuery"}},additionalProperties:!1},GetRelationshipsQuery:{type:"object",properties:{peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"template.id":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},content:{},maxNumberOfAllocations:{type:"number",minimum:1}},required:["expiresAt","content"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForOwnTemplateRequest",definitions:{CreateQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["id"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerRelationshipTemplateViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest",definitions:{LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.LoadPeerRelationshipTemplateViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest",definitions:{LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{anyOf:[{$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest"},{$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest"}]},LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetTokensQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetTokensQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerTokenViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaReferenceRequest",definitions:{LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.LoadPeerTokenViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaSecretRequest",definitions:{LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{anyOf:[{$ref:"#/definitions/LoadPeerTokenViaReferenceRequest"},{$ref:"#/definitions/LoadPeerTokenViaSecretRequest"}]},LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}}},5420:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UseCase=void 0;const n=r(194),s=r(5172),o=r(9663),a=i(r(4530)),c=r(8728),u=r(6595);t.UseCase=class UseCase{constructor(e){this.requestValidator=e}async execute(e){if(this.requestValidator){const t=await this.requestValidator.validate(e);if(t.isInvalid())return this.validationFailed(t)}try{return await this.executeInternal(e)}catch(e){return this.failingResultFromUnknownError(e)}}failingResultFromUnknownError(e){return e instanceof Error?e instanceof o.RequestError?this.handleRequestError(e):e instanceof n.ServalError?this.handleServalError(e):e instanceof s.ApplicationError?s.Result.fail(e):e instanceof o.CoreError?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(u.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${e.message}`,e)):s.Result.fail(u.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,a.default)(e)}`,e))}handleServalError(e){let t;return t=e instanceof n.ParsingError||e instanceof n.ValidationError?u.RuntimeErrors.serval.requestDeserialization(e.message):e.message.match(/Type '.+' with version [0-9]+ was not found within reflection classes. You might have to install a module first./)?u.RuntimeErrors.serval.unknownType(e.message):u.RuntimeErrors.serval.general(e.message),t.stack=e.stack,s.Result.fail(t)}handleRequestError(e){return c.PlatformErrorCodes.isNotFoundError(e)?s.Result.fail(u.RuntimeErrors.general.recordNotFoundWithMessage(e.reason)):c.PlatformErrorCodes.isValidationError(e)||c.PlatformErrorCodes.isUnexpectedError(e)?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(e)}validationFailed(e){const t=e.getFailures()[0];return s.Result.fail(t.error)}}},7049:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2627),t),n(r(6819),t),n(r(3832),t),n(r(6595),t),n(r(2746),t),n(r(5420),t),n(r(3800),t),n(r(7674),t),n(r(9872),t),n(r(7111),t)},3800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaValidator=void 0;const i=r(6595),n=r(9872),s=r(7111);t.SchemaValidator=class SchemaValidator{constructor(e){this.schema=e}validate(e){const t=this.schema.validate(e);return this.convertValidationResult(t)}convertValidationResult(e){const t=new s.ValidationResult;return e.isValid||t.addFailures(e.errors.map(this.schemaErrorToValidationFailure)),t}schemaErrorToValidationFailure(e){const t=`${e.instancePath} ${e.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new n.ValidationFailure(i.RuntimeErrors.general.invalidPropertyValue(t),e.instancePath)}}},7674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationFailure=void 0;t.ValidationFailure=class ValidationFailure{constructor(e,t){this.error=e,this.propertyName=t}}},7111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResult=void 0;t.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailure(e){this.failures.push(e)}addFailures(e){this.failures.push(...e)}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.map((e=>e.error.message))}getFailureCodes(){return this.failures.map((e=>e.error.code))}}},4231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerMapper=void 0;t.AttributeListenerMapper=class AttributeListenerMapper{static toAttributeListenerDTO(e){return{id:e.id.toString(),query:e.query.toJSON(),peer:e.peer.toString()}}static toAttributeListenerDTOList(e){return e.map((e=>this.toAttributeListenerDTO(e)))}}},1316:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenerUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(4231);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeListenerRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeListenerUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeListenersController=e}async executeInternal(e){const t=await this.attributeListenersController.getAttributeListener(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttributeListener));const r=l.AttributeListenerMapper.toAttributeListenerDTO(t);return o.Result.ok(r)}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributeListenersController,d])],f),t.GetAttributeListenerUseCase=f},5129:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenersUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(4231);let l=class GetAttributeListenersUseCase extends u.UseCase{constructor(e){super(),this.attributeListenersController=e}async executeInternal(){const e=await this.attributeListenersController.getAttributeListeners(),t=p.AttributeListenerMapper.toAttributeListenerDTOList(e);return o.Result.ok(t)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.AttributeListenersController])],l),t.GetAttributeListenersUseCase=l},4864:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4231),t),n(r(1316),t),n(r(5129),t)},1192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMapper=void 0;t.AttributeMapper=class AttributeMapper{static toAttributeDTO(e){return{id:e.id.toString(),parentId:e.parentId?.toString(),content:e.content.toJSON(),createdAt:e.createdAt.toString(),succeeds:e.succeeds?.toString(),succeededBy:e.succeededBy?.toString(),shareInfo:e.shareInfo?.toJSON()}}static toAttributeDTOList(e){return e.map((e=>this.toAttributeDTO(e)))}}},7716:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateLocalAttributeParams.from({content:e.content}),r=await this.attributeController.createLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.CreateAttributeUseCase=f},236:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSharedAttributeCopyUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSharedAttributeCopyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSharedAttributeCopyUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateSharedLocalAttributeCopyParams.from({sourceAttributeId:c.CoreId.from(e.attributeId),peer:c.CoreAddress.from(e.peer),requestReference:c.CoreId.from(e.requestReference)}),r=await this.attributeController.createSharedLocalAttributeCopy(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.CreateSharedAttributeCopyUseCase=f},6899:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteAttributeRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,l])],d),t.DeleteAttributeUseCase=d},6847:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIdentityAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteIdentityAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeIdentityAttributeQuery(c.IdentityAttributeQuery.from(e.query));return o.Result.ok(l.AttributeMapper.toAttributeDTOList(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteIdentityAttributeQueryUseCase=d},4538:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeRelationshipAttributeQuery(c.RelationshipAttributeQuery.from(e.query));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteRelationshipAttributeQueryUseCase=d},4922:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteThirdPartyRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeThirdPartyRelationshipAttributeQuery(c.ThirdPartyRelationshipAttributeQuery.from(e.query));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d},3421:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f),t.GetAttributeUseCase=f},9536:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(8537),y=r(1192);let h=class GetAttributesUseCase extends d.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{},r=(0,f.flattenObject)(t),i=GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),a.Result.ok(y.AttributeMapper.toAttributeDTOList(n))}};h.queryTranslator=new o.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.parentId))]:!0,[(0,p.nameof)((e=>e.succeeds))]:!0,[(0,p.nameof)((e=>e.succeededBy))]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validFrom))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validTo))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.owner))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.tags))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.value))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.key))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.isTechnical))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.confidentiality))}`]:!0,[`${(0,p.nameof)((e=>e.shareInfo))}`]:!0,[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.peer))}`]:!0,[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.requestReference))}`]:!0,[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.sourceAttribute))}`]:!0},alias:{[(0,p.nameof)((e=>e.createdAt))]:[(0,p.nameof)((e=>e.createdAt))],[(0,p.nameof)((e=>e.parentId))]:[(0,p.nameof)((e=>e.parentId))],[(0,p.nameof)((e=>e.succeeds))]:[(0,p.nameof)((e=>e.succeeds))],[(0,p.nameof)((e=>e.succeededBy))]:[(0,p.nameof)((e=>e.succeededBy))],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validFrom))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validFrom))}`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validTo))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validTo))}`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.owner))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.owner))}`],[`${(0,p.nameof)((e=>e.content))}.@type`]:[`${(0,p.nameof)((e=>e.content))}.@type`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.tags))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.tags))}`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.value))}.@type`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.value))}.@type`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.key))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.key))}`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.isTechnical))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.isTechnical))}`],[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.confidentiality))}`]:[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.confidentiality))}`],[`${(0,p.nameof)((e=>e.shareInfo))}`]:[`${(0,p.nameof)((e=>e.shareInfo))}`],[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.peer))}`]:[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.peer))}`],[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.requestReference))}`]:[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.requestReference))}`],[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.sourceAttribute))}`]:[`${(0,p.nameof)((e=>e.shareInfo))}.${(0,p.nameof)((e=>e.sourceAttribute))}`]},custom:{[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validFrom))}`]:(e,t)=>{if(!t)return;const r=u.DateTime.fromISO(t).toUTC().toString();e[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validFrom))}`]={$gte:r}},[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validTo))}`]:(e,t)=>{if(!t)return;const r=u.DateTime.fromISO(t).toUTC().toString();e[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.validTo))}`]={$lte:r}},[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.tags))}`]:(e,t)=>{const r=[];for(const e of t){const t={[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.tags))}`]:{$contains:e}};r.push(t)}e.$or=r}}}),h=i([s(0,l.Inject),n("design:paramtypes",[c.AttributesController])],h),t.GetAttributesUseCase=h},2089:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8537),l=r(1192),d=r(9536);let f=class GetPeerAttributesUseCase extends u.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{};t["content.owner"]=e.peer;const r=(0,p.flattenObject)(t),i=d.GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),o.Result.ok(l.AttributeMapper.toAttributeDTOList(n))}};f=i([s(0,c.Inject),n("design:paramtypes",[a.AttributesController])],f),t.GetPeerAttributesUseCase=f},6823:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedToPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8537),d=r(1192),f=r(9536);let y=class GetSharedToPeerAttributesUseCase extends p.UseCase{constructor(e,t){super(),this.attributeController=e,this.identityController=t}async executeInternal(e){const t=e.query??{};t["content.owner"]=this.identityController.address.toString(),t["shareInfo.peer"]=e.peer;const r=(0,l.flattenObject)(t),i=f.GetAttributesUseCase.queryTranslator.parse(r);let n;return n=e.onlyValid?await this.attributeController.getValidLocalAttributes(i):await this.attributeController.getLocalAttributes(i),o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};y=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,c.IdentityController])],y),t.GetSharedToPeerAttributesUseCase=y},6438:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3289);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ShareAttributeRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ShareAttributeUseCase extends l.UseCase{constructor(e,t,r,i,n){super(n),this.attributeController=e,this.accountController=t,this.requestsController=r,this.messageController=i}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(u.CoreId.from(e.attributeId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttribute));const r=u.CoreAddress.from(e.peer),i={peer:r,content:{title:e.requestTitle,description:e.requestDescription,metadata:e.requestMetadata,items:[c.ShareAttributeRequestItem.from({attribute:t.content,sourceAttributeId:t.id,title:e.requestItemTitle,description:e.requestItemDescription,mustBeAccepted:!0})]}},n=await this.requestsController.canCreate(i);if(n.isError())return o.Result.fail(n.error);const s=await this.requestsController.create(i);return await this.messageController.sendMessage({recipients:[r],content:s.content}),await this.accountController.syncDatawallet(),o.Result.ok(d.RequestMapper.toLocalRequestDTO(s))}};y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),s(4,p.Inject),n("design:paramtypes",[a.AttributesController,u.AccountController,a.OutgoingRequestsController,u.MessageController,f])],y),t.ShareAttributeUseCase=y},4415:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SucceedAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("SucceedAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class SucceedAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.SucceedLocalAttributeParams.from({successorContent:e.successorContent,succeeds:e.succeeds}),r=await this.attributeController.succeedLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.SucceedAttributeUseCase=f},9660:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("UpdateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class UpdateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.UpdateLocalAttributeParams.from({id:e.id,content:e.content}),r=await this.attributeController.updateLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f),t.UpdateAttributeUseCase=f},99:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1192),t),n(r(7716),t),n(r(236),t),n(r(6899),t),n(r(6847),t),n(r(4538),t),n(r(4922),t),n(r(3421),t),n(r(9536),t),n(r(2089),t),n(r(6823),t),n(r(6438),t),n(r(4415),t),n(r(9660),t)},7372:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.createDraft(e.content,e.type);return await this.accountController.syncDatawallet(),o.Result.ok(l.DraftMapper.toDraftDTO(t))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,d])],f),t.CreateDraftUseCase=f},9696:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteDraftRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?(await this.draftController.deleteDraft(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,l])],d),t.DeleteDraftUseCase=d},660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraftMapper=void 0;t.DraftMapper=class DraftMapper{static toDraftDTO(e){return{id:e.id.toString(),type:e.type,createdAt:e.createdAt.toString(),lastModifiedAt:e.lastModifiedAt.toISOString(),content:e.content.toJSON()}}static toDraftDTOList(e){return e.map((e=>this.toDraftDTO(e)))}}},3165:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetDraftUseCase extends p.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?o.Result.ok(l.DraftMapper.toDraftDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.DraftsController,d])],f),t.GetDraftUseCase=f},6863:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),p=r(7071),l=r(7049),d=r(660);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetDraftsRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetDraftsUseCase extends l.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=GetDraftsUseCase.queryTranslator.parse(e.query),r=await this.draftController.getDrafts(t);return a.Result.ok(d.DraftMapper.toDraftDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.type))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.lastModifiedAt))]:!0}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.DraftsController,f])],y),t.GetDraftsUseCase=y},5760:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDraftUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(7049),d=r(660);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateDraftRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class UpdateDraftUseCase extends l.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(u.CoreId.from(e.id));return t?(t.content=o.Serializable.fromUnknown(e.content),await this.draftController.updateDraft(t),await this.accountController.syncDatawallet(),a.Result.ok(d.DraftMapper.toDraftDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Draft))}};y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.DraftsController,u.AccountController,f])],y),t.UpdateDraftUseCase=y},5966:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7372),t),n(r(9696),t),n(r(660),t),n(r(3165),t),n(r(6863),t),n(r(5760),t)},3742:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4864),t),n(r(99),t),n(r(5966),t),n(r(3289),t),n(r(1394),t)},4262:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class AcceptIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.accept(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.AcceptIncomingRequestUseCase=d},3678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanAcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanAcceptIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canAccept(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l),t.CanAcceptIncomingRequestUseCase=l},8112:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanCreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8062);let d=class CanCreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.canCreate({content:e.content,peer:e.peer?c.CoreAddress.from(e.peer):void 0}),r=l.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.CanCreateOutgoingRequestUseCase=d},8197:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanRejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanRejectIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canReject(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l),t.CanRejectIncomingRequestUseCase=l},2113:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckPrerequisitesOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CheckPrerequisitesOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.checkPrerequisites({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.CheckPrerequisitesOfIncomingRequestUseCase=d},6353:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CompleteIncomingRequestUseCase extends p.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipController=r}async executeInternal(e){const t=await this.getResponseSourceObject(e),r=c.CoreId.from(e.requestId),i=await this.incomingRequestsController.complete({requestId:r,responseSourceObject:t});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}async getResponseSourceObject(e){if(!e.responseSourceId)return;if(e.responseSourceId.startsWith("MSG")){const t=await this.messageController.getMessage(c.CoreId.from(e.responseSourceId));if(!t)throw p.RuntimeErrors.general.recordNotFound(c.Message);return t}const t=await this.relationshipController.getRelationships({"cache.changes.id":e.responseSourceId});if(0===t.length)throw p.RuntimeErrors.general.recordNotFound(c.RelationshipChange);return t[0].cache.creationChange}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.IncomingRequestsController,c.MessageController,c.RelationshipsController])],d),t.CompleteIncomingRequestUseCase=d},4464:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class CompleteOutgoingRequestUseCase extends l.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(u.CoreId.from(e.messageId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message));const r={requestId:u.CoreId.from(e.receivedResponse.requestId),receivedResponse:c.Response.from(e.receivedResponse),responseSourceObject:t},i=await this.outgoingRequestsController.complete(r);return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}};f=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.MessageController])],f),t.CompleteOutgoingRequestUseCase=f},8147:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase extends p.UseCase{constructor(e,t,r){super(),this.outgoingRequestsController=e,this.relationshipController=t,this.relationshipTemplateController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(c.CoreId.from(e.templateId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.RelationshipTemplate));const r=await this.relationshipController.getRelationships({"cache.changes.id":e.relationshipChangeId});if(0===r.length)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.RelationshipChange));const i={template:t,creationChange:r[0].cache.creationChange},n=await this.outgoingRequestsController.createFromRelationshipCreationChange(i);return o.Result.ok(l.RequestMapper.toLocalRequestDTO(n))}};d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.RelationshipsController,c.RelationshipTemplateController])],d),t.CreateAndCompleteOutgoingRequestFromRelationshipCreationChangeUseCase=d},2285:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.create({content:e.content,peer:c.CoreAddress.from(e.peer)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.CreateOutgoingRequestUseCase=d},3923:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiscardOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class DiscardOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){return await this.outgoingRequestsController.discardOutgoingRequest(c.CoreId.from(e.id)),o.Result.ok(void 0)}};l=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],l),t.DiscardOutgoingRequestUseCase=l},3094:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.GetIncomingRequestUseCase=d},1697:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),p=r(7071),l=r(7049),d=r(8537),f=r(3386);let y=class GetIncomingRequestsUseCase extends l.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=(0,d.flattenObject)(e.query),r=GetIncomingRequestsUseCase.queryTranslator.parse(t),i=await this.incomingRequestsController.getIncomingRequests(r),n=f.RequestMapper.toLocalRequestDTOList(i);return a.Result.ok(n)}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.id))]:!0,[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0},alias:{[(0,u.nameof)((e=>e.id))]:(0,u.nameof)((e=>e.id)),[(0,u.nameof)((e=>e.peer))]:(0,u.nameof)((e=>e.peer)),[(0,u.nameof)((e=>e.createdAt))]:(0,u.nameof)((e=>e.createdAt)),[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`}}),y=i([s(0,p.Inject),n("design:paramtypes",[c.IncomingRequestsController])],y),t.GetIncomingRequestsUseCase=y},6293:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.getOutgoingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d),t.GetOutgoingRequestUseCase=d},5771:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),p=r(7071),l=r(7049),d=r(8537),f=r(3386);let y=class GetOutgoingRequestsUseCase extends l.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=(0,d.flattenObject)(e.query),r=GetOutgoingRequestsUseCase.queryTranslator.parse(t),i=await this.outgoingRequestsController.getOutgoingRequests(r),n=f.RequestMapper.toLocalRequestDTOList(i);return a.Result.ok(n)}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.id))]:!0,[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:!0},alias:{[(0,u.nameof)((e=>e.id))]:(0,u.nameof)((e=>e.id)),[(0,u.nameof)((e=>e.peer))]:(0,u.nameof)((e=>e.peer)),[(0,u.nameof)((e=>e.createdAt))]:(0,u.nameof)((e=>e.createdAt)),[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.expiresAt))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:`${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.type))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.source))}.${(0,u.nameof)((e=>e.reference))}`]:!0,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.result))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`,[`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`]:`${(0,u.nameof)((e=>e.response))}.${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e.items))}.${(0,u.nameof)((e=>e["@type"]))}`}}),y=i([s(0,p.Inject),n("design:paramtypes",[c.OutgoingRequestsController])],y),t.GetOutgoingRequestsUseCase=y},7782:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReceivedIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class ReceivedIncomingRequestUseCase extends l.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipTemplateController=r}async executeInternal(e){let t;if(e.requestSourceId.startsWith("MSG")){if(t=await this.messageController.getMessage(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message))}else if(t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.incomingRequestsController.received({receivedRequest:c.Request.from(e.receivedRequest),requestSourceObject:t});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(r))}};f=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[a.IncomingRequestsController,u.MessageController,u.RelationshipTemplateController])],f),t.ReceivedIncomingRequestUseCase=f},5196:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RejectIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.reject(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.RejectIncomingRequestUseCase=d},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMapper=void 0;t.RequestMapper=class RequestMapper{static toLocalRequestDTO(e){return{id:e.id.toString(),isOwn:e.isOwn,peer:e.peer.toString(),createdAt:e.createdAt.toString(),content:e.content.toJSON(),source:e.source?{type:e.source.type,reference:e.source.reference.toString()}:void 0,response:e.response?{createdAt:e.response.createdAt.toString(),content:e.response.content.toJSON(),source:e.response.source?{type:e.response.source.type,reference:e.response.source.reference.toString()}:void 0}:void 0,status:e.status}}static toLocalRequestDTOList(e){return e.map((e=>this.toLocalRequestDTO(e)))}}},8062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestValidationResultMapper=void 0;t.RequestValidationResultMapper=class RequestValidationResultMapper{static toRequestValidationResultDTO(e){return{isSuccess:e.isSuccess(),code:e.isError()?e.error.code:void 0,message:e.isError()?e.error.message:void 0,items:e.items.map((e=>this.toRequestValidationResultDTO(e)))}}}},5943:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RequireManualDecisionOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RequireManualDecisionOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.requireManualDecision({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d),t.RequireManualDecisionOfIncomingRequestUseCase=d},1938:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SentOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class SentOutgoingRequestUseCase extends p.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(c.CoreId.from(e.messageId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Message));const r={requestId:c.CoreId.from(e.requestId),requestSourceObject:t},i=await this.outgoingRequestsController.sent(r);return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}};d=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.MessageController])],d),t.SentOutgoingRequestUseCase=d},8537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=void 0,t.flattenObject=function flattenObject(e){const t={};for(const r in e){const i=e[r];if("object"!=typeof i||Array.isArray(i))t[r]=i;else{const e=flattenObject(i);for(const i in e)t[`${r}.${i}`]=e[i]}}return t}},3289:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4262),t),n(r(3678),t),n(r(8112),t),n(r(8197),t),n(r(2113),t),n(r(6353),t),n(r(4464),t),n(r(8147),t),n(r(2285),t),n(r(3923),t),n(r(3094),t),n(r(1697),t),n(r(6293),t),n(r(5771),t),n(r(7782),t),n(r(5196),t),n(r(3386),t),n(r(5943),t),n(r(1938),t)},3951:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.createSetting({key:e.key,value:e.value,reference:e.reference?c.CoreId.from(e.reference):void 0,scope:e.scope,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0});return await this.accountController.syncDatawallet(),o.Result.ok(l.SettingMapper.toSettingDTO(t))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f),t.CreateSettingUseCase=f},678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(485),l=r(7049);let d=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("DeleteSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[l.SchemaRepository])],d);let f=class DeleteSettingUseCase extends l.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?(await this.settingController.deleteSetting(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f),t.DeleteSettingUseCase=f},6798:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetSettingUseCase extends p.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?o.Result.ok(l.SettingMapper.toSettingDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.SettingsController,d])],f),t.GetSettingUseCase=f},6101:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingsUseCase=void 0;const o=r(2937),a=r(5172),c=r(3850),u=r(4714),p=r(7071),l=r(7049),d=r(6950);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetSettingsRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetSettingsUseCase extends l.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=GetSettingsUseCase.queryTranslator.parse(e.query),r=await this.settingController.getSettings(t);return a.Result.ok(d.SettingMapper.toSettingDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.key))]:!0,[(0,u.nameof)((e=>e.scope))]:!0,[(0,u.nameof)((e=>e.reference))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.succeedsItem))]:!0,[(0,u.nameof)((e=>e.succeedsAt))]:!0}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.SettingsController,f])],y),t.GetSettingsUseCase=y},6950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMapper=void 0;t.SettingMapper=class SettingMapper{static toSettingDTO(e){return{id:e.id.toString(),key:e.key,scope:e.scope.toString(),reference:e.reference?.toString(),value:e.value.toJSON(),createdAt:e.createdAt.toISOString(),succeedsItem:e.succeedsItem?.toString(),succeedsAt:e.succeedsAt?.toString()}}static toSettingDTOList(e){return e.map((e=>this.toSettingDTO(e)))}}},1853:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSettingUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(485),d=r(7049),f=r(6950);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("UpdateSettingRequest"))}};y=i([s(0,p.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UpdateSettingUseCase extends d.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(u.CoreId.from(e.id));return t?(t.value=o.Serializable.fromUnknown(e.value),await this.settingController.updateSetting(t),await this.accountController.syncDatawallet(),a.Result.ok(f.SettingMapper.toSettingDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Setting))}};h=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.SettingsController,u.AccountController,y])],h),t.UpdateSettingUseCase=h},1394:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3951),t),n(r(678),t),n(r(6798),t),n(r(6101),t),n(r(6950),t),n(r(1853),t)},485:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9365),t),n(r(6819),t),n(r(6595),t),n(r(3742),t),n(r(9667),t)},2737:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class DisableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}executeInternal(){return this.accountController.disableAutoSync(),o.Result.ok(void 0)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p),t.DisableAutoSyncUseCase=p},9710:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class EnableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.enableAutoSync(),o.Result.ok(void 0)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p),t.EnableAutoSyncUseCase=p},569:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDeviceInfoUseCase extends u.UseCase{constructor(e){super(),this.deviceController=e}executeInternal(){const e=this.deviceController.device;return o.Result.ok(p.DeviceMapper.toDeviceDTO(e))}};l=i([s(0,c.Inject),n("design:paramtypes",[a.DeviceController])],l),t.GetDeviceInfoUseCase=l},3378:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIdentityInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetIdentityInfoUseCase extends u.UseCase{constructor(e){super(),this.identityController=e}executeInternal(){const e=this.identityController.identity;return o.Result.ok({address:e.address.toString(),publicKey:e.publicKey.toString()})}};p=i([s(0,c.Inject),n("design:paramtypes",[a.IdentityController])],p),t.GetIdentityInfoUseCase=p},8562:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSyncInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetSyncInfoUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){const e=await this.accountController.getLastCompletedSyncTime(),t=await this.accountController.getLastCompletedDatawalletSyncTime();return o.Result.ok({lastSyncRun:e?{completedAt:e.toISOString()}:void 0,lastDatawalletSync:t?{completedAt:t.toISOString()}:void 0})}};p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p),t.GetSyncInfoUseCase=p},4614:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadItemFromTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067),l=r(5076),d=r(8434),f=r(7121);let y=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadItemFromTruncatedReferenceRequest"))}};y=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],y);let h=class LoadItemFromTruncatedReferenceUseCase extends u.UseCase{constructor(e,t,r,i,n){super(n),this.fileController=e,this.templateController=t,this.tokenController=r,this.accountController=i}async executeInternal(e){try{return await this._executeInternal(e)}finally{await this.accountController.syncDatawallet()}}async _executeInternal(e){const t=e.reference;if(t.startsWith(u.Base64ForIdPrefix.RelationshipTemplate)){const e=await this.templateController.loadPeerRelationshipTemplateByTruncated(t);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(t.startsWith(u.Base64ForIdPrefix.File)){const e=await this.fileController.getOrLoadFileByTruncated(t);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return await this.handleTokenReference(t)}async handleTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Token,t.id.toString());const r=t.cache.content;if(r instanceof a.TokenContentRelationshipTemplate){const e=await this.templateController.loadPeerRelationshipTemplate(r.templateId,r.secretKey);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(r instanceof a.TokenContentFile){const e=await this.fileController.getOrLoadFile(r.fileId,r.secretKey);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return r instanceof a.TokenContentDeviceSharedSecret?o.Result.ok({type:"DeviceOnboardingInfo",value:p.DeviceMapper.toDeviceOnboardingInfoDTO(r.sharedSecret)}):o.Result.ok({type:"Token",value:f.TokenMapper.toTokenDTO(t,!0)})}};h=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),s(4,c.Inject),n("design:paramtypes",[a.FileController,a.RelationshipTemplateController,a.TokenController,a.AccountController,y])],h),t.LoadItemFromTruncatedReferenceUseCase=h},3826:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterPushNotificationTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RegisterPushNotificationTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class RegisterPushNotificationTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.accountController=e}async executeInternal(e){return await this.accountController.registerPushNotificationToken({handle:e.handle,installationId:e.installationId,platform:e.platform}),o.Result.ok(void 0)}};l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,p])],l),t.RegisterPushNotificationTokenUseCase=l},4204:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDatawalletUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class SyncDatawalletUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(e){return await this.accountController.syncDatawallet(!0,e.callback),o.Result.ok(void 0)}};p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p),t.SyncDatawalletUseCase=p},4773:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEverythingUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(986),p=r(7049),l=r(6881),d=r(4316);let f=class SyncEverythingUseCase extends p.UseCase{constructor(e,t){super(),this.accountController=e,this.logger=t.getLogger(SyncEverythingUseCase)}async executeInternal(e){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal(e);try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(e){const t=await this.accountController.syncEverything(e.callback),r=t.messages.map((e=>l.MessageMapper.toMessageDTO(e))),i=t.relationships.map((e=>d.RelationshipMapper.toRelationshipDTO(e)));return o.Result.ok({messages:r,relationships:i})}};f=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,u.RuntimeLoggerFactory])],f),t.SyncEverythingUseCase=f},9276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2737),t),n(r(9710),t),n(r(569),t),n(r(3378),t),n(r(8562),t),n(r(4614),t),n(r(3826),t),n(r(4204),t),n(r(4773),t)},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeMapper=void 0;t.ChallengeMapper=class ChallengeMapper{static toChallengeDTO(e){const t=JSON.parse(e.challenge);return{id:t.id,expiresAt:t.expiresAt,createdBy:t.createdBy,createdByDevice:t.createdByDevice,type:t.type,signature:e.signature.toBase64(),challengeString:e.challenge}}}},9936:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateChallengeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7661);function isCreateRelationshipChallengeRequest(e){return"Relationship"===e.challengeType&&"string"==typeof e.relationship}let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateChallengeRequest")),this.relationshipSchema=e.getSchema("CreateRelationshipChallengeRequest"),this.identitySchema=e.getSchema("CreateIdentityChallengeRequest"),this.deviceSchema=e.getSchema("CreateDeviceChallengeRequest")}validate(e){if(this.schema.validate(e).isValid)return new u.ValidationResult;if(isCreateRelationshipChallengeRequest(e))return this.convertValidationResult(this.relationshipSchema.validate(e));if(function isCreateIdentityChallengeRequest(e){return"Identity"===e.challengeType}(e))return this.convertValidationResult(this.identitySchema.validate(e));if(function isCreateDeviceChallengeRequest(e){return"Device"===e.challengeType}(e))return this.convertValidationResult(this.deviceSchema.validate(e));const t=new u.ValidationResult;return t.addFailure(new u.ValidationFailure(u.RuntimeErrors.general.invalidPayload())),t}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateChallengeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.challengeController=e,this.relationshipsController=t}async executeInternal(e){const t=await this.getRelationship(e);if(t.isError)return o.Result.fail(t.error);let r;switch(e.challengeType){case"Relationship":r=a.ChallengeType.Relationship;break;case"Identity":r=a.ChallengeType.Identity;break;case"Device":r=a.ChallengeType.Device;break;default:throw new Error("Unknown challenge type.")}const i=await this.challengeController.createChallenge(r,t.value);return o.Result.ok(p.ChallengeMapper.toChallengeDTO(i))}async getRelationship(e){if(!isCreateRelationshipChallengeRequest(e))return o.Result.ok(void 0);const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationship));return t?o.Result.ok(t):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.ChallengeController,a.RelationshipsController,l])],d),t.CreateChallengeUseCase=d},5573:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateChallengeUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(4316);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ValidateChallengeRequest"))}validate(e){const t=super.validate(e);if(t.isInvalid())return t;const r=this.validateSignature(e.signature);r.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(r.error.message),(0,u.nameof)((e=>e.signature))));const i=this.validateChallenge(e.challengeString);return i.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(i.error.message),(0,u.nameof)((e=>e.challengeString)))),t}validateSignature(e){try{return a.CryptoSignature.fromBase64(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidSignature())}}validateChallenge(e){try{return c.Challenge.deserialize(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidChallengeString())}}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ValidateChallengeUseCase extends l.UseCase{constructor(e,t){super(t),this.challengeController=e}async executeInternal(e){const t=a.CryptoSignature.fromBase64(e.signature),r=c.ChallengeSigned.from({challenge:e.challengeString,signature:t});try{const e=await this.challengeController.validateChallenge(r),t=e.correspondingRelationship?d.RelationshipMapper.toRelationshipDTO(e.correspondingRelationship):void 0;return o.Result.ok({isValid:e.isValid,correspondingRelationship:t})}catch(e){if(!(e instanceof c.CoreError)||"error.transport.notSupported"!==e.code)throw e;return o.Result.fail(l.RuntimeErrors.general.notSupported("Validating challenges of the type 'Device' is not yet supported."))}}};y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.ChallengeController,f])],y),t.ValidateChallengeUseCase=y},5629:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9936),t),n(r(5573),t)},5188:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.sendDevice(e);return await this.accountController.syncDatawallet(),o.Result.ok(p.DeviceMapper.toDeviceDTO(t))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,l])],d),t.CreateDeviceUseCase=d},795:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceOnboardingTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceOnboardingTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceOnboardingTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.tokenController=t}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id)),r=e.expiresAt?a.CoreDate.from(e.expiresAt):a.CoreDate.utc().add({minutes:5}),i=a.TokenContentDeviceSharedSecret.from({sharedSecret:t}),n=await this.tokenController.sendToken({content:i,expiresAt:r,ephemeral:!0});return o.Result.ok(p.TokenMapper.toTokenDTO(n,!0))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.TokenController,l])],d),t.CreateDeviceOnboardingTokenUseCase=d},2137:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DeleteDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class DeleteDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(await this.devicesController.delete(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,p])],l),t.DeleteDeviceUseCase=l},3067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceMapper=void 0;const i=r(2890),n=r(9663);t.DeviceMapper=class DeviceMapper{static toDeviceDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,type:e.type.toString(),username:e.username,certificate:e.certificate,description:e.description,lastLoginAt:e.lastLoginAt?.toString(),operatingSystem:e.operatingSystem,publicKey:e.publicKey?.toString()}}static toDeviceOnboardingInfoDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,description:e.description,secretBaseKey:e.secretBaseKey.toBase64(),deviceIndex:e.deviceIndex,synchronizationKey:e.synchronizationKey.toBase64(),identityPrivateKey:e.identityPrivateKey?e.identityPrivateKey.toString():void 0,identity:{address:e.identity.address.toString(),publicKey:e.identity.publicKey.toString(),realm:e.identity.realm.toString()},password:e.password,username:e.username}}static toDeviceSharedSecret(e){return n.DeviceSharedSecret.from({id:n.CoreId.from(e.id),createdAt:n.CoreDate.from(e.createdAt),createdByDevice:n.CoreId.from(e.createdByDevice),name:e.name,description:e.description,secretBaseKey:i.CryptoSecretKey.fromBase64(e.secretBaseKey),deviceIndex:e.deviceIndex,synchronizationKey:i.CryptoSecretKey.fromBase64(e.synchronizationKey),identityPrivateKey:e.identityPrivateKey?i.CryptoSignaturePrivateKey.deserialize(e.identityPrivateKey):void 0,identity:{address:n.CoreAddress.from(e.identity.address),publicKey:i.CryptoSignaturePublicKey.deserialize(e.identity.publicKey),realm:e.identity.realm},password:e.password,username:e.username})}}},770:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?o.Result.ok(p.DeviceMapper.toDeviceDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,l])],d),t.GetDeviceUseCase=d},8283:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceOnboardingInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceOnboardingInfoRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceOnboardingInfoUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id));return o.Result.ok(p.DeviceMapper.toDeviceOnboardingInfoDTO(t))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,l])],d),t.GetDeviceOnboardingInfoUseCase=d},3341:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDevicesUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDevicesUseCase extends u.UseCase{constructor(e){super(),this.devicesController=e}async executeInternal(){const e=(await this.devicesController.list()).map((e=>p.DeviceMapper.toDeviceDTO(e)));return o.Result.ok(e)}};l=i([s(0,c.Inject),n("design:paramtypes",[a.DevicesController])],l),t.GetDevicesUseCase=l},189:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7802),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("UpdateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class UpdateDeviceUseCase extends p.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(e.name&&(t.name=e.name),t.description=e.description,await this.devicesController.update(t),await this.accountController.syncDatawallet(),o.Result.ok(u.DeviceMapper.toDeviceDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Device))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,l])],d),t.UpdateDeviceUseCase=d},7802:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5188),t),n(r(795),t),n(r(2137),t),n(r(3067),t),n(r(770),t),n(r(8283),t),n(r(3341),t),n(r(189),t)},1828:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,p])],l),t.CreateQrCodeForFileUseCase=l},542:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForFileUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,a.AccountController,l])],d),t.CreateTokenForFileUseCase=d},6913:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForFileUseCase extends u.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.tokenController=t}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,p])],l),t.CreateTokenQrCodeForFileUseCase=l},8516:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=a.CoreId.from(e.id),r=await this.fileController.getFile(t);if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const i=await this.fileController.downloadFileContent(r.id);return o.Result.ok(p.FileMapper.toDownloadFileResponse(i,r))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d),t.DownloadFileUseCase=d},5076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMapper=void 0;const i=r(9663),n=r(7049);t.FileMapper=class FileMapper{static toDownloadFileResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toFileDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,e.id.toString());return{id:e.id.toString(),filename:e.cache.filename,filesize:e.cache.filesize,createdAt:e.cache.createdAt.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),expiresAt:e.cache.expiresAt.toString(),mimetype:e.cache.mimetype,isOwn:e.isOwn,title:e.cache.title??"",secretKey:e.secretKey.toBase64(),description:e.cache.description,truncatedReference:e.truncate()}}static toFileDTOList(e){return e.map((e=>this.toFileDTO(e)))}}},3520:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.id));return t?o.Result.ok(p.FileMapper.toFileDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d),t.GetFileUseCase=d},5911:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(5076);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetFilesRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetFilesUseCase extends l.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=GetFilesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===l.OwnerRestriction.Own);const r=await this.fileController.getFiles(t);return a.Result.ok(d.FileMapper.toFileDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.description))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0,[(0,u.nameof)((e=>e.filename))]:!0,[(0,u.nameof)((e=>e.filesize))]:!0,[(0,u.nameof)((e=>e.mimetype))]:!0,[(0,u.nameof)((e=>e.title))]:!0,[(0,u.nameof)((e=>e.isOwn))]:!0},alias:{[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.description))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.description))}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.expiresAt))}`,[(0,u.nameof)((e=>e.filename))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.filename))}`,[(0,u.nameof)((e=>e.filesize))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.filesize))}`,[(0,u.nameof)((e=>e.mimetype))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.mimetype))}`,[(0,u.nameof)((e=>e.title))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.title))}`,[(0,u.nameof)((e=>e.isOwn))]:(0,u.nameof)((e=>e.isOwn))}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.FileController,f])],y),t.GetFilesUseCase=y},9918:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOrLoadFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(5076);function isViaSecret(e){return"id"in e&&"secretKey"in e}function isViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetOrLoadFileRequest")),this.loadViaSecretSchema=e.getSchema("GetOrLoadFileViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("GetOrLoadFileViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetOrLoadFileUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadFile(c.CoreId.from(e.id),r)}else{if(!isViaReference(e))throw new Error("Invalid request format.");t=await this.loadFileFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadFileFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.File))return await this.loadFileFromFileReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadFileFromTokenReference(e);throw p.RuntimeErrors.files.invalidReference(e)}async loadFileFromFileReference(e){const t=await this.fileController.getOrLoadFileByTruncated(e);return o.Result.ok(l.FileMapper.toFileDTO(t))}async loadFileFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentFile))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadFile(r.fileId,r.secretKey)}async loadFile(e,t){const r=await this.fileController.getOrLoadFile(e,t);return o.Result.ok(l.FileMapper.toFileDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.FileController,c.TokenController,c.AccountController,d])],f),t.GetOrLoadFileUseCase=f},2109:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadOwnFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("UploadOwnFileValidatableRequest"))}set maxFileSize(e){this._maxFileSize=e}validate(e){const t=super.validate(e);return t.isValid()?(e.content.byteLength>this._maxFileSize&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is too large`),(0,p.nameof)((e=>e.content)))),0===e.content.length&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is empty`),(0,p.nameof)((e=>e.content)))),u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UploadOwnFileUseCase extends d.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.accountController=t,r.maxFileSize=e.config.platformMaxUnencryptedFileSize}async executeInternal(e){const t=await this.fileController.sendFile({buffer:a.CoreBuffer.from(e.content),title:e.title,description:e.description??"",filename:e.filename,mimetype:e.mimetype,expiresAt:c.CoreDate.from(e.expiresAt)});return await this.accountController.syncDatawallet(),o.Result.ok(f.FileMapper.toFileDTO(t))}};h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.FileController,c.AccountController,y])],h),t.UploadOwnFileUseCase=h},4237:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1828),t),n(r(542),t),n(r(6913),t),n(r(8516),t),n(r(5076),t),n(r(3520),t),n(r(5911),t),n(r(9918),t),n(r(2109),t)},4824:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckIdentityUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CheckIdentityRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CheckIdentityUseCase extends u.UseCase{constructor(e,t,r){super(r),this.identityController=e,this.relationshipsController=t}async executeInternal(e){const t=a.CoreAddress.from(e.address);if(this.identityController.isMe(t))return o.Result.ok({self:!0});const r=await this.relationshipsController.getRelationshipToIdentity(t);if(r){const e=p.RelationshipMapper.toRelationshipDTO(r);return r.status===a.RelationshipStatus.Pending?o.Result.ok({peer:!0,relationshipPending:!0,relationship:e}):r.status===a.RelationshipStatus.Active||r.status===a.RelationshipStatus.Terminating?o.Result.ok({peer:!0,relationshipActive:!0,relationship:e}):o.Result.ok({peer:!0,relationshipTerminated:!0,relationship:e})}return o.Result.ok({unknown:!0})}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.IdentityController,a.RelationshipsController,l])],d),t.CheckIdentityUseCase=d},4847:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4824),t)},9667:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9276),t),n(r(5629),t),n(r(7802),t),n(r(4237),t),n(r(4847),t),n(r(2290),t),n(r(7831),t),n(r(3084),t),n(r(5631),t)},4860:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadAttachmentRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadAttachmentUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);if(!i)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const n=await this.fileController.downloadFileContent(r);return o.Result.ok(p.MessageMapper.toDownloadAttachmentResponse(n,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d),t.DownloadAttachmentUseCase=d},9558:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttachmentMetadataUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetAttachmentMetadataRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetAttachmentMetadataUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);return i?o.Result.ok(p.FileMapper.toFileDTO(i)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(File))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d),t.GetAttachmentMetadataUseCase=d},978:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetMessageUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString()));const r=await Promise.all(t.cache.attachments.map((e=>this.fileController.getFile(e))));if(r.some((e=>!e)))throw new Error("A file could not be fetched.");return o.Result.ok(p.MessageMapper.toMessageWithAttachmentsDTO(t,r))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d),t.GetMessageUseCase=d},9231:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessagesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(6881);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetMessagesRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetMessagesUseCase extends l.UseCase{constructor(e,t){super(t),this.messageController=e}async executeInternal(e){const t=GetMessagesUseCase.queryTranslator.parse(e.query),r=await this.messageController.getMessages(t);return a.Result.ok(d.MessageMapper.toMessageDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[`${(0,u.nameof)((e=>e.content))}.@type`]:!0,[`${(0,u.nameof)((e=>e.content))}.body`]:!0,[`${(0,u.nameof)((e=>e.content))}.subject`]:!0,[(0,u.nameof)((e=>e.attachments))]:!0,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:!0,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.relationshipId))}`]:!0,participant:!0},alias:{[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`,[`${(0,u.nameof)((e=>e.content))}.@type`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.@type`,[`${(0,u.nameof)((e=>e.content))}.body`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.body`,[`${(0,u.nameof)((e=>e.content))}.subject`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.content))}.subject`},custom:{[`${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.relationshipId))}`]:(e,t)=>{e[(0,u.nameof)((e=>e.relationshipIds))]={$containsAny:Array.isArray(t)?t:[t]}},[(0,u.nameof)((e=>e.attachments))]:(e,t)=>{e[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.attachments))}`]={$containsAny:Array.isArray(t)?t:[t]}},participant:(e,t)=>{let r;if(Array.isArray(t)){if(0===t.length)return;r={};for(const e of t){const t=y.queryTranslator.parseString(e,!0);switch(t.field){case"$containsAny":case"$containsNone":r[t.field]=r[t.field]||[],r[t.field].push(t.value);break;default:r[t.field]=t.value}}}else r=y.queryTranslator.parseStringVal(t);e.$or=[{[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`]:r},{[`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.recipients))}.${(0,u.nameof)((e=>e.address))}`]:r}]}}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.MessageController,f])],y),t.GetMessagesUseCase=y},6881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMapper=void 0;const i=r(9663),n=r(7049),s=r(5076);t.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toMessageWithAttachmentsDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:t.map((e=>s.FileMapper.toFileDTO(e)))}}static toMessageDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:e.cache.attachments.map((e=>e.toString()))}}static toMessageDTOList(e){return e.map((e=>this.toMessageDTO(e)))}static toRecipient(e,t){return{address:e.address.toString(),receivedAt:e.receivedAt?.toString(),receivedByDevice:e.receivedByDevice?.toString(),relationshipId:t.toString()}}}},8400:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("SendMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class SendMessageUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.messageController=e,this.fileController=t,this.accountController=r}async executeInternal(e){const t=await this.transformAttachments(e.attachments);if(t.isError)return o.Result.fail(t.error);const r=await this.messageController.sendMessage({recipients:e.recipients.map((e=>a.CoreAddress.from(e))),content:e.content,attachments:t.value});return await this.accountController.syncDatawallet(),o.Result.ok(p.MessageMapper.toMessageDTO(r))}async transformAttachments(e){if(!e||0===e.length)return o.Result.ok([]);const t=[];for(const r of e){const e=await this.fileController.getFile(a.CoreId.from(r));if(!e)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));t.push(e)}return o.Result.ok(t)}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,a.AccountController,l])],d),t.SendMessageUseCase=d},2290:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4860),t),n(r(9558),t),n(r(978),t),n(r(9231),t),n(r(6881),t),n(r(8400),t)},8580:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(8565),u=r(4714),p=r(7071),l=r(7049),d=r(8434);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnRelationshipTemplateRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(c.DateTime.fromISO(e.expiresAt)<=c.DateTime.utc()&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(`'${(0,u.nameof)((e=>e.expiresAt))}' must be in the future`),(0,u.nameof)((e=>e.expiresAt)))),t):t}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class CreateOwnRelationshipTemplateUseCase extends l.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.accountController=t}async executeInternal(e){const t=await this.templateController.sendRelationshipTemplate({content:e.content,expiresAt:a.CoreDate.from(e.expiresAt),maxNumberOfAllocations:e.maxNumberOfAllocations});return await this.accountController.syncDatawallet(),o.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}};y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.AccountController,f])],y),t.CreateOwnRelationshipTemplateUseCase=y},7921:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.templateController=e}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateQRCodeForPeerTemplate());const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,p])],l),t.CreateQrCodeForOwnTemplateUseCase=l},7255:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForOwnTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,a.AccountController,l])],d),t.CreateTokenForOwnTemplateUseCase=d},3683:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.tokenController=t}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,p])],l),t.CreateTokenQrCodeForOwnTemplateUseCase=l},2603:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(8434);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipTemplateMapper.toRelationshipTemplateDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,l])],d),t.GetRelationshipTemplateUseCase=d},1371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplatesUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(8434);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplatesRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetRelationshipTemplatesUseCase extends l.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=GetRelationshipTemplatesUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===l.OwnerRestriction.Own);const r=await this.relationshipTemplateController.getRelationshipTemplates(t);return a.Result.ok(d.RelationshipTemplateMapper.toRelationshipTemplateDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.isOwn))]:!0,[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.maxNumberOfAllocations))]:!0},alias:{[(0,u.nameof)((e=>e.isOwn))]:(0,u.nameof)((e=>e.isOwn)),[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdAt))}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.expiresAt))}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdBy))}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.createdByDevice))}`,[(0,u.nameof)((e=>e.maxNumberOfAllocations))]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.maxNumberOfAllocations))}`}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.RelationshipTemplateController,f])],y),t.GetRelationshipTemplatesUseCase=y},3186:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(8434);function isLoadPeerRelationshipTemplateViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerRelationshipTemplateViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerRelationshipTemplateRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerRelationshipTemplateViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerRelationshipTemplateViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerRelationshipTemplateViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerRelationshipTemplateViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerRelationshipTemplateUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isLoadPeerRelationshipTemplateViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadTemplate(c.CoreId.from(e.id),r)}else{if(!isLoadPeerRelationshipTemplateViaReference(e))throw new Error("Invalid request format.");t=await this.loadRelationshipTemplateFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadRelationshipTemplateFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.RelationshipTemplate))return await this.loadRelationshipTemplateFromRelationshipTemplateReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadRelationshipTemplateFromTokenReference(e);throw p.RuntimeErrors.relationshipTemplates.invalidReference(e)}async loadRelationshipTemplateFromRelationshipTemplateReference(e){const t=await this.templateController.loadPeerRelationshipTemplateByTruncated(e);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}async loadRelationshipTemplateFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentRelationshipTemplate))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadTemplate(r.templateId,r.secretKey)}async loadTemplate(e,t){const r=await this.templateController.loadPeerRelationshipTemplate(e,t);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.RelationshipTemplateController,c.TokenController,c.AccountController,d])],f),t.LoadPeerRelationshipTemplateUseCase=f},8434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateMapper=void 0;const i=r(9663),n=r(7049);t.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.RelationshipTemplate,e.id.toString());return{id:e.id.toString(),isOwn:e.isOwn,createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),createdAt:e.cache.createdAt.toString(),content:e.cache.content.toJSON(),expiresAt:e.cache.expiresAt?.toString(),maxNumberOfAllocations:e.cache.maxNumberOfAllocations,truncatedReference:e.truncate()}}static toRelationshipTemplateDTOList(e){return e.map((e=>this.toRelationshipTemplateDTO(e)))}}},3084:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8580),t),n(r(7921),t),n(r(7255),t),n(r(3683),t),n(r(2603),t),n(r(1371),t),n(r(3186),t),n(r(8434),t)},3018:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("AcceptRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class AcceptRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.acceptChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d),t.AcceptRelationshipChangeUseCase=d},3986:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateRelationshipUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.relationshipsController=e,this.relationshipTemplateController=t,this.accountController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));const r=await this.relationshipsController.sendRelationship({template:t,content:e.content});return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(r))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.RelationshipTemplateController,a.AccountController,l])],d),t.CreateRelationshipUseCase=d},1041:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesForRelationshipUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(3742);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetAttributesForRelationshipUseCase extends l.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.attributesController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Relationship));const r=t.peer.address.toString(),i={$or:[{[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.owner))}`]:r},{[`${(0,u.nameof)((e=>e.shareInfo))}.${(0,u.nameof)((e=>e.peer))}`]:r}]},n=await this.attributesController.getLocalAttributes(i);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.RelationshipsController,a.AttributesController,f])],y),t.GetAttributesForRelationshipUseCase=y},9456:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d),t.GetRelationshipUseCase=d},215:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipByAddressUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipByAddressRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationshipToIdentity(a.CoreAddress.from(e.address));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d),t.GetRelationshipByAddressUseCase=d},3457:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipsUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(4316);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipsRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetRelationshipsUseCase extends l.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=GetRelationshipsUseCase.queryTranslator.parse(e.query),r=await this.relationshipsController.getRelationships(t);return a.Result.ok(d.RelationshipMapper.toRelationshipDTOList(r))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.peer))]:!0,[(0,u.nameof)((e=>e.status))]:!0,[`${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`]:!0},alias:{[`${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`]:`${(0,u.nameof)((e=>e.cache))}.${(0,u.nameof)((e=>e.template))}.${(0,u.nameof)((e=>e.id))}`,[(0,u.nameof)((e=>e.status))]:(0,u.nameof)((e=>e.status)),[(0,u.nameof)((e=>e.peer))]:`${(0,u.nameof)((e=>e.peer))}.${(0,u.nameof)((e=>e.address))}`}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.RelationshipsController,f])],y),t.GetRelationshipsUseCase=y},2214:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RejectRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RejectRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.rejectChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d),t.RejectRelationshipChangeUseCase=d},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipMapper=void 0;const i=r(9663),n=r(7049),s=r(8434);t.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Relationship,e.id.toString());return{id:e.id.toString(),template:s.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.cache.template),status:e.status,peer:e.peer.address.toString(),peerIdentity:{address:e.peer.address.toString(),publicKey:e.peer.publicKey.toString(),realm:e.peer.realm},changes:e.cache.changes.map((e=>this.toRelationshipChangeDTO(e)))}}static toRelationshipDTOList(e){return e.map((e=>this.toRelationshipDTO(e)))}static toRelationshipChangeRequestDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeResponseDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeDTO(e){return{id:e.id.toString(),request:this.toRelationshipChangeRequestDTO(e.request),status:e.status,type:e.type,response:e.response?this.toRelationshipChangeResponseDTO(e.response):void 0}}}},5261:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RevokeRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RevokeRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RevokeRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.revokeChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d),t.RevokeRelationshipChangeUseCase=d},7831:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3018),t),n(r(3986),t),n(r(1041),t),n(r(9456),t),n(r(215),t),n(r(3457),t),n(r(2214),t),n(r(4316),t),n(r(5261),t)},429:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnTokenUseCase=void 0;const o=r(194),a=r(5172),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnTokenRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class CreateOwnTokenUseCase extends d.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;try{t=o.Serializable.fromUnknown(e.content)}catch{throw d.RuntimeErrors.general.invalidTokenContent()}const r=await this.tokenController.sendToken({content:t,expiresAt:c.CoreDate.from(e.expiresAt),ephemeral:e.ephemeral});return e.ephemeral||await this.accountController.syncDatawallet(),a.Result.ok(f.TokenMapper.toTokenDTO(r,e.ephemeral))}};h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,y])],h),t.CreateOwnTokenUseCase=h},7896:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetQRCodeForTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetQRCodeForTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class GetQRCodeForTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Token));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,p])],l),t.GetQRCodeForTokenUseCase=l},858:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));return t?o.Result.ok(p.TokenMapper.toTokenDTO(t,!1)):o.Result.fail(u.RuntimeErrors.general.recordNotFound("Token"))}};d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,l])],d),t.GetTokenUseCase=d},2093:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokensUseCase=void 0;const o=r(2937),a=r(5172),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(7121);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetTokensRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetTokensUseCase extends l.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=GetTokensUseCase.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,u.nameof)((e=>e.isOwn))]=e.ownerRestriction===l.OwnerRestriction.Own);const r=await this.tokenController.getTokens(t);return a.Result.ok(d.TokenMapper.toTokenDTOList(r,!1))}};y.queryTranslator=new o.QueryTranslator({whitelist:{[(0,u.nameof)((e=>e.createdAt))]:!0,[(0,u.nameof)((e=>e.createdBy))]:!0,[(0,u.nameof)((e=>e.createdByDevice))]:!0,[(0,u.nameof)((e=>e.expiresAt))]:!0},alias:{[(0,u.nameof)((e=>e.createdAt))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdAt))]}`,[(0,u.nameof)((e=>e.createdBy))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdBy))]}`,[(0,u.nameof)((e=>e.createdByDevice))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.createdByDevice))]}`,[(0,u.nameof)((e=>e.expiresAt))]:`${(0,u.nameof)((e=>e.cache))}.${[(0,u.nameof)((e=>e.expiresAt))]}`}}),y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.TokenController,f])],y),t.GetTokensUseCase=y},8442:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);function isLoadPeerTokenViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerTokenViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerTokenViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerTokenViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerTokenViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerTokenViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenUseCase extends p.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;if(isLoadPeerTokenViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.tokenController.loadPeerToken(c.CoreId.from(e.id),r,e.ephemeral)}else{if(!isLoadPeerTokenViaReference(e))throw new Error("Invalid request format.");t=await this.tokenController.loadPeerTokenByTruncated(e.reference,e.ephemeral)}return e.ephemeral||await this.accountController.syncDatawallet(),o.Result.ok(l.TokenMapper.toTokenDTO(t,e.ephemeral))}};f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,d])],f),t.LoadPeerTokenUseCase=f},7121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMapper=void 0;const i=r(9663),n=r(7049);class TokenMapper{static toTokenDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Token,e.id.toString());const r=e.toTokenReference();return{id:e.id.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),content:e.cache.content.toJSON(),createdAt:e.cache.createdAt.toString(),expiresAt:e.cache.expiresAt.toString(),secretKey:e.secretKey.toBase64(),truncatedReference:r.truncate(),isEphemeral:t}}static toTokenDTOList(e,t){return e.map((e=>TokenMapper.toTokenDTO(e,t)))}}t.TokenMapper=TokenMapper},5631:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(429),t),n(r(7896),t),n(r(858),t),n(r(2093),t),n(r(8442),t),n(r(7121),t)},9126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[A-z_@][A-z@0-9-_]*(\.[A-z_@][A-z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(e={}){this.ops=e.ops??["!","^","$","~",">","<","$containsAny","$containsNone"],this.alias=e.alias??{},this.blacklist=e.blacklist??{},this.whitelist=e.whitelist??{},this.custom=e.custom??{},e.string=e.string??{},this.string=e.string,this.string.toBoolean="boolean"!=typeof e.string.toBoolean||e.string.toBoolean,this.string.toNumber="boolean"!=typeof e.string.toNumber||e.string.toNumber,this.keyRegex=e.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=e.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=e.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(e){QueryTranslator.defaultKeyRegex=e}static setDefaultValRegex(e){QueryTranslator.defaultValRegex=e}static setDefaultArrRegex(e){QueryTranslator.defaultArrRegex=e}parseString(e,t){let r=e[0]||"";const i="="===e[1];let n=e.substr(i?2:1)||"";const s=this.parseStringVal(n),o={op:r,org:n,value:s};switch(r){case"!":t?o.field="$containsNone":""===n?(o.field="$exists",o.value=!1):o.field="$ne";break;case">":o.field=i?"$gte":"$gt";break;case"<":o.field=i?"$lte":"$lt";break;case"^":case"$":case"~":switch(o.field="$regex",o.options="i",o.value=this.valRegex?n.replace(this.valRegex,""):o.value.toString(),r){case"^":o.value=`^${s}`;break;case"$":o.value=`${s}$`}break;default:o.org=n=r+n,o.op=r="",o.value=this.parseStringVal(n),t?o.field="$containsAny":""===n?(o.field="$exists",o.value=!0):o.field="$eq"}return o.parsed={},o.parsed[o.field]=o.value,o.options&&(o.parsed.$options=o.options),o}parseStringVal(e){return!(!this.string.toBoolean||"true"!==e.toLowerCase())||(!this.string.toBoolean||"false"!==e.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(e,10))&&+e-+e+1>=0?parseFloat(e):e)}parse(e){if(!e)return{};const t={};for(let r of Object.keys(e)){const i=e[r];if(Array.isArray(i)&&(r=r.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[r])&&!this.blacklist[r]&&(this.alias[r]&&(r=this.alias[r]),("string"!=typeof i||this.keyRegex.test(r))&&(!Array.isArray(i)||this.arrRegex.test(r))))if("function"!=typeof this.custom[r])if(Array.isArray(i)){if(this.ops.includes("$containsAny")&&i.length>0){t[r]={};for(const e of i)if(this.ops.includes(e[0])){const i=this.parseString(e,!0);switch(i.field){case"$containsAny":case"$containsNone":t[r][i.field]=t[r][i.field]||[],t[r][i.field].push(i.value);break;case"$regex":t[r].$regex=i.value,t[r].$options=i.options;break;default:t[r][i.field]=i.value}}else t[r].$containsAny=t[r].$containsAny||[],t[r].$containsAny.push(this.parseStringVal(e))}}else"string"==typeof i&&(i?this.ops.includes(i[0])?t[r]=this.parseString(i).parsed:t[r]=this.parseStringVal(i):t[r]={$exists:!0});else this.custom[r].apply(null,[t,i])}return t}}t.QueryTranslator=QueryTranslator},2937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;var i=r(9126);Object.defineProperty(t,"QueryTranslator",{enumerable:!0,get:function(){return i.QueryTranslator}})},1174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventNamespaceFromObject=t.EventBus=void 0;t.EventBus=class EventBus{},t.getEventNamespaceFromObject=function getEventNamespaceFromObject(e){return e.namespace}},5970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(e){this.namespace=e}static from(e){return e instanceof Function?new ConstructorSubscriptionTargetInfo(e):new NamespaceSubscriptionTargetInfo(e)}}t.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(e){super(function getEventNamespaceFromClass(e){return e.namespace}(e)),this.constructorFunction=e}isCompatibleWith(e){return e instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(e){super(e)}isCompatibleWith(e){return!0}}},9729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter2EventBus=void 0;const i=r(6387);r(8660);const n=r(9159),s=r(5970);t.EventEmitter2EventBus=class EventEmitter2EventBus{errorCallback;emitter;listeners=new Map;nextId=0;invocationPromises=[];constructor(e,t){this.errorCallback=e,this.emitter=new i.EventEmitter2({maxListeners:50,verboseMemoryLeak:!0,...t,wildcard:!0})}subscribe(e,t){return this.registerHandler(e,t)}subscribeOnce(e,t){return this.registerHandler(e,t,!0)}unsubscribe(e){return this.unregisterHandler(e)}registerHandler(e,t,r=!1){const i=s.SubscriptionTargetInfo.from(e),n=this.nextId++,handlerWrapper=async e=>{if(!i.isCompatibleWith(e))return;const s=(async()=>await t(e))();this.invocationPromises.push(s),await s.catch((e=>this.errorCallback(e,i.namespace))),this.invocationPromises=this.invocationPromises.filter((e=>e!==s)),r&&this.listeners.delete(n)};if(r){const e=this.emitter.once(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,e),n}const o=this.emitter.on(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,o),n}unregisterHandler(e){const t=this.listeners.get(e);return!!t&&(t.off(),this.listeners.delete(e),!0)}publish(e){const t=(0,n.getEventNamespaceFromObject)(e);if(!t)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(t,e)}async close(e){this.emitter.removeAllListeners();const t=Promise.all(this.invocationPromises).catch((()=>{}));if(!e)return void await t;let r;const i=new Promise(((t,i)=>{r=setTimeout((()=>{i(new Error("timeout exceeded while waiting for events to process"))}),e)}));await Promise.race([t,i]),clearTimeout(r)}}},9256:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9159),t),n(r(9729),t)},5917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(8267);class DataEvent extends i.Event{data;constructor(e,t){super(e),this.data=t}}t.DataEvent=DataEvent},8267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{namespace;constructor(e){this.namespace=e}}},2636:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5917),t),n(r(8267),t)},5172:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9256),t),n(r(2636),t),n(r(9855),t),n(r(1809),t),n(r(4569),t),n(r(1174),t),n(r(7226),t),n(r(7374),t)},9855:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0;const n=i(r(4530));t.log=function log(e){return function(t,r,i){const s=i.value;return i.value=function(...t){const i=this;try{e?.logParams?i.log.trace(`Calling ${r}(${t.map((e=>(0,n.default)(e))).join(", ")})`):i.log.trace(`Calling ${r}`);const o=s.apply(this,t);return e?.logReturnValue?i.log.trace(`Returning from ${r} with: ${(0,n.default)(o)}`):i.log.trace(`Returning from ${r}`),o}catch(e){throw e instanceof Error&&e.stack&&(e.stack=e.stack.split("\n").filter((e=>!e.includes(".propertyDescriptorDoNotChangeMyNamePlease.value"))).join("\n")),i.log.error(`Error in ${r}:`,e),e}},i}}},1809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureExcecutionTime=void 0,t.measureExcecutionTime=function measureExcecutionTime(e,t,r){const i=r.value;return r.value=async function(...e){const t=Date.now(),r=await i.apply(this,e),n=Date.now();return console.info(`Execution time: ${n-t}ms`),r},r}},4569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=void 0,t.randomString=function randomString(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";const i=t.length;for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*i));return r}},7807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(e,t,r){super(t),this.code=e,this.data=r}equals(e){return this.code===e.code}toString(){return JSON.stringify({code:this.code,message:this.message,data:this.data},void 0,2)}}t.ApplicationError=ApplicationError},9278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;class Result{_isSuccess;_error;_value;constructor(e,t,r){if(e&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!e&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==t&&!e)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=t,this._isSuccess=e,this._error=r}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error(`Can't get the value of an error result. Use 'error' instead. Root error: \r\n${this.error}`);return this._value}static ok(e){return new Result(!0,e)}static fail(e){return new Result(!1,void 0,e)}}t.Result=Result},7226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7807),t),n(r(9278),t)},7374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function sleep(e){return new Promise((t=>{setTimeout(t,e)}))}},3351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(1581),n=r(3487),s=r(7023),o=r(4815),a=r(4181),c=r(2141),u="errorMessage",p=new i.Name("emUsed"),l={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,f=/\$\{([^}]+)\}/g,y=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(e){return{keyword:u,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:h,schema:m,schemaValue:g,it:v}=t;if(!1===v.createErrors)return;const b=m,R=n.strConcat(c.default.instancePath,v.errorPath);function matchKeywordError(e,t){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath === ${R}`,i._`${e}.keyword in ${t}`,i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function getTemplatesCode(e,t){const i=[];for(const r in e){const e=t[r];d.test(e)&&i.push([r,templateFunc(e)])}return r.object(...i)}function templateExpr(e){return d.test(e)?new s._Code(s.safeStringify(e).replace(f,((e,t)=>`" + JSON.stringify(${o.getData(t,v)}) + "`)).replace(y,"")):i.stringify(e)}function templateFunc(e){return i._`function(){return ${templateExpr(e)}}`}r.if(i._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[s,o]=function keywordErrorsConfig(e){let t,r;for(const i in e){if("properties"===i||"items"===i)continue;const n=e[i];if("object"==typeof n){t||(t={});const e=t[i]={};for(const t in n)e[t]=[]}else r||(r={}),r[i]=[]}return[t,r]}(b);o&&function processKeywordErrors(n){const s=r.const("emErrors",i.stringify(n)),o=r.const("templates",getTemplatesCode(n,m));r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,s),(()=>r.code(i._`${s}[${e}.keyword].push(${e})`).assign(i._`${e}.${p}`,!0)))));const{singleError:u}=e;if(u){const e=r.let("message",i._`""`),n=r.let("paramsErrors",i._`[]`);loopErrors((t=>{r.if(e,(()=>r.code(i._`${e} += ${"string"==typeof u?u:";"}`))),r.code(i._`${e} += ${errMessage(t)}`),r.assign(n,i._`${n}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:i._`{errors: ${n}}`})}else loopErrors((e=>a.reportError(t,{message:errMessage(e),params:i._`{errors: ${s}[${e}]}`})));function loopErrors(e){r.forIn("key",s,(t=>r.if(i._`${s}[${t}].length`,(()=>e(t)))))}function errMessage(e){return i._`${e} in ${o} ? ${o}[${e}]() : ${g}[${e}]`}}(o),s&&function processKeywordPropErrors(e){const n=r.const("emErrors",i.stringify(e)),s=[];for(const t in e)s.push([t,getTemplatesCode(e[t],m[t])]);const o=r.const("templates",r.object(...s)),u=r.scopeValue("obj",{ref:l,code:i.stringify(l)}),d=r.let("emPropParams"),f=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,n),(()=>{r.assign(d,i._`${u}[${e}.keyword]`),r.assign(f,i._`${n}[${e}.keyword][${e}.params[${d}]]`),r.if(f,(()=>r.code(i._`${f}.push(${e})`).assign(i._`${e}.${p}`,!0)))})))),r.forIn("key",n,(e=>r.forIn("keyProp",i._`${n}[${e}]`,(s=>{r.assign(f,i._`${n}[${e}][${s}]`),r.if(i._`${f}.length`,(()=>{const n=r.const("tmpl",i._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:i._`${n} ? ${n}() : ${g}[${e}][${s}]`,params:i._`{errors: ${f}}`})}))}))))}(s),function processChildErrors(e){const{props:s,items:o}=e;if(!s&&!o)return;const l=i._`typeof ${h} == "object"`,d=i._`Array.isArray(${h})`,f=r.let("emErrors");let y,v;const b=r.let("templates");s&&o?(y=r.let("emChildKwd"),r.if(l),r.if(d,(()=>{init(o,m.items),r.assign(y,i.str`items`)}),(()=>{init(s,m.properties),r.assign(y,i.str`properties`)})),v=i._`[${y}]`):o?(r.if(d),init(o,m.items),v=i._`.items`):s&&(r.if(n.and(l,n.not(d))),init(s,m.properties),v=i._`.properties`);function init(e,t){r.assign(f,i.stringify(e)),r.assign(b,getTemplatesCode(e,t))}r.forOf("err",c.default.vErrors,(e=>function ifMatchesChildError(e,t,s){r.if(n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath.indexOf(${R}) === 0`),(()=>{const n=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=r.const("emMatches",i._`${n}.exec(${e}.instancePath.slice(${R}.length))`),a=r.const("emChild",i._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(i._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,f,(t=>r.code(i._`${f}[${t}].push(${e})`).assign(i._`${e}.${p}`,!0))))),r.forIn("key",f,(e=>r.if(i._`${f}[${e}].length`,(()=>{a.reportError(t,{message:i._`${e} in ${b} ? ${b}[${e}]() : ${g}${v}[${e}]`,params:i._`{errors: ${f}[${e}]}`}),r.assign(i._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,i._`${R} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function childErrorsConfig({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[]}return r}(b))}const s="string"==typeof b?b:b._;s&&function processAllErrors(e){const s=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(e=>r.if(function matchAnyError(e){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,n.or(i._`${e}.instancePath === ${R}`,n.and(i._`${e}.instancePath.indexOf(${R}) === 0`,i._`${e}.instancePath[${R}.length] === "/"`)),i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(i._`${s}.push(${e})`).assign(i._`${e}.${p}`,!0))))),r.if(i._`${s}.length`,(()=>a.reportError(t,{message:templateExpr(e),params:i._`{errors: ${s}}`})))}(s),e.keepErrors||function removeUsedErrors(){const e=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(i._`!${t}.${p}`,(()=>r.code(i._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,i._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(errorMessage(t))};t.default=ajvErrors,e.exports=ajvErrors,e.exports.default=ajvErrors},6870:(e,t)=>{"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(e){const t=e.split(s);return 2===t.length&&date(t[0])&&time(t[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return o.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(u.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return c.lastIndex=0,c.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:i[s])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=n.exec(e);if(!r)return!1;const i=+r[1],s=+r[2],o=+r[3],a=r[5];return(i<=23&&s<=59&&o<=59||23===i&&59===s&&60===o)&&(!t||""!==a)}function compareTime(e,t){if(!e||!t)return;const r=n.exec(e),i=n.exec(t);return r&&i?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=i[1]+i[2]+i[3]+(i[4]||""))?1:e<t?-1:0:void 0}const s=/t|\s/i;function compareDateTime(e,t){if(!e||!t)return;const[r,i]=e.split(s),[n,o]=t.split(s),a=compareDate(r,n);return void 0!==a?a||compareTime(i,o):void 0}const o=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function validateNumber(){return!0}const u=/[^\\]\\Z/},5477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6870),n=r(7963),s=r(3487),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,i.fullFormats,o),e;const[r,s]="fast"===t.mode?[i.fastFormats,a]:[i.fullFormats,o];return addFormats(e,t.formats||i.formatNames,r,s),t.keywords&&n.default(e),e};function addFormats(e,t,r,i){var n,o;null!==(n=(o=e.opts.code).formats)&&void 0!==n||(o.formats=s._`require("ajv-formats/dist/formats").${i}`);for(const i of t)e.addFormat(i,r[i])}formatsPlugin.get=(e,t="full")=>{const r=("fast"===t?i.fastFormats:i.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},7963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const i=r(1581),n=r(3487),s=n.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:u,self:p}=c;if(!u.validateFormats)return;const l=new i.KeywordCxt(c,p.RULES.all.format.definition,"format");function compareCode(e){return n._`${e}.compare(${r}, ${s}) ${o[a].fail} 0`}l.$data?function validate$DataFormat(){const r=t.scopeValue("formats",{ref:p.formats,code:u.code.formats}),i=t.const("fmt",n._`${r}[${l.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,compareCode(i)))}():function validateFormat(){const r=l.schema,i=p.formats[r];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:i,code:u.code.formats?n._`${u.code.formats}${n.getProperty(r)}`:void 0});e.fail$data(compareCode(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=r(7159),n=r(3924),s=r(1240),o=r(98),a=["/properties"],c="http://json-schema.org/draft-07/schema";class Ajv extends i.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var u=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},7023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function _(e,...t){const r=[e[0]];let i=0;for(;i<t.length;)addCodeArg(r,t[i]),r.push(e[++i]);return new _Code(r)}t._Code=_Code,t.nil=new _Code(""),t._=_;const r=new _Code("+");function str(e,...t){const i=[safeStringify(e[0])];let n=0;for(;n<t.length;)i.push(r),addCodeArg(i,t[n]),i.push(r,safeStringify(e[++n]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(i),new _Code(i)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=r(7023),n=r(8490);var s=r(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=r(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof i.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let i=r.length;for(;i--;){const n=r[i];n.optimizeNames(e,t)||(subtractNames(e,n.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:s}=this;return`for(${t} ${r}=${i}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(i=this.finally)||void 0===i||i.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof i._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){return e instanceof i.Name?replaceName(e):function canOptimize(e){return e instanceof i._Code&&e._items.some((e=>e instanceof i.Name&&1===t[e.str]&&void 0!==r[e.str]))}(e)?new i._Code(e._items.reduce(((e,t)=>(t instanceof i.Name&&(t=replaceName(t)),t instanceof i._Code?e.push(...t._items):e.push(t),e)),[])):e;function replaceName(e){const i=r[e.str];return void 0===i||1!==t[e.str]?e:(delete t[e.str],i)}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:i._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){const n=this._scope.toName(t);return void 0!==r&&i&&(this._constants[n.str]=r),this._leafNode(new Def(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==i.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,n));return t.push("}"),new i._Code(t)}if(e,t,r){if(this._blockNode(new If(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,i,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(s,o,t,r),(()=>i(o)))}forOf(e,t,r,s=n.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${e}.length`,(t=>{this.var(o,i._`${e}[${t}]`),r(o)}))}return this._for(new ForIter("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,i._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new ForIter("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new Try;if(this._blockNode(i),this.code(e),t){const e=this.name("e");this._currNode=i.catch=new Catch(e),t(e)}return r&&(this._currNode=i.finally=new Finally,this.code(r)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=i.nil,r,n){return this._blockNode(new Func(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const a=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(a)};const c=mappend(t.operators.OR);function mappend(e){return(t,r)=>t===i.nil?r:r===i.nil?t:i._`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof i.Name?e:i._`(${e})`}t.or=function or(...e){return e.reduce(c)}},8490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=r(7023);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof i.Name?e:this.name(e)}name(e){return new i.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends i.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=i._`.${new i.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const s=i._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:i.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(e),{prefix:n}=i,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[n];if(o){const e=o.get(s);if(e)return e}else o=this._values[n]=new Map;o.set(s,i);const a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},o){let a=i.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,n.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;a=i._`${a}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(e)))throw new ValueError(e);a=i._`${a}${s}${this.opts._n}`}p.set(e,n.Completed)}))}return a}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=r(3487),n=r(6776),s=r(2141);function addError(e,t){const r=e.const("err",t);e.if(i._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,i._`[${r}]`)),i._`${s.default.vErrors}.push(${r})`),e.code(i._`${s.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(i._`new ${e.ValidationError}(${t})`):(r.assign(i._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>i.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?i.str`"${e}" keyword must be ${t} ($data)`:i.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,r=t.keywordError,n,s){const{it:o}=e,{gen:a,compositeRule:c,allErrors:u}=o,p=errorObjectCode(e,r,n);(null!=s?s:c||u)?addError(a,p):returnErrors(o,i._`[${p}]`)},t.reportExtraError=function reportExtraError(e,r=t.keywordError,i){const{it:n}=e,{gen:o,compositeRule:a,allErrors:c}=n;addError(o,errorObjectCode(e,r,i)),a||c||returnErrors(n,s.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(s.default.errors,t),e.if(i._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(i._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,i._`${s.default.vErrors}[${o}]`),e.if(i._`${c}.instancePath === undefined`,(()=>e.assign(i._`${c}.instancePath`,(0,i.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(i._`${c}.schemaPath`,i.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(i._`${c}.schema`,r),e.assign(i._`${c}.data`,n))}))};const o={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:n}=e.it;return!1===n?i._`{}`:function errorObject(e,t,r={}){const{gen:n,it:a}=e,c=[errorInstancePath(a,r),errorSchemaPath(e,r)];return function extraErrorProps(e,{params:t,message:r},n){const{keyword:a,data:c,schemaValue:u,it:p}=e,{opts:l,propertyName:d,topSchemaRef:f,schemaPath:y}=p;n.push([o.keyword,a],[o.params,"function"==typeof t?t(e):t||i._`{}`]),l.messages&&n.push([o.message,"function"==typeof r?r(e):r]);l.verbose&&n.push([o.schema,u],[o.parentSchema,i._`${f}${y}`],[s.default.data,c]);d&&n.push([o.propertyName,d])}(e,t,c),n.object(...c)}(e,t,r)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?i.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let a=s?t:i.str`${t}/${e}`;return r&&(a=i.str`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`),[o.schemaPath,a]}},5173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=r(3487),n=r(7426),s=r(2141),o=r(2531),a=r(6776),c=r(4815);class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:u}=this.opts.code,{ownProperties:p}=this.opts,l=new i.CodeGen(this.scope,{es5:a,lines:u,ownProperties:p});let d;e.$async&&(d=l.scopeValue("Error",{ref:n.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const f=l.scopeName("validate");e.validateName=f;const y={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,i.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:i.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,c.validateFunctionCode)(y),l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof i.Name?void 0:e,items:t instanceof i.Name?void 0:t,dynamicProps:e instanceof i.Name,dynamicItems:t instanceof i.Name},r.source&&(r.source.evaluated=(0,i.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const i of this._compilations)if(r=e,(t=i).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i;var t,r}function resolve(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r);let n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return getJsonPointer.call(this,r,e);const s=(0,o.normalizeId)(i),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=resolveSchema.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||compileSchema.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:n})}return getJsonPointer.call(this,r,a)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let s=resolve.call(this,e,r);if(void 0===s){const n=null===(i=e.localRefs)||void 0===i?void 0:i[r],{schemaId:o}=this.opts;n&&(s=new SchemaEnv({schema:n,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[r]=inlineOrCompile.call(this,s):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:i}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(i)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!u.has(i)&&n&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=resolveSchema.call(this,i,e)}const{schemaId:c}=this.opts;return s=s||new SchemaEnv({schema:r,schemaId:c,root:i,baseId:t}),s.schema!==s.root.schema?s:void 0}},2141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=n},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(2531);class MissingRefError extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,i.resolveUrl)(e,t,r),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(e,this.missingRef))}}t.default=MissingRefError},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=r(6776),n=r(4063),s=r(9461),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return!0;if("object"==typeof r&&hasRef(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!o.has(r)&&("object"==typeof e[r]&&(0,i.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e,t="",r){!1!==r&&(t=normalizeId(t));const i=e.parse(t);return _getFullPath(e,i)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t,r){return r=normalizeId(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:i}=this.opts,o=normalizeId(e[r]||t),a={"":o},c=getFullPath(i,o,!1),p={},l=new Set;return s(e,{allKeys:!0},((e,t,i,n)=>{if(void 0===n)return;const s=c+t;let o=a[n];function addRef(t){const r=this.opts.uriResolver.resolve;if(t=normalizeId(o?r(o,t):t),l.has(t))throw ambiguos(t);l.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?checkAmbiguosRef(e,i.schema,t):t!==normalizeId(s)&&("#"===t[0]?(checkAmbiguosRef(e,p[t],t),p[t]=e):this.refs[t]=s),t}function addAnchor(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=addRef.call(this,e[r])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),a[t]=o})),p;function checkAmbiguosRef(e,t,r){if(void 0!==t&&!n(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&r.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=r(3487),n=r(7023);function checkUnknownRules(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=i.RULES.keywords;for(const r in t)n[r]||checkStrictMode(e,`unknown keyword: "${r}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,a,c)=>{const u=void 0===a?o:a instanceof i.Name?(o instanceof i.Name?e(s,o,a):t(s,o,a),a):o instanceof i.Name?(t(s,a,o),o):r(o,a);return c!==i.Name||u instanceof i.Name?u:n(s,u)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",i._`{}`);return void 0!==t&&setEvaluated(e,r,t),r}function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign(i._`${t}${(0,i.getProperty)(r)}`,!0)))}t.toHash=function toHash(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return i._`${r}`}return i._`${e}${t}${(0,i.getProperty)(n)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>{e.if(i._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,i._`${r} || {}`).code(i._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,i._`${r} || {}`),setEvaluated(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,i._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>e.assign(r,!0===t||i._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const s={};var o;function checkStrictMode(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(o=t.Type||(t.Type={})),t.getErrorPath=function getErrorPath(e,t,r){if(e instanceof i.Name){const n=t===o.Num;return r?n?i._`"[" + ${e} + "]"`:i._`"['" + ${e} + "']"`:n?i._`"/" + ${e}`:i._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,i.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},8876:(e,t)=>{"use strict";function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},r){const i=t.RULES.types[r];return i&&!0!==i&&shouldUseGroup(e,i)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},5667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=r(4181),n=r(3487),s=r(2141),o={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,i.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:i}=e;!1===r?falseSchemaError(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:r,schema:i}=e;!1===i?(r.var(t,!1),falseSchemaError(e)):r.var(t,!0)}},453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=r(3141),n=r(8876),s=r(4181),o=r(3487),a=r(6776);var c;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:r,data:i,opts:s}=e,a=function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(p){const n=checkDataTypes(t,i,s.strictNumbers,c.Wrong);r.if(n,(()=>{a.length?function coerceData(e,t,r){const{gen:i,data:n,opts:s}=e,a=i.let("dataType",o._`typeof ${n}`),c=i.let("coerced",o._`undefined`);"array"===s.coerceTypes&&i.if(o._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>i.assign(n,o._`${n}[0]`).assign(a,o._`typeof ${n}`).if(checkDataTypes(t,n,s.strictNumbers),(()=>i.assign(c,n)))));i.if(o._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void i.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${n}`).elseIf(o._`${n} === null`).assign(c,o._`""`);case"number":return void i.elseIf(o._`${a} == "boolean" || ${n} === null
3
3
  || (${a} == "string" && ${n} && ${n} == +${n})`).assign(c,o._`+${n}`);case"integer":return void i.elseIf(o._`${a} === "boolean" || ${n} === null
4
4
  || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(c,o._`+${n}`);case"boolean":return void i.elseIf(o._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(c,!1).elseIf(o._`${n} === "true" || ${n} === 1`).assign(c,!0);case"null":return i.elseIf(o._`${n} === "" || ${n} === 0 || ${n} === false`),void i.assign(c,null);case"array":i.elseIf(o._`${a} === "string" || ${a} === "number"
5
- || ${a} === "boolean" || ${n} === null`).assign(c,o._`[${n}]`)}}i.else(),reportTypeError(e),i.endIf(),i.if(o._`${c} !== undefined`,(()=>{i.assign(n,c),function assignParentData({gen:e,parentData:t,parentDataProperty:r},i){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,i)))}(e,c)}))}(e,t,a):reportTypeError(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function checkDataType(e,t,r,i=c.Correct){const n=i===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${n} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=numCond(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=numCond();break;default:return o._`typeof ${t} ${n} ${e}`}return i===c.Correct?s:(0,o.not)(s);function numCond(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function checkDataTypes(e,t,r,i){if(1===e.length)return checkDataType(e[0],t,r,i);let n;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;n=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=o.nil;s.number&&delete s.integer;for(const e in s)n=(0,o.and)(n,checkDataType(e,t,r,i));return n}t.checkDataType=checkDataType,t.checkDataTypes=checkDataTypes;const l={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function reportTypeError(e){const t=function getTypeErrorContext(e){const{gen:t,data:r,schema:i}=e,n=(0,a.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}(e);(0,s.reportError)(t,l)}t.reportTypeError=reportTypeError},313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const i=r(3487),n=r(6776);function assignDefault(e,t,r){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const u=i._`${a}${(0,i.getProperty)(t)}`;if(o)return void(0,n.checkStrictMode)(e,`default is ignored for: ${u}`);let l=i._`${u} === undefined`;"empty"===c.useDefaults&&(l=i._`${l} || ${u} === null || ${u} === ""`),s.if(l,i._`${u} = ${(0,i.stringify)(r)}`)}t.assignDefaults=function assignDefaults(e,t){const{properties:r,items:i}=e.schema;if("object"===t&&r)for(const t in r)assignDefault(e,t,r[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,r)=>assignDefault(e,r,t.default)))}},4815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const i=r(5667),n=r(453),s=r(8876),o=r(453),a=r(313),c=r(5005),u=r(3099),l=r(3487),p=r(2141),d=r(2531),f=r(6776),y=r(4181);function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},s){n.code.es5?e.func(t,l._`${p.default.data}, ${p.default.valCxt}`,i.$async,(()=>{e.code(l._`"use strict"; ${funcSourceUrl(r,n)}`),function destructureValCxtES5(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,l._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,l._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,l._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,l._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,l._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,l._`""`),e.var(p.default.parentData,l._`undefined`),e.var(p.default.parentDataProperty,l._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,l._`{}`)}))}(e,n),e.code(s)})):e.func(t,l._`${p.default.data}, ${function destructureValCxt(e){return l._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?l._`, ${p.default.dynamicAnchors}={}`:l.nil}}={}`}(n)}`,i.$async,(()=>e.code(funcSourceUrl(r,n)).code(s)))}function funcSourceUrl(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function subschemaCode(e,t){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function subSchemaObjCode(e,t){const{schema:r,gen:i,opts:n}=e;n.$comment&&r.$comment&&commentKeyword(e);(function updateContext(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=i.const("_errs",p.default.errors);typeAndKeywords(e,s),i.var(t,l._`${s} === ${p.default.errors}`)}(e,t):(0,i.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function isSchemaObj(e){return"boolean"!=typeof e.schema}function checkKeywords(e){(0,f.checkUnknownRules)(e),function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:i,self:n}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],!1,t);const r=(0,n.getSchemaTypes)(e.schema);schemaKeywords(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){const s=r.$comment;if(!0===n.$comment)e.code(l._`${p.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const r=l.str`${i}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code(l._`${p.default.self}.opts.$comment(${s}, ${r}, ${n}.schema)`)}}function schemaKeywords(e,t,r,i){const{gen:n,schema:a,data:c,allErrors:u,opts:d,self:y}=e,{RULES:h}=y;function groupKeywords(f){(0,s.shouldUseGroup)(a,f)&&(f.type?(n.if((0,o.checkDataType)(f.type,c,d.strictNumbers)),iterateKeywords(e,f),1===t.length&&t[0]===f.type&&r&&(n.else(),(0,o.reportTypeError)(e)),n.endIf()):iterateKeywords(e,f),u||n.if(l._`${p.default.errors} === ${i||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,h)?(d.jtd||function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{includesType(e.dataTypes,t)||strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>includesType(t,e)))})(e,t),e.opts.allowUnionTypes||function checkMultipleTypes(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&strictTypesError(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const i in r){const n=r[i];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;r.length&&!r.some((e=>hasApplicableType(t,e)))&&strictTypesError(e,`missing type "${r.join(",")}" for keyword "${i}"`)}}}(e,e.dataTypes)}(e,t),n.block((()=>{for(const e of h.rules)groupKeywords(e);groupKeywords(h.post)}))):n.block((()=>keywordCode(e,"$ref",h.all.$ref.definition)))}function iterateKeywords(e,t){const{gen:r,schema:i,opts:{useDefaults:n}}=e;n&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(i,r)&&keywordCode(e,r.keyword,r.definition,t.type)}))}function hasApplicableType(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function includesType(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function strictTypesError(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function validateFunctionCode(e){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function topSchemaObjCode(e){const{schema:t,opts:r,gen:i}=e;return void validateFunction(e,(()=>{r.$comment&&t.$comment&&commentKeyword(e),function checkNoDefault(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(p.default.vErrors,null),i.let(p.default.errors,0),r.unevaluated&&function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),typeAndKeywords(e),function returnResults(e){const{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:s}=e;r.$async?t.if(l._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(l._`new ${n}(${p.default.vErrors})`))):(t.assign(l._`${i}.errors`,p.default.vErrors),s.unevaluated&&function assignEvaluated({gen:e,evaluated:t,props:r,items:i}){r instanceof l.Name&&e.assign(l._`${t}.props`,r);i instanceof l.Name&&e.assign(l._`${t}.items`,i)}(e),t.return(l._`${p.default.errors} === 0`))}(e)}))}(e):validateFunction(e,(()=>(0,i.topBoolOrEmptySchema)(e)))};class KeywordCxt{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",getData(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?y.reportExtraError:y.reportError)(this,this.def.error,t)}$dataError(){(0,y.reportError)(this,this.def.$dataError||y.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,y.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:n,def:s}=this;r.if((0,l.or)(l._`${i} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(n.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,l.or)(function wrong$DataType(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return l.nil}(),function invalid$DataSchema(){if(i.validateSchema){const r=e.scopeValue("validate$data",{ref:i.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return subschemaCode(i,t),i}mergeEvaluated(e,t){const{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function keywordCode(e,t,r,i){const n=new KeywordCxt(e,r,t);"code"in r?r.code(n,i):n.$data&&r.validate?(0,c.funcKeywordCode)(n,r):"macro"in r?(0,c.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(n,r)}t.KeywordCxt=KeywordCxt;const h=/^\/(?:[^~]|~0|~1)*$/,m=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,s;if(""===e)return p.default.rootData;if("/"===e[0]){if(!h.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=p.default.rootData}else{const o=m.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=t)throw new Error(errorMsg("property/index",a));return i[t-a]}if(a>t)throw new Error(errorMsg("data",a));if(s=r[t-a],!n)return s}let o=s;const a=n.split("/");for(const e of a)e&&(s=l._`${s}${(0,l.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=l._`${o} && ${s}`);return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},5005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const i=r(3487),n=r(2141),s=r(412),o=r(4181);function modifyData(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,i._`${n.parentData}[${n.parentDataProperty}]`)))}function useKeyword(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,i.stringify)(r)})}t.macroKeywordCode=function macroKeywordCode(e,t){const{gen:r,keyword:n,schema:s,parentSchema:o,it:a}=e,c=t.macro.call(a.self,s,o,a),u=useKeyword(r,n,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const l=r.name("valid");e.subschema({schema:c,schemaPath:i.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},t.funcKeywordCode=function funcKeywordCode(e,t){var r;const{gen:a,keyword:c,schema:u,parentSchema:l,$data:p,it:d}=e;!function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(d,t);const f=!p&&t.compile?t.compile.call(d.self,u,l,d):t.validate,y=useKeyword(a,c,f),h=a.let("valid");function assignValid(r=(t.async?i._`await `:i.nil)){const o=d.opts.passContext?n.default.this:n.default.self,c=!("compile"in t&&!p||!1===t.schema);a.assign(h,i._`${r}${(0,s.callValidateCode)(e,y,o,c)}`,t.modifying)}function reportErrs(e){var r;a.if((0,i.not)(null!==(r=t.valid)&&void 0!==r?r:h),e)}e.block$data(h,(function validateKeyword(){if(!1===t.errors)assignValid(),t.modifying&&modifyData(e),reportErrs((()=>e.error()));else{const r=t.async?function validateAsync(){const e=a.let("ruleErrs",null);return a.try((()=>assignValid(i._`await `)),(t=>a.assign(h,!1).if(i._`${t} instanceof ${d.ValidationError}`,(()=>a.assign(e,i._`${t}.errors`)),(()=>a.throw(t))))),e}():function validateSync(){const e=i._`${y}.errors`;return a.assign(e,null),assignValid(i.nil),e}();t.modifying&&modifyData(e),reportErrs((()=>function addErrs(e,t){const{gen:r}=e;r.if(i._`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,i._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,i._`${n.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:h)},t.validSchemaType=function validSchemaType(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:i},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},3099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const i=r(3487),n=r(6776);t.getSubschema=function getSubschema(e,{keyword:t,schemaProp:r,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}${(0,i.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function extendSubschemaData(e,t,{dataProp:r,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;dataContextProps(u.let("data",i._`${t.data}${(0,i.getProperty)(r)}`,!0)),e.errorPath=i.str`${o}${(0,n.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=i._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==o){dataContextProps(o instanceof i.Name?o:u.let("data",o,!0)),void 0!==c&&(e.propertyName=c)}function dataContextProps(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:s}){void 0!==i&&(e.compositeRule=i),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},7159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var i=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var n=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const s=r(7426),o=r(6646),a=r(3141),c=r(5173),u=r(3487),l=r(2531),p=r(453),d=r(6776),f=r(4775),y=r(3589),defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(e){var t,r,i,n,s,o,a,c,u,l,p,d,f,h,m,g,v,b,R,O,S,C,w,I,P;const j=e.strict,$=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===$||void 0===$?1:$||0,A=null!==(i=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==i?i:defaultRegExp,q=null!==(n=e.uriResolver)&&void 0!==n?n:y.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:j)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:j)||void 0===c||c,strictTypes:null!==(l=null!==(u=e.strictTypes)&&void 0!==u?u:j)&&void 0!==l?l:"log",strictTuples:null!==(d=null!==(p=e.strictTuples)&&void 0!==p?p:j)&&void 0!==d?d:"log",strictRequired:null!==(h=null!==(f=e.strictRequired)&&void 0!==f?f:j)&&void 0!==h&&h,code:e.code?{...e.code,optimize:T,regExp:A}:{optimize:T,regExp:A},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(g=e.loopEnum)&&void 0!==g?g:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(R=e.inlineRefs)||void 0===R||R,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(C=e.validateSchema)||void 0===C||C,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(I=e.unicodeRegExp)||void 0===I||I,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:q}}class Ajv{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function getLogger(e){if(!1===e)return b;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),checkOptions.call(this,g,e,"NOT SUPPORTED"),checkOptions.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),e.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&addInitialKeywords.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),addInitialSchemas.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let i=f;"id"===r&&(i={...f},i.id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){e&&!this.getSchema(e)&&await runCompileAsync.call(this,{$ref:e},!0)}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return checkLoaded.call(this,t),await loadMissingSchema.call(this,t.missingSchema),_compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);this.refs[e]||await loadMetaSchema.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,i);return this}let n;if("object"==typeof e){const{schemaId:t}=this.opts;if(n=e[t],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(r,e);if(!i&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=getSchEnv.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,i=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=getSchEnv.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,r,t),!t)return(0,d.eachItem)(r,(e=>addRule.call(this,e))),this;keywordMetaschema.call(this,t);const i={...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===i.type.length?e=>addRule.call(this,e,i):e=>i.type.forEach((t=>addRule.call(this,e,i,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const i of t){const t=i.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:i}=t.definition,s=n[e];i&&s&&(n[e]=schemaOrData(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const i=e[r];t&&!t.test(r)||("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(s||r);const u=l.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u}),this._cache.set(a.schema,a),n&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),i&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function checkOptions(e,t,r,i="error"){for(const n in e){const s=n;s in t&&this.logger[i](`${r}: option ${n}. ${e[s]}`)}}function getSchEnv(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=Ajv,Ajv.ValidationError=s.default,Ajv.MissingRefError=o.default;const b={log(){},warn(){},error(){}};const R=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!R.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(e,t,r){var i;const n=null==t?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)}};t.before?addBeforeRule.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(i=t.implements)||void 0===i||i.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const i=e.rules.findIndex((e=>e.keyword===r));i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function keywordMetaschema(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=schemaOrData(t)),e.validateSchema=this.compile(t,!0))}const O={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,O]}}},3510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4063);i.code='require("ajv/dist/runtime/equal").default',t.default=i},4499:(e,t)=>{"use strict";function ucs2length(e){const t=e.length;let r,i=0,n=0;for(;n<t;)i++,r=e.charCodeAt(n++),r>=55296&&r<=56319&&n<t&&(r=e.charCodeAt(n),56320==(64512&r)&&n++);return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(540);i.code='require("ajv/dist/runtime/uri").default',t.default=i},7426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class ValidationError extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=ValidationError},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const i=r(3487),n=r(6776),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>i.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>i._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:i}=t;Array.isArray(i)?validateAdditionalItems(e,i):(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:r,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const u=r.const("len",i._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(i._`${u} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(c,s)){const s=r.var("valid",i._`${u} <= ${t.length}`);r.if((0,i.not)(s),(()=>function validateItems(s){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:n.Type.Num},s),c.allErrors||r.if((0,i.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=validateAdditionalItems,t.default=s},9351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(2141),o=r(6776),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>n._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:u,it:l}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=l;if(l.props=!0,"all"!==d.removeAdditional&&(0,o.alwaysValidSchema)(l,r))return;const f=(0,i.allSchemaProperties)(a.properties),y=(0,i.allSchemaProperties)(a.patternProperties);function deleteAdditional(e){t.code(n._`delete ${c}[${e}]`)}function additionalPropertyCode(i){if("all"===d.removeAdditional||d.removeAdditional&&!1===r)deleteAdditional(i);else{if(!1===r)return e.setParams({additionalProperty:i}),e.error(),void(p||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===d.removeAdditional?(applyAdditionalSchema(i,r,!1),t.if((0,n.not)(r),(()=>{e.reset(),deleteAdditional(i)}))):(applyAdditionalSchema(i,r),p||t.if((0,n.not)(r),(()=>t.break())))}}}function applyAdditionalSchema(t,r,i){const n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}!function checkAdditionalProperties(){t.forIn("key",c,(r=>{f.length||y.length?t.if(function isAdditional(r){let s;if(f.length>8){const e=(0,o.schemaRefOrVal)(l,a.properties,"properties");s=(0,i.isOwnProperty)(t,e,r)}else s=f.length?(0,n.or)(...f.map((e=>n._`${r} === ${e}`))):n.nil;y.length&&(s=(0,n.or)(s,...y.map((t=>n._`${(0,i.usePattern)(e,t)}.test(${r})`))));return(0,n.not)(s)}(r),(()=>additionalPropertyCode(r))):additionalPropertyCode(r)}))}(),e.ok(n._`${u} === ${s.default.errors}`)}};t.default=a},1125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,i.alwaysValidSchema)(n,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=n},19:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=i},9864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?i.str`must contain at least ${e} valid item(s)`:i.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?i._`{minContains: ${e}}`:i._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:o,it:a}=e;let c,u;const{minContains:l,maxContains:p}=s;a.opts.next?(c=void 0===l?1:l,u=p):c=1;const d=t.const("len",i._`${o}.length`);if(e.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,n.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,n.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n.alwaysValidSchema)(a,r)){let t=i._`${d} >= ${c}`;return void 0!==u&&(t=i._`${t} && ${d} <= ${u}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function validateItemsWithCount(){const e=t.name("_valid"),r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>function checkLimits(e){t.code(i._`${e}++`),void 0===u?t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(i._`${e} > ${u}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function validateItems(r,i){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:!0},r),i()}))}void 0===u&&1===c?validateItems(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==u&&t.if(i._`${o}.length > 0`,validateItemsWithCount)):(t.let(f,!1),validateItemsWithCount()),e.result(f,(()=>e.reset()))}};t.default=s},7772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const i=r(3487),n=r(6776),s=r(412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=1===t?"property":"properties";return i.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>i._`{property: ${e},
5
+ || ${a} === "boolean" || ${n} === null`).assign(c,o._`[${n}]`)}}i.else(),reportTypeError(e),i.endIf(),i.if(o._`${c} !== undefined`,(()=>{i.assign(n,c),function assignParentData({gen:e,parentData:t,parentDataProperty:r},i){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,i)))}(e,c)}))}(e,t,a):reportTypeError(e)}))}return p};const u=new Set(["string","number","integer","boolean","null"]);function checkDataType(e,t,r,i=c.Correct){const n=i===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${n} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=numCond(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=numCond();break;default:return o._`typeof ${t} ${n} ${e}`}return i===c.Correct?s:(0,o.not)(s);function numCond(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function checkDataTypes(e,t,r,i){if(1===e.length)return checkDataType(e[0],t,r,i);let n;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;n=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=o.nil;s.number&&delete s.integer;for(const e in s)n=(0,o.and)(n,checkDataType(e,t,r,i));return n}t.checkDataType=checkDataType,t.checkDataTypes=checkDataTypes;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function reportTypeError(e){const t=function getTypeErrorContext(e){const{gen:t,data:r,schema:i}=e,n=(0,a.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}(e);(0,s.reportError)(t,p)}t.reportTypeError=reportTypeError},313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const i=r(3487),n=r(6776);function assignDefault(e,t,r){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const u=i._`${a}${(0,i.getProperty)(t)}`;if(o)return void(0,n.checkStrictMode)(e,`default is ignored for: ${u}`);let p=i._`${u} === undefined`;"empty"===c.useDefaults&&(p=i._`${p} || ${u} === null || ${u} === ""`),s.if(p,i._`${u} = ${(0,i.stringify)(r)}`)}t.assignDefaults=function assignDefaults(e,t){const{properties:r,items:i}=e.schema;if("object"===t&&r)for(const t in r)assignDefault(e,t,r[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,r)=>assignDefault(e,r,t.default)))}},4815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const i=r(5667),n=r(453),s=r(8876),o=r(453),a=r(313),c=r(5005),u=r(3099),p=r(3487),l=r(2141),d=r(2531),f=r(6776),y=r(4181);function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},s){n.code.es5?e.func(t,p._`${l.default.data}, ${l.default.valCxt}`,i.$async,(()=>{e.code(p._`"use strict"; ${funcSourceUrl(r,n)}`),function destructureValCxtES5(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,p._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,p._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,p._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,p._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,p._`""`),e.var(l.default.parentData,p._`undefined`),e.var(l.default.parentDataProperty,p._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`{}`)}))}(e,n),e.code(s)})):e.func(t,p._`${l.default.data}, ${function destructureValCxt(e){return p._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?p._`, ${l.default.dynamicAnchors}={}`:p.nil}}={}`}(n)}`,i.$async,(()=>e.code(funcSourceUrl(r,n)).code(s)))}function funcSourceUrl(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?p._`/*# sourceURL=${r} */`:p.nil}function subschemaCode(e,t){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function subSchemaObjCode(e,t){const{schema:r,gen:i,opts:n}=e;n.$comment&&r.$comment&&commentKeyword(e);(function updateContext(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=i.const("_errs",l.default.errors);typeAndKeywords(e,s),i.var(t,p._`${s} === ${l.default.errors}`)}(e,t):(0,i.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function isSchemaObj(e){return"boolean"!=typeof e.schema}function checkKeywords(e){(0,f.checkUnknownRules)(e),function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:i,self:n}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],!1,t);const r=(0,n.getSchemaTypes)(e.schema);schemaKeywords(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){const s=r.$comment;if(!0===n.$comment)e.code(p._`${l.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const r=p.str`${i}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code(p._`${l.default.self}.opts.$comment(${s}, ${r}, ${n}.schema)`)}}function schemaKeywords(e,t,r,i){const{gen:n,schema:a,data:c,allErrors:u,opts:d,self:y}=e,{RULES:h}=y;function groupKeywords(f){(0,s.shouldUseGroup)(a,f)&&(f.type?(n.if((0,o.checkDataType)(f.type,c,d.strictNumbers)),iterateKeywords(e,f),1===t.length&&t[0]===f.type&&r&&(n.else(),(0,o.reportTypeError)(e)),n.endIf()):iterateKeywords(e,f),u||n.if(p._`${l.default.errors} === ${i||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,h)?(d.jtd||function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{includesType(e.dataTypes,t)||strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>includesType(t,e)))})(e,t),e.opts.allowUnionTypes||function checkMultipleTypes(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&strictTypesError(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const i in r){const n=r[i];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;r.length&&!r.some((e=>hasApplicableType(t,e)))&&strictTypesError(e,`missing type "${r.join(",")}" for keyword "${i}"`)}}}(e,e.dataTypes)}(e,t),n.block((()=>{for(const e of h.rules)groupKeywords(e);groupKeywords(h.post)}))):n.block((()=>keywordCode(e,"$ref",h.all.$ref.definition)))}function iterateKeywords(e,t){const{gen:r,schema:i,opts:{useDefaults:n}}=e;n&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(i,r)&&keywordCode(e,r.keyword,r.definition,t.type)}))}function hasApplicableType(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function includesType(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function strictTypesError(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function validateFunctionCode(e){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function topSchemaObjCode(e){const{schema:t,opts:r,gen:i}=e;return void validateFunction(e,(()=>{r.$comment&&t.$comment&&commentKeyword(e),function checkNoDefault(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(l.default.vErrors,null),i.let(l.default.errors,0),r.unevaluated&&function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",p._`${r}.evaluated`),t.if(p._`${e.evaluated}.dynamicProps`,(()=>t.assign(p._`${e.evaluated}.props`,p._`undefined`))),t.if(p._`${e.evaluated}.dynamicItems`,(()=>t.assign(p._`${e.evaluated}.items`,p._`undefined`)))}(e),typeAndKeywords(e),function returnResults(e){const{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:s}=e;r.$async?t.if(p._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(p._`new ${n}(${l.default.vErrors})`))):(t.assign(p._`${i}.errors`,l.default.vErrors),s.unevaluated&&function assignEvaluated({gen:e,evaluated:t,props:r,items:i}){r instanceof p.Name&&e.assign(p._`${t}.props`,r);i instanceof p.Name&&e.assign(p._`${t}.items`,i)}(e),t.return(p._`${l.default.errors} === 0`))}(e)}))}(e):validateFunction(e,(()=>(0,i.topBoolOrEmptySchema)(e)))};class KeywordCxt{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",getData(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,r){this.failResult((0,p.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,p.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(p._`${t} !== undefined && (${(0,p.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?y.reportExtraError:y.reportError)(this,this.def.error,t)}$dataError(){(0,y.reportError)(this,this.def.$dataError||y.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,y.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=p.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=p.nil,t=p.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:n,def:s}=this;r.if((0,p.or)(p._`${i} === undefined`,t)),e!==p.nil&&r.assign(e,!0),(n.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==p.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,p.or)(function wrong$DataType(){if(r.length){if(!(t instanceof p.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return p._`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return p.nil}(),function invalid$DataSchema(){if(i.validateSchema){const r=e.scopeValue("validate$data",{ref:i.validateSchema});return p._`!${r}(${t})`}return p.nil}())}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return subschemaCode(i,t),i}mergeEvaluated(e,t){const{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,(()=>this.mergeEvaluated(e,p.Name))),!0}}function keywordCode(e,t,r,i){const n=new KeywordCxt(e,r,t);"code"in r?r.code(n,i):n.$data&&r.validate?(0,c.funcKeywordCode)(n,r):"macro"in r?(0,c.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(n,r)}t.KeywordCxt=KeywordCxt;const h=/^\/(?:[^~]|~0|~1)*$/,m=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!h.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=l.default.rootData}else{const o=m.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=t)throw new Error(errorMsg("property/index",a));return i[t-a]}if(a>t)throw new Error(errorMsg("data",a));if(s=r[t-a],!n)return s}let o=s;const a=n.split("/");for(const e of a)e&&(s=p._`${s}${(0,p.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=p._`${o} && ${s}`);return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},5005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const i=r(3487),n=r(2141),s=r(412),o=r(4181);function modifyData(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,i._`${n.parentData}[${n.parentDataProperty}]`)))}function useKeyword(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,i.stringify)(r)})}t.macroKeywordCode=function macroKeywordCode(e,t){const{gen:r,keyword:n,schema:s,parentSchema:o,it:a}=e,c=t.macro.call(a.self,s,o,a),u=useKeyword(r,n,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:i.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function funcKeywordCode(e,t){var r;const{gen:a,keyword:c,schema:u,parentSchema:p,$data:l,it:d}=e;!function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(d,t);const f=!l&&t.compile?t.compile.call(d.self,u,p,d):t.validate,y=useKeyword(a,c,f),h=a.let("valid");function assignValid(r=(t.async?i._`await `:i.nil)){const o=d.opts.passContext?n.default.this:n.default.self,c=!("compile"in t&&!l||!1===t.schema);a.assign(h,i._`${r}${(0,s.callValidateCode)(e,y,o,c)}`,t.modifying)}function reportErrs(e){var r;a.if((0,i.not)(null!==(r=t.valid)&&void 0!==r?r:h),e)}e.block$data(h,(function validateKeyword(){if(!1===t.errors)assignValid(),t.modifying&&modifyData(e),reportErrs((()=>e.error()));else{const r=t.async?function validateAsync(){const e=a.let("ruleErrs",null);return a.try((()=>assignValid(i._`await `)),(t=>a.assign(h,!1).if(i._`${t} instanceof ${d.ValidationError}`,(()=>a.assign(e,i._`${t}.errors`)),(()=>a.throw(t))))),e}():function validateSync(){const e=i._`${y}.errors`;return a.assign(e,null),assignValid(i.nil),e}();t.modifying&&modifyData(e),reportErrs((()=>function addErrs(e,t){const{gen:r}=e;r.if(i._`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,i._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,i._`${n.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:h)},t.validSchemaType=function validSchemaType(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:i},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},3099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const i=r(3487),n=r(6776);t.getSubschema=function getSubschema(e,{keyword:t,schemaProp:r,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}${(0,i.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function extendSubschemaData(e,t,{dataProp:r,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;dataContextProps(u.let("data",i._`${t.data}${(0,i.getProperty)(r)}`,!0)),e.errorPath=i.str`${o}${(0,n.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=i._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==o){dataContextProps(o instanceof i.Name?o:u.let("data",o,!0)),void 0!==c&&(e.propertyName=c)}function dataContextProps(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:s}){void 0!==i&&(e.compositeRule=i),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},7159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var i=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var n=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const s=r(7426),o=r(6646),a=r(3141),c=r(5173),u=r(3487),p=r(2531),l=r(453),d=r(6776),f=r(4775),y=r(3589),defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(e){var t,r,i,n,s,o,a,c,u,p,l,d,f,h,m,g,v,b,R,O,S,C,w,I,P;const j=e.strict,$=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===$||void 0===$?1:$||0,A=null!==(i=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==i?i:defaultRegExp,q=null!==(n=e.uriResolver)&&void 0!==n?n:y.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:j)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:j)||void 0===c||c,strictTypes:null!==(p=null!==(u=e.strictTypes)&&void 0!==u?u:j)&&void 0!==p?p:"log",strictTuples:null!==(d=null!==(l=e.strictTuples)&&void 0!==l?l:j)&&void 0!==d?d:"log",strictRequired:null!==(h=null!==(f=e.strictRequired)&&void 0!==f?f:j)&&void 0!==h&&h,code:e.code?{...e.code,optimize:T,regExp:A}:{optimize:T,regExp:A},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(g=e.loopEnum)&&void 0!==g?g:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(R=e.inlineRefs)||void 0===R||R,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(C=e.validateSchema)||void 0===C||C,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(I=e.unicodeRegExp)||void 0===I||I,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:q}}class Ajv{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function getLogger(e){if(!1===e)return b;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),checkOptions.call(this,g,e,"NOT SUPPORTED"),checkOptions.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),e.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&addInitialKeywords.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),addInitialSchemas.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let i=f;"id"===r&&(i={...f},i.id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){e&&!this.getSchema(e)&&await runCompileAsync.call(this,{$ref:e},!0)}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return checkLoaded.call(this,t),await loadMissingSchema.call(this,t.missingSchema),_compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);this.refs[e]||await loadMetaSchema.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,i);return this}let n;if("object"==typeof e){const{schemaId:t}=this.opts;if(n=e[t],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${t} must be string`)}return t=(0,p.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(r,e);if(!i&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=getSchEnv.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,i=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=getSchEnv.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,p.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,r,t),!t)return(0,d.eachItem)(r,(e=>addRule.call(this,e))),this;keywordMetaschema.call(this,t);const i={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===i.type.length?e=>addRule.call(this,e,i):e=>i.type.forEach((t=>addRule.call(this,e,i,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const i of t){const t=i.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:i}=t.definition,s=n[e];i&&s&&(n[e]=schemaOrData(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const i=e[r];t&&!t.test(r)||("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,p.normalizeId)(s||r);const u=p.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u}),this._cache.set(a.schema,a),n&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),i&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function checkOptions(e,t,r,i="error"){for(const n in e){const s=n;s in t&&this.logger[i](`${r}: option ${n}. ${e[s]}`)}}function getSchEnv(e){return e=(0,p.normalizeId)(e),this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=Ajv,Ajv.ValidationError=s.default,Ajv.MissingRefError=o.default;const b={log(){},warn(){},error(){}};const R=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!R.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(e,t,r){var i;const n=null==t?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?addBeforeRule.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(i=t.implements)||void 0===i||i.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const i=e.rules.findIndex((e=>e.keyword===r));i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function keywordMetaschema(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=schemaOrData(t)),e.validateSchema=this.compile(t,!0))}const O={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,O]}}},3510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4063);i.code='require("ajv/dist/runtime/equal").default',t.default=i},4499:(e,t)=>{"use strict";function ucs2length(e){const t=e.length;let r,i=0,n=0;for(;n<t;)i++,r=e.charCodeAt(n++),r>=55296&&r<=56319&&n<t&&(r=e.charCodeAt(n),56320==(64512&r)&&n++);return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(540);i.code='require("ajv/dist/runtime/uri").default',t.default=i},7426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class ValidationError extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=ValidationError},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const i=r(3487),n=r(6776),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>i.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>i._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:i}=t;Array.isArray(i)?validateAdditionalItems(e,i):(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:r,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const u=r.const("len",i._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(i._`${u} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(c,s)){const s=r.var("valid",i._`${u} <= ${t.length}`);r.if((0,i.not)(s),(()=>function validateItems(s){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:n.Type.Num},s),c.allErrors||r.if((0,i.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=validateAdditionalItems,t.default=s},9351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(2141),o=r(6776),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>n._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:u,it:p}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:l,opts:d}=p;if(p.props=!0,"all"!==d.removeAdditional&&(0,o.alwaysValidSchema)(p,r))return;const f=(0,i.allSchemaProperties)(a.properties),y=(0,i.allSchemaProperties)(a.patternProperties);function deleteAdditional(e){t.code(n._`delete ${c}[${e}]`)}function additionalPropertyCode(i){if("all"===d.removeAdditional||d.removeAdditional&&!1===r)deleteAdditional(i);else{if(!1===r)return e.setParams({additionalProperty:i}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(p,r)){const r=t.name("valid");"failing"===d.removeAdditional?(applyAdditionalSchema(i,r,!1),t.if((0,n.not)(r),(()=>{e.reset(),deleteAdditional(i)}))):(applyAdditionalSchema(i,r),l||t.if((0,n.not)(r),(()=>t.break())))}}}function applyAdditionalSchema(t,r,i){const n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}!function checkAdditionalProperties(){t.forIn("key",c,(r=>{f.length||y.length?t.if(function isAdditional(r){let s;if(f.length>8){const e=(0,o.schemaRefOrVal)(p,a.properties,"properties");s=(0,i.isOwnProperty)(t,e,r)}else s=f.length?(0,n.or)(...f.map((e=>n._`${r} === ${e}`))):n.nil;y.length&&(s=(0,n.or)(s,...y.map((t=>n._`${(0,i.usePattern)(e,t)}.test(${r})`))));return(0,n.not)(s)}(r),(()=>additionalPropertyCode(r))):additionalPropertyCode(r)}))}(),e.ok(n._`${u} === ${s.default.errors}`)}};t.default=a},1125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,i.alwaysValidSchema)(n,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=n},19:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=i},9864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?i.str`must contain at least ${e} valid item(s)`:i.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?i._`{minContains: ${e}}`:i._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:o,it:a}=e;let c,u;const{minContains:p,maxContains:l}=s;a.opts.next?(c=void 0===p?1:p,u=l):c=1;const d=t.const("len",i._`${o}.length`);if(e.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,n.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,n.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n.alwaysValidSchema)(a,r)){let t=i._`${d} >= ${c}`;return void 0!==u&&(t=i._`${t} && ${d} <= ${u}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function validateItemsWithCount(){const e=t.name("_valid"),r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>function checkLimits(e){t.code(i._`${e}++`),void 0===u?t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(i._`${e} > ${u}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function validateItems(r,i){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:!0},r),i()}))}void 0===u&&1===c?validateItems(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==u&&t.if(i._`${o}.length > 0`,validateItemsWithCount)):(t.let(f,!1),validateItemsWithCount()),e.result(f,(()=>e.reset()))}};t.default=s},7772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const i=r(3487),n=r(6776),s=r(412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=1===t?"property":"properties";return i.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>i._`{property: ${e},
6
6
  missingProperty: ${n},
7
7
  depsCount: ${t},
8
- deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function splitDependencies({schema:e}){const t={},r={};for(const i in e){if("__proto__"===i)continue;(Array.isArray(e[i])?t:r)[i]=e[i]}return[t,r]}(e);validatePropertyDeps(e,t),validateSchemaDeps(e,r)}};function validatePropertyDeps(e,t=e.schema){const{gen:r,data:n,it:o}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const u=t[c];if(0===u.length)continue;const l=(0,s.propertyInData)(r,n,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),o.allErrors?r.if(l,(()=>{for(const t of u)(0,s.checkReportMissingProp)(e,t)})):(r.if(i._`${l} && (${(0,s.checkMissingProp)(e,u,a)})`),(0,s.reportMissingProp)(e,a),r.else())}}function validateSchemaDeps(e,t=e.schema){const{gen:r,data:i,keyword:o,it:a}=e,c=r.name("valid");for(const u in t)(0,n.alwaysValidSchema)(a,t[u])||(r.if((0,s.propertyInData)(r,i,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=validatePropertyDeps,t.validateSchemaDeps=validateSchemaDeps,t.default=o},9434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>i.str`must match "${e.ifClause}" schema`,params:({params:e})=>i._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,n.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const o=hasSchema(s,"then"),a=hasSchema(s,"else");if(!o&&!a)return;const c=t.let("valid",!0),u=t.name("_valid");if(function validateIf(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),o&&a){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,validateClause("then",r),validateClause("else",r))}else o?t.if(u,validateClause("then")):t.if((0,i.not)(u),validateClause("else"));function validateClause(r,n){return()=>{const s=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(s,c),n?t.assign(n,i._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function hasSchema(e,t){const r=e.schema[t];return void 0!==r&&!(0,n.alwaysValidSchema)(e,r)}t.default=s},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4783),n=r(2924),s=r(4665),o=r(1119),a=r(9864),c=r(7772),u=r(3708),l=r(9351),p=r(6239),d=r(2296),f=r(5697),y=r(19),h=r(4200),m=r(1125),g=r(9434),v=r(6552);t.default=function getApplicator(e=!1){const t=[f.default,y.default,h.default,m.default,g.default,v.default,u.default,l.default,c.default,p.default,d.default];return e?t.push(n.default,o.default):t.push(i.default,s.default),t.push(a.default),t}},4665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const i=r(3487),n=r(6776),s=r(412),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=!0,(0,n.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:u}=e;!function checkStrictTuple(e){const{opts:i,errSchemaPath:s}=u,o=r.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(i.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,n.checkStrictMode)(u,e,i.strictTuples)}}(o),u.opts.unevaluated&&r.length&&!0!==u.items&&(u.items=n.mergeEvaluated.items(s,r.length,u.items));const l=s.name("valid"),p=s.const("len",i._`${a}.length`);r.forEach(((t,r)=>{(0,n.alwaysValidSchema)(u,t)||(s.if(i._`${p} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=validateTuple,t.default=o},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(412),o=r(4783),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>i.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>i._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:a}=r;i.items=!0,(0,n.alwaysValidSchema)(i,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},5697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,i.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=n},4200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>i._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=r,c=t.let("valid",!1),u=t.let("passing",null),l=t.name("_valid");e.setParams({passing:u}),t.block((function validateOneOf(){a.forEach(((r,s)=>{let a;(0,n.alwaysValidSchema)(o,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},l),s>0&&t.if(i._`${l} && ${c}`).assign(c,!1).assign(u,i._`[${u}, ${s}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(u,s),a&&e.mergeEvaluated(a,i.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},2296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(6776),o=r(6776),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:u}=e,{opts:l}=u,p=(0,i.allSchemaProperties)(r),d=p.filter((e=>(0,s.alwaysValidSchema)(u,r[e])));if(0===p.length||d.length===p.length&&(!u.opts.unevaluated||!0===u.props))return;const f=l.strictSchema&&!l.allowMatchingProperties&&c.properties,y=t.name("valid");!0===u.props||u.props instanceof n.Name||(u.props=(0,o.evaluatedPropsToName)(t,u.props));const{props:h}=u;function checkMatchingProperties(e){for(const t in f)new RegExp(e).test(t)&&(0,s.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function validateProperties(r){t.forIn("key",a,(s=>{t.if(n._`${(0,i.usePattern)(e,r)}.test(${s})`,(()=>{const i=d.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:o.Type.Str},y),u.opts.unevaluated&&!0!==h?t.assign(n._`${h}[${s}]`,!0):i||u.allErrors||t.if((0,n.not)(y),(()=>t.break()))}))}))}!function validatePatternProperties(){for(const e of p)f&&checkMatchingProperties(e),u.allErrors?validateProperties(e):(t.var(y,!0),validateProperties(e),t.if(y))}()}};t.default=a},2924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4665),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,i.validateTuple)(e,"items")};t.default=n},6239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4815),n=r(412),s=r(6776),o=r(9351),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new i.KeywordCxt(u,o.default,"additionalProperties"));const l=(0,n.allSchemaProperties)(r);for(const e of l)u.definedProperties.add(e);u.opts.unevaluated&&l.length&&!0!==u.props&&(u.props=s.mergeEvaluated.props(t,(0,s.toHash)(l),u.props));const p=l.filter((e=>!(0,s.alwaysValidSchema)(u,r[e])));if(0===p.length)return;const d=t.name("valid");for(const r of p)hasDefault(r)?applyPropertySchema(r):(t.if((0,n.propertyInData)(t,c,r,u.opts.ownProperties)),applyPropertySchema(r),u.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(d);function hasDefault(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==r[e].default}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=a},3708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>i._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,i.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},6552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,i.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=n},412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const i=r(3487),n=r(6776),s=r(2141),o=r(6776);function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:i._`Object.prototype.hasOwnProperty`})}function isOwnProperty(e,t,r){return i._`${hasPropFunc(e)}.call(${t}, ${r})`}function noPropertyInData(e,t,r,n){const s=i._`${t}${(0,i.getProperty)(r)} === undefined`;return n?(0,i.or)(s,(0,i.not)(isOwnProperty(e,t,r))):s}function allSchemaProperties(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function checkReportMissingProp(e,t){const{gen:r,data:n,it:s}=e;r.if(noPropertyInData(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:i._`${t}`},!0),e.error()}))},t.checkMissingProp=function checkMissingProp({gen:e,data:t,it:{opts:r}},n,s){return(0,i.or)(...n.map((n=>(0,i.and)(noPropertyInData(e,t,n,r.ownProperties),i._`${s} = ${n}`))))},t.reportMissingProp=function reportMissingProp(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=hasPropFunc,t.isOwnProperty=isOwnProperty,t.propertyInData=function propertyInData(e,t,r,n){const s=i._`${t}${(0,i.getProperty)(r)} !== undefined`;return n?i._`${s} && ${isOwnProperty(e,t,r)}`:s},t.noPropertyInData=noPropertyInData,t.allSchemaProperties=allSchemaProperties,t.schemaProperties=function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,n.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:a},it:c},u,l,p){const d=p?i._`${e}, ${t}, ${n}${o}`:t,f=[[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const y=i._`${d}, ${r.object(...f)}`;return l!==i.nil?i._`${u}.call(${l}, ${y})`:i._`${u}(${y})`};const a=i._`new RegExp`;t.usePattern=function usePattern({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,c=s(r,n);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:i._`${"new RegExp"===s.code?a:(0,o.useFunc)(e,s)}(${r}, ${n})`})},t.validateArray=function validateArray(e){const{gen:t,data:r,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return validateItems((()=>t.assign(e,!1))),e}return t.var(a,!0),validateItems((()=>t.break())),a;function validateItems(o){const c=t.const("len",i._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),t.if((0,i.not)(a),o)}))}},t.validateUnion=function validateUnion(e){const{gen:t,schema:r,keyword:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,n.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,n)=>{const o=e.subschema({keyword:s,schemaProp:n,compositeRule:!0},c);t.assign(a,i._`${a} || ${c}`);e.mergeValidEvaluated(o,c)||t.if((0,i.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},8386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},5684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(8386),n=r(8280),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",i.default,n.default];t.default=s},8280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const i=r(6646),n=r(412),s=r(3487),o=r(2141),a=r(5173),c=r(6776),u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:c,validateName:u,opts:l,self:p}=n,{root:d}=c;if(("#"===r||"#/"===r)&&o===d.baseId)return function callRootRef(){if(c===d)return callRef(e,u,c,c.$async);const r=t.scopeValue("root",{ref:d});return callRef(e,s._`${r}.validate`,d,d.$async)}();const f=a.resolveRef.call(p,d,o,r);if(void 0===f)throw new i.default(n.opts.uriResolver,o,r);return f instanceof a.SchemaEnv?function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}(f):function inlineRefSchema(i){const n=t.scopeValue("schema",!0===l.code.source?{ref:i,code:(0,s.stringify)(i)}:{ref:i}),o=t.name("valid"),a=e.subschema({schema:i,dataTypes:[],schemaPath:s.nil,topSchemaRef:n,errSchemaPath:r},o);e.mergeEvaluated(a),e.ok(o)}(f)}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function callRef(e,t,r,i){const{gen:a,it:u}=e,{allErrors:l,schemaEnv:p,opts:d}=u,f=d.passContext?o.default.this:s.nil;function addErrorsFrom(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!u.opts.unevaluated)return;const i=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(i&&!i.dynamicProps)void 0!==i.props&&(u.props=c.mergeEvaluated.props(a,i.props,u.props));else{const t=a.var("props",s._`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(a,t,u.props,s.Name)}if(!0!==u.items)if(i&&!i.dynamicItems)void 0!==i.items&&(u.items=c.mergeEvaluated.items(a,i.items,u.items));else{const t=a.var("items",s._`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(a,t,u.items,s.Name)}}i?function callAsyncRef(){if(!p.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(s._`await ${(0,n.callValidateCode)(e,t,f)}`),addEvaluatedFrom(t),l||a.assign(r,!0)}),(e=>{a.if(s._`!(${e} instanceof ${u.ValidationError})`,(()=>a.throw(e))),addErrorsFrom(e),l||a.assign(r,!1)})),e.ok(r)}():function callSyncRef(){e.result((0,n.callValidateCode)(e,t,f),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}()}t.getValidate=getValidate,t.callRef=callRef,t.default=u},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(9306),s=r(5173),o=r(6776),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>i._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:u}=e,{oneOf:l}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=a.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),f=t.const("tag",i._`${r}${(0,i.getProperty)(p)}`);function applyTagSchema(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,i.Name),n}t.if(i._`typeof ${f} == "string"`,(()=>function validateMapping(){const r=function getMapping(){var e;const t={},r=hasRequired(c);let i=!0;for(let t=0;t<l.length;t++){let n=l[t];(null==n?void 0:n.$ref)&&!(0,o.schemaHasRulesButRef)(n,u.self.RULES)&&(n=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==n?void 0:n.$ref),n instanceof s.SchemaEnv&&(n=n.schema));const a=null===(e=null==n?void 0:n.properties)||void 0===e?void 0:e[p];if("object"!=typeof a)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);i=i&&(r||hasRequired(n)),addMappings(a,t)}if(!i)throw new Error(`discriminator: "${p}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(p)}function addMappings(e,t){if(e.const)addMapping(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)addMapping(r,t)}}function addMapping(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(i._`${f} === ${e}`),t.assign(d,applyTagSchema(r[e]));t.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:f,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:f,tagName:p}))),e.ok(d)}};t.default=a},9306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))},3924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5684),n=r(2649),s=r(8200),o=r(9502),a=r(6167),c=[i.default,n.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},9651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match format "${e}"`,params:({schemaCode:e})=>i._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:u,errSchemaPath:l,schemaEnv:p,self:d}=c;u.validateFormats&&(s?function validate$DataFormat(){const s=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),o=r.const("fDef",i._`${s}[${a}]`),c=r.let("fType"),l=r.let("format");r.if(i._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,i._`${o}.type || "string"`).assign(l,i._`${o}.validate`)),(()=>r.assign(c,i._`"string"`).assign(l,o))),e.fail$data((0,i.or)(function unknownFmt(){return!1===u.strictSchema?i.nil:i._`${a} && !${l}`}(),function invalidFmt(){const e=p.$async?i._`(${o}.async ? await ${l}(${n}) : ${l}(${n}))`:i._`${l}(${n})`,r=i._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return i._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function validateFormat(){const s=d.formats[o];if(!s)return void function unknownFormat(){if(!1===u.strictSchema)return void d.logger.warn(unknownMsg());throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${l}"`}}();if(!0===s)return;const[a,c,f]=function getFormat(e){const t=e instanceof RegExp?(0,i.regexpCode)(e):u.code.formats?i._`${u.code.formats}${(0,i.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,i._`${n}.validate`];return["string",e,n]}(s);a===t&&e.pass(function validCondition(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!p.$async)throw new Error("async format in sync schema");return i._`await ${f}(${n})`}return"function"==typeof c?i._`${f}(${n})`:i._`${f}.test(${n})`}())}())}};t.default=n},9502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=[r(9651).default];t.default=i},6167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},4693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(3510),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>i._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(i._`!${(0,n.useFunc)(t,s.default)}(${r}, ${a})`):e.fail(i._`${c} !== ${r}`)}};t.default=o},966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(3510),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>i._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:u}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=u.opts.loopEnum;let p;const getEql=()=>null!=p?p:p=(0,n.useFunc)(t,s.default);let d;if(l||o)d=t.let("valid"),e.block$data(d,(function loopEnum(){t.assign(d,!1),t.forOf("v",c,(e=>t.if(i._`${getEql()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);d=(0,i.or)(...a.map(((t,n)=>function equalCode(e,t){const n=a[t];return"object"==typeof n&&null!==n?i._`${getEql()}(${r}, ${e}[${t}])`:i._`${r} === ${n}`}(e,n))))}e.pass(d)}};t.default=o},2649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3983),n=r(430),s=r(3229),o=r(4336),a=r(498),c=r(3301),u=r(1687),l=r(2958),p=r(4693),d=r(966),f=[i.default,n.default,s.default,o.default,a.default,c.default,u.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,d.default];t.default=f},1687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?i.operators.GT:i.operators.LT;e.fail$data(i._`${r}.length ${s} ${n}`)}};t.default=n},3229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(4499),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e,c="maxLength"===t?i.operators.GT:i.operators.LT,u=!1===a.opts.unicode?i._`${r}.length`:i._`${(0,n.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(i._`${u} ${c} ${o}`)}};t.default=o},3983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=i.operators,s={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:e,schemaCode:t})=>i.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(i._`${r} ${s[t].fail} ${n} || isNaN(${r})`)}};t.default=a},498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?i.operators.GT:i.operators.LT;e.fail$data(i._`Object.keys(${r}).length ${s} ${n}`)}};t.default=n},430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>i.str`must be multiple of ${e}`,params:({schemaCode:e})=>i._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?i._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:i._`${a} !== parseInt(${a})`;e.fail$data(i._`(${n} === 0 || (${a} = ${r}/${n}, ${c}))`)}};t.default=n},4336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match pattern "${e}"`,params:({schemaCode:e})=>n._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",u=r?n._`(new RegExp(${o}, ${c}))`:(0,i.usePattern)(e,s);e.fail$data(n._`!${u}.test(${t})`)}};t.default=s},3301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(6776),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>n.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>n._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:u}=e,{opts:l}=u;if(!c&&0===r.length)return;const p=r.length>=l.loopRequired;if(u.allErrors?function allErrorsMode(){if(p||c)e.block$data(n.nil,loopAllRequired);else for(const t of r)(0,i.checkReportMissingProp)(e,t)}():function exitOnErrorMode(){const s=t.let("missing");if(p||c){const r=t.let("valid",!0);e.block$data(r,(()=>function loopUntilMissing(r,s){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(s,(0,i.propertyInData)(t,a,r,l.ownProperties)),t.if((0,n.not)(s),(()=>{e.error(),t.break()}))}),n.nil)}(s,r))),e.ok(r)}else t.if((0,i.checkMissingProp)(e,r,s)),(0,i.reportMissingProp)(e,s),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:i}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!i.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(u,t,u.opts.strictRequired)}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,i.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=o},2958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(453),n=r(3487),s=r(6776),o=r(3510),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>n.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>n._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:u,schemaCode:l,it:p}=e;if(!a&&!c)return;const d=t.let("valid"),f=u.items?(0,i.getSchemaTypes)(u.items):[];function loopN(s,o){const a=t.name("item"),c=(0,i.checkDataTypes)(f,a,p.opts.strictNumbers,i.DataType.Wrong),u=t.const("indices",n._`{}`);t.for(n._`;${s}--;`,(()=>{t.let(a,n._`${r}[${s}]`),t.if(c,n._`continue`),f.length>1&&t.if(n._`typeof ${a} == "string"`,n._`${a} += "_"`),t.if(n._`typeof ${u}[${a}] == "number"`,(()=>{t.assign(o,n._`${u}[${a}]`),e.error(),t.assign(d,!1).break()})).code(n._`${u}[${a}] = ${s}`)}))}function loopN2(i,a){const c=(0,s.useFunc)(t,o.default),u=t.name("outer");t.label(u).for(n._`;${i}--;`,(()=>t.for(n._`${a} = ${i}; ${a}--;`,(()=>t.if(n._`${c}(${r}[${i}], ${r}[${a}])`,(()=>{e.error(),t.assign(d,!1).break(u)}))))))}e.block$data(d,(function validateUniqueItems(){const i=t.let("i",n._`${r}.length`),s=t.let("j");e.setParams({i,j:s}),t.assign(d,!0),t.if(n._`${i} > 1`,(()=>(function canOptimize(){return f.length>0&&!f.some((e=>"object"===e||"array"===e))}()?loopN:loopN2)(i,s)))}),n._`${l} === false`),e.ok(d)}};t.default=a},5987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,i){var n={},s={};s[r]=0;var o,a,c,u,l,p,d,f=t.PriorityQueue.make();for(f.push(r,0);!f.empty();)for(c in a=(o=f.pop()).value,u=o.cost,l=e[a]||{})l.hasOwnProperty(c)&&(p=u+l[c],d=s[c],(void 0===s[c]||d>p)&&(s[c]=p,f.push(c,p),n[c]=a));if(void 0!==i&&void 0===s[i]){var y=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(y)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,r,i){var n=t.single_source_shortest_paths(e,r,i);return t.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var r,i=t.PriorityQueue,n={};for(r in e=e||{},i)i.hasOwnProperty(r)&&(n[r]=i[r]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2378:e=>{"use strict";e.exports=function encodeUtf8(e){for(var t=[],r=e.length,i=0;i<r;i++){var n=e.charCodeAt(i);if(n>=55296&&n<=56319&&r>i+1){var s=e.charCodeAt(i+1);s>=56320&&s<=57343&&(n=1024*(n-55296)+s-56320+65536,i+=1)}n<128?t.push(n):n<2048?(t.push(n>>6|192),t.push(63&n|128)):n<55296||n>=57344&&n<65536?(t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=65536&&n<=1114111?(t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},6387:(e,t,r)=>{var i;!function(n){var s=Object.hasOwnProperty,o=Array.isArray?Array.isArray:function _isArray(e){return"[object Array]"===Object.prototype.toString.call(e)},a="object"==typeof process&&"function"==typeof process.nextTick,c="function"==typeof Symbol,u="object"==typeof Reflect,l="function"==typeof setImmediate?setImmediate:setTimeout,p=c?u&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function init(){this._events={},this._conf&&configure.call(this,this._conf)}function configure(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==n&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function logPossibleMemoryLeak(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var i=new Error(r);i.name="MaxListenersExceededWarning",i.emitter=this,i.count=e,process.emitWarning(i)}else console.error(r),console.trace&&console.trace()}var toArray=function(e,t,r){var i=arguments.length;switch(i){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var n=new Array(i);i--;)n[i]=arguments[i];return n}};function toObject(e,t){for(var r={},i=e.length,s=t?t.length:0,o=0;o<i;o++)r[e[o]]=o<s?t[o]:n;return r}function TargetObserver(e,t,r){var i,n;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(r.on||r.off)&&(i=r.on,n=r.off),t.addEventListener?(i=t.addEventListener,n=t.removeEventListener):t.addListener?(i=t.addListener,n=t.removeListener):t.on&&(i=t.on,n=t.off),!i&&!n)throw Error("target does not implement any known event API");if("function"!=typeof i)throw TypeError("on method must be a function");if("function"!=typeof n)throw TypeError("off method must be a function");this._on=i,this._off=n;var s=e._observers;s?s.push(this):e._observers=[this]}function resolveOptions(e,t,r,i){var o=Object.assign({},t);if(!e)return o;if("object"!=typeof e)throw TypeError("options must be an object");var a,c,u,l=Object.keys(e),p=l.length;function reject(e){throw Error('Invalid "'+a+'" option value'+(e?". Reason: "+e:""))}for(var d=0;d<p;d++){if(a=l[d],!i&&!s.call(t,a))throw Error('Unknown "'+a+'" option');(c=e[a])!==n&&(u=r[a],o[a]=u?u(c,reject):c)}return o}function constructorReducer(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function makeTypeReducer(e){var t="value must be type of "+e.join("|"),r=e.length,i=e[0],n=e[1];return 1===r?function(e,r){if(typeof e===i)return e;r(t)}:2===r?function(e,r){var s=typeof e;if(s===i||s===n)return e;r(t)}:function(i,n){for(var s=typeof i,o=r;o-- >0;)if(s===e[o])return i;n(t)}}Object.assign(TargetObserver.prototype,{subscribe:function(e,t,r){var i=this,n=this._target,s=this._emitter,o=this._listeners,handler=function(){var i=toArray.apply(null,arguments),o={data:i,name:t,original:e};if(r){var a=r.call(n,o);!1!==a&&s.emit.apply(s,[o.name].concat(i))}else s.emit.apply(s,[t].concat(i))};if(o[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,s._newListener&&s._removeListener&&!i._onNewListener?(this._onNewListener=function(r){r===t&&null===o[e]&&(o[e]=handler,i._on.call(n,e,handler))},s.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!s.hasListeners(r)&&o[e]&&(o[e]=null,i._off.call(n,e,handler))},o[e]=null,s.on("removeListener",this._onRemoveListener)):(o[e]=handler,i._on.call(n,e,handler))},unsubscribe:function(e){var t,r,i,n=this,s=this._listeners,o=this._emitter,a=this._off,c=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function clearRefs(){n._onNewListener&&(o.off("newListener",n._onNewListener),o.off("removeListener",n._onRemoveListener),n._onNewListener=null,n._onRemoveListener=null);var e=findTargetIndex.call(o,n);o._observers.splice(e,1)}if(e){if(!(t=s[e]))return;a.call(c,e,t),delete s[e],--this._listenersCount||clearRefs()}else{for(i=(r=p(s)).length;i-- >0;)e=r[i],a.call(c,e,s[e]);this._listeners={},this._listenersCount=0,clearRefs()}}});var d=makeTypeReducer(["function"]),f=makeTypeReducer(["object","function"]);function makeCancelablePromise(e,t,r){var i,n,s,o=0,a=new e((function(c,u,l){function cleanup(){n&&(n=null),o&&(clearTimeout(o),o=0)}r=resolveOptions(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),i=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof l;var _resolve=function(e){cleanup(),c(e)},_reject=function(e){cleanup(),u(e)};i?t(_resolve,_reject,l):(n=[function(e){_reject(e||Error("canceled"))}],t(_resolve,_reject,(function(e){if(s)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");n.push(e)})),s=!0),r.timeout>0&&(o=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",o=0,a.cancel(e),u(e)}),r.timeout))}));return i||(a.cancel=function(e){if(n){for(var t=n.length,r=1;r<t;r++)n[r](e);n[0](e),n=null}}),a}function findTargetIndex(e){var t=this._observers;if(!t)return-1;for(var r=t.length,i=0;i<r;i++)if(t[i]._target===e)return i;return-1}function searchListenerTree(e,t,r,i,n){if(!r)return null;if(0===i){var s=typeof t;if("string"===s){var o,a,c=0,u=0,l=this.delimiter,d=l.length;if(-1!==(a=t.indexOf(l))){o=new Array(5);do{o[c++]=t.slice(u,a),u=a+d}while(-1!==(a=t.indexOf(l,u)));o[c++]=t.slice(u),t=o,n=c}else t=[t],n=1}else"object"===s?n=t.length:(t=[t],n=1)}var f,y,h,m,g,v,b,R=null,O=t[i],S=t[i+1];if(i===n)r._listeners&&("function"==typeof r._listeners?(e&&e.push(r._listeners),R=[r]):(e&&e.push.apply(e,r._listeners),R=[r]));else{if("*"===O){for(a=(v=p(r)).length;a-- >0;)"_listeners"!==(f=v[a])&&(b=searchListenerTree(e,t,r[f],i+1,n))&&(R?R.push.apply(R,b):R=b);return R}if("**"===O){for((g=i+1===n||i+2===n&&"*"===S)&&r._listeners&&(R=searchListenerTree(e,t,r,n,n)),a=(v=p(r)).length;a-- >0;)"_listeners"!==(f=v[a])&&("*"===f||"**"===f?(r[f]._listeners&&!g&&(b=searchListenerTree(e,t,r[f],n,n))&&(R?R.push.apply(R,b):R=b),b=searchListenerTree(e,t,r[f],i,n)):b=searchListenerTree(e,t,r[f],f===S?i+2:i,n),b&&(R?R.push.apply(R,b):R=b));return R}r[O]&&(R=searchListenerTree(e,t,r[O],i+1,n))}if((y=r["*"])&&searchListenerTree(e,t,y,i+1,n),h=r["**"])if(i<n)for(h._listeners&&searchListenerTree(e,t,h,n,n),a=(v=p(h)).length;a-- >0;)"_listeners"!==(f=v[a])&&(f===S?searchListenerTree(e,t,h[f],i+2,n):f===O?searchListenerTree(e,t,h[f],i+1,n):((m={})[f]=h[f],searchListenerTree(e,t,{"**":m},i+1,n)));else h._listeners?searchListenerTree(e,t,h,n,n):h["*"]&&h["*"]._listeners&&searchListenerTree(e,t,h["*"],n,n);return R}function growListenerTree(e,t,r){var i,n,s=0,o=0,a=this.delimiter,c=a.length;if("string"==typeof e)if(-1!==(i=e.indexOf(a))){n=new Array(5);do{n[s++]=e.slice(o,i),o=i+c}while(-1!==(i=e.indexOf(a,o)));n[s++]=e.slice(o)}else n=[e],s=1;else n=e,s=e.length;if(s>1)for(i=0;i+1<s;i++)if("**"===n[i]&&"**"===n[i+1])return;var u,l=this.listenerTree;for(i=0;i<s;i++)if(l=l[u=n[i]]||(l[u]={}),i===s-1)return l._listeners?("function"==typeof l._listeners&&(l._listeners=[l._listeners]),r?l._listeners.unshift(t):l._listeners.push(t),!l._listeners.warned&&this._maxListeners>0&&l._listeners.length>this._maxListeners&&(l._listeners.warned=!0,logPossibleMemoryLeak.call(this,l._listeners.length,u))):l._listeners=t,!0;return!0}function collectTreeEvents(e,t,r,i){for(var n,s,o,a,c=p(e),u=c.length,l=e._listeners;u-- >0;)n=e[s=c[u]],o="_listeners"===s?r:r?r.concat(s):[s],a=i||"symbol"==typeof s,l&&t.push(a?o:o.join(this.delimiter)),"object"==typeof n&&collectTreeEvents.call(this,n,t,o,a);return t}function recursivelyGarbageCollect(e){for(var t,r,i,n=p(e),s=n.length;s-- >0;)(t=e[r=n[s]])&&(i=!0,"_listeners"===r||recursivelyGarbageCollect(t)||delete e[r]);return i}function Listener(e,t,r){this.emitter=e,this.event=t,this.listener=r}function setupListener(e,t,r){if(!0===r)s=!0;else if(!1===r)i=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var i=r.async,s=r.promisify,o=r.nextTick,c=r.objectify}if(i||o||s){var u=t,p=t._origin||t;if(o&&!a)throw Error("process.nextTick is not supported");s===n&&(s="AsyncFunction"===t.constructor.name),t=function(){var e=arguments,t=this,r=this.event;return s?o?Promise.resolve():new Promise((function(e){l(e)})).then((function(){return t.event=r,u.apply(t,e)})):(o?process.nextTick:l)((function(){t.event=r,u.apply(t,e)}))},t._async=!0,t._origin=p}return[t,c?new Listener(this,e,t):this]}function EventEmitter(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,configure.call(this,e)}Listener.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},EventEmitter.EventEmitter2=EventEmitter,EventEmitter.prototype.listenTo=function(e,t,r){if("object"!=typeof e)throw TypeError("target musts be an object");var i=this;function listen(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,s=r.reducers,o=findTargetIndex.call(i,e);n=-1===o?new TargetObserver(i,e,r):i._observers[o];for(var a,c=p(t),u=c.length,l="function"==typeof s,d=0;d<u;d++)a=c[d],n.subscribe(a,t[a]||a,l?s:s&&s[a])}return r=resolveOptions(r,{on:n,off:n,reducers:n},{on:d,off:d,reducers:f}),o(t)?listen(toObject(t)):listen("string"==typeof t?toObject(t.split(/\s+/)):t),this},EventEmitter.prototype.stopListeningTo=function(e,t){var r=this._observers;if(!r)return!1;var i,n=r.length,s=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;n-- >0;)i=r[n],e&&i._target!==e||(i.unsubscribe(t),s=!0);return s},EventEmitter.prototype.delimiter=".",EventEmitter.prototype.setMaxListeners=function(e){e!==n&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},EventEmitter.prototype.getMaxListeners=function(){return this._maxListeners},EventEmitter.prototype.event="",EventEmitter.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},EventEmitter.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},EventEmitter.prototype._once=function(e,t,r,i){return this._many(e,1,t,r,i)},EventEmitter.prototype.many=function(e,t,r,i){return this._many(e,t,r,!1,i)},EventEmitter.prototype.prependMany=function(e,t,r,i){return this._many(e,t,r,!0,i)},EventEmitter.prototype._many=function(e,t,r,i,n){var s=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function listener(){return 0==--t&&s.off(e,listener),r.apply(this,arguments)}return listener._origin=r,this._on(e,listener,i,n)},EventEmitter.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,i,n,s,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return!1;if(a&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(r=o.length,c)for(i=0;i<r;i++)if("symbol"==typeof o[i]){s=!0;break}s||(o=o.join(this.delimiter))}var u,l=arguments.length;if(this._all&&this._all.length)for(i=0,r=(u=this._all.slice()).length;i<r;i++)switch(this.event=o,l){case 1:u[i].call(this,o);break;case 2:u[i].call(this,o,arguments[1]);break;case 3:u[i].call(this,o,arguments[1],arguments[2]);break;default:u[i].apply(this,arguments)}if(a)u=[],searchListenerTree.call(this,u,e,this.listenerTree,0,r);else{if("function"==typeof(u=this._events[o])){switch(this.event=o,l){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(l-1),n=1;n<l;n++)t[n-1]=arguments[n];u.apply(this,t)}return!0}u&&(u=u.slice())}if(u&&u.length){if(l>3)for(t=new Array(l-1),n=1;n<l;n++)t[n-1]=arguments[n];for(i=0,r=u.length;i<r;i++)switch(this.event=o,l){case 1:u[i].call(this);break;case 2:u[i].call(this,arguments[1]);break;case 3:u[i].call(this,arguments[1],arguments[2]);break;default:u[i].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===o)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},EventEmitter.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,i,n,s,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(a&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(i=o.length,c)for(n=0;n<i;n++)if("symbol"==typeof o[n]){t=!0;break}t||(o=o.join(this.delimiter))}var u,l=[],p=arguments.length;if(this._all)for(n=0,i=this._all.length;n<i;n++)switch(this.event=o,p){case 1:l.push(this._all[n].call(this,o));break;case 2:l.push(this._all[n].call(this,o,arguments[1]));break;case 3:l.push(this._all[n].call(this,o,arguments[1],arguments[2]));break;default:l.push(this._all[n].apply(this,arguments))}if(a?(u=[],searchListenerTree.call(this,u,e,this.listenerTree,0)):u=this._events[o],"function"==typeof u)switch(this.event=o,p){case 1:l.push(u.call(this));break;case 2:l.push(u.call(this,arguments[1]));break;case 3:l.push(u.call(this,arguments[1],arguments[2]));break;default:for(r=new Array(p-1),s=1;s<p;s++)r[s-1]=arguments[s];l.push(u.apply(this,r))}else if(u&&u.length){if(u=u.slice(),p>3)for(r=new Array(p-1),s=1;s<p;s++)r[s-1]=arguments[s];for(n=0,i=u.length;n<i;n++)switch(this.event=o,p){case 1:l.push(u[n].call(this));break;case 2:l.push(u[n].call(this,arguments[1]));break;case 3:l.push(u[n].call(this,arguments[1],arguments[2]));break;default:l.push(u[n].apply(this,r))}}else if(!this.ignoreErrors&&!this._all&&"error"===o)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(l)},EventEmitter.prototype.on=function(e,t,r){return this._on(e,t,!1,r)},EventEmitter.prototype.prependListener=function(e,t,r){return this._on(e,t,!0,r)},EventEmitter.prototype.onAny=function(e){return this._onAny(e,!1)},EventEmitter.prototype.prependAny=function(e){return this._onAny(e,!0)},EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},EventEmitter.prototype._on=function(e,t,r,i){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");this._events||init.call(this);var s,o=this;return i!==n&&(t=(s=setupListener.call(this,e,t,i))[0],o=s[1]),this._newListener&&this.emit("newListener",e,t),this.wildcard?(growListenerTree.call(this,e,t,r),o):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,logPossibleMemoryLeak.call(this,this._events[e].length,e))):this._events[e]=t,o)},EventEmitter.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){var n="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=searchListenerTree.call(this,null,n,this.listenerTree,0)))return this}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var s=0;s<i.length;s++){var a=i[s];if(r=a._listeners,o(r)){for(var c=-1,u=0,l=r.length;u<l;u++)if(r[u]===t||r[u].listener&&r[u].listener===t||r[u]._origin&&r[u]._origin===t){c=u;break}if(c<0)continue;return this.wildcard?a._listeners.splice(c,1):this._events[e].splice(c,1),0===r.length&&(this.wildcard?delete a._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)&&(this.wildcard?delete a._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&recursivelyGarbageCollect(this.listenerTree),this},EventEmitter.prototype.offAny=function(e){var t,r=0,i=0;if(e&&this._all&&this._all.length>0){for(r=0,i=(t=this._all).length;r<i;r++)if(e===t[r])return t.splice(r,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(r=0,i=t.length;r<i;r++)this.emit("removeListenerAny",t[r]);this._all=[]}return this},EventEmitter.prototype.removeListener=EventEmitter.prototype.off,EventEmitter.prototype.removeAllListeners=function(e){if(e===n)return!this._events||init.call(this),this;if(this.wildcard){var t,r=searchListenerTree.call(this,null,e,this.listenerTree,0);if(!r)return this;for(t=0;t<r.length;t++)r[t]._listeners=null;this.listenerTree&&recursivelyGarbageCollect(this.listenerTree)}else this._events&&(this._events[e]=null);return this},EventEmitter.prototype.listeners=function(e){var t,r,i,s,o,a=this._events;if(e===n){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!a)return[];for(s=(t=p(a)).length,i=[];s-- >0;)"function"==typeof(r=a[t[s]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(o=this.listenerTree))return[];var c=[],u="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,c,u,o,0),c}return a&&(r=a[e])?"function"==typeof r?[r]:r:[]},EventEmitter.prototype.eventNames=function(e){var t=this._events;return this.wildcard?collectTreeEvents.call(this,this.listenerTree,[],null,e):t?p(t):[]},EventEmitter.prototype.listenerCount=function(e){return this.listeners(e).length},EventEmitter.prototype.hasListeners=function(e){if(this.wildcard){var t=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,t,r,this.listenerTree,0),t.length>0}var i=this._events,s=this._all;return!!(s&&s.length||i&&(e===n?p(i).length:i[e]))},EventEmitter.prototype.listenersAny=function(){return this._all?this._all:[]},EventEmitter.prototype.waitFor=function(e,t){var r=this,i=typeof t;return"number"===i?t={timeout:t}:"function"===i&&(t={filter:t}),makeCancelablePromise((t=resolveOptions(t,{timeout:0,filter:n,handleError:!1,Promise,overload:!1},{filter:d,Promise:constructorReducer})).Promise,(function(i,n,s){function listener(){var s=t.filter;if(!s||s.apply(r,arguments))if(r.off(e,listener),t.handleError){var o=arguments[0];o?n(o):i(toArray.apply(null,arguments).slice(1))}else i(toArray.apply(null,arguments))}s((function(){r.off(e,listener)})),r._on(e,listener,!1)}),{timeout:t.timeout,overload:t.overload})};var y=EventEmitter.prototype;Object.defineProperties(EventEmitter,{defaultMaxListeners:{get:function(){return y._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");y._maxListeners=e},enumerable:!0},once:{value:function once(e,t,r){return makeCancelablePromise((r=resolveOptions(r,{Promise,timeout:0,overload:!1},{Promise:constructorReducer})).Promise,(function(r,i,n){var s;if("function"==typeof e.addEventListener)return s=function(){r(toArray.apply(null,arguments))},n((function(){e.removeEventListener(t,s)})),void e.addEventListener(t,s,{once:!0});var o,eventListener=function(){o&&e.removeListener("error",o),r(toArray.apply(null,arguments))};"error"!==t&&(o=function(r){e.removeListener(t,eventListener),i(r)},e.once("error",o)),n((function(){o&&e.removeListener("error",o),e.removeListener(t,eventListener)})),e.once(t,eventListener)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(y,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),(i=function(){return EventEmitter}.call(t,r,t,e))===n||(e.exports=i)}()},4063:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,i,n;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(i=r;0!=i--;)if(!equal(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((r=(n=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=r;0!=i--;){var s=n[i];if(!equal(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}},9461:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),_traverse(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function _traverse(e,r,i,n,s,o,a,c,u,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var p in r(n,s,o,a,c,u,l),n){var d=n[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var f=0;f<d.length;f++)_traverse(e,r,i,d[f],s+"/"+p+"/"+f,o,s,p,n,f)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)_traverse(e,r,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),o,s,p,n,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&_traverse(e,r,i,d,s+"/"+p,o,s,p,n)}i(n,s,o,a,c,u,l)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},4530:(e,t)=>{function serializer(e,t){var r=[],i=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]"}),function(n,s){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,n):i.push(n),~r.indexOf(s)&&(s=t.call(this,n,s))}else r.push(s);return null==e?s:e.call(this,n,s)}}(e.exports=function stringify(e,t,r,i){return JSON.stringify(e,serializer(t,i),r)}).getSerialize=serializer},9208:e=>{var t="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,o=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,l="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,d=l||p||Function("return this")();var f,y=Array.prototype,h=Function.prototype,m=Object.prototype,g=d["__core-js_shared__"],v=(f=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",b=h.toString,R=m.hasOwnProperty,O=m.toString,S=RegExp("^"+b.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=d.Symbol,w=y.splice,I=getNative(d,"Map"),P=getNative(Object,"create"),j=C?C.prototype:void 0,$=j?j.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function assocIndexOf(e,t){for(var r,i,n=e.length;n--;)if((r=e[n][0])===(i=t)||r!=r&&i!=i)return n;return-1}function baseGet(e,t){t=function isKey(e,t){if(A(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return s.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return A(e)?e:T(e)}(t);for(var r=0,i=t.length;null!=e&&r<i;)e=e[toKey(t[r++])];return r&&r==i?e:void 0}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!v&&v in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?O.call(e):"";return t==r||t==i}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:u;return t.test(function toSource(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}Hash.prototype.clear=function hashClear(){this.__data__=P?P(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(P){var i=r[e];return i===t?void 0:i}return R.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return P?void 0!==t[e]:R.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=P&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():w.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?r.push([e,t]):r[i][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(I||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var T=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(a,(function(e,r,i,n){t.push(i?n.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,i=t?t.apply(this,r):r[0],n=memoized.cache;if(n.has(i))return n.get(i);var s=e.apply(this,r);return memoized.cache=n.set(i,s),s};return memoized.cache=new(memoize.Cache||MapCache),memoized}memoize.Cache=MapCache;var A=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==O.call(e)}e.exports=function get(e,t,r){var i=null==e?void 0:baseGet(e,t);return void 0===i?r:i}},1468:e=>{var t="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,o=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=p||d||Function("return this")();var y,h=Array.prototype,m=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],b=(y=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",R=m.toString,O=g.hasOwnProperty,S=g.toString,C=RegExp("^"+R.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=f.Symbol,I=h.splice,P=getNative(f,"Map"),j=getNative(Object,"create"),$=w?w.prototype:void 0,T=$?$.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function assignValue(e,t,r){var i=e[t];O.call(e,t)&&eq(i,r)&&(void 0!==r||t in e)||(e[t]=r)}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!b&&b in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?S.call(e):"";return t==r||t==i}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function toSource(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function baseSet(e,t,r,i){if(!isObject(e))return e;t=function isKey(e,t){if(q(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return s.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return q(e)?e:A(e)}(t);for(var o=-1,a=t.length,c=a-1,u=e;null!=u&&++o<a;){var l=toKey(t[o]),p=r;if(o!=c){var d=u[l];void 0===(p=i?i(d,l,u):void 0)&&(p=isObject(d)?d:isIndex(t[o+1])?[]:{})}assignValue(u,l,p),u=u[l]}return e}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}function isIndex(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||l.test(e))&&e>-1&&e%1==0&&e<t}Hash.prototype.clear=function hashClear(){this.__data__=j?j(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(j){var i=r[e];return i===t?void 0:i}return O.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return j?void 0!==t[e]:O.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=j&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():I.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?r.push([e,t]):r[i][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(P||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var A=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(a,(function(e,r,i,n){t.push(i?n.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,i=t?t.apply(this,r):r[0],n=memoized.cache;if(n.has(i))return n.get(i);var s=e.apply(this,r);return memoized.cache=n.set(i,s),s};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(e,t){return e===t||e!=e&&t!=t}memoize.Cache=MapCache;var q=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function set(e,t,r){return null==e?e:baseSet(e,t,r)}},8565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class LuxonError extends Error{}class InvalidDateTimeError extends LuxonError{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class InvalidIntervalError extends LuxonError{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class InvalidDurationError extends LuxonError{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class ConflictingSpecificationError extends LuxonError{}class InvalidUnitError extends LuxonError{constructor(e){super(`Invalid unit ${e}`)}}class InvalidArgumentError extends LuxonError{}class ZoneIsAbstractError extends LuxonError{constructor(){super("Zone is an abstract class")}}const r="numeric",i="short",n="long",s={year:r,month:r,day:r},o={year:r,month:i,day:r},a={year:r,month:i,day:r,weekday:i},c={year:r,month:n,day:r},u={year:r,month:n,day:r,weekday:n},l={hour:r,minute:r},p={hour:r,minute:r,second:r},d={hour:r,minute:r,second:r,timeZoneName:i},f={hour:r,minute:r,second:r,timeZoneName:n},y={hour:r,minute:r,hourCycle:"h23"},h={hour:r,minute:r,second:r,hourCycle:"h23"},m={hour:r,minute:r,second:r,hourCycle:"h23",timeZoneName:i},g={hour:r,minute:r,second:r,hourCycle:"h23",timeZoneName:n},v={year:r,month:r,day:r,hour:r,minute:r},b={year:r,month:r,day:r,hour:r,minute:r,second:r},R={year:r,month:i,day:r,hour:r,minute:r},O={year:r,month:i,day:r,hour:r,minute:r,second:r},S={year:r,month:i,day:r,weekday:i,hour:r,minute:r},C={year:r,month:n,day:r,hour:r,minute:r,timeZoneName:i},w={year:r,month:n,day:r,hour:r,minute:r,second:r,timeZoneName:i},I={year:r,month:n,day:r,weekday:n,hour:r,minute:r,timeZoneName:n},P={year:r,month:n,day:r,weekday:n,hour:r,minute:r,second:r,timeZoneName:n};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function bestBy(e,t,r){if(0!==e.length)return e.reduce(((e,i)=>{const n=[t(i),i];return e&&r(e[0],n[0])===e[0]?e:n}),null)[1]}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,r){return isInteger(e)&&e>=t&&e<=r}function padStart(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function parseInteger(e){return isUndefined(e)||null===e||""===e?void 0:parseInt(e,10)}function parseFloating(e){return isUndefined(e)||null===e||""===e?void 0:parseFloat(e)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function roundTo(e,t,r=!1){const i=10**t;return(r?Math.trunc:Math.round)(e*i)/i}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){const r=function floorMod(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?isLeapYear(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function objToLocalTS(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function weeksInWeekYear(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===i?53:52}function untruncateYear(e){return e>99?e:e>60?1900+e:2e3+e}function parseZoneInfo(e,t,r,i=null){const n=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const o={timeZoneName:t,...s},a=new Intl.DateTimeFormat(r,o).formatToParts(n).find((e=>"timezonename"===e.type.toLowerCase()));return a?a.value:null}function signedOffset(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-i:i)}function asNumber(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError(`Invalid unit value ${e}`);return t}function normalizeObject(e,t){const r={};for(const i in e)if(hasOwnProperty(e,i)){const n=e[i];if(null==n)continue;r[t(i)]=asNumber(n)}return r}function formatOffset(e,t){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),n=e>=0?"+":"-";switch(t){case"short":return`${n}${padStart(r,2)}:${padStart(i,2)}`;case"narrow":return`${n}${r}${i>0?`:${i}`:""}`;case"techie":return`${n}${padStart(r,2)}${padStart(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function timeObject(e){return function pick(e,t){return t.reduce(((t,r)=>(t[r]=e[r],t)),{})}(e,["hour","minute","second","millisecond"])}const j=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,$=["January","February","March","April","May","June","July","August","September","October","November","December"],T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],A=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[...A];case"short":return[...T];case"long":return[...$];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const q=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],N=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],x=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[...x];case"short":return[...N];case"long":return[...q];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const E=["AM","PM"],D=["Before Christ","Anno Domini"],M=["BC","AD"],k=["B","A"];function eras(e){switch(e){case"narrow":return[...k];case"short":return[...M];case"long":return[...D];default:return null}}function stringifyTokens(e,t){let r="";for(const i of e)i.literal?r+=i.val:r+=t(i.val);return r}const F={D:s,DD:o,DDD:c,DDDD:u,t:l,tt:p,ttt:d,tttt:f,T:y,TT:h,TTT:m,TTTT:g,f:v,ff:R,fff:C,ffff:I,F:b,FF:O,FFF:w,FFFF:P};class Formatter{static create(e,t={}){return new Formatter(e,t)}static parseFormat(e){let t=null,r="",i=!1;const n=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);"'"===o?(r.length>0&&n.push({literal:i,val:r}),t=null,r="",i=!i):i||o===t?r+=o:(r.length>0&&n.push({literal:!1,val:r}),r=o,t=o)}return r.length>0&&n.push({literal:i,val:r}),n}static macroTokenToFormatOpts(e){return F[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return padStart(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,string=(t,r)=>this.loc.extract(e,t,r),formatOffset=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",meridiem=()=>r?function meridiemForDateTime(e){return E[e.hour<12?0:1]}(e):string({hour:"numeric",hourCycle:"h12"},"dayperiod"),month=(t,i)=>r?function monthForDateTime(e,t){return months(t)[e.month-1]}(e,t):string(i?{month:t}:{month:t,day:"numeric"},"month"),weekday=(t,i)=>r?function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}(e,t):string(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),maybeMacro=t=>{const r=Formatter.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},era=t=>r?function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}(e,t):string({era:t},"era");return stringifyTokens(Formatter.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return formatOffset({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return formatOffset({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return formatOffset({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return meridiem();case"d":return i?string({day:"numeric"},"day"):this.num(e.day);case"dd":return i?string({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return weekday("short",!0);case"cccc":return weekday("long",!0);case"ccccc":return weekday("narrow",!0);case"EEE":return weekday("short",!1);case"EEEE":return weekday("long",!1);case"EEEEE":return weekday("narrow",!1);case"L":return i?string({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?string({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return month("short",!0);case"LLLL":return month("long",!0);case"LLLLL":return month("narrow",!0);case"M":return i?string({month:"numeric"},"month"):this.num(e.month);case"MM":return i?string({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return month("short",!1);case"MMMM":return month("long",!1);case"MMMMM":return month("narrow",!1);case"y":return i?string({year:"numeric"},"year"):this.num(e.year);case"yy":return i?string({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?string({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?string({year:"numeric"},"year"):this.num(e.year,6);case"G":return era("short");case"GG":return era("long");case"GGGGG":return era("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return maybeMacro(t)}}))}formatDurationFromString(e,t){const tokenToField=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=Formatter.parseFormat(t),i=r.reduce(((e,{literal:t,val:r})=>t?e:e.concat(r)),[]);return stringifyTokens(r,(e=>t=>{const r=tokenToField(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...i.map(tokenToField).filter((e=>e)))))}}class Invalid{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Zone{get type(){throw new ZoneIsAbstractError}get name(){throw new ZoneIsAbstractError}get ianaName(){return this.name}get isUniversal(){throw new ZoneIsAbstractError}offsetName(e,t){throw new ZoneIsAbstractError}formatOffset(e,t){throw new ZoneIsAbstractError}offset(e){throw new ZoneIsAbstractError}equals(e){throw new ZoneIsAbstractError}get isValid(){throw new ZoneIsAbstractError}}let J=null;class SystemZone extends Zone{static get instance(){return null===J&&(J=new SystemZone),J}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return parseZoneInfo(e,t,r)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let U={};const L={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let V={};class IANAZone extends Zone{static create(e){return V[e]||(V[e]=new IANAZone(e)),V[e]}static resetCache(){V={},U={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=IANAZone.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return parseZoneInfo(e,t,r,this.name)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const r=function makeDTF(e){return U[e]||(U[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),U[e]}(this.name);let[i,n,s,o,a,c,u]=r.formatToParts?function partsOffset(e,t){const r=e.formatToParts(t),i=[];for(let e=0;e<r.length;e++){const{type:t,value:n}=r[e],s=L[t];"era"===t?i[s]=n:isUndefined(s)||(i[s]=parseInt(n,10))}return i}(r,t):function hackyOffset(e,t){const r=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,n,s,o,a,c,u,l]=i;return[o,n,s,a,c,u,l]}(r,t);"BC"===o&&(i=1-Math.abs(i));let l=+t;const p=l%1e3;return l-=p>=0?p:1e3+p,(objToLocalTS({year:i,month:n,day:s,hour:24===a?0:a,minute:c,second:u,millisecond:0})-l)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B=null;class FixedOffsetZone extends Zone{static get utcInstance(){return null===B&&(B=new FixedOffsetZone(0)),B}static instance(e){return 0===e?FixedOffsetZone.utcInstance:new FixedOffsetZone(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new FixedOffsetZone(signedOffset(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${formatOffset(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${formatOffset(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return formatOffset(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class InvalidZone extends Zone{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function normalizeZone(e,t){if(isUndefined(e)||null===e)return t;if(e instanceof Zone)return e;if(function isString(e){return"string"==typeof e}(e)){const r=e.toLowerCase();return"default"===r?t:"local"===r||"system"===r?SystemZone.instance:"utc"===r||"gmt"===r?FixedOffsetZone.utcInstance:FixedOffsetZone.parseSpecifier(r)||IANAZone.create(e)}return isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}let z,now=()=>Date.now(),G="system",H=null,Q=null,Z=null;class Settings{static get now(){return now}static set now(e){now=e}static set defaultZone(e){G=e}static get defaultZone(){return normalizeZone(G,SystemZone.instance)}static get defaultLocale(){return H}static set defaultLocale(e){H=e}static get defaultNumberingSystem(){return Q}static set defaultNumberingSystem(e){Q=e}static get defaultOutputCalendar(){return Z}static set defaultOutputCalendar(e){Z=e}static get throwOnInvalid(){return z}static set throwOnInvalid(e){z=e}static resetCaches(){Locale.resetCache(),IANAZone.resetCache()}}let K={};let W={};function getCachedDTF(e,t={}){const r=JSON.stringify([e,t]);let i=W[r];return i||(i=new Intl.DateTimeFormat(e,t),W[r]=i),i}let Y={};let X={};let ee=null;function listStuff(e,t,r,i,n){const s=e.listingMode(r);return"error"===s?null:"en"===s?i(t):n(t)}class PolyNumberFormatter{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:n,...s}=r;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function getCachedINF(e,t={}){const r=JSON.stringify([e,t]);let i=Y[r];return i||(i=new Intl.NumberFormat(e,t),Y[r]=i),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)}}class PolyDateFormatter{constructor(e,t,r){let i;if(this.opts=r,e.zone.isUniversal){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&IANAZone.create(n).valid?(i=n,this.dt=e):(i="UTC",r.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);const n={...this.opts};i&&(n.timeZone=i),this.dtf=getCachedDTF(t,n)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class PolyRelFormatter{constructor(e,t,r){this.opts={style:"long",...r},!t&&hasRelative()&&(this.rtf=function getCachedRTF(e,t={}){const{base:r,...i}=t,n=JSON.stringify([e,i]);let s=X[n];return s||(s=new Intl.RelativeTimeFormat(e,t),X[n]=s),s}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function formatRelativeTime(e,t,r="always",i=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&s){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${n[e][0]}`;case-1:return r?"yesterday":`last ${n[e][0]}`;case 0:return r?"today":`this ${n[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),c=1===a,u=n[e],l=i?c?u[1]:u[2]||u[1]:c?n[e][0]:e;return o?`${a} ${l} ago`:`in ${a} ${l}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Locale{static fromOpts(e){return Locale.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,r,i=!1){const n=e||Settings.defaultLocale,s=n||(i?"en-US":function systemLocale(){return ee||(ee=(new Intl.DateTimeFormat).resolvedOptions().locale,ee)}()),o=t||Settings.defaultNumberingSystem,a=r||Settings.defaultOutputCalendar;return new Locale(s,o,a,n)}static resetCache(){ee=null,W={},Y={},X={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:r}={}){return Locale.create(e,t,r)}constructor(e,t,r,i){const[n,s,o]=function parseLocaleString(e){const t=e.indexOf("-u-");if(-1===t)return[e];{let r;const i=e.substring(0,t);try{r=getCachedDTF(e).resolvedOptions()}catch(e){r=getCachedDTF(i).resolvedOptions()}const{numberingSystem:n,calendar:s}=r;return[i,n,s]}}(e);this.locale=n,this.numberingSystem=t||s||null,this.outputCalendar=r||o||null,this.intl=function intlConfigString(e,t,r){return r||t?(e+="-u",r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Locale.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,r=!0){return listStuff(this,e,r,months,(()=>{const r=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=function mapMonths(e){const t=[];for(let r=1;r<=12;r++){const i=DateTime.utc(2016,r,1);t.push(e(i))}return t}((e=>this.extract(e,r,"month")))),this.monthsCache[i][e]}))}weekdays(e,t=!1,r=!0){return listStuff(this,e,r,weekdays,(()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function mapWeekdays(e){const t=[];for(let r=1;r<=7;r++){const i=DateTime.utc(2016,11,13+r);t.push(e(i))}return t}((e=>this.extract(e,r,"weekday")))),this.weekdaysCache[i][e]}))}meridiems(e=!0){return listStuff(this,void 0,e,(()=>E),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e,t=!0){return listStuff(this,e,t,eras,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,r){const i=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===r));return i?i.value:null}numberFormatter(e={}){return new PolyNumberFormatter(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new PolyDateFormatter(e,this.intl,t)}relFormatter(e={}){return new PolyRelFormatter(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function getCachedLF(e,t={}){const r=JSON.stringify([e,t]);let i=K[r];return i||(i=new Intl.ListFormat(e,t),K[r]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function combineRegexes(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function combineExtractors(...e){return t=>e.reduce((([e,r,i],n)=>{const[s,o,a]=n(t,i);return[{...e,...s},o||r,a]}),[{},null,1]).slice(0,2)}function parse(e,...t){if(null==e)return[null,null];for(const[r,i]of t){const t=r.exec(e);if(t)return i(t)}return[null,null]}function simpleParse(...e){return(t,r)=>{const i={};let n;for(n=0;n<e.length;n++)i[e[n]]=parseInteger(t[r+n]);return[i,null,r+n]}}const te=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,re=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ie=RegExp(`${re.source}${`(?:${te.source}?(?:\\[(${j.source})\\])?)?`}`),ne=RegExp(`(?:T${ie.source})?`),se=simpleParse("weekYear","weekNumber","weekDay"),oe=simpleParse("year","ordinal"),ae=RegExp(`${re.source} ?(?:${te.source}|(${j.source}))?`),ce=RegExp(`(?: ${ae.source})?`);function int(e,t,r){const i=e[t];return isUndefined(i)?r:parseInteger(i)}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){const r=!e[t]&&!e[t+1],i=signedOffset(e[t+1],e[t+2]);return[{},r?null:FixedOffsetZone.instance(i),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}const ue=RegExp(`^T?${re.source}$`),le=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function extractISODuration(e){const[t,r,i,n,s,o,a,c,u]=e,l="-"===t[0],p=c&&"-"===c[0],maybeNegate=(e,t=!1)=>void 0!==e&&(t||e&&l)?-e:e;return[{years:maybeNegate(parseFloating(r)),months:maybeNegate(parseFloating(i)),weeks:maybeNegate(parseFloating(n)),days:maybeNegate(parseFloating(s)),hours:maybeNegate(parseFloating(o)),minutes:maybeNegate(parseFloating(a)),seconds:maybeNegate(parseFloating(c),"-0"===c),milliseconds:maybeNegate(parseMillis(u),p)}]}const pe={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,r,i,n,s,o){const a={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:T.indexOf(r)+1,day:parseInteger(i),hour:parseInteger(n),minute:parseInteger(s)};return o&&(a.second=parseInteger(o)),e&&(a.weekday=e.length>3?q.indexOf(e)+1:N.indexOf(e)+1),a}const de=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){const[,t,r,i,n,s,o,a,c,u,l,p]=e,d=fromStrings(t,n,i,r,s,o,a);let f;return f=c?pe[c]:u?0:signedOffset(l,p),[d,new FixedOffsetZone(f)]}const fe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ye=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,he=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){const[,t,r,i,n,s,o,a]=e;return[fromStrings(t,n,i,r,s,o,a),FixedOffsetZone.utcInstance]}function extractASCII(e){const[,t,r,i,n,s,o,a]=e;return[fromStrings(t,a,r,i,n,s,o),FixedOffsetZone.utcInstance]}const me=combineRegexes(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ne),ge=combineRegexes(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ne),ve=combineRegexes(/(\d{4})-?(\d{3})/,ne),be=combineRegexes(ie),Re=combineExtractors((function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}),extractISOTime,extractISOOffset,extractIANAZone),Oe=combineExtractors(se,extractISOTime,extractISOOffset,extractIANAZone),Se=combineExtractors(oe,extractISOTime,extractISOOffset,extractIANAZone),Ce=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);const we=combineExtractors(extractISOTime);const _e=combineRegexes(/(\d{4})-(\d\d)-(\d\d)/,ce),Ie=combineRegexes(ae),Pe=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);const je={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},$e={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...je},Te=365.2425,Ae=30.436875,qe={years:{quarters:4,months:12,weeks:52.1775,days:Te,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Ae,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...je},Ne=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xe=Ne.slice(0).reverse();function clone$1(e,t,r=!1){const i={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Duration(i)}function convert(e,t,r,i,n){const s=e[n][r],o=t[r]/s,a=!(Math.sign(o)===Math.sign(i[n]))&&0!==i[n]&&Math.abs(o)<=1?function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);i[n]+=a,t[r]-=a*s}class Duration{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let r=t?qe:$e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return Duration.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Duration({values:normalizeObject(e,Duration.normalizeUnit),loc:Locale.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function parseISODuration(e){return parse(e,[le,extractISODuration])}(e);return r?Duration.fromObject(r,t):Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function parseISOTimeOnly(e){return parse(e,[ue,we])}(e);return r?Duration.fromObject(r,t):Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(r);return new Duration({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new InvalidUnitError(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Formatter.create(this.loc,r).formatDurationFromString(this,e):"Invalid Duration"}toHuman(e={}){const t=Ne.map((t=>{const r=this.values[t];return isUndefined(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(i+=".SSS"));let n=r.toFormat(i);return e.includePrefix&&(n="T"+n),n}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e),r={};for(const e of Ne)(hasOwnProperty(t.values,e)||hasOwnProperty(this.values,e))&&(r[e]=t.get(e)+this.get(e));return clone$1(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=asNumber(e(this.values[r],r));return clone$1(this,{values:t},!0)}get(e){return this[Duration.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return clone$1(this,{values:{...this.values,...normalizeObject(e,Duration.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:i}={}){return clone$1(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:r})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return function normalizeValues(e,t){xe.reduce(((r,i)=>isUndefined(t[i])?r:(r&&convert(e,t,r,t,i),i)),null)}(this.matrix,e),clone$1(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Duration.normalizeUnit(e)));const t={},r={},i=this.toObject();let n;for(const s of Ne)if(e.indexOf(s)>=0){n=s;let e=0;for(const t in r)e+=this.matrix[t][s]*r[t],r[t]=0;isNumber(i[s])&&(e+=i[s]);const o=Math.trunc(e);t[s]=o,r[s]=(1e3*e-1e3*o)/1e3;for(const e in i)Ne.indexOf(e)>Ne.indexOf(s)&&convert(this.matrix,i,e,t,s)}else isNumber(i[s])&&(r[s]=i[s]);for(const e in r)0!==r[e]&&(t[n]+=e===n?r[e]:r[e]/this.matrix[n][e]);return clone$1(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return clone$1(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const i of Ne)if(t=this.values[i],r=e.values[i],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1;var t,r;return!0}}const Ee="Invalid Interval";class Interval{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(r);return new Interval({invalid:r})}static fromDateTimes(e,t){const r=friendlyDateTime(e),i=friendlyDateTime(t),n=function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}(r,i);return null==n?new Interval({start:r,end:i}):n}static after(e,t){const r=Duration.fromDurationLike(t),i=friendlyDateTime(e);return Interval.fromDateTimes(i,i.plus(r))}static before(e,t){const r=Duration.fromDurationLike(t),i=friendlyDateTime(e);return Interval.fromDateTimes(i.minus(r),i)}static fromISO(e,t){const[r,i]=(e||"").split("/",2);if(r&&i){let e,n,s,o;try{e=DateTime.fromISO(r,t),n=e.isValid}catch(i){n=!1}try{s=DateTime.fromISO(i,t),o=s.isValid}catch(i){o=!1}if(n&&o)return Interval.fromDateTimes(e,s);if(n){const r=Duration.fromISO(i,t);if(r.isValid)return Interval.after(e,r)}else if(o){const e=Duration.fromISO(r,t);if(e.isValid)return Interval.before(s,e)}}return Interval.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),r=this.end.startOf(e);return Math.floor(r.diff(t,e).get(e))+1}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Interval.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(friendlyDateTime).filter((e=>this.contains(e))).sort(),r=[];let{s:i}=this,n=0;for(;i<this.e;){const e=t[n]||this.e,s=+e>+this.e?this.e:e;r.push(Interval.fromDateTimes(i,s)),i=s,n+=1}return r}splitBy(e){const t=Duration.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:i}=this,n=1;const s=[];for(;i<this.e;){const e=this.start.plus(t.mapUnits((e=>e*n)));r=+e>+this.e?this.e:e,s.push(Interval.fromDateTimes(i,r)),i=r,n+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:Interval.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return Interval.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r]),[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const i=[],n=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...n).sort(((e,t)=>e.time-t.time));for(const e of s)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!=+e.time&&i.push(Interval.fromDateTimes(t,e.time)),t=null);return Interval.merge(i)}difference(...e){return Interval.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ee}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ee}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ee}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ee}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ee}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)}mapEndpoints(e){return Interval.fromDateTimes(e(this.s),e(this.e))}}class Info{static hasDST(e=Settings.defaultZone){const t=DateTime.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return IANAZone.isValidZone(e)}static normalizeZone(e){return normalizeZone(e,Settings.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Locale.create(t,r,n)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Locale.create(t,r,n)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Locale.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Locale.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Locale.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Locale.create(t,null,"gregory").eras(e)}static features(){return{relative:hasRelative()}}}function dayDiff(e,t){const utcDayStart=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=utcDayStart(t)-utcDayStart(e);return Math.floor(Duration.fromMillis(r).as("days"))}function diff(e,t,r,i){let[n,s,o,a]=function highOrderDiffs(e,t,r){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=dayDiff(e,t);return(r-r%7)/7}],["days",dayDiff]],n={};let s,o;for(const[a,c]of i)if(r.indexOf(a)>=0){s=a;let r=c(e,t);o=e.plus({[a]:r}),o>t?(e=e.plus({[a]:r-1}),r-=1):e=o,n[a]=r}return[e,n,o,s]}(e,t,r);const c=t-n,u=r.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(o<t&&(o=n.plus({[a]:1})),o!==n&&(s[a]=(s[a]||0)+c/(o-n)));const l=Duration.fromObject(s,i);return u.length>0?Duration.fromMillis(c,i).shiftTo(...u).plus(l):l}const De={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Me={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ke=De.hanidec.replace(/[\[|\]]/g,"").split("");function digitRegex({numberingSystem:e},t=""){return new RegExp(`${De[e||"latn"]}${t}`)}function intUnit(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function parseDigits(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(-1!==e[r].search(De.hanidec))t+=ke.indexOf(e[r]);else for(const e in Me){const[r,n]=Me[e];i>=r&&i<=n&&(t+=i-r)}}return parseInt(t,10)}return t}(e))}}const Fe=`[ ${String.fromCharCode(160)}]`,Je=new RegExp(Fe,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(Je,Fe)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(Je," ").toLowerCase()}function oneOf(e,t){return null===e?null:{regex:RegExp(e.map(fixListRegex).join("|")),deser:([r])=>e.findIndex((e=>stripInsensitivities(r)===stripInsensitivities(e)))+t}}function offset(e,t){return{regex:e,deser:([,e,t])=>signedOffset(e,t),groups:t}}function simple(e){return{regex:e,deser:([e])=>e}}const Ue={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Le=null;function expandMacroTokens(e,t){return Array.prototype.concat(...e.map((e=>function maybeExpandMacroToken(e,t){if(e.literal)return e;const r=formatOptsToTokens(Formatter.macroTokenToFormatOpts(e.val),t);return null==r||r.includes(void 0)?e:r}(e,t))))}function explainFromTokens(e,t,r){const i=expandMacroTokens(Formatter.parseFormat(r),e),n=i.map((t=>function unitForToken(e,t){const r=digitRegex(t),i=digitRegex(t,"{2}"),n=digitRegex(t,"{3}"),s=digitRegex(t,"{4}"),o=digitRegex(t,"{6}"),a=digitRegex(t,"{1,2}"),c=digitRegex(t,"{1,3}"),u=digitRegex(t,"{1,6}"),l=digitRegex(t,"{1,9}"),p=digitRegex(t,"{2,4}"),d=digitRegex(t,"{4,6}"),literal=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return literal(f);switch(f.val){case"G":return oneOf(t.eras("short",!1),0);case"GG":return oneOf(t.eras("long",!1),0);case"y":return intUnit(u);case"yy":case"kk":return intUnit(p,untruncateYear);case"yyyy":case"kkkk":return intUnit(s);case"yyyyy":return intUnit(d);case"yyyyyy":return intUnit(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return intUnit(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return intUnit(i);case"MMM":return oneOf(t.months("short",!0,!1),1);case"MMMM":return oneOf(t.months("long",!0,!1),1);case"LLL":return oneOf(t.months("short",!1,!1),1);case"LLLL":return oneOf(t.months("long",!1,!1),1);case"o":case"S":return intUnit(c);case"ooo":case"SSS":return intUnit(n);case"u":return simple(l);case"uu":return simple(a);case"uuu":case"E":case"c":return intUnit(r);case"a":return oneOf(t.meridiems(),0);case"EEE":return oneOf(t.weekdays("short",!1,!1),1);case"EEEE":return oneOf(t.weekdays("long",!1,!1),1);case"ccc":return oneOf(t.weekdays("short",!0,!1),1);case"cccc":return oneOf(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return offset(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return literal(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),s=n.find((e=>e.invalidReason));if(s)return{input:t,tokens:i,invalidReason:s.invalidReason};{const[e,r]=function buildRegex(e){return[`^${e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,e]}(n),s=RegExp(e,"i"),[o,a]=function match(e,t,r){const i=e.match(t);if(i){const e={};let t=1;for(const n in r)if(hasOwnProperty(r,n)){const s=r[n],o=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(i.slice(t,t+o))),t+=o}return[i,e]}return[i,{}]}(t,s,r),[c,u,l]=a?function dateTimeFromMatches(e){let t,r=null;return isUndefined(e.z)||(r=IANAZone.create(e.z)),isUndefined(e.Z)||(r||(r=new FixedOffsetZone(e.Z)),t=e.Z),isUndefined(e.q)||(e.M=3*(e.q-1)+1),isUndefined(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),isUndefined(e.u)||(e.S=parseMillis(e.u)),[Object.keys(e).reduce(((t,r)=>{const i=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return i&&(t[i]=e[r]),t}),{}),r,t]}(a):[null,null,void 0];if(hasOwnProperty(a,"a")&&hasOwnProperty(a,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:s,rawMatches:o,matches:a,result:c,zone:u,specificOffset:l}}}function formatOptsToTokens(e,t){if(!e)return null;return Formatter.create(t,e).formatDateTimeParts(function getDummyDateTime(){return Le||(Le=DateTime.fromMillis(1555555555555)),Le}()).map((t=>function tokenForPart(e,t,r){const{type:i,value:n}=e;if("literal"===i)return{literal:!0,val:n};const s=r[i];let o=Ue[i];return"object"==typeof o&&(o=o[s]),o?{literal:!1,val:o}:void 0}(t,0,e)))}const Ve=[0,31,59,90,120,151,181,212,243,273,304,334],Be=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function dayOfWeek(e,t,r){const i=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const n=i.getUTCDay();return 0===n?7:n}function computeOrdinal(e,t,r){return r+(isLeapYear(e)?Be:Ve)[t-1]}function uncomputeOrdinal(e,t){const r=isLeapYear(e)?Be:Ve,i=r.findIndex((e=>e<t));return{month:i+1,day:t-r[i]}}function gregorianToWeek(e){const{year:t,month:r,day:i}=e,n=computeOrdinal(t,r,i),s=dayOfWeek(t,r,i);let o,a=Math.floor((n-s+10)/7);return a<1?(o=t-1,a=weeksInWeekYear(o)):a>weeksInWeekYear(t)?(o=t+1,a=1):o=t,{weekYear:o,weekNumber:a,weekday:s,...timeObject(e)}}function weekToGregorian(e){const{weekYear:t,weekNumber:r,weekday:i}=e,n=dayOfWeek(t,1,4),s=daysInYear(t);let o,a=7*r+i-n-3;a<1?(o=t-1,a+=daysInYear(o)):a>s?(o=t+1,a-=daysInYear(t)):o=t;const{month:c,day:u}=uncomputeOrdinal(o,a);return{year:o,month:c,day:u,...timeObject(e)}}function gregorianToOrdinal(e){const{year:t,month:r,day:i}=e;return{year:t,ordinal:computeOrdinal(t,r,i),...timeObject(e)}}function ordinalToGregorian(e){const{year:t,ordinal:r}=e,{month:i,day:n}=uncomputeOrdinal(t,r);return{year:t,month:i,day:n,...timeObject(e)}}function hasInvalidGregorianData(e){const t=isInteger(e.year),r=integerBetween(e.month,1,12),i=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?r?!i&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){const{hour:t,minute:r,second:i,millisecond:n}=e,s=integerBetween(t,0,23)||24===t&&0===r&&0===i&&0===n,o=integerBetween(r,0,59),a=integerBetween(i,0,59),c=integerBetween(n,0,999);return s?o?a?!c&&unitOutOfRange("millisecond",n):unitOutOfRange("second",i):unitOutOfRange("minute",r):unitOutOfRange("hour",t)}const ze="Invalid DateTime",Ge=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",`the zone "${e.name}" is not supported`)}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime({...r,...t,old:r})}function fixOffset(e,t,r){let i=e-60*t*1e3;const n=r.offset(i);if(t===n)return[i,t];i-=60*(n-t)*1e3;const s=r.offset(i);return n===s?[i,n]:[e-60*Math.min(n,s)*1e3,Math.max(n,s)]}function tsToObj(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function objToTS(e,t,r){return fixOffset(objToLocalTS(e),t,r)}function adjustTime(e,t){const r=e.o,i=e.c.year+Math.trunc(t.years),n=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:i,month:n,day:Math.min(e.c.day,daysInMonth(i,n))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=objToLocalTS(s);let[c,u]=fixOffset(a,r,e.zone);return 0!==o&&(c+=o,u=e.zone.offset(c)),{ts:c,o:u}}function parseDataToDateTime(e,t,r,i,n,s){const{setZone:o,zone:a}=r;if(e&&0!==Object.keys(e).length){const i=t||a,n=DateTime.fromObject(e,{...r,zone:i,specificOffset:s});return o?n:n.setZone(a)}return DateTime.invalid(new Invalid("unparsable",`the input "${n}" can't be parsed as ${i}`))}function toTechFormat(e,t,r=!0){return e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toISODate(e,t){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=padStart(e.c.year,r?6:4),t?(i+="-",i+=padStart(e.c.month),i+="-",i+=padStart(e.c.day)):(i+=padStart(e.c.month),i+=padStart(e.c.day)),i}function toISOTime(e,t,r,i,n,s){let o=padStart(e.c.hour);return t?(o+=":",o+=padStart(e.c.minute),0===e.c.second&&r||(o+=":")):o+=padStart(e.c.minute),0===e.c.second&&r||(o+=padStart(e.c.second),0===e.c.millisecond&&i||(o+=".",o+=padStart(e.c.millisecond,3))),n&&(e.isOffsetFixed&&0===e.offset&&!s?o+="Z":e.o<0?(o+="-",o+=padStart(Math.trunc(-e.o/60)),o+=":",o+=padStart(Math.trunc(-e.o%60))):(o+="+",o+=padStart(Math.trunc(e.o/60)),o+=":",o+=padStart(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const He={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Qe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Ze={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ke=["year","month","day","hour","minute","second","millisecond"],We=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ye=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new InvalidUnitError(e);return t}function quickDT(e,t){const r=normalizeZone(t.zone,Settings.defaultZone),i=Locale.fromObject(t),n=Settings.now();let s,o;if(isUndefined(e.year))s=n;else{for(const t of Ke)isUndefined(e[t])&&(e[t]=He[t]);const t=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(t)return DateTime.invalid(t);const i=r.offset(n);[s,o]=objToTS(e,i,r)}return new DateTime({ts:s,zone:r,loc:i,o})}function diffRelative(e,t,r){const i=!!isUndefined(r.round)||r.round,format=(e,n)=>{e=roundTo(e,i||r.calendary?0:2,!0);return t.loc.clone(r).relFormatter(r).format(e,n)},differ=i=>r.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(r.unit)return format(differ(r.unit),r.unit);for(const e of r.units){const t=differ(e);if(Math.abs(t)>=1)return format(t,e)}return format(e>t?-0:0,r.units[r.units.length-1])}function lastOpts(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}class DateTime{constructor(e){const t=e.zone||Settings.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(t.isValid?null:unsupportedZone(t));this.ts=isUndefined(e.ts)?Settings.now():e.ts;let i=null,n=null;if(!r){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,n]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);i=tsToObj(this.ts,e),r=Number.isNaN(i.year)?new Invalid("invalid input"):null,i=r?null:i,n=r?null:e}}this._zone=t,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}static now(){return new DateTime({})}static local(){const[e,t]=lastOpts(arguments),[r,i,n,s,o,a,c]=t;return quickDT({year:r,month:i,day:n,hour:s,minute:o,second:a,millisecond:c},e)}static utc(){const[e,t]=lastOpts(arguments),[r,i,n,s,o,a,c]=t;return e.zone=FixedOffsetZone.utcInstance,quickDT({year:r,month:i,day:n,hour:s,minute:o,second:a,millisecond:c},e)}static fromJSDate(e,t={}){const r=function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?e.valueOf():NaN;if(Number.isNaN(r))return DateTime.invalid("invalid input");const i=normalizeZone(t.zone,Settings.defaultZone);return i.isValid?new DateTime({ts:r,zone:i,loc:Locale.fromObject(t)}):DateTime.invalid(unsupportedZone(i))}static fromMillis(e,t={}){if(isNumber(e))return e<-Ge||e>Ge?DateTime.invalid("Timestamp out of range"):new DateTime({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(isNumber(e))return new DateTime({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=normalizeZone(t.zone,Settings.defaultZone);if(!r.isValid)return DateTime.invalid(unsupportedZone(r));const i=Settings.now(),n=isUndefined(t.specificOffset)?r.offset(i):t.specificOffset,s=normalizeObject(e,normalizeUnit),o=!isUndefined(s.ordinal),a=!isUndefined(s.year),c=!isUndefined(s.month)||!isUndefined(s.day),u=a||c,l=s.weekYear||s.weekNumber,p=Locale.fromObject(t);if((u||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");const d=l||s.weekday&&!u;let f,y,h=tsToObj(i,n);d?(f=We,y=Qe,h=gregorianToWeek(h)):o?(f=Ye,y=Ze,h=gregorianToOrdinal(h)):(f=Ke,y=He);let m=!1;for(const e of f){isUndefined(s[e])?s[e]=m?y[e]:h[e]:m=!0}const g=d?function hasInvalidWeekData(e){const t=isInteger(e.weekYear),r=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),i=integerBetween(e.weekday,1,7);return t?r?!i&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}(s):o?function hasInvalidOrdinalData(e){const t=isInteger(e.year),r=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!r&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}(s):hasInvalidGregorianData(s),v=g||hasInvalidTimeData(s);if(v)return DateTime.invalid(v);const b=d?weekToGregorian(s):o?ordinalToGregorian(s):s,[R,O]=objToTS(b,n,r),S=new DateTime({ts:R,zone:r,o:O,loc:p});return s.weekday&&u&&e.weekday!==S.weekday?DateTime.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${S.toISO()}`):S}static fromISO(e,t={}){const[r,i]=function parseISODate(e){return parse(e,[me,Re],[ge,Oe],[ve,Se],[be,Ce])}(e);return parseDataToDateTime(r,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,i]=function parseRFC2822Date(e){return parse(function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[de,extractRFC2822])}(e);return parseDataToDateTime(r,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,i]=function parseHTTPDate(e){return parse(e,[fe,extractRFC1123Or850],[ye,extractRFC1123Or850],[he,extractASCII])}(e);return parseDataToDateTime(r,i,t,"HTTP",t)}static fromFormat(e,t,r={}){if(isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:n=null}=r,s=Locale.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),[o,a,c,u]=function parseFromTokens(e,t,r){const{result:i,zone:n,specificOffset:s,invalidReason:o}=explainFromTokens(e,t,r);return[i,n,s,o]}(s,e,t);return u?DateTime.invalid(u):parseDataToDateTime(o,a,r,`format ${t}`,e,c)}static fromString(e,t,r={}){return DateTime.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,i]=function parseSQL(e){return parse(e,[_e,Re],[Ie,Pe])}(e);return parseDataToDateTime(r,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(r);return new DateTime({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=formatOptsToTokens(e,Locale.fromObject(t));return r?r.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return expandMacroTokens(Formatter.parseFormat(e),Locale.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}get ordinal(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}get monthShort(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return isLeapYear(this.year)}get daysInMonth(){return daysInMonth(this.year,this.month)}get daysInYear(){return this.isValid?daysInYear(this.year):NaN}get weeksInWeekYear(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:i}=Formatter.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(FixedOffsetZone.instance(e),t)}toLocal(){return this.setZone(Settings.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=normalizeZone(e,Settings.defaultZone)).equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[i]=objToTS(r,t,e)}return clone(this,{ts:i,zone:e})}return DateTime.invalid(unsupportedZone(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return clone(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=normalizeObject(e,normalizeUnit),r=!isUndefined(t.weekYear)||!isUndefined(t.weekNumber)||!isUndefined(t.weekday),i=!isUndefined(t.ordinal),n=!isUndefined(t.year),s=!isUndefined(t.month)||!isUndefined(t.day),o=n||s,a=t.weekYear||t.weekNumber;if((o||i)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");let c;r?c=weekToGregorian({...gregorianToWeek(this.c),...t}):isUndefined(t.ordinal)?(c={...this.toObject(),...t},isUndefined(t.day)&&(c.day=Math.min(daysInMonth(c.year,c.month),c.day))):c=ordinalToGregorian({...gregorianToOrdinal(this.c),...t});const[u,l]=objToTS(c,this.o,this.zone);return clone(this,{ts:u,o:l})}plus(e){if(!this.isValid)return this;return clone(this,adjustTime(this,Duration.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return clone(this,adjustTime(this,Duration.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},r=Duration.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===r&&(t.weekday=1),"quarters"===r){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ze}toLocaleString(e=s,t={}){return this.isValid?Formatter.create(this.loc.clone(t),e).formatDateTime(this):ze}toLocaleParts(e={}){return this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:n=!1}={}){if(!this.isValid)return null;const s="extended"===e;let o=toISODate(this,s);return o+="T",o+=toISOTime(this,s,t,r,i,n),o}toISODate({format:e="extended"}={}){return this.isValid?toISODate(this,"extended"===e):null}toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:n=!1,format:s="extended"}={}){if(!this.isValid)return null;return(i?"T":"")+toISOTime(this,"extended"===s,t,e,r,n)}toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?toISODate(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(r&&(i+=" "),t?i+="z":e&&(i+="ZZ")),toTechFormat(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ze}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return Duration.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},n=function maybeArray(e){return Array.isArray(e)?e:[e]}(t).map(Duration.normalizeUnit),s=e.valueOf()>this.valueOf(),o=diff(s?this:e,s?e:this,n,i);return s?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(DateTime.now(),e,t)}until(e){return this.isValid?Interval.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=r&&r<=i.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||DateTime.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(i=e.unit,n=void 0),diffRelative(t,this.plus(r),{...e,numeric:"always",units:i,unit:n})}toRelativeCalendar(e={}){return this.isValid?diffRelative(e.base||DateTime.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError("min requires all arguments be DateTimes");return bestBy(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError("max requires all arguments be DateTimes");return bestBy(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:i=null,numberingSystem:n=null}=r;return explainFromTokens(Locale.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return DateTime.fromFormatExplain(e,t,r)}static get DATE_SHORT(){return s}static get DATE_MED(){return o}static get DATE_MED_WITH_WEEKDAY(){return a}static get DATE_FULL(){return c}static get DATE_HUGE(){return u}static get TIME_SIMPLE(){return l}static get TIME_WITH_SECONDS(){return p}static get TIME_WITH_SHORT_OFFSET(){return d}static get TIME_WITH_LONG_OFFSET(){return f}static get TIME_24_SIMPLE(){return y}static get TIME_24_WITH_SECONDS(){return h}static get TIME_24_WITH_SHORT_OFFSET(){return m}static get TIME_24_WITH_LONG_OFFSET(){return g}static get DATETIME_SHORT(){return v}static get DATETIME_SHORT_WITH_SECONDS(){return b}static get DATETIME_MED(){return R}static get DATETIME_MED_WITH_SECONDS(){return O}static get DATETIME_MED_WITH_WEEKDAY(){return S}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return w}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=DateTime,t.Duration=Duration,t.FixedOffsetZone=FixedOffsetZone,t.IANAZone=IANAZone,t.Info=Info,t.Interval=Interval,t.InvalidZone=InvalidZone,t.Settings=Settings,t.SystemZone=SystemZone,t.VERSION="3.0.4",t.Zone=Zone},2592:(e,t,r)=>{const i=r(7138),n=r(5115),s=r(6907),o=r(3776);function renderCanvas(e,t,r,s,o){const a=[].slice.call(arguments,1),c=a.length,u="function"==typeof a[c-1];if(!u&&!i())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=s=void 0):2!==c||t.getContext||(s=r,r=t,t=void 0),new Promise((function(i,o){try{const o=n.create(r,s);i(e(o,t,s))}catch(e){o(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(o=r,r=t,t=s=void 0):3===c&&(t.getContext&&void 0===o?(o=s,s=void 0):(o=s,s=r,r=t,t=void 0));try{const i=n.create(r,s);o(null,e(i,t,s))}catch(e){o(e)}}t.create=n.create,t.toCanvas=renderCanvas.bind(null,s.render),t.toDataURL=renderCanvas.bind(null,s.renderToDataURL),t.toString=renderCanvas.bind(null,(function(e,t,r){return o.render(e,r)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,r)=>{const i=r(242).getSymbolSize;t.getRowColCoords=function getRowColCoords(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=i(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),s=[r-7];for(let e=1;e<t-1;e++)s[e]=s[e-1]-n;return s.push(6),s.reverse()},t.getPositions=function getPositions(e){const r=[],i=t.getRowColCoords(e),n=i.length;for(let e=0;e<n;e++)for(let t=0;t<n;t++)0===e&&0===t||0===e&&t===n-1||e===n-1&&0===t||r.push([i[e],i[t]]);return r}},8260:(e,t,r)=>{const i=r(6910),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(e){this.mode=i.ALPHANUMERIC,this.data=e}AlphanumericData.getBitsLength=function getBitsLength(e){return 11*Math.floor(e/2)+e%2*6},AlphanumericData.prototype.getLength=function getLength(){return this.data.length},AlphanumericData.prototype.getBitsLength=function getBitsLength(){return AlphanumericData.getBitsLength(this.data.length)},AlphanumericData.prototype.write=function write(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},e.exports=AlphanumericData},7245:e=>{function BitBuffer(){this.buffer=[],this.length=0}BitBuffer.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=BitBuffer},3280:e=>{function BitMatrix(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}BitMatrix.prototype.set=function(e,t,r,i){const n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},BitMatrix.prototype.get=function(e,t){return this.data[e*this.size+t]},BitMatrix.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},BitMatrix.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=BitMatrix},3424:(e,t,r)=>{const i=r(2378),n=r(6910);function ByteData(e){this.mode=n.BYTE,"string"==typeof e&&(e=i(e)),this.data=new Uint8Array(e)}ByteData.getBitsLength=function getBitsLength(e){return 8*e},ByteData.prototype.getLength=function getLength(){return this.data.length},ByteData.prototype.getBitsLength=function getBitsLength(){return ByteData.getBitsLength(this.data.length)},ByteData.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=ByteData},5393:(e,t,r)=>{const i=r(4908),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function getBlocksCount(e,t){switch(t){case i.L:return n[4*(e-1)+0];case i.M:return n[4*(e-1)+1];case i.Q:return n[4*(e-1)+2];case i.H:return n[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function getTotalCodewordsCount(e,t){switch(t){case i.L:return s[4*(e-1)+0];case i.M:return s[4*(e-1)+1];case i.Q:return s[4*(e-1)+2];case i.H:return s[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function isValid(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},6526:(e,t,r)=>{const i=r(242).getSymbolSize;t.getPositions=function getPositions(e){const t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,r)=>{const i=r(242),n=i.getBCHDigit(1335);t.getEncodedBits=function getEncodedBits(e,t){const r=e.bit<<3|t;let s=r<<10;for(;i.getBCHDigit(s)-n>=0;)s^=1335<<i.getBCHDigit(s)-n;return 21522^(r<<10|s)}},2577:(e,t)=>{const r=new Uint8Array(512),i=new Uint8Array(256);!function initTables(){let e=1;for(let t=0;t<255;t++)r[t]=e,i[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function log(e){if(e<1)throw new Error("log("+e+")");return i[e]},t.exp=function exp(e){return r[e]},t.mul=function mul(e,t){return 0===e||0===t?0:r[i[e]+i[t]]}},5442:(e,t,r)=>{const i=r(6910),n=r(242);function KanjiData(e){this.mode=i.KANJI,this.data=e}KanjiData.getBitsLength=function getBitsLength(e){return 13*e},KanjiData.prototype.getLength=function getLength(){return this.data.length},KanjiData.prototype.getBitsLength=function getBitsLength(){return KanjiData.getBitsLength(this.data.length)},KanjiData.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=KanjiData},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,i=3,n=40,s=10;function getMaskAt(e,r,i){switch(e){case t.Patterns.PATTERN000:return(r+i)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return i%3==0;case t.Patterns.PATTERN011:return(r+i)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2==0;case t.Patterns.PATTERN101:return r*i%2+r*i%3==0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2==0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function isValid(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function from(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function getPenaltyN1(e){const t=e.size;let i=0,n=0,s=0,o=null,a=null;for(let c=0;c<t;c++){n=s=0,o=a=null;for(let u=0;u<t;u++){let t=e.get(c,u);t===o?n++:(n>=5&&(i+=r+(n-5)),o=t,n=1),t=e.get(u,c),t===a?s++:(s>=5&&(i+=r+(s-5)),a=t,s=1)}n>=5&&(i+=r+(n-5)),s>=5&&(i+=r+(s-5))}return i},t.getPenaltyN2=function getPenaltyN2(e){const t=e.size;let r=0;for(let i=0;i<t-1;i++)for(let n=0;n<t-1;n++){const t=e.get(i,n)+e.get(i,n+1)+e.get(i+1,n)+e.get(i+1,n+1);4!==t&&0!==t||r++}return r*i},t.getPenaltyN3=function getPenaltyN3(e){const t=e.size;let r=0,i=0,s=0;for(let n=0;n<t;n++){i=s=0;for(let o=0;o<t;o++)i=i<<1&2047|e.get(n,o),o>=10&&(1488===i||93===i)&&r++,s=s<<1&2047|e.get(o,n),o>=10&&(1488===s||93===s)&&r++}return r*n},t.getPenaltyN4=function getPenaltyN4(e){let t=0;const r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*s},t.applyMask=function applyMask(e,t){const r=t.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)t.isReserved(n,i)||t.xor(n,i,getMaskAt(e,n,i))},t.getBestMask=function getBestMask(e,r){const i=Object.keys(t.Patterns).length;let n=0,s=1/0;for(let o=0;o<i;o++){r(o),t.applyMask(o,e);const i=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),i<s&&(s=i,n=o)}return n}},6910:(e,t,r)=>{const i=r(3114),n=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function getCharCountIndicator(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!i.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function getBestModeForData(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function toString(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function isValid(e){return e&&e.bit&&e.ccBits},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},1085:(e,t,r)=>{const i=r(6910);function NumericData(e){this.mode=i.NUMERIC,this.data=e.toString()}NumericData.getBitsLength=function getBitsLength(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},NumericData.prototype.getLength=function getLength(){return this.data.length},NumericData.prototype.getBitsLength=function getBitsLength(){return NumericData.getBitsLength(this.data.length)},NumericData.prototype.write=function write(e){let t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);const n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},e.exports=NumericData},6143:(e,t,r)=>{const i=r(2577);t.mul=function mul(e,t){const r=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let s=0;s<t.length;s++)r[n+s]^=i.mul(e[n],t[s]);return r},t.mod=function mod(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let n=0;n<t.length;n++)r[n]^=i.mul(t[n],e);let n=0;for(;n<r.length&&0===r[n];)n++;r=r.slice(n)}return r},t.generateECPolynomial=function generateECPolynomial(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=t.mul(r,new Uint8Array([1,i.exp(n)]));return r}},5115:(e,t,r)=>{const i=r(242),n=r(4908),s=r(7245),o=r(3280),a=r(1845),c=r(6526),u=r(7126),l=r(5393),p=r(2882),d=r(3103),f=r(1642),y=r(6910),h=r(6130);function setupFormatInfo(e,t,r){const i=e.size,n=f.getEncodedBits(t,r);let s,o;for(s=0;s<15;s++)o=1==(n>>s&1),s<6?e.set(s,8,o,!0):s<8?e.set(s+1,8,o,!0):e.set(i-15+s,8,o,!0),s<8?e.set(8,i-s-1,o,!0):s<9?e.set(8,15-s-1+1,o,!0):e.set(8,15-s-1,o,!0);e.set(i-8,8,1,!0)}function createData(e,t,r){const n=new s;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),y.getCharCountIndicator(t.mode,e)),t.write(n)}));const o=8*(i.getSymbolTotalCodewords(e)-l.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const a=(o-n.getLengthInBits())/8;for(let e=0;e<a;e++)n.put(e%2?17:236,8);return function createCodewords(e,t,r){const n=i.getSymbolTotalCodewords(t),s=l.getTotalCodewordsCount(t,r),o=n-s,a=l.getBlocksCount(t,r),c=a-n%a,u=Math.floor(n/a),d=Math.floor(o/a),f=d+1,y=u-d,h=new p(y);let m=0;const g=new Array(a),v=new Array(a);let b=0;const R=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<c?d:f;g[e]=R.slice(m,m+t),v[e]=h.encode(g[e]),m+=t,b=Math.max(b,t)}const O=new Uint8Array(n);let S,C,w=0;for(S=0;S<b;S++)for(C=0;C<a;C++)S<g[C].length&&(O[w++]=g[C][S]);for(S=0;S<y;S++)for(C=0;C<a;C++)O[w++]=v[C][S];return O}(n,e,t)}function createSymbol(e,t,r,n){let s;if(Array.isArray(e))s=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let i=t;if(!i){const t=h.rawSplit(e);i=d.getBestVersionForData(t,r)}s=h.fromString(e,i||40)}}const l=d.getBestVersionForData(s,r);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else t=l;const p=createData(t,r,s),f=i.getSymbolSize(t),y=new o(f);return function setupFinderPattern(e,t){const r=e.size,i=c.getPositions(t);for(let t=0;t<i.length;t++){const n=i[t][0],s=i[t][1];for(let t=-1;t<=7;t++)if(!(n+t<=-1||r<=n+t))for(let i=-1;i<=7;i++)s+i<=-1||r<=s+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(n+t,s+i,!0,!0):e.set(n+t,s+i,!1,!0))}}(y,t),function setupTimingPattern(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(y),function setupAlignmentPattern(e,t){const r=a.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],n=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(i+t,n+r,!0,!0):e.set(i+t,n+r,!1,!0)}}(y,t),setupFormatInfo(y,r,0),t>=7&&function setupVersionInfo(e,t){const r=e.size,i=d.getEncodedBits(t);let n,s,o;for(let t=0;t<18;t++)n=Math.floor(t/3),s=t%3+r-8-3,o=1==(i>>t&1),e.set(n,s,o,!0),e.set(s,n,o,!0)}(y,t),function setupData(e,t){const r=e.size;let i=-1,n=r-1,s=7,o=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(n,a-r)){let i=!1;o<t.length&&(i=1==(t[o]>>>s&1)),e.set(n,a-r,i),s--,-1===s&&(o++,s=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}(y,p),isNaN(n)&&(n=u.getBestMask(y,setupFormatInfo.bind(null,y,r))),u.applyMask(n,y),setupFormatInfo(y,r,n),{modules:y,version:t,errorCorrectionLevel:r,maskPattern:n,segments:s}}t.create=function create(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,s,o=n.M;return void 0!==t&&(o=n.from(t.errorCorrectionLevel,n.M),r=d.from(t.version),s=u.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),createSymbol(e,r,o,s)}},2882:(e,t,r)=>{const i=r(6143);function ReedSolomonEncoder(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ReedSolomonEncoder.prototype.initialize=function initialize(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},ReedSolomonEncoder.prototype.encode=function encode(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=i.mod(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r},e.exports=ReedSolomonEncoder},7007:(e,t)=>{const r="[0-9]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";t.KANJI=new RegExp(i,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(n,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const s=new RegExp("^"+i+"$"),o=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function testKanji(e){return s.test(e)},t.testNumeric=function testNumeric(e){return o.test(e)},t.testAlphanumeric=function testAlphanumeric(e){return a.test(e)}},6130:(e,t,r)=>{const i=r(6910),n=r(1085),s=r(8260),o=r(3424),a=r(5442),c=r(7007),u=r(242),l=r(5987);function getStringByteLength(e){return unescape(encodeURIComponent(e)).length}function getSegments(e,t,r){const i=[];let n;for(;null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function getSegmentsFromString(e){const t=getSegments(c.NUMERIC,i.NUMERIC,e),r=getSegments(c.ALPHANUMERIC,i.ALPHANUMERIC,e);let n,s;u.isKanjiModeEnabled()?(n=getSegments(c.BYTE,i.BYTE,e),s=getSegments(c.KANJI,i.KANJI,e)):(n=getSegments(c.BYTE_KANJI,i.BYTE,e),s=[]);return t.concat(r,n,s).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function getSegmentBitsLength(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return s.getBitsLength(e);case i.KANJI:return a.getBitsLength(e);case i.BYTE:return o.getBitsLength(e)}}function buildSingleSegment(e,t){let r;const c=i.getBestModeForData(e);if(r=i.from(t,c),r!==i.BYTE&&r.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+i.toString(r)+".\n Suggested mode is: "+i.toString(c));switch(r!==i.KANJI||u.isKanjiModeEnabled()||(r=i.BYTE),r){case i.NUMERIC:return new n(e);case i.ALPHANUMERIC:return new s(e);case i.KANJI:return new a(e);case i.BYTE:return new o(e)}}t.fromArray=function fromArray(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(buildSingleSegment(t,null)):t.data&&e.push(buildSingleSegment(t.data,t.mode)),e}),[])},t.fromString=function fromString(e,r){const n=function buildNodes(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];switch(n.mode){case i.NUMERIC:t.push([n,{data:n.data,mode:i.ALPHANUMERIC,length:n.length},{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.ALPHANUMERIC:t.push([n,{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.KANJI:t.push([n,{data:n.data,mode:i.BYTE,length:getStringByteLength(n.data)}]);break;case i.BYTE:t.push([{data:n.data,mode:i.BYTE,length:getStringByteLength(n.data)}])}}return t}(getSegmentsFromString(e,u.isKanjiModeEnabled())),s=function buildGraph(e,t){const r={},n={start:{}};let s=["start"];for(let o=0;o<e.length;o++){const a=e[o],c=[];for(let e=0;e<a.length;e++){const u=a[e],l=""+o+e;c.push(l),r[l]={node:u,lastCount:0},n[l]={};for(let e=0;e<s.length;e++){const o=s[e];r[o]&&r[o].node.mode===u.mode?(n[o][l]=getSegmentBitsLength(r[o].lastCount+u.length,u.mode)-getSegmentBitsLength(r[o].lastCount,u.mode),r[o].lastCount+=u.length):(r[o]&&(r[o].lastCount=u.length),n[o][l]=getSegmentBitsLength(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,t))}}s=c}for(let e=0;e<s.length;e++)n[s[e]].end=0;return{map:n,table:r}}(n,r),o=l.find_path(s.map,"start","end"),a=[];for(let e=1;e<o.length-1;e++)a.push(s.table[o[e]].node);return t.fromArray(function mergeSegments(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function rawSplit(e){return t.fromArray(getSegmentsFromString(e,u.isKanjiModeEnabled()))}},242:(e,t)=>{let r;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function getSymbolSize(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function getSymbolTotalCodewords(e){return i[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function setToSJISFunction(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function toSJIS(e){return r(e)}},3114:(e,t)=>{t.isValid=function isValid(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,r)=>{const i=r(242),n=r(5393),s=r(4908),o=r(6910),a=r(3114),c=i.getBCHDigit(7973);function getReservedBitsCount(e,t){return o.getCharCountIndicator(e,t)+4}function getTotalBitsFromDataArray(e,t){let r=0;return e.forEach((function(e){const i=getReservedBitsCount(e.mode,t);r+=i+e.getBitsLength()})),r}t.from=function from(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function getCapacity(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=o.BYTE);const s=8*(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(r===o.MIXED)return s;const c=s-getReservedBitsCount(r,e);switch(r){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function getBestVersionForData(e,r){let i;const n=s.from(r,s.M);if(Array.isArray(e)){if(e.length>1)return function getBestVersionForMixedData(e,r){for(let i=1;i<=40;i++)if(getTotalBitsFromDataArray(e,i)<=t.getCapacity(i,r,o.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function getBestVersionForDataLength(e,r,i){for(let n=1;n<=40;n++)if(r<=t.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},t.getEncodedBits=function getEncodedBits(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;i.getBCHDigit(t)-c>=0;)t^=7973<<i.getBCHDigit(t)-c;return e<<12|t}},6907:(e,t,r)=>{const i=r(9653);t.render=function render(e,t,r){let n=r,s=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(s=function getCanvasElement(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=i.getOptions(n);const o=i.getImageWidth(e.modules.size,n),a=s.getContext("2d"),c=a.createImageData(o,o);return i.qrToImageData(c.data,e,n),function clearCanvas(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,s,o),a.putImageData(c,0,0),s},t.renderToDataURL=function renderToDataURL(e,r,i){let n=i;void 0!==n||r&&r.getContext||(n=r,r=void 0),n||(n={});const s=t.render(e,r,n),o=n.type||"image/png",a=n.rendererOpts||{};return s.toDataURL(o,a.quality)}},3776:(e,t,r)=>{const i=r(9653);function getColorAttrib(e,t){const r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function svgCmd(e,t,r){let i=e+t;return void 0!==r&&(i+=" "+r),i}t.render=function render(e,t,r){const n=i.getOptions(t),s=e.modules.size,o=e.modules.data,a=s+2*n.margin,c=n.color.light.a?"<path "+getColorAttrib(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+getColorAttrib(n.color.dark,"stroke")+' d="'+function qrToPath(e,t,r){let i="",n=0,s=!1,o=0;for(let a=0;a<e.length;a++){const c=Math.floor(a%t),u=Math.floor(a/t);c||s||(s=!0),e[a]?(o++,a>0&&c>0&&e[a-1]||(i+=s?svgCmd("M",c+r,.5+u+r):svgCmd("m",n,0),n=0,s=!1),c+1<t&&e[a+1]||(i+=svgCmd("h",o),o=0)):n++}return i}(o,s,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+l+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof r&&r(null,p),p}},9653:(e,t)=>{function hex2rgba(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function getOptions(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:hex2rgba(e.color.dark||"#000000ff"),light:hex2rgba(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function getScale(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function getImageWidth(e,r){const i=t.getScale(e,r);return Math.floor((e+2*r.margin)*i)},t.qrToImageData=function qrToImageData(e,r,i){const n=r.modules.size,s=r.modules.data,o=t.getScale(n,i),a=Math.floor((n+2*i.margin)*o),c=i.margin*o,u=[i.color.light,i.color.dark];for(let t=0;t<a;t++)for(let r=0;r<a;r++){let l=4*(t*a+r),p=i.color.light;if(t>=c&&r>=c&&t<a-c&&r<a-c){p=u[s[Math.floor((t-c)/o)*n+Math.floor((r-c)/o)]?1:0]}e[l++]=p.r,e[l++]=p.g,e[l++]=p.b,e[l]=p.a}}},8660:()=>{var e;!function(e){!function(t){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=makeExporter(e);function makeExporter(e,t){return function(r,i){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:i}),t&&t(r,i)}}void 0===r.Reflect?r.Reflect=e:i=makeExporter(r.Reflect,i),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,o={__proto__:[]}instanceof Array,a=!s&&!o,c={create:s?function(){return MakeDictionary(Object.create(null))}:o?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:a?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:a?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?CreateMapPolyfill():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?CreateSetPolyfill():Set,f=new(l||"function"!=typeof WeakMap?CreateWeakMapPolyfill():WeakMap);function decorate(e,t,r,i){if(IsUndefined(r)){if(!IsArray(e))throw new TypeError;if(!IsConstructor(t))throw new TypeError;return DecorateConstructor(e,t)}if(!IsArray(e))throw new TypeError;if(!IsObject(t))throw new TypeError;if(!IsObject(i)&&!IsUndefined(i)&&!IsNull(i))throw new TypeError;return IsNull(i)&&(i=void 0),DecorateProperty(e,t,r=ToPropertyKey(r),i)}function metadata(e,t){function decorator(r,i){if(!IsObject(r))throw new TypeError;if(!IsUndefined(i)&&!IsPropertyKey(i))throw new TypeError;OrdinaryDefineOwnMetadata(e,t,r,i)}return decorator}function defineMetadata(e,t,r,i){if(!IsObject(r))throw new TypeError;return IsUndefined(i)||(i=ToPropertyKey(i)),OrdinaryDefineOwnMetadata(e,t,r,i)}function hasMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasMetadata(e,t,r)}function hasOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasOwnMetadata(e,t,r)}function getMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetMetadata(e,t,r)}function getOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetOwnMetadata(e,t,r)}function getMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryMetadataKeys(e,t)}function getOwnMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryOwnMetadataKeys(e,t)}function deleteMetadata(e,t,r){if(!IsObject(t))throw new TypeError;IsUndefined(r)||(r=ToPropertyKey(r));var i=GetOrCreateMetadataMap(t,r,!1);if(IsUndefined(i))return!1;if(!i.delete(e))return!1;if(i.size>0)return!0;var n=f.get(t);return n.delete(r),n.size>0||f.delete(t),!0}function DecorateConstructor(e,t){for(var r=e.length-1;r>=0;--r){var i=(0,e[r])(t);if(!IsUndefined(i)&&!IsNull(i)){if(!IsConstructor(i))throw new TypeError;t=i}}return t}function DecorateProperty(e,t,r,i){for(var n=e.length-1;n>=0;--n){var s=(0,e[n])(t,r,i);if(!IsUndefined(s)&&!IsNull(s)){if(!IsObject(s))throw new TypeError;i=s}}return i}function GetOrCreateMetadataMap(e,t,r){var i=f.get(e);if(IsUndefined(i)){if(!r)return;i=new p,f.set(e,i)}var n=i.get(t);if(IsUndefined(n)){if(!r)return;n=new p,i.set(t,n)}return n}function OrdinaryHasMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return!0;var i=OrdinaryGetPrototypeOf(t);return!IsNull(i)&&OrdinaryHasMetadata(e,i,r)}function OrdinaryHasOwnMetadata(e,t,r){var i=GetOrCreateMetadataMap(t,r,!1);return!IsUndefined(i)&&ToBoolean(i.has(e))}function OrdinaryGetMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return OrdinaryGetOwnMetadata(e,t,r);var i=OrdinaryGetPrototypeOf(t);return IsNull(i)?void 0:OrdinaryGetMetadata(e,i,r)}function OrdinaryGetOwnMetadata(e,t,r){var i=GetOrCreateMetadataMap(t,r,!1);if(!IsUndefined(i))return i.get(e)}function OrdinaryDefineOwnMetadata(e,t,r,i){GetOrCreateMetadataMap(r,i,!0).set(e,t)}function OrdinaryMetadataKeys(e,t){var r=OrdinaryOwnMetadataKeys(e,t),i=OrdinaryGetPrototypeOf(e);if(null===i)return r;var n=OrdinaryMetadataKeys(i,t);if(n.length<=0)return r;if(r.length<=0)return n;for(var s=new d,o=[],a=0,c=r;a<c.length;a++){var u=c[a];s.has(u)||(s.add(u),o.push(u))}for(var l=0,p=n;l<p.length;l++){u=p[l];s.has(u)||(s.add(u),o.push(u))}return o}function OrdinaryOwnMetadataKeys(e,t){var r=[],i=GetOrCreateMetadataMap(e,t,!1);if(IsUndefined(i))return r;for(var n=GetIterator(i.keys()),s=0;;){var o=IteratorStep(n);if(!o)return r.length=s,r;var a=IteratorValue(o);try{r[s]=a}catch(e){try{IteratorClose(n)}finally{throw e}}s++}}function Type(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function IsUndefined(e){return void 0===e}function IsNull(e){return null===e}function IsSymbol(e){return"symbol"==typeof e}function IsObject(e){return"object"==typeof e?null!==e:"function"==typeof e}function ToPrimitive(e,t){switch(Type(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=GetMethod(e,i);if(void 0!==n){var s=n.call(e,r);if(IsObject(s))throw new TypeError;return s}return OrdinaryToPrimitive(e,"default"===r?"number":r)}function OrdinaryToPrimitive(e,t){if("string"===t){var r=e.toString;if(IsCallable(r))if(!IsObject(n=r.call(e)))return n;if(IsCallable(i=e.valueOf))if(!IsObject(n=i.call(e)))return n}else{var i;if(IsCallable(i=e.valueOf))if(!IsObject(n=i.call(e)))return n;var n,s=e.toString;if(IsCallable(s))if(!IsObject(n=s.call(e)))return n}throw new TypeError}function ToBoolean(e){return!!e}function ToString(e){return""+e}function ToPropertyKey(e){var t=ToPrimitive(e,3);return IsSymbol(t)?t:ToString(t)}function IsArray(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function IsCallable(e){return"function"==typeof e}function IsConstructor(e){return"function"==typeof e}function IsPropertyKey(e){switch(Type(e)){case 3:case 4:return!0;default:return!1}}function GetMethod(e,t){var r=e[t];if(null!=r){if(!IsCallable(r))throw new TypeError;return r}}function GetIterator(e){var t=GetMethod(e,n);if(!IsCallable(t))throw new TypeError;var r=t.call(e);if(!IsObject(r))throw new TypeError;return r}function IteratorValue(e){return e.value}function IteratorStep(e){var t=e.next();return!t.done&&t}function IteratorClose(e){var t=e.return;t&&t.call(e)}function OrdinaryGetPrototypeOf(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,i=r&&Object.getPrototypeOf(r);if(null==i||i===Object.prototype)return t;var n=i.constructor;return"function"!=typeof n||n===e?t:n}function CreateMapPolyfill(){var e={},t=[],r=function(){function MapIterator(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return MapIterator.prototype["@@iterator"]=function(){return this},MapIterator.prototype[n]=function(){return this},MapIterator.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},MapIterator.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},MapIterator.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},MapIterator}();return function(){function Map(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(Map.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map.prototype.has=function(e){return this._find(e,!1)>=0},Map.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},Map.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},Map.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n<i;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},Map.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},Map.prototype.keys=function(){return new r(this._keys,this._values,getKey)},Map.prototype.values=function(){return new r(this._keys,this._values,getValue)},Map.prototype.entries=function(){return new r(this._keys,this._values,getEntry)},Map.prototype["@@iterator"]=function(){return this.entries()},Map.prototype[n]=function(){return this.entries()},Map.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},Map}();function getKey(e,t){return e}function getValue(e,t){return t}function getEntry(e,t){return[e,t]}}function CreateSetPolyfill(){return function(){function Set(){this._map=new p}return Object.defineProperty(Set.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Set.prototype.has=function(e){return this._map.has(e)},Set.prototype.add=function(e){return this._map.set(e,e),this},Set.prototype.delete=function(e){return this._map.delete(e)},Set.prototype.clear=function(){this._map.clear()},Set.prototype.keys=function(){return this._map.keys()},Set.prototype.values=function(){return this._map.values()},Set.prototype.entries=function(){return this._map.entries()},Set.prototype["@@iterator"]=function(){return this.keys()},Set.prototype[n]=function(){return this.keys()},Set}()}function CreateWeakMapPolyfill(){var e=16,r=c.create(),i=CreateUniqueKey();return function(){function WeakMap(){this._key=CreateUniqueKey()}return WeakMap.prototype.has=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&c.has(t,this._key)},WeakMap.prototype.get=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t?c.get(t,this._key):void 0},WeakMap.prototype.set=function(e,t){return GetOrCreateWeakMapTable(e,!0)[this._key]=t,this},WeakMap.prototype.delete=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&delete t[this._key]},WeakMap.prototype.clear=function(){this._key=CreateUniqueKey()},WeakMap}();function CreateUniqueKey(){var e;do{e="@@WeakMap@@"+CreateUUID()}while(c.has(r,e));return r[e]=!0,e}function GetOrCreateWeakMapTable(e,r){if(!t.call(e,i)){if(!r)return;Object.defineProperty(e,i,{value:c.create()})}return e[i]}function FillRandomBytes(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function GenRandomBytes(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):FillRandomBytes(new Uint8Array(e),e):FillRandomBytes(new Array(e),e)}function CreateUUID(){var t=GenRandomBytes(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",i=0;i<e;++i){var n=t[i];4!==i&&6!==i&&8!==i||(r+="-"),n<16&&(r+="0"),r+=n.toString(16).toLowerCase()}return r}}function MakeDictionary(e){return e.__=void 0,delete e.__,e}e("decorate",decorate),e("metadata",metadata),e("defineMetadata",defineMetadata),e("hasMetadata",hasMetadata),e("hasOwnMetadata",hasOwnMetadata),e("getMetadata",getMetadata),e("getOwnMetadata",getOwnMetadata),e("getMetadataKeys",getMetadataKeys),e("getOwnMetadataKeys",getOwnMetadataKeys),e("deleteMetadata",deleteMetadata)}(i)}()}(e||(e={}))},4714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0;var i=r(6898);Object.defineProperty(t,"nameof",{enumerable:!0,get:function(){return i.nameof}})},6898:(e,t)=>{"use strict";function cleanseAssertionOperators(e){return e.replace(/[?!]/g,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0,t.nameof=function nameof(e,t){var r=e.toString();if(r.startsWith("class ")&&!r.startsWith("class =>"))return cleanseAssertionOperators(r.substring("class ".length,r.indexOf(" {")));if(r.includes("=>"))return cleanseAssertionOperators(r.substring(r.indexOf(".")+1));var i=r.match(/function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i);if(i)return t&&t.lastProp?i[3]:i[1];if(r.startsWith("function "))return cleanseAssertionOperators(r.substring("function ".length,r.indexOf("(")));throw new Error("ts-simple-nameof: Invalid function.")}},1694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(2866),s=r(9208),o=r(1468);class IoCBindConfig{constructor(e,t,r){this.source=e,this.instanceFactory=t,this.valueFactory=r}to(e){i.InjectorHandler.checkType(e);const t=i.InjectorHandler.getConstructorFromType(e);return this.targetSource=t,this.source===t?this.factory((t=>{const r=this.getParameters(t),i=this.decoratedConstructor||e;return r?new i(...r):new i})):this.factory((t=>this.instanceFactory(e,t))),this}factory(e){return this.iocFactory=t=>{const r=i.InjectorHandler.unblockInstantiation(),n=this.decoratedConstructor||this.targetSource||this.source;i.InjectorHandler.injectContext(n,t);const s=e(t);return i.InjectorHandler.removeContext(n),i.InjectorHandler.injectContext(s,t),i.InjectorHandler.blockInstantiation(r),s},this.iocScope&&this.iocScope.reset(this.source),this}scope(e){return this.iocScope&&this.iocScope!==e&&this.iocScope.finish(this.source),this.iocScope=e,this.iocScope&&this.iocScope.init(this.source),this}withParams(...e){return this.paramTypes=e,this}instrumentConstructor(){const e=i.InjectorHandler.instrumentConstructor(this.source);return this.decoratedConstructor=e,this.source.constructor=e,this}getInstance(e){return this.iocScope||this.scope(n.Scope.Local),this.iocScope.resolve(this.iocFactory,this.source,e)}clone(){const e=new IoCBindConfig(this.source,this.instanceFactory,this.valueFactory);return e.iocFactory=this.iocFactory,e.iocScope=this.iocScope,e.targetSource=this.targetSource,e.paramTypes=this.paramTypes,e.decoratedConstructor=this.decoratedConstructor,e}getParameters(e){return this.paramTypes?this.paramTypes.map((t=>"string"==typeof t||t instanceof String?this.valueFactory(t):this.instanceFactory(t,e))):null}}t.IoCBindConfig=IoCBindConfig;class IoCBindValueConfig{constructor(e){this.name=e}to(e){return this.path?(this.value=this.value||{},o(this.value,this.path,e)):this.value=e,this}getValue(){return this.path?s(this.value,this.path):this.value}clone(){const e=new IoCBindValueConfig(this.name);return e.path=this.path,e.value=this.value,e}}t.IoCBindValueConfig=IoCBindValueConfig;class PropertyPath{constructor(e,t){this.name=e,this.path=t}static parse(e){const t=e.indexOf(".");if(t<0)return new PropertyPath(e);if(0===t)throw new TypeError(`Invalid value [${e}] passed to Container.bindName`);return t+1<e.length?new PropertyPath(e.substring(0,t),e.substring(t+1)):new PropertyPath(e.substring(0,t))}}t.PropertyPath=PropertyPath},6878:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ContainerNamespaces=class ContainerNamespaces{constructor(){this.defaultNamespace=new NamespaceBindings(null),this.namespaces=new Map}get(e){let t;return this.currentNamespace&&(t=this.currentNamespace.get(e),t)?t:this.defaultNamespace.get(e)}set(e,t){(this.currentNamespace||this.defaultNamespace).set(e,t)}getValue(e){let t;return this.currentNamespace&&(t=this.currentNamespace.getValue(e),t)?t:this.defaultNamespace.getValue(e)}setValue(e,t){(this.currentNamespace||this.defaultNamespace).setValue(e,t)}selectNamespace(e){if(e){let t=this.namespaces.get(e);t||(t=new NamespaceBindings(e),this.namespaces.set(e,t)),this.currentNamespace=t}else this.currentNamespace=null}removeNamespace(e){const t=this.namespaces.get(e);t&&(this.currentNamespace&&t.name===this.currentNamespace.name&&(this.currentNamespace=null),t.clear(),this.namespaces.delete(e))}selectedNamespace(){return this.currentNamespace?this.currentNamespace.name:null}};class NamespaceBindings{constructor(e){this.bindings=new Map,this.values=new Map,this.name=e}get(e){return this.bindings.get(e)}set(e,t){t.namespace=this.name,this.bindings.set(e,t)}getValue(e){return this.values.get(e)}setValue(e,t){t.namespace=this.name,this.values.set(e,t)}clear(){this.bindings.clear(),this.values.clear()}}},5729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(1694),s=r(6878);class IoCContainer{static bind(e,t=!1){i.InjectorHandler.checkType(e);const r=i.InjectorHandler.getConstructorFromType(e);let s=IoCContainer.namespaces.get(r);return s?t||s.namespace===IoCContainer.namespaces.selectedNamespace()||(s=s.clone(),IoCContainer.namespaces.set(r,s)):(s=new n.IoCBindConfig(r,IoCContainer.get,IoCContainer.getValue),s.to(e),IoCContainer.namespaces.set(r,s)),s}static bindName(e,t=!1){i.InjectorHandler.checkName(e);const r=n.PropertyPath.parse(e);let s=IoCContainer.namespaces.getValue(r.name);return s?t||s.namespace===IoCContainer.namespaces.selectedNamespace()||(s=s.clone(),IoCContainer.namespaces.setValue(r.name,s)):(s=new n.IoCBindValueConfig(r.name),IoCContainer.namespaces.setValue(r.name,s)),s.path=r.path,s}static get(e,t){const r=IoCContainer.bind(e,!0);return r.iocFactory||r.to(r.source),r.getInstance(t)}static getValue(e){return IoCContainer.bindName(e,!0).getValue()}static getType(e){i.InjectorHandler.checkType(e);const t=i.InjectorHandler.getConstructorFromType(e),r=IoCContainer.namespaces.get(t);if(!r)throw new TypeError(`The type ${e.name} hasn't been registered with the IOC Container`);return r.targetSource||r.source}static namespace(e){return IoCContainer.namespaces.selectNamespace(e),{remove:()=>{e&&IoCContainer.namespaces.removeNamespace(e)}}}static selectedNamespace(){return IoCContainer.namespaces.selectedNamespace()}static injectProperty(e,t,r){i.InjectorHandler.injectProperty(e,t,r,IoCContainer.get)}static injectValueProperty(e,t,r){i.InjectorHandler.injectValueProperty(e,t,r,IoCContainer.getValue)}static snapshot(){const e="_snapshot-"+IoCContainer.snapshotsCount++,t=IoCContainer.namespace(e);return{restore:()=>t.remove(),select:()=>IoCContainer.namespace(e)}}}t.IoCContainer=IoCContainer,IoCContainer.namespaces=new s.ContainerNamespaces,IoCContainer.snapshotsCount=0},5519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class InjectorHandler{static instrumentConstructor(e){let t;return t=class ioc_wrapper extends e{constructor(...e){super(...e),InjectorHandler.assertInstantiable()}},t.__parent=e,t}static blockInstantiation(e){InjectorHandler.instantiationsBlocked=e}static unblockInstantiation(){const e=InjectorHandler.instantiationsBlocked;return InjectorHandler.instantiationsBlocked=!1,e}static getConstructorFromType(e){let t=e;if(this.hasNamedConstructor(t))return t;for(t=t.__parent;t;){if(this.hasNamedConstructor(t))return t;t=t.__parent}throw TypeError("Can not identify the base Type for requested target "+e.toString())}static checkType(e){if(!e)throw new TypeError("Invalid type requested to IoC container. Type is not defined.")}static checkName(e){if(!e)throw new TypeError("Invalid name requested to IoC container. Name is not defined.")}static injectContext(e,t){e.__BuildContext=t}static removeContext(e){delete e.__BuildContext}static injectProperty(e,t,r,i){const n=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){const t=this.__BuildContext||e.__BuildContext;return this[n]?this[n]:this[n]=i(r,t)},set:function(e){this[n]=e}})}static injectValueProperty(e,t,r,i){const n=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){return this[n]?this[n]:this[n]=i(r)},set:function(e){this[n]=e}})}static hasNamedConstructor(e){if(e.name)return"ioc_wrapper"!==e.name;try{const t=e.prototype.constructor.toString().match(this.constructorNameRegEx)[1];return t&&"ioc_wrapper"!==t}catch(e){}return!1}static assertInstantiable(){if(InjectorHandler.instantiationsBlocked)throw new TypeError("Can not instantiate it. The instantiation is blocked for this class. Ask Container for it, using Container.get")}}t.InjectorHandler=InjectorHandler,InjectorHandler.constructorNameRegEx=/function (\w*)/,InjectorHandler.instantiationsBlocked=!0},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8660);const i=r(5729),n=r(2866);function InjectPropertyDecorator(e,t){let r=Reflect.getMetadata("design:type",e,t);r||(r=Reflect.getMetadata("design:type",e.constructor,t)),i.IoCContainer.injectProperty(e.constructor,t,r)}function InjectParamDecorator(e,t,r){if(!t){const t=i.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[];const n=Reflect.getMetadata("design:paramtypes",e);t.paramTypes.unshift(n[r])}}function InjectValuePropertyDecorator(e,t,r){i.IoCContainer.injectValueProperty(e.constructor,t,r)}function InjectValueParamDecorator(e,t,r,n){if(!t){const t=i.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[],t.paramTypes.unshift(n)}}t.InRequestScope=function InRequestScope(e){i.IoCContainer.bind(e).scope(n.Scope.Request)},t.Singleton=function Singleton(e){i.IoCContainer.bind(e).scope(n.Scope.Singleton)},t.OnlyInstantiableByContainer=function OnlyInstantiableByContainer(e){return i.IoCContainer.bind(e).instrumentConstructor().decoratedConstructor},t.Scoped=function Scoped(e){return t=>{i.IoCContainer.bind(t).scope(e)}},t.Factory=function Factory(e){return t=>{i.IoCContainer.bind(t).factory(e)}},t.Inject=function Inject(...e){if(2===e.length||3===e.length&&void 0===e[2])return InjectPropertyDecorator.apply(this,e);if(3===e.length&&"number"==typeof e[2])return InjectParamDecorator.apply(this,e);throw new TypeError("Invalid @Inject Decorator declaration.")},t.InjectValue=function InjectValue(e){return(...t)=>{if(2===t.length||3===t.length&&void 0===t[2]){const r=[...t,e].filter((e=>!!e));return InjectValuePropertyDecorator.apply(this,r)}if(3===t.length&&"number"==typeof t[2])return InjectValueParamDecorator.apply(this,[...t,e]);throw new TypeError("Invalid @InjectValue Decorator declaration.")}}},2866:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Scope=class Scope{reset(e){}init(e){}finish(e){}};t.BuildContext=class BuildContext{}},2464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(2866);class LocalScope extends n.Scope{resolve(e,t,r){return e(r)}}t.LocalScope=LocalScope;class SingletonScope extends n.Scope{resolve(e,t,r){let i=SingletonScope.instances.get(t);return i||(i=e(r),SingletonScope.instances.set(t,i)),i}reset(e){SingletonScope.instances.delete(i.InjectorHandler.getConstructorFromType(e))}init(e){this.reset(e)}finish(e){this.reset(e)}}t.SingletonScope=SingletonScope,SingletonScope.instances=new Map;class RequestScope extends n.Scope{resolve(e,t,r){return this.ensureContext(r),r.build(t,e)}ensureContext(e){if(!e)throw new TypeError("IoC Container can not handle this request. When using @InRequestScope in any dependent type, you should be askking to Container to create the instances through Container.get and not calling the type constructor directly.")}}t.RequestScope=RequestScope},7071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8660);const i=r(2866);t.Scope=i.Scope,t.BuildContext=i.BuildContext;const n=r(5729),s=r(2464);var o=r(3415);t.Inject=o.Inject,t.Factory=o.Factory,t.Singleton=o.Singleton,t.Scoped=o.Scoped,t.OnlyInstantiableByContainer=o.OnlyInstantiableByContainer,t.InRequestScope=o.InRequestScope,t.InjectValue=o.InjectValue,i.Scope.Local=new s.LocalScope,i.Scope.Singleton=new s.SingletonScope,i.Scope.Request=new s.RequestScope;class Container{static bind(e){return n.IoCContainer.bind(e)}static get(e){return n.IoCContainer.get(e,new ContainerBuildContext)}static getType(e){return n.IoCContainer.getType(e)}static bindName(e){return n.IoCContainer.bindName(e)}static getValue(e){return n.IoCContainer.getValue(e)}static namespace(e){return n.IoCContainer.namespace(e)}static environment(e){return Container.namespace(e)}static snapshot(e){return n.IoCContainer.snapshot()}static configure(...e){e.forEach((e=>{e.bind?Container.configureType(e):e.bindName?Container.configureConstant(e):(e.env||e.namespace)&&Container.configureNamespace(e)}))}static configureNamespace(e){const t=n.IoCContainer.selectedNamespace(),r=e.env||e.namespace;Object.keys(r).forEach((e=>{Container.namespace(e);const t=r[e];Container.configure(...t)})),Container.namespace(t)}static configureConstant(e){const t=n.IoCContainer.bindName(e.bindName);t&&e.to&&t.to(e.to)}static configureType(e){const t=n.IoCContainer.bind(e.bind);t&&(e.to?t.to(e.to):e.factory&&t.factory(e.factory),e.scope&&t.scope(e.scope),e.withParams&&t.withParams(e.withParams))}}t.Container=Container;class ContainerBuildContext extends i.BuildContext{constructor(){super(...arguments),this.context=new Map}build(e,t){let r=this.context.get(e);return r||(r=t(this),this.context.set(e,r)),r}resolve(e){return n.IoCContainer.get(e,this)}}},540:function(e,t){!function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var i=t.length-1,n=1;n<i;++n)t[n]=t[n].slice(1,-1);return t[i]=t[i].slice(1),t.join("")}return t[0]}function subexp(e){return"(?:"+e+")"}function typeOf(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t)for(var i in t)r[i]=t[i];return r}function buildExps(e){var t="[A-Za-z]",r="[0-9]",i=merge(r,"[A-Fa-f]"),n=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=merge("[\\:\\/\\?\\#\\[\\]\\@]",s),a=e?"[\\uE000-\\uF8FF]":"[]",c=merge(t,r,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),u=subexp(t+merge(t,r,"[\\+\\-\\.]")+"*"),l=subexp(subexp(n+"|"+merge(c,s,"[\\:]"))+"*"),p=(subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("[1-9]"+r)+"|"+r),subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("0?[1-9]"+r)+"|0?0?"+r)),d=subexp(p+"\\."+p+"\\."+p+"\\."+p),f=subexp(i+"{1,4}"),y=subexp(subexp(f+"\\:"+f)+"|"+d),h=subexp(subexp(f+"\\:")+"{6}"+y),m=subexp("\\:\\:"+subexp(f+"\\:")+"{5}"+y),g=subexp(subexp(f)+"?\\:\\:"+subexp(f+"\\:")+"{4}"+y),v=subexp(subexp(subexp(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+subexp(f+"\\:")+"{3}"+y),b=subexp(subexp(subexp(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+subexp(f+"\\:")+"{2}"+y),R=subexp(subexp(subexp(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+y),O=subexp(subexp(subexp(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+y),S=subexp(subexp(subexp(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),C=subexp(subexp(subexp(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),w=subexp([h,m,g,v,b,R,O,S,C].join("|")),I=subexp(subexp(c+"|"+n)+"+"),P=(subexp(w+"\\%25"+I),subexp(w+subexp("\\%25|\\%(?!"+i+"{2})")+I)),j=subexp("[vV]"+i+"+\\."+merge(c,s,"[\\:]")+"+"),$=subexp("\\["+subexp(P+"|"+w+"|"+j)+"\\]"),T=subexp(subexp(n+"|"+merge(c,s))+"*"),A=subexp($+"|"+d+"(?!"+T+")|"+T),q=subexp(r+"*"),N=subexp(subexp(l+"@")+"?"+A+subexp("\\:"+q)+"?"),x=subexp(n+"|"+merge(c,s,"[\\:\\@]")),E=subexp(x+"*"),D=subexp(x+"+"),M=subexp(subexp(n+"|"+merge(c,s,"[\\@]"))+"+"),k=subexp(subexp("\\/"+E)+"*"),F=subexp("\\/"+subexp(D+k)+"?"),J=subexp(M+k),U=subexp(D+k),L="(?!"+x+")",V=(subexp(k+"|"+F+"|"+J+"|"+U+"|"+L),subexp(subexp(x+"|"+merge("[\\/\\?]",a))+"*")),B=subexp(subexp(x+"|[\\/\\?]")+"*"),z=subexp(subexp("\\/\\/"+N+k)+"|"+F+"|"+U+"|"+L),G=subexp(u+"\\:"+z+subexp("\\?"+V)+"?"+subexp("\\#"+B)+"?"),H=subexp(subexp("\\/\\/"+N+k)+"|"+F+"|"+J+"|"+L),Q=subexp(H+subexp("\\?"+V)+"?"+subexp("\\#"+B)+"?");return subexp(G+"|"+Q),subexp(u+"\\:"+z+subexp("\\?"+V)+"?"),subexp(subexp("\\/\\/("+subexp("("+l+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+F+"|"+U+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp(subexp("\\/\\/("+subexp("("+l+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+F+"|"+J+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp(subexp("\\/\\/("+subexp("("+l+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+F+"|"+U+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp("("+l+")@"),subexp("\\:("+q+")"),{NOT_SCHEME:new RegExp(merge("[^]",t,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",c,s),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",c,s),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",c,s),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",c,s),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",c,s,"[\\:\\@\\/\\?]",a),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",c,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",c,s),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",c,o),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+w+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+I+")")+"?\\]?$")}}var t=buildExps(!1),r=buildExps(!0),i=function(){function sliceIterator(e,t){var r=[],i=!0,n=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);i=!0);}catch(e){n=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(n)throw s}}return r}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return sliceIterator(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},n=2147483647,s=36,o=1,a=26,c=38,u=700,l=72,p=128,d="-",f=/^xn--/,y=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=s-o,v=Math.floor,b=String.fromCharCode;function error$1(e){throw new RangeError(m[e])}function map(e,t){for(var r=[],i=e.length;i--;)r[i]=t(e[i]);return r}function mapDomain(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+map((e=e.replace(h,".")).split("."),t).join(".")}function ucs2decode(e){for(var t=[],r=0,i=e.length;r<i;){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<i){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),r--)}else t.push(n)}return t}var R=function basicToDigit(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s},O=function digitToBasic(e,t){return e+22+75*(e<26)-((0!=t)<<5)},S=function adapt(e,t,r){var i=0;for(e=r?v(e/u):e>>1,e+=v(e/t);e>g*a>>1;i+=s)e=v(e/g);return v(i+(g+1)*e/(e+c))},C=function decode(e){var t=[],r=e.length,i=0,c=p,u=l,f=e.lastIndexOf(d);f<0&&(f=0);for(var y=0;y<f;++y)e.charCodeAt(y)>=128&&error$1("not-basic"),t.push(e.charCodeAt(y));for(var h=f>0?f+1:0;h<r;){for(var m=i,g=1,b=s;;b+=s){h>=r&&error$1("invalid-input");var O=R(e.charCodeAt(h++));(O>=s||O>v((n-i)/g))&&error$1("overflow"),i+=O*g;var C=b<=u?o:b>=u+a?a:b-u;if(O<C)break;var w=s-C;g>v(n/w)&&error$1("overflow"),g*=w}var I=t.length+1;u=S(i-m,I,0==m),v(i/I)>n-c&&error$1("overflow"),c+=v(i/I),i%=I,t.splice(i++,0,c)}return String.fromCodePoint.apply(String,t)},w=function encode(e){var t=[],r=(e=ucs2decode(e)).length,i=p,c=0,u=l,f=!0,y=!1,h=void 0;try{for(var m,g=e[Symbol.iterator]();!(f=(m=g.next()).done);f=!0){var R=m.value;R<128&&t.push(b(R))}}catch(e){y=!0,h=e}finally{try{!f&&g.return&&g.return()}finally{if(y)throw h}}var C=t.length,w=C;for(C&&t.push(d);w<r;){var I=n,P=!0,j=!1,$=void 0;try{for(var T,A=e[Symbol.iterator]();!(P=(T=A.next()).done);P=!0){var q=T.value;q>=i&&q<I&&(I=q)}}catch(e){j=!0,$=e}finally{try{!P&&A.return&&A.return()}finally{if(j)throw $}}var N=w+1;I-i>v((n-c)/N)&&error$1("overflow"),c+=(I-i)*N,i=I;var x=!0,E=!1,D=void 0;try{for(var M,k=e[Symbol.iterator]();!(x=(M=k.next()).done);x=!0){var F=M.value;if(F<i&&++c>n&&error$1("overflow"),F==i){for(var J=c,U=s;;U+=s){var L=U<=u?o:U>=u+a?a:U-u;if(J<L)break;var V=J-L,B=s-L;t.push(b(O(L+V%B,0))),J=v(V/B)}t.push(b(O(J,0))),u=S(c,N,w==C),c=0,++w}}}catch(e){E=!0,D=e}finally{try{!x&&k.return&&k.return()}finally{if(E)throw D}}++c,++i}return t.join("")},I=function toUnicode(e){return mapDomain(e,(function(e){return f.test(e)?C(e.slice(4).toLowerCase()):e}))},P=function toASCII(e){return mapDomain(e,(function(e){return y.test(e)?"xn--"+w(e):e}))},j={version:"2.1.0",ucs2:{decode:ucs2decode,encode:function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))}},decode:C,encode:w,toASCII:P,toUnicode:I},$={};function pctEncChar(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function pctDecChars(e){for(var t="",r=0,i=e.length;r<i;){var n=parseInt(e.substr(r+1,2),16);if(n<128)t+=String.fromCharCode(n),r+=3;else if(n>=194&&n<224){if(i-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&n)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(n>=224){if(i-r>=9){var o=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=i(r,2)[1];return n?n.split(".").map(_stripLeadingZeros).join("."):e}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=i(r,3),s=n[1],o=n[2];if(s){for(var a=s.toLowerCase().split("::").reverse(),c=i(a,2),u=c[0],l=c[1],p=l?l.split(":").map(_stripLeadingZeros):[],d=u.split(":").map(_stripLeadingZeros),f=t.IPV4ADDRESS.test(d[d.length-1]),y=f?7:8,h=d.length-y,m=Array(y),g=0;g<y;++g)m[g]=p[g]||d[h+g]||"";f&&(m[y-1]=_normalizeIPv4(m[y-1],t));var v=m.reduce((function(e,t,r){if(!t||"0"===t){var i=e[e.length-1];i&&i.index+i.length===r?i.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(v&&v.length>1){var R=m.slice(0,v.index),O=m.slice(v.index+v.length);b=R.join(":")+"::"+O.join(":")}else b=m.join(":");return o&&(b+="%"+o),b}return e}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function parse(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},s=!1!==i.iri?r:t;"suffix"===i.reference&&(e=(i.scheme?i.scheme+":":"")+"//"+e);var o=e.match(T);if(o){A?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=_normalizeIPv6(_normalizeIPv4(n.host,s),s)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==n.reference&&(n.error=n.error||"URI is not a "+i.reference+" reference.");var a=$[(i.scheme||n.scheme||"").toLowerCase()];if(i.unicodeSupport||a&&a.unicodeSupport)_normalizeComponentEncoding(n,s);else{if(n.host&&(i.domainHost||a&&a.domainHost))try{n.host=j.toASCII(n.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(n,t)}a&&a.parse&&a.parse(n,i)}else n.error=n.error||"URI can not be parsed.";return n}function _recomposeAuthority(e,i){var n=!1!==i.iri?r:t,s=[];return void 0!==e.userinfo&&(s.push(e.userinfo),s.push("@")),void 0!==e.host&&s.push(_normalizeIPv6(_normalizeIPv4(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(s.push(":"),s.push(String(e.port))),s.length?s.join(""):void 0}var q=/^\.\.?\//,N=/^\/\.(\/|$)/,x=/^\/\.\.(\/|$)/,E=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){for(var t=[];e.length;)if(e.match(q))e=e.replace(q,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(x))e=e.replace(x,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(E);if(!r)throw new Error("Unexpected dot segment condition");var i=r[0];e=e.slice(i.length),t.push(i)}return t.join("")}function serialize(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.iri?r:t,s=[],o=$[(i.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,i),e.host)if(n.IPV6ADDRESS.test(e.host));else if(i.domainHost||o&&o.domainHost)try{e.host=i.iri?j.toUnicode(e.host):j.toASCII(e.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+t}_normalizeComponentEncoding(e,n),"suffix"!==i.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var a=_recomposeAuthority(e,i);if(void 0!==a&&("suffix"!==i.reference&&s.push("//"),s.push(a),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var c=e.path;i.absolutePath||o&&o.absolutePath||(c=removeDotSegments(c)),void 0===a&&(c=c.replace(/^\/\//,"/%2F")),s.push(c)}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function resolveComponents(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(e=parse(serialize(e,r),r),t=parse(serialize(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=removeDotSegments(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=removeDotSegments(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=removeDotSegments(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=removeDotSegments(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function resolve(e,t,r){var i=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,i),parse(t,i),i,!0),i)}function normalize(e,t){return"string"==typeof e?e=serialize(parse(e,t),t):"object"===typeOf(e)&&(e=parse(serialize(e,t),t)),e}function equal(e,t,r){return"string"==typeof e?e=serialize(parse(e,r),r):"object"===typeOf(e)&&(e=serialize(e,r)),"string"==typeof t?t=serialize(parse(t,r),r):"object"===typeOf(t)&&(t=serialize(t,r)),e===t}function escapeComponent(e,i){return e&&e.toString().replace(i&&i.iri?r.ESCAPE:t.ESCAPE,pctEncChar)}function unescapeComponent(e,i){return e&&e.toString().replace(i&&i.iri?r.PCT_ENCODED:t.PCT_ENCODED,pctDecChars)}var D={scheme:"http",domainHost:!0,parse:function parse(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function serialize(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},M={scheme:"https",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize};function isSecure(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var k={scheme:"ws",domainHost:!0,parse:function parse(e,t){var r=e;return r.secure=isSecure(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function serialize(e,t){if(e.port!==(isSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=i(r,2),s=n[0],o=n[1];e.path=s&&"/"!==s?s:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},F={scheme:"wss",domainHost:k.domainHost,parse:k.parse,serialize:k.serialize},J={},U="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",L="[0-9A-Fa-f]",V=subexp(subexp("%[EFef]"+L+"%"+L+L+"%"+L+L)+"|"+subexp("%[89A-Fa-f]"+L+"%"+L+L)+"|"+subexp("%"+L+L)),B="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",z=merge("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),G="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",H=new RegExp(U,"g"),Q=new RegExp(V,"g"),Z=new RegExp(merge("[^]",B,"[\\.]",'[\\"]',z),"g"),K=new RegExp(merge("[^]",U,G),"g"),W=K;function decodeUnreserved(e){var t=pctDecChars(e);return t.match(H)?t:e}var Y={scheme:"mailto",parse:function parse$$1(e,t){var r=e,i=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var n=!1,s={},o=r.query.split("&"),a=0,c=o.length;a<c;++a){var u=o[a].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),p=0,d=l.length;p<d;++p)i.push(l[p]);break;case"subject":r.subject=unescapeComponent(u[1],t);break;case"body":r.body=unescapeComponent(u[1],t);break;default:n=!0,s[unescapeComponent(u[0],t)]=unescapeComponent(u[1],t)}}n&&(r.headers=s)}r.query=void 0;for(var f=0,y=i.length;f<y;++f){var h=i[f].split("@");if(h[0]=unescapeComponent(h[0]),t.unicodeSupport)h[1]=unescapeComponent(h[1],t).toLowerCase();else try{h[1]=j.toASCII(unescapeComponent(h[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}i[f]=h.join("@")}return r},serialize:function serialize$$1(e,t){var r=e,i=toArray(e.to);if(i){for(var n=0,s=i.length;n<s;++n){var o=String(i[n]),a=o.lastIndexOf("@"),c=o.slice(0,a).replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(Z,pctEncChar),u=o.slice(a+1);try{u=t.iri?j.toUnicode(u):j.toASCII(unescapeComponent(u,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=c+"@"+u}r.path=i.join(",")}var l=e.headers=e.headers||{};e.subject&&(l.subject=e.subject),e.body&&(l.body=e.body);var p=[];for(var d in l)l[d]!==J[d]&&p.push(d.replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(K,pctEncChar)+"="+l[d].replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(W,pctEncChar));return p.length&&(r.query=p.join("&")),r}},X=/^([^\:]+)\:(.*)/,ee={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(X),i=e;if(r){var n=t.scheme||i.scheme||"urn",s=r[1].toLowerCase(),o=r[2],a=n+":"+(t.nid||s),c=$[a];i.nid=s,i.nss=o,i.path=void 0,c&&(i=c.parse(i,t))}else i.error=i.error||"URN can not be parsed.";return i},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn",i=e.nid,n=r+":"+(t.nid||i),s=$[n];s&&(e=s.serialize(e,t));var o=e,a=e.nss;return o.path=(i||t.nid)+":"+a,o}},te=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function parse(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(te)||(r.error=r.error||"UUID is not valid."),r},serialize:function serialize(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};$[D.scheme]=D,$[M.scheme]=M,$[k.scheme]=k,$[F.scheme]=F,$[Y.scheme]=Y,$[ee.scheme]=ee,$[re.scheme]=re,e.SCHEMES=$,e.pctEncChar=pctEncChar,e.pctDecChars=pctDecChars,e.parse=parse,e.removeDotSegments=removeDotSegments,e.serialize=serialize,e.resolveComponents=resolveComponents,e.resolve=resolve,e.normalize=normalize,e.equal=equal,e.escapeComponent=escapeComponent,e.unescapeComponent=unescapeComponent,Object.defineProperty(e,"__esModule",{value:!0})}(t)},3850:e=>{"use strict";e.exports=NMSHDConsumption},5030:e=>{"use strict";e.exports=NMSHDContent},2890:e=>{"use strict";e.exports=NMSHDCrypto},9663:e=>{"use strict";e.exports=NMSHDTransport},194:e=>{"use strict";e.exports=TSServal},4775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};var r=function __webpack_require__(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.exports}(5590);NMSHDRuntime=r})();
8
+ deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function splitDependencies({schema:e}){const t={},r={};for(const i in e){if("__proto__"===i)continue;(Array.isArray(e[i])?t:r)[i]=e[i]}return[t,r]}(e);validatePropertyDeps(e,t),validateSchemaDeps(e,r)}};function validatePropertyDeps(e,t=e.schema){const{gen:r,data:n,it:o}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const u=t[c];if(0===u.length)continue;const p=(0,s.propertyInData)(r,n,c,o.opts.ownProperties);e.setParams({property:c,depsCount:u.length,deps:u.join(", ")}),o.allErrors?r.if(p,(()=>{for(const t of u)(0,s.checkReportMissingProp)(e,t)})):(r.if(i._`${p} && (${(0,s.checkMissingProp)(e,u,a)})`),(0,s.reportMissingProp)(e,a),r.else())}}function validateSchemaDeps(e,t=e.schema){const{gen:r,data:i,keyword:o,it:a}=e,c=r.name("valid");for(const u in t)(0,n.alwaysValidSchema)(a,t[u])||(r.if((0,s.propertyInData)(r,i,u,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:u},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=validatePropertyDeps,t.validateSchemaDeps=validateSchemaDeps,t.default=o},9434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>i.str`must match "${e.ifClause}" schema`,params:({params:e})=>i._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0,n.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const o=hasSchema(s,"then"),a=hasSchema(s,"else");if(!o&&!a)return;const c=t.let("valid",!0),u=t.name("_valid");if(function validateIf(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),o&&a){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,validateClause("then",r),validateClause("else",r))}else o?t.if(u,validateClause("then")):t.if((0,i.not)(u),validateClause("else"));function validateClause(r,n){return()=>{const s=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(s,c),n?t.assign(n,i._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function hasSchema(e,t){const r=e.schema[t];return void 0!==r&&!(0,n.alwaysValidSchema)(e,r)}t.default=s},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4783),n=r(2924),s=r(4665),o=r(1119),a=r(9864),c=r(7772),u=r(3708),p=r(9351),l=r(6239),d=r(2296),f=r(5697),y=r(19),h=r(4200),m=r(1125),g=r(9434),v=r(6552);t.default=function getApplicator(e=!1){const t=[f.default,y.default,h.default,m.default,g.default,v.default,u.default,p.default,c.default,l.default,d.default];return e?t.push(n.default,o.default):t.push(i.default,s.default),t.push(a.default),t}},4665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const i=r(3487),n=r(6776),s=r(412),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);r.items=!0,(0,n.alwaysValidSchema)(r,t)||e.ok((0,s.validateArray)(e))}};function validateTuple(e,t,r=e.schema){const{gen:s,parentSchema:o,data:a,keyword:c,it:u}=e;!function checkStrictTuple(e){const{opts:i,errSchemaPath:s}=u,o=r.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(i.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,n.checkStrictMode)(u,e,i.strictTuples)}}(o),u.opts.unevaluated&&r.length&&!0!==u.items&&(u.items=n.mergeEvaluated.items(s,r.length,u.items));const p=s.name("valid"),l=s.const("len",i._`${a}.length`);r.forEach(((t,r)=>{(0,n.alwaysValidSchema)(u,t)||(s.if(i._`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},p))),e.ok(p))}))}t.validateTuple=validateTuple,t.default=o},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(412),o=r(4783),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>i.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>i._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:i}=e,{prefixItems:a}=r;i.items=!0,(0,n.alwaysValidSchema)(i,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,s.validateArray)(e)))}};t.default=a},5697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,i.alwaysValidSchema)(n,r))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=n},4200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>i._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&s.discriminator)return;const a=r,c=t.let("valid",!1),u=t.let("passing",null),p=t.name("_valid");e.setParams({passing:u}),t.block((function validateOneOf(){a.forEach(((r,s)=>{let a;(0,n.alwaysValidSchema)(o,r)?t.var(p,!0):a=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},p),s>0&&t.if(i._`${p} && ${c}`).assign(c,!1).assign(u,i._`[${u}, ${s}]`).else(),t.if(p,(()=>{t.assign(c,!0),t.assign(u,s),a&&e.mergeEvaluated(a,i.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=s},2296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(6776),o=r(6776),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:u}=e,{opts:p}=u,l=(0,i.allSchemaProperties)(r),d=l.filter((e=>(0,s.alwaysValidSchema)(u,r[e])));if(0===l.length||d.length===l.length&&(!u.opts.unevaluated||!0===u.props))return;const f=p.strictSchema&&!p.allowMatchingProperties&&c.properties,y=t.name("valid");!0===u.props||u.props instanceof n.Name||(u.props=(0,o.evaluatedPropsToName)(t,u.props));const{props:h}=u;function checkMatchingProperties(e){for(const t in f)new RegExp(e).test(t)&&(0,s.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function validateProperties(r){t.forIn("key",a,(s=>{t.if(n._`${(0,i.usePattern)(e,r)}.test(${s})`,(()=>{const i=d.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:o.Type.Str},y),u.opts.unevaluated&&!0!==h?t.assign(n._`${h}[${s}]`,!0):i||u.allErrors||t.if((0,n.not)(y),(()=>t.break()))}))}))}!function validatePatternProperties(){for(const e of l)f&&checkMatchingProperties(e),u.allErrors?validateProperties(e):(t.var(y,!0),validateProperties(e),t.if(y))}()}};t.default=a},2924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4665),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,i.validateTuple)(e,"items")};t.default=n},6239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4815),n=r(412),s=r(6776),o=r(9351),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:u}=e;"all"===u.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new i.KeywordCxt(u,o.default,"additionalProperties"));const p=(0,n.allSchemaProperties)(r);for(const e of p)u.definedProperties.add(e);u.opts.unevaluated&&p.length&&!0!==u.props&&(u.props=s.mergeEvaluated.props(t,(0,s.toHash)(p),u.props));const l=p.filter((e=>!(0,s.alwaysValidSchema)(u,r[e])));if(0===l.length)return;const d=t.name("valid");for(const r of l)hasDefault(r)?applyPropertySchema(r):(t.if((0,n.propertyInData)(t,c,r,u.opts.ownProperties)),applyPropertySchema(r),u.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(d);function hasDefault(e){return u.opts.useDefaults&&!u.compositeRule&&void 0!==r[e].default}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=a},3708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>i._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",s,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,i.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=s},6552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,i.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=n},412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const i=r(3487),n=r(6776),s=r(2141),o=r(6776);function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:i._`Object.prototype.hasOwnProperty`})}function isOwnProperty(e,t,r){return i._`${hasPropFunc(e)}.call(${t}, ${r})`}function noPropertyInData(e,t,r,n){const s=i._`${t}${(0,i.getProperty)(r)} === undefined`;return n?(0,i.or)(s,(0,i.not)(isOwnProperty(e,t,r))):s}function allSchemaProperties(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function checkReportMissingProp(e,t){const{gen:r,data:n,it:s}=e;r.if(noPropertyInData(r,n,t,s.opts.ownProperties),(()=>{e.setParams({missingProperty:i._`${t}`},!0),e.error()}))},t.checkMissingProp=function checkMissingProp({gen:e,data:t,it:{opts:r}},n,s){return(0,i.or)(...n.map((n=>(0,i.and)(noPropertyInData(e,t,n,r.ownProperties),i._`${s} = ${n}`))))},t.reportMissingProp=function reportMissingProp(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=hasPropFunc,t.isOwnProperty=isOwnProperty,t.propertyInData=function propertyInData(e,t,r,n){const s=i._`${t}${(0,i.getProperty)(r)} !== undefined`;return n?i._`${s} && ${isOwnProperty(e,t,r)}`:s},t.noPropertyInData=noPropertyInData,t.allSchemaProperties=allSchemaProperties,t.schemaProperties=function schemaProperties(e,t){return allSchemaProperties(t).filter((r=>!(0,n.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function callValidateCode({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:a},it:c},u,p,l){const d=l?i._`${e}, ${t}, ${n}${o}`:t,f=[[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,a)],[s.default.parentData,c.parentData],[s.default.parentDataProperty,c.parentDataProperty],[s.default.rootData,s.default.rootData]];c.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const y=i._`${d}, ${r.object(...f)}`;return p!==i.nil?i._`${u}.call(${p}, ${y})`:i._`${u}(${y})`};const a=i._`new RegExp`;t.usePattern=function usePattern({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,c=s(r,n);return e.scopeValue("pattern",{key:c.toString(),ref:c,code:i._`${"new RegExp"===s.code?a:(0,o.useFunc)(e,s)}(${r}, ${n})`})},t.validateArray=function validateArray(e){const{gen:t,data:r,keyword:s,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return validateItems((()=>t.assign(e,!1))),e}return t.var(a,!0),validateItems((()=>t.break())),a;function validateItems(o){const c=t.const("len",i._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),t.if((0,i.not)(a),o)}))}},t.validateUnion=function validateUnion(e){const{gen:t,schema:r,keyword:s,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,n.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,n)=>{const o=e.subschema({keyword:s,schemaProp:n,compositeRule:!0},c);t.assign(a,i._`${a} || ${c}`);e.mergeValidEvaluated(o,c)||t.if((0,i.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},8386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},5684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(8386),n=r(8280),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",i.default,n.default];t.default=s},8280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const i=r(6646),n=r(412),s=r(3487),o=r(2141),a=r(5173),c=r(6776),u={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:c,validateName:u,opts:p,self:l}=n,{root:d}=c;if(("#"===r||"#/"===r)&&o===d.baseId)return function callRootRef(){if(c===d)return callRef(e,u,c,c.$async);const r=t.scopeValue("root",{ref:d});return callRef(e,s._`${r}.validate`,d,d.$async)}();const f=a.resolveRef.call(l,d,o,r);if(void 0===f)throw new i.default(n.opts.uriResolver,o,r);return f instanceof a.SchemaEnv?function callValidate(t){const r=getValidate(e,t);callRef(e,r,t,t.$async)}(f):function inlineRefSchema(i){const n=t.scopeValue("schema",!0===p.code.source?{ref:i,code:(0,s.stringify)(i)}:{ref:i}),o=t.name("valid"),a=e.subschema({schema:i,dataTypes:[],schemaPath:s.nil,topSchemaRef:n,errSchemaPath:r},o);e.mergeEvaluated(a),e.ok(o)}(f)}};function getValidate(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):s._`${r.scopeValue("wrapper",{ref:t})}.validate`}function callRef(e,t,r,i){const{gen:a,it:u}=e,{allErrors:p,schemaEnv:l,opts:d}=u,f=d.passContext?o.default.this:s.nil;function addErrorsFrom(e){const t=s._`${e}.errors`;a.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,s._`${o.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!u.opts.unevaluated)return;const i=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==u.props)if(i&&!i.dynamicProps)void 0!==i.props&&(u.props=c.mergeEvaluated.props(a,i.props,u.props));else{const t=a.var("props",s._`${e}.evaluated.props`);u.props=c.mergeEvaluated.props(a,t,u.props,s.Name)}if(!0!==u.items)if(i&&!i.dynamicItems)void 0!==i.items&&(u.items=c.mergeEvaluated.items(a,i.items,u.items));else{const t=a.var("items",s._`${e}.evaluated.items`);u.items=c.mergeEvaluated.items(a,t,u.items,s.Name)}}i?function callAsyncRef(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(s._`await ${(0,n.callValidateCode)(e,t,f)}`),addEvaluatedFrom(t),p||a.assign(r,!0)}),(e=>{a.if(s._`!(${e} instanceof ${u.ValidationError})`,(()=>a.throw(e))),addErrorsFrom(e),p||a.assign(r,!1)})),e.ok(r)}():function callSyncRef(){e.result((0,n.callValidateCode)(e,t,f),(()=>addEvaluatedFrom(t)),(()=>addErrorsFrom(t)))}()}t.getValidate=getValidate,t.callRef=callRef,t.default=u},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(9306),s=r(5173),o=r(6776),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>i._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:u}=e,{oneOf:p}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=a.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),f=t.const("tag",i._`${r}${(0,i.getProperty)(l)}`);function applyTagSchema(r){const n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(s,i.Name),n}t.if(i._`typeof ${f} == "string"`,(()=>function validateMapping(){const r=function getMapping(){var e;const t={},r=hasRequired(c);let i=!0;for(let t=0;t<p.length;t++){let n=p[t];(null==n?void 0:n.$ref)&&!(0,o.schemaHasRulesButRef)(n,u.self.RULES)&&(n=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,null==n?void 0:n.$ref),n instanceof s.SchemaEnv&&(n=n.schema));const a=null===(e=null==n?void 0:n.properties)||void 0===e?void 0:e[l];if("object"!=typeof a)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${l}"`);i=i&&(r||hasRequired(n)),addMappings(a,t)}if(!i)throw new Error(`discriminator: "${l}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(l)}function addMappings(e,t){if(e.const)addMapping(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${l}" must have "const" or "enum"`);for(const r of e.enum)addMapping(r,t)}}function addMapping(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${l}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(i._`${f} === ${e}`),t.assign(d,applyTagSchema(r[e]));t.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:f,tagName:l}),t.endIf()}()),(()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:f,tagName:l}))),e.ok(d)}};t.default=a},9306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))},3924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5684),n=r(2649),s=r(8200),o=r(9502),a=r(6167),c=[i.default,n.default,(0,s.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},9651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match format "${e}"`,params:({schemaCode:e})=>i._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:s,schema:o,schemaCode:a,it:c}=e,{opts:u,errSchemaPath:p,schemaEnv:l,self:d}=c;u.validateFormats&&(s?function validate$DataFormat(){const s=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),o=r.const("fDef",i._`${s}[${a}]`),c=r.let("fType"),p=r.let("format");r.if(i._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,i._`${o}.type || "string"`).assign(p,i._`${o}.validate`)),(()=>r.assign(c,i._`"string"`).assign(p,o))),e.fail$data((0,i.or)(function unknownFmt(){return!1===u.strictSchema?i.nil:i._`${a} && !${p}`}(),function invalidFmt(){const e=l.$async?i._`(${o}.async ? await ${p}(${n}) : ${p}(${n}))`:i._`${p}(${n})`,r=i._`(typeof ${p} == "function" ? ${e} : ${p}.test(${n}))`;return i._`${p} && ${p} !== true && ${c} === ${t} && !${r}`}()))}():function validateFormat(){const s=d.formats[o];if(!s)return void function unknownFormat(){if(!1===u.strictSchema)return void d.logger.warn(unknownMsg());throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${o}" ignored in schema at path "${p}"`}}();if(!0===s)return;const[a,c,f]=function getFormat(e){const t=e instanceof RegExp?(0,i.regexpCode)(e):u.code.formats?i._`${u.code.formats}${(0,i.getProperty)(o)}`:void 0,n=r.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,i._`${n}.validate`];return["string",e,n]}(s);a===t&&e.pass(function validCondition(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return i._`await ${f}(${n})`}return"function"==typeof c?i._`${f}(${n})`:i._`${f}.test(${n})`}())}())}};t.default=n},9502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=[r(9651).default];t.default=i},6167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},4693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(3510),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>i._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(i._`!${(0,n.useFunc)(t,s.default)}(${r}, ${a})`):e.fail(i._`${c} !== ${r}`)}};t.default=o},966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(3510),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>i._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:u}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const p=a.length>=u.opts.loopEnum;let l;const getEql=()=>null!=l?l:l=(0,n.useFunc)(t,s.default);let d;if(p||o)d=t.let("valid"),e.block$data(d,(function loopEnum(){t.assign(d,!1),t.forOf("v",c,(e=>t.if(i._`${getEql()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);d=(0,i.or)(...a.map(((t,n)=>function equalCode(e,t){const n=a[t];return"object"==typeof n&&null!==n?i._`${getEql()}(${r}, ${e}[${t}])`:i._`${r} === ${n}`}(e,n))))}e.pass(d)}};t.default=o},2649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3983),n=r(430),s=r(3229),o=r(4336),a=r(498),c=r(3301),u=r(1687),p=r(2958),l=r(4693),d=r(966),f=[i.default,n.default,s.default,o.default,a.default,c.default,u.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];t.default=f},1687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxItems"===t?i.operators.GT:i.operators.LT;e.fail$data(i._`${r}.length ${s} ${n}`)}};t.default=n},3229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s=r(4499),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e,c="maxLength"===t?i.operators.GT:i.operators.LT,u=!1===a.opts.unicode?i._`${r}.length`:i._`${(0,n.useFunc)(e.gen,s.default)}(${r})`;e.fail$data(i._`${u} ${c} ${o}`)}};t.default=o},3983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=i.operators,s={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:e,schemaCode:t})=>i.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${s[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(i._`${r} ${s[t].fail} ${n} || isNaN(${r})`)}};t.default=a},498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return i.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>i._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:n}=e,s="maxProperties"===t?i.operators.GT:i.operators.LT;e.fail$data(i._`Object.keys(${r}).length ${s} ${n}`)}};t.default=n},430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>i.str`must be multiple of ${e}`,params:({schemaCode:e})=>i._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:s}=e,o=s.opts.multipleOfPrecision,a=t.let("res"),c=o?i._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:i._`${a} !== parseInt(${a})`;e.fail$data(i._`(${n} === 0 || (${a} = ${r}/${n}, ${c}))`)}};t.default=n},4336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match pattern "${e}"`,params:({schemaCode:e})=>n._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",u=r?n._`(new RegExp(${o}, ${c}))`:(0,i.usePattern)(e,s);e.fail$data(n._`!${u}.test(${t})`)}};t.default=s},3301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(6776),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>n.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>n._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:u}=e,{opts:p}=u;if(!c&&0===r.length)return;const l=r.length>=p.loopRequired;if(u.allErrors?function allErrorsMode(){if(l||c)e.block$data(n.nil,loopAllRequired);else for(const t of r)(0,i.checkReportMissingProp)(e,t)}():function exitOnErrorMode(){const s=t.let("missing");if(l||c){const r=t.let("valid",!0);e.block$data(r,(()=>function loopUntilMissing(r,s){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(s,(0,i.propertyInData)(t,a,r,p.ownProperties)),t.if((0,n.not)(s),(()=>{e.error(),t.break()}))}),n.nil)}(s,r))),e.ok(r)}else t.if((0,i.checkMissingProp)(e,r,s)),(0,i.reportMissingProp)(e,s),t.else()}(),p.strictRequired){const t=e.parentSchema.properties,{definedProperties:i}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!i.has(e)){const t=`required property "${e}" is not defined at "${u.schemaEnv.baseId+u.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(u,t,u.opts.strictRequired)}}function loopAllRequired(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,i.noPropertyInData)(t,a,r,p.ownProperties),(()=>e.error()))}))}}};t.default=o},2958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(453),n=r(3487),s=r(6776),o=r(3510),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>n.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>n._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:u,schemaCode:p,it:l}=e;if(!a&&!c)return;const d=t.let("valid"),f=u.items?(0,i.getSchemaTypes)(u.items):[];function loopN(s,o){const a=t.name("item"),c=(0,i.checkDataTypes)(f,a,l.opts.strictNumbers,i.DataType.Wrong),u=t.const("indices",n._`{}`);t.for(n._`;${s}--;`,(()=>{t.let(a,n._`${r}[${s}]`),t.if(c,n._`continue`),f.length>1&&t.if(n._`typeof ${a} == "string"`,n._`${a} += "_"`),t.if(n._`typeof ${u}[${a}] == "number"`,(()=>{t.assign(o,n._`${u}[${a}]`),e.error(),t.assign(d,!1).break()})).code(n._`${u}[${a}] = ${s}`)}))}function loopN2(i,a){const c=(0,s.useFunc)(t,o.default),u=t.name("outer");t.label(u).for(n._`;${i}--;`,(()=>t.for(n._`${a} = ${i}; ${a}--;`,(()=>t.if(n._`${c}(${r}[${i}], ${r}[${a}])`,(()=>{e.error(),t.assign(d,!1).break(u)}))))))}e.block$data(d,(function validateUniqueItems(){const i=t.let("i",n._`${r}.length`),s=t.let("j");e.setParams({i,j:s}),t.assign(d,!0),t.if(n._`${i} > 1`,(()=>(function canOptimize(){return f.length>0&&!f.some((e=>"object"===e||"array"===e))}()?loopN:loopN2)(i,s)))}),n._`${p} === false`),e.ok(d)}};t.default=a},5987:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,i){var n={},s={};s[r]=0;var o,a,c,u,p,l,d,f=t.PriorityQueue.make();for(f.push(r,0);!f.empty();)for(c in a=(o=f.pop()).value,u=o.cost,p=e[a]||{})p.hasOwnProperty(c)&&(l=u+p[c],d=s[c],(void 0===s[c]||d>l)&&(s[c]=l,f.push(c,l),n[c]=a));if(void 0!==i&&void 0===s[i]){var y=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(y)}return n},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,r,i){var n=t.single_source_shortest_paths(e,r,i);return t.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var r,i=t.PriorityQueue,n={};for(r in e=e||{},i)i.hasOwnProperty(r)&&(n[r]=i[r]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var r={value:e,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},2378:e=>{"use strict";e.exports=function encodeUtf8(e){for(var t=[],r=e.length,i=0;i<r;i++){var n=e.charCodeAt(i);if(n>=55296&&n<=56319&&r>i+1){var s=e.charCodeAt(i+1);s>=56320&&s<=57343&&(n=1024*(n-55296)+s-56320+65536,i+=1)}n<128?t.push(n):n<2048?(t.push(n>>6|192),t.push(63&n|128)):n<55296||n>=57344&&n<65536?(t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=65536&&n<=1114111?(t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},6387:(e,t,r)=>{var i;!function(n){var s=Object.hasOwnProperty,o=Array.isArray?Array.isArray:function _isArray(e){return"[object Array]"===Object.prototype.toString.call(e)},a="object"==typeof process&&"function"==typeof process.nextTick,c="function"==typeof Symbol,u="object"==typeof Reflect,p="function"==typeof setImmediate?setImmediate:setTimeout,l=c?u&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function init(){this._events={},this._conf&&configure.call(this,this._conf)}function configure(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==n&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function logPossibleMemoryLeak(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var i=new Error(r);i.name="MaxListenersExceededWarning",i.emitter=this,i.count=e,process.emitWarning(i)}else console.error(r),console.trace&&console.trace()}var toArray=function(e,t,r){var i=arguments.length;switch(i){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,r];default:for(var n=new Array(i);i--;)n[i]=arguments[i];return n}};function toObject(e,t){for(var r={},i=e.length,s=t?t.length:0,o=0;o<i;o++)r[e[o]]=o<s?t[o]:n;return r}function TargetObserver(e,t,r){var i,n;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(r.on||r.off)&&(i=r.on,n=r.off),t.addEventListener?(i=t.addEventListener,n=t.removeEventListener):t.addListener?(i=t.addListener,n=t.removeListener):t.on&&(i=t.on,n=t.off),!i&&!n)throw Error("target does not implement any known event API");if("function"!=typeof i)throw TypeError("on method must be a function");if("function"!=typeof n)throw TypeError("off method must be a function");this._on=i,this._off=n;var s=e._observers;s?s.push(this):e._observers=[this]}function resolveOptions(e,t,r,i){var o=Object.assign({},t);if(!e)return o;if("object"!=typeof e)throw TypeError("options must be an object");var a,c,u,p=Object.keys(e),l=p.length;function reject(e){throw Error('Invalid "'+a+'" option value'+(e?". Reason: "+e:""))}for(var d=0;d<l;d++){if(a=p[d],!i&&!s.call(t,a))throw Error('Unknown "'+a+'" option');(c=e[a])!==n&&(u=r[a],o[a]=u?u(c,reject):c)}return o}function constructorReducer(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function makeTypeReducer(e){var t="value must be type of "+e.join("|"),r=e.length,i=e[0],n=e[1];return 1===r?function(e,r){if(typeof e===i)return e;r(t)}:2===r?function(e,r){var s=typeof e;if(s===i||s===n)return e;r(t)}:function(i,n){for(var s=typeof i,o=r;o-- >0;)if(s===e[o])return i;n(t)}}Object.assign(TargetObserver.prototype,{subscribe:function(e,t,r){var i=this,n=this._target,s=this._emitter,o=this._listeners,handler=function(){var i=toArray.apply(null,arguments),o={data:i,name:t,original:e};if(r){var a=r.call(n,o);!1!==a&&s.emit.apply(s,[o.name].concat(i))}else s.emit.apply(s,[t].concat(i))};if(o[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,s._newListener&&s._removeListener&&!i._onNewListener?(this._onNewListener=function(r){r===t&&null===o[e]&&(o[e]=handler,i._on.call(n,e,handler))},s.on("newListener",this._onNewListener),this._onRemoveListener=function(r){r===t&&!s.hasListeners(r)&&o[e]&&(o[e]=null,i._off.call(n,e,handler))},o[e]=null,s.on("removeListener",this._onRemoveListener)):(o[e]=handler,i._on.call(n,e,handler))},unsubscribe:function(e){var t,r,i,n=this,s=this._listeners,o=this._emitter,a=this._off,c=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function clearRefs(){n._onNewListener&&(o.off("newListener",n._onNewListener),o.off("removeListener",n._onRemoveListener),n._onNewListener=null,n._onRemoveListener=null);var e=findTargetIndex.call(o,n);o._observers.splice(e,1)}if(e){if(!(t=s[e]))return;a.call(c,e,t),delete s[e],--this._listenersCount||clearRefs()}else{for(i=(r=l(s)).length;i-- >0;)e=r[i],a.call(c,e,s[e]);this._listeners={},this._listenersCount=0,clearRefs()}}});var d=makeTypeReducer(["function"]),f=makeTypeReducer(["object","function"]);function makeCancelablePromise(e,t,r){var i,n,s,o=0,a=new e((function(c,u,p){function cleanup(){n&&(n=null),o&&(clearTimeout(o),o=0)}r=resolveOptions(r,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),i=!r.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof p;var _resolve=function(e){cleanup(),c(e)},_reject=function(e){cleanup(),u(e)};i?t(_resolve,_reject,p):(n=[function(e){_reject(e||Error("canceled"))}],t(_resolve,_reject,(function(e){if(s)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");n.push(e)})),s=!0),r.timeout>0&&(o=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",o=0,a.cancel(e),u(e)}),r.timeout))}));return i||(a.cancel=function(e){if(n){for(var t=n.length,r=1;r<t;r++)n[r](e);n[0](e),n=null}}),a}function findTargetIndex(e){var t=this._observers;if(!t)return-1;for(var r=t.length,i=0;i<r;i++)if(t[i]._target===e)return i;return-1}function searchListenerTree(e,t,r,i,n){if(!r)return null;if(0===i){var s=typeof t;if("string"===s){var o,a,c=0,u=0,p=this.delimiter,d=p.length;if(-1!==(a=t.indexOf(p))){o=new Array(5);do{o[c++]=t.slice(u,a),u=a+d}while(-1!==(a=t.indexOf(p,u)));o[c++]=t.slice(u),t=o,n=c}else t=[t],n=1}else"object"===s?n=t.length:(t=[t],n=1)}var f,y,h,m,g,v,b,R=null,O=t[i],S=t[i+1];if(i===n)r._listeners&&("function"==typeof r._listeners?(e&&e.push(r._listeners),R=[r]):(e&&e.push.apply(e,r._listeners),R=[r]));else{if("*"===O){for(a=(v=l(r)).length;a-- >0;)"_listeners"!==(f=v[a])&&(b=searchListenerTree(e,t,r[f],i+1,n))&&(R?R.push.apply(R,b):R=b);return R}if("**"===O){for((g=i+1===n||i+2===n&&"*"===S)&&r._listeners&&(R=searchListenerTree(e,t,r,n,n)),a=(v=l(r)).length;a-- >0;)"_listeners"!==(f=v[a])&&("*"===f||"**"===f?(r[f]._listeners&&!g&&(b=searchListenerTree(e,t,r[f],n,n))&&(R?R.push.apply(R,b):R=b),b=searchListenerTree(e,t,r[f],i,n)):b=searchListenerTree(e,t,r[f],f===S?i+2:i,n),b&&(R?R.push.apply(R,b):R=b));return R}r[O]&&(R=searchListenerTree(e,t,r[O],i+1,n))}if((y=r["*"])&&searchListenerTree(e,t,y,i+1,n),h=r["**"])if(i<n)for(h._listeners&&searchListenerTree(e,t,h,n,n),a=(v=l(h)).length;a-- >0;)"_listeners"!==(f=v[a])&&(f===S?searchListenerTree(e,t,h[f],i+2,n):f===O?searchListenerTree(e,t,h[f],i+1,n):((m={})[f]=h[f],searchListenerTree(e,t,{"**":m},i+1,n)));else h._listeners?searchListenerTree(e,t,h,n,n):h["*"]&&h["*"]._listeners&&searchListenerTree(e,t,h["*"],n,n);return R}function growListenerTree(e,t,r){var i,n,s=0,o=0,a=this.delimiter,c=a.length;if("string"==typeof e)if(-1!==(i=e.indexOf(a))){n=new Array(5);do{n[s++]=e.slice(o,i),o=i+c}while(-1!==(i=e.indexOf(a,o)));n[s++]=e.slice(o)}else n=[e],s=1;else n=e,s=e.length;if(s>1)for(i=0;i+1<s;i++)if("**"===n[i]&&"**"===n[i+1])return;var u,p=this.listenerTree;for(i=0;i<s;i++)if(p=p[u=n[i]]||(p[u]={}),i===s-1)return p._listeners?("function"==typeof p._listeners&&(p._listeners=[p._listeners]),r?p._listeners.unshift(t):p._listeners.push(t),!p._listeners.warned&&this._maxListeners>0&&p._listeners.length>this._maxListeners&&(p._listeners.warned=!0,logPossibleMemoryLeak.call(this,p._listeners.length,u))):p._listeners=t,!0;return!0}function collectTreeEvents(e,t,r,i){for(var n,s,o,a,c=l(e),u=c.length,p=e._listeners;u-- >0;)n=e[s=c[u]],o="_listeners"===s?r:r?r.concat(s):[s],a=i||"symbol"==typeof s,p&&t.push(a?o:o.join(this.delimiter)),"object"==typeof n&&collectTreeEvents.call(this,n,t,o,a);return t}function recursivelyGarbageCollect(e){for(var t,r,i,n=l(e),s=n.length;s-- >0;)(t=e[r=n[s]])&&(i=!0,"_listeners"===r||recursivelyGarbageCollect(t)||delete e[r]);return i}function Listener(e,t,r){this.emitter=e,this.event=t,this.listener=r}function setupListener(e,t,r){if(!0===r)s=!0;else if(!1===r)i=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var i=r.async,s=r.promisify,o=r.nextTick,c=r.objectify}if(i||o||s){var u=t,l=t._origin||t;if(o&&!a)throw Error("process.nextTick is not supported");s===n&&(s="AsyncFunction"===t.constructor.name),t=function(){var e=arguments,t=this,r=this.event;return s?o?Promise.resolve():new Promise((function(e){p(e)})).then((function(){return t.event=r,u.apply(t,e)})):(o?process.nextTick:p)((function(){t.event=r,u.apply(t,e)}))},t._async=!0,t._origin=l}return[t,c?new Listener(this,e,t):this]}function EventEmitter(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,configure.call(this,e)}Listener.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},EventEmitter.EventEmitter2=EventEmitter,EventEmitter.prototype.listenTo=function(e,t,r){if("object"!=typeof e)throw TypeError("target musts be an object");var i=this;function listen(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,s=r.reducers,o=findTargetIndex.call(i,e);n=-1===o?new TargetObserver(i,e,r):i._observers[o];for(var a,c=l(t),u=c.length,p="function"==typeof s,d=0;d<u;d++)a=c[d],n.subscribe(a,t[a]||a,p?s:s&&s[a])}return r=resolveOptions(r,{on:n,off:n,reducers:n},{on:d,off:d,reducers:f}),o(t)?listen(toObject(t)):listen("string"==typeof t?toObject(t.split(/\s+/)):t),this},EventEmitter.prototype.stopListeningTo=function(e,t){var r=this._observers;if(!r)return!1;var i,n=r.length,s=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;n-- >0;)i=r[n],e&&i._target!==e||(i.unsubscribe(t),s=!0);return s},EventEmitter.prototype.delimiter=".",EventEmitter.prototype.setMaxListeners=function(e){e!==n&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},EventEmitter.prototype.getMaxListeners=function(){return this._maxListeners},EventEmitter.prototype.event="",EventEmitter.prototype.once=function(e,t,r){return this._once(e,t,!1,r)},EventEmitter.prototype.prependOnceListener=function(e,t,r){return this._once(e,t,!0,r)},EventEmitter.prototype._once=function(e,t,r,i){return this._many(e,1,t,r,i)},EventEmitter.prototype.many=function(e,t,r,i){return this._many(e,t,r,!1,i)},EventEmitter.prototype.prependMany=function(e,t,r,i){return this._many(e,t,r,!0,i)},EventEmitter.prototype._many=function(e,t,r,i,n){var s=this;if("function"!=typeof r)throw new Error("many only accepts instances of Function");function listener(){return 0==--t&&s.off(e,listener),r.apply(this,arguments)}return listener._origin=r,this._on(e,listener,i,n)},EventEmitter.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,i,n,s,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return!1;if(a&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(r=o.length,c)for(i=0;i<r;i++)if("symbol"==typeof o[i]){s=!0;break}s||(o=o.join(this.delimiter))}var u,p=arguments.length;if(this._all&&this._all.length)for(i=0,r=(u=this._all.slice()).length;i<r;i++)switch(this.event=o,p){case 1:u[i].call(this,o);break;case 2:u[i].call(this,o,arguments[1]);break;case 3:u[i].call(this,o,arguments[1],arguments[2]);break;default:u[i].apply(this,arguments)}if(a)u=[],searchListenerTree.call(this,u,e,this.listenerTree,0,r);else{if("function"==typeof(u=this._events[o])){switch(this.event=o,p){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(p-1),n=1;n<p;n++)t[n-1]=arguments[n];u.apply(this,t)}return!0}u&&(u=u.slice())}if(u&&u.length){if(p>3)for(t=new Array(p-1),n=1;n<p;n++)t[n-1]=arguments[n];for(i=0,r=u.length;i<r;i++)switch(this.event=o,p){case 1:u[i].call(this);break;case 2:u[i].call(this,arguments[1]);break;case 3:u[i].call(this,arguments[1],arguments[2]);break;default:u[i].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===o)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},EventEmitter.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||init.call(this);var e,t,r,i,n,s,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(a&&(e=o,"newListener"!==o&&"removeListener"!==o&&"object"==typeof o)){if(i=o.length,c)for(n=0;n<i;n++)if("symbol"==typeof o[n]){t=!0;break}t||(o=o.join(this.delimiter))}var u,p=[],l=arguments.length;if(this._all)for(n=0,i=this._all.length;n<i;n++)switch(this.event=o,l){case 1:p.push(this._all[n].call(this,o));break;case 2:p.push(this._all[n].call(this,o,arguments[1]));break;case 3:p.push(this._all[n].call(this,o,arguments[1],arguments[2]));break;default:p.push(this._all[n].apply(this,arguments))}if(a?(u=[],searchListenerTree.call(this,u,e,this.listenerTree,0)):u=this._events[o],"function"==typeof u)switch(this.event=o,l){case 1:p.push(u.call(this));break;case 2:p.push(u.call(this,arguments[1]));break;case 3:p.push(u.call(this,arguments[1],arguments[2]));break;default:for(r=new Array(l-1),s=1;s<l;s++)r[s-1]=arguments[s];p.push(u.apply(this,r))}else if(u&&u.length){if(u=u.slice(),l>3)for(r=new Array(l-1),s=1;s<l;s++)r[s-1]=arguments[s];for(n=0,i=u.length;n<i;n++)switch(this.event=o,l){case 1:p.push(u[n].call(this));break;case 2:p.push(u[n].call(this,arguments[1]));break;case 3:p.push(u[n].call(this,arguments[1],arguments[2]));break;default:p.push(u[n].apply(this,r))}}else if(!this.ignoreErrors&&!this._all&&"error"===o)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(p)},EventEmitter.prototype.on=function(e,t,r){return this._on(e,t,!1,r)},EventEmitter.prototype.prependListener=function(e,t,r){return this._on(e,t,!0,r)},EventEmitter.prototype.onAny=function(e){return this._onAny(e,!1)},EventEmitter.prototype.prependAny=function(e){return this._onAny(e,!0)},EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},EventEmitter.prototype._on=function(e,t,r,i){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");this._events||init.call(this);var s,o=this;return i!==n&&(t=(s=setupListener.call(this,e,t,i))[0],o=s[1]),this._newListener&&this.emit("newListener",e,t),this.wildcard?(growListenerTree.call(this,e,t,r),o):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,logPossibleMemoryLeak.call(this,this._events[e].length,e))):this._events[e]=t,o)},EventEmitter.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var r,i=[];if(this.wildcard){var n="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=searchListenerTree.call(this,null,n,this.listenerTree,0)))return this}else{if(!this._events[e])return this;r=this._events[e],i.push({_listeners:r})}for(var s=0;s<i.length;s++){var a=i[s];if(r=a._listeners,o(r)){for(var c=-1,u=0,p=r.length;u<p;u++)if(r[u]===t||r[u].listener&&r[u].listener===t||r[u]._origin&&r[u]._origin===t){c=u;break}if(c<0)continue;return this.wildcard?a._listeners.splice(c,1):this._events[e].splice(c,1),0===r.length&&(this.wildcard?delete a._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)&&(this.wildcard?delete a._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&recursivelyGarbageCollect(this.listenerTree),this},EventEmitter.prototype.offAny=function(e){var t,r=0,i=0;if(e&&this._all&&this._all.length>0){for(r=0,i=(t=this._all).length;r<i;r++)if(e===t[r])return t.splice(r,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(r=0,i=t.length;r<i;r++)this.emit("removeListenerAny",t[r]);this._all=[]}return this},EventEmitter.prototype.removeListener=EventEmitter.prototype.off,EventEmitter.prototype.removeAllListeners=function(e){if(e===n)return!this._events||init.call(this),this;if(this.wildcard){var t,r=searchListenerTree.call(this,null,e,this.listenerTree,0);if(!r)return this;for(t=0;t<r.length;t++)r[t]._listeners=null;this.listenerTree&&recursivelyGarbageCollect(this.listenerTree)}else this._events&&(this._events[e]=null);return this},EventEmitter.prototype.listeners=function(e){var t,r,i,s,o,a=this._events;if(e===n){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!a)return[];for(s=(t=l(a)).length,i=[];s-- >0;)"function"==typeof(r=a[t[s]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(o=this.listenerTree))return[];var c=[],u="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,c,u,o,0),c}return a&&(r=a[e])?"function"==typeof r?[r]:r:[]},EventEmitter.prototype.eventNames=function(e){var t=this._events;return this.wildcard?collectTreeEvents.call(this,this.listenerTree,[],null,e):t?l(t):[]},EventEmitter.prototype.listenerCount=function(e){return this.listeners(e).length},EventEmitter.prototype.hasListeners=function(e){if(this.wildcard){var t=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return searchListenerTree.call(this,t,r,this.listenerTree,0),t.length>0}var i=this._events,s=this._all;return!!(s&&s.length||i&&(e===n?l(i).length:i[e]))},EventEmitter.prototype.listenersAny=function(){return this._all?this._all:[]},EventEmitter.prototype.waitFor=function(e,t){var r=this,i=typeof t;return"number"===i?t={timeout:t}:"function"===i&&(t={filter:t}),makeCancelablePromise((t=resolveOptions(t,{timeout:0,filter:n,handleError:!1,Promise,overload:!1},{filter:d,Promise:constructorReducer})).Promise,(function(i,n,s){function listener(){var s=t.filter;if(!s||s.apply(r,arguments))if(r.off(e,listener),t.handleError){var o=arguments[0];o?n(o):i(toArray.apply(null,arguments).slice(1))}else i(toArray.apply(null,arguments))}s((function(){r.off(e,listener)})),r._on(e,listener,!1)}),{timeout:t.timeout,overload:t.overload})};var y=EventEmitter.prototype;Object.defineProperties(EventEmitter,{defaultMaxListeners:{get:function(){return y._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");y._maxListeners=e},enumerable:!0},once:{value:function once(e,t,r){return makeCancelablePromise((r=resolveOptions(r,{Promise,timeout:0,overload:!1},{Promise:constructorReducer})).Promise,(function(r,i,n){var s;if("function"==typeof e.addEventListener)return s=function(){r(toArray.apply(null,arguments))},n((function(){e.removeEventListener(t,s)})),void e.addEventListener(t,s,{once:!0});var o,eventListener=function(){o&&e.removeListener("error",o),r(toArray.apply(null,arguments))};"error"!==t&&(o=function(r){e.removeListener(t,eventListener),i(r)},e.once("error",o)),n((function(){o&&e.removeListener("error",o),e.removeListener(t,eventListener)})),e.once(t,eventListener)}),{timeout:r.timeout,overload:r.overload})},writable:!0,configurable:!0}}),Object.defineProperties(y,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),(i=function(){return EventEmitter}.call(t,r,t,e))===n||(e.exports=i)}()},4063:e=>{"use strict";e.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,i,n;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(i=r;0!=i--;)if(!equal(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((r=(n=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=r;0!=i--;){var s=n[i];if(!equal(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}},9461:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),_traverse(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function _traverse(e,r,i,n,s,o,a,c,u,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in r(n,s,o,a,c,u,p),n){var d=n[l];if(Array.isArray(d)){if(l in t.arrayKeywords)for(var f=0;f<d.length;f++)_traverse(e,r,i,d[f],s+"/"+l+"/"+f,o,s,l,n,f)}else if(l in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)_traverse(e,r,i,d[y],s+"/"+l+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),o,s,l,n,y)}else(l in t.keywords||e.allKeys&&!(l in t.skipKeywords))&&_traverse(e,r,i,d,s+"/"+l,o,s,l,n)}i(n,s,o,a,c,u,p)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},4530:(e,t)=>{function serializer(e,t){var r=[],i=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]"}),function(n,s){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,n):i.push(n),~r.indexOf(s)&&(s=t.call(this,n,s))}else r.push(s);return null==e?s:e.call(this,n,s)}}(e.exports=function stringify(e,t,r,i){return JSON.stringify(e,serializer(t,i),r)}).getSerialize=serializer},9208:e=>{var t="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,o=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,d=p||l||Function("return this")();var f,y=Array.prototype,h=Function.prototype,m=Object.prototype,g=d["__core-js_shared__"],v=(f=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",b=h.toString,R=m.hasOwnProperty,O=m.toString,S=RegExp("^"+b.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=d.Symbol,w=y.splice,I=getNative(d,"Map"),P=getNative(Object,"create"),j=C?C.prototype:void 0,$=j?j.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function assocIndexOf(e,t){for(var r,i,n=e.length;n--;)if((r=e[n][0])===(i=t)||r!=r&&i!=i)return n;return-1}function baseGet(e,t){t=function isKey(e,t){if(A(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return s.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return A(e)?e:T(e)}(t);for(var r=0,i=t.length;null!=e&&r<i;)e=e[toKey(t[r++])];return r&&r==i?e:void 0}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!v&&v in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?O.call(e):"";return t==r||t==i}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:u;return t.test(function toSource(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}Hash.prototype.clear=function hashClear(){this.__data__=P?P(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(P){var i=r[e];return i===t?void 0:i}return R.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return P?void 0!==t[e]:R.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=P&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():w.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?r.push([e,t]):r[i][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(I||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var T=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(a,(function(e,r,i,n){t.push(i?n.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,i=t?t.apply(this,r):r[0],n=memoized.cache;if(n.has(i))return n.get(i);var s=e.apply(this,r);return memoized.cache=n.set(i,s),s};return memoized.cache=new(memoize.Cache||MapCache),memoized}memoize.Cache=MapCache;var A=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==O.call(e)}e.exports=function get(e,t,r){var i=null==e?void 0:baseGet(e,t);return void 0===i?r:i}},1468:e=>{var t="__lodash_hash_undefined__",r="[object Function]",i="[object GeneratorFunction]",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,o=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,l="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=l||d||Function("return this")();var y,h=Array.prototype,m=Function.prototype,g=Object.prototype,v=f["__core-js_shared__"],b=(y=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",R=m.toString,O=g.hasOwnProperty,S=g.toString,C=RegExp("^"+R.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=f.Symbol,I=h.splice,P=getNative(f,"Map"),j=getNative(Object,"create"),$=w?w.prototype:void 0,T=$?$.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function assignValue(e,t,r){var i=e[t];O.call(e,t)&&eq(i,r)&&(void 0!==r||t in e)||(e[t]=r)}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseIsNative(e){if(!isObject(e)||function isMasked(e){return!!b&&b in e}(e))return!1;var t=function isFunction(e){var t=isObject(e)?S.call(e):"";return t==r||t==i}(e)||function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:u;return t.test(function toSource(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function baseSet(e,t,r,i){if(!isObject(e))return e;t=function isKey(e,t){if(q(e))return!1;var r=typeof e;if("number"==r||"symbol"==r||"boolean"==r||null==e||isSymbol(e))return!0;return s.test(e)||!n.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function castPath(e){return q(e)?e:A(e)}(t);for(var o=-1,a=t.length,c=a-1,u=e;null!=u&&++o<a;){var p=toKey(t[o]),l=r;if(o!=c){var d=u[p];void 0===(l=i?i(d,p,u):void 0)&&(l=isObject(d)?d:isIndex(t[o+1])?[]:{})}assignValue(u,p,l),u=u[p]}return e}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}function isIndex(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&e>-1&&e%1==0&&e<t}Hash.prototype.clear=function hashClear(){this.__data__=j?j(null):{}},Hash.prototype.delete=function hashDelete(e){return this.has(e)&&delete this.__data__[e]},Hash.prototype.get=function hashGet(e){var r=this.__data__;if(j){var i=r[e];return i===t?void 0:i}return O.call(r,e)?r[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return j?void 0!==t[e]:O.call(t,e)},Hash.prototype.set=function hashSet(e,r){return this.__data__[e]=j&&void 0===r?t:r,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[]},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():I.call(t,r,1),!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);return i<0?r.push([e,t]):r[i][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.__data__={hash:new Hash,map:new(P||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){return getMapData(this,e).delete(e)},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this};var A=memoize((function(e){e=function toString(e){return null==e?"":function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return T?T.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return o.test(e)&&t.push(""),e.replace(a,(function(e,r,i,n){t.push(i?n.replace(c,"$1"):r||e)})),t}));function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var memoized=function(){var r=arguments,i=t?t.apply(this,r):r[0],n=memoized.cache;if(n.has(i))return n.get(i);var s=e.apply(this,r);return memoized.cache=n.set(i,s),s};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(e,t){return e===t||e!=e&&t!=t}memoize.Cache=MapCache;var q=Array.isArray;function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isSymbol(e){return"symbol"==typeof e||function isObjectLike(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==S.call(e)}e.exports=function set(e,t,r){return null==e?e:baseSet(e,t,r)}},8565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class LuxonError extends Error{}class InvalidDateTimeError extends LuxonError{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class InvalidIntervalError extends LuxonError{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class InvalidDurationError extends LuxonError{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class ConflictingSpecificationError extends LuxonError{}class InvalidUnitError extends LuxonError{constructor(e){super(`Invalid unit ${e}`)}}class InvalidArgumentError extends LuxonError{}class ZoneIsAbstractError extends LuxonError{constructor(){super("Zone is an abstract class")}}const r="numeric",i="short",n="long",s={year:r,month:r,day:r},o={year:r,month:i,day:r},a={year:r,month:i,day:r,weekday:i},c={year:r,month:n,day:r},u={year:r,month:n,day:r,weekday:n},p={hour:r,minute:r},l={hour:r,minute:r,second:r},d={hour:r,minute:r,second:r,timeZoneName:i},f={hour:r,minute:r,second:r,timeZoneName:n},y={hour:r,minute:r,hourCycle:"h23"},h={hour:r,minute:r,second:r,hourCycle:"h23"},m={hour:r,minute:r,second:r,hourCycle:"h23",timeZoneName:i},g={hour:r,minute:r,second:r,hourCycle:"h23",timeZoneName:n},v={year:r,month:r,day:r,hour:r,minute:r},b={year:r,month:r,day:r,hour:r,minute:r,second:r},R={year:r,month:i,day:r,hour:r,minute:r},O={year:r,month:i,day:r,hour:r,minute:r,second:r},S={year:r,month:i,day:r,weekday:i,hour:r,minute:r},C={year:r,month:n,day:r,hour:r,minute:r,timeZoneName:i},w={year:r,month:n,day:r,hour:r,minute:r,second:r,timeZoneName:i},I={year:r,month:n,day:r,weekday:n,hour:r,minute:r,timeZoneName:n},P={year:r,month:n,day:r,weekday:n,hour:r,minute:r,second:r,timeZoneName:n};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function bestBy(e,t,r){if(0!==e.length)return e.reduce(((e,i)=>{const n=[t(i),i];return e&&r(e[0],n[0])===e[0]?e:n}),null)[1]}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,r){return isInteger(e)&&e>=t&&e<=r}function padStart(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function parseInteger(e){return isUndefined(e)||null===e||""===e?void 0:parseInt(e,10)}function parseFloating(e){return isUndefined(e)||null===e||""===e?void 0:parseFloat(e)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function roundTo(e,t,r=!1){const i=10**t;return(r?Math.trunc:Math.round)(e*i)/i}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){const r=function floorMod(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?isLeapYear(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function objToLocalTS(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function weeksInWeekYear(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===i?53:52}function untruncateYear(e){return e>99?e:e>60?1900+e:2e3+e}function parseZoneInfo(e,t,r,i=null){const n=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const o={timeZoneName:t,...s},a=new Intl.DateTimeFormat(r,o).formatToParts(n).find((e=>"timezonename"===e.type.toLowerCase()));return a?a.value:null}function signedOffset(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-i:i)}function asNumber(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError(`Invalid unit value ${e}`);return t}function normalizeObject(e,t){const r={};for(const i in e)if(hasOwnProperty(e,i)){const n=e[i];if(null==n)continue;r[t(i)]=asNumber(n)}return r}function formatOffset(e,t){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),n=e>=0?"+":"-";switch(t){case"short":return`${n}${padStart(r,2)}:${padStart(i,2)}`;case"narrow":return`${n}${r}${i>0?`:${i}`:""}`;case"techie":return`${n}${padStart(r,2)}${padStart(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function timeObject(e){return function pick(e,t){return t.reduce(((t,r)=>(t[r]=e[r],t)),{})}(e,["hour","minute","second","millisecond"])}const j=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,$=["January","February","March","April","May","June","July","August","September","October","November","December"],T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],A=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[...A];case"short":return[...T];case"long":return[...$];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const q=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],N=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],x=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[...x];case"short":return[...N];case"long":return[...q];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const E=["AM","PM"],D=["Before Christ","Anno Domini"],M=["BC","AD"],k=["B","A"];function eras(e){switch(e){case"narrow":return[...k];case"short":return[...M];case"long":return[...D];default:return null}}function stringifyTokens(e,t){let r="";for(const i of e)i.literal?r+=i.val:r+=t(i.val);return r}const J={D:s,DD:o,DDD:c,DDDD:u,t:p,tt:l,ttt:d,tttt:f,T:y,TT:h,TTT:m,TTTT:g,f:v,ff:R,fff:C,ffff:I,F:b,FF:O,FFF:w,FFFF:P};class Formatter{static create(e,t={}){return new Formatter(e,t)}static parseFormat(e){let t=null,r="",i=!1;const n=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);"'"===o?(r.length>0&&n.push({literal:i,val:r}),t=null,r="",i=!i):i||o===t?r+=o:(r.length>0&&n.push({literal:!1,val:r}),r=o,t=o)}return r.length>0&&n.push({literal:i,val:r}),n}static macroTokenToFormatOpts(e){return J[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return padStart(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,string=(t,r)=>this.loc.extract(e,t,r),formatOffset=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",meridiem=()=>r?function meridiemForDateTime(e){return E[e.hour<12?0:1]}(e):string({hour:"numeric",hourCycle:"h12"},"dayperiod"),month=(t,i)=>r?function monthForDateTime(e,t){return months(t)[e.month-1]}(e,t):string(i?{month:t}:{month:t,day:"numeric"},"month"),weekday=(t,i)=>r?function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}(e,t):string(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),maybeMacro=t=>{const r=Formatter.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},era=t=>r?function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}(e,t):string({era:t},"era");return stringifyTokens(Formatter.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return formatOffset({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return formatOffset({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return formatOffset({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return meridiem();case"d":return i?string({day:"numeric"},"day"):this.num(e.day);case"dd":return i?string({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return weekday("short",!0);case"cccc":return weekday("long",!0);case"ccccc":return weekday("narrow",!0);case"EEE":return weekday("short",!1);case"EEEE":return weekday("long",!1);case"EEEEE":return weekday("narrow",!1);case"L":return i?string({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?string({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return month("short",!0);case"LLLL":return month("long",!0);case"LLLLL":return month("narrow",!0);case"M":return i?string({month:"numeric"},"month"):this.num(e.month);case"MM":return i?string({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return month("short",!1);case"MMMM":return month("long",!1);case"MMMMM":return month("narrow",!1);case"y":return i?string({year:"numeric"},"year"):this.num(e.year);case"yy":return i?string({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?string({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?string({year:"numeric"},"year"):this.num(e.year,6);case"G":return era("short");case"GG":return era("long");case"GGGGG":return era("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return maybeMacro(t)}}))}formatDurationFromString(e,t){const tokenToField=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=Formatter.parseFormat(t),i=r.reduce(((e,{literal:t,val:r})=>t?e:e.concat(r)),[]);return stringifyTokens(r,(e=>t=>{const r=tokenToField(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...i.map(tokenToField).filter((e=>e)))))}}class Invalid{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Zone{get type(){throw new ZoneIsAbstractError}get name(){throw new ZoneIsAbstractError}get ianaName(){return this.name}get isUniversal(){throw new ZoneIsAbstractError}offsetName(e,t){throw new ZoneIsAbstractError}formatOffset(e,t){throw new ZoneIsAbstractError}offset(e){throw new ZoneIsAbstractError}equals(e){throw new ZoneIsAbstractError}get isValid(){throw new ZoneIsAbstractError}}let F=null;class SystemZone extends Zone{static get instance(){return null===F&&(F=new SystemZone),F}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return parseZoneInfo(e,t,r)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let U={};const L={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let V={};class IANAZone extends Zone{static create(e){return V[e]||(V[e]=new IANAZone(e)),V[e]}static resetCache(){V={},U={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=IANAZone.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return parseZoneInfo(e,t,r,this.name)}formatOffset(e,t){return formatOffset(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const r=function makeDTF(e){return U[e]||(U[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),U[e]}(this.name);let[i,n,s,o,a,c,u]=r.formatToParts?function partsOffset(e,t){const r=e.formatToParts(t),i=[];for(let e=0;e<r.length;e++){const{type:t,value:n}=r[e],s=L[t];"era"===t?i[s]=n:isUndefined(s)||(i[s]=parseInt(n,10))}return i}(r,t):function hackyOffset(e,t){const r=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,n,s,o,a,c,u,p]=i;return[o,n,s,a,c,u,p]}(r,t);"BC"===o&&(i=1-Math.abs(i));let p=+t;const l=p%1e3;return p-=l>=0?l:1e3+l,(objToLocalTS({year:i,month:n,day:s,hour:24===a?0:a,minute:c,second:u,millisecond:0})-p)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let B=null;class FixedOffsetZone extends Zone{static get utcInstance(){return null===B&&(B=new FixedOffsetZone(0)),B}static instance(e){return 0===e?FixedOffsetZone.utcInstance:new FixedOffsetZone(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new FixedOffsetZone(signedOffset(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${formatOffset(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${formatOffset(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return formatOffset(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class InvalidZone extends Zone{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function normalizeZone(e,t){if(isUndefined(e)||null===e)return t;if(e instanceof Zone)return e;if(function isString(e){return"string"==typeof e}(e)){const r=e.toLowerCase();return"default"===r?t:"local"===r||"system"===r?SystemZone.instance:"utc"===r||"gmt"===r?FixedOffsetZone.utcInstance:FixedOffsetZone.parseSpecifier(r)||IANAZone.create(e)}return isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}let z,now=()=>Date.now(),G="system",H=null,Q=null,Z=null;class Settings{static get now(){return now}static set now(e){now=e}static set defaultZone(e){G=e}static get defaultZone(){return normalizeZone(G,SystemZone.instance)}static get defaultLocale(){return H}static set defaultLocale(e){H=e}static get defaultNumberingSystem(){return Q}static set defaultNumberingSystem(e){Q=e}static get defaultOutputCalendar(){return Z}static set defaultOutputCalendar(e){Z=e}static get throwOnInvalid(){return z}static set throwOnInvalid(e){z=e}static resetCaches(){Locale.resetCache(),IANAZone.resetCache()}}let K={};let W={};function getCachedDTF(e,t={}){const r=JSON.stringify([e,t]);let i=W[r];return i||(i=new Intl.DateTimeFormat(e,t),W[r]=i),i}let Y={};let X={};let ee=null;function listStuff(e,t,r,i,n){const s=e.listingMode(r);return"error"===s?null:"en"===s?i(t):n(t)}class PolyNumberFormatter{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:n,...s}=r;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function getCachedINF(e,t={}){const r=JSON.stringify([e,t]);let i=Y[r];return i||(i=new Intl.NumberFormat(e,t),Y[r]=i),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)}}class PolyDateFormatter{constructor(e,t,r){let i;if(this.opts=r,e.zone.isUniversal){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&IANAZone.create(n).valid?(i=n,this.dt=e):(i="UTC",r.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);const n={...this.opts};i&&(n.timeZone=i),this.dtf=getCachedDTF(t,n)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class PolyRelFormatter{constructor(e,t,r){this.opts={style:"long",...r},!t&&hasRelative()&&(this.rtf=function getCachedRTF(e,t={}){const{base:r,...i}=t,n=JSON.stringify([e,i]);let s=X[n];return s||(s=new Intl.RelativeTimeFormat(e,t),X[n]=s),s}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function formatRelativeTime(e,t,r="always",i=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&s){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${n[e][0]}`;case-1:return r?"yesterday":`last ${n[e][0]}`;case 0:return r?"today":`this ${n[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),c=1===a,u=n[e],p=i?c?u[1]:u[2]||u[1]:c?n[e][0]:e;return o?`${a} ${p} ago`:`in ${a} ${p}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Locale{static fromOpts(e){return Locale.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,r,i=!1){const n=e||Settings.defaultLocale,s=n||(i?"en-US":function systemLocale(){return ee||(ee=(new Intl.DateTimeFormat).resolvedOptions().locale,ee)}()),o=t||Settings.defaultNumberingSystem,a=r||Settings.defaultOutputCalendar;return new Locale(s,o,a,n)}static resetCache(){ee=null,W={},Y={},X={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:r}={}){return Locale.create(e,t,r)}constructor(e,t,r,i){const[n,s,o]=function parseLocaleString(e){const t=e.indexOf("-u-");if(-1===t)return[e];{let r;const i=e.substring(0,t);try{r=getCachedDTF(e).resolvedOptions()}catch(e){r=getCachedDTF(i).resolvedOptions()}const{numberingSystem:n,calendar:s}=r;return[i,n,s]}}(e);this.locale=n,this.numberingSystem=t||s||null,this.outputCalendar=r||o||null,this.intl=function intlConfigString(e,t,r){return r||t?(e+="-u",r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return null==this.fastNumbersCached&&(this.fastNumbersCached=function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Locale.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,r=!0){return listStuff(this,e,r,months,(()=>{const r=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=function mapMonths(e){const t=[];for(let r=1;r<=12;r++){const i=DateTime.utc(2016,r,1);t.push(e(i))}return t}((e=>this.extract(e,r,"month")))),this.monthsCache[i][e]}))}weekdays(e,t=!1,r=!0){return listStuff(this,e,r,weekdays,(()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function mapWeekdays(e){const t=[];for(let r=1;r<=7;r++){const i=DateTime.utc(2016,11,13+r);t.push(e(i))}return t}((e=>this.extract(e,r,"weekday")))),this.weekdaysCache[i][e]}))}meridiems(e=!0){return listStuff(this,void 0,e,(()=>E),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e,t=!0){return listStuff(this,e,t,eras,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,r){const i=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===r));return i?i.value:null}numberFormatter(e={}){return new PolyNumberFormatter(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new PolyDateFormatter(e,this.intl,t)}relFormatter(e={}){return new PolyRelFormatter(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function getCachedLF(e,t={}){const r=JSON.stringify([e,t]);let i=K[r];return i||(i=new Intl.ListFormat(e,t),K[r]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function combineRegexes(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function combineExtractors(...e){return t=>e.reduce((([e,r,i],n)=>{const[s,o,a]=n(t,i);return[{...e,...s},o||r,a]}),[{},null,1]).slice(0,2)}function parse(e,...t){if(null==e)return[null,null];for(const[r,i]of t){const t=r.exec(e);if(t)return i(t)}return[null,null]}function simpleParse(...e){return(t,r)=>{const i={};let n;for(n=0;n<e.length;n++)i[e[n]]=parseInteger(t[r+n]);return[i,null,r+n]}}const te=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,re=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ie=RegExp(`${re.source}${`(?:${te.source}?(?:\\[(${j.source})\\])?)?`}`),ne=RegExp(`(?:T${ie.source})?`),se=simpleParse("weekYear","weekNumber","weekDay"),oe=simpleParse("year","ordinal"),ae=RegExp(`${re.source} ?(?:${te.source}|(${j.source}))?`),ce=RegExp(`(?: ${ae.source})?`);function int(e,t,r){const i=e[t];return isUndefined(i)?r:parseInteger(i)}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){const r=!e[t]&&!e[t+1],i=signedOffset(e[t+1],e[t+2]);return[{},r?null:FixedOffsetZone.instance(i),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}const ue=RegExp(`^T?${re.source}$`),pe=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function extractISODuration(e){const[t,r,i,n,s,o,a,c,u]=e,p="-"===t[0],l=c&&"-"===c[0],maybeNegate=(e,t=!1)=>void 0!==e&&(t||e&&p)?-e:e;return[{years:maybeNegate(parseFloating(r)),months:maybeNegate(parseFloating(i)),weeks:maybeNegate(parseFloating(n)),days:maybeNegate(parseFloating(s)),hours:maybeNegate(parseFloating(o)),minutes:maybeNegate(parseFloating(a)),seconds:maybeNegate(parseFloating(c),"-0"===c),milliseconds:maybeNegate(parseMillis(u),l)}]}const le={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,r,i,n,s,o){const a={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:T.indexOf(r)+1,day:parseInteger(i),hour:parseInteger(n),minute:parseInteger(s)};return o&&(a.second=parseInteger(o)),e&&(a.weekday=e.length>3?q.indexOf(e)+1:N.indexOf(e)+1),a}const de=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){const[,t,r,i,n,s,o,a,c,u,p,l]=e,d=fromStrings(t,n,i,r,s,o,a);let f;return f=c?le[c]:u?0:signedOffset(p,l),[d,new FixedOffsetZone(f)]}const fe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ye=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,he=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){const[,t,r,i,n,s,o,a]=e;return[fromStrings(t,n,i,r,s,o,a),FixedOffsetZone.utcInstance]}function extractASCII(e){const[,t,r,i,n,s,o,a]=e;return[fromStrings(t,a,r,i,n,s,o),FixedOffsetZone.utcInstance]}const me=combineRegexes(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ne),ge=combineRegexes(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ne),ve=combineRegexes(/(\d{4})-?(\d{3})/,ne),be=combineRegexes(ie),Re=combineExtractors((function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}),extractISOTime,extractISOOffset,extractIANAZone),Oe=combineExtractors(se,extractISOTime,extractISOOffset,extractIANAZone),Se=combineExtractors(oe,extractISOTime,extractISOOffset,extractIANAZone),Ce=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);const we=combineExtractors(extractISOTime);const _e=combineRegexes(/(\d{4})-(\d\d)-(\d\d)/,ce),Ie=combineRegexes(ae),Pe=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);const je={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},$e={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...je},Te=365.2425,Ae=30.436875,qe={years:{quarters:4,months:12,weeks:52.1775,days:Te,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Ae,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...je},Ne=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xe=Ne.slice(0).reverse();function clone$1(e,t,r=!1){const i={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Duration(i)}function convert(e,t,r,i,n){const s=e[n][r],o=t[r]/s,a=!(Math.sign(o)===Math.sign(i[n]))&&0!==i[n]&&Math.abs(o)<=1?function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);i[n]+=a,t[r]-=a*s}class Duration{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let r=t?qe:$e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return Duration.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Duration({values:normalizeObject(e,Duration.normalizeUnit),loc:Locale.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function parseISODuration(e){return parse(e,[pe,extractISODuration])}(e);return r?Duration.fromObject(r,t):Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function parseISOTimeOnly(e){return parse(e,[ue,we])}(e);return r?Duration.fromObject(r,t):Duration.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(r);return new Duration({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new InvalidUnitError(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Formatter.create(this.loc,r).formatDurationFromString(this,e):"Invalid Duration"}toHuman(e={}){const t=Ne.map((t=>{const r=this.values[t];return isUndefined(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(i+=".SSS"));let n=r.toFormat(i);return e.includePrefix&&(n="T"+n),n}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e),r={};for(const e of Ne)(hasOwnProperty(t.values,e)||hasOwnProperty(this.values,e))&&(r[e]=t.get(e)+this.get(e));return clone$1(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=Duration.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=asNumber(e(this.values[r],r));return clone$1(this,{values:t},!0)}get(e){return this[Duration.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return clone$1(this,{values:{...this.values,...normalizeObject(e,Duration.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:i}={}){return clone$1(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:r})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return function normalizeValues(e,t){xe.reduce(((r,i)=>isUndefined(t[i])?r:(r&&convert(e,t,r,t,i),i)),null)}(this.matrix,e),clone$1(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return clone$1(this,{values:function removeZeroes(e){const t={};for(const[r,i]of Object.entries(e))0!==i&&(t[r]=i);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Duration.normalizeUnit(e)));const t={},r={},i=this.toObject();let n;for(const s of Ne)if(e.indexOf(s)>=0){n=s;let e=0;for(const t in r)e+=this.matrix[t][s]*r[t],r[t]=0;isNumber(i[s])&&(e+=i[s]);const o=Math.trunc(e);t[s]=o,r[s]=(1e3*e-1e3*o)/1e3;for(const e in i)Ne.indexOf(e)>Ne.indexOf(s)&&convert(this.matrix,i,e,t,s)}else isNumber(i[s])&&(r[s]=i[s]);for(const e in r)0!==r[e]&&(t[n]+=e===n?r[e]:r[e]/this.matrix[n][e]);return clone$1(this,{values:t},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return clone$1(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const i of Ne)if(t=this.values[i],r=e.values[i],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1;var t,r;return!0}}const Ee="Invalid Interval";class Interval{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(r);return new Interval({invalid:r})}static fromDateTimes(e,t){const r=friendlyDateTime(e),i=friendlyDateTime(t),n=function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}(r,i);return null==n?new Interval({start:r,end:i}):n}static after(e,t){const r=Duration.fromDurationLike(t),i=friendlyDateTime(e);return Interval.fromDateTimes(i,i.plus(r))}static before(e,t){const r=Duration.fromDurationLike(t),i=friendlyDateTime(e);return Interval.fromDateTimes(i.minus(r),i)}static fromISO(e,t){const[r,i]=(e||"").split("/",2);if(r&&i){let e,n,s,o;try{e=DateTime.fromISO(r,t),n=e.isValid}catch(i){n=!1}try{s=DateTime.fromISO(i,t),o=s.isValid}catch(i){o=!1}if(n&&o)return Interval.fromDateTimes(e,s);if(n){const r=Duration.fromISO(i,t);if(r.isValid)return Interval.after(e,r)}else if(o){const e=Duration.fromISO(r,t);if(e.isValid)return Interval.before(s,e)}}return Interval.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),r=this.end.startOf(e);return Math.floor(r.diff(t,e).get(e))+1}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Interval.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(friendlyDateTime).filter((e=>this.contains(e))).sort(),r=[];let{s:i}=this,n=0;for(;i<this.e;){const e=t[n]||this.e,s=+e>+this.e?this.e:e;r.push(Interval.fromDateTimes(i,s)),i=s,n+=1}return r}splitBy(e){const t=Duration.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:i}=this,n=1;const s=[];for(;i<this.e;){const e=this.start.plus(t.mapUnits((e=>e*n)));r=+e>+this.e?this.e:e,s.push(Interval.fromDateTimes(i,r)),i=r,n+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:Interval.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return Interval.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r]),[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const i=[],n=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...n).sort(((e,t)=>e.time-t.time));for(const e of s)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!=+e.time&&i.push(Interval.fromDateTimes(t,e.time)),t=null);return Interval.merge(i)}difference(...e){return Interval.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ee}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ee}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ee}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ee}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ee}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)}mapEndpoints(e){return Interval.fromDateTimes(e(this.s),e(this.e))}}class Info{static hasDST(e=Settings.defaultZone){const t=DateTime.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return IANAZone.isValidZone(e)}static normalizeZone(e){return normalizeZone(e,Settings.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Locale.create(t,r,n)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:n="gregory"}={}){return(i||Locale.create(t,r,n)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Locale.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Locale.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Locale.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Locale.create(t,null,"gregory").eras(e)}static features(){return{relative:hasRelative()}}}function dayDiff(e,t){const utcDayStart=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=utcDayStart(t)-utcDayStart(e);return Math.floor(Duration.fromMillis(r).as("days"))}function diff(e,t,r,i){let[n,s,o,a]=function highOrderDiffs(e,t,r){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=dayDiff(e,t);return(r-r%7)/7}],["days",dayDiff]],n={};let s,o;for(const[a,c]of i)if(r.indexOf(a)>=0){s=a;let r=c(e,t);o=e.plus({[a]:r}),o>t?(e=e.plus({[a]:r-1}),r-=1):e=o,n[a]=r}return[e,n,o,s]}(e,t,r);const c=t-n,u=r.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(o<t&&(o=n.plus({[a]:1})),o!==n&&(s[a]=(s[a]||0)+c/(o-n)));const p=Duration.fromObject(s,i);return u.length>0?Duration.fromMillis(c,i).shiftTo(...u).plus(p):p}const De={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Me={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ke=De.hanidec.replace(/[\[|\]]/g,"").split("");function digitRegex({numberingSystem:e},t=""){return new RegExp(`${De[e||"latn"]}${t}`)}function intUnit(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function parseDigits(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(-1!==e[r].search(De.hanidec))t+=ke.indexOf(e[r]);else for(const e in Me){const[r,n]=Me[e];i>=r&&i<=n&&(t+=i-r)}}return parseInt(t,10)}return t}(e))}}const Je=`[ ${String.fromCharCode(160)}]`,Fe=new RegExp(Je,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(Fe,Je)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(Fe," ").toLowerCase()}function oneOf(e,t){return null===e?null:{regex:RegExp(e.map(fixListRegex).join("|")),deser:([r])=>e.findIndex((e=>stripInsensitivities(r)===stripInsensitivities(e)))+t}}function offset(e,t){return{regex:e,deser:([,e,t])=>signedOffset(e,t),groups:t}}function simple(e){return{regex:e,deser:([e])=>e}}const Ue={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Le=null;function expandMacroTokens(e,t){return Array.prototype.concat(...e.map((e=>function maybeExpandMacroToken(e,t){if(e.literal)return e;const r=formatOptsToTokens(Formatter.macroTokenToFormatOpts(e.val),t);return null==r||r.includes(void 0)?e:r}(e,t))))}function explainFromTokens(e,t,r){const i=expandMacroTokens(Formatter.parseFormat(r),e),n=i.map((t=>function unitForToken(e,t){const r=digitRegex(t),i=digitRegex(t,"{2}"),n=digitRegex(t,"{3}"),s=digitRegex(t,"{4}"),o=digitRegex(t,"{6}"),a=digitRegex(t,"{1,2}"),c=digitRegex(t,"{1,3}"),u=digitRegex(t,"{1,6}"),p=digitRegex(t,"{1,9}"),l=digitRegex(t,"{2,4}"),d=digitRegex(t,"{4,6}"),literal=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return literal(f);switch(f.val){case"G":return oneOf(t.eras("short",!1),0);case"GG":return oneOf(t.eras("long",!1),0);case"y":return intUnit(u);case"yy":case"kk":return intUnit(l,untruncateYear);case"yyyy":case"kkkk":return intUnit(s);case"yyyyy":return intUnit(d);case"yyyyyy":return intUnit(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return intUnit(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return intUnit(i);case"MMM":return oneOf(t.months("short",!0,!1),1);case"MMMM":return oneOf(t.months("long",!0,!1),1);case"LLL":return oneOf(t.months("short",!1,!1),1);case"LLLL":return oneOf(t.months("long",!1,!1),1);case"o":case"S":return intUnit(c);case"ooo":case"SSS":return intUnit(n);case"u":return simple(p);case"uu":return simple(a);case"uuu":case"E":case"c":return intUnit(r);case"a":return oneOf(t.meridiems(),0);case"EEE":return oneOf(t.weekdays("short",!1,!1),1);case"EEEE":return oneOf(t.weekdays("long",!1,!1),1);case"ccc":return oneOf(t.weekdays("short",!0,!1),1);case"cccc":return oneOf(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return offset(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return literal(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),s=n.find((e=>e.invalidReason));if(s)return{input:t,tokens:i,invalidReason:s.invalidReason};{const[e,r]=function buildRegex(e){return[`^${e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,e]}(n),s=RegExp(e,"i"),[o,a]=function match(e,t,r){const i=e.match(t);if(i){const e={};let t=1;for(const n in r)if(hasOwnProperty(r,n)){const s=r[n],o=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(i.slice(t,t+o))),t+=o}return[i,e]}return[i,{}]}(t,s,r),[c,u,p]=a?function dateTimeFromMatches(e){let t,r=null;return isUndefined(e.z)||(r=IANAZone.create(e.z)),isUndefined(e.Z)||(r||(r=new FixedOffsetZone(e.Z)),t=e.Z),isUndefined(e.q)||(e.M=3*(e.q-1)+1),isUndefined(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),isUndefined(e.u)||(e.S=parseMillis(e.u)),[Object.keys(e).reduce(((t,r)=>{const i=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return i&&(t[i]=e[r]),t}),{}),r,t]}(a):[null,null,void 0];if(hasOwnProperty(a,"a")&&hasOwnProperty(a,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:s,rawMatches:o,matches:a,result:c,zone:u,specificOffset:p}}}function formatOptsToTokens(e,t){if(!e)return null;return Formatter.create(t,e).formatDateTimeParts(function getDummyDateTime(){return Le||(Le=DateTime.fromMillis(1555555555555)),Le}()).map((t=>function tokenForPart(e,t,r){const{type:i,value:n}=e;if("literal"===i)return{literal:!0,val:n};const s=r[i];let o=Ue[i];return"object"==typeof o&&(o=o[s]),o?{literal:!1,val:o}:void 0}(t,0,e)))}const Ve=[0,31,59,90,120,151,181,212,243,273,304,334],Be=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function dayOfWeek(e,t,r){const i=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const n=i.getUTCDay();return 0===n?7:n}function computeOrdinal(e,t,r){return r+(isLeapYear(e)?Be:Ve)[t-1]}function uncomputeOrdinal(e,t){const r=isLeapYear(e)?Be:Ve,i=r.findIndex((e=>e<t));return{month:i+1,day:t-r[i]}}function gregorianToWeek(e){const{year:t,month:r,day:i}=e,n=computeOrdinal(t,r,i),s=dayOfWeek(t,r,i);let o,a=Math.floor((n-s+10)/7);return a<1?(o=t-1,a=weeksInWeekYear(o)):a>weeksInWeekYear(t)?(o=t+1,a=1):o=t,{weekYear:o,weekNumber:a,weekday:s,...timeObject(e)}}function weekToGregorian(e){const{weekYear:t,weekNumber:r,weekday:i}=e,n=dayOfWeek(t,1,4),s=daysInYear(t);let o,a=7*r+i-n-3;a<1?(o=t-1,a+=daysInYear(o)):a>s?(o=t+1,a-=daysInYear(t)):o=t;const{month:c,day:u}=uncomputeOrdinal(o,a);return{year:o,month:c,day:u,...timeObject(e)}}function gregorianToOrdinal(e){const{year:t,month:r,day:i}=e;return{year:t,ordinal:computeOrdinal(t,r,i),...timeObject(e)}}function ordinalToGregorian(e){const{year:t,ordinal:r}=e,{month:i,day:n}=uncomputeOrdinal(t,r);return{year:t,month:i,day:n,...timeObject(e)}}function hasInvalidGregorianData(e){const t=isInteger(e.year),r=integerBetween(e.month,1,12),i=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?r?!i&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){const{hour:t,minute:r,second:i,millisecond:n}=e,s=integerBetween(t,0,23)||24===t&&0===r&&0===i&&0===n,o=integerBetween(r,0,59),a=integerBetween(i,0,59),c=integerBetween(n,0,999);return s?o?a?!c&&unitOutOfRange("millisecond",n):unitOutOfRange("second",i):unitOutOfRange("minute",r):unitOutOfRange("hour",t)}const ze="Invalid DateTime",Ge=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",`the zone "${e.name}" is not supported`)}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime({...r,...t,old:r})}function fixOffset(e,t,r){let i=e-60*t*1e3;const n=r.offset(i);if(t===n)return[i,t];i-=60*(n-t)*1e3;const s=r.offset(i);return n===s?[i,n]:[e-60*Math.min(n,s)*1e3,Math.max(n,s)]}function tsToObj(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function objToTS(e,t,r){return fixOffset(objToLocalTS(e),t,r)}function adjustTime(e,t){const r=e.o,i=e.c.year+Math.trunc(t.years),n=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:i,month:n,day:Math.min(e.c.day,daysInMonth(i,n))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=objToLocalTS(s);let[c,u]=fixOffset(a,r,e.zone);return 0!==o&&(c+=o,u=e.zone.offset(c)),{ts:c,o:u}}function parseDataToDateTime(e,t,r,i,n,s){const{setZone:o,zone:a}=r;if(e&&0!==Object.keys(e).length){const i=t||a,n=DateTime.fromObject(e,{...r,zone:i,specificOffset:s});return o?n:n.setZone(a)}return DateTime.invalid(new Invalid("unparsable",`the input "${n}" can't be parsed as ${i}`))}function toTechFormat(e,t,r=!0){return e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toISODate(e,t){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=padStart(e.c.year,r?6:4),t?(i+="-",i+=padStart(e.c.month),i+="-",i+=padStart(e.c.day)):(i+=padStart(e.c.month),i+=padStart(e.c.day)),i}function toISOTime(e,t,r,i,n,s){let o=padStart(e.c.hour);return t?(o+=":",o+=padStart(e.c.minute),0===e.c.second&&r||(o+=":")):o+=padStart(e.c.minute),0===e.c.second&&r||(o+=padStart(e.c.second),0===e.c.millisecond&&i||(o+=".",o+=padStart(e.c.millisecond,3))),n&&(e.isOffsetFixed&&0===e.offset&&!s?o+="Z":e.o<0?(o+="-",o+=padStart(Math.trunc(-e.o/60)),o+=":",o+=padStart(Math.trunc(-e.o%60))):(o+="+",o+=padStart(Math.trunc(e.o/60)),o+=":",o+=padStart(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const He={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Qe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Ze={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ke=["year","month","day","hour","minute","second","millisecond"],We=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ye=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new InvalidUnitError(e);return t}function quickDT(e,t){const r=normalizeZone(t.zone,Settings.defaultZone),i=Locale.fromObject(t),n=Settings.now();let s,o;if(isUndefined(e.year))s=n;else{for(const t of Ke)isUndefined(e[t])&&(e[t]=He[t]);const t=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(t)return DateTime.invalid(t);const i=r.offset(n);[s,o]=objToTS(e,i,r)}return new DateTime({ts:s,zone:r,loc:i,o})}function diffRelative(e,t,r){const i=!!isUndefined(r.round)||r.round,format=(e,n)=>{e=roundTo(e,i||r.calendary?0:2,!0);return t.loc.clone(r).relFormatter(r).format(e,n)},differ=i=>r.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(r.unit)return format(differ(r.unit),r.unit);for(const e of r.units){const t=differ(e);if(Math.abs(t)>=1)return format(t,e)}return format(e>t?-0:0,r.units[r.units.length-1])}function lastOpts(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}class DateTime{constructor(e){const t=e.zone||Settings.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(t.isValid?null:unsupportedZone(t));this.ts=isUndefined(e.ts)?Settings.now():e.ts;let i=null,n=null;if(!r){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,n]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);i=tsToObj(this.ts,e),r=Number.isNaN(i.year)?new Invalid("invalid input"):null,i=r?null:i,n=r?null:e}}this._zone=t,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}static now(){return new DateTime({})}static local(){const[e,t]=lastOpts(arguments),[r,i,n,s,o,a,c]=t;return quickDT({year:r,month:i,day:n,hour:s,minute:o,second:a,millisecond:c},e)}static utc(){const[e,t]=lastOpts(arguments),[r,i,n,s,o,a,c]=t;return e.zone=FixedOffsetZone.utcInstance,quickDT({year:r,month:i,day:n,hour:s,minute:o,second:a,millisecond:c},e)}static fromJSDate(e,t={}){const r=function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?e.valueOf():NaN;if(Number.isNaN(r))return DateTime.invalid("invalid input");const i=normalizeZone(t.zone,Settings.defaultZone);return i.isValid?new DateTime({ts:r,zone:i,loc:Locale.fromObject(t)}):DateTime.invalid(unsupportedZone(i))}static fromMillis(e,t={}){if(isNumber(e))return e<-Ge||e>Ge?DateTime.invalid("Timestamp out of range"):new DateTime({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(isNumber(e))return new DateTime({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=normalizeZone(t.zone,Settings.defaultZone);if(!r.isValid)return DateTime.invalid(unsupportedZone(r));const i=Settings.now(),n=isUndefined(t.specificOffset)?r.offset(i):t.specificOffset,s=normalizeObject(e,normalizeUnit),o=!isUndefined(s.ordinal),a=!isUndefined(s.year),c=!isUndefined(s.month)||!isUndefined(s.day),u=a||c,p=s.weekYear||s.weekNumber,l=Locale.fromObject(t);if((u||o)&&p)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");const d=p||s.weekday&&!u;let f,y,h=tsToObj(i,n);d?(f=We,y=Qe,h=gregorianToWeek(h)):o?(f=Ye,y=Ze,h=gregorianToOrdinal(h)):(f=Ke,y=He);let m=!1;for(const e of f){isUndefined(s[e])?s[e]=m?y[e]:h[e]:m=!0}const g=d?function hasInvalidWeekData(e){const t=isInteger(e.weekYear),r=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),i=integerBetween(e.weekday,1,7);return t?r?!i&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}(s):o?function hasInvalidOrdinalData(e){const t=isInteger(e.year),r=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!r&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}(s):hasInvalidGregorianData(s),v=g||hasInvalidTimeData(s);if(v)return DateTime.invalid(v);const b=d?weekToGregorian(s):o?ordinalToGregorian(s):s,[R,O]=objToTS(b,n,r),S=new DateTime({ts:R,zone:r,o:O,loc:l});return s.weekday&&u&&e.weekday!==S.weekday?DateTime.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${S.toISO()}`):S}static fromISO(e,t={}){const[r,i]=function parseISODate(e){return parse(e,[me,Re],[ge,Oe],[ve,Se],[be,Ce])}(e);return parseDataToDateTime(r,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,i]=function parseRFC2822Date(e){return parse(function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[de,extractRFC2822])}(e);return parseDataToDateTime(r,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,i]=function parseHTTPDate(e){return parse(e,[fe,extractRFC1123Or850],[ye,extractRFC1123Or850],[he,extractASCII])}(e);return parseDataToDateTime(r,i,t,"HTTP",t)}static fromFormat(e,t,r={}){if(isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:n=null}=r,s=Locale.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),[o,a,c,u]=function parseFromTokens(e,t,r){const{result:i,zone:n,specificOffset:s,invalidReason:o}=explainFromTokens(e,t,r);return[i,n,s,o]}(s,e,t);return u?DateTime.invalid(u):parseDataToDateTime(o,a,r,`format ${t}`,e,c)}static fromString(e,t,r={}){return DateTime.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,i]=function parseSQL(e){return parse(e,[_e,Re],[Ie,Pe])}(e);return parseDataToDateTime(r,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");const r=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(r);return new DateTime({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=formatOptsToTokens(e,Locale.fromObject(t));return r?r.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return expandMacroTokens(Formatter.parseFormat(e),Locale.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}get weekNumber(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}get weekday(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}get ordinal(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}get monthShort(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return isLeapYear(this.year)}get daysInMonth(){return daysInMonth(this.year,this.month)}get daysInYear(){return this.isValid?daysInYear(this.year):NaN}get weeksInWeekYear(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:i}=Formatter.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(FixedOffsetZone.instance(e),t)}toLocal(){return this.setZone(Settings.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=normalizeZone(e,Settings.defaultZone)).equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[i]=objToTS(r,t,e)}return clone(this,{ts:i,zone:e})}return DateTime.invalid(unsupportedZone(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return clone(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=normalizeObject(e,normalizeUnit),r=!isUndefined(t.weekYear)||!isUndefined(t.weekNumber)||!isUndefined(t.weekday),i=!isUndefined(t.ordinal),n=!isUndefined(t.year),s=!isUndefined(t.month)||!isUndefined(t.day),o=n||s,a=t.weekYear||t.weekNumber;if((o||i)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");let c;r?c=weekToGregorian({...gregorianToWeek(this.c),...t}):isUndefined(t.ordinal)?(c={...this.toObject(),...t},isUndefined(t.day)&&(c.day=Math.min(daysInMonth(c.year,c.month),c.day))):c=ordinalToGregorian({...gregorianToOrdinal(this.c),...t});const[u,p]=objToTS(c,this.o,this.zone);return clone(this,{ts:u,o:p})}plus(e){if(!this.isValid)return this;return clone(this,adjustTime(this,Duration.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return clone(this,adjustTime(this,Duration.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},r=Duration.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===r&&(t.weekday=1),"quarters"===r){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ze}toLocaleString(e=s,t={}){return this.isValid?Formatter.create(this.loc.clone(t),e).formatDateTime(this):ze}toLocaleParts(e={}){return this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:n=!1}={}){if(!this.isValid)return null;const s="extended"===e;let o=toISODate(this,s);return o+="T",o+=toISOTime(this,s,t,r,i,n),o}toISODate({format:e="extended"}={}){return this.isValid?toISODate(this,"extended"===e):null}toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:n=!1,format:s="extended"}={}){if(!this.isValid)return null;return(i?"T":"")+toISOTime(this,"extended"===s,t,e,r,n)}toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?toISODate(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(r&&(i+=" "),t?i+="z":e&&(i+="ZZ")),toTechFormat(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ze}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return Duration.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},n=function maybeArray(e){return Array.isArray(e)?e:[e]}(t).map(Duration.normalizeUnit),s=e.valueOf()>this.valueOf(),o=diff(s?this:e,s?e:this,n,i);return s?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(DateTime.now(),e,t)}until(e){return this.isValid?Interval.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=r&&r<=i.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||DateTime.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(i=e.unit,n=void 0),diffRelative(t,this.plus(r),{...e,numeric:"always",units:i,unit:n})}toRelativeCalendar(e={}){return this.isValid?diffRelative(e.base||DateTime.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError("min requires all arguments be DateTimes");return bestBy(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(DateTime.isDateTime))throw new InvalidArgumentError("max requires all arguments be DateTimes");return bestBy(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:i=null,numberingSystem:n=null}=r;return explainFromTokens(Locale.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return DateTime.fromFormatExplain(e,t,r)}static get DATE_SHORT(){return s}static get DATE_MED(){return o}static get DATE_MED_WITH_WEEKDAY(){return a}static get DATE_FULL(){return c}static get DATE_HUGE(){return u}static get TIME_SIMPLE(){return p}static get TIME_WITH_SECONDS(){return l}static get TIME_WITH_SHORT_OFFSET(){return d}static get TIME_WITH_LONG_OFFSET(){return f}static get TIME_24_SIMPLE(){return y}static get TIME_24_WITH_SECONDS(){return h}static get TIME_24_WITH_SHORT_OFFSET(){return m}static get TIME_24_WITH_LONG_OFFSET(){return g}static get DATETIME_SHORT(){return v}static get DATETIME_SHORT_WITH_SECONDS(){return b}static get DATETIME_MED(){return R}static get DATETIME_MED_WITH_SECONDS(){return O}static get DATETIME_MED_WITH_WEEKDAY(){return S}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return w}static get DATETIME_HUGE(){return I}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=DateTime,t.Duration=Duration,t.FixedOffsetZone=FixedOffsetZone,t.IANAZone=IANAZone,t.Info=Info,t.Interval=Interval,t.InvalidZone=InvalidZone,t.Settings=Settings,t.SystemZone=SystemZone,t.VERSION="3.1.0",t.Zone=Zone},2592:(e,t,r)=>{const i=r(7138),n=r(5115),s=r(6907),o=r(3776);function renderCanvas(e,t,r,s,o){const a=[].slice.call(arguments,1),c=a.length,u="function"==typeof a[c-1];if(!u&&!i())throw new Error("Callback required as last argument");if(!u){if(c<1)throw new Error("Too few arguments provided");return 1===c?(r=t,t=s=void 0):2!==c||t.getContext||(s=r,r=t,t=void 0),new Promise((function(i,o){try{const o=n.create(r,s);i(e(o,t,s))}catch(e){o(e)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(o=r,r=t,t=s=void 0):3===c&&(t.getContext&&void 0===o?(o=s,s=void 0):(o=s,s=r,r=t,t=void 0));try{const i=n.create(r,s);o(null,e(i,t,s))}catch(e){o(e)}}t.create=n.create,t.toCanvas=renderCanvas.bind(null,s.render),t.toDataURL=renderCanvas.bind(null,s.renderToDataURL),t.toString=renderCanvas.bind(null,(function(e,t,r){return o.render(e,r)}))},7138:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},1845:(e,t,r)=>{const i=r(242).getSymbolSize;t.getRowColCoords=function getRowColCoords(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=i(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),s=[r-7];for(let e=1;e<t-1;e++)s[e]=s[e-1]-n;return s.push(6),s.reverse()},t.getPositions=function getPositions(e){const r=[],i=t.getRowColCoords(e),n=i.length;for(let e=0;e<n;e++)for(let t=0;t<n;t++)0===e&&0===t||0===e&&t===n-1||e===n-1&&0===t||r.push([i[e],i[t]]);return r}},8260:(e,t,r)=>{const i=r(6910),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function AlphanumericData(e){this.mode=i.ALPHANUMERIC,this.data=e}AlphanumericData.getBitsLength=function getBitsLength(e){return 11*Math.floor(e/2)+e%2*6},AlphanumericData.prototype.getLength=function getLength(){return this.data.length},AlphanumericData.prototype.getBitsLength=function getBitsLength(){return AlphanumericData.getBitsLength(this.data.length)},AlphanumericData.prototype.write=function write(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*n.indexOf(this.data[t]);r+=n.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(n.indexOf(this.data[t]),6)},e.exports=AlphanumericData},7245:e=>{function BitBuffer(){this.buffer=[],this.length=0}BitBuffer.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=BitBuffer},3280:e=>{function BitMatrix(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}BitMatrix.prototype.set=function(e,t,r,i){const n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},BitMatrix.prototype.get=function(e,t){return this.data[e*this.size+t]},BitMatrix.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},BitMatrix.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=BitMatrix},3424:(e,t,r)=>{const i=r(2378),n=r(6910);function ByteData(e){this.mode=n.BYTE,"string"==typeof e&&(e=i(e)),this.data=new Uint8Array(e)}ByteData.getBitsLength=function getBitsLength(e){return 8*e},ByteData.prototype.getLength=function getLength(){return this.data.length},ByteData.prototype.getBitsLength=function getBitsLength(){return ByteData.getBitsLength(this.data.length)},ByteData.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=ByteData},5393:(e,t,r)=>{const i=r(4908),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function getBlocksCount(e,t){switch(t){case i.L:return n[4*(e-1)+0];case i.M:return n[4*(e-1)+1];case i.Q:return n[4*(e-1)+2];case i.H:return n[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function getTotalCodewordsCount(e,t){switch(t){case i.L:return s[4*(e-1)+0];case i.M:return s[4*(e-1)+1];case i.Q:return s[4*(e-1)+2];case i.H:return s[4*(e-1)+3];default:return}}},4908:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function isValid(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},6526:(e,t,r)=>{const i=r(242).getSymbolSize;t.getPositions=function getPositions(e){const t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},1642:(e,t,r)=>{const i=r(242),n=i.getBCHDigit(1335);t.getEncodedBits=function getEncodedBits(e,t){const r=e.bit<<3|t;let s=r<<10;for(;i.getBCHDigit(s)-n>=0;)s^=1335<<i.getBCHDigit(s)-n;return 21522^(r<<10|s)}},2577:(e,t)=>{const r=new Uint8Array(512),i=new Uint8Array(256);!function initTables(){let e=1;for(let t=0;t<255;t++)r[t]=e,i[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]}(),t.log=function log(e){if(e<1)throw new Error("log("+e+")");return i[e]},t.exp=function exp(e){return r[e]},t.mul=function mul(e,t){return 0===e||0===t?0:r[i[e]+i[t]]}},5442:(e,t,r)=>{const i=r(6910),n=r(242);function KanjiData(e){this.mode=i.KANJI,this.data=e}KanjiData.getBitsLength=function getBitsLength(e){return 13*e},KanjiData.prototype.getLength=function getLength(){return this.data.length},KanjiData.prototype.getBitsLength=function getBitsLength(){return KanjiData.getBitsLength(this.data.length)},KanjiData.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=n.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},e.exports=KanjiData},7126:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const r=3,i=3,n=40,s=10;function getMaskAt(e,r,i){switch(e){case t.Patterns.PATTERN000:return(r+i)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return i%3==0;case t.Patterns.PATTERN011:return(r+i)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(i/3))%2==0;case t.Patterns.PATTERN101:return r*i%2+r*i%3==0;case t.Patterns.PATTERN110:return(r*i%2+r*i%3)%2==0;case t.Patterns.PATTERN111:return(r*i%3+(r+i)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function isValid(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function from(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function getPenaltyN1(e){const t=e.size;let i=0,n=0,s=0,o=null,a=null;for(let c=0;c<t;c++){n=s=0,o=a=null;for(let u=0;u<t;u++){let t=e.get(c,u);t===o?n++:(n>=5&&(i+=r+(n-5)),o=t,n=1),t=e.get(u,c),t===a?s++:(s>=5&&(i+=r+(s-5)),a=t,s=1)}n>=5&&(i+=r+(n-5)),s>=5&&(i+=r+(s-5))}return i},t.getPenaltyN2=function getPenaltyN2(e){const t=e.size;let r=0;for(let i=0;i<t-1;i++)for(let n=0;n<t-1;n++){const t=e.get(i,n)+e.get(i,n+1)+e.get(i+1,n)+e.get(i+1,n+1);4!==t&&0!==t||r++}return r*i},t.getPenaltyN3=function getPenaltyN3(e){const t=e.size;let r=0,i=0,s=0;for(let n=0;n<t;n++){i=s=0;for(let o=0;o<t;o++)i=i<<1&2047|e.get(n,o),o>=10&&(1488===i||93===i)&&r++,s=s<<1&2047|e.get(o,n),o>=10&&(1488===s||93===s)&&r++}return r*n},t.getPenaltyN4=function getPenaltyN4(e){let t=0;const r=e.data.length;for(let i=0;i<r;i++)t+=e.data[i];return Math.abs(Math.ceil(100*t/r/5)-10)*s},t.applyMask=function applyMask(e,t){const r=t.size;for(let i=0;i<r;i++)for(let n=0;n<r;n++)t.isReserved(n,i)||t.xor(n,i,getMaskAt(e,n,i))},t.getBestMask=function getBestMask(e,r){const i=Object.keys(t.Patterns).length;let n=0,s=1/0;for(let o=0;o<i;o++){r(o),t.applyMask(o,e);const i=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(o,e),i<s&&(s=i,n=o)}return n}},6910:(e,t,r)=>{const i=r(3114),n=r(7007);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function getCharCountIndicator(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!i.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function getBestModeForData(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function toString(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function isValid(e){return e&&e.bit&&e.ccBits},t.from=function from(e,r){if(t.isValid(e))return e;try{return function fromString(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},1085:(e,t,r)=>{const i=r(6910);function NumericData(e){this.mode=i.NUMERIC,this.data=e.toString()}NumericData.getBitsLength=function getBitsLength(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},NumericData.prototype.getLength=function getLength(){return this.data.length},NumericData.prototype.getBitsLength=function getBitsLength(){return NumericData.getBitsLength(this.data.length)},NumericData.prototype.write=function write(e){let t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);const n=this.data.length-t;n>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,3*n+1))},e.exports=NumericData},6143:(e,t,r)=>{const i=r(2577);t.mul=function mul(e,t){const r=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let s=0;s<t.length;s++)r[n+s]^=i.mul(e[n],t[s]);return r},t.mod=function mod(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){const e=r[0];for(let n=0;n<t.length;n++)r[n]^=i.mul(t[n],e);let n=0;for(;n<r.length&&0===r[n];)n++;r=r.slice(n)}return r},t.generateECPolynomial=function generateECPolynomial(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=t.mul(r,new Uint8Array([1,i.exp(n)]));return r}},5115:(e,t,r)=>{const i=r(242),n=r(4908),s=r(7245),o=r(3280),a=r(1845),c=r(6526),u=r(7126),p=r(5393),l=r(2882),d=r(3103),f=r(1642),y=r(6910),h=r(6130);function setupFormatInfo(e,t,r){const i=e.size,n=f.getEncodedBits(t,r);let s,o;for(s=0;s<15;s++)o=1==(n>>s&1),s<6?e.set(s,8,o,!0):s<8?e.set(s+1,8,o,!0):e.set(i-15+s,8,o,!0),s<8?e.set(8,i-s-1,o,!0):s<9?e.set(8,15-s-1+1,o,!0):e.set(8,15-s-1,o,!0);e.set(i-8,8,1,!0)}function createData(e,t,r){const n=new s;r.forEach((function(t){n.put(t.mode.bit,4),n.put(t.getLength(),y.getCharCountIndicator(t.mode,e)),t.write(n)}));const o=8*(i.getSymbolTotalCodewords(e)-p.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);const a=(o-n.getLengthInBits())/8;for(let e=0;e<a;e++)n.put(e%2?17:236,8);return function createCodewords(e,t,r){const n=i.getSymbolTotalCodewords(t),s=p.getTotalCodewordsCount(t,r),o=n-s,a=p.getBlocksCount(t,r),c=a-n%a,u=Math.floor(n/a),d=Math.floor(o/a),f=d+1,y=u-d,h=new l(y);let m=0;const g=new Array(a),v=new Array(a);let b=0;const R=new Uint8Array(e.buffer);for(let e=0;e<a;e++){const t=e<c?d:f;g[e]=R.slice(m,m+t),v[e]=h.encode(g[e]),m+=t,b=Math.max(b,t)}const O=new Uint8Array(n);let S,C,w=0;for(S=0;S<b;S++)for(C=0;C<a;C++)S<g[C].length&&(O[w++]=g[C][S]);for(S=0;S<y;S++)for(C=0;C<a;C++)O[w++]=v[C][S];return O}(n,e,t)}function createSymbol(e,t,r,n){let s;if(Array.isArray(e))s=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let i=t;if(!i){const t=h.rawSplit(e);i=d.getBestVersionForData(t,r)}s=h.fromString(e,i||40)}}const p=d.getBestVersionForData(s,r);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else t=p;const l=createData(t,r,s),f=i.getSymbolSize(t),y=new o(f);return function setupFinderPattern(e,t){const r=e.size,i=c.getPositions(t);for(let t=0;t<i.length;t++){const n=i[t][0],s=i[t][1];for(let t=-1;t<=7;t++)if(!(n+t<=-1||r<=n+t))for(let i=-1;i<=7;i++)s+i<=-1||r<=s+i||(t>=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(n+t,s+i,!0,!0):e.set(n+t,s+i,!1,!0))}}(y,t),function setupTimingPattern(e){const t=e.size;for(let r=8;r<t-8;r++){const t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(y),function setupAlignmentPattern(e,t){const r=a.getPositions(t);for(let t=0;t<r.length;t++){const i=r[t][0],n=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(i+t,n+r,!0,!0):e.set(i+t,n+r,!1,!0)}}(y,t),setupFormatInfo(y,r,0),t>=7&&function setupVersionInfo(e,t){const r=e.size,i=d.getEncodedBits(t);let n,s,o;for(let t=0;t<18;t++)n=Math.floor(t/3),s=t%3+r-8-3,o=1==(i>>t&1),e.set(n,s,o,!0),e.set(s,n,o,!0)}(y,t),function setupData(e,t){const r=e.size;let i=-1,n=r-1,s=7,o=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(n,a-r)){let i=!1;o<t.length&&(i=1==(t[o]>>>s&1)),e.set(n,a-r,i),s--,-1===s&&(o++,s=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}(y,l),isNaN(n)&&(n=u.getBestMask(y,setupFormatInfo.bind(null,y,r))),u.applyMask(n,y),setupFormatInfo(y,r,n),{modules:y,version:t,errorCorrectionLevel:r,maskPattern:n,segments:s}}t.create=function create(e,t){if(void 0===e||""===e)throw new Error("No input text");let r,s,o=n.M;return void 0!==t&&(o=n.from(t.errorCorrectionLevel,n.M),r=d.from(t.version),s=u.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),createSymbol(e,r,o,s)}},2882:(e,t,r)=>{const i=r(6143);function ReedSolomonEncoder(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ReedSolomonEncoder.prototype.initialize=function initialize(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},ReedSolomonEncoder.prototype.encode=function encode(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const r=i.mod(t,this.genPoly),n=this.degree-r.length;if(n>0){const e=new Uint8Array(this.degree);return e.set(r,n),e}return r},e.exports=ReedSolomonEncoder},7007:(e,t)=>{const r="[0-9]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+")(?:.|[\r\n]))+";t.KANJI=new RegExp(i,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(n,"g"),t.NUMERIC=new RegExp(r,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const s=new RegExp("^"+i+"$"),o=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function testKanji(e){return s.test(e)},t.testNumeric=function testNumeric(e){return o.test(e)},t.testAlphanumeric=function testAlphanumeric(e){return a.test(e)}},6130:(e,t,r)=>{const i=r(6910),n=r(1085),s=r(8260),o=r(3424),a=r(5442),c=r(7007),u=r(242),p=r(5987);function getStringByteLength(e){return unescape(encodeURIComponent(e)).length}function getSegments(e,t,r){const i=[];let n;for(;null!==(n=e.exec(r));)i.push({data:n[0],index:n.index,mode:t,length:n[0].length});return i}function getSegmentsFromString(e){const t=getSegments(c.NUMERIC,i.NUMERIC,e),r=getSegments(c.ALPHANUMERIC,i.ALPHANUMERIC,e);let n,s;u.isKanjiModeEnabled()?(n=getSegments(c.BYTE,i.BYTE,e),s=getSegments(c.KANJI,i.KANJI,e)):(n=getSegments(c.BYTE_KANJI,i.BYTE,e),s=[]);return t.concat(r,n,s).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function getSegmentBitsLength(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return s.getBitsLength(e);case i.KANJI:return a.getBitsLength(e);case i.BYTE:return o.getBitsLength(e)}}function buildSingleSegment(e,t){let r;const c=i.getBestModeForData(e);if(r=i.from(t,c),r!==i.BYTE&&r.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+i.toString(r)+".\n Suggested mode is: "+i.toString(c));switch(r!==i.KANJI||u.isKanjiModeEnabled()||(r=i.BYTE),r){case i.NUMERIC:return new n(e);case i.ALPHANUMERIC:return new s(e);case i.KANJI:return new a(e);case i.BYTE:return new o(e)}}t.fromArray=function fromArray(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(buildSingleSegment(t,null)):t.data&&e.push(buildSingleSegment(t.data,t.mode)),e}),[])},t.fromString=function fromString(e,r){const n=function buildNodes(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];switch(n.mode){case i.NUMERIC:t.push([n,{data:n.data,mode:i.ALPHANUMERIC,length:n.length},{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.ALPHANUMERIC:t.push([n,{data:n.data,mode:i.BYTE,length:n.length}]);break;case i.KANJI:t.push([n,{data:n.data,mode:i.BYTE,length:getStringByteLength(n.data)}]);break;case i.BYTE:t.push([{data:n.data,mode:i.BYTE,length:getStringByteLength(n.data)}])}}return t}(getSegmentsFromString(e,u.isKanjiModeEnabled())),s=function buildGraph(e,t){const r={},n={start:{}};let s=["start"];for(let o=0;o<e.length;o++){const a=e[o],c=[];for(let e=0;e<a.length;e++){const u=a[e],p=""+o+e;c.push(p),r[p]={node:u,lastCount:0},n[p]={};for(let e=0;e<s.length;e++){const o=s[e];r[o]&&r[o].node.mode===u.mode?(n[o][p]=getSegmentBitsLength(r[o].lastCount+u.length,u.mode)-getSegmentBitsLength(r[o].lastCount,u.mode),r[o].lastCount+=u.length):(r[o]&&(r[o].lastCount=u.length),n[o][p]=getSegmentBitsLength(u.length,u.mode)+4+i.getCharCountIndicator(u.mode,t))}}s=c}for(let e=0;e<s.length;e++)n[s[e]].end=0;return{map:n,table:r}}(n,r),o=p.find_path(s.map,"start","end"),a=[];for(let e=1;e<o.length-1;e++)a.push(s.table[o[e]].node);return t.fromArray(function mergeSegments(e){return e.reduce((function(e,t){const r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(a))},t.rawSplit=function rawSplit(e){return t.fromArray(getSegmentsFromString(e,u.isKanjiModeEnabled()))}},242:(e,t)=>{let r;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function getSymbolSize(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function getSymbolTotalCodewords(e){return i[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function setToSJISFunction(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function toSJIS(e){return r(e)}},3114:(e,t)=>{t.isValid=function isValid(e){return!isNaN(e)&&e>=1&&e<=40}},3103:(e,t,r)=>{const i=r(242),n=r(5393),s=r(4908),o=r(6910),a=r(3114),c=i.getBCHDigit(7973);function getReservedBitsCount(e,t){return o.getCharCountIndicator(e,t)+4}function getTotalBitsFromDataArray(e,t){let r=0;return e.forEach((function(e){const i=getReservedBitsCount(e.mode,t);r+=i+e.getBitsLength()})),r}t.from=function from(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function getCapacity(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");void 0===r&&(r=o.BYTE);const s=8*(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t));if(r===o.MIXED)return s;const c=s-getReservedBitsCount(r,e);switch(r){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function getBestVersionForData(e,r){let i;const n=s.from(r,s.M);if(Array.isArray(e)){if(e.length>1)return function getBestVersionForMixedData(e,r){for(let i=1;i<=40;i++)if(getTotalBitsFromDataArray(e,i)<=t.getCapacity(i,r,o.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function getBestVersionForDataLength(e,r,i){for(let n=1;n<=40;n++)if(r<=t.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},t.getEncodedBits=function getEncodedBits(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;i.getBCHDigit(t)-c>=0;)t^=7973<<i.getBCHDigit(t)-c;return e<<12|t}},6907:(e,t,r)=>{const i=r(9653);t.render=function render(e,t,r){let n=r,s=t;void 0!==n||t&&t.getContext||(n=t,t=void 0),t||(s=function getCanvasElement(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),n=i.getOptions(n);const o=i.getImageWidth(e.modules.size,n),a=s.getContext("2d"),c=a.createImageData(o,o);return i.qrToImageData(c.data,e,n),function clearCanvas(e,t,r){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=r,t.width=r,t.style.height=r+"px",t.style.width=r+"px"}(a,s,o),a.putImageData(c,0,0),s},t.renderToDataURL=function renderToDataURL(e,r,i){let n=i;void 0!==n||r&&r.getContext||(n=r,r=void 0),n||(n={});const s=t.render(e,r,n),o=n.type||"image/png",a=n.rendererOpts||{};return s.toDataURL(o,a.quality)}},3776:(e,t,r)=>{const i=r(9653);function getColorAttrib(e,t){const r=e.a/255,i=t+'="'+e.hex+'"';return r<1?i+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function svgCmd(e,t,r){let i=e+t;return void 0!==r&&(i+=" "+r),i}t.render=function render(e,t,r){const n=i.getOptions(t),s=e.modules.size,o=e.modules.data,a=s+2*n.margin,c=n.color.light.a?"<path "+getColorAttrib(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+getColorAttrib(n.color.dark,"stroke")+' d="'+function qrToPath(e,t,r){let i="",n=0,s=!1,o=0;for(let a=0;a<e.length;a++){const c=Math.floor(a%t),u=Math.floor(a/t);c||s||(s=!0),e[a]?(o++,a>0&&c>0&&e[a-1]||(i+=s?svgCmd("M",c+r,.5+u+r):svgCmd("m",n,0),n=0,s=!1),c+1<t&&e[a+1]||(i+=svgCmd("h",o),o=0)):n++}return i}(o,s,n.margin)+'"/>',p='viewBox="0 0 '+a+" "+a+'"',l='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+p+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof r&&r(null,l),l}},9653:(e,t)=>{function hex2rgba(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function getOptions(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:hex2rgba(e.color.dark||"#000000ff"),light:hex2rgba(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function getScale(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function getImageWidth(e,r){const i=t.getScale(e,r);return Math.floor((e+2*r.margin)*i)},t.qrToImageData=function qrToImageData(e,r,i){const n=r.modules.size,s=r.modules.data,o=t.getScale(n,i),a=Math.floor((n+2*i.margin)*o),c=i.margin*o,u=[i.color.light,i.color.dark];for(let t=0;t<a;t++)for(let r=0;r<a;r++){let p=4*(t*a+r),l=i.color.light;if(t>=c&&r>=c&&t<a-c&&r<a-c){l=u[s[Math.floor((t-c)/o)*n+Math.floor((r-c)/o)]?1:0]}e[p++]=l.r,e[p++]=l.g,e[p++]=l.b,e[p]=l.a}}},8660:()=>{var e;!function(e){!function(t){var r="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=makeExporter(e);function makeExporter(e,t){return function(r,i){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:i}),t&&t(r,i)}}void 0===r.Reflect?r.Reflect=e:i=makeExporter(r.Reflect,i),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,o={__proto__:[]}instanceof Array,a=!s&&!o,c={create:s?function(){return MakeDictionary(Object.create(null))}:o?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:a?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:a?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),p="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,l=p||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?CreateMapPolyfill():Map,d=p||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?CreateSetPolyfill():Set,f=new(p||"function"!=typeof WeakMap?CreateWeakMapPolyfill():WeakMap);function decorate(e,t,r,i){if(IsUndefined(r)){if(!IsArray(e))throw new TypeError;if(!IsConstructor(t))throw new TypeError;return DecorateConstructor(e,t)}if(!IsArray(e))throw new TypeError;if(!IsObject(t))throw new TypeError;if(!IsObject(i)&&!IsUndefined(i)&&!IsNull(i))throw new TypeError;return IsNull(i)&&(i=void 0),DecorateProperty(e,t,r=ToPropertyKey(r),i)}function metadata(e,t){function decorator(r,i){if(!IsObject(r))throw new TypeError;if(!IsUndefined(i)&&!IsPropertyKey(i))throw new TypeError;OrdinaryDefineOwnMetadata(e,t,r,i)}return decorator}function defineMetadata(e,t,r,i){if(!IsObject(r))throw new TypeError;return IsUndefined(i)||(i=ToPropertyKey(i)),OrdinaryDefineOwnMetadata(e,t,r,i)}function hasMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasMetadata(e,t,r)}function hasOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryHasOwnMetadata(e,t,r)}function getMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetMetadata(e,t,r)}function getOwnMetadata(e,t,r){if(!IsObject(t))throw new TypeError;return IsUndefined(r)||(r=ToPropertyKey(r)),OrdinaryGetOwnMetadata(e,t,r)}function getMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryMetadataKeys(e,t)}function getOwnMetadataKeys(e,t){if(!IsObject(e))throw new TypeError;return IsUndefined(t)||(t=ToPropertyKey(t)),OrdinaryOwnMetadataKeys(e,t)}function deleteMetadata(e,t,r){if(!IsObject(t))throw new TypeError;IsUndefined(r)||(r=ToPropertyKey(r));var i=GetOrCreateMetadataMap(t,r,!1);if(IsUndefined(i))return!1;if(!i.delete(e))return!1;if(i.size>0)return!0;var n=f.get(t);return n.delete(r),n.size>0||f.delete(t),!0}function DecorateConstructor(e,t){for(var r=e.length-1;r>=0;--r){var i=(0,e[r])(t);if(!IsUndefined(i)&&!IsNull(i)){if(!IsConstructor(i))throw new TypeError;t=i}}return t}function DecorateProperty(e,t,r,i){for(var n=e.length-1;n>=0;--n){var s=(0,e[n])(t,r,i);if(!IsUndefined(s)&&!IsNull(s)){if(!IsObject(s))throw new TypeError;i=s}}return i}function GetOrCreateMetadataMap(e,t,r){var i=f.get(e);if(IsUndefined(i)){if(!r)return;i=new l,f.set(e,i)}var n=i.get(t);if(IsUndefined(n)){if(!r)return;n=new l,i.set(t,n)}return n}function OrdinaryHasMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return!0;var i=OrdinaryGetPrototypeOf(t);return!IsNull(i)&&OrdinaryHasMetadata(e,i,r)}function OrdinaryHasOwnMetadata(e,t,r){var i=GetOrCreateMetadataMap(t,r,!1);return!IsUndefined(i)&&ToBoolean(i.has(e))}function OrdinaryGetMetadata(e,t,r){if(OrdinaryHasOwnMetadata(e,t,r))return OrdinaryGetOwnMetadata(e,t,r);var i=OrdinaryGetPrototypeOf(t);return IsNull(i)?void 0:OrdinaryGetMetadata(e,i,r)}function OrdinaryGetOwnMetadata(e,t,r){var i=GetOrCreateMetadataMap(t,r,!1);if(!IsUndefined(i))return i.get(e)}function OrdinaryDefineOwnMetadata(e,t,r,i){GetOrCreateMetadataMap(r,i,!0).set(e,t)}function OrdinaryMetadataKeys(e,t){var r=OrdinaryOwnMetadataKeys(e,t),i=OrdinaryGetPrototypeOf(e);if(null===i)return r;var n=OrdinaryMetadataKeys(i,t);if(n.length<=0)return r;if(r.length<=0)return n;for(var s=new d,o=[],a=0,c=r;a<c.length;a++){var u=c[a];s.has(u)||(s.add(u),o.push(u))}for(var p=0,l=n;p<l.length;p++){u=l[p];s.has(u)||(s.add(u),o.push(u))}return o}function OrdinaryOwnMetadataKeys(e,t){var r=[],i=GetOrCreateMetadataMap(e,t,!1);if(IsUndefined(i))return r;for(var n=GetIterator(i.keys()),s=0;;){var o=IteratorStep(n);if(!o)return r.length=s,r;var a=IteratorValue(o);try{r[s]=a}catch(e){try{IteratorClose(n)}finally{throw e}}s++}}function Type(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function IsUndefined(e){return void 0===e}function IsNull(e){return null===e}function IsSymbol(e){return"symbol"==typeof e}function IsObject(e){return"object"==typeof e?null!==e:"function"==typeof e}function ToPrimitive(e,t){switch(Type(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=GetMethod(e,i);if(void 0!==n){var s=n.call(e,r);if(IsObject(s))throw new TypeError;return s}return OrdinaryToPrimitive(e,"default"===r?"number":r)}function OrdinaryToPrimitive(e,t){if("string"===t){var r=e.toString;if(IsCallable(r))if(!IsObject(n=r.call(e)))return n;if(IsCallable(i=e.valueOf))if(!IsObject(n=i.call(e)))return n}else{var i;if(IsCallable(i=e.valueOf))if(!IsObject(n=i.call(e)))return n;var n,s=e.toString;if(IsCallable(s))if(!IsObject(n=s.call(e)))return n}throw new TypeError}function ToBoolean(e){return!!e}function ToString(e){return""+e}function ToPropertyKey(e){var t=ToPrimitive(e,3);return IsSymbol(t)?t:ToString(t)}function IsArray(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function IsCallable(e){return"function"==typeof e}function IsConstructor(e){return"function"==typeof e}function IsPropertyKey(e){switch(Type(e)){case 3:case 4:return!0;default:return!1}}function GetMethod(e,t){var r=e[t];if(null!=r){if(!IsCallable(r))throw new TypeError;return r}}function GetIterator(e){var t=GetMethod(e,n);if(!IsCallable(t))throw new TypeError;var r=t.call(e);if(!IsObject(r))throw new TypeError;return r}function IteratorValue(e){return e.value}function IteratorStep(e){var t=e.next();return!t.done&&t}function IteratorClose(e){var t=e.return;t&&t.call(e)}function OrdinaryGetPrototypeOf(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,i=r&&Object.getPrototypeOf(r);if(null==i||i===Object.prototype)return t;var n=i.constructor;return"function"!=typeof n||n===e?t:n}function CreateMapPolyfill(){var e={},t=[],r=function(){function MapIterator(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return MapIterator.prototype["@@iterator"]=function(){return this},MapIterator.prototype[n]=function(){return this},MapIterator.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},MapIterator.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},MapIterator.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},MapIterator}();return function(){function Map(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(Map.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map.prototype.has=function(e){return this._find(e,!1)>=0},Map.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},Map.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},Map.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n<i;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},Map.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},Map.prototype.keys=function(){return new r(this._keys,this._values,getKey)},Map.prototype.values=function(){return new r(this._keys,this._values,getValue)},Map.prototype.entries=function(){return new r(this._keys,this._values,getEntry)},Map.prototype["@@iterator"]=function(){return this.entries()},Map.prototype[n]=function(){return this.entries()},Map.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},Map}();function getKey(e,t){return e}function getValue(e,t){return t}function getEntry(e,t){return[e,t]}}function CreateSetPolyfill(){return function(){function Set(){this._map=new l}return Object.defineProperty(Set.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Set.prototype.has=function(e){return this._map.has(e)},Set.prototype.add=function(e){return this._map.set(e,e),this},Set.prototype.delete=function(e){return this._map.delete(e)},Set.prototype.clear=function(){this._map.clear()},Set.prototype.keys=function(){return this._map.keys()},Set.prototype.values=function(){return this._map.values()},Set.prototype.entries=function(){return this._map.entries()},Set.prototype["@@iterator"]=function(){return this.keys()},Set.prototype[n]=function(){return this.keys()},Set}()}function CreateWeakMapPolyfill(){var e=16,r=c.create(),i=CreateUniqueKey();return function(){function WeakMap(){this._key=CreateUniqueKey()}return WeakMap.prototype.has=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&c.has(t,this._key)},WeakMap.prototype.get=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t?c.get(t,this._key):void 0},WeakMap.prototype.set=function(e,t){return GetOrCreateWeakMapTable(e,!0)[this._key]=t,this},WeakMap.prototype.delete=function(e){var t=GetOrCreateWeakMapTable(e,!1);return void 0!==t&&delete t[this._key]},WeakMap.prototype.clear=function(){this._key=CreateUniqueKey()},WeakMap}();function CreateUniqueKey(){var e;do{e="@@WeakMap@@"+CreateUUID()}while(c.has(r,e));return r[e]=!0,e}function GetOrCreateWeakMapTable(e,r){if(!t.call(e,i)){if(!r)return;Object.defineProperty(e,i,{value:c.create()})}return e[i]}function FillRandomBytes(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function GenRandomBytes(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):FillRandomBytes(new Uint8Array(e),e):FillRandomBytes(new Array(e),e)}function CreateUUID(){var t=GenRandomBytes(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",i=0;i<e;++i){var n=t[i];4!==i&&6!==i&&8!==i||(r+="-"),n<16&&(r+="0"),r+=n.toString(16).toLowerCase()}return r}}function MakeDictionary(e){return e.__=void 0,delete e.__,e}e("decorate",decorate),e("metadata",metadata),e("defineMetadata",defineMetadata),e("hasMetadata",hasMetadata),e("hasOwnMetadata",hasOwnMetadata),e("getMetadata",getMetadata),e("getOwnMetadata",getOwnMetadata),e("getMetadataKeys",getMetadataKeys),e("getOwnMetadataKeys",getOwnMetadataKeys),e("deleteMetadata",deleteMetadata)}(i)}()}(e||(e={}))},4714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0;var i=r(6898);Object.defineProperty(t,"nameof",{enumerable:!0,get:function(){return i.nameof}})},6898:(e,t)=>{"use strict";function cleanseAssertionOperators(e){return e.replace(/[?!]/g,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.nameof=void 0,t.nameof=function nameof(e,t){var r=e.toString();if(r.startsWith("class ")&&!r.startsWith("class =>"))return cleanseAssertionOperators(r.substring("class ".length,r.indexOf(" {")));if(r.includes("=>"))return cleanseAssertionOperators(r.substring(r.indexOf(".")+1));var i=r.match(/function\s*\(\w+\)\s*\{[\r\n\s]*return\s+\w+\.((\w+\.)*(\w+))/i);if(i)return t&&t.lastProp?i[3]:i[1];if(r.startsWith("function "))return cleanseAssertionOperators(r.substring("function ".length,r.indexOf("(")));throw new Error("ts-simple-nameof: Invalid function.")}},1694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(2866),s=r(9208),o=r(1468);class IoCBindConfig{constructor(e,t,r){this.source=e,this.instanceFactory=t,this.valueFactory=r}to(e){i.InjectorHandler.checkType(e);const t=i.InjectorHandler.getConstructorFromType(e);return this.targetSource=t,this.source===t?this.factory((t=>{const r=this.getParameters(t),i=this.decoratedConstructor||e;return r?new i(...r):new i})):this.factory((t=>this.instanceFactory(e,t))),this}factory(e){return this.iocFactory=t=>{const r=i.InjectorHandler.unblockInstantiation(),n=this.decoratedConstructor||this.targetSource||this.source;i.InjectorHandler.injectContext(n,t);const s=e(t);return i.InjectorHandler.removeContext(n),i.InjectorHandler.injectContext(s,t),i.InjectorHandler.blockInstantiation(r),s},this.iocScope&&this.iocScope.reset(this.source),this}scope(e){return this.iocScope&&this.iocScope!==e&&this.iocScope.finish(this.source),this.iocScope=e,this.iocScope&&this.iocScope.init(this.source),this}withParams(...e){return this.paramTypes=e,this}instrumentConstructor(){const e=i.InjectorHandler.instrumentConstructor(this.source);return this.decoratedConstructor=e,this.source.constructor=e,this}getInstance(e){return this.iocScope||this.scope(n.Scope.Local),this.iocScope.resolve(this.iocFactory,this.source,e)}clone(){const e=new IoCBindConfig(this.source,this.instanceFactory,this.valueFactory);return e.iocFactory=this.iocFactory,e.iocScope=this.iocScope,e.targetSource=this.targetSource,e.paramTypes=this.paramTypes,e.decoratedConstructor=this.decoratedConstructor,e}getParameters(e){return this.paramTypes?this.paramTypes.map((t=>"string"==typeof t||t instanceof String?this.valueFactory(t):this.instanceFactory(t,e))):null}}t.IoCBindConfig=IoCBindConfig;class IoCBindValueConfig{constructor(e){this.name=e}to(e){return this.path?(this.value=this.value||{},o(this.value,this.path,e)):this.value=e,this}getValue(){return this.path?s(this.value,this.path):this.value}clone(){const e=new IoCBindValueConfig(this.name);return e.path=this.path,e.value=this.value,e}}t.IoCBindValueConfig=IoCBindValueConfig;class PropertyPath{constructor(e,t){this.name=e,this.path=t}static parse(e){const t=e.indexOf(".");if(t<0)return new PropertyPath(e);if(0===t)throw new TypeError(`Invalid value [${e}] passed to Container.bindName`);return t+1<e.length?new PropertyPath(e.substring(0,t),e.substring(t+1)):new PropertyPath(e.substring(0,t))}}t.PropertyPath=PropertyPath},6878:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ContainerNamespaces=class ContainerNamespaces{constructor(){this.defaultNamespace=new NamespaceBindings(null),this.namespaces=new Map}get(e){let t;return this.currentNamespace&&(t=this.currentNamespace.get(e),t)?t:this.defaultNamespace.get(e)}set(e,t){(this.currentNamespace||this.defaultNamespace).set(e,t)}getValue(e){let t;return this.currentNamespace&&(t=this.currentNamespace.getValue(e),t)?t:this.defaultNamespace.getValue(e)}setValue(e,t){(this.currentNamespace||this.defaultNamespace).setValue(e,t)}selectNamespace(e){if(e){let t=this.namespaces.get(e);t||(t=new NamespaceBindings(e),this.namespaces.set(e,t)),this.currentNamespace=t}else this.currentNamespace=null}removeNamespace(e){const t=this.namespaces.get(e);t&&(this.currentNamespace&&t.name===this.currentNamespace.name&&(this.currentNamespace=null),t.clear(),this.namespaces.delete(e))}selectedNamespace(){return this.currentNamespace?this.currentNamespace.name:null}};class NamespaceBindings{constructor(e){this.bindings=new Map,this.values=new Map,this.name=e}get(e){return this.bindings.get(e)}set(e,t){t.namespace=this.name,this.bindings.set(e,t)}getValue(e){return this.values.get(e)}setValue(e,t){t.namespace=this.name,this.values.set(e,t)}clear(){this.bindings.clear(),this.values.clear()}}},5729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(1694),s=r(6878);class IoCContainer{static bind(e,t=!1){i.InjectorHandler.checkType(e);const r=i.InjectorHandler.getConstructorFromType(e);let s=IoCContainer.namespaces.get(r);return s?t||s.namespace===IoCContainer.namespaces.selectedNamespace()||(s=s.clone(),IoCContainer.namespaces.set(r,s)):(s=new n.IoCBindConfig(r,IoCContainer.get,IoCContainer.getValue),s.to(e),IoCContainer.namespaces.set(r,s)),s}static bindName(e,t=!1){i.InjectorHandler.checkName(e);const r=n.PropertyPath.parse(e);let s=IoCContainer.namespaces.getValue(r.name);return s?t||s.namespace===IoCContainer.namespaces.selectedNamespace()||(s=s.clone(),IoCContainer.namespaces.setValue(r.name,s)):(s=new n.IoCBindValueConfig(r.name),IoCContainer.namespaces.setValue(r.name,s)),s.path=r.path,s}static get(e,t){const r=IoCContainer.bind(e,!0);return r.iocFactory||r.to(r.source),r.getInstance(t)}static getValue(e){return IoCContainer.bindName(e,!0).getValue()}static getType(e){i.InjectorHandler.checkType(e);const t=i.InjectorHandler.getConstructorFromType(e),r=IoCContainer.namespaces.get(t);if(!r)throw new TypeError(`The type ${e.name} hasn't been registered with the IOC Container`);return r.targetSource||r.source}static namespace(e){return IoCContainer.namespaces.selectNamespace(e),{remove:()=>{e&&IoCContainer.namespaces.removeNamespace(e)}}}static selectedNamespace(){return IoCContainer.namespaces.selectedNamespace()}static injectProperty(e,t,r){i.InjectorHandler.injectProperty(e,t,r,IoCContainer.get)}static injectValueProperty(e,t,r){i.InjectorHandler.injectValueProperty(e,t,r,IoCContainer.getValue)}static snapshot(){const e="_snapshot-"+IoCContainer.snapshotsCount++,t=IoCContainer.namespace(e);return{restore:()=>t.remove(),select:()=>IoCContainer.namespace(e)}}}t.IoCContainer=IoCContainer,IoCContainer.namespaces=new s.ContainerNamespaces,IoCContainer.snapshotsCount=0},5519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class InjectorHandler{static instrumentConstructor(e){let t;return t=class ioc_wrapper extends e{constructor(...e){super(...e),InjectorHandler.assertInstantiable()}},t.__parent=e,t}static blockInstantiation(e){InjectorHandler.instantiationsBlocked=e}static unblockInstantiation(){const e=InjectorHandler.instantiationsBlocked;return InjectorHandler.instantiationsBlocked=!1,e}static getConstructorFromType(e){let t=e;if(this.hasNamedConstructor(t))return t;for(t=t.__parent;t;){if(this.hasNamedConstructor(t))return t;t=t.__parent}throw TypeError("Can not identify the base Type for requested target "+e.toString())}static checkType(e){if(!e)throw new TypeError("Invalid type requested to IoC container. Type is not defined.")}static checkName(e){if(!e)throw new TypeError("Invalid name requested to IoC container. Name is not defined.")}static injectContext(e,t){e.__BuildContext=t}static removeContext(e){delete e.__BuildContext}static injectProperty(e,t,r,i){const n=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){const t=this.__BuildContext||e.__BuildContext;return this[n]?this[n]:this[n]=i(r,t)},set:function(e){this[n]=e}})}static injectValueProperty(e,t,r,i){const n=`__${t}`;Object.defineProperty(e.prototype,t,{enumerable:!0,get:function(){return this[n]?this[n]:this[n]=i(r)},set:function(e){this[n]=e}})}static hasNamedConstructor(e){if(e.name)return"ioc_wrapper"!==e.name;try{const t=e.prototype.constructor.toString().match(this.constructorNameRegEx)[1];return t&&"ioc_wrapper"!==t}catch(e){}return!1}static assertInstantiable(){if(InjectorHandler.instantiationsBlocked)throw new TypeError("Can not instantiate it. The instantiation is blocked for this class. Ask Container for it, using Container.get")}}t.InjectorHandler=InjectorHandler,InjectorHandler.constructorNameRegEx=/function (\w*)/,InjectorHandler.instantiationsBlocked=!0},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8660);const i=r(5729),n=r(2866);function InjectPropertyDecorator(e,t){let r=Reflect.getMetadata("design:type",e,t);r||(r=Reflect.getMetadata("design:type",e.constructor,t)),i.IoCContainer.injectProperty(e.constructor,t,r)}function InjectParamDecorator(e,t,r){if(!t){const t=i.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[];const n=Reflect.getMetadata("design:paramtypes",e);t.paramTypes.unshift(n[r])}}function InjectValuePropertyDecorator(e,t,r){i.IoCContainer.injectValueProperty(e.constructor,t,r)}function InjectValueParamDecorator(e,t,r,n){if(!t){const t=i.IoCContainer.bind(e);t.paramTypes=t.paramTypes||[],t.paramTypes.unshift(n)}}t.InRequestScope=function InRequestScope(e){i.IoCContainer.bind(e).scope(n.Scope.Request)},t.Singleton=function Singleton(e){i.IoCContainer.bind(e).scope(n.Scope.Singleton)},t.OnlyInstantiableByContainer=function OnlyInstantiableByContainer(e){return i.IoCContainer.bind(e).instrumentConstructor().decoratedConstructor},t.Scoped=function Scoped(e){return t=>{i.IoCContainer.bind(t).scope(e)}},t.Factory=function Factory(e){return t=>{i.IoCContainer.bind(t).factory(e)}},t.Inject=function Inject(...e){if(2===e.length||3===e.length&&void 0===e[2])return InjectPropertyDecorator.apply(this,e);if(3===e.length&&"number"==typeof e[2])return InjectParamDecorator.apply(this,e);throw new TypeError("Invalid @Inject Decorator declaration.")},t.InjectValue=function InjectValue(e){return(...t)=>{if(2===t.length||3===t.length&&void 0===t[2]){const r=[...t,e].filter((e=>!!e));return InjectValuePropertyDecorator.apply(this,r)}if(3===t.length&&"number"==typeof t[2])return InjectValueParamDecorator.apply(this,[...t,e]);throw new TypeError("Invalid @InjectValue Decorator declaration.")}}},2866:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Scope=class Scope{reset(e){}init(e){}finish(e){}};t.BuildContext=class BuildContext{}},2464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(5519),n=r(2866);class LocalScope extends n.Scope{resolve(e,t,r){return e(r)}}t.LocalScope=LocalScope;class SingletonScope extends n.Scope{resolve(e,t,r){let i=SingletonScope.instances.get(t);return i||(i=e(r),SingletonScope.instances.set(t,i)),i}reset(e){SingletonScope.instances.delete(i.InjectorHandler.getConstructorFromType(e))}init(e){this.reset(e)}finish(e){this.reset(e)}}t.SingletonScope=SingletonScope,SingletonScope.instances=new Map;class RequestScope extends n.Scope{resolve(e,t,r){return this.ensureContext(r),r.build(t,e)}ensureContext(e){if(!e)throw new TypeError("IoC Container can not handle this request. When using @InRequestScope in any dependent type, you should be askking to Container to create the instances through Container.get and not calling the type constructor directly.")}}t.RequestScope=RequestScope},7071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8660);const i=r(2866);t.Scope=i.Scope,t.BuildContext=i.BuildContext;const n=r(5729),s=r(2464);var o=r(3415);t.Inject=o.Inject,t.Factory=o.Factory,t.Singleton=o.Singleton,t.Scoped=o.Scoped,t.OnlyInstantiableByContainer=o.OnlyInstantiableByContainer,t.InRequestScope=o.InRequestScope,t.InjectValue=o.InjectValue,i.Scope.Local=new s.LocalScope,i.Scope.Singleton=new s.SingletonScope,i.Scope.Request=new s.RequestScope;class Container{static bind(e){return n.IoCContainer.bind(e)}static get(e){return n.IoCContainer.get(e,new ContainerBuildContext)}static getType(e){return n.IoCContainer.getType(e)}static bindName(e){return n.IoCContainer.bindName(e)}static getValue(e){return n.IoCContainer.getValue(e)}static namespace(e){return n.IoCContainer.namespace(e)}static environment(e){return Container.namespace(e)}static snapshot(e){return n.IoCContainer.snapshot()}static configure(...e){e.forEach((e=>{e.bind?Container.configureType(e):e.bindName?Container.configureConstant(e):(e.env||e.namespace)&&Container.configureNamespace(e)}))}static configureNamespace(e){const t=n.IoCContainer.selectedNamespace(),r=e.env||e.namespace;Object.keys(r).forEach((e=>{Container.namespace(e);const t=r[e];Container.configure(...t)})),Container.namespace(t)}static configureConstant(e){const t=n.IoCContainer.bindName(e.bindName);t&&e.to&&t.to(e.to)}static configureType(e){const t=n.IoCContainer.bind(e.bind);t&&(e.to?t.to(e.to):e.factory&&t.factory(e.factory),e.scope&&t.scope(e.scope),e.withParams&&t.withParams(e.withParams))}}t.Container=Container;class ContainerBuildContext extends i.BuildContext{constructor(){super(...arguments),this.context=new Map}build(e,t){let r=this.context.get(e);return r||(r=t(this),this.context.set(e,r)),r}resolve(e){return n.IoCContainer.get(e,this)}}},540:function(e,t){!function(e){"use strict";function merge(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var i=t.length-1,n=1;n<i;++n)t[n]=t[n].slice(1,-1);return t[i]=t[i].slice(1),t.join("")}return t[0]}function subexp(e){return"(?:"+e+")"}function typeOf(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(e){return e.toUpperCase()}function toArray(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function assign(e,t){var r=e;if(t)for(var i in t)r[i]=t[i];return r}function buildExps(e){var t="[A-Za-z]",r="[0-9]",i=merge(r,"[A-Fa-f]"),n=subexp(subexp("%[EFef]"+i+"%"+i+i+"%"+i+i)+"|"+subexp("%[89A-Fa-f]"+i+"%"+i+i)+"|"+subexp("%"+i+i)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=merge("[\\:\\/\\?\\#\\[\\]\\@]",s),a=e?"[\\uE000-\\uF8FF]":"[]",c=merge(t,r,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),u=subexp(t+merge(t,r,"[\\+\\-\\.]")+"*"),p=subexp(subexp(n+"|"+merge(c,s,"[\\:]"))+"*"),l=(subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("[1-9]"+r)+"|"+r),subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+r)+"|"+subexp("1"+r+r)+"|"+subexp("0?[1-9]"+r)+"|0?0?"+r)),d=subexp(l+"\\."+l+"\\."+l+"\\."+l),f=subexp(i+"{1,4}"),y=subexp(subexp(f+"\\:"+f)+"|"+d),h=subexp(subexp(f+"\\:")+"{6}"+y),m=subexp("\\:\\:"+subexp(f+"\\:")+"{5}"+y),g=subexp(subexp(f)+"?\\:\\:"+subexp(f+"\\:")+"{4}"+y),v=subexp(subexp(subexp(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+subexp(f+"\\:")+"{3}"+y),b=subexp(subexp(subexp(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+subexp(f+"\\:")+"{2}"+y),R=subexp(subexp(subexp(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+y),O=subexp(subexp(subexp(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+y),S=subexp(subexp(subexp(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),C=subexp(subexp(subexp(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),w=subexp([h,m,g,v,b,R,O,S,C].join("|")),I=subexp(subexp(c+"|"+n)+"+"),P=(subexp(w+"\\%25"+I),subexp(w+subexp("\\%25|\\%(?!"+i+"{2})")+I)),j=subexp("[vV]"+i+"+\\."+merge(c,s,"[\\:]")+"+"),$=subexp("\\["+subexp(P+"|"+w+"|"+j)+"\\]"),T=subexp(subexp(n+"|"+merge(c,s))+"*"),A=subexp($+"|"+d+"(?!"+T+")|"+T),q=subexp(r+"*"),N=subexp(subexp(p+"@")+"?"+A+subexp("\\:"+q)+"?"),x=subexp(n+"|"+merge(c,s,"[\\:\\@]")),E=subexp(x+"*"),D=subexp(x+"+"),M=subexp(subexp(n+"|"+merge(c,s,"[\\@]"))+"+"),k=subexp(subexp("\\/"+E)+"*"),J=subexp("\\/"+subexp(D+k)+"?"),F=subexp(M+k),U=subexp(D+k),L="(?!"+x+")",V=(subexp(k+"|"+J+"|"+F+"|"+U+"|"+L),subexp(subexp(x+"|"+merge("[\\/\\?]",a))+"*")),B=subexp(subexp(x+"|[\\/\\?]")+"*"),z=subexp(subexp("\\/\\/"+N+k)+"|"+J+"|"+U+"|"+L),G=subexp(u+"\\:"+z+subexp("\\?"+V)+"?"+subexp("\\#"+B)+"?"),H=subexp(subexp("\\/\\/"+N+k)+"|"+J+"|"+F+"|"+L),Q=subexp(H+subexp("\\?"+V)+"?"+subexp("\\#"+B)+"?");return subexp(G+"|"+Q),subexp(u+"\\:"+z+subexp("\\?"+V)+"?"),subexp(subexp("\\/\\/("+subexp("("+p+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+J+"|"+U+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp(subexp("\\/\\/("+subexp("("+p+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+J+"|"+F+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp(subexp("\\/\\/("+subexp("("+p+")@")+"?("+A+")"+subexp("\\:("+q+")")+"?)")+"?("+k+"|"+J+"|"+U+"|"+L+")"),subexp("\\?("+V+")"),subexp("\\#("+B+")"),subexp("("+p+")@"),subexp("\\:("+q+")"),{NOT_SCHEME:new RegExp(merge("[^]",t,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",c,s),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",c,s),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",c,s),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",c,s),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",c,s,"[\\:\\@\\/\\?]",a),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",c,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",c,s),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",c,o),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+w+")"+subexp(subexp("\\%25|\\%(?!"+i+"{2})")+"("+I+")")+"?\\]?$")}}var t=buildExps(!1),r=buildExps(!0),i=function(){function sliceIterator(e,t){var r=[],i=!0,n=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(r.push(o.value),!t||r.length!==t);i=!0);}catch(e){n=!0,s=e}finally{try{!i&&a.return&&a.return()}finally{if(n)throw s}}return r}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return sliceIterator(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},n=2147483647,s=36,o=1,a=26,c=38,u=700,p=72,l=128,d="-",f=/^xn--/,y=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=s-o,v=Math.floor,b=String.fromCharCode;function error$1(e){throw new RangeError(m[e])}function map(e,t){for(var r=[],i=e.length;i--;)r[i]=t(e[i]);return r}function mapDomain(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+map((e=e.replace(h,".")).split("."),t).join(".")}function ucs2decode(e){for(var t=[],r=0,i=e.length;r<i;){var n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<i){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),r--)}else t.push(n)}return t}var R=function basicToDigit(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s},O=function digitToBasic(e,t){return e+22+75*(e<26)-((0!=t)<<5)},S=function adapt(e,t,r){var i=0;for(e=r?v(e/u):e>>1,e+=v(e/t);e>g*a>>1;i+=s)e=v(e/g);return v(i+(g+1)*e/(e+c))},C=function decode(e){var t=[],r=e.length,i=0,c=l,u=p,f=e.lastIndexOf(d);f<0&&(f=0);for(var y=0;y<f;++y)e.charCodeAt(y)>=128&&error$1("not-basic"),t.push(e.charCodeAt(y));for(var h=f>0?f+1:0;h<r;){for(var m=i,g=1,b=s;;b+=s){h>=r&&error$1("invalid-input");var O=R(e.charCodeAt(h++));(O>=s||O>v((n-i)/g))&&error$1("overflow"),i+=O*g;var C=b<=u?o:b>=u+a?a:b-u;if(O<C)break;var w=s-C;g>v(n/w)&&error$1("overflow"),g*=w}var I=t.length+1;u=S(i-m,I,0==m),v(i/I)>n-c&&error$1("overflow"),c+=v(i/I),i%=I,t.splice(i++,0,c)}return String.fromCodePoint.apply(String,t)},w=function encode(e){var t=[],r=(e=ucs2decode(e)).length,i=l,c=0,u=p,f=!0,y=!1,h=void 0;try{for(var m,g=e[Symbol.iterator]();!(f=(m=g.next()).done);f=!0){var R=m.value;R<128&&t.push(b(R))}}catch(e){y=!0,h=e}finally{try{!f&&g.return&&g.return()}finally{if(y)throw h}}var C=t.length,w=C;for(C&&t.push(d);w<r;){var I=n,P=!0,j=!1,$=void 0;try{for(var T,A=e[Symbol.iterator]();!(P=(T=A.next()).done);P=!0){var q=T.value;q>=i&&q<I&&(I=q)}}catch(e){j=!0,$=e}finally{try{!P&&A.return&&A.return()}finally{if(j)throw $}}var N=w+1;I-i>v((n-c)/N)&&error$1("overflow"),c+=(I-i)*N,i=I;var x=!0,E=!1,D=void 0;try{for(var M,k=e[Symbol.iterator]();!(x=(M=k.next()).done);x=!0){var J=M.value;if(J<i&&++c>n&&error$1("overflow"),J==i){for(var F=c,U=s;;U+=s){var L=U<=u?o:U>=u+a?a:U-u;if(F<L)break;var V=F-L,B=s-L;t.push(b(O(L+V%B,0))),F=v(V/B)}t.push(b(O(F,0))),u=S(c,N,w==C),c=0,++w}}}catch(e){E=!0,D=e}finally{try{!x&&k.return&&k.return()}finally{if(E)throw D}}++c,++i}return t.join("")},I=function toUnicode(e){return mapDomain(e,(function(e){return f.test(e)?C(e.slice(4).toLowerCase()):e}))},P=function toASCII(e){return mapDomain(e,(function(e){return y.test(e)?"xn--"+w(e):e}))},j={version:"2.1.0",ucs2:{decode:ucs2decode,encode:function ucs2encode(e){return String.fromCodePoint.apply(String,toConsumableArray(e))}},decode:C,encode:w,toASCII:P,toUnicode:I},$={};function pctEncChar(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function pctDecChars(e){for(var t="",r=0,i=e.length;r<i;){var n=parseInt(e.substr(r+1,2),16);if(n<128)t+=String.fromCharCode(n),r+=3;else if(n>=194&&n<224){if(i-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&n)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(n>=224){if(i-r>=9){var o=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function _normalizeComponentEncoding(e,t){function decodeUnreserved(e){var r=pctDecChars(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_USERINFO,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(t.NOT_HOST,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,decodeUnreserved).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_QUERY,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,decodeUnreserved).replace(t.NOT_FRAGMENT,pctEncChar).replace(t.PCT_ENCODED,toUpperCase)),e}function _stripLeadingZeros(e){return e.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=i(r,2)[1];return n?n.split(".").map(_stripLeadingZeros).join("."):e}function _normalizeIPv6(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=i(r,3),s=n[1],o=n[2];if(s){for(var a=s.toLowerCase().split("::").reverse(),c=i(a,2),u=c[0],p=c[1],l=p?p.split(":").map(_stripLeadingZeros):[],d=u.split(":").map(_stripLeadingZeros),f=t.IPV4ADDRESS.test(d[d.length-1]),y=f?7:8,h=d.length-y,m=Array(y),g=0;g<y;++g)m[g]=l[g]||d[h+g]||"";f&&(m[y-1]=_normalizeIPv4(m[y-1],t));var v=m.reduce((function(e,t,r){if(!t||"0"===t){var i=e[e.length-1];i&&i.index+i.length===r?i.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(v&&v.length>1){var R=m.slice(0,v.index),O=m.slice(v.index+v.length);b=R.join(":")+"::"+O.join(":")}else b=m.join(":");return o&&(b+="%"+o),b}return e}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function parse(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},s=!1!==i.iri?r:t;"suffix"===i.reference&&(e=(i.scheme?i.scheme+":":"")+"//"+e);var o=e.match(T);if(o){A?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=_normalizeIPv6(_normalizeIPv4(n.host,s),s)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==n.reference&&(n.error=n.error||"URI is not a "+i.reference+" reference.");var a=$[(i.scheme||n.scheme||"").toLowerCase()];if(i.unicodeSupport||a&&a.unicodeSupport)_normalizeComponentEncoding(n,s);else{if(n.host&&(i.domainHost||a&&a.domainHost))try{n.host=j.toASCII(n.host.replace(s.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(n,t)}a&&a.parse&&a.parse(n,i)}else n.error=n.error||"URI can not be parsed.";return n}function _recomposeAuthority(e,i){var n=!1!==i.iri?r:t,s=[];return void 0!==e.userinfo&&(s.push(e.userinfo),s.push("@")),void 0!==e.host&&s.push(_normalizeIPv6(_normalizeIPv4(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(s.push(":"),s.push(String(e.port))),s.length?s.join(""):void 0}var q=/^\.\.?\//,N=/^\/\.(\/|$)/,x=/^\/\.\.(\/|$)/,E=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(e){for(var t=[];e.length;)if(e.match(q))e=e.replace(q,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(x))e=e.replace(x,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(E);if(!r)throw new Error("Unexpected dot segment condition");var i=r[0];e=e.slice(i.length),t.push(i)}return t.join("")}function serialize(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.iri?r:t,s=[],o=$[(i.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,i),e.host)if(n.IPV6ADDRESS.test(e.host));else if(i.domainHost||o&&o.domainHost)try{e.host=i.iri?j.toUnicode(e.host):j.toASCII(e.host.replace(n.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){e.error=e.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+t}_normalizeComponentEncoding(e,n),"suffix"!==i.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var a=_recomposeAuthority(e,i);if(void 0!==a&&("suffix"!==i.reference&&s.push("//"),s.push(a),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var c=e.path;i.absolutePath||o&&o.absolutePath||(c=removeDotSegments(c)),void 0===a&&(c=c.replace(/^\/\//,"/%2F")),s.push(c)}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function resolveComponents(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(e=parse(serialize(e,r),r),t=parse(serialize(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=removeDotSegments(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=removeDotSegments(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=removeDotSegments(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=removeDotSegments(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function resolve(e,t,r){var i=assign({scheme:"null"},r);return serialize(resolveComponents(parse(e,i),parse(t,i),i,!0),i)}function normalize(e,t){return"string"==typeof e?e=serialize(parse(e,t),t):"object"===typeOf(e)&&(e=parse(serialize(e,t),t)),e}function equal(e,t,r){return"string"==typeof e?e=serialize(parse(e,r),r):"object"===typeOf(e)&&(e=serialize(e,r)),"string"==typeof t?t=serialize(parse(t,r),r):"object"===typeOf(t)&&(t=serialize(t,r)),e===t}function escapeComponent(e,i){return e&&e.toString().replace(i&&i.iri?r.ESCAPE:t.ESCAPE,pctEncChar)}function unescapeComponent(e,i){return e&&e.toString().replace(i&&i.iri?r.PCT_ENCODED:t.PCT_ENCODED,pctDecChars)}var D={scheme:"http",domainHost:!0,parse:function parse(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function serialize(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},M={scheme:"https",domainHost:D.domainHost,parse:D.parse,serialize:D.serialize};function isSecure(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var k={scheme:"ws",domainHost:!0,parse:function parse(e,t){var r=e;return r.secure=isSecure(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function serialize(e,t){if(e.port!==(isSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=i(r,2),s=n[0],o=n[1];e.path=s&&"/"!==s?s:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},J={scheme:"wss",domainHost:k.domainHost,parse:k.parse,serialize:k.serialize},F={},U="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",L="[0-9A-Fa-f]",V=subexp(subexp("%[EFef]"+L+"%"+L+L+"%"+L+L)+"|"+subexp("%[89A-Fa-f]"+L+"%"+L+L)+"|"+subexp("%"+L+L)),B="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",z=merge("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),G="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",H=new RegExp(U,"g"),Q=new RegExp(V,"g"),Z=new RegExp(merge("[^]",B,"[\\.]",'[\\"]',z),"g"),K=new RegExp(merge("[^]",U,G),"g"),W=K;function decodeUnreserved(e){var t=pctDecChars(e);return t.match(H)?t:e}var Y={scheme:"mailto",parse:function parse$$1(e,t){var r=e,i=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var n=!1,s={},o=r.query.split("&"),a=0,c=o.length;a<c;++a){var u=o[a].split("=");switch(u[0]){case"to":for(var p=u[1].split(","),l=0,d=p.length;l<d;++l)i.push(p[l]);break;case"subject":r.subject=unescapeComponent(u[1],t);break;case"body":r.body=unescapeComponent(u[1],t);break;default:n=!0,s[unescapeComponent(u[0],t)]=unescapeComponent(u[1],t)}}n&&(r.headers=s)}r.query=void 0;for(var f=0,y=i.length;f<y;++f){var h=i[f].split("@");if(h[0]=unescapeComponent(h[0]),t.unicodeSupport)h[1]=unescapeComponent(h[1],t).toLowerCase();else try{h[1]=j.toASCII(unescapeComponent(h[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}i[f]=h.join("@")}return r},serialize:function serialize$$1(e,t){var r=e,i=toArray(e.to);if(i){for(var n=0,s=i.length;n<s;++n){var o=String(i[n]),a=o.lastIndexOf("@"),c=o.slice(0,a).replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(Z,pctEncChar),u=o.slice(a+1);try{u=t.iri?j.toUnicode(u):j.toASCII(unescapeComponent(u,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}i[n]=c+"@"+u}r.path=i.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var l=[];for(var d in p)p[d]!==F[d]&&l.push(d.replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(K,pctEncChar)+"="+p[d].replace(Q,decodeUnreserved).replace(Q,toUpperCase).replace(W,pctEncChar));return l.length&&(r.query=l.join("&")),r}},X=/^([^\:]+)\:(.*)/,ee={scheme:"urn",parse:function parse$$1(e,t){var r=e.path&&e.path.match(X),i=e;if(r){var n=t.scheme||i.scheme||"urn",s=r[1].toLowerCase(),o=r[2],a=n+":"+(t.nid||s),c=$[a];i.nid=s,i.nss=o,i.path=void 0,c&&(i=c.parse(i,t))}else i.error=i.error||"URN can not be parsed.";return i},serialize:function serialize$$1(e,t){var r=t.scheme||e.scheme||"urn",i=e.nid,n=r+":"+(t.nid||i),s=$[n];s&&(e=s.serialize(e,t));var o=e,a=e.nss;return o.path=(i||t.nid)+":"+a,o}},te=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,re={scheme:"urn:uuid",parse:function parse(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(te)||(r.error=r.error||"UUID is not valid."),r},serialize:function serialize(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};$[D.scheme]=D,$[M.scheme]=M,$[k.scheme]=k,$[J.scheme]=J,$[Y.scheme]=Y,$[ee.scheme]=ee,$[re.scheme]=re,e.SCHEMES=$,e.pctEncChar=pctEncChar,e.pctDecChars=pctDecChars,e.parse=parse,e.removeDotSegments=removeDotSegments,e.serialize=serialize,e.resolveComponents=resolveComponents,e.resolve=resolve,e.normalize=normalize,e.equal=equal,e.escapeComponent=escapeComponent,e.unescapeComponent=unescapeComponent,Object.defineProperty(e,"__esModule",{value:!0})}(t)},3850:e=>{"use strict";e.exports=NMSHDConsumption},5030:e=>{"use strict";e.exports=NMSHDContent},2890:e=>{"use strict";e.exports=NMSHDCrypto},9663:e=>{"use strict";e.exports=NMSHDTransport},194:e=>{"use strict";e.exports=TSServal},4775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};var r=function __webpack_require__(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.exports}(5590);NMSHDRuntime=r})();
9
9
  //# sourceMappingURL=nmshd.runtime.min.js.map