@thisisagile/easy 15.8.4 → 15.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2821 -0
- package/dist/index.d.ts +2821 -12
- package/dist/index.js +1 -29
- package/dist/index.mjs +1 -0
- package/package.json +4 -2
- package/src/process/Manage.ts +15 -4
- package/src/process/Search.ts +24 -9
- package/src/resources/Req.ts +8 -3
- package/src/sql/Join.ts +4 -3
- package/src/utils/If.ts +1 -0
- package/dist/data/Condition.d.ts +0 -25
- package/dist/data/Condition.js +0 -44
- package/dist/data/Condition.js.map +0 -1
- package/dist/data/DataProvider.d.ts +0 -1
- package/dist/data/DataProvider.js +0 -3
- package/dist/data/DataProvider.js.map +0 -1
- package/dist/data/Database.d.ts +0 -22
- package/dist/data/Database.js +0 -18
- package/dist/data/Database.js.map +0 -1
- package/dist/data/Field.d.ts +0 -17
- package/dist/data/Field.js +0 -27
- package/dist/data/Field.js.map +0 -1
- package/dist/data/InMemoryGateway.d.ts +0 -12
- package/dist/data/InMemoryGateway.js +0 -48
- package/dist/data/InMemoryGateway.js.map +0 -1
- package/dist/data/Query.d.ts +0 -2
- package/dist/data/Query.js +0 -3
- package/dist/data/Query.js.map +0 -1
- package/dist/data/QueryProvider.d.ts +0 -7
- package/dist/data/QueryProvider.js +0 -3
- package/dist/data/QueryProvider.js.map +0 -1
- package/dist/data/index.d.ts +0 -7
- package/dist/data/index.js +0 -24
- package/dist/data/index.js.map +0 -1
- package/dist/domain/Audit.d.ts +0 -11
- package/dist/domain/Audit.js +0 -35
- package/dist/domain/Audit.js.map +0 -1
- package/dist/domain/Child.d.ts +0 -6
- package/dist/domain/Child.js +0 -30
- package/dist/domain/Child.js.map +0 -1
- package/dist/domain/Entity.d.ts +0 -9
- package/dist/domain/Entity.js +0 -45
- package/dist/domain/Entity.js.map +0 -1
- package/dist/domain/Repo.d.ts +0 -23
- package/dist/domain/Repo.js +0 -73
- package/dist/domain/Repo.js.map +0 -1
- package/dist/domain/Struct.d.ts +0 -11
- package/dist/domain/Struct.js +0 -31
- package/dist/domain/Struct.js.map +0 -1
- package/dist/domain/Typo.d.ts +0 -16
- package/dist/domain/Typo.js +0 -42
- package/dist/domain/Typo.js.map +0 -1
- package/dist/domain/enums/Country.d.ts +0 -256
- package/dist/domain/enums/Country.js +0 -267
- package/dist/domain/enums/Country.js.map +0 -1
- package/dist/domain/enums/Currency.d.ts +0 -127
- package/dist/domain/enums/Currency.js +0 -136
- package/dist/domain/enums/Currency.js.map +0 -1
- package/dist/domain/enums/Environment.d.ts +0 -7
- package/dist/domain/enums/Environment.js +0 -12
- package/dist/domain/enums/Environment.js.map +0 -1
- package/dist/domain/enums/Locale.d.ts +0 -571
- package/dist/domain/enums/Locale.js +0 -582
- package/dist/domain/enums/Locale.js.map +0 -1
- package/dist/domain/enums/UnitOfMeasurement.d.ts +0 -10
- package/dist/domain/enums/UnitOfMeasurement.js +0 -17
- package/dist/domain/enums/UnitOfMeasurement.js.map +0 -1
- package/dist/domain/enums/UnitOfWeight.d.ts +0 -8
- package/dist/domain/enums/UnitOfWeight.js +0 -15
- package/dist/domain/enums/UnitOfWeight.js.map +0 -1
- package/dist/domain/enums/index.d.ts +0 -6
- package/dist/domain/enums/index.js +0 -23
- package/dist/domain/enums/index.js.map +0 -1
- package/dist/domain/index.d.ts +0 -9
- package/dist/domain/index.js +0 -26
- package/dist/domain/index.js.map +0 -1
- package/dist/domain/structs/Address.d.ts +0 -12
- package/dist/domain/structs/Address.js +0 -57
- package/dist/domain/structs/Address.js.map +0 -1
- package/dist/domain/structs/Box.d.ts +0 -15
- package/dist/domain/structs/Box.js +0 -52
- package/dist/domain/structs/Box.js.map +0 -1
- package/dist/domain/structs/Dimension.d.ts +0 -10
- package/dist/domain/structs/Dimension.js +0 -38
- package/dist/domain/structs/Dimension.js.map +0 -1
- package/dist/domain/structs/Money.d.ts +0 -12
- package/dist/domain/structs/Money.js +0 -53
- package/dist/domain/structs/Money.js.map +0 -1
- package/dist/domain/structs/Name.d.ts +0 -9
- package/dist/domain/structs/Name.js +0 -38
- package/dist/domain/structs/Name.js.map +0 -1
- package/dist/domain/structs/Weight.d.ts +0 -13
- package/dist/domain/structs/Weight.js +0 -48
- package/dist/domain/structs/Weight.js.map +0 -1
- package/dist/domain/structs/index.d.ts +0 -6
- package/dist/domain/structs/index.js +0 -23
- package/dist/domain/structs/index.js.map +0 -1
- package/dist/domain/values/DateTime.d.ts +0 -34
- package/dist/domain/values/DateTime.js +0 -87
- package/dist/domain/values/DateTime.js.map +0 -1
- package/dist/domain/values/EAN.d.ts +0 -5
- package/dist/domain/values/EAN.js +0 -19
- package/dist/domain/values/EAN.js.map +0 -1
- package/dist/domain/values/Email.d.ts +0 -8
- package/dist/domain/values/Email.js +0 -25
- package/dist/domain/values/Email.js.map +0 -1
- package/dist/domain/values/IBAN.d.ts +0 -5
- package/dist/domain/values/IBAN.js +0 -19
- package/dist/domain/values/IBAN.js.map +0 -1
- package/dist/domain/values/PostalCode.d.ts +0 -8
- package/dist/domain/values/PostalCode.js +0 -22
- package/dist/domain/values/PostalCode.js.map +0 -1
- package/dist/domain/values/Url.d.ts +0 -22
- package/dist/domain/values/Url.js +0 -25
- package/dist/domain/values/Url.js.map +0 -1
- package/dist/domain/values/index.d.ts +0 -6
- package/dist/domain/values/index.js +0 -23
- package/dist/domain/values/index.js.map +0 -1
- package/dist/health/HealthResource.d.ts +0 -5
- package/dist/health/HealthResource.js +0 -28
- package/dist/health/HealthResource.js.map +0 -1
- package/dist/health/HealthUri.d.ts +0 -5
- package/dist/health/HealthUri.js +0 -10
- package/dist/health/HealthUri.js.map +0 -1
- package/dist/health/index.d.ts +0 -2
- package/dist/health/index.js +0 -19
- package/dist/health/index.js.map +0 -1
- package/dist/http/CacheControl.d.ts +0 -24
- package/dist/http/CacheControl.js +0 -35
- package/dist/http/CacheControl.js.map +0 -1
- package/dist/http/ContentType.d.ts +0 -12
- package/dist/http/ContentType.js +0 -23
- package/dist/http/ContentType.js.map +0 -1
- package/dist/http/HttpHeader.d.ts +0 -4
- package/dist/http/HttpHeader.js +0 -8
- package/dist/http/HttpHeader.js.map +0 -1
- package/dist/http/HttpStatus.d.ts +0 -72
- package/dist/http/HttpStatus.js +0 -87
- package/dist/http/HttpStatus.js.map +0 -1
- package/dist/http/HttpVerb.d.ts +0 -9
- package/dist/http/HttpVerb.js +0 -16
- package/dist/http/HttpVerb.js.map +0 -1
- package/dist/http/LocalRequestStore.d.ts +0 -7
- package/dist/http/LocalRequestStore.js +0 -15
- package/dist/http/LocalRequestStore.js.map +0 -1
- package/dist/http/OriginatedError.d.ts +0 -9
- package/dist/http/OriginatedError.js +0 -17
- package/dist/http/OriginatedError.js.map +0 -1
- package/dist/http/Request.d.ts +0 -11
- package/dist/http/Request.js +0 -3
- package/dist/http/Request.js.map +0 -1
- package/dist/http/RequestOptions.d.ts +0 -35
- package/dist/http/RequestOptions.js +0 -66
- package/dist/http/RequestOptions.js.map +0 -1
- package/dist/http/RequestProvider.d.ts +0 -5
- package/dist/http/RequestProvider.js +0 -3
- package/dist/http/RequestProvider.js.map +0 -1
- package/dist/http/Response.d.ts +0 -14
- package/dist/http/Response.js +0 -15
- package/dist/http/Response.js.map +0 -1
- package/dist/http/RestResult.d.ts +0 -23
- package/dist/http/RestResult.js +0 -40
- package/dist/http/RestResult.js.map +0 -1
- package/dist/http/Verb.d.ts +0 -20
- package/dist/http/Verb.js +0 -31
- package/dist/http/Verb.js.map +0 -1
- package/dist/http/index.d.ts +0 -12
- package/dist/http/index.js +0 -29
- package/dist/http/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/process/App.d.ts +0 -5
- package/dist/process/App.js +0 -12
- package/dist/process/App.js.map +0 -1
- package/dist/process/Manage.d.ts +0 -8
- package/dist/process/Manage.js +0 -15
- package/dist/process/Manage.js.map +0 -1
- package/dist/process/Scope.d.ts +0 -5
- package/dist/process/Scope.js +0 -12
- package/dist/process/Scope.js.map +0 -1
- package/dist/process/Search.d.ts +0 -14
- package/dist/process/Search.js +0 -22
- package/dist/process/Search.js.map +0 -1
- package/dist/process/UseCase.d.ts +0 -10
- package/dist/process/UseCase.js +0 -20
- package/dist/process/UseCase.js.map +0 -1
- package/dist/process/index.d.ts +0 -5
- package/dist/process/index.js +0 -22
- package/dist/process/index.js.map +0 -1
- package/dist/resources/AppProvider.d.ts +0 -9
- package/dist/resources/AppProvider.js +0 -3
- package/dist/resources/AppProvider.js.map +0 -1
- package/dist/resources/Req.d.ts +0 -23
- package/dist/resources/Req.js +0 -26
- package/dist/resources/Req.js.map +0 -1
- package/dist/resources/Requires.d.ts +0 -8
- package/dist/resources/Requires.js +0 -25
- package/dist/resources/Requires.js.map +0 -1
- package/dist/resources/Resource.d.ts +0 -1
- package/dist/resources/Resource.js +0 -3
- package/dist/resources/Resource.js.map +0 -1
- package/dist/resources/Route.d.ts +0 -26
- package/dist/resources/Route.js +0 -36
- package/dist/resources/Route.js.map +0 -1
- package/dist/resources/Service.d.ts +0 -15
- package/dist/resources/Service.js +0 -30
- package/dist/resources/Service.js.map +0 -1
- package/dist/resources/index.d.ts +0 -7
- package/dist/resources/index.js +0 -24
- package/dist/resources/index.js.map +0 -1
- package/dist/security/Jwt.d.ts +0 -15
- package/dist/security/Jwt.js +0 -32
- package/dist/security/Jwt.js.map +0 -1
- package/dist/security/index.d.ts +0 -1
- package/dist/security/index.js +0 -18
- package/dist/security/index.js.map +0 -1
- package/dist/services/Api.d.ts +0 -16
- package/dist/services/Api.js +0 -68
- package/dist/services/Api.js.map +0 -1
- package/dist/services/ApiGateway.d.ts +0 -14
- package/dist/services/ApiGateway.js +0 -34
- package/dist/services/ApiGateway.js.map +0 -1
- package/dist/services/AxiosProvider.d.ts +0 -7
- package/dist/services/AxiosProvider.js +0 -34
- package/dist/services/AxiosProvider.js.map +0 -1
- package/dist/services/MappedRouteGateway.d.ts +0 -16
- package/dist/services/MappedRouteGateway.js +0 -32
- package/dist/services/MappedRouteGateway.js.map +0 -1
- package/dist/services/RouteGateway.d.ts +0 -19
- package/dist/services/RouteGateway.js +0 -49
- package/dist/services/RouteGateway.js.map +0 -1
- package/dist/services/ViewRouteGateway.d.ts +0 -21
- package/dist/services/ViewRouteGateway.js +0 -35
- package/dist/services/ViewRouteGateway.js.map +0 -1
- package/dist/services/index.d.ts +0 -6
- package/dist/services/index.js +0 -23
- package/dist/services/index.js.map +0 -1
- package/dist/sql/Clause.d.ts +0 -17
- package/dist/sql/Clause.js +0 -31
- package/dist/sql/Clause.js.map +0 -1
- package/dist/sql/Column.d.ts +0 -41
- package/dist/sql/Column.js +0 -76
- package/dist/sql/Column.js.map +0 -1
- package/dist/sql/Count.d.ts +0 -7
- package/dist/sql/Count.js +0 -20
- package/dist/sql/Count.js.map +0 -1
- package/dist/sql/Delete.d.ts +0 -4
- package/dist/sql/Delete.js +0 -12
- package/dist/sql/Delete.js.map +0 -1
- package/dist/sql/Insert.d.ts +0 -9
- package/dist/sql/Insert.js +0 -21
- package/dist/sql/Insert.js.map +0 -1
- package/dist/sql/Join.d.ts +0 -12
- package/dist/sql/Join.js +0 -22
- package/dist/sql/Join.js.map +0 -1
- package/dist/sql/Select.d.ts +0 -21
- package/dist/sql/Select.js +0 -53
- package/dist/sql/Select.js.map +0 -1
- package/dist/sql/SqlQuery.d.ts +0 -8
- package/dist/sql/SqlQuery.js +0 -16
- package/dist/sql/SqlQuery.js.map +0 -1
- package/dist/sql/Table.d.ts +0 -34
- package/dist/sql/Table.js +0 -37
- package/dist/sql/Table.js.map +0 -1
- package/dist/sql/TableGateway.d.ts +0 -18
- package/dist/sql/TableGateway.js +0 -47
- package/dist/sql/TableGateway.js.map +0 -1
- package/dist/sql/Update.d.ts +0 -9
- package/dist/sql/Update.js +0 -23
- package/dist/sql/Update.js.map +0 -1
- package/dist/sql/index.d.ts +0 -10
- package/dist/sql/index.js +0 -27
- package/dist/sql/index.js.map +0 -1
- package/dist/types/Array.d.ts +0 -9
- package/dist/types/Array.js +0 -28
- package/dist/types/Array.js.map +0 -1
- package/dist/types/Builder.d.ts +0 -6
- package/dist/types/Builder.js +0 -18
- package/dist/types/Builder.js.map +0 -1
- package/dist/types/Cache.d.ts +0 -12
- package/dist/types/Cache.js +0 -14
- package/dist/types/Cache.js.map +0 -1
- package/dist/types/CacheAge.d.ts +0 -5
- package/dist/types/CacheAge.js +0 -22
- package/dist/types/CacheAge.js.map +0 -1
- package/dist/types/Case.d.ts +0 -59
- package/dist/types/Case.js +0 -100
- package/dist/types/Case.js.map +0 -1
- package/dist/types/Constructor.d.ts +0 -15
- package/dist/types/Constructor.js +0 -22
- package/dist/types/Constructor.js.map +0 -1
- package/dist/types/Context.d.ts +0 -63
- package/dist/types/Context.js +0 -93
- package/dist/types/Context.js.map +0 -1
- package/dist/types/Enum.d.ts +0 -24
- package/dist/types/Enum.js +0 -54
- package/dist/types/Enum.js.map +0 -1
- package/dist/types/ErrorOrigin.d.ts +0 -6
- package/dist/types/ErrorOrigin.js +0 -3
- package/dist/types/ErrorOrigin.js.map +0 -1
- package/dist/types/Exception.d.ts +0 -20
- package/dist/types/Exception.js +0 -29
- package/dist/types/Exception.js.map +0 -1
- package/dist/types/Falsy.d.ts +0 -4
- package/dist/types/Falsy.js +0 -8
- package/dist/types/Falsy.js.map +0 -1
- package/dist/types/Func.d.ts +0 -2
- package/dist/types/Func.js +0 -6
- package/dist/types/Func.js.map +0 -1
- package/dist/types/Gateway.d.ts +0 -18
- package/dist/types/Gateway.js +0 -39
- package/dist/types/Gateway.js.map +0 -1
- package/dist/types/Get.d.ts +0 -7
- package/dist/types/Get.js +0 -11
- package/dist/types/Get.js.map +0 -1
- package/dist/types/Id.d.ts +0 -7
- package/dist/types/Id.js +0 -7
- package/dist/types/Id.js.map +0 -1
- package/dist/types/Identity.d.ts +0 -5
- package/dist/types/Identity.js +0 -3
- package/dist/types/Identity.js.map +0 -1
- package/dist/types/Is.d.ts +0 -20
- package/dist/types/Is.js +0 -46
- package/dist/types/Is.js.map +0 -1
- package/dist/types/IsA.d.ts +0 -2
- package/dist/types/IsA.js +0 -8
- package/dist/types/IsA.js.map +0 -1
- package/dist/types/IsDate.d.ts +0 -9
- package/dist/types/IsDate.js +0 -19
- package/dist/types/IsDate.js.map +0 -1
- package/dist/types/IsEqual.d.ts +0 -1
- package/dist/types/IsEqual.js +0 -21
- package/dist/types/IsEqual.js.map +0 -1
- package/dist/types/Json.d.ts +0 -30
- package/dist/types/Json.js +0 -38
- package/dist/types/Json.js.map +0 -1
- package/dist/types/List.d.ts +0 -52
- package/dist/types/List.js +0 -157
- package/dist/types/List.js.map +0 -1
- package/dist/types/Message.d.ts +0 -3
- package/dist/types/Message.js +0 -7
- package/dist/types/Message.js.map +0 -1
- package/dist/types/Meta.d.ts +0 -33
- package/dist/types/Meta.js +0 -51
- package/dist/types/Meta.js.map +0 -1
- package/dist/types/Nullish.d.ts +0 -2
- package/dist/types/Nullish.js +0 -6
- package/dist/types/Nullish.js.map +0 -1
- package/dist/types/Number.d.ts +0 -2
- package/dist/types/Number.js +0 -13
- package/dist/types/Number.js.map +0 -1
- package/dist/types/PageList.d.ts +0 -68
- package/dist/types/PageList.js +0 -126
- package/dist/types/PageList.js.map +0 -1
- package/dist/types/Primitive.d.ts +0 -2
- package/dist/types/Primitive.js +0 -9
- package/dist/types/Primitive.js.map +0 -1
- package/dist/types/Repository.d.ts +0 -15
- package/dist/types/Repository.js +0 -45
- package/dist/types/Repository.js.map +0 -1
- package/dist/types/Result.d.ts +0 -9
- package/dist/types/Result.js +0 -14
- package/dist/types/Result.js.map +0 -1
- package/dist/types/Results.d.ts +0 -12
- package/dist/types/Results.js +0 -25
- package/dist/types/Results.js.map +0 -1
- package/dist/types/Sort.d.ts +0 -8
- package/dist/types/Sort.js +0 -6
- package/dist/types/Sort.js.map +0 -1
- package/dist/types/Tag.d.ts +0 -2
- package/dist/types/Tag.js +0 -11
- package/dist/types/Tag.js.map +0 -1
- package/dist/types/Template.d.ts +0 -7
- package/dist/types/Template.js +0 -45
- package/dist/types/Template.js.map +0 -1
- package/dist/types/Text.d.ts +0 -45
- package/dist/types/Text.js +0 -106
- package/dist/types/Text.js.map +0 -1
- package/dist/types/Try.d.ts +0 -44
- package/dist/types/Try.js +0 -116
- package/dist/types/Try.js.map +0 -1
- package/dist/types/TypeGuard.d.ts +0 -1
- package/dist/types/TypeGuard.js +0 -3
- package/dist/types/TypeGuard.js.map +0 -1
- package/dist/types/Types.d.ts +0 -5
- package/dist/types/Types.js +0 -3
- package/dist/types/Types.js.map +0 -1
- package/dist/types/Uri.d.ts +0 -69
- package/dist/types/Uri.js +0 -85
- package/dist/types/Uri.js.map +0 -1
- package/dist/types/Uuid.d.ts +0 -3
- package/dist/types/Uuid.js +0 -11
- package/dist/types/Uuid.js.map +0 -1
- package/dist/types/Validatable.d.ts +0 -5
- package/dist/types/Validatable.js +0 -7
- package/dist/types/Validatable.js.map +0 -1
- package/dist/types/Value.d.ts +0 -9
- package/dist/types/Value.js +0 -23
- package/dist/types/Value.js.map +0 -1
- package/dist/types/index.d.ts +0 -42
- package/dist/types/index.js +0 -59
- package/dist/types/index.js.map +0 -1
- package/dist/utils/Convert.d.ts +0 -19
- package/dist/utils/Convert.js +0 -26
- package/dist/utils/Convert.js.map +0 -1
- package/dist/utils/If.d.ts +0 -10
- package/dist/utils/If.js +0 -21
- package/dist/utils/If.js.map +0 -1
- package/dist/utils/Loading.d.ts +0 -1
- package/dist/utils/Loading.js +0 -7
- package/dist/utils/Loading.js.map +0 -1
- package/dist/utils/Log.d.ts +0 -2
- package/dist/utils/Log.js +0 -15
- package/dist/utils/Log.js.map +0 -1
- package/dist/utils/Mapper.d.ts +0 -48
- package/dist/utils/Mapper.js +0 -96
- package/dist/utils/Mapper.js.map +0 -1
- package/dist/utils/Promise.d.ts +0 -18
- package/dist/utils/Promise.js +0 -21
- package/dist/utils/Promise.js.map +0 -1
- package/dist/utils/Property.d.ts +0 -16
- package/dist/utils/Property.js +0 -19
- package/dist/utils/Property.js.map +0 -1
- package/dist/utils/Sentence.d.ts +0 -48
- package/dist/utils/Sentence.js +0 -67
- package/dist/utils/Sentence.js.map +0 -1
- package/dist/utils/State.d.ts +0 -7
- package/dist/utils/State.js +0 -13
- package/dist/utils/State.js.map +0 -1
- package/dist/utils/Traverse.d.ts +0 -1
- package/dist/utils/Traverse.js +0 -10
- package/dist/utils/Traverse.js.map +0 -1
- package/dist/utils/View.d.ts +0 -36
- package/dist/utils/View.js +0 -62
- package/dist/utils/View.js.map +0 -1
- package/dist/utils/Wait.d.ts +0 -5
- package/dist/utils/Wait.js +0 -15
- package/dist/utils/Wait.js.map +0 -1
- package/dist/utils/index.d.ts +0 -12
- package/dist/utils/index.js +0 -29
- package/dist/utils/index.js.map +0 -1
- package/dist/validation/Contraints.d.ts +0 -19
- package/dist/validation/Contraints.js +0 -51
- package/dist/validation/Contraints.js.map +0 -1
- package/dist/validation/Validate.d.ts +0 -11
- package/dist/validation/Validate.js +0 -28
- package/dist/validation/Validate.js.map +0 -1
- package/dist/validation/When.d.ts +0 -22
- package/dist/validation/When.js +0 -44
- package/dist/validation/When.js.map +0 -1
- package/dist/validation/index.d.ts +0 -3
- package/dist/validation/index.js +0 -20
- package/dist/validation/index.js.map +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ar=Object.defineProperty;var sr=Object.getOwnPropertyDescriptor;var g=(t,e,n,r)=>{for(var o=r>1?void 0:r?sr(e,n):e,a=t.length-1,f;a>=0;a--)(f=t[a])&&(o=(r?f(e,n,o):f(o))||o);return r&&o&&ar(e,n,o),o};var s=t=>t!=null,Xr=t=>t==null,m=t=>t===""||t===null||t===void 0||R(t)&&t.length===0,J=t=>t!==""&&t!==null&&t!==void 0&&(!R(t)||t.length>0),W=t=>t instanceof String||typeof t=="string",_r=t=>W(t)&&/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)$/.test(t),ot=t=>s(t)&&typeof t=="boolean",at=t=>lt(t)?at(t()):ot(t)?t:!!t,z=t=>s(t)&&typeof t=="number"&&!Number.isNaN(t),ft=t=>t!=null&&typeof t=="object"&&!R(t),to=t=>ft(t)&&Object.getOwnPropertyNames(t).length===0,lt=t=>s(t)&&typeof t=="function",R=t=>s(t)&&t instanceof Array,eo=(t,e)=>lt(t)&&e instanceof t,st=(t,e)=>R(e)&&e.some(n=>n===t),no=(t,e)=>R(t)&&R(e)&&t.some(n=>st(n,e)),Ht=t=>s(t)&&t instanceof Error,Ue=(...t)=>t.some(e=>e==null||e===""||e instanceof Array&&e.length===0||typeof e=="object"&&Object.getOwnPropertyNames(e).length===0),ro=(...t)=>!Ue(...t);var Y=t=>!!t&&typeof t=="function";var qt=t=>t==null||st(typeof t,["string","number","bigint","boolean","symbol"]);var Je=t=>(s(t)&&Y(t)&&t.prototype&&t.prototype.constructor)===t,C=(t,...e)=>Je(t)?new t(...e):Y(t)?t(...e):t,it=(t,e="")=>t?.constructor?.name?.replace(e,"").toLowerCase()??"",D=(t,e)=>(e(t),t),Q=(t,e)=>e(t),ir=(t,e,n)=>!qt(e)&&e instanceof t?e:n?ir(t,n):void 0;var L=(...t)=>t.length>1?t:R(t[0])?t[0]:s(t[0])?[t[0]]:[],ho=(t,...e)=>L(...e).reduce((n,r)=>(n[r[t]]=r,n),{}),wo={merge:(t=[],e=[],n="id",r="id")=>t.map(o=>({...o,...e.find(a=>s(a[r])&&s(o[n])&&a[r]===o[n])})),switch:(t=[],e)=>Q([...t],n=>(D(n.indexOf(e),r=>r!==-1?n.splice(r,1):n.push(e)),n)),splitIn:(t=[],e=2)=>{let n=Array.from({length:e},()=>[]);return t.forEach((r,o)=>n[o%e].push(r)),n}};import"reflect-metadata";var O=(t,...e)=>!qt(t)&&e.every(n=>n.toString()in t),Zt=O;var y=(t,...e)=>Y(t)?t(...e):t,v=(t,e,n)=>y(t)?y(e):y(n),kt=(t,e)=>Y(e)?e(t):t[e];var ct=class{constructor(e,n){this.from=e;this.to=n}},xt={default:new ct(t=>t,t=>t),ignore:new ct(()=>{},()=>{}),toBool:{fromNumber:new ct(t=>t?1:0,t=>t!==0),fromString:new ct(t=>t?"true":"false",t=>t==="true")},toDate:{fromString:new ct(t=>new Date(t).toISOString(),t=>t)},toNumber:{fromString:new ct(t=>l(t),t=>parseInt(t))}};function Ro(t,e,n){return at(t)?C(e,t):C(n,t)}function Oo(t,e,n){return at(t)?C(n,t):C(e,t)}function B(t,e,n){return s(t)?C(e,t):C(n)}function fn(t,e=r=>r,n){return J(t)?C(e,t):C(n,t)}var ko=(...t)=>Ue(...t);function vo(t,e){return e?(console.log(t,e),e):(console.log(t),t)}var ut=class{constructor(e,n){this.property=e;this.options=n;this.options={...n,convert:n?.convert??xt.default}}in=(e={})=>this.options?.convert?.to(e[this.property]??y(this.options?.dflt));out=(e={},n="")=>this.options?.convert?.from(e[n]);toString(){return this.property}};var Wt=class{constructor(e={}){this.state=e}get=(e,n)=>this.state[e]??(this.state[e]=C(n));set=(e,n)=>this.get(e,n)};var lr=t=>O(t,"in","out"),bt=class extends Wt{constructor(n={startFrom:"scratch"},r=""){super();this.options=n;this.property=r}map=Be;get properties(){return this.get("props",()=>d(this).entries().filter(([,n])=>lr(n)))}get keys(){return this.get("keys",()=>this.properties.map(([n])=>n))}get columns(){return this.get("columns",()=>this.properties.mapDefined(([,n])=>fn(n.property,n.property))).distinct()}get droppedIn(){return this.get("droppedIn",()=>this.columns.filter(n=>!this.keys.some(r=>r===n)))}get droppedOut(){return this.get("droppedOut",()=>this.properties.filter(([,n])=>!this.keys.some(r=>r===n.property)).map(([n])=>n))}in(n={}){return T.omit(this.properties.reduce((r,[o,a])=>T.merge(r,{[o]:a.in({...r,...n})}),this.options.startFrom==="source"?n:{}),...this.droppedIn)}out(n={}){return T.omit(this.properties.reduce((r,[o,a])=>T.merge(r,m(a.property)?a.out(n,o):{[a.property??""]:a.out({...r,...n},o)}),this.options.startFrom==="source"?n:{}),...this.droppedOut)}toString(){return this.constructor.name}},Be={item:(t,e)=>new ut(t,e),ignore:(t="")=>({property:t,in:()=>{},out:()=>{}}),skipIn:t=>({property:t,in:()=>{},out:(e={})=>e[t]}),skipOut:t=>({property:t,in:(e={})=>e[t],out:()=>{}}),func:(t,e,n)=>({property:t,in:(r={})=>y(e,r),out:(r={})=>y(n,r)}),add:t=>({property:"",in:(e={})=>y(t,e),out:()=>{}}),map:(t,e="")=>({property:e,in:(n={})=>C(t).in(m(e)?n:n[e]),out:(n={},r="")=>C(t).out(m(r)?n:n[r])}),propsToList:(...t)=>({property:"",in:(e={})=>i(t.map(n=>C(n).in(e))).toJSON(),out:(e={},n="")=>t.reduce((r,o,a)=>{let f=i(e[n])[a],U=o.out(f);return{...r,[o.property]:U??{}}},{})}),list:(t,e)=>({property:e,in:(n={})=>i(n[e]).map(r=>t.in(r)).toJSON(),out:(n={},r="")=>i(m(r)?n:n[r]).map(o=>t.out(o)).toJSON()})};var X=t=>Promise.resolve(t),x=t=>Promise.reject(t),zt={2:(t,e)=>Promise.all([t,e]),3:(t,e,n)=>Promise.all([t,e,n]),4:(t,e,n,r)=>Promise.all([t,e,n,r]),5:(t,e,n,r,o)=>Promise.all([t,e,n,r,o]),all:(t,e)=>Promise.all([t,Promise.all(e)]),spread:(t,...e)=>Promise.all([t,Promise.all(L(e))])},ia=zt[2],la=zt[3],ca=zt[4],ua=zt[5];var H=class{constructor(e,n,r=(n?.sentence??[]).concat(e)){this.sentence=r}toString(){return c(this.sentence.join(" ")).sentence.toString()}},P=class extends H{it=new H("it",this);anything=new H("anything",this);id=e=>new H(`id '${e}'`,this);your=e=>new H(`your ${e??"item"}`,this);a=e=>new H(e?`a ${e}`:"an item",this);an=e=>new H(`an ${e??"item"}`,this);any=e=>new H(`any ${e??"items"}`,this)},jt=class extends H{add=new P("add",this);check=new P("check",this);fetch=new P("fetch",this);find=new P("find",this);like=new P("like",this);process=new P("process",this);remove=new P("remove",this);translate=new P("translate",this);update=new P("update",this);validate=new P("validate",this)},Ke=class extends jt{},$t=class extends jt{not=new Ke("not",this)},He=class extends H{could=new $t("could",this);did=new $t("did",this);added=new P("added",this);checked=new P("checked",this);fetched=new P("fetched",this);found=new P("found",this);liked=new P("liked",this);processed=new P("processed",this);removed=new P("removed",this);translated=new P("translated",this);updated=new P("updated",this);validated=new P("validated",this)},ha=new He("we");var _=(t={},e="")=>{let n=e.split("."),r=n.shift();return n.length===0?t[r]:_(t[r],n.join("."))};var qe=Symbol("view.ignore"),bn=Symbol("view.keep"),cr=(t,e)=>E(e).is.not.defined(n=>n,{key:t,f:()=>{}}).type(ot,n=>({key:t,f:()=>n})).equals(qe,{key:t,f:()=>{}}).equals(bn,{key:t,f:n=>_(n,t)}).type(W,n=>({key:t,f:r=>_(r,n)})).type(Je,n=>({key:t,f:(r,o)=>Q(_(r,o),a=>R(a)?a.map(f=>xn(n,f)):xn(n,a))})).type(dr,n=>({key:t,f:r=>n.from(_(r,t))})).type(lt,n=>({key:t,f:n})).else(n=>({key:t,f:()=>n})),xn=(t,e)=>B(e,n=>new t(n),()=>e),ur=t=>d(t).entries().map(([e,n])=>cr(e,n)),Yt=class t{constructor(e={},n="scratch",r=ur(e)){this.views=e;this.startsFrom=n;this.viewers=r}get fromSource(){return new t(this.views,"source",this.viewers)}from(e){return Sn(e)?h(e.map(n=>this.reduce(n)),e):R(e)?e.map(n=>this.reduce(n)):this.reduce(e)}same=(e,n)=>Qt(this.from(e),this.from(n));reduce=e=>Q(We(e),n=>this.viewers.reduce((r,o)=>T.set(r,o.key,o.f(n,o.key)),this.startsFrom==="scratch"?{}:n))},dr=t=>t instanceof Yt,Ze=t=>new Yt(t),Aa={ignore:qe,keep:bn,skip:qe,value:t=>()=>t,or:{key:t=>(e,n)=>_(e,n)??_(e,t),value:t=>(e,n)=>_(e,n)??t,func:t=>(e,n)=>_(e,n)??t(e,n)}};var ze=class{static wait(e=0){return new Promise(n=>setTimeout(n,e))}static seconds(e=0){return this.wait(e*1e3)}},Oa=t=>ze.wait(t);var pr=t=>O(t,"toJSON"),T={parse:t=>JSON.parse(JSON.stringify(t??{})),merge:(...t)=>T.parse(t.map(e=>We(e,n=>T.parse(n))).reduce((e,n)=>({...e,...n}),{})),delete:(t,e)=>(B(t,()=>delete t[e]),t),set:(t,e="",n)=>m(e)?t:n!==void 0?{...t,[e]:n}:T.delete(t,e),omit:(t,...e)=>e.reduce((n,r)=>T.delete(n,r),T.parse(t)),defaults:(t={},e={})=>T.merge(e,t)},$e=T.merge,We=(t,e={})=>pr(t)?t.toJSON():ft(t)?t:y(e,t),je=class{constructor(e){this.value=e}merge=(...e)=>Xt(T.merge(this.value,...e));delete=e=>Xt(T.delete(this.value,e));omit=(...e)=>Xt(T.omit(this.value,...e));set=(e,n)=>Xt(T.set(this.value,e,n));toJSON(){return this.value}},Xt=t=>new je(t);var Ye=class t{constructor(e,n=!0,r){this.subject=e;this.valid=n;this.results=r}get not(){return this.clone(!this.valid)}get and(){return this.clone(this.valid)}get isDefined(){return this.clone(this.valid===s(this.subject))}get isEmpty(){return this.clone(this.valid===m(this.subject))}get isTrue(){return this.clone(this.valid===!!this.subject)}get isValid(){return this.results=F(this.subject),this.clone(this.valid===this.results.isValid)}isInstance=e=>this.clone(this.valid===this.subject instanceof e);with=e=>this.clone(this.valid===y(e,this.subject));contains=e=>this.clone(this.valid===s(y(e,this.subject)));in=(...e)=>this.clone(this.valid===st(this.subject,L(...e)));is=e=>this.clone(this.valid===(this.subject===e));reject=e=>this.valid?x(y(e,this.subject)??this.results??u.Unknown):X(this.subject);recover=e=>X(this.valid?e(this.subject):this.subject);clone=(e=!0)=>new t(this.subject,e,this.results)},I=t=>new Ye(t);var _t=(t,e,n={})=>tt(j(c(e).parse(t,n),it(t))),mr=t=>d(t).keys("constraint").reduce((e,n)=>e.add(n),i()),yr=(t,e)=>p(()=>lt(e[t.property])?e[t.property]():e[t.property]).map(n=>[n,t.constraint(n)]).map(([n,r])=>ee(r)?r:r?tt():_t(e,t.text,{...t,actual:n})).recover(n=>_t(e,l(n))).value,hr=t=>p(()=>mr(t)).map(e=>e.mapDefined(n=>yr(n,t))).map(e=>e.reduce((n,r)=>n.add(...r.results),tt())).value,F=t=>E(t).is.not.defined(e=>e,()=>tt("Subject is not defined.")).type(te,e=>e.isValid?tt():_t(e,"This is not a valid {type}.")).type(En,e=>e.isValid?tt():_t(e,"This is not a valid {type}.")).type(R,e=>e.map(n=>F(n)).reduce((n,r)=>n.add(...r.results),tt())).type(ne,e=>hr(e)).else(tt()),ds=t=>I(t).not.isValid.reject();var G=(t,e)=>(n,r)=>{let o=d(n).property(r).get("constraint")??i();d(n).property(r).set("constraint",o.add({property:r,constraint:t,text:e}))},xs=t=>G(e=>s(e),t??"Property {property} must be defined."),b=t=>G(e=>J(e),t??"Property {property} is required, and may not be empty."),bs=t=>G(e=>J(e),t??"Property {property} may not be empty."),re=()=>G(t=>F(t),""),Ss=()=>G(t=>!s(t)||F(t),""),Es=(t,e)=>G(n=>s(n)&&W(n)&&n.includes(t),e??`Value {actual} must include '${t}'.`),Ps=(t,e)=>G(n=>s(n)&&st(n,t),e??"Value {actual} must appear in list."),Cs=(t,e)=>G(n=>n>t,e??`Value {actual} must be larger than '${t}'.`),Ns=(t,e)=>G(n=>n>=t,e??`Value {actual} must be larger than or equal to ${t}.`),As=(t,e)=>G(n=>n<t,e??`Value {actual} must be smaller than ${t}.`),Rs=(t,e)=>G(n=>n<=t,e??`Value {actual} must be smaller than or equal to ${t}.`),Os=t=>G(e=>Pn(e),t??"Value {actual} must lay in the past."),Ls=t=>G(e=>Cn(e),t??"Value {actual} must lay in the future."),Is=(t,e)=>G(n=>p(()=>n).is.defined().map(r=>c(r).toString().length>=t).orElse(!0),e??`Value {actual} must be at least '${t}' characters long.`),ks=(t,e)=>G(n=>p(()=>n).is.defined().map(r=>c(r).toString().length<=t).orElse(!0),e??`Value {actual} cannot be longer than '${t}' characters.`),Ms=t=>G(e=>lt(e)?e():ot(e)?e:!1,t??"Value {actual} must be true");var Mt=class t{is={defined:e=>this.filter(n=>s(e?e(n):n)),empty:e=>this.filter(n=>m(e?e(n):n)),valid:e=>this.filter(n=>F(e?e(n):n).isValid),true:e=>this.filter(n=>at(e?e(n):n)),false:e=>this.filter(n=>!at(e?e(n):n)),not:{defined:e=>this.filter(n=>!s(e?e(n):n)),empty:e=>this.filter(n=>!m(e?e(n):n)),valid:e=>this.filter(n=>!F(e?e(n):n).isValid)}};if=this.is;static of=(e,...n)=>{try{let r=y(e,...n);return new Qe(r instanceof t?r.value:r)}catch(r){return new Xe(r)}}},Qe=class extends Mt{constructor(n){super();this.value=n}get error(){throw new Error("No error found")}get isValid(){return!0}map(n){return p(n,this.value)}recover(n){return this}recoverFrom(n,r){return this}accept(n){return p(()=>(n(this.value),this))}filter(n){return p(()=>{if(n(this.value))return this;throw new Error(`Applying filter(${n.toString()}) failed.`)})}or(n){return this.value}orElse(n){return this.value}orThrow(n){return this.value}},Xe=class t extends Mt{constructor(n){super();this.error=n}get value(){throw this.error}get isValid(){return!1}map(n){return new t(this.error)}recover(n){return p(n,this.error)}recoverFrom(n,r){return p(()=>this.error instanceof n?this.recover(r):this)}accept(n){return this}filter(n){return this}or(n){return y(n)}orElse(n){return y(n)}orThrow(n){throw C(n)}},p=(t,...e)=>Mt.of(t,...e);var vt=class extends Array{asc(e){return this.sort((n,r)=>kt(n,e)>kt(r,e)?1:-1)}desc(e){return this.sort((n,r)=>kt(n,e)<kt(r,e)?1:-1)}first(e,n){return e?this.find(e,n):this[0]}firstValue(e,n){return p(()=>this.first(r=>!!e(r))).map(r=>r?e(r):y(n,r)).value}isFirst(e){return e===this.first()}next(e,n){return e?this[this.findIndex(e,n)+1]:this[0]}prev(e,n){return e?this[this.findIndex(e,n)-1]:this[0]}last(e,n){return e?this.filter(e,n).last():this[this.length-1]}isLast(e){return e===this.last()}overlaps(...e){return i(...e).some(n=>this.some(r=>n===r))}diff(e){return this.filter(n=>!e.includes(n))}diffByKey(e,n){return this.filter(r=>!e.some(o=>o[n]===r[n]))}intersect(e){return this.filter(n=>e.includes(n))}intersectByKey(e,n){return this.filter(r=>e.some(o=>o[n]===r[n]))}toJSON(){return this.reduce((e,n)=>(e.push(T.parse(n)),e),new Array)}map(e,n){return i(super.map(e,n))}flatMap(e,n){return i(super.flatMap(e,n))}mapDefined(e,n){return this.map(e,n).defined()}mapAsync(e){return Promise.all(super.map(n=>e(n))).then(n=>i(n))}distinct(){return this.filter((e,n)=>this.indexOf(e)===n)}distinctByKey(e){return d(this.toObject(e)).values()}filter(e,n){return i(super.filter(e,n))}sum(e){return this.reduce((n,r)=>n+e(r),0)}byId(e){return this.first(n=>l(n.id)===l(e))}add(...e){return super.push(...L(...e)),this}concat(...e){return i(super.concat(...e))}reverse(){return i(super.reverse())}splice(e,n,...r){return i(super.splice(e,n,...r))}remove(e){let n=this.indexOf(e);return n>-1&&this.splice(n,1),this}replace(e,n){return p(()=>n[e]).map(r=>this.findIndex(o=>o[e]===r)).filter(r=>r>-1).map(r=>this[r]=n),this}switch(e){return this.includes(e)?this.remove(e):this.add(e)}defined(){return this.reduce((e,n)=>s(n)?e.add(n):e,i())}toObject(e,n={}){return this.reduce((r,o)=>(r[o[e]]=o,n.deleteKey&&delete r[o[e]][e],r),{})}toObjectList(e){return this.reduce((n,r)=>{let o=r[e];return n[o]=n[o]??i(),n[o].push(r),n},{})}orElse(...e){return m(this)?m(...e)?void 0:i(...e):this}weave(e,n){for(let r=n,o=0;r<=this.length&&o<e.length;r+=n+1)this.splice(r,0,e[o++]);return this}slice(e,n){return i(super.slice(e,n))}},i=(...t)=>new vt().add(...t),Nn=t=>s(t)&&R(t)&&O(t,"first","last","asc","desc"),An=(t,e=[])=>i(L(e).map(n=>new t(n)));var _e=class{constructor(e,n=(e.prototype??e).constructor){this.subject=e;this.data=n}get=e=>Reflect.getMetadata(e,this.data);set=(e,n)=>(Reflect.defineMetadata(e,n,this.data),n);entries=()=>i([...Object.entries(this.subject),...Object.entries(Object.getPrototypeOf(this.subject))]);parse=(e,n={})=>{let{initial:r={},skipUndefined:o=!1}=n;return this.entries().reduce((a,[f,U])=>Q(e(U),Tn=>s(Tn)||!o?D(a,or=>or[f]=Tn):a),r)};properties=e=>i([...Object.getOwnPropertyNames(this.subject),...Object.getOwnPropertyNames(Object.getPrototypeOf(this.subject))]).map(n=>this.property(n)).filter(n=>e?n.get(e):n);keys=e=>this.properties().map(n=>n.get(e)).reduce((n,r)=>r?n.add(r):n,i());values=()=>i([...Object.values(this.subject),...Object.values(Object.getPrototypeOf(this.subject))]);property=e=>new tn(this.subject,e)},tn=class{constructor(e,n,r=Reflect.getMetadata(n,e)){this.subject=e;this.property=n;this.data=r}get value(){return this.subject[this.property]}get=e=>s(this.data)&&s(this.data[e])?this.data[e]:void 0;set=(e,n)=>(Reflect.defineMetadata(this.property,{...this.data,[e]:n},this.subject),n)},d=t=>new _e(t??{}),oe=t=>d(t).entries();var en=class{constructor(e,n={},r={}){this.template=e;this.subject=n;this.options=r}toString=()=>d(this.options).entries().reduce((e,[n])=>this.option(e,n),this.object()).replace(" "," ");value=(e,n)=>p(()=>n.split(".")).map(r=>[r,r.splice(1)]).map(([r,o])=>o.reduce((a,f)=>a[f],c(e[r[0]]))).map(r=>r.toString()).value;props=(e,n,r=i())=>{let o=e.indexOf(`{${n}`);if(o<0)return r;let a=e.indexOf("}",o);return this.props(e.slice(a+1),n,r.add(e.substring(o+1,a)))};object=()=>this.props(this.template,"this").reduce((e,n)=>e.replace(`{${n}}`,this.value(this.subject,n.replace("this.",""))),this.template);option=(e,n)=>this.props(e,n).reduce((r,o)=>r.replace(`{${o}}`,this.value(this.options,o)),e)},Rn=(t,e,n={})=>new en(l(t),e,{type:it(e),...n});var wr=t=>s(t)&&Y(t.toString),l=(t,e="")=>(wr(t)?t:y(e)).toString(),gr=(t,e,n="")=>l(t).split(l(e)).join(l(n)),Ri=(t="")=>t.replace(/[^a-z\d]+/gi,"-").replace(/-$/,"").replace(/^-/,"").toLowerCase(),nn=class{constructor(e){this.subject=e}get cap(){return this.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())}get title(){return this.map(e=>e.split(" ").map(n=>c(n).cap).join(" "))}get pascal(){return this.title.replace(" ","")}get lower(){return this.map(e=>e.toLowerCase())}get upper(){return this.map(e=>e.toUpperCase())}get camel(){return this.title.trim.map(e=>`${e.charAt(0).toLowerCase()}${e.slice(1)}`)}get kebab(){return this.lower.replace(" ","-")}get strictKebab(){return this.map(e=>e.replace(/[^a-z\d]+/gi," ").trim()).kebab}get snake(){return this.upper.replace(" ","_")}get plural(){return this.ifLike("")??this.add("s")}get space(){return this.map(e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]/g," "))}get sentence(){return this.isEmpty?this:this.map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}.`)}get initials(){return this.map(e=>e.split(" ").map(n=>n[0]).join(""))}get trim(){return this.map(e=>e.replace(/[- ,_#]/g,""))}get isEmpty(){return m(this.toString())}parse=(e,n={})=>c(Rn(this.subject,e,{type:it(e),...n}));is=(...e)=>e.some(n=>this.toString()===c(n).toString());equals=this.is;isLike=(...e)=>e.some(n=>this.trim.lower.is(c(n).trim.lower));ifLike=(...e)=>this.isLike(...e)?this:void 0;endsWith=e=>this.subject.endsWith(l(e));startsWith=e=>this.subject.startsWith(l(e));first=e=>this.map(n=>n.substring(0,e));last=e=>this.map(n=>n.substring(n.length-e));map=e=>c(y(e,this.subject));replace=(e,n)=>this.map(r=>gr(r,e,n));add=(e,n="")=>this.map(r=>J(e)?`${r}${n}${c(e)}`:r);with=(e,...n)=>this.map(r=>i(r).add(...n.map(o=>c(o).toString())).filter(o=>J(o)).join(e));toString(){return this.subject}toJSON(){return this.subject}},c=(t,e="")=>{let n=t?l(t):e;return new nn(n!=="[object Object]"?n:"")};var ae=class t{static state={};static singleton=(e,...n)=>t.state[l(e)]??(t.state[l(e)]=new e(...n));static reset=()=>{t.state={}}},Tr={singleton:(t,...e)=>ae.singleton(t,...e),reset:()=>ae.reset()},Ii=(t,...e)=>Tr.singleton(t,...e);var fr=t=>({expiresIn:t.expiresIn??"5m",store:t.store}),vi=t=>e=>{d(e).set("cache",fr(t))};var et=t=>Ft(t.replace(/[a-z]/g,"")),se={toMilliseconds:t=>E(l(t)).case(e=>e.endsWith("ms"),e=>et(e)).case(e=>e.endsWith("s"),e=>et(e)*1e3).case(e=>e.endsWith("m"),e=>et(e)*60*1e3).case(e=>e.endsWith("h"),e=>et(e)*3600*1e3).case(e=>e.endsWith("d"),e=>et(e)*24*3600*1e3).else(t),toSeconds:t=>E(l(t)).case(e=>e.endsWith("ms"),e=>et(e)/1e3).case(e=>e.endsWith("s"),e=>et(e)).case(e=>e.endsWith("m"),e=>et(e)*60).case(e=>e.endsWith("h"),e=>et(e)*3600).case(e=>e.endsWith("d"),e=>et(e)*24*3600).else(t)};var rn=class{constructor(e){this.v=e}case(e,n){return new q(this.v).case(e,n)}type(e,n){return new q(this.v).type(e,n)}equals(e,n){return new q(this.v).equals(e,n)}is={defined:(e,n)=>new q(this.v).case(s(e(this.v)),n),empty:(e,n)=>new q(this.v).case(m(e(this.v)),n),valid:(e,n)=>new q(this.v).case(F(e(this.v)).isValid,n),not:{defined:(e,n)=>new q(this.v).case(!s(e(this.v)),n),empty:(e,n)=>new q(this.v).case(!m(e(this.v)),n),valid:(e,n)=>new q(this.v).case(!F(e(this.v)).isValid,n)}};if=this.is},q=class t{constructor(e,n){this.value=e;this.outcome=n}case(e,n){return p(e,this.value).is.true().map(()=>y(n,this.value)).map(r=>new ie(this.value,r)).or(this)}type(e,n){return p(e,this.value).is.true().map(()=>n(this.value)).map(r=>new ie(this.value,r)).or(this)}equals(e,n){return this.case(this.value===e,n)}is={defined:(e,n)=>new t(this.value).case(s(e(this.value)),n),empty:(e,n)=>new t(this.value).case(m(e(this.value)),n),valid:(e,n)=>new t(this.value).case(F(e(this.value)).isValid,n),not:{defined:(e,n)=>new t(this.value).case(!s(e(this.value)),n),empty:(e,n)=>new t(this.value).case(!m(e(this.value)),n),valid:(e,n)=>new t(this.value).case(!F(e(this.value)).isValid,n)}};if=this.is;else(e){return y(e,this.value)}},ie=class extends q{constructor(n,r){super(n,r);this.value=n;this.outcome=r}case(n,r){return this}type(n,r){return this}equals(n,r){return this}is={defined:(n,r)=>this,empty:(n,r)=>this,valid:(n,r)=>this,not:{defined:(n,r)=>this,empty:(n,r)=>this,valid:(n,r)=>this}};if=this.is;else(n){return this.outcome}},E=t=>new rn(t);var on=class{domain=process.env.DOMAIN??"easy";name=process.env.ENVIRONMENT_NAME??"";host=process.env.HOST??"";port=Number.parseInt(process.env.PORT??"8080");app=process.env.APP??"";get=(e,n)=>p(()=>c(e).map(r=>r.replace(/([a-z])([A-Z])/g,"$1 $2")).snake.toString()).map(r=>process.env[r]??n).value},le=class{state={};get token(){return this.get("token")}set token(e){this.set("token",e)}get identity(){return this.token}get jwt(){return this.get("jwt")}set jwt(e){this.set("jwt",e)}get correlationId(){return this.get("correlationId")}set correlationId(e){this.set("correlationId",e)}get lastError(){return this.get("lastError")}set lastError(e){this.set("lastError",e)}get(e){return this.state[e]}set(e,n){return this.state[e]=n}create=e=>e();wrap=e=>e()},On=class extends le{},an=class{constructor(e={}){this.state=e;this.state={env:new on,request:new le,other:{},...this.state}}get env(){return this.state.env}set env(e){this.state.env=e}get request(){return this.state.request}set request(e){this.state.request=e}get other(){return this.state.other}},k=new an;var w=class{constructor(e,n=e.toLowerCase(),r=n.toString()){this.name=e;this.id=n;this.code=r}get isValid(){return s(this.id)}static all(){return d(this.allTuple()).values()}static allTuple(){return d(this).get(`all-${this.name}`)??d(this).set(`all-${this.name}`,d(this).values().filter(te).toObject("id"))}static filter(e,n){return this.all().filter(e,n)}static first(e,n){return this.all().first(e,n)}static byIds(e=[]){return i(e).mapDefined(n=>this.byId(n)).distinct()}static byId(e,n){return this.allTuple()[e]??y(n)}equals(e){return this.id===(te(e)?e.id:e)}isIn(...e){return e.some(n=>this.equals(n))}toJSON(){return this.id}toString(){return this.id.toString()}},te=t=>s(t)&&t instanceof w&&Zt(t,"name","id","code");var u=class t extends w{constructor(n,r,o){super(n,r??c(n).pascal.toString());this.message=n;this.reason=o}static AlreadyExists=new t("Subject already exists");static DoesNotExist=new t("Does not exist");static IsMissingId=new t("Subject is missing an id");static IsNotImplemented=new t("Is not implemented");static IsNotValid=new t("Is not valid");static Unknown=new t("Unknown error");static CouldNotExecute=n=>new t(`Could not execute ${n}.`,"CouldNotExecute");static CouldNotValidate=n=>new t(`Could not validate ${n}.`,"CouldNotValidate");static EnvironmentVariableNotFound=n=>new t(`Environment variable ${c(n).upper} could not be found.`,"EnvironmentVariableNotFound");because=n=>new t(this.message,this.id,n)},sl=(t,e)=>t instanceof u&&(s(e)?t.equals(l(e)):!0),il=t=>t instanceof u&&u.DoesNotExist.equals(t);var xr=t=>!t,cl=t=>!xr(t);var dt=class{all(e){return x(u.IsNotImplemented)}byId(e,n){return x(u.IsNotImplemented)}by(e,n,r){return x(u.IsNotImplemented)}byIds(...e){return x(u.IsNotImplemented)}search(e,n){return x(u.IsNotImplemented)}filter(e){return x(u.IsNotImplemented)}exists(e,n){return x(u.IsNotImplemented)}add(e,n){return x(u.IsNotImplemented)}update(e,n){return x(u.IsNotImplemented)}remove(e,n){return x(u.IsNotImplemented)}};import{v4 as br}from"uuid";var Sr=new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i),wl=t=>W(t)&&Sr.test(t),St=()=>br();var ce=()=>St();var ue=t=>t instanceof Date&&!isNaN(t.getTime()),Et={add:(t,e)=>(t.setDate(t.getDate()+e),t),today:()=>new Date,yesterday:()=>Et.add(Et.today(),-1),tomorrow:()=>Et.add(Et.today(),1)},Pn=t=>ue(t)&&t<=Et.today(),Cn=t=>ue(t)&&t>Et.today();var Er=(t,e)=>E([t,e]).case(([n,r])=>!R(n)||!R(r),!1).case(([n,r])=>n?.length!==r?.length,!1).else(([n,r])=>!n.some((o,a)=>!Qt(o,r[a]))),Pr=(t,e)=>E([Object.keys(t),Object.keys(e)]).case(([n,r])=>n.length!==r.length,!1).case(([n,r])=>n.some(o=>!r.includes(o)),!1).case(([n])=>n.some(r=>!Qt(t[r],e[r])),!1).else(!0),Qt=(t,e)=>E([t,e]).case(([n,r])=>n===r,!0).case(([n,r])=>R(n)||R(r),([n,r])=>Er(n,r)).case(([n,r])=>n==null||r==null||!ft(n)&&!ft(r),([n,r])=>n!==n&&r!==r).else(([n,r])=>Pr(n,r));var Nl=(t,...e)=>Y(t)?t(...e):t;var Rl=t=>t==null;var Ft=(t,e)=>p(()=>l(t)).map(n=>parseInt(n)).filter(n=>z(n)).or(y(e)??NaN);var Kl=(t,e)=>Cr(t,t,e),Cr=(t,e,n)=>({field:t,shortField:e,values:[{value:n}]}),de=class extends vt{_options;setPageOptions(e){return this._options=e,this}get take(){return this._options?.take??250}get skip(){return this._options?.skip??0}get total(){return this._options?.total}get sorts(){return this._options?.sorts}get filters(){return this._options?.filters}get meta(){return{take:this.take,skip:this.skip,total:this.total,sorts:this.sorts,filters:this.filters}}get options(){return this._options}asc(e){return h(super.asc(e),this)}desc(e){return h(super.desc(e),this)}diff(e){return h(super.diff(e),this)}diffByKey(e,n){return h(super.diffByKey(e,n),this)}intersect(e){return h(super.intersect(e),this)}intersectByKey(e,n){return h(super.intersectByKey(e,n),this)}map(e,n){let r=super.map(e,n);return h(r,this)}flatMap(e,n){return h(super.flatMap(e,n),this)}mapDefined(e,n){return h(super.mapDefined(e,n),this)}mapAsync(e){return super.mapAsync(e).then(n=>h(n,this))}distinct(){return h(super.distinct(),this)}distinctByKey(e){return h(super.distinctByKey(e),this)}filter(e,n){return h(super.filter(e,n),this)}concat(...e){return h(super.concat(...e),this)}reverse(){return h(super.reverse(),this)}splice(e,n,...r){return h(super.splice(e,n,...r),this)}remove(e){return h(super.remove(e),this)}replace(e,n){return h(super.replace(e,n),this)}switch(e){return h(super.switch(e),this)}defined(){return h(super.defined(),this)}orElse(...e){return h(super.orElse(...e),this)}slice(e,n){return h(super.slice(e,n),this)}},Sn=t=>Nn(t)&&O(t,"total"),h=(t=[],e)=>E(t).case(n=>n.length===1&&z(n[0]),n=>new de().add(...n)).else(n=>new de(...n)).setPageOptions(e),Hl=(t,e=h())=>e.map(n=>C(t,n));var Pt=class{all(e){return x(u.IsNotImplemented)}byId(e){return x(u.IsNotImplemented)}byIds(...e){return x(u.IsNotImplemented)}byKey(e,n){return x(u.IsNotImplemented)}by(e,n,r){return x(u.IsNotImplemented)}search(e,n){return x(u.IsNotImplemented)}filter(e){return x(u.IsNotImplemented)}exists(e){return x(u.IsNotImplemented)}add(e){return x(u.IsNotImplemented)}update(e,n){return x(u.IsNotImplemented)}remove(e){return x(u.IsNotImplemented)}upsert(e,n){return x(u.IsNotImplemented)}};var j=(t,e,n=k.env.domain)=>({message:t.toString(),location:e?.toString(),domain:n?.toString()}),pe=t=>O(t,"message");var Ln=(...t)=>L(...t).map(e=>pe(e)?e:j(e)),me=class{results;constructor(...e){this.results=Ln(...e)}get length(){return this.results.length}get isValid(){return this.results.length===0}add=(...e)=>tt(...this.results,...Ln(...e))},tt=(...t)=>new me(...t),ee=t=>s(t)&&t instanceof me;var cc=1,uc=-1;var Nr=t=>(e,n)=>{d(e).property(n).set(t,n)},Ar=()=>Nr(Ar.name);var Ct=(t,{segment:e,query:n}={})=>({key:t,segment:e,query:n,toString:()=>l(t)}),V={host:t=>Ct(t,{segment:t??k.env.host??"$host"}),resource:t=>Ct(it(t,"Uri"),{segment:it(t,"Uri")}),segment:t=>Ct(t,{segment:t}),path:t=>Ct(t,{segment:`:${t}`}),query:t=>Ct(t,{query:e=>s(e)?`${t}=${e}`:""}),boolean:t=>Ct(t,{query:e=>at(e)?`${t}`:""})},ye=(...t)=>i(t).mapDefined(e=>e.segment).join("/"),he=class t{constructor(e=[]){this.segments=e}static id=V.path("id");static ids=V.query("ids");static query=V.query("q");static sort=V.query("s");static skip=V.query("skip");static take=V.query("take");host=V.host();resource=V.resource(this);state={};get path(){return ye(V.segment(""),this.resource,...this.segments)}get complete(){return ye(this.host,this.resource,...this.segments)}get isInternal(){return ye(this.host)===(k.env.host??"$host")}get props(){return d(this.state).values()}route=(e=this.resource.key)=>ye(V.segment(""),V.segment(e?.toLowerCase()),...this.segments);set=(e,n)=>(p(n).is.defined().accept(r=>this.state[e.key??""]={segment:e,value:r}),this);toString(){return p(()=>this.props).map(e=>e.filter(n=>n.segment?.segment)).map(e=>e.reduce((n,r)=>n.replace(l(r.segment.segment),l(r.value)),this.complete)).map(e=>({route:e,query:this.props.mapDefined(n=>n.segment?.query?n.segment?.query(n.value):void 0)?.join("&")})).map(({route:e,query:n})=>J(n)?`${e}?${n}`:e).value}id=e=>this.set(t.id,e);ids=e=>this.set(t.ids,L(e).join(","));query=e=>this.set(t.query,e);sort=e=>this.set(t.sort,l(e));skip=e=>this.set(t.skip,e);take=e=>this.set(t.take,e);expand(e){return oe(e).filter(([n,r])=>J(r)).reduce((n,[r,o])=>ot(o)?n.set(V.boolean(r),o):n.set(V.query(r),L(o).join(",")),this)}};var ne=t=>O(t,"isValid");var M=class{constructor(e){this.value=e;this.value=e}get isValid(){return s(this.value)}toJSON(){return this.value}toString(){return l(this.value)}},En=t=>t instanceof M;var we=class{constructor(e,n,r){this.key=e;this.operator=n;this.value=r}and=(...e)=>new ge("and",[this,...e]);or=(...e)=>new ge("or",[this,...e]);toJSON(){return{[this.key]:{[`$${this.operator}`]:T.parse(this.value)}}}},ge=class{constructor(e,n){this.operator=e;this.conditions=n}toJSON(){return{[`$${this.operator}`]:this.conditions.map(e=>e.toJSON())}}},Nt=class extends we{constructor(n,r){super(n,"",r);this.key=n;this.value=r}toJSON(){return{[this.key]:this.value}}},In=(t,e,n,r=xt.default)=>new we(t,e,r.from(n)),Au=t=>s(t)&&t instanceof Nt;var kn=class extends dt{constructor(n){super();this.data=n}all(n){return this.data.then(r=>h(r,r))}byId(n){return this.data.then(r=>r.byId(n)).then(r=>r?{...r}:void 0)}by=(n,r)=>this.data.then(o=>o.filter(a=>a[n]===r));exists(n){return this.byId(n).then(r=>s(r))}add(n){return I(n).not.contains(r=>r.id).reject(u.IsMissingId).then(r=>this.exists(r.id)).then(r=>I(r).isTrue.reject(u.AlreadyExists)).then(()=>this.data.then(r=>r.add(n))).then(()=>({...n}))}remove(n){return this.data.then(r=>I(r.findIndex(o=>o.id===n)).with(o=>o<0).reject(u.DoesNotExist).then(o=>r.splice(o,1))).then(()=>!0)}update(n){return I(n).not.contains(r=>r.id).reject(u.IsMissingId).then(r=>this.remove(r.id).then(()=>this.add(r)))}};var sn=class{},Te=class t extends w{constructor(n,r,o){super(n);this.provider=r;this.options=o}static Default=new t("Default",sn);provide=()=>C(this.provider,this)};var ln=class extends ut{is=e=>this.condition("eq",e);isNot=e=>this.condition("ne",e);isIn=(...e)=>this.condition("in",L(e));notIn=(...e)=>this.condition("nin",L(e));exists=e=>this.condition("exists",e);greater=e=>this.condition("gt",e);greaterEqual=e=>this.condition("gte",e);less=e=>this.condition("lt",e);lessEqual=e=>this.condition("lte",e);asc=()=>new Nt(this.property,1);desc=()=>new Nt(this.property,-1);condition=(e,n)=>In(this.property,e,n,this.options?.convert)},Zu=t=>s(t)&&t instanceof ln;var pt=class t extends w{constructor(n,r,o=c(r).lower.trim.toString()){super(n,r);this.lower=o}static AF=new t("Afghanistan","AF");static AX=new t("\xC5land Islands","AX");static AL=new t("Albania","AL");static DZ=new t("Algeria","DZ");static AS=new t("American Samoa","AS");static AD=new t("Andorra","AD");static AO=new t("Angola","AO");static AI=new t("Anguilla","AI");static AQ=new t("Antarctica","AQ");static AG=new t("Antigua & Barbuda","AG");static AR=new t("Argentina","AR");static AM=new t("Armenia","AM");static AW=new t("Aruba","AW");static AU=new t("Australia","AU");static AT=new t("Austria","AT");static AZ=new t("Azerbaijan","AZ");static BS=new t("Bahamas","BS");static BH=new t("Bahrain","BH");static BD=new t("Bangladesh","BD");static BB=new t("Barbados","BB");static BY=new t("Belarus","BY");static BE=new t("Belgium","BE");static BZ=new t("Belize","BZ");static BJ=new t("Benin","BJ");static BM=new t("Bermuda","BM");static BT=new t("Bhutan","BT");static BO=new t("Bolivia","BO");static BA=new t("Bosnia & Herzegovina","BA");static BW=new t("Botswana","BW");static BV=new t("Bouvet Island","BV");static BR=new t("Brazil","BR");static IO=new t("British Indian Ocean Territory","IO");static VG=new t("British Virgin Islands","VG");static BN=new t("Brunei","BN");static BG=new t("Bulgaria","BG");static BF=new t("Burkina Faso","BF");static BI=new t("Burundi","BI");static KH=new t("Cambodia","KH");static CM=new t("Cameroon","CM");static CA=new t("Canada","CA");static CV=new t("Cape Verde","CV");static BQ=new t("Caribbean Netherlands","BQ");static KY=new t("Cayman Islands","KY");static CF=new t("Central African Republic","CF");static TD=new t("Chad","TD");static CL=new t("Chile","CL");static CN=new t("China","CN");static CX=new t("Christmas Island","CX");static CC=new t("Cocos (Keeling) Islands","CC");static CO=new t("Colombia","CO");static KM=new t("Comoros","KM");static CG=new t("Congo - Brazzaville","CG");static CD=new t("Congo - Kinshasa","CD");static CK=new t("Cook Islands","CK");static CR=new t("Costa Rica","CR");static CI=new t("C\xF4te d\u2019Ivoire","CI");static HR=new t("Croatia","HR");static CU=new t("Cuba","CU");static CW=new t("Cura\xE7ao","CW");static CY=new t("Cyprus","CY");static CZ=new t("Czechia","CZ");static DK=new t("Denmark","DK");static DJ=new t("Djibouti","DJ");static DM=new t("Dominica","DM");static DO=new t("Dominican Republic","DO");static EC=new t("Ecuador","EC");static EG=new t("Egypt","EG");static SV=new t("El Salvador","SV");static GQ=new t("Equatorial Guinea","GQ");static ER=new t("Eritrea","ER");static EE=new t("Estonia","EE");static SZ=new t("Eswatini","SZ");static ET=new t("Ethiopia","ET");static FK=new t("Falkland Islands","FK");static FO=new t("Faroe Islands","FO");static FJ=new t("Fiji","FJ");static FI=new t("Finland","FI");static FR=new t("France","FR");static GF=new t("French Guiana","GF");static PF=new t("French Polynesia","PF");static TF=new t("French Southern Territories","TF");static GA=new t("Gabon","GA");static GM=new t("Gambia","GM");static GE=new t("Georgia","GE");static DE=new t("Germany","DE");static GH=new t("Ghana","GH");static GI=new t("Gibraltar","GI");static GR=new t("Greece","GR");static GL=new t("Greenland","GL");static GD=new t("Grenada","GD");static GP=new t("Guadeloupe","GP");static GU=new t("Guam","GU");static GT=new t("Guatemala","GT");static GG=new t("Guernsey","GG");static GN=new t("Guinea","GN");static GW=new t("Guinea-Bissau","GW");static GY=new t("Guyana","GY");static HT=new t("Haiti","HT");static HM=new t("Heard & McDonald Islands","HM");static HN=new t("Honduras","HN");static HK=new t("Hong Kong SAR China","HK");static HU=new t("Hungary","HU");static IS=new t("Iceland","IS");static IN=new t("India","IN");static ID=new t("Indonesia","ID");static IR=new t("Iran","IR");static IQ=new t("Iraq","IQ");static IE=new t("Ireland","IE");static IM=new t("Isle of Man","IM");static IL=new t("Israel","IL");static IT=new t("Italy","IT");static JM=new t("Jamaica","JM");static JP=new t("Japan","JP");static JE=new t("Jersey","JE");static JO=new t("Jordan","JO");static KZ=new t("Kazakhstan","KZ");static KE=new t("Kenya","KE");static KI=new t("Kiribati","KI");static KW=new t("Kuwait","KW");static KG=new t("Kyrgyzstan","KG");static LA=new t("Laos","LA");static LV=new t("Latvia","LV");static LB=new t("Lebanon","LB");static LS=new t("Lesotho","LS");static LR=new t("Liberia","LR");static LY=new t("Libya","LY");static LI=new t("Liechtenstein","LI");static LT=new t("Lithuania","LT");static LU=new t("Luxembourg","LU");static MO=new t("Macao SAR China","MO");static MG=new t("Madagascar","MG");static MW=new t("Malawi","MW");static MY=new t("Malaysia","MY");static MV=new t("Maldives","MV");static ML=new t("Mali","ML");static MT=new t("Malta","MT");static MH=new t("Marshall Islands","MH");static MQ=new t("Martinique","MQ");static MR=new t("Mauritania","MR");static MU=new t("Mauritius","MU");static YT=new t("Mayotte","YT");static MX=new t("Mexico","MX");static FM=new t("Micronesia","FM");static MD=new t("Moldova","MD");static MC=new t("Monaco","MC");static MN=new t("Mongolia","MN");static ME=new t("Montenegro","ME");static MS=new t("Montserrat","MS");static MA=new t("Morocco","MA");static MZ=new t("Mozambique","MZ");static MM=new t("Myanmar (Burma)","MM");static NA=new t("Namibia","NA");static NR=new t("Nauru","NR");static NP=new t("Nepal","NP");static NL=new t("Netherlands","NL");static NC=new t("New Caledonia","NC");static NZ=new t("New Zealand","NZ");static NI=new t("Nicaragua","NI");static NE=new t("Niger","NE");static NG=new t("Nigeria","NG");static NU=new t("Niue","NU");static NF=new t("Norfolk Island","NF");static KP=new t("North Korea","KP");static MK=new t("North Macedonia","MK");static MP=new t("Northern Mariana Islands","MP");static NO=new t("Norway","NO");static OM=new t("Oman","OM");static PK=new t("Pakistan","PK");static PW=new t("Palau","PW");static PS=new t("Palestinian Territories","PS");static PA=new t("Panama","PA");static PG=new t("Papua New Guinea","PG");static PY=new t("Paraguay","PY");static PE=new t("Peru","PE");static PH=new t("Philippines","PH");static PN=new t("Pitcairn Islands","PN");static PL=new t("Poland","PL");static PT=new t("Portugal","PT");static PR=new t("Puerto Rico","PR");static QA=new t("Qatar","QA");static RE=new t("R\xE9union","RE");static RO=new t("Romania","RO");static RU=new t("Russia","RU");static RW=new t("Rwanda","RW");static WS=new t("Samoa","WS");static SM=new t("San Marino","SM");static ST=new t("S\xE3o Tom\xE9 & Pr\xEDncipe","ST");static SA=new t("Saudi Arabia","SA");static SN=new t("Senegal","SN");static RS=new t("Serbia","RS");static SC=new t("Seychelles","SC");static SL=new t("Sierra Leone","SL");static SG=new t("Singapore","SG");static SX=new t("Sint Maarten","SX");static SK=new t("Slovakia","SK");static SI=new t("Slovenia","SI");static SB=new t("Solomon Islands","SB");static SO=new t("Somalia","SO");static ZA=new t("South Africa","ZA");static GS=new t("South Georgia & South Sandwich Islands","GS");static KR=new t("South Korea","KR");static SS=new t("South Sudan","SS");static ES=new t("Spain","ES");static LK=new t("Sri Lanka","LK");static BL=new t("St. Barth\xE9lemy","BL");static SH=new t("St. Helena","SH");static KN=new t("St. Kitts & Nevis","KN");static LC=new t("St. Lucia","LC");static MF=new t("St. Martin","MF");static PM=new t("St. Pierre & Miquelon","PM");static VC=new t("St. Vincent & Grenadines","VC");static SD=new t("Sudan","SD");static SR=new t("Suriname","SR");static SJ=new t("Svalbard & Jan Mayen","SJ");static SE=new t("Sweden","SE");static CH=new t("Switzerland","CH");static SY=new t("Syria","SY");static TW=new t("Taiwan","TW");static TJ=new t("Tajikistan","TJ");static TZ=new t("Tanzania","TZ");static TH=new t("Thailand","TH");static TL=new t("Timor-Leste","TL");static TG=new t("Togo","TG");static TK=new t("Tokelau","TK");static TO=new t("Tonga","TO");static TT=new t("Trinidad & Tobago","TT");static TN=new t("Tunisia","TN");static TR=new t("Turkey","TR");static TM=new t("Turkmenistan","TM");static TC=new t("Turks & Caicos Islands","TC");static TV=new t("Tuvalu","TV");static UM=new t("U.S. Outlying Islands","UM");static VI=new t("U.S. Virgin Islands","VI");static UG=new t("Uganda","UG");static UA=new t("Ukraine","UA");static AE=new t("United Arab Emirates","AE");static GB=new t("United Kingdom","GB");static US=new t("United States","US");static UY=new t("Uruguay","UY");static UZ=new t("Uzbekistan","UZ");static VU=new t("Vanuatu","VU");static VA=new t("Vatican City","VA");static VE=new t("Venezuela","VE");static VN=new t("Vietnam","VN");static WF=new t("Wallis & Futuna","WF");static EH=new t("Western Sahara","EH");static YE=new t("Yemen","YE");static ZM=new t("Zambia","ZM");static ZW=new t("Zimbabwe","ZW");static lookup(n){return this.all().first(r=>r.equals(n))}equals(n){return c(n).lower.trim.equals(this.lower)}};var N=class{constructor(e={}){this.state=e}get isValid(){return F(this).isValid}toJSON(){return T.delete(T.parse({...this}),"state")}toString(){return this.constructor.name}update(e){return this}merge(e){return T.merge(this,e)}};function cd(t){return s(t)&&t instanceof N}import{DateTime as At,Settings as Rr}from"luxon";Rr.defaultZone="utc";var mt=class t extends M{constructor(e,n){super(E(e).type(W,r=>(n?At.fromFormat(r,n,{setZone:!0}):At.fromISO(r,{setZone:!0})).toISO()).type(z,r=>At.fromMillis(r).toISO()).type(ue,r=>At.fromJSDate(r).toISO()).else(void 0))}static get now(){return new t(At.utc().toISO())}get isValid(){return s(this.value)&&this.utc.isValid}get fromNow(){return this.from()}get utc(){return this.luxon.setZone("utc")}get luxon(){return At.fromISO(this.value,{setZone:!0})}from(e,n){let r=O(e)?e:void 0,o=W(e)?e:n??"en";return B(r,a=>this.utc.setLocale(o).toRelative({base:a.utc}),()=>this.utc.setLocale(o).toRelative())}isAfter(e){return this.utc>e.utc}isBefore(e){return this.utc<e.utc}equals(e){return this.utc.hasSame(e.utc,"millisecond")}add(e,n="day"){return new t(this.luxon.plus({[n]:e}).toISO())}subtract(e,n="day"){return new t(this.luxon.minus({[n]:e}).toISO())}diff(e,n="day",r){return Math[r?.rounding??"floor"](this.utc.diff(e.utc).as(n))}startOf(e="day"){return new t(this.luxon.startOf(e).toISO())}endOf(e="day"){return new t(this.luxon.endOf(e).toISO())}withZone(e){return new t(this.utc.setZone(e).toISO())}toString(){return this.value??""}toJSON(){return this.utc.toISO()}toFormat(e){return this.luxon.toFormat(e)}toLocale(e="nl-NL",n="D"){return this.luxon.setLocale(e).toFormat(n)}toFull(e){return this.toLocale(e,"DDD")}toDate(){return this.isValid?this.utc.toJSDate():void 0}},gd=t=>s(t)&&t instanceof mt,Td=t=>W(t)||z(t)||t instanceof Date?new mt(t):new mt;import Or from"validator/lib/isEAN";var Mn=class extends M{get isValid(){return Lr(this.value)}},Lr=t=>!m(t)&&Or(l(t));import Ir from"validator/lib/isEmail";var cn=class extends M{constructor(e){super(l(e).trim().toLowerCase())}get isValid(){return kr(this.value)}get name(){return c(this.value.split("@")[0]).replace("."," ").title.toString()}},Cd=t=>new cn(t),kr=t=>!m(t)&&Ir(l(t));import Mr from"validator/lib/isIBAN";var vn=class extends M{get isValid(){return vr(this.value)}},vr=t=>!m(t)&&Mr(l(t));import Fr from"validator/lib/isPostalCode";var un=class extends M{constructor(n,r=pt.NL){super(c(n).replace(" ","").toString());this.country=r}get isValid(){return Fr(this.value,this.country instanceof pt?this.country.id:c(this.country).upper)}},Fn=(t,e=pt.NL)=>new un(t,e);import Gr from"validator/lib/isURL";var dn=class extends M{constructor(n,r){super(l(n));this.options=r}get isValid(){return Dr(this.value,this.options)}},Vd=(t,e)=>new dn(t,e),Dr=(t,e)=>!m(t)&&Gr(l(t),e);var yt=class extends N{street=this.state.street;houseNumber=this.state.houseNumber;extension=this.state.extension;postalCode=Fn(this.state.postalCode,this.state.country);city=this.state.city;country=pt.byId(this.state.country);toString(){return c(this.street).with(" ",this.houseNumber,this.extension).with(", ",c(this.postalCode).with(" ",this.city,this.country?.name)).toString()}};g([b()],yt.prototype,"street",2),g([b()],yt.prototype,"houseNumber",2),g([re()],yt.prototype,"postalCode",2),g([b()],yt.prototype,"city",2),g([b()],yt.prototype,"country",2);var Xd=t=>!m(t)&&t instanceof yt;var fe=class fe extends N{value=this.state.value;uom=Rt.byId(this.state.uom,Rt.MM);static with=(e,n=Rt.MM)=>new fe({value:e,uom:n});sizeInMM(){return this.inMilliMeters}get inMilliMeters(){return this.value*this.uom.mmMultiplier}gte(e){return this.inMilliMeters>=e.inMilliMeters}};g([b()],fe.prototype,"value",2);var wt=fe;var gt=class gt extends N{l=new wt(this.state.l);w=new wt(this.state.w);h=new wt(this.state.h);sorted=[this.l,this.w,this.h].sort((e,n)=>e.inMilliMeters-n.inMilliMeters);lowestDim=this.sorted[0];medianDim=this.sorted[1];maxDim=this.sorted[2];get isValid(){return super.isValid&&this.l.isValid&&this.w.isValid&&this.h.isValid}static with=(e,n,r)=>new gt({l:e,w:n,h:r});stack(e){return gt.with(this.maxDim,this.medianDim,wt.with(this.lowestDim.value*e,this.lowestDim.uom))}fits(e,n=1){let r=e.stack(n);return this.lowestDim.gte(r.lowestDim)&&this.medianDim.gte(r.medianDim)&&this.maxDim.gte(r.maxDim)}};g([b()],gt.prototype,"l",2),g([b()],gt.prototype,"w",2),g([b()],gt.prototype,"h",2);var Gn=gt;var Ot=class extends N{currency=xe.byId(this.state.currency);value=this.state.value;add(e){return Gt(this.currency,this.value+e)}subtract(e){return Gt(this.currency,this.value-e)}times(e){return Gt(this.currency,this.value*e)}toString(){return c(this.currency?.code).with(" ",this.value?.toFixed(this.currency?.digits??2)).toString()}};g([b()],Ot.prototype,"currency",2),g([b()],Ot.prototype,"value",2);var Gt=(t,e)=>new Ot({currency:t.id,value:e}),hp=t=>!m(t)&&t instanceof Ot;var Dt=class extends N{first=this.state.first;middle=this.state.middle;last=this.state.last;toString(){return c(this.first,"").add(this.middle," ").add(this.last," ").toString()}};g([b()],Dt.prototype,"first",2),g([b()],Dt.prototype,"last",2);var Sp=t=>new Dt(t);var be=class extends N{value=this.state.value;uow=Vt.byId(this.state.uow,Vt.G);sizeInG(){return this.inGrams}get inGrams(){return this.value*this.uow.gMultiplier}gte(e){return this.inGrams>=e.inGrams}lte(e){return this.inGrams<=e.inGrams}between(e,n=Dn(Number.MAX_VALUE,this.uow)){return this.gte(e)&&this.lte(n)}sum(e){return Dn((this.inGrams+e.inGrams)/this.uow.gMultiplier,this.uow)}};g([b()],be.prototype,"value",2);var Dn=(t,e)=>new be({value:t,uow:e});var xe=class t extends w{constructor(n,r,o,a){super(r,n,a);this.digits=o}static EUR=new t("EUR","Euro",2,"\u20AC");static USD=new t("USD","US Dollar",2,"$");static AED=new t("AED","United Arab Emirates Dirham",2,"AED");static AFN=new t("AFN","Afghan Afghani",0,"Af");static ALL=new t("ALL","Albanian Lek",0,"ALL");static AMD=new t("AMD","Armenian Dram",0,"AMD");static ARS=new t("ARS","Argentine Peso",2,"AR$");static AUD=new t("AUD","Australian Dollar",2,"AU$");static AZN=new t("AZN","Azerbaijani Manat",2,"man.");static BAM=new t("BAM","Bosnia-Herzegovina Convertible Mark",2,"KM");static BDT=new t("BDT","Bangladeshi Taka",2,"Tk");static BGN=new t("BGN","Bulgarian Lev",2,"BGN");static BHD=new t("BHD","Bahraini Dinar",3,"BD");static BIF=new t("BIF","Burundian Franc",0,"FBu");static BND=new t("BND","Brunei Dollar",2,"BN$");static BOB=new t("BOB","Bolivian Boliviano",2,"Bs");static BRL=new t("BRL","Brazilian Real",2,"R$");static BWP=new t("BWP","Botswanan Pula",2,"BWP");static BYN=new t("BYN","Belarusian Ruble",2,"Br");static BZD=new t("BZD","Belize Dollar",2,"BZ$");static CAD=new t("CAD","Canadian Dollar",2,"CA$");static CDF=new t("CDF","Congolese Franc",2,"CDF");static CHF=new t("CHF","Swiss Franc",2,"CHF");static CLP=new t("CLP","Chilean Peso",0,"CL$");static CNY=new t("CNY","Chinese Yuan",2,"CN\xA5");static COP=new t("COP","Colombian Peso",0,"CO$");static CRC=new t("CRC","Costa Rican Col\xF3n",0,"\u20A1");static CVE=new t("CVE","Cape Verdean Escudo",2,"CV$");static CZK=new t("CZK","Czech Republic Koruna",2,"K\u010D");static DJF=new t("DJF","Djiboutian Franc",0,"Fdj");static DKK=new t("DKK","Danish Krone",2,"Dkr");static DOP=new t("DOP","Dominican Peso",2,"RD$");static DZD=new t("DZD","Algerian Dinar",2,"DA");static EEK=new t("EEK","Estonian Kroon",2,"Ekr");static EGP=new t("EGP","Egyptian Pound",2,"EGP");static ERN=new t("ERN","Eritrean Nakfa",2,"Nfk");static ETB=new t("ETB","Ethiopian Birr",2,"Br");static GBP=new t("GBP","British Pound Sterling",2,"\xA3");static GEL=new t("GEL","Georgian Lari",2,"GEL");static GHS=new t("GHS","Ghanaian Cedi",2,"GH\u20B5");static GNF=new t("GNF","Guinean Franc",0,"FG");static GTQ=new t("GTQ","Guatemalan Quetzal",2,"GTQ");static HKD=new t("HKD","Hong Kong Dollar",2,"HK$");static HNL=new t("HNL","Honduran Lempira",2,"HNL");static HRK=new t("HRK","Croatian Kuna",2,"kn");static HUF=new t("HUF","Hungarian Forint",0,"Ft");static IDR=new t("IDR","Indonesian Rupiah",0,"Rp");static ILS=new t("ILS","Israeli New Sheqel",2,"\u20AA");static INR=new t("INR","Indian Rupee",2,"Rs");static IQD=new t("IQD","Iraqi Dinar",0,"IQD");static IRR=new t("IRR","Iranian Rial",0,"IRR");static ISK=new t("ISK","Icelandic Kr\xF3na",0,"Ikr");static JMD=new t("JMD","Jamaican Dollar",2,"J$");static JOD=new t("JOD","Jordanian Dinar",3,"JD");static JPY=new t("JPY","Japanese Yen",0,"\xA5");static KES=new t("KES","Kenyan Shilling",2,"Ksh");static KHR=new t("KHR","Cambodian Riel",2,"KHR");static KMF=new t("KMF","Comorian Franc",0,"CF");static KRW=new t("KRW","South Korean Won",0,"\u20A9");static KWD=new t("KWD","Kuwaiti Dinar",3,"KD");static KZT=new t("KZT","Kazakhstani Tenge",2,"KZT");static LBP=new t("LBP","Lebanese Pound",0,"L.L.");static LKR=new t("LKR","Sri Lankan Rupee",2,"SLRs");static LTL=new t("LTL","Lithuanian Litas",2,"Lt");static LVL=new t("LVL","Latvian Lats",2,"Ls");static LYD=new t("LYD","Libyan Dinar",3,"LD");static MAD=new t("MAD","Moroccan Dirham",2,"MAD");static MDL=new t("MDL","Moldovan Leu",2,"MDL");static MGA=new t("MGA","Malagasy Ariary",0,"MGA");static MKD=new t("MKD","Macedonian Denar",2,"MKD");static MMK=new t("MMK","Myanma Kyat",0,"MMK");static MOP=new t("MOP","Macanese Pataca",2,"MOP$");static MUR=new t("MUR","Mauritian Rupee",0,"MURs");static MXN=new t("MXN","Mexican Peso",2,"MX$");static MYR=new t("MYR","Malaysian Ringgit",2,"RM");static MZN=new t("MZN","Mozambican Metical",2,"MTn");static NAD=new t("NAD","Namibian Dollar",2,"N$");static NGN=new t("NGN","Nigerian Naira",2,"\u20A6");static NIO=new t("NIO","Nicaraguan C\xF3rdoba",2,"C$");static NOK=new t("NOK","Norwegian Krone",2,"Nkr");static NPR=new t("NPR","Nepalese Rupee",2,"NPRs");static NZD=new t("NZD","New Zealand Dollar",2,"NZ$");static OMR=new t("OMR","Omani Rial",3,"OMR");static PAB=new t("PAB","Panamanian Balboa",2,"B/.");static PEN=new t("PEN","Peruvian Nuevo Sol",2,"S/.");static PHP=new t("PHP","Philippine Peso",2,"\u20B1");static PKR=new t("PKR","Pakistani Rupee",0,"PKRs");static PLN=new t("PLN","Polish Zloty",2,"z\u0142");static PYG=new t("PYG","Paraguayan Guarani",0,"\u20B2");static QAR=new t("QAR","Qatari Rial",2,"QR");static RON=new t("RON","Romanian Leu",2,"RON");static RSD=new t("RSD","Serbian Dinar",0,"din.");static RUB=new t("RUB","Russian Ruble",2,"RUB");static RWF=new t("RWF","Rwandan Franc",0,"RWF");static SAR=new t("SAR","Saudi Riyal",2,"SR");static SDG=new t("SDG","Sudanese Pound",2,"SDG");static SEK=new t("SEK","Swedish Krona",2,"Skr");static SGD=new t("SGD","Singapore Dollar",2,"S$");static SOS=new t("SOS","Somali Shilling",0,"Ssh");static SYP=new t("SYP","Syrian Pound",0,"SY\xA3");static THB=new t("THB","Thai Baht",2,"\u0E3F");static TND=new t("TND","Tunisian Dinar",3,"DT");static TOP=new t("TOP","Tongan Pa\u02BBanga",2,"T$");static TRY=new t("TRY","Turkish Lira",2,"TL");static TTD=new t("TTD","Trinidad and Tobago Dollar",2,"TT$");static TWD=new t("TWD","New Taiwan Dollar",2,"NT$");static TZS=new t("TZS","Tanzanian Shilling",0,"TSh");static UAH=new t("UAH","Ukrainian Hryvnia",2,"\u20B4");static UGX=new t("UGX","Ugandan Shilling",0,"USh");static UYU=new t("UYU","Uruguayan Peso",2,"$U");static UZS=new t("UZS","Uzbekistan Som",0,"UZS");static VEF=new t("VEF","Venezuelan Bol\xEDvar",2,"Bs.F.");static VND=new t("VND","Vietnamese Dong",0,"\u20AB");static XAF=new t("XAF","CFA Franc BEAC",0,"FCFA");static XOF=new t("XOF","CFA Franc BCEAO",0,"CFA");static YER=new t("YER","Yemeni Rial",0,"YR");static ZAR=new t("ZAR","South African Rand",2,"R");static ZMK=new t("ZMK","Zambian Kwacha",0,"ZK");static ZWL=new t("ZWL","Zimbabwean Dollar",0,"ZWL$");amount=(n=0)=>Gt(this,n);get zero(){return this.amount()}};var Vn=class t extends w{static Dev=new t("Development","dev");static Tst=new t("Test","tst");static Acc=new t("Acceptance","acc");static Prd=new t("Production","prd")};var Un=class t extends w{constructor(n,r,o=c(n).lower.last(2).toString(),a=c(n).lower.trim.toString()){super(r,n);this.country=o;this.lower=a}static AF=new t("af","Afrikaans");static AF_NA=new t("af_NA","Afrikaans (Namibia)");static AF_ZA=new t("af_ZA","Afrikaans (South Africa)");static AK=new t("ak","Akan");static AK_GH=new t("ak_GH","Akan (Ghana)");static SQ=new t("sq","Albanian");static SQ_AL=new t("sq_AL","Albanian (Albania)");static SQ_XK=new t("sq_XK","Albanian (Kosovo)");static SQ_MK=new t("sq_MK","Albanian (Macedonia)");static AM=new t("am","Amharic");static AM_ET=new t("am_ET","Amharic (Ethiopia)");static AR=new t("ar","Arabic");static AR_DZ=new t("ar_DZ","Arabic (Algeria)");static AR_BH=new t("ar_BH","Arabic (Bahrain)");static AR_TD=new t("ar_TD","Arabic (Chad)");static AR_KM=new t("ar_KM","Arabic (Comoros)");static AR_DJ=new t("ar_DJ","Arabic (Djibouti)");static AR_EG=new t("ar_EG","Arabic (Egypt)");static AR_ER=new t("ar_ER","Arabic (Eritrea)");static AR_IQ=new t("ar_IQ","Arabic (Iraq)");static AR_IL=new t("ar_IL","Arabic (Israel)");static AR_JO=new t("ar_JO","Arabic (Jordan)");static AR_KW=new t("ar_KW","Arabic (Kuwait)");static AR_LB=new t("ar_LB","Arabic (Lebanon)");static AR_LY=new t("ar_LY","Arabic (Libya)");static AR_MR=new t("ar_MR","Arabic (Mauritania)");static AR_MA=new t("ar_MA","Arabic (Morocco)");static AR_OM=new t("ar_OM","Arabic (Oman)");static AR_PS=new t("ar_PS","Arabic (Palestinian Territories)");static AR_QA=new t("ar_QA","Arabic (Qatar)");static AR_SA=new t("ar_SA","Arabic (Saudi Arabia)");static AR_SO=new t("ar_SO","Arabic (Somalia)");static AR_SS=new t("ar_SS","Arabic (South Sudan)");static AR_SD=new t("ar_SD","Arabic (Sudan)");static AR_SY=new t("ar_SY","Arabic (Syria)");static AR_TN=new t("ar_TN","Arabic (Tunisia)");static AR_AE=new t("ar_AE","Arabic (United Arab Emirates)");static AR_EH=new t("ar_EH","Arabic (Western Sahara)");static AR_YE=new t("ar_YE","Arabic (Yemen)");static HY=new t("hy","Armenian");static HY_AM=new t("hy_AM","Armenian (Armenia)");static AS=new t("as","Assamese");static AS_IN=new t("as_IN","Assamese (India)");static AZ=new t("az","Azerbaijani");static AZ_AZ=new t("az_AZ","Azerbaijani (Azerbaijan)");static AZ_CYRL_AZ=new t("az_Cyrl_AZ","Azerbaijani (Cyrillic, Azerbaijan)");static AZ_CYRL=new t("az_Cyrl","Azerbaijani (Cyrillic)","az");static AZ_LATN_AZ=new t("az_Latn_AZ","Azerbaijani (Latin, Azerbaijan)");static AZ_LATN=new t("az_Latn","Azerbaijani (Latin)","az");static BM=new t("bm","Bambara");static BM_LATN_ML=new t("bm_Latn_ML","Bambara (Latin, Mali)");static BM_LATN=new t("bm_Latn","Bambara (Latin)","bm");static EU=new t("eu","Basque");static EU_ES=new t("eu_ES","Basque (Spain)");static BE=new t("be","Belarusian");static BE_BY=new t("be_BY","Belarusian (Belarus)");static BN=new t("bn","Bengali");static BN_BD=new t("bn_BD","Bengali (Bangladesh)");static BN_IN=new t("bn_IN","Bengali (India)");static BS=new t("bs","Bosnian");static BS_BA=new t("bs_BA","Bosnian (Bosnia & Herzegovina)");static BS_CYRL_BA=new t("bs_Cyrl_BA","Bosnian (Cyrillic, Bosnia & Herzegovina)");static BS_CYRL=new t("bs_Cyrl","Bosnian (Cyrillic)","bs");static BS_LATN_BA=new t("bs_Latn_BA","Bosnian (Latin, Bosnia & Herzegovina)");static BS_LATN=new t("bs_Latn","Bosnian (Latin)","bs");static BR=new t("br","Breton");static BR_FR=new t("br_FR","Breton (France)");static BG=new t("bg","Bulgarian");static BG_BG=new t("bg_BG","Bulgarian (Bulgaria)");static MY=new t("my","Burmese");static MY_MM=new t("my_MM","Burmese (Myanmar (Burma))");static CA=new t("ca","Catalan");static CA_AD=new t("ca_AD","Catalan (Andorra)");static CA_FR=new t("ca_FR","Catalan (France)");static CA_IT=new t("ca_IT","Catalan (Italy)");static CA_ES=new t("ca_ES","Catalan (Spain)");static ZH=new t("zh","Chinese");static ZH_CN=new t("zh_CN","Chinese (China)");static ZH_HK=new t("zh_HK","Chinese (Hong Kong SAR China)");static ZH_MO=new t("zh_MO","Chinese (Macau SAR China)");static ZH_HANS_CN=new t("zh_Hans_CN","Chinese (Simplified, China)");static ZH_HANS_HK=new t("zh_Hans_HK","Chinese (Simplified, Hong Kong SAR China)");static ZH_HANS_MO=new t("zh_Hans_MO","Chinese (Simplified, Macau SAR China)");static ZH_HANS_SG=new t("zh_Hans_SG","Chinese (Simplified, Singapore)");static ZH_HANS=new t("zh_Hans","Chinese (Simplified)");static ZH_SG=new t("zh_SG","Chinese (Singapore)");static ZH_TW=new t("zh_TW","Chinese (Taiwan)");static ZH_HANT_HK=new t("zh_Hant_HK","Chinese (Traditional, Hong Kong SAR China)");static ZH_HANT_MO=new t("zh_Hant_MO","Chinese (Traditional, Macau SAR China)");static ZH_HANT_TW=new t("zh_Hant_TW","Chinese (Traditional, Taiwan)");static ZH_HANT=new t("zh_Hant","Chinese (Traditional)");static KW=new t("kw","Cornish");static KW_GB=new t("kw_GB","Cornish (United Kingdom)");static HR=new t("hr","Croatian");static HR_BA=new t("hr_BA","Croatian (Bosnia & Herzegovina)");static HR_HR=new t("hr_HR","Croatian (Croatia)");static CS=new t("cs","Czech");static CS_CZ=new t("cs_CZ","Czech (Czech Republic)");static DA=new t("da","Danish");static DA_DK=new t("da_DK","Danish (Denmark)");static DA_GL=new t("da_GL","Danish (Greenland)");static NL=new t("nl","Dutch");static NL_AW=new t("nl_AW","Dutch (Aruba)");static NL_BE=new t("nl_BE","Dutch (Belgium)");static NL_BQ=new t("nl_BQ","Dutch (Caribbean Netherlands)");static NL_CW=new t("nl_CW","Dutch (Cura\xE7ao)");static NL_NL=new t("nl_NL","Dutch (Netherlands)");static NL_SX=new t("nl_SX","Dutch (Sint Maarten)");static NL_SR=new t("nl_SR","Dutch (Suriname)");static DZ=new t("dz","Dzongkha");static DZ_BT=new t("dz_BT","Dzongkha (Bhutan)");static EN=new t("en","English","gb");static EN_AS=new t("en_AS","English (American Samoa)");static EN_AI=new t("en_AI","English (Anguilla)");static EN_AG=new t("en_AG","English (Antigua & Barbuda)");static EN_AU=new t("en_AU","English (Australia)");static EN_BS=new t("en_BS","English (Bahamas)");static EN_BB=new t("en_BB","English (Barbados)");static EN_BE=new t("en_BE","English (Belgium)");static EN_BZ=new t("en_BZ","English (Belize)");static EN_BM=new t("en_BM","English (Bermuda)");static EN_BW=new t("en_BW","English (Botswana)");static EN_IO=new t("en_IO","English (British Indian Ocean Territory)");static EN_VG=new t("en_VG","English (British Virgin Islands)");static EN_CM=new t("en_CM","English (Cameroon)");static EN_CA=new t("en_CA","English (Canada)");static EN_KY=new t("en_KY","English (Cayman Islands)");static EN_CX=new t("en_CX","English (Christmas Island)");static EN_CC=new t("en_CC","English (Cocos (Keeling) Islands)");static EN_CK=new t("en_CK","English (Cook Islands)");static EN_DG=new t("en_DG","English (Diego Garcia)");static EN_DM=new t("en_DM","English (Dominica)");static EN_ER=new t("en_ER","English (Eritrea)");static EN_FK=new t("en_FK","English (Falkland Islands)");static EN_FJ=new t("en_FJ","English (Fiji)");static EN_GM=new t("en_GM","English (Gambia)");static EN_GH=new t("en_GH","English (Ghana)");static EN_GI=new t("en_GI","English (Gibraltar)");static EN_GD=new t("en_GD","English (Grenada)");static EN_GU=new t("en_GU","English (Guam)");static EN_GG=new t("en_GG","English (Guernsey)");static EN_GY=new t("en_GY","English (Guyana)");static EN_HK=new t("en_HK","English (Hong Kong SAR China)");static EN_IN=new t("en_IN","English (India)");static EN_IE=new t("en_IE","English (Ireland)");static EN_IM=new t("en_IM","English (Isle of Man)");static EN_JM=new t("en_JM","English (Jamaica)");static EN_JE=new t("en_JE","English (Jersey)");static EN_KE=new t("en_KE","English (Kenya)");static EN_KI=new t("en_KI","English (Kiribati)");static EN_LS=new t("en_LS","English (Lesotho)");static EN_LR=new t("en_LR","English (Liberia)");static EN_MO=new t("en_MO","English (Macau SAR China)");static EN_MG=new t("en_MG","English (Madagascar)");static EN_MW=new t("en_MW","English (Malawi)");static EN_MY=new t("en_MY","English (Malaysia)");static EN_MT=new t("en_MT","English (Malta)");static EN_MH=new t("en_MH","English (Marshall Islands)");static EN_MU=new t("en_MU","English (Mauritius)");static EN_FM=new t("en_FM","English (Micronesia)");static EN_MS=new t("en_MS","English (Montserrat)");static EN_NA=new t("en_NA","English (Namibia)");static EN_NR=new t("en_NR","English (Nauru)");static EN_NZ=new t("en_NZ","English (New Zealand)");static EN_NG=new t("en_NG","English (Nigeria)");static EN_NU=new t("en_NU","English (Niue)");static EN_NF=new t("en_NF","English (Norfolk Island)");static EN_MP=new t("en_MP","English (Northern Mariana Islands)");static EN_PK=new t("en_PK","English (Pakistan)");static EN_PW=new t("en_PW","English (Palau)");static EN_PG=new t("en_PG","English (Papua New Guinea)");static EN_PH=new t("en_PH","English (Philippines)");static EN_PN=new t("en_PN","English (Pitcairn Islands)");static EN_PR=new t("en_PR","English (Puerto Rico)");static EN_RW=new t("en_RW","English (Rwanda)");static EN_WS=new t("en_WS","English (Samoa)");static EN_SC=new t("en_SC","English (Seychelles)");static EN_SL=new t("en_SL","English (Sierra Leone)");static EN_SG=new t("en_SG","English (Singapore)");static EN_SX=new t("en_SX","English (Sint Maarten)");static EN_SB=new t("en_SB","English (Solomon Islands)");static EN_ZA=new t("en_ZA","English (South Africa)");static EN_SS=new t("en_SS","English (South Sudan)");static EN_SH=new t("en_SH","English (St. Helena)");static EN_KN=new t("en_KN","English (St. Kitts & Nevis)");static EN_LC=new t("en_LC","English (St. Lucia)");static EN_VC=new t("en_VC","English (St. Vincent & Grenadines)");static EN_SD=new t("en_SD","English (Sudan)");static EN_SZ=new t("en_SZ","English (Swaziland)");static EN_TZ=new t("en_TZ","English (Tanzania)");static EN_TK=new t("en_TK","English (Tokelau)");static EN_TO=new t("en_TO","English (Tonga)");static EN_TT=new t("en_TT","English (Trinidad & Tobago)");static EN_TC=new t("en_TC","English (Turks & Caicos Islands)");static EN_TV=new t("en_TV","English (Tuvalu)");static EN_UM=new t("en_UM","English (U.S. Outlying Islands)");static EN_VI=new t("en_VI","English (U.S. Virgin Islands)");static EN_UG=new t("en_UG","English (Uganda)");static EN_GB=new t("en_GB","English (United Kingdom)");static EN_US=new t("en_US","English (United States)");static EN_VU=new t("en_VU","English (Vanuatu)");static EN_ZM=new t("en_ZM","English (Zambia)");static EN_ZW=new t("en_ZW","English (Zimbabwe)");static EO=new t("eo","Esperanto");static ET=new t("et","Estonian");static ET_EE=new t("et_EE","Estonian (Estonia)");static EE=new t("ee","Ewe");static EE_GH=new t("ee_GH","Ewe (Ghana)");static EE_TG=new t("ee_TG","Ewe (Togo)");static FO=new t("fo","Faroese");static FO_FO=new t("fo_FO","Faroese (Faroe Islands)");static FI=new t("fi","Finnish");static FI_FI=new t("fi_FI","Finnish (Finland)");static FR=new t("fr","French");static FR_DZ=new t("fr_DZ","French (Algeria)");static FR_BE=new t("fr_BE","French (Belgium)");static FR_BJ=new t("fr_BJ","French (Benin)");static FR_BF=new t("fr_BF","French (Burkina Faso)");static FR_BI=new t("fr_BI","French (Burundi)");static FR_CM=new t("fr_CM","French (Cameroon)");static FR_CA=new t("fr_CA","French (Canada)");static FR_CF=new t("fr_CF","French (Central African Republic)");static FR_TD=new t("fr_TD","French (Chad)");static FR_KM=new t("fr_KM","French (Comoros)");static FR_CG=new t("fr_CG","French (Congo - Brazzaville)");static FR_CD=new t("fr_CD","French (Congo - Kinshasa)");static FR_CI=new t("fr_CI","French (C\xF4te d\u2019Ivoire)");static FR_DJ=new t("fr_DJ","French (Djibouti)");static FR_GQ=new t("fr_GQ","French (Equatorial Guinea)");static FR_FR=new t("fr_FR","French (France)");static FR_GF=new t("fr_GF","French (French Guiana)");static FR_PF=new t("fr_PF","French (French Polynesia)");static FR_GA=new t("fr_GA","French (Gabon)");static FR_GP=new t("fr_GP","French (Guadeloupe)");static FR_GN=new t("fr_GN","French (Guinea)");static FR_HT=new t("fr_HT","French (Haiti)");static FR_LU=new t("fr_LU","French (Luxembourg)");static FR_MG=new t("fr_MG","French (Madagascar)");static FR_ML=new t("fr_ML","French (Mali)");static FR_MQ=new t("fr_MQ","French (Martinique)");static FR_MR=new t("fr_MR","French (Mauritania)");static FR_MU=new t("fr_MU","French (Mauritius)");static FR_YT=new t("fr_YT","French (Mayotte)");static FR_MC=new t("fr_MC","French (Monaco)");static FR_MA=new t("fr_MA","French (Morocco)");static FR_NC=new t("fr_NC","French (New Caledonia)");static FR_NE=new t("fr_NE","French (Niger)");static FR_RE=new t("fr_RE","French (R\xE9union)");static FR_RW=new t("fr_RW","French (Rwanda)");static FR_SN=new t("fr_SN","French (Senegal)");static FR_SC=new t("fr_SC","French (Seychelles)");static FR_BL=new t("fr_BL","French (St. Barth\xE9lemy)");static FR_MF=new t("fr_MF","French (St. Martin)");static FR_PM=new t("fr_PM","French (St. Pierre & Miquelon)");static FR_CH=new t("fr_CH","French (Switzerland)");static FR_SY=new t("fr_SY","French (Syria)");static FR_TG=new t("fr_TG","French (Togo)");static FR_TN=new t("fr_TN","French (Tunisia)");static FR_VU=new t("fr_VU","French (Vanuatu)");static FR_WF=new t("fr_WF","French (Wallis & Futuna)");static FF=new t("ff","Fulah");static FF_CM=new t("ff_CM","Fulah (Cameroon)");static FF_GN=new t("ff_GN","Fulah (Guinea)");static FF_MR=new t("ff_MR","Fulah (Mauritania)");static FF_SN=new t("ff_SN","Fulah (Senegal)");static GL=new t("gl","Galician");static GL_ES=new t("gl_ES","Galician (Spain)");static LG=new t("lg","Ganda");static LG_UG=new t("lg_UG","Ganda (Uganda)");static KA=new t("ka","Georgian");static KA_GE=new t("ka_GE","Georgian (Georgia)");static DE=new t("de","German");static DE_AT=new t("de_AT","German (Austria)");static DE_BE=new t("de_BE","German (Belgium)");static DE_DE=new t("de_DE","German (Germany)");static DE_LI=new t("de_LI","German (Liechtenstein)");static DE_LU=new t("de_LU","German (Luxembourg)");static DE_CH=new t("de_CH","German (Switzerland)");static EL=new t("el","Greek");static EL_CY=new t("el_CY","Greek (Cyprus)");static EL_GR=new t("el_GR","Greek (Greece)");static GU=new t("gu","Gujarati");static GU_IN=new t("gu_IN","Gujarati (India)");static HA=new t("ha","Hausa");static HA_GH=new t("ha_GH","Hausa (Ghana)");static HA_LATN_GH=new t("ha_Latn_GH","Hausa (Latin, Ghana)");static HA_LATN_NE=new t("ha_Latn_NE","Hausa (Latin, Niger)");static HA_LATN_NG=new t("ha_Latn_NG","Hausa (Latin, Nigeria)");static HA_LATN=new t("ha_Latn","Hausa (Latin)");static HA_NE=new t("ha_NE","Hausa (Niger)");static HA_NG=new t("ha_NG","Hausa (Nigeria)");static HE=new t("he","Hebrew");static HE_IL=new t("he_IL","Hebrew (Israel)");static HI=new t("hi","Hindi");static HI_IN=new t("hi_IN","Hindi (India)");static HU=new t("hu","Hungarian");static HU_HU=new t("hu_HU","Hungarian (Hungary)");static IS=new t("is","Icelandic");static IS_IS=new t("is_IS","Icelandic (Iceland)");static IG=new t("ig","Igbo");static IG_NG=new t("ig_NG","Igbo (Nigeria)");static ID=new t("id","Indonesian");static ID_ID=new t("id_ID","Indonesian (Indonesia)");static GA=new t("ga","Irish");static GA_IE=new t("ga_IE","Irish (Ireland)");static IT=new t("it","Italian");static IT_IT=new t("it_IT","Italian (Italy)");static IT_SM=new t("it_SM","Italian (San Marino)");static IT_CH=new t("it_CH","Italian (Switzerland)");static JA=new t("ja","Japanese");static JA_JP=new t("ja_JP","Japanese (Japan)");static KL=new t("kl","Kalaallisut");static KL_GL=new t("kl_GL","Kalaallisut (Greenland)");static KN=new t("kn","Kannada");static KN_IN=new t("kn_IN","Kannada (India)");static KS=new t("ks","Kashmiri");static KS_ARAB_IN=new t("ks_Arab_IN","Kashmiri (Arabic, India)");static KS_ARAB=new t("ks_Arab","Kashmiri (Arabic)","ks");static KS_IN=new t("ks_IN","Kashmiri (India)");static KK=new t("kk","Kazakh");static KK_CYRL_KZ=new t("kk_Cyrl_KZ","Kazakh (Cyrillic, Kazakhstan)");static KK_CYRL=new t("kk_Cyrl","Kazakh (Cyrillic)","kk");static KK_KZ=new t("kk_KZ","Kazakh (Kazakhstan)");static KM=new t("km","Khmer");static KM_KH=new t("km_KH","Khmer (Cambodia)");static KI=new t("ki","Kikuyu");static KI_KE=new t("ki_KE","Kikuyu (Kenya)");static RW=new t("rw","Kinyarwanda");static RW_RW=new t("rw_RW","Kinyarwanda (Rwanda)");static KO=new t("ko","Korean");static KO_KP=new t("ko_KP","Korean (North Korea)");static KO_KR=new t("ko_KR","Korean (South Korea)");static KY=new t("ky","Kyrgyz");static KY_CYRL_KG=new t("ky_Cyrl_KG","Kyrgyz (Cyrillic, Kyrgyzstan)");static KY_CYRL=new t("ky_Cyrl","Kyrgyz (Cyrillic)","ky");static KY_KG=new t("ky_KG","Kyrgyz (Kyrgyzstan)");static LO=new t("lo","Lao");static LO_LA=new t("lo_LA","Lao (Laos)");static LV=new t("lv","Latvian");static LV_LV=new t("lv_LV","Latvian (Latvia)");static LN=new t("ln","Lingala");static LN_AO=new t("ln_AO","Lingala (Angola)");static LN_CF=new t("ln_CF","Lingala (Central African Republic)");static LN_CG=new t("ln_CG","Lingala (Congo - Brazzaville)");static LN_CD=new t("ln_CD","Lingala (Congo - Kinshasa)");static LT=new t("lt","Lithuanian");static LT_LT=new t("lt_LT","Lithuanian (Lithuania)");static LU=new t("lu","Luba-Katanga");static LU_CD=new t("lu_CD","Luba-Katanga (Congo - Kinshasa)");static LB=new t("lb","Luxembourgish");static LB_LU=new t("lb_LU","Luxembourgish (Luxembourg)");static MK=new t("mk","Macedonian");static MK_MK=new t("mk_MK","Macedonian (Macedonia)");static MG=new t("mg","Malagasy");static MG_MG=new t("mg_MG","Malagasy (Madagascar)");static MS=new t("ms","Malay");static MS_BN=new t("ms_BN","Malay (Brunei)");static MS_LATN_BN=new t("ms_Latn_BN","Malay (Latin, Brunei)");static MS_LATN_MY=new t("ms_Latn_MY","Malay (Latin, Malaysia)");static MS_LATN_SG=new t("ms_Latn_SG","Malay (Latin, Singapore)");static MS_LATN=new t("ms_Latn","Malay (Latin)","ms");static MS_MY=new t("ms_MY","Malay (Malaysia)");static MS_SG=new t("ms_SG","Malay (Singapore)");static ML=new t("ml","Malayalam");static ML_IN=new t("ml_IN","Malayalam (India)");static MT=new t("mt","Maltese");static MT_MT=new t("mt_MT","Maltese (Malta)");static GV=new t("gv","Manx");static GV_IM=new t("gv_IM","Manx (Isle of Man)");static MR=new t("mr","Marathi");static MR_IN=new t("mr_IN","Marathi (India)");static MN=new t("mn","Mongolian");static MN_CYRL_MN=new t("mn_Cyrl_MN","Mongolian (Cyrillic, Mongolia)");static MN_CYRL=new t("mn_Cyrl","Mongolian (Cyrillic)","mn");static MN_MN=new t("mn_MN","Mongolian (Mongolia)");static NE=new t("ne","Nepali");static NE_IN=new t("ne_IN","Nepali (India)");static NE_NP=new t("ne_NP","Nepali (Nepal)");static ND=new t("nd","North Ndebele");static ND_ZW=new t("nd_ZW","North Ndebele (Zimbabwe)");static SE=new t("se","Northern Sami");static SE_FI=new t("se_FI","Northern Sami (Finland)");static SE_NO=new t("se_NO","Northern Sami (Norway)");static SE_SE=new t("se_SE","Northern Sami (Sweden)");static NO=new t("no","Norwegian");static NO_NO=new t("no_NO","Norwegian (Norway)");static NB=new t("nb","Norwegian Bokm\xE5l");static NB_NO=new t("nb_NO","Norwegian Bokm\xE5l (Norway)");static NB_SJ=new t("nb_SJ","Norwegian Bokm\xE5l (Svalbard & Jan Mayen)");static NN=new t("nn","Norwegian Nynorsk");static NN_NO=new t("nn_NO","Norwegian Nynorsk (Norway)");static OR=new t("or","Oriya");static OR_IN=new t("or_IN","Oriya (India)");static OM=new t("om","Oromo");static OM_ET=new t("om_ET","Oromo (Ethiopia)");static OM_KE=new t("om_KE","Oromo (Kenya)");static OS=new t("os","Ossetic");static OS_GE=new t("os_GE","Ossetic (Georgia)");static OS_RU=new t("os_RU","Ossetic (Russia)");static PS=new t("ps","Pashto");static PS_AF=new t("ps_AF","Pashto (Afghanistan)");static FA=new t("fa","Persian");static FA_AF=new t("fa_AF","Persian (Afghanistan)");static FA_IR=new t("fa_IR","Persian (Iran)");static PL=new t("pl","Polish");static PL_PL=new t("pl_PL","Polish (Poland)");static PT=new t("pt","Portuguese");static PT_AO=new t("pt_AO","Portuguese (Angola)");static PT_BR=new t("pt_BR","Portuguese (Brazil)");static PT_CV=new t("pt_CV","Portuguese (Cape Verde)");static PT_GW=new t("pt_GW","Portuguese (Guinea-Bissau)");static PT_MO=new t("pt_MO","Portuguese (Macau SAR China)");static PT_MZ=new t("pt_MZ","Portuguese (Mozambique)");static PT_PT=new t("pt_PT","Portuguese (Portugal)");static PT_ST=new t("pt_ST","Portuguese (S\xE3o Tom\xE9 & Pr\xEDncipe)");static PT_TL=new t("pt_TL","Portuguese (Timor-Leste)");static PA=new t("pa","Punjabi");static PA_ARAB_PK=new t("pa_Arab_PK","Punjabi (Arabic, Pakistan)");static PA_ARAB=new t("pa_Arab","Punjabi (Arabic)","pa");static PA_GURU_IN=new t("pa_Guru_IN","Punjabi (Gurmukhi, India)");static PA_GURU=new t("pa_Guru","Punjabi (Gurmukhi)","pa");static PA_IN=new t("pa_IN","Punjabi (India)");static PA_PK=new t("pa_PK","Punjabi (Pakistan)");static QU=new t("qu","Quechua");static QU_BO=new t("qu_BO","Quechua (Bolivia)");static QU_EC=new t("qu_EC","Quechua (Ecuador)");static QU_PE=new t("qu_PE","Quechua (Peru)");static RO=new t("ro","Romanian");static RO_MD=new t("ro_MD","Romanian (Moldova)");static RO_RO=new t("ro_RO","Romanian (Romania)");static RM=new t("rm","Romansh");static RM_CH=new t("rm_CH","Romansh (Switzerland)");static RN=new t("rn","Rundi");static RN_BI=new t("rn_BI","Rundi (Burundi)");static RU=new t("ru","Russian");static RU_BY=new t("ru_BY","Russian (Belarus)");static RU_KZ=new t("ru_KZ","Russian (Kazakhstan)");static RU_KG=new t("ru_KG","Russian (Kyrgyzstan)");static RU_MD=new t("ru_MD","Russian (Moldova)");static RU_RU=new t("ru_RU","Russian (Russia)");static RU_UA=new t("ru_UA","Russian (Ukraine)");static SG=new t("sg","Sango");static SG_CF=new t("sg_CF","Sango (Central African Republic)");static GD=new t("gd","Scottish Gaelic");static GD_GB=new t("gd_GB","Scottish Gaelic (United Kingdom)");static SR=new t("sr","Serbian");static SR_BA=new t("sr_BA","Serbian (Bosnia & Herzegovina)");static SR_CYRL_BA=new t("sr_Cyrl_BA","Serbian (Cyrillic, Bosnia & Herzegovina)");static SR_CYRL_XK=new t("sr_Cyrl_XK","Serbian (Cyrillic, Kosovo)");static SR_CYRL_ME=new t("sr_Cyrl_ME","Serbian (Cyrillic, Montenegro)");static SR_CYRL_RS=new t("sr_Cyrl_RS","Serbian (Cyrillic, Serbia)");static SR_CYRL=new t("sr_Cyrl","Serbian (Cyrillic)","sr");static SR_XK=new t("sr_XK","Serbian (Kosovo)");static SR_LATN_BA=new t("sr_Latn_BA","Serbian (Latin, Bosnia & Herzegovina)");static SR_LATN_XK=new t("sr_Latn_XK","Serbian (Latin, Kosovo)");static SR_LATN_ME=new t("sr_Latn_ME","Serbian (Latin, Montenegro)");static SR_LATN_RS=new t("sr_Latn_RS","Serbian (Latin, Serbia)");static SR_LATN=new t("sr_Latn","Serbian (Latin)","sr");static SR_ME=new t("sr_ME","Serbian (Montenegro)");static SR_RS=new t("sr_RS","Serbian (Serbia)");static SH=new t("sh","Serbo-Croatian");static SH_BA=new t("sh_BA","Serbo-Croatian (Bosnia & Herzegovina)");static SN=new t("sn","Shona");static SN_ZW=new t("sn_ZW","Shona (Zimbabwe)");static II=new t("ii","Sichuan Yi");static II_CN=new t("ii_CN","Sichuan Yi (China)");static SI=new t("si","Sinhala");static SI_LK=new t("si_LK","Sinhala (Sri Lanka)");static SK=new t("sk","Slovak");static SK_SK=new t("sk_SK","Slovak (Slovakia)");static SL=new t("sl","Slovenian");static SL_SI=new t("sl_SI","Slovenian (Slovenia)");static SO=new t("so","Somali");static SO_DJ=new t("so_DJ","Somali (Djibouti)");static SO_ET=new t("so_ET","Somali (Ethiopia)");static SO_KE=new t("so_KE","Somali (Kenya)");static SO_SO=new t("so_SO","Somali (Somalia)");static ES=new t("es","Spanish");static ES_AR=new t("es_AR","Spanish (Argentina)");static ES_BO=new t("es_BO","Spanish (Bolivia)");static ES_IC=new t("es_IC","Spanish (Canary Islands)");static ES_EA=new t("es_EA","Spanish (Ceuta & Melilla)");static ES_CL=new t("es_CL","Spanish (Chile)");static ES_CO=new t("es_CO","Spanish (Colombia)");static ES_CR=new t("es_CR","Spanish (Costa Rica)");static ES_CU=new t("es_CU","Spanish (Cuba)");static ES_DO=new t("es_DO","Spanish (Dominican Republic)");static ES_EC=new t("es_EC","Spanish (Ecuador)");static ES_SV=new t("es_SV","Spanish (El Salvador)");static ES_GQ=new t("es_GQ","Spanish (Equatorial Guinea)");static ES_GT=new t("es_GT","Spanish (Guatemala)");static ES_HN=new t("es_HN","Spanish (Honduras)");static ES_MX=new t("es_MX","Spanish (Mexico)");static ES_NI=new t("es_NI","Spanish (Nicaragua)");static ES_PA=new t("es_PA","Spanish (Panama)");static ES_PY=new t("es_PY","Spanish (Paraguay)");static ES_PE=new t("es_PE","Spanish (Peru)");static ES_PH=new t("es_PH","Spanish (Philippines)");static ES_PR=new t("es_PR","Spanish (Puerto Rico)");static ES_ES=new t("es_ES","Spanish (Spain)");static ES_US=new t("es_US","Spanish (United States)");static ES_UY=new t("es_UY","Spanish (Uruguay)");static ES_VE=new t("es_VE","Spanish (Venezuela)");static SW=new t("sw","Swahili");static SW_KE=new t("sw_KE","Swahili (Kenya)");static SW_TZ=new t("sw_TZ","Swahili (Tanzania)");static SW_UG=new t("sw_UG","Swahili (Uganda)");static SV=new t("sv","Swedish");static SV_AX=new t("sv_AX","Swedish (\xC5land Islands)");static SV_FI=new t("sv_FI","Swedish (Finland)");static SV_SE=new t("sv_SE","Swedish (Sweden)");static TL=new t("tl","Tagalog");static TL_PH=new t("tl_PH","Tagalog (Philippines)");static TA=new t("ta","Tamil");static TA_IN=new t("ta_IN","Tamil (India)");static TA_MY=new t("ta_MY","Tamil (Malaysia)");static TA_SG=new t("ta_SG","Tamil (Singapore)");static TA_LK=new t("ta_LK","Tamil (Sri Lanka)");static TE=new t("te","Telugu");static TE_IN=new t("te_IN","Telugu (India)");static TH=new t("th","Thai");static TH_TH=new t("th_TH","Thai (Thailand)");static BO=new t("bo","Tibetan");static BO_CN=new t("bo_CN","Tibetan (China)");static BO_IN=new t("bo_IN","Tibetan (India)");static TI=new t("ti","Tigrinya");static TI_ER=new t("ti_ER","Tigrinya (Eritrea)");static TI_ET=new t("ti_ET","Tigrinya (Ethiopia)");static TO=new t("to","Tongan");static TO_TO=new t("to_TO","Tongan (Tonga)");static TR=new t("tr","Turkish");static TR_CY=new t("tr_CY","Turkish (Cyprus)");static TR_TR=new t("tr_TR","Turkish (Turkey)");static UK=new t("uk","Ukrainian");static UK_UA=new t("uk_UA","Ukrainian (Ukraine)");static UR=new t("ur","Urdu");static UR_IN=new t("ur_IN","Urdu (India)");static UR_PK=new t("ur_PK","Urdu (Pakistan)");static UG=new t("ug","Uyghur");static UG_ARAB_CN=new t("ug_Arab_CN","Uyghur (Arabic, China)");static UG_ARAB=new t("ug_Arab","Uyghur (Arabic)");static UG_CN=new t("ug_CN","Uyghur (China)");static UZ=new t("uz","Uzbek");static UZ_AF=new t("uz_AF","Uzbek (Afghanistan)");static UZ_ARAB_AF=new t("uz_Arab_AF","Uzbek (Arabic, Afghanistan)");static UZ_ARAB=new t("uz_Arab","Uzbek (Arabic)","uz");static UZ_CYRL_UZ=new t("uz_Cyrl_UZ","Uzbek (Cyrillic, Uzbekistan)");static UZ_CYRL=new t("uz_Cyrl","Uzbek (Cyrillic)","uz");static UZ_LATN_UZ=new t("uz_Latn_UZ","Uzbek (Latin, Uzbekistan)");static UZ_LATN=new t("uz_Latn","Uzbek (Latin)","uz");static UZ_UZ=new t("uz_UZ","Uzbek (Uzbekistan)");static VI=new t("vi","Vietnamese");static VI_VN=new t("vi_VN","Vietnamese (Vietnam)");static CY=new t("cy","Welsh");static CY_GB=new t("cy_GB","Welsh (United Kingdom)");static FY=new t("fy","Western Frisian");static FY_NL=new t("fy_NL","Western Frisian (Netherlands)");static YI=new t("yi","Yiddish");static YO=new t("yo","Yoruba");static YO_BJ=new t("yo_BJ","Yoruba (Benin)");static YO_NG=new t("yo_NG","Yoruba (Nigeria)");static ZU=new t("zu","Zulu");static ZU_ZA=new t("zu_ZA","Zulu (South Africa)");static lookup(n){return this.all().first(r=>r.equals(n))}equals(n){return c(n).lower.trim.equals(this.lower)}};var Rt=class t extends w{constructor(n,r,o){super(n,r);this.mmMultiplier=o}static MM=new t("Millimeter","mm",1);static CM=new t("Centimeter","cm",10);static DM=new t("Decimeter","dm",100);static M=new t("Meter","m",1e3);static KM=new t("Kilometer","km",1e6)};var Vt=class t extends w{constructor(n,r,o){super(n,r);this.gMultiplier=o}static MG=new t("MilliGram","mg",.001);static G=new t("Gram","g",1);static KG=new t("Kilogram","kg",1e3)};var ht=class extends N{by={id:this.state.by.id,user:this.state.by.user};when=new mt(this.state.when);constructor(e){super(E(e).is.defined(n=>n,n=>n).else({by:k.request?.identity??{id:0,user:"easy"},when:mt.now.toJSON()}))}};g([b()],ht.prototype,"by",2),g([re()],ht.prototype,"when",2);var pn=class extends N{id=this.state.id??ce();merge(e){return T.merge(this,e,{id:this.id})}};g([b()],pn.prototype,"id",2);var Ut=class extends N{id=this.state.id??ce();created=new ht(this.state.created);lastModified=new ht(this.state.lastModified);merge(e){return T.merge(this,e,{id:this.id,created:this.created,lastModified:new ht})}};g([b()],Ut.prototype,"id",2),g([b()],Ut.prototype,"created",2),g([b()],Ut.prototype,"lastModified",2);var Jn=class extends Pt{constructor(n,r){super();this.ctor=n;this.gateway=r}create=n=>ne(n)?n:new this.ctor(n);all(n){return this.gateway.all(n).then(r=>r.map(o=>new this.ctor(o)))}byId(n){return this.gateway.byId(n).then(r=>I(r).not.isDefined.reject(u.DoesNotExist)).then(r=>new this.ctor(r))}byIds(...n){return this.gateway.byIds(...n).then(r=>An(this.ctor,r))}byKey(n,r){return this.gateway.by("key",n,r).then(o=>o.map(a=>new this.ctor(a)))}by(n,r,o){return this.gateway.by(n.toString(),r,o).then(a=>a.map(f=>new this.ctor(f)))}search(n,r){return this.gateway.search(n,r).then(o=>o.map(a=>new this.ctor(a)))}filter(n){return this.gateway.filter(n).then(r=>r.map(o=>new this.ctor(o)))}exists(n){return this.gateway.exists(n)}add(n){return this.extend(this.create(n),"add").then(r=>I(r).not.isValid.reject()).then(r=>this.validate(r,"add")).then(r=>this.gateway.add($e(r))).then(r=>new this.ctor(r))}update(n,r){return this.gateway.byId(n).then(o=>I(o).not.isDefined.reject(u.DoesNotExist)).then(o=>new this.ctor(o).update(r)).then(o=>this.extend(o,"update")).then(o=>I(o).not.isValid.reject()).then(o=>this.validate(o,"update")).then(o=>this.gateway.update($e(o))).then(o=>new this.ctor(o))}remove(n){return this.gateway.remove(n)}extend(n,r){return X(n)}validate(n,r){return X(n)}upsert(n,r){return this.update(n,r).catch(o=>u.DoesNotExist.equals(o)?this.add(r):x(o))}};var Bn=class extends Pt{constructor(n,r){super();this.view=n;this.gateway=r}create=n=>this.view.from(n);all(n){return this.gateway.all(n).then(r=>r.map(this.create))}byId(n){return this.gateway.byId(n).then(r=>I(r).not.isDefined.reject(u.DoesNotExist)).then(r=>this.create(r))}byIds(...n){return this.gateway.byIds(...n).then(r=>r.map(this.create))}byKey(n,r){return this.gateway.by("key",n,r).then(o=>o.map(this.create))}by(n,r,o){return this.gateway.by(n.toString(),r,o).then(a=>a.map(this.create))}search(n,r){return this.gateway.search(n,r).then(o=>o.map(this.create))}filter(n){return this.gateway.filter(n).then(r=>r.map(o=>this.create(o)))}exists(n){return this.gateway.exists(n)}};var Se=class t{constructor(e=!0,n={}){this.enabled=e;this.directives=n}name="Cache-Control";static disabled=()=>new t(!1);static OneSecond=()=>new t().maxAge(1).staleWhileRevalidate(1);static fiveSeconds=()=>new t().maxAge(5).staleWhileRevalidate(5);static tenSeconds=()=>new t().maxAge(10).staleWhileRevalidate(10);static thirtySeconds=()=>new t().maxAge(30).staleWhileRevalidate(30);static sixtySeconds=()=>new t().maxAge(60).staleWhileRevalidate(60);static custom=(e,n)=>new t().maxAge(e).staleWhileRevalidate(n);maxAge=e=>D(this,n=>n.directives["max-age"]=e);sharedMaxAge=e=>D(this,n=>n.directives["s-maxage"]=e);noCache=e=>D(this,n=>n.directives["no-cache"]=e);mustRevalidate=e=>D(this,n=>n.directives["must-revalidate"]=e);private=e=>D(this,n=>n.directives.private=e);public=e=>D(this,n=>n.directives.public=e);immutable=e=>D(this,n=>n.directives.immutable=e);staleWhileRevalidate=e=>D(this,n=>n.directives["stale-while-revalidate"]=e);value=()=>this.toString();toString(){return oe(this.directives).mapDefined(([e,n])=>B(n,z(n)?`${e}=${se.toSeconds(n)}`:e)).join(",")}};import Vr from"form-urlencoded";var Z=class t extends w{constructor(n,r,o=a=>l(a)){super(n,r);this.type=r;this.encoder=o}static Form=new t("form","application/x-www-form-urlencoded",n=>Vr(n));static Json=new t("json","application/json",n=>n);static Stream=new t("stream","application/octet-stream");static Text=new t("text","text/plain");static Xml=new t("xml","application/xml");encode=n=>y(this.encoder,n)};var Kn={ContentType:"Content-Type",Correlation:"X-Correlation-Id"};var S=class t extends w{static Continue=new t("Continue",100);static SwitchingProtocols=new t("Switching protocols",101);static Processing=new t("Processing",102);static EarlyHints=new t("Early hints",103);static Ok=new t("Ok",200);static Created=new t("Created",201);static Accepted=new t("Accepted",202);static NonAuthoritativeInformation=new t("Non-authoritative information",203);static NoContent=new t("No content",204);static ResetContent=new t("Reset content",205);static PartialContent=new t("Partial content",206);static MultiStatus=new t("Multi-status",207);static AlreadyReported=new t("Already reported",208);static ImUsed=new t("IM used",226);static MultipleChoices=new t("Multiple Choices",300);static MovedPermanently=new t("Moved Permanently",301);static Found=new t("Found",302);static SeeOther=new t("See other",303);static NotModified=new t("Not modified",304);static UseProxy=new t("Use proxy",305);static SwitchProxy=new t("Switch proxy",306);static TemporaryRedirect=new t("Temporary redirect",307);static PermanentRedirect=new t("Permanent redirect",308);static BadRequest=new t("Bad request",400);static NotAuthorized=new t("Not authorized",401);static PaymentRequired=new t("Payment required",402);static Forbidden=new t("Forbidden",403);static NotFound=new t("Not found",404);static MethodNotAllowed=new t("Method not allowed",405);static NotAcceptable=new t("Not acceptable",406);static ProxyAuthenticationRequired=new t("Proxy authentication required",407);static RequestTimeout=new t("Request timeout",408);static Conflict=new t("Conflict",409);static Gone=new t("Gone",410);static LengthRequired=new t("Length required",411);static PreconditionFailed=new t("Precondition failed",412);static PayloadTooLarge=new t("Payload too large",413);static UriTooLong=new t("URI too long",414);static UnsupportedMediaType=new t("Unsupported media type",415);static RangeNotSatisfiable=new t("Range not satisfiable",416);static ExpectationFailed=new t("Expectation failed",417);static ImATeapot=new t("I'm a teapot",418);static MisdirectedRequest=new t("Misdirected request",421);static UnprocessableEntity=new t("Unprocessable entity",422);static Locked=new t("Locked",423);static FailedDependency=new t("Failed dependency",424);static TooEarly=new t("Too early",425);static UpgradeRequired=new t("Upgrade required",426);static PreconditionRequired=new t("Precondition required",428);static TooManyRequests=new t("Too many requests",429);static RequestHeaderFieldsTooLarge=new t("Request header fields too large",431);static UnavailableForLegalReasons=new t("Unavailable for legal reasons",451);static InternalServerError=new t("Internal server error",500);static NotImplemented=new t("Not implemented",501);static BadGateway=new t("Bad gateway",502);static ServiceUnavailable=new t("Service unavailable",503);static GatewayTimeout=new t("Gateway timeout",504);static HTTPVersionNotSupported=new t("Http version not supported",505);static VariantAlsoNegotiates=new t("Variant also negotiates",506);static InsufficientStorage=new t("Insufficient storage",507);static LoopDetected=new t("Loop detected",508);static NotExtended=new t("Not extended",510);static NetworkAuthenticationRequired=new t("Network authentication required",511);get isError(){return this.isClientError||this.isServerError}get isClientError(){return this.id>=400&&this.id<500}get isServerError(){return this.id>=500&&this.id<600}get status(){return this.id}},mn=t=>Zt(t,"id","status"),Hn=t=>mn(t)?t:S.byId(t);var A=class t extends w{static Get=new t("Get");static Put=new t("Put");static Patch=new t("Patch");static Post=new t("Post");static Delete=new t("Delete");constructor(e){super(e,e.toLowerCase(),e.toUpperCase())}};var Ee=class extends Error{constructor(n,r){super();this.origin=n;this.options=r}},Ur=t=>Ht(t)&&t instanceof Ee,Py=(t,e)=>Ur(t)?t:new Ee(t,e);var yn=t=>t instanceof K?t.pageOptions:t,K=class t extends w{constructor(n=Z.Json,r={},o){super(n.name);this.type=n;this.headers=r;this.pageOptions=o;this.headers["Content-Type"]=n.id,this.headers[Kn.Correlation]=k.request.correlationId??St()}requestOptions={};static get Form(){return new t(Z.Form)}static get Json(){return new t(Z.Json)}static get Stream(){return new t(Z.Stream)}static get Text(){return new t(Z.Text)}static get Xml(){return new t(Z.Xml)}page=n=>(this.pageOptions=n,this);authorization=n=>this.setHeader("Authorization",n);apiKey=n=>this.setHeader("apiKey",n);setHeader=(n,r)=>D(this,o=>o.headers[l(n)]=r);setHeaderUnlessPresent=(n,r)=>r?this.setHeader(n,this.headers[n]??r):this;accept=n=>this.setHeader("Accept",n.id);bearer=n=>J(n)?this.authorization(`Bearer ${n}`):this;basic=(n,r)=>{let o=Buffer.from(`${n}:${r}`,"utf8").toString("base64");return this.authorization(`Basic ${o}`)};maxRedirects=n=>(this.requestOptions.maxRedirects=n,this);validateStatus=n=>(this.requestOptions.validateStatus=n,this);timeout=n=>(this.requestOptions.timeout=n,this)},vy=t=>s(t)&&t instanceof K;var Jr=t=>s(t?.error?.errors),Br=t=>s(t?.data.items),nt={toData:(t,e=[],n,r)=>({data:{code:t.status,items:i(e),itemCount:e.length,totalItems:n,meta:r}}),toError:(t,e=[j(t.name)])=>({error:{code:t.status,message:t.name??e[0].message??"Unknown",errors:i(e),errorCount:e.length}}),to:(t,e)=>E(t).is.not.defined(n=>n,void 0).type(mn,n=>nt.toError(n??e??S.InternalServerError,[j(n.name)])).type(pe,n=>nt.toError(e??S.BadRequest,[n])).type(Ht,n=>nt.toError(e??S.BadRequest,[n])).type(ee,n=>nt.toError(e??S.BadRequest,n.results)).type(Zn,n=>nt.toError(e??S.byId(n.body.error?.code),n.body.error?.errors)).type(Jr,n=>nt.toError(e??S.byId(n.error.code,S.BadRequest),n.error.errors)).type(Br,n=>nt.toData(e??S.byId(n.data.code,S.Ok),n.data.items,n.data.totalItems,n.data.meta)).else(n=>nt.toData(e??S.Ok,i(n)))},qn=t=>s(t)&&(s(t.data)||s(t.error));var Zn=t=>O(t,"status","body"),Jt=(t,e,n)=>({status:Hn(t),headers:n,body:nt.to(e)});var th=t=>({onOk:t?.onOk??S.Ok,onNotFound:t?.onNotFound??S.NotFound,onError:t?.onError??S.BadRequest,type:t?.type??Z.Json,cache:t?.cache??Se.disabled()}),Tt=(t,e)=>(n,r)=>{d(n).property(r).set("verb",{verb:t,options:e})},Wn=t=>Tt(A.Get,t),eh=t=>Tt(A.Get,{onNotFound:S.Ok,...t}),nh=t=>Tt(A.Put,t),rh=t=>Tt(A.Patch,t),oh=t=>Tt(A.Post,{onOk:S.Created,...t}),ah=t=>Tt(A.Delete,{onOk:S.NoContent,...t}),sh=t=>Tt(A.Get,{type:Z.Stream,...t});var Pe=class t extends he{static health=V.segment("health");static Health=new t([t.health])};var hn=class{constructor(e={},n={},r,o){this.path=e;this.query=n;this.body=r;this.headers=o}get id(){return this.get("id")}get skip(){return B(this.query?.skip,Ft(this.query?.skip))}get take(){return B(this.query?.take,Ft(this.query?.take))}get q(){return this.get("q")}get=e=>this.path[e.toString()]??this.query[e.toString()]},Ih=t=>new hn(t.params,t.query,t.body,t.headers);var wn=class{labCoat=()=>(e,n)=>{d(e).property(n).set("labCoat",!0)};token=()=>(e,n)=>{d(e).property(n).set("token",!0)};scope=e=>(n,r)=>{d(n).property(r).set("token",!0),d(n).property(r).set("scope",e)};useCase=e=>(n,r)=>{d(n).property(r).set("token",!0),d(n).property(r).set("uc",e)}},vh=new wn;var zn=t=>e=>{d(e).set("route",t)},Kr=(t,e,n,r)=>p(n).is.defined().map(o=>({verb:o,endpoint:t,requires:e,middleware:r??[]})).orElse(),gn=class{constructor(e){this.resource=e}get route(){return d(this.resource).get("route")}get middleware(){return d(this.resource).get("middleware")??[]}get endpoints(){return d(this.resource).properties("verb").mapDefined(e=>Kr(this.resource[e.property],{labCoat:e.get("labCoat")??!1,token:e.get("token")??!1,scope:e.get("scope"),uc:e.get("uc")},e.get("verb"),e.get("middleware")))}},Jh=t=>new gn(t);var jn=class extends w{constructor(n,r,o=i()){super(n);this.name=n;this.app=r;this.resources=o}port=8080;pre=()=>[];post=()=>[];with(...n){return p(this).accept(r=>r.resources.add(n.map(o=>new o))).value}atPort(n){return p(this).accept(r=>r.port=n).value}start(n=`Service ${this.name} listening on port ${this.port} with ${this.resources.length} resources.`){p(this).accept(r=>r.pre().forEach(o=>this.app.use(o))).accept(r=>r.resources.forEach(o=>this.app.route(this,o))).accept(r=>r.post().forEach(o=>this.app.use(o))).accept(r=>r.app.listen(this.port,n))}};var Bt=class{ok=()=>X({state:"Service is healthy."})};g([Wn()],Bt.prototype,"ok",2),Bt=g([zn(Pe.Health)],Bt);var Ce=class extends w{constructor(n,r=c(n).kebab){super(n,r.toString());this.name=n}};var $n=class t extends Ce{constructor(e){super(e)}static Main=new t("Main")};var Ne=class{constructor(e){this.repo=e}all(e){return this.repo.all(e)}byId(e){return this.repo.byId(e)}byIds(...e){return this.repo.byIds(...e)}byKey(e,n){return this.repo.byKey(e,n)}query({query:e,skip:n,take:r}){return this.search(e,{skip:n,take:r})}search(e,n){return E(e).is.not.empty(r=>r,r=>this.repo.search(r,n)).else(()=>X(h()))}filter(e){return this.repo.filter(e)}exists(e){return this.repo.exists(e)}};var Yn=class extends Ne{add(e){return this.repo.add(e)}update(e,n){return this.repo.update(e,n)}upsert(e,n){return this.repo.upsert(e,n)}remove(e){return this.repo.remove(e)}};var Qn=class extends w{constructor(n,r,o=c(r).kebab,a=i()){super(r,o.toString());this.app=n;this.scopes=a}with(...n){return this.scopes.add(...n),this}static byScopes(...n){return this.filter(r=>r.scopes.some(o=>st(o,n)))}};import Hr from"axios";var qr=t=>s(t?.response),Zr=t=>s(t?.request),Wr=(t,e,n)=>E(n).type(qr,r=>Jt(r.response.status,qn(r.response.data)?r.response.data:j(r.response.statusText,t.path,t),r.response.headers)).type(Zr,r=>Jt(r.request.status,j(r.request.message,t.path,t))).else(r=>Jt(S.InternalServerError,j(r.message,t.path,t))),Ae=class{constructor(e=Hr){this.ai=e}execute=({uri:e,verb:n,body:r,transform:o=U=>U,transformError:a=U=>U,options:f=K.Json})=>this.ai.request({url:e.toString(),method:n.toString(),headers:e.isInternal&&m(f.headers.Authorization)?f.bearer(k.request.jwt).headers:f.headers,data:f.type.encode(r),maxRedirects:f.requestOptions.maxRedirects,...f.requestOptions.timeout&&{timeout:se.toMilliseconds(f?.requestOptions.timeout)},...f.requestOptions.validateStatus&&{validateStatus:f.requestOptions.validateStatus}}).then(U=>Jt(U.status,o(U.data),U.headers)).catch(U=>Promise.reject(Wr(e,n,a(U))))};var $=class{constructor(e=new Ae,n){this.provider=e;this.store=n}get(e,n,r,o=a=>a){return this.execute({uri:e.skip(yn(n)?.skip).take(yn(n)?.take),verb:A.Get,transform:r,transformError:o,options:this.options(A.Get,n)})}post(e,n,r=K.Json,o,a=f=>f){return this.execute({uri:e,verb:A.Post,body:n,transform:o,transformError:a,options:this.options(A.Post,r)})}put(e,n,r=K.Json,o,a=f=>f){return this.execute({uri:e,verb:A.Put,body:n,transform:o,transformError:a,options:this.options(A.Put,r)})}patch(e,n,r=K.Json,o,a=f=>f){return this.execute({uri:e,verb:A.Patch,body:n,transform:o,transformError:a,options:this.options(A.Patch,r)})}delete(e,n=K.Json,r,o=a=>a){return this.execute({uri:e,verb:A.Delete,transform:r,transformError:o,options:this.options(A.Delete,n)})}options(e,n){return n instanceof K?n:K.Json}execute(e){return this.store?this.store.execute(e,()=>this.provider.execute(e)):this.provider.execute(e)}},tg=new $;var Re=class extends dt{constructor(n=new $){super();this.api=n}get(n,r){return this.api.get(n,r).then(o=>Q(o.body.data,a=>h(a?.items,{total:a?.totalItems,...a?.meta})))}getOne(n,r){return this.get(n,r).then(o=>o.first())}post(n,r,o){return this.api.post(n,r,o).then(a=>a.body.data?.items.first()??{})}postSearch(n,r){return this.api.post(n,r).then(o=>Q(o.body.data,a=>h(a?.items,{total:a?.totalItems,...a?.meta})))}patch(n,r,o){return this.api.patch(n,r,o).then(a=>a.body.data?.items.first()??{})}put(n,r,o){return this.api.put(n,r,o).then(a=>a.body.data?.items.first()??{})}delete(n,r){return this.api.delete(n,r).then(()=>!0)}};var Lt=class extends Re{constructor(n,r,o=new $){super(o);this.route=n;this.routeId=r;this.api=o}all(n){return this.get(this.route(),n)}byId(n,r){return this.getOne(this.routeId().id(n))}byIds(...n){return this.get(this.route().ids(L(...n)))}search(n,r){return this.get(this.route().query(n),r)}exists(n,r){return this.get(this.routeId().id(n)).then(o=>o.length===1).catch(o=>S.NotFound.equals(o.status)?!1:Promise.reject(o))}add(n,r){return this.post(this.route(),n,r)}filter(n){return this.postSearch(this.route(),n)}update(n,r){return this.patch(this.routeId().id(n.id),n,r)}upsert(n,r){return this.put(this.routeId().id(n.id),n,r)}remove(n,r){return this.delete(this.routeId().id(n),r)}};var Xn=class extends Lt{constructor(n,r,o=new bt,a=new $){super(n,r,a);this.route=n;this.routeId=r;this.map=o;this.api=a}get(n,r){return super.get(n,r).then(o=>o.map(a=>this.map.in(a)))}getOne(n,r){return super.get(n,r).then(o=>o.first()).then(o=>this.map.in(o))}add(n){return super.add(this.map.out(n))}update(n){return super.update(this.map.out(n))}};var _n=class extends Lt{constructor(n,r,o={in:Ze({}).fromSource,out:Ze({}).fromSource},a=new $){super(n,r,a);this.route=n;this.routeId=r;this.views=o;this.api=a}get(n,r){return super.get(n,r).then(o=>o.map(a=>this.views.in.from(a)))}getOne(n,r){return super.get(n,r).then(o=>o.first()).then(o=>this.views.in.from(o))}add(n){return super.add(this.views.out.from(n))}update(n){return super.update(this.views.out.from(n))}};import{decode as zr,sign as jr,verify as $r}from"jsonwebtoken";var tr=class t extends M{get isValid(){return p(()=>k.env.get("tokenPublicKey")??"").map(e=>$r(this.value,e)).map(()=>!0).orElse()??!1}static sign=(e,n)=>p(()=>k.env.get("tokenPrivateKey")??"").is.not.empty().map(r=>jr(e,r,{...n,expiresIn:k.env.get("tokenExpiresIn")??"1h",keyid:k.env.get("tokenKeyid")??"easy",algorithm:k.env.get("tokenAlgorithm","RS256")})).map(r=>new t(r)).value;static of=e=>new t(e.jwt);decode=()=>zr(this.value);toJSON(){return{jwt:this.value}}};var Ie=t=>z(t)||ot(t)||Yr(t)?t.toString():`'${t}'`,Oe=class{constructor(e,n,r){this.first=e;this.operator=n;this.second=r}and=e=>new Le(this,"AND",e);or=e=>new Le(this,"OR",e);toString(){return`${this.first} ${this.operator} ${Ie(this.second)}`}},Le=class extends Oe{toString(){return`(${this.first} ${this.operator} ${Ie(this.second)})`}},ke=(t,e,n,r=xt.default)=>new Oe(t,e,r.from(n)),Yr=t=>O(t,"and","or");var Kt=class extends ut{constructor(n,r,o){super(r,o);this.owner=n}get count(){return this.function("COUNT")}get max(){return this.function("MAX")}get min(){return this.function("MIN")}get sum(){return this.function("SUM")}get average(){return this.function("AVG")}get length(){return this.function("LEN")}get asc(){return this.format("$col ASC")}get desc(){return this.format("$col DESC")}in=(n={})=>p(n).map(r=>r[this.property]??y(this.options?.dflt)).map(r=>this.options?.convert?.to(r)).orElse();out=(n={},r="")=>p(n).map(o=>this.options?.convert?.from(o[r])).orElse();function=n=>this.format(`${n}($name)`);format=n=>new Me(this,n);is=n=>this.clause("=",n);not=n=>this.clause("<>",n);like=n=>this.clause("LIKE",`%${n}%`);startsLike=n=>this.clause("LIKE",`${n}%`);endsLike=n=>this.clause("LIKE",`%${n}`);unlike=n=>this.clause("NOT LIKE",`%${n}%`);less=n=>this.clause("<",n);lessEqual=n=>this.clause("<=",n);greater=n=>this.clause(">",n);greaterEqual=n=>this.clause(">=",n);as=n=>this.format(`$col AS ${n}`);toString(){return`${this.owner}.${this.property}`}clause=(n,r)=>ke(this,n,r,this?.options?.convert)},Me=class extends Kt{constructor(n,r){super(n.owner,n.property);this.col=n;this.pattern=r}toString(){return this.pattern.replace("$col",this.col.toString()).replace("$table",this.col.owner.toString).replace("$name",this.col.property)}},er=class extends Me{};var rt=class{constructor(e,n=i()){this.table=e;this.clauses=n}where=(...e)=>(this.clauses.add(e),this)};var ve=class extends rt{toString(){return`DELETE FROM ${this.table}`+v(this.clauses.length,` WHERE ${this.clauses.join(" AND ")};`,";")}};var Fe=class extends rt{constructor(n,r){super(n);this.table=n;this.fields=r}toString(){return`INSERT INTO ${this.table} (${Object.keys(this.fields).join(", ")}) OUTPUT INSERTED.* VALUES (${Object.values(this.fields).map(n=>Ie(n)).join(", ")});`}};var Ge=class{constructor(e,n,r,o){this.first=e;this.second=n;this.c=r;this.c2=o;this.db=this.first.db}db;on(e,n){return this.c=e,this.c2=n,this}toString(){return`${this.first} JOIN ${this.second} ON ${this.c} = ${this.c2}`}};var It=class extends rt{constructor(n,r=i()){super(n);this.columns=r}ordered=i();grouped=i();_top=0;_limit=0;_offset=0;from(n){return this.table=n??this.table,this}orderBy=(...n)=>(this.ordered.add(n),this);groupBy(...n){return this.grouped.add(n),this}top(n){return this._top=n,this}limit(n){return this._limit=n,this}offset(n){return this._offset=n,this}toString(){return"SELECT "+v(this._top,`TOP ${this._top} `,"")+v(this.columns.length,this.columns.join(", "),"*")+` FROM ${this.table}`+v(this.clauses.length,` WHERE ${this.clauses.join(" AND ")}`,"")+v(this.grouped.length,` GROUP BY ${this.grouped.join(", ")}`,"")+v(this.ordered.length,` ORDERED BY ${this.ordered.join(", ")}`,"")+v(this._limit,` LIMIT ${this._limit}`,"")+v(this._offset,` OFFSET ${this._offset};`,";")}};var De=class extends rt{constructor(n,r){super(n);this.table=n;this.fields=r}toString(){return`UPDATE ${this.table} SET ${Object.entries(this.fields).map(([n,r])=>ke(n,"=",r)).join(", ")} OUTPUT INSERTED.*`+v(this.clauses.length,` WHERE ${this.clauses.join(" AND ")};`,";")}};var Ve=class extends It{constructor(e){super(e)}toString(){return"SELECT COUNT(*)"+v(this._top,` TOP ${this._top}`,"")+` FROM ${this.table}`+v(this.clauses.length,` WHERE ${this.clauses.join(" AND ")}`,"")+v(this.grouped.length,` GROUP BY ${this.grouped.join(", ")}`,"")+";"}};var nr=class extends bt{map={...Be,column:(e,n)=>new Kt(this,e,n)};id=this.map.column("",{dflt:St});constructor(e={startFrom:"source"}){super(e)}get db(){return Te.Default}get count(){return new Ve(this)}prop=(e,n)=>this.map.column(e,n);select=(...e)=>new It(this,i(e));insert=e=>new Fe(this,this.out(e));update=e=>new De(this,this.out(e));delete=()=>new ve(this,i());join=e=>new Ge(this,e)};var rr=class extends dt{constructor(n,r=n.db.provide()){super();this.table=n;this.provider=r}provide=({provider:n}={})=>n??this.provider;all(n){return this.provide(n).query(this.table.select()).then(r=>h(r.map(o=>this.table.in(o)),n))}byId(n,r){return this.provide(r).query(this.table.select().where(this.table.id.is(n))).then(o=>o.first()).then(o=>B(o,this.table.in(o)))}exists(n,r){return this.byId(n).then(o=>s(o))}add(n,r){return this.provide(r).query(this.table.insert(n)).then(o=>I(o.first()).not.isDefined.reject(`Could not add items with id ${n.id}`)).then(o=>this.table.in(o))}remove(n,r){return this.provide(r).command(this.table.delete().where(this.table.id.is(n))).then(()=>!0)}update(n,r){return this.provide(r).query(this.table.update(n).where(this.table.id.is(n.id))).then(o=>I(o.first()).not.isDefined.reject(`Could not update item with id ${n.id}`)).then(o=>this.table.in(o))}};export{yt as Address,$ as Api,Re as ApiGateway,$n as App,ht as Audit,Ae as AxiosProvider,On as BaseContext,le as BaseRequestContext,Gn as Box,Se as CacheControl,pn as Child,Oe as Clause,Kt as Column,we as Condition,Z as ContentType,an as Context,ct as Convert,pt as Country,xe as Currency,Te as Database,mt as DateTime,sn as DefaultProvider,ve as Delete,wt as Dimension,on as DotEnvContext,Mn as EAN,he as EasyUri,cn as Email,Ut as Entity,w as Enum,Vn as Environment,u as Exception,ln as Field,dt as Gateway,Bt as HealthResource,Pe as HealthUri,Kn as HttpHeader,S as HttpStatus,A as HttpVerb,vn as IBAN,kn as InMemoryGateway,Fe as Insert,Ge as Join,tr as Jwt,vt as List,Un as Locale,ge as LogicalCondition,Yn as Manage,Xn as MappedRouteGateway,bt as Mapper,Ot as Money,Dt as Name,er as OrderColumn,Ee as OriginatedError,de as PageList,Le as ParathesizedClause,Me as PatternColumn,un as PostalCode,ut as Property,Jn as Repo,Pt as Repository,hn as Req,K as RequestOptions,wn as Requires,me as Results,Lt as RouteGateway,Ce as Scope,Ne as Search,It as Select,H as Sentence,jn as Service,Nt as SortCondition,rt as SqlQuery,Wt as State,N as Struct,nr as Table,rr as TableGateway,nn as ToText,Mt as Try,Bn as Typo,Rt as UnitOfMeasurement,Vt as UnitOfWeight,De as Update,dn as Url,Qn as UseCase,M as Value,Yt as View,_n as ViewRouteGateway,ze as Wait,be as Weight,Ye as When,Xt as any,tg as api,wo as array,We as asJson,An as asList,Ft as asNumber,Hl as asPageList,_t as asResults,l as asString,cc as asc,Tr as build,vi as cache,se as cacheAge,E as choose,G as constraint,xt as convert,k as ctx,Et as days,xs as defined,ah as del,uc as desc,Td as dt,Cd as email,oe as entries,Ls as future,Wn as get,Cs as gt,Ns as gte,ir as ifA,B as ifDefined,Oo as ifFalse,v as ifGet,fn as ifNotEmpty,Ro as ifTrue,Cn as inFuture,Ps as inList,Pn as inPast,Es as includes,O as isA,Xd as isAddress,Zt as isAn,R as isArray,ot as isBoolean,Yr as isClause,Je as isConstructor,ue as isDate,gd as isDateTime,s as isDefined,il as isDoesNotExist,Lr as isEAN,kr as isEmail,m as isEmpty,to as isEmptyObject,te as isEnum,Qt as isEqual,Ht as isError,sl as isException,xr as isFalsy,Zu as isField,Y as isFunc,lt as isFunction,mn as isHttpStatus,vr as isIBAN,st as isIn,eo as isInstance,no as isIntersecting,_r as isIsoDateString,pr as isJson,Nn as isList,ko as isLoading,lr as isMapping,hp as isMoney,J as isNotEmpty,Ue as isNotPresent,Rl as isNullish,z as isNumber,ft as isObject,Ur as isOriginatedError,Sn as isPageList,ro as isPresent,qt as isPrimitive,vy as isRequestOptions,Zn as isResponse,qn as isRestResult,pe as isResult,ee as isResults,dr as isSimpleView,Au as isSortCondition,W as isString,cd as isStruct,wr as isText,at as isTrue,cl as isTruthy,Xr as isUndefined,Dr as isUrl,wl as isUuid,ne as isValidatable,En as isValue,T as json,Ri as kebab,vo as log,As as lt,Rs as lte,Be as mappings,ks as maxLength,d as meta,Is as minLength,Gt as money,Sp as name,bs as notEmpty,C as ofConstruct,y as ofGet,Nl as ofMessage,kt as ofProperty,D as on,Ss as optional,Os as past,rh as patch,oh as post,Fn as postalCode,nh as put,Ie as quote,x as reject,gr as replaceAll,b as required,vh as requires,X as resolve,nt as rest,zn as route,Jh as routes,Ms as rule,eh as search,Ar as searchable,Ii as singleton,sh as stream,Nr as tag,Rn as template,c as text,L as toArray,fr as toCacheOptions,ke as toClause,In as toCondition,Kl as toFilter,Hn as toHttpStatus,ce as toId,$e as toJson,i as toList,it as toName,ho as toObject,Py as toOriginatedError,h as toPageList,yn as toPageOptions,Ih as toReq,Jt as toResponse,j as toResult,tt as toResults,Ct as toSegment,Cr as toShortFilter,St as toUuid,th as toVerbOptions,cr as toViewer,_ as traverse,p as tryTo,zt as tuple,ia as tuple2,la as tuple3,ca as tuple4,ua as tuple5,V as uri,Vd as url,Q as use,re as valid,F as validate,ds as validateReject,Ze as view,Aa as views,Oa as wait,ha as we,Dn as weight,I as when};
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "15.8.
|
|
3
|
+
"version": "15.8.6",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
8
9
|
"types": "dist/index",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"lint": "yarn g:eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
|
21
22
|
"format": "yarn g:prettier --check --write src test *.json",
|
|
22
23
|
"build": "yarn g:tsc",
|
|
24
|
+
"build:tsup": "yarn g:tsup",
|
|
23
25
|
"test": "yarn g:jest --coverage",
|
|
24
26
|
"prepack": "yarn g:copy-readme"
|
|
25
27
|
},
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
"access": "public"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@thisisagile/easy-test": "15.8.
|
|
36
|
+
"@thisisagile/easy-test": "15.8.6",
|
|
35
37
|
"@types/form-urlencoded": "^4.4.0",
|
|
36
38
|
"@types/jsonwebtoken": "^9.0.2",
|
|
37
39
|
"@types/luxon": "3.2.0",
|
package/src/process/Manage.ts
CHANGED
|
@@ -2,8 +2,19 @@ import { Search } from './Search';
|
|
|
2
2
|
import { FetchOptions, Id, Json } from '../types';
|
|
3
3
|
|
|
4
4
|
export class Manage<T, Options = FetchOptions> extends Search<T, Options> {
|
|
5
|
-
add
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
add(json: Json): Promise<T> {
|
|
6
|
+
return this.repo.add(json);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
update(id: Id, json: Json): Promise<T> {
|
|
10
|
+
return this.repo.update(id, json);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
upsert(id: Id, json: Json): Promise<T> {
|
|
14
|
+
return this.repo.upsert(id, json);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
remove(id: Id): Promise<boolean> {
|
|
18
|
+
return this.repo.remove(id);
|
|
19
|
+
}
|
|
9
20
|
}
|
package/src/process/Search.ts
CHANGED
|
@@ -5,25 +5,40 @@ import { Req } from '../resources';
|
|
|
5
5
|
export class Search<T, Options = FetchOptions> {
|
|
6
6
|
constructor(protected repo: Repository<T, Options>) {}
|
|
7
7
|
|
|
8
|
-
all
|
|
8
|
+
all(options?: Options): Promise<PageList<T>> {
|
|
9
|
+
return this.repo.all(options);
|
|
10
|
+
}
|
|
9
11
|
|
|
10
|
-
byId
|
|
12
|
+
byId(id: Id): Promise<T> {
|
|
13
|
+
return this.repo.byId(id);
|
|
14
|
+
}
|
|
11
15
|
|
|
12
|
-
byIds
|
|
16
|
+
byIds(...ids: Id[]): Promise<List<T>> {
|
|
17
|
+
return this.repo.byIds(...ids);
|
|
18
|
+
}
|
|
13
19
|
|
|
14
|
-
byKey
|
|
20
|
+
byKey(key: Key, options?: Options): Promise<PageList<T>> {
|
|
21
|
+
return this.repo.byKey(key, options);
|
|
22
|
+
}
|
|
15
23
|
|
|
16
|
-
query
|
|
24
|
+
query({ query, skip, take }: Req): Promise<PageList<T>> {
|
|
25
|
+
return this.search(query, { skip, take } as Options);
|
|
26
|
+
}
|
|
17
27
|
|
|
18
|
-
search
|
|
19
|
-
choose(query)
|
|
28
|
+
search(query: JsonValue, options?: Options): Promise<PageList<T>> {
|
|
29
|
+
return choose(query)
|
|
20
30
|
.is.not.empty(
|
|
21
31
|
q => q,
|
|
22
32
|
q => this.repo.search(q, options)
|
|
23
33
|
)
|
|
24
34
|
.else(() => resolve(toPageList<T>()));
|
|
35
|
+
}
|
|
25
36
|
|
|
26
|
-
filter
|
|
37
|
+
filter(options?: Options): Promise<PageList<T>> {
|
|
38
|
+
return this.repo.filter(options);
|
|
39
|
+
}
|
|
27
40
|
|
|
28
|
-
exists
|
|
41
|
+
exists(id: Id): Promise<boolean> {
|
|
42
|
+
return this.repo.exists(id);
|
|
43
|
+
}
|
|
29
44
|
}
|
package/src/resources/Req.ts
CHANGED
|
@@ -2,15 +2,20 @@ import { asNumber, Id, Json, JsonValue, OneOrMore, PageOptions, Text } from '../
|
|
|
2
2
|
import { ifDefined } from '../utils';
|
|
3
3
|
|
|
4
4
|
export class Req implements Omit<PageOptions, 'sort'> {
|
|
5
|
-
readonly skip = ifDefined(this.query?.skip, asNumber(this.query?.skip));
|
|
6
|
-
readonly take = ifDefined(this.query?.take, asNumber(this.query?.take));
|
|
7
|
-
|
|
8
5
|
constructor(readonly path: Json = {}, readonly query: Json = {}, readonly body: unknown, readonly headers: Record<string, OneOrMore<string>>) {}
|
|
9
6
|
|
|
10
7
|
get id(): Id {
|
|
11
8
|
return this.get('id');
|
|
12
9
|
}
|
|
13
10
|
|
|
11
|
+
get skip(): number | undefined {
|
|
12
|
+
return ifDefined(this.query?.skip, asNumber(this.query?.skip));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
get take(): number | undefined {
|
|
16
|
+
return ifDefined(this.query?.take, asNumber(this.query?.take));
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
get q(): JsonValue {
|
|
15
20
|
return this.get('q');
|
|
16
21
|
}
|
package/src/sql/Join.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { Column } from './Column';
|
|
|
2
2
|
import { Table } from './Table';
|
|
3
3
|
|
|
4
4
|
export class Join {
|
|
5
|
-
readonly db
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
readonly db;
|
|
6
|
+
constructor(private first: Table, private second: Table, private c?: Column, private c2?: Column) {
|
|
7
|
+
this.db = this.first.db;
|
|
8
|
+
}
|
|
8
9
|
|
|
9
10
|
on(c: Column, c2: Column): this {
|
|
10
11
|
this.c = c;
|
package/src/utils/If.ts
CHANGED
|
@@ -17,6 +17,7 @@ export function ifDefined<Out, In = unknown>(o: Optional<In>, f: Construct<Out,
|
|
|
17
17
|
export function ifDefined<Out, In = unknown>(o: Optional<In>, f: Construct<Out, NonNullable<In>>, alt?: Construct<Out>): Optional<Out> {
|
|
18
18
|
return isDefined(o) ? ofConstruct(f, o) : ofConstruct(alt);
|
|
19
19
|
}
|
|
20
|
+
|
|
20
21
|
export function ifNotEmpty<Out, In = unknown>(o: In, f: Construct<Out, NonNullable<In>>, alt: Construct<Out>): Out;
|
|
21
22
|
export function ifNotEmpty<Out, In = unknown>(o: In, f?: Construct<Out, NonNullable<In>>, alt?: Construct<Out>): Optional<Out>;
|
|
22
23
|
export function ifNotEmpty<Out, In = unknown>(o: In, f: Construct<Out, NonNullable<In>>, alt?: Construct<Out>): Optional<Out>;
|
package/dist/data/Condition.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Json, Sort } from '../types';
|
|
2
|
-
import { Convert } from '../utils';
|
|
3
|
-
export declare class Condition {
|
|
4
|
-
readonly key: string;
|
|
5
|
-
readonly operator: string;
|
|
6
|
-
readonly value: unknown;
|
|
7
|
-
constructor(key: string, operator: string, value: unknown);
|
|
8
|
-
and: (...others: Condition[]) => LogicalCondition;
|
|
9
|
-
or: (...others: Condition[]) => LogicalCondition;
|
|
10
|
-
toJSON(): Json;
|
|
11
|
-
}
|
|
12
|
-
export declare class LogicalCondition {
|
|
13
|
-
readonly operator: string;
|
|
14
|
-
readonly conditions: Condition[];
|
|
15
|
-
constructor(operator: string, conditions: Condition[]);
|
|
16
|
-
toJSON(): Json;
|
|
17
|
-
}
|
|
18
|
-
export declare class SortCondition extends Condition implements Sort {
|
|
19
|
-
readonly key: string;
|
|
20
|
-
readonly value: -1 | 1;
|
|
21
|
-
constructor(key: string, value: -1 | 1);
|
|
22
|
-
toJSON(): Json;
|
|
23
|
-
}
|
|
24
|
-
export declare const toCondition: (field: string, operator: string, value: unknown, conv?: Convert) => Condition;
|
|
25
|
-
export declare const isSortCondition: (s?: unknown) => s is SortCondition;
|
package/dist/data/Condition.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSortCondition = exports.toCondition = exports.SortCondition = exports.LogicalCondition = exports.Condition = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
class Condition {
|
|
7
|
-
constructor(key, operator, value) {
|
|
8
|
-
this.key = key;
|
|
9
|
-
this.operator = operator;
|
|
10
|
-
this.value = value;
|
|
11
|
-
this.and = (...others) => new LogicalCondition('and', [this, ...others]);
|
|
12
|
-
this.or = (...others) => new LogicalCondition('or', [this, ...others]);
|
|
13
|
-
}
|
|
14
|
-
toJSON() {
|
|
15
|
-
return { [this.key]: { [`$${this.operator}`]: types_1.json.parse(this.value) } };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.Condition = Condition;
|
|
19
|
-
class LogicalCondition {
|
|
20
|
-
constructor(operator, conditions) {
|
|
21
|
-
this.operator = operator;
|
|
22
|
-
this.conditions = conditions;
|
|
23
|
-
}
|
|
24
|
-
toJSON() {
|
|
25
|
-
return { [`$${this.operator}`]: this.conditions.map(c => c.toJSON()) };
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.LogicalCondition = LogicalCondition;
|
|
29
|
-
class SortCondition extends Condition {
|
|
30
|
-
constructor(key, value) {
|
|
31
|
-
super(key, '', value);
|
|
32
|
-
this.key = key;
|
|
33
|
-
this.value = value;
|
|
34
|
-
}
|
|
35
|
-
toJSON() {
|
|
36
|
-
return { [this.key]: this.value };
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.SortCondition = SortCondition;
|
|
40
|
-
const toCondition = (field, operator, value, conv = utils_1.convert.default) => new Condition(field, operator, conv.from(value));
|
|
41
|
-
exports.toCondition = toCondition;
|
|
42
|
-
const isSortCondition = (s) => (0, types_1.isDefined)(s) && s instanceof SortCondition;
|
|
43
|
-
exports.isSortCondition = isSortCondition;
|
|
44
|
-
//# sourceMappingURL=Condition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Condition.js","sourceRoot":"","sources":["../../src/data/Condition.ts"],"names":[],"mappings":";;;AAAA,oCAAkE;AAClE,oCAA4C;AAE5C,MAAa,SAAS;IACpB,YAAqB,GAAW,EAAW,QAAgB,EAAW,KAAc;QAA/D,QAAG,GAAH,GAAG,CAAQ;QAAW,aAAQ,GAAR,QAAQ,CAAQ;QAAW,UAAK,GAAL,KAAK,CAAS;QAEpF,QAAG,GAAG,CAAC,GAAG,MAAmB,EAAoB,EAAE,CAAC,IAAI,gBAAgB,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;QACnG,OAAE,GAAG,CAAC,GAAG,MAAmB,EAAoB,EAAE,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;IAHV,CAAC;IAKxF,MAAM;QACJ,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,YAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;IAC3E,CAAC;CACF;AATD,8BASC;AAED,MAAa,gBAAgB;IAC3B,YAAqB,QAAgB,EAAW,UAAuB;QAAlD,aAAQ,GAAR,QAAQ,CAAQ;QAAW,eAAU,GAAV,UAAU,CAAa;IAAG,CAAC;IAE3E,MAAM;QACJ,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;IACzE,CAAC;CACF;AAND,4CAMC;AAED,MAAa,aAAc,SAAQ,SAAS;IAC1C,YAAqB,GAAW,EAAW,KAAa;QACtD,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QADH,QAAG,GAAH,GAAG,CAAQ;QAAW,UAAK,GAAL,KAAK,CAAQ;IAExD,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC;CACF;AARD,sCAQC;AAEM,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAE,KAAc,EAAE,OAAgB,eAAO,CAAC,OAAO,EAAa,EAAE,CACzH,IAAI,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAc,CAAC,CAAC;AADnD,QAAA,WAAW,eACwC;AAEzD,MAAM,eAAe,GAAG,CAAC,CAAW,EAAsB,EAAE,CAAC,IAAA,iBAAS,EAAC,CAAC,CAAC,IAAI,CAAC,YAAY,aAAa,CAAC;AAAlG,QAAA,eAAe,mBAAmF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type DataProvider = any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataProvider.js","sourceRoot":"","sources":["../../src/data/DataProvider.ts"],"names":[],"mappings":""}
|
package/dist/data/Database.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Constructor, Enum } from '../types';
|
|
2
|
-
import { DataProvider } from './DataProvider';
|
|
3
|
-
export type DatabaseOptions = {
|
|
4
|
-
user?: string;
|
|
5
|
-
password?: string;
|
|
6
|
-
host?: string;
|
|
7
|
-
port?: number;
|
|
8
|
-
cluster?: string;
|
|
9
|
-
connectionString?: string;
|
|
10
|
-
maxPoolSize?: number;
|
|
11
|
-
minPoolSize?: number;
|
|
12
|
-
maxIdleTimeMS?: number;
|
|
13
|
-
};
|
|
14
|
-
export declare class DefaultProvider implements DataProvider {
|
|
15
|
-
}
|
|
16
|
-
export declare class Database extends Enum {
|
|
17
|
-
readonly provider: Constructor<DataProvider> | DataProvider;
|
|
18
|
-
readonly options?: DatabaseOptions | undefined;
|
|
19
|
-
static readonly Default: Database;
|
|
20
|
-
constructor(name: string, provider: Constructor<DataProvider> | DataProvider, options?: DatabaseOptions | undefined);
|
|
21
|
-
provide: <P>() => P;
|
|
22
|
-
}
|
package/dist/data/Database.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Database = exports.DefaultProvider = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
|
-
class DefaultProvider {
|
|
6
|
-
}
|
|
7
|
-
exports.DefaultProvider = DefaultProvider;
|
|
8
|
-
class Database extends types_1.Enum {
|
|
9
|
-
constructor(name, provider, options) {
|
|
10
|
-
super(name);
|
|
11
|
-
this.provider = provider;
|
|
12
|
-
this.options = options;
|
|
13
|
-
this.provide = () => (0, types_1.ofConstruct)(this.provider, this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Database = Database;
|
|
17
|
-
Database.Default = new Database('Default', DefaultProvider);
|
|
18
|
-
//# sourceMappingURL=Database.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../src/data/Database.ts"],"names":[],"mappings":";;;AAAA,oCAA0D;AAe1D,MAAa,eAAe;CAA2B;AAAvD,0CAAuD;AAEvD,MAAa,QAAS,SAAQ,YAAI;IAGhC,YAAY,IAAY,EAAW,QAAkD,EAAW,OAAyB;QACvH,KAAK,CAAC,IAAI,CAAC,CAAC;QADqB,aAAQ,GAAR,QAAQ,CAA0C;QAAW,YAAO,GAAP,OAAO,CAAkB;QAIzH,YAAO,GAAG,GAAS,EAAE,CAAC,IAAA,mBAAW,EAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAFvD,CAAC;;AALH,4BAQC;AAPiB,gBAAO,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,AAA3C,CAA4C"}
|
package/dist/data/Field.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Property } from '../utils';
|
|
2
|
-
import { Condition, SortCondition } from './Condition';
|
|
3
|
-
export declare class Field extends Property {
|
|
4
|
-
is: (value: unknown) => Condition;
|
|
5
|
-
isNot: (value: unknown) => Condition;
|
|
6
|
-
isIn: (...value: unknown[]) => Condition;
|
|
7
|
-
notIn: (...value: unknown[]) => Condition;
|
|
8
|
-
exists: (does: boolean) => Condition;
|
|
9
|
-
greater: (value: unknown) => Condition;
|
|
10
|
-
greaterEqual: (value: unknown) => Condition;
|
|
11
|
-
less: (value: unknown) => Condition;
|
|
12
|
-
lessEqual: (value: unknown) => Condition;
|
|
13
|
-
asc: () => SortCondition;
|
|
14
|
-
desc: () => SortCondition;
|
|
15
|
-
protected condition: (operator: string, value: unknown) => Condition;
|
|
16
|
-
}
|
|
17
|
-
export declare const isField: (f?: unknown) => f is Field;
|