diff --git a/README.md b/README.md
index ae13006f8..6df283ae0 100644
--- a/README.md
+++ b/README.md
@@ -14,14 +14,22 @@
-The ixo Blockchain is a Layer 1 blockchain that runs on both Testnet and Mainnet. It is built using the [Cosmos SDK](https://docs.cosmos.network/main), [Tendermint](https://docs.tendermint.com/), and [IBC](https://ibc.cosmos.network/), and was one of the earliest networks to incorporate these technologies. The recent addition of [CosmWASM](https://github.com/CosmWasm/wasmd) in v0.19.3 demonstrates ixo's commitment to ongoing innovation and evolution.
+The ixo Blockchain is a Layer 1 blockchain that runs on both Testnet and Mainnet. It is built using the [Cosmos SDK](https://docs.cosmos.network/main), [Tendermint](https://docs.tendermint.com/), and [IBC](https://ibc.cosmos.network/), and was one of the earliest networks to incorporate these technologies.
Have a look at [go.mod](https://github.com/ixofoundation/ixo-blockchain/blob/main/go.mod) for specific dependencies and their most recent versions.
The ixo Blockchain powers client applications for coordinating, financing and verifying impacts. The [Impacts Wallet](https://github.com/ixofoundation/ixo-Mobile-dev), [JAMBO](https://github.com/ixofoundation/jambo), and [Launchpad](https://github.com/ixofoundation/ixo-webclient) are examples of client applications that use the ixo Blockchain. The [Impacts SDK](https://www.npmjs.com/package/@ixo/impactxclient-sdk) makes it simple to interact with the ixo Blockchain.
+Ixo has 5 custom cosmos modules which help to reach the Ixo goals and missions:
+
+- [Bonds](/x/bonds/spec/README.md)
+- [Iid](/x/iid/spec/README.md)
+- [Entity](/x/entity/spec/README.md)
+- [Claims](/x/claims/spec/README.md)
+- [Token](/x/token/spec/README.md)
+
## ๐ค How to contribute
If you are interested in contributing to the ixo Blockchain, you can start by reviewing the documentation on our [website](https://docs.ixo.foundation/ixo/developers). There are many opportunities to get involved, such as contributing code or participating in community discussions.
-Our community is passionate about using blockchain technology to create positive impacts in the world. We believe in the power of collaboration and innovation to drive change, and we welcome anyone who shares our vision to join us on Discord or Telegram.
+Our community is passionate about using blockchain technology to create positive impacts in the world. We believe in the power of collaboration and innovation to drive change, and we welcome anyone who shares our vision to join us on Discord or Telegram
diff --git a/app/ante.go b/app/ante.go
index 52c59ac8b..1a83fd438 100644
--- a/app/ante.go
+++ b/app/ante.go
@@ -8,10 +8,10 @@ import (
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
- entityante "github.com/ixofoundation/ixo-blockchain/v2/x/entity/ante"
- entitykeeper "github.com/ixofoundation/ixo-blockchain/v2/x/entity/keeper"
- iidante "github.com/ixofoundation/ixo-blockchain/v2/x/iid/ante"
- iidkeeper "github.com/ixofoundation/ixo-blockchain/v2/x/iid/keeper"
+ entityante "github.com/ixofoundation/ixo-blockchain/v3/x/entity/ante"
+ entitykeeper "github.com/ixofoundation/ixo-blockchain/v3/x/entity/keeper"
+ iidante "github.com/ixofoundation/ixo-blockchain/v3/x/iid/ante"
+ iidkeeper "github.com/ixofoundation/ixo-blockchain/v3/x/iid/keeper"
)
// HandlerOptions are the options required for constructing a default SDK AnteHandler.
diff --git a/app/app.go b/app/app.go
index 1154264ad..76dd9dac6 100644
--- a/app/app.go
+++ b/app/app.go
@@ -29,10 +29,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/crisis"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/gorilla/mux"
- "github.com/ixofoundation/ixo-blockchain/v2/app/keepers"
- "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
- v2 "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades/v2"
- "github.com/ixofoundation/ixo-blockchain/v2/lib/ixo"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/keepers"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/upgrades"
+ v2 "github.com/ixofoundation/ixo-blockchain/v3/app/upgrades/v2"
+ v3 "github.com/ixofoundation/ixo-blockchain/v3/app/upgrades/v3"
+ "github.com/ixofoundation/ixo-blockchain/v3/lib/ixo"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
@@ -52,7 +53,7 @@ var (
DefaultNodeHome = os.ExpandEnv("$HOME/.ixod")
// scheduled upgrades and forks
- Upgrades = []upgrades.Upgrade{v2.Upgrade}
+ Upgrades = []upgrades.Upgrade{v2.Upgrade, v3.Upgrade}
Forks = []upgrades.Fork{}
// If EnableSpecificWasmProposals is "", and this is "true", then enable all x/wasm proposals.
diff --git a/app/encoding.go b/app/encoding.go
index 53a0451f0..e98ab4c4e 100644
--- a/app/encoding.go
+++ b/app/encoding.go
@@ -2,7 +2,7 @@ package app
import (
"github.com/cosmos/cosmos-sdk/std"
- "github.com/ixofoundation/ixo-blockchain/v2/app/params"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/params"
)
var encodingConfig params.EncodingConfig = MakeEncodingConfig()
diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go
index 060de01fa..6659835a4 100644
--- a/app/keepers/keepers.go
+++ b/app/keepers/keepers.go
@@ -74,19 +74,19 @@ import (
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"
// Local
- wasmbinding "github.com/ixofoundation/ixo-blockchain/v2/wasmbinding"
- bondskeeper "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/keeper"
- bondstypes "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- claimsmodulekeeper "github.com/ixofoundation/ixo-blockchain/v2/x/claims/keeper"
- claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types"
- entitymodule "github.com/ixofoundation/ixo-blockchain/v2/x/entity"
- entitykeeper "github.com/ixofoundation/ixo-blockchain/v2/x/entity/keeper"
- entitytypes "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types"
- iidmodulekeeper "github.com/ixofoundation/ixo-blockchain/v2/x/iid/keeper"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
- tokenmodule "github.com/ixofoundation/ixo-blockchain/v2/x/token"
- tokenkeeper "github.com/ixofoundation/ixo-blockchain/v2/x/token/keeper"
- tokentypes "github.com/ixofoundation/ixo-blockchain/v2/x/token/types"
+ wasmbinding "github.com/ixofoundation/ixo-blockchain/v3/wasmbinding"
+ bondskeeper "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/keeper"
+ bondstypes "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ claimsmodulekeeper "github.com/ixofoundation/ixo-blockchain/v3/x/claims/keeper"
+ claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+ entitymodule "github.com/ixofoundation/ixo-blockchain/v3/x/entity"
+ entitykeeper "github.com/ixofoundation/ixo-blockchain/v3/x/entity/keeper"
+ entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
+ iidmodulekeeper "github.com/ixofoundation/ixo-blockchain/v3/x/iid/keeper"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
+ tokenmodule "github.com/ixofoundation/ixo-blockchain/v3/x/token"
+ tokenkeeper "github.com/ixofoundation/ixo-blockchain/v3/x/token/keeper"
+ tokentypes "github.com/ixofoundation/ixo-blockchain/v3/x/token/types"
)
type AppKeepers struct {
diff --git a/app/keepers/keys.go b/app/keepers/keys.go
index 1a8f5149f..cfab97e28 100644
--- a/app/keepers/keys.go
+++ b/app/keepers/keys.go
@@ -33,11 +33,11 @@ import (
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"
// Local
- bondstypes "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types"
- entitytypes "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
- tokentypes "github.com/ixofoundation/ixo-blockchain/v2/x/token/types"
+ bondstypes "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+ entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
+ tokentypes "github.com/ixofoundation/ixo-blockchain/v3/x/token/types"
)
func (appKeepers *AppKeepers) GenerateKeys() {
diff --git a/app/modules.go b/app/modules.go
index 32fc0a02a..e953f4126 100644
--- a/app/modules.go
+++ b/app/modules.go
@@ -53,19 +53,19 @@ import (
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host"
intertx "github.com/cosmos/interchain-accounts/x/inter-tx"
intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types"
- appparams "github.com/ixofoundation/ixo-blockchain/v2/app/params"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds"
- bondstypes "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- claimsmodule "github.com/ixofoundation/ixo-blockchain/v2/x/claims"
- claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types"
- entitymodule "github.com/ixofoundation/ixo-blockchain/v2/x/entity"
- entityclient "github.com/ixofoundation/ixo-blockchain/v2/x/entity/client"
- entitytypes "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types"
- iidmodule "github.com/ixofoundation/ixo-blockchain/v2/x/iid"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
- tokenmodule "github.com/ixofoundation/ixo-blockchain/v2/x/token"
- tokenclient "github.com/ixofoundation/ixo-blockchain/v2/x/token/client"
- tokentypes "github.com/ixofoundation/ixo-blockchain/v2/x/token/types"
+ appparams "github.com/ixofoundation/ixo-blockchain/v3/app/params"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds"
+ bondstypes "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ claimsmodule "github.com/ixofoundation/ixo-blockchain/v3/x/claims"
+ claimsmoduletypes "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+ entitymodule "github.com/ixofoundation/ixo-blockchain/v3/x/entity"
+ entityclient "github.com/ixofoundation/ixo-blockchain/v3/x/entity/client"
+ entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
+ iidmodule "github.com/ixofoundation/ixo-blockchain/v3/x/iid"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
+ tokenmodule "github.com/ixofoundation/ixo-blockchain/v3/x/token"
+ tokenclient "github.com/ixofoundation/ixo-blockchain/v3/x/token/client"
+ tokentypes "github.com/ixofoundation/ixo-blockchain/v3/x/token/types"
packetforward "github.com/strangelove-ventures/packet-forward-middleware/v4/router"
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types"
)
diff --git a/app/upgrades/v2/constants.go b/app/upgrades/v2/constants.go
index e40d22dcd..1ea47325b 100644
--- a/app/upgrades/v2/constants.go
+++ b/app/upgrades/v2/constants.go
@@ -1,7 +1,7 @@
package v2
import (
- "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/upgrades"
store "github.com/cosmos/cosmos-sdk/store/types"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v4/types"
diff --git a/app/upgrades/v3/README.md b/app/upgrades/v3/README.md
new file mode 100644
index 000000000..1f4007ff5
--- /dev/null
+++ b/app/upgrades/v3/README.md
@@ -0,0 +1,3 @@
+# v3
+
+v3 release changes is availabale [here](https://github.com/ixofoundation/ixo-blockchain/releases/tag/v3.0.0).
diff --git a/app/upgrades/v3/constants.go b/app/upgrades/v3/constants.go
new file mode 100644
index 000000000..268deff73
--- /dev/null
+++ b/app/upgrades/v3/constants.go
@@ -0,0 +1,16 @@
+package v3
+
+import (
+ store "github.com/cosmos/cosmos-sdk/store/types"
+
+ "github.com/ixofoundation/ixo-blockchain/v3/app/upgrades"
+)
+
+// UpgradeName defines the on-chain upgrade name for the Ixo v3 upgrade.
+const UpgradeName = "v3"
+
+var Upgrade = upgrades.Upgrade{
+ UpgradeName: UpgradeName,
+ CreateUpgradeHandler: CreateUpgradeHandler,
+ StoreUpgrades: store.StoreUpgrades{},
+}
diff --git a/app/upgrades/v3/upgrades.go b/app/upgrades/v3/upgrades.go
new file mode 100644
index 000000000..ddbc3ebe9
--- /dev/null
+++ b/app/upgrades/v3/upgrades.go
@@ -0,0 +1,25 @@
+package v3
+
+import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ "github.com/cosmos/cosmos-sdk/types/module"
+ upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
+)
+
+func CreateUpgradeHandler(
+ mm *module.Manager,
+ configurator module.Configurator,
+) upgradetypes.UpgradeHandler {
+ return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
+ ctx.Logger().Info("๐ executing Ixo v3 upgrade ๐")
+
+ // Run migrations before applying any other state changes.
+ // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations().
+ migrations, err := mm.RunMigrations(ctx, configurator, fromVM)
+ if err != nil {
+ return nil, err
+ }
+
+ return migrations, nil
+ }
+}
diff --git a/cmd/ixod/cmd/root.go b/cmd/ixod/cmd/root.go
index a2c2176b7..38c29df41 100755
--- a/cmd/ixod/cmd/root.go
+++ b/cmd/ixod/cmd/root.go
@@ -26,8 +26,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
- "github.com/ixofoundation/ixo-blockchain/v2/app"
- "github.com/ixofoundation/ixo-blockchain/v2/app/params"
+ "github.com/ixofoundation/ixo-blockchain/v3/app"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/params"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
"github.com/spf13/cobra"
diff --git a/cmd/ixod/main.go b/cmd/ixod/main.go
index d12bc4f9d..0ecef2a99 100644
--- a/cmd/ixod/main.go
+++ b/cmd/ixod/main.go
@@ -3,12 +3,12 @@ package main
import (
"os"
- "github.com/ixofoundation/ixo-blockchain/v2/app/params"
- "github.com/ixofoundation/ixo-blockchain/v2/cmd/ixod/cmd"
+ "github.com/ixofoundation/ixo-blockchain/v3/app/params"
+ "github.com/ixofoundation/ixo-blockchain/v3/cmd/ixod/cmd"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
- "github.com/ixofoundation/ixo-blockchain/v2/app"
+ "github.com/ixofoundation/ixo-blockchain/v3/app"
)
func main() {
diff --git a/cmd/test_helpers.go.ignore b/cmd/test_helpers.go.ignore
index f24d040f2..899d76eb7 100644
--- a/cmd/test_helpers.go.ignore
+++ b/cmd/test_helpers.go.ignore
@@ -5,7 +5,7 @@ import (
"time"
"github.com/CosmWasm/wasmd/x/wasm/types"
- "github.com/ixofoundation/ixo-blockchain/v2/app"
+ "github.com/ixofoundation/ixo-blockchain/v3/app"
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
diff --git a/docs/core/proto-docs.html b/docs/core/proto-docs.html
index 7541261f9..4d1e78796 100644
--- a/docs/core/proto-docs.html
+++ b/docs/core/proto-docs.html
@@ -815,6 +815,30 @@ Table of Contents
MMsgSubmitClaimResponse
+
+ MMsgUpdateCollectionDates
+
+
+
+ MMsgUpdateCollectionDatesResponse
+
+
+
+ MMsgUpdateCollectionPayments
+
+
+
+ MMsgUpdateCollectionPaymentsResponse
+
+
+
+ MMsgUpdateCollectionState
+
+
+
+ MMsgUpdateCollectionStateResponse
+
+
MMsgWithdrawPayment
@@ -942,6 +966,10 @@ Table of Contents
MEntityAccountAuthzCreatedEvent
+
+ MEntityAccountAuthzRevokedEvent
+
+
MEntityAccountCreatedEvent
@@ -1269,6 +1297,14 @@ Table of Contents
MMsgGrantEntityAccountAuthzResponse
+
+ MMsgRevokeEntityAccountAuthz
+
+
+
+ MMsgRevokeEntityAccountAuthzResponse
+
+
MMsgTransferEntity
@@ -4822,7 +4858,7 @@ Collection
string |
|
admin is the account address that will authorize or revoke agents and
-payments (the grantor) |
+payments (the grantor), and can update the collection
@@ -4915,6 +4951,14 @@ Collection
signer address |
+
+ invalidated |
+ uint64 |
+ |
+ invalidated is the number of claims that have been evaluated as invalid
+(internally calculated) |
+
+
@@ -5334,6 +5378,12 @@ EvaluationStatus
|
+
+ INVALIDATED |
+ 4 |
+ |
+
+
@@ -6711,7 +6761,7 @@ MsgEvaluateClaim
collection_id |
string |
|
- claimID is the unique identifier of the claim to make evaluation against |
+ collection_id indicates to which Collection this claim belongs |
@@ -6846,6 +6896,151 @@ MsgSubmitClaimResponse
+ MsgUpdateCollectionDates
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ start_date |
+ google.protobuf.Timestamp |
+ |
+ startDate is the date after which claims may be submitted |
+
+
+
+ end_date |
+ google.protobuf.Timestamp |
+ |
+ endDate is the date after which no more claims may be submitted (no endDate
+is allowed) |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionDatesResponse
+
+
+
+
+
+
+ MsgUpdateCollectionPayments
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ payments |
+ Payments |
+ |
+ payments is the amount paid for claim submission, evaluation, approval, or
+rejection |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionPaymentsResponse
+
+
+
+
+
+
+ MsgUpdateCollectionState
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ state |
+ CollectionState |
+ |
+ state is the state of this Collection (open, paused, closed) you want to
+update to |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionStateResponse
+
+
+
+
+
+
MsgWithdrawPayment
@@ -6984,6 +7179,27 @@ Msg
|
+
+ UpdateCollectionState |
+ MsgUpdateCollectionState |
+ MsgUpdateCollectionStateResponse |
+ |
+
+
+
+ UpdateCollectionDates |
+ MsgUpdateCollectionDates |
+ MsgUpdateCollectionDatesResponse |
+ |
+
+
+
+ UpdateCollectionPayments |
+ MsgUpdateCollectionPayments |
+ MsgUpdateCollectionPaymentsResponse |
+ |
+
+
@@ -7684,7 +7900,7 @@ Entity
relayer_node |
string |
|
- Address of the operator through which the Entity was created |
+ Did of the operator through which the Entity was created |
@@ -7845,7 +8061,7 @@ ixo/entity/v1beta1/event.proto
EntityAccountAuthzCreatedEvent
- EntityAccountCreatedEvent is an event triggered on a entity account creation
+ EntityAccountCreatedEvent is an event triggered on a entity account authz
creation
@@ -7903,6 +8119,65 @@ EntityAccountAuthzCre
+ EntityAccountAuthzRevokedEvent
+
EntityAccountAuthzRevokedEvent is an event triggered on a entity account
authz revocation
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ |
+
+
+
+ signer |
+ string |
+ |
+ |
+
+
+
+ account_name |
+ string |
+ |
+ |
+
+
+
+ granter |
+ string |
+ |
+ |
+
+
+
+ grantee |
+ string |
+ |
+ |
+
+
+
+ msg_type_url |
+ string |
+ |
+ |
+
+
+
+
+
+
+
+
+
EntityAccountCreatedEvent
EntityAccountCreatedEvent is an event triggered on a entity account creation
@@ -9943,7 +10218,7 @@ MsgCreateEntity
relayer_node |
string |
|
- Address of the operator through which the Entity was created |
+ Did of the operator through which the Entity was created |
@@ -9997,7 +10272,7 @@ MsgCreateEntity
MsgCreateEntityAccount
- create a module account for an entity, account details will be added as a
linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+ create a module account for an entity
@@ -10110,7 +10385,7 @@ MsgGrantEntityAccountAuth
id |
string |
|
- entity id (did) to create account for |
+ entity id (did) which has the account |
@@ -10155,6 +10430,65 @@ MsgGrantEntityAcc
+ MsgRevokeEntityAccountAuthz
+
Revoke an existing authz grant from entity account (as grantor) to recipient
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ entity id (did) which has the account |
+
+
+
+ name |
+ string |
+ |
+ name of account |
+
+
+
+ grantee_address |
+ string |
+ |
+ the grantee address for which the authz grant will be revoked |
+
+
+
+ msg_type_url |
+ string |
+ |
+ the msg type url of the grant to be revoked for the specific grantee |
+
+
+
+ owner_address |
+ string |
+ |
+ the owner_address used to sign this transaction. |
+
+
+
+
+
+
+
+
+
+ MsgRevokeEntityAccountAuthzResponse
+
+
+
+
+
+
MsgTransferEntity
@@ -10389,7 +10723,14 @@ Msg
GrantEntityAccountAuthz |
MsgGrantEntityAccountAuthz |
MsgGrantEntityAccountAuthzResponse |
- Create a authz grant from entity account |
+ Create an authz grant from entity account |
+
+
+
+ RevokeEntityAccountAuthz |
+ MsgRevokeEntityAccountAuthz |
+ MsgRevokeEntityAccountAuthzResponse |
+ Revoke an authz grant from entity account |
@@ -10730,7 +11071,7 @@ Token
contract_address |
string |
|
- generated on token intiation through MsgSetupMinter |
+ generated on token initiation |
diff --git a/docs/core/proto-docs.json b/docs/core/proto-docs.json
index b74831562..0360dfd57 100644
--- a/docs/core/proto-docs.json
+++ b/docs/core/proto-docs.json
@@ -4016,6 +4016,11 @@
"name": "DISPUTED",
"number": "3",
"description": ""
+ },
+ {
+ "name": "INVALIDATED",
+ "number": "4",
+ "description": ""
}
]
},
@@ -4285,7 +4290,7 @@
},
{
"name": "admin",
- "description": "admin is the account address that will authorize or revoke agents and\npayments (the grantor)",
+ "description": "admin is the account address that will authorize or revoke agents and\npayments (the grantor), and can update the collection",
"label": "",
"type": "string",
"longType": "string",
@@ -4438,6 +4443,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "invalidated",
+ "description": "invalidated is the number of claims that have been evaluated as invalid\n(internally calculated)",
+ "label": "",
+ "type": "uint64",
+ "longType": "uint64",
+ "fullType": "uint64",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -6389,7 +6406,7 @@
},
{
"name": "collection_id",
- "description": "claimID is the unique identifier of the claim to make evaluation against",
+ "description": "collection_id indicates to which Collection this claim belongs",
"label": "",
"type": "string",
"longType": "string",
@@ -6591,6 +6608,195 @@
"extensions": [],
"fields": []
},
+ {
+ "name": "MsgUpdateCollectionDates",
+ "longName": "MsgUpdateCollectionDates",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionDates",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "start_date",
+ "description": "startDate is the date after which claims may be submitted",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "end_date",
+ "description": "endDate is the date after which no more claims may be submitted (no endDate\nis allowed)",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionDatesResponse",
+ "longName": "MsgUpdateCollectionDatesResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
+ {
+ "name": "MsgUpdateCollectionPayments",
+ "longName": "MsgUpdateCollectionPayments",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionPayments",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "payments",
+ "description": "payments is the amount paid for claim submission, evaluation, approval, or\nrejection",
+ "label": "",
+ "type": "Payments",
+ "longType": "Payments",
+ "fullType": "ixo.claims.v1beta1.Payments",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionPaymentsResponse",
+ "longName": "MsgUpdateCollectionPaymentsResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
+ {
+ "name": "MsgUpdateCollectionState",
+ "longName": "MsgUpdateCollectionState",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionState",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "state",
+ "description": "state is the state of this Collection (open, paused, closed) you want to\nupdate to",
+ "label": "",
+ "type": "CollectionState",
+ "longType": "CollectionState",
+ "fullType": "ixo.claims.v1beta1.CollectionState",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionStateResponse",
+ "longName": "MsgUpdateCollectionStateResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionStateResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
{
"name": "MsgWithdrawPayment",
"longName": "MsgWithdrawPayment",
@@ -6789,6 +6995,42 @@
"responseLongType": "MsgWithdrawPaymentResponse",
"responseFullType": "ixo.claims.v1beta1.MsgWithdrawPaymentResponse",
"responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionState",
+ "description": "",
+ "requestType": "MsgUpdateCollectionState",
+ "requestLongType": "MsgUpdateCollectionState",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionState",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionStateResponse",
+ "responseLongType": "MsgUpdateCollectionStateResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionStateResponse",
+ "responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionDates",
+ "description": "",
+ "requestType": "MsgUpdateCollectionDates",
+ "requestLongType": "MsgUpdateCollectionDates",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionDates",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionDatesResponse",
+ "responseLongType": "MsgUpdateCollectionDatesResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse",
+ "responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionPayments",
+ "description": "",
+ "requestType": "MsgUpdateCollectionPayments",
+ "requestLongType": "MsgUpdateCollectionPayments",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionPayments",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionPaymentsResponse",
+ "responseLongType": "MsgUpdateCollectionPaymentsResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse",
+ "responseStreaming": false
}
]
}
@@ -7735,7 +7977,7 @@
},
{
"name": "relayer_node",
- "description": "Address of the operator through which the Entity was created",
+ "description": "Did of the operator through which the Entity was created",
"label": "",
"type": "string",
"longType": "string",
@@ -7945,7 +8187,7 @@
"name": "EntityAccountAuthzCreatedEvent",
"longName": "EntityAccountAuthzCreatedEvent",
"fullName": "ixo.entity.v1beta1.EntityAccountAuthzCreatedEvent",
- "description": "EntityAccountCreatedEvent is an event triggered on a entity account creation",
+ "description": "EntityAccountCreatedEvent is an event triggered on a entity account authz\ncreation",
"hasExtensions": false,
"hasFields": true,
"hasOneofs": false,
@@ -8025,6 +8267,90 @@
}
]
},
+ {
+ "name": "EntityAccountAuthzRevokedEvent",
+ "longName": "EntityAccountAuthzRevokedEvent",
+ "fullName": "ixo.entity.v1beta1.EntityAccountAuthzRevokedEvent",
+ "description": "EntityAccountAuthzRevokedEvent is an event triggered on a entity account\nauthz revocation",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "signer",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "account_name",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "granter",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "grantee",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "msg_type_url",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
{
"name": "EntityAccountCreatedEvent",
"longName": "EntityAccountCreatedEvent",
@@ -10660,7 +10986,7 @@
},
{
"name": "relayer_node",
- "description": "Address of the operator through which the Entity was created",
+ "description": "Did of the operator through which the Entity was created",
"label": "",
"type": "string",
"longType": "string",
@@ -10748,7 +11074,7 @@
"name": "MsgCreateEntityAccount",
"longName": "MsgCreateEntityAccount",
"fullName": "ixo.entity.v1beta1.MsgCreateEntityAccount",
- "description": "create a module account for an entity, account details will be added as a\nlinkedEntity on entity iid doc where linkedEntity id is didfragment: did#name",
+ "description": "create a module account for an entity",
"hasExtensions": false,
"hasFields": true,
"hasOneofs": false,
@@ -10876,7 +11202,7 @@
"fields": [
{
"name": "id",
- "description": "entity id (did) to create account for",
+ "description": "entity id (did) which has the account",
"label": "",
"type": "string",
"longType": "string",
@@ -10947,6 +11273,89 @@
"extensions": [],
"fields": []
},
+ {
+ "name": "MsgRevokeEntityAccountAuthz",
+ "longName": "MsgRevokeEntityAccountAuthz",
+ "fullName": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz",
+ "description": "Revoke an existing authz grant from entity account (as grantor) to recipient",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "entity id (did) which has the account",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "name",
+ "description": "name of account",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "grantee_address",
+ "description": "the grantee address for which the authz grant will be revoked",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "msg_type_url",
+ "description": "the msg type url of the grant to be revoked for the specific grantee",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "owner_address",
+ "description": "the owner_address used to sign this transaction.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgRevokeEntityAccountAuthzResponse",
+ "longName": "MsgRevokeEntityAccountAuthzResponse",
+ "fullName": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
{
"name": "MsgTransferEntity",
"longName": "MsgTransferEntity",
@@ -11266,7 +11675,7 @@
},
{
"name": "GrantEntityAccountAuthz",
- "description": "Create a authz grant from entity account",
+ "description": "Create an authz grant from entity account",
"requestType": "MsgGrantEntityAccountAuthz",
"requestLongType": "MsgGrantEntityAccountAuthz",
"requestFullType": "ixo.entity.v1beta1.MsgGrantEntityAccountAuthz",
@@ -11275,6 +11684,18 @@
"responseLongType": "MsgGrantEntityAccountAuthzResponse",
"responseFullType": "ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse",
"responseStreaming": false
+ },
+ {
+ "name": "RevokeEntityAccountAuthz",
+ "description": "Revoke an authz grant from entity account",
+ "requestType": "MsgRevokeEntityAccountAuthz",
+ "requestLongType": "MsgRevokeEntityAccountAuthz",
+ "requestFullType": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz",
+ "requestStreaming": false,
+ "responseType": "MsgRevokeEntityAccountAuthzResponse",
+ "responseLongType": "MsgRevokeEntityAccountAuthzResponse",
+ "responseFullType": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse",
+ "responseStreaming": false
}
]
}
@@ -11614,7 +12035,7 @@
},
{
"name": "contract_address",
- "description": "generated on token intiation through MsgSetupMinter",
+ "description": "generated on token initiation",
"label": "",
"type": "string",
"longType": "string",
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 8fe3d1dc0..ee279a306 100644
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -159,6 +159,12 @@
- [MsgEvaluateClaimResponse](#ixo.claims.v1beta1.MsgEvaluateClaimResponse)
- [MsgSubmitClaim](#ixo.claims.v1beta1.MsgSubmitClaim)
- [MsgSubmitClaimResponse](#ixo.claims.v1beta1.MsgSubmitClaimResponse)
+ - [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates)
+ - [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse)
+ - [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments)
+ - [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse)
+ - [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState)
+ - [MsgUpdateCollectionStateResponse](#ixo.claims.v1beta1.MsgUpdateCollectionStateResponse)
- [MsgWithdrawPayment](#ixo.claims.v1beta1.MsgWithdrawPayment)
- [MsgWithdrawPaymentResponse](#ixo.claims.v1beta1.MsgWithdrawPaymentResponse)
@@ -188,6 +194,7 @@
- [ixo/entity/v1beta1/event.proto](#ixo/entity/v1beta1/event.proto)
- [EntityAccountAuthzCreatedEvent](#ixo.entity.v1beta1.EntityAccountAuthzCreatedEvent)
+ - [EntityAccountAuthzRevokedEvent](#ixo.entity.v1beta1.EntityAccountAuthzRevokedEvent)
- [EntityAccountCreatedEvent](#ixo.entity.v1beta1.EntityAccountCreatedEvent)
- [EntityCreatedEvent](#ixo.entity.v1beta1.EntityCreatedEvent)
- [EntityTransferredEvent](#ixo.entity.v1beta1.EntityTransferredEvent)
@@ -268,6 +275,8 @@
- [MsgCreateEntityResponse](#ixo.entity.v1beta1.MsgCreateEntityResponse)
- [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz)
- [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse)
+ - [MsgRevokeEntityAccountAuthz](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz)
+ - [MsgRevokeEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse)
- [MsgTransferEntity](#ixo.entity.v1beta1.MsgTransferEntity)
- [MsgTransferEntityResponse](#ixo.entity.v1beta1.MsgTransferEntityResponse)
- [MsgUpdateEntity](#ixo.entity.v1beta1.MsgUpdateEntity)
@@ -1755,7 +1764,7 @@ Msg defines the bonds Msg service.
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | collection id is the incremented internal id for the collection of claims |
| entity | [string](#string) | | entity is the DID of the entity for which the claims are being created |
-| admin | [string](#string) | | admin is the account address that will authorize or revoke agents and payments (the grantor) |
+| admin | [string](#string) | | admin is the account address that will authorize or revoke agents and payments (the grantor), and can update the collection |
| protocol | [string](#string) | | protocol is the DID of the claim protocol |
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | startDate is the date after which claims may be submitted |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | endDate is the date after which no more claims may be submitted (no endDate is allowed) |
@@ -1768,6 +1777,7 @@ Msg defines the bonds Msg service.
| state | [CollectionState](#ixo.claims.v1beta1.CollectionState) | | state is the current state of this Collection (open, paused, closed) |
| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
| signer | [string](#string) | | signer address |
+| invalidated | [uint64](#uint64) | | invalidated is the number of claims that have been evaluated as invalid (internally calculated) |
@@ -1930,6 +1940,7 @@ Msg defines the bonds Msg service.
| APPROVED | 1 | |
| REJECTED | 2 | |
| DISPUTED | 3 | |
+| INVALIDATED | 4 | |
@@ -2628,7 +2639,7 @@ Collection entity, or have authz cap, aka is agent
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| claim_id | [string](#string) | | claimID is the unique identifier of the claim to make evaluation against |
-| collection_id | [string](#string) | | claimID is the unique identifier of the claim to make evaluation against |
+| collection_id | [string](#string) | | collection_id indicates to which Collection this claim belongs |
| oracle | [string](#string) | | oracle is the DID of the Oracle entity that evaluates the claim |
| agent_did | [string](#string) | | agent is the DID of the agent that submits the evaluation |
| agent_address | [string](#string) | | |
@@ -2682,6 +2693,88 @@ Collection entity, or have authz cap, aka is agent
+
+
+### MsgUpdateCollectionDates
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | startDate is the date after which claims may be submitted |
+| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | endDate is the date after which no more claims may be submitted (no endDate is allowed) |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionDatesResponse
+
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionPayments
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionPaymentsResponse
+
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionState
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| state | [CollectionState](#ixo.claims.v1beta1.CollectionState) | | state is the state of this Collection (open, paused, closed) you want to update to |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionStateResponse
+
+
+
+
+
+
+
### MsgWithdrawPayment
@@ -2733,6 +2826,9 @@ Msg defines the Msg service.
| EvaluateClaim | [MsgEvaluateClaim](#ixo.claims.v1beta1.MsgEvaluateClaim) | [MsgEvaluateClaimResponse](#ixo.claims.v1beta1.MsgEvaluateClaimResponse) | |
| DisputeClaim | [MsgDisputeClaim](#ixo.claims.v1beta1.MsgDisputeClaim) | [MsgDisputeClaimResponse](#ixo.claims.v1beta1.MsgDisputeClaimResponse) | |
| WithdrawPayment | [MsgWithdrawPayment](#ixo.claims.v1beta1.MsgWithdrawPayment) | [MsgWithdrawPaymentResponse](#ixo.claims.v1beta1.MsgWithdrawPaymentResponse) | |
+| UpdateCollectionState | [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState) | [MsgUpdateCollectionStateResponse](#ixo.claims.v1beta1.MsgUpdateCollectionStateResponse) | |
+| UpdateCollectionDates | [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates) | [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse) | |
+| UpdateCollectionPayments | [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments) | [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse) | |
@@ -3006,7 +3102,7 @@ relationship entity account
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Start Date of the Entity as defined by the implementer and interpreted by Client applications |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | End Date of the Entity as defined by the implementer and interpreted by Client applications |
| status | [int32](#int32) | | Status of the Entity as defined by the implementer and interpreted by Client applications |
-| relayer_node | [string](#string) | | Address of the operator through which the Entity was created |
+| relayer_node | [string](#string) | | Did of the operator through which the Entity was created |
| credentials | [string](#string) | repeated | Credentials of the enitity to be verified |
| entity_verified | [bool](#bool) | | Used as check whether the credentials of entity is verified |
| metadata | [EntityMetadata](#ixo.entity.v1beta1.EntityMetadata) | | Metadata concerning the Entity such as versionId, created, updated and deactivated |
@@ -3086,7 +3182,8 @@ EntityMetadata defines metadata associated to a entity
### EntityAccountAuthzCreatedEvent
-EntityAccountCreatedEvent is an event triggered on a entity account creation
+EntityAccountCreatedEvent is an event triggered on a entity account authz
+creation
| Field | Type | Label | Description |
@@ -3103,6 +3200,27 @@ EntityAccountCreatedEvent is an event triggered on a entity account creation
+
+
+### EntityAccountAuthzRevokedEvent
+EntityAccountAuthzRevokedEvent is an event triggered on a entity account
+authz revocation
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | |
+| signer | [string](#string) | | |
+| account_name | [string](#string) | | |
+| granter | [string](#string) | | |
+| grantee | [string](#string) | | |
+| msg_type_url | [string](#string) | | |
+
+
+
+
+
+
### EntityAccountCreatedEvent
@@ -4118,7 +4236,7 @@ Msg defines the identity Msg service.
| linked_entity | [ixo.iid.v1beta1.LinkedEntity](#ixo.iid.v1beta1.LinkedEntity) | repeated | DID of a linked Entity and its relationship with the Subject |
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Start Date of the Entity as defined by the implementer and interpreted by Client applications |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | End Date of the Entity as defined by the implementer and interpreted by Client applications |
-| relayer_node | [string](#string) | | Address of the operator through which the Entity was created |
+| relayer_node | [string](#string) | | Did of the operator through which the Entity was created |
| credentials | [string](#string) | repeated | Content ID or Hash of public Verifiable Credentials associated with the subject |
| owner_did | [string](#string) | | Owner of the Entity NFT | The ownersdid used to sign this transaction. |
| owner_address | [string](#string) | | The ownersdid address used to sign this transaction. |
@@ -4134,8 +4252,7 @@ Msg defines the identity Msg service.
### MsgCreateEntityAccount
-create a module account for an entity, account details will be added as a
-linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+create a module account for an entity
| Field | Type | Label | Description |
@@ -4190,7 +4307,7 @@ grantee for the specific authorization
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | entity id (did) to create account for |
+| id | [string](#string) | | entity id (did) which has the account |
| name | [string](#string) | | name of account |
| grantee_address | [string](#string) | | the grantee address that will be able to execute the authz authorization |
| grant | [Grant](#ixo.entity.v1beta1.Grant) | | grant to be Authorized in authz grant |
@@ -4211,6 +4328,35 @@ grantee for the specific authorization
+
+
+### MsgRevokeEntityAccountAuthz
+Revoke an existing authz grant from entity account (as grantor) to recipient
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | entity id (did) which has the account |
+| name | [string](#string) | | name of account |
+| grantee_address | [string](#string) | | the grantee address for which the authz grant will be revoked |
+| msg_type_url | [string](#string) | | the msg type url of the grant to be revoked for the specific grantee |
+| owner_address | [string](#string) | | the owner_address used to sign this transaction. |
+
+
+
+
+
+
+
+
+### MsgRevokeEntityAccountAuthzResponse
+
+
+
+
+
+
+
### MsgTransferEntity
@@ -4317,7 +4463,8 @@ Msg defines the project Msg service.
| UpdateEntityVerified | [MsgUpdateEntityVerified](#ixo.entity.v1beta1.MsgUpdateEntityVerified) | [MsgUpdateEntityVerifiedResponse](#ixo.entity.v1beta1.MsgUpdateEntityVerifiedResponse) | UpdateEntityVerified defines a method for updating if an entity is verified |
| TransferEntity | [MsgTransferEntity](#ixo.entity.v1beta1.MsgTransferEntity) | [MsgTransferEntityResponse](#ixo.entity.v1beta1.MsgTransferEntityResponse) | Transfers an entity and its nft to the recipient |
| CreateEntityAccount | [MsgCreateEntityAccount](#ixo.entity.v1beta1.MsgCreateEntityAccount) | [MsgCreateEntityAccountResponse](#ixo.entity.v1beta1.MsgCreateEntityAccountResponse) | Create a module account for an entity, |
-| GrantEntityAccountAuthz | [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz) | [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse) | Create a authz grant from entity account |
+| GrantEntityAccountAuthz | [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz) | [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse) | Create an authz grant from entity account |
+| RevokeEntityAccountAuthz | [MsgRevokeEntityAccountAuthz](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz) | [MsgRevokeEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse) | Revoke an authz grant from entity account |
@@ -4519,7 +4666,7 @@ Query defines the gRPC querier service.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| minter | [string](#string) | | address of minter |
-| contract_address | [string](#string) | | generated on token intiation through MsgSetupMinter |
+| contract_address | [string](#string) | | generated on token initiation |
| class | [string](#string) | | class is the token protocol entity DID (validated) |
| name | [string](#string) | | name is the token name, which must be unique (namespace) |
| description | [string](#string) | | description is any arbitrary description |
diff --git a/go.mod b/go.mod
index 8ad7cea84..f11082297 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/ixofoundation/ixo-blockchain/v2
+module github.com/ixofoundation/ixo-blockchain/v3
go 1.19
@@ -62,7 +62,7 @@ require (
github.com/cosmos/gogoproto v1.4.6 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.5 // indirect
- github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
+ github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -138,8 +138,8 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tidwall/btree v1.5.0 // indirect
- github.com/zondax/hid v0.9.1 // indirect
- github.com/zondax/ledger-go v0.14.1 // indirect
+ github.com/zondax/hid v0.9.2 // indirect
+ github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
diff --git a/go.sum b/go.sum
index abf48cfab..2a39a6b57 100644
--- a/go.sum
+++ b/go.sum
@@ -248,8 +248,8 @@ github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1
github.com/cosmos/interchain-accounts v0.2.6/go.mod h1:lUzWNzCiCtIEYZefac5+YgEBz2aR39nMS374jIv1c7o=
github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU=
github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8=
-github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA=
-github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI=
+github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=
+github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -1024,10 +1024,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo=
-github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
-github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c=
-github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320=
+github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
+github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
+github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
+github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
diff --git a/lib/ixo/types.go b/lib/ixo/types.go
index 4f11c2dab..b8cd36121 100644
--- a/lib/ixo/types.go
+++ b/lib/ixo/types.go
@@ -1,6 +1,8 @@
package ixo
-import "strings"
+import (
+ "strings"
+)
const IxoNativeToken = "uixo"
@@ -31,3 +33,8 @@ func RemoveOrdered[T any](slice []T, s int) []T {
func IsEmpty(input string) bool {
return strings.TrimSpace(input) == ""
}
+
+func IsEnumValueValid(nameMap map[int32]string, value int32) bool {
+ _, ok := nameMap[value]
+ return ok
+}
diff --git a/proto/ixo/bonds/v1beta1/bonds.proto b/proto/ixo/bonds/v1beta1/bonds.proto
index 7193a8080..7ee7ae99c 100644
--- a/proto/ixo/bonds/v1beta1/bonds.proto
+++ b/proto/ixo/bonds/v1beta1/bonds.proto
@@ -4,7 +4,7 @@ package ixo.bonds.v1beta1;
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types";
// FunctionParam is a key-value pair used for specifying a specific bond
// parameter.
@@ -37,11 +37,11 @@ message Bond {
string description = 3;
string creator_did = 4 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string controller_did = 5 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string function_type = 6;
repeated FunctionParam function_parameters = 7 [
@@ -100,7 +100,7 @@ message Bond {
string bond_did = 27;
string oracle_did = 28 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
}
@@ -109,7 +109,7 @@ message Bond {
message BaseOrder {
string account_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ];
bool cancelled = 3;
diff --git a/proto/ixo/bonds/v1beta1/event.proto b/proto/ixo/bonds/v1beta1/event.proto
index 7bb826840..7334aae17 100644
--- a/proto/ixo/bonds/v1beta1/event.proto
+++ b/proto/ixo/bonds/v1beta1/event.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.bonds.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types";
import "gogoproto/gogo.proto";
import "ixo/bonds/v1beta1/bonds.proto";
diff --git a/proto/ixo/bonds/v1beta1/genesis.proto b/proto/ixo/bonds/v1beta1/genesis.proto
index 8e682e007..7a6e44343 100644
--- a/proto/ixo/bonds/v1beta1/genesis.proto
+++ b/proto/ixo/bonds/v1beta1/genesis.proto
@@ -4,7 +4,7 @@ package ixo.bonds.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/bonds/v1beta1/bonds.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types";
// GenesisState defines the bonds module's genesis state.
message GenesisState {
diff --git a/proto/ixo/bonds/v1beta1/query.proto b/proto/ixo/bonds/v1beta1/query.proto
index 2a13a955f..c3b31d866 100644
--- a/proto/ixo/bonds/v1beta1/query.proto
+++ b/proto/ixo/bonds/v1beta1/query.proto
@@ -6,7 +6,7 @@ import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto";
import "ixo/bonds/v1beta1/bonds.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types";
// Query defines the gRPC querier service.
service Query {
diff --git a/proto/ixo/bonds/v1beta1/tx.proto b/proto/ixo/bonds/v1beta1/tx.proto
index 8437eaaec..653c51f7d 100644
--- a/proto/ixo/bonds/v1beta1/tx.proto
+++ b/proto/ixo/bonds/v1beta1/tx.proto
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "ixo/bonds/v1beta1/bonds.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types";
// Msg defines the bonds Msg service.
service Msg {
@@ -56,15 +56,15 @@ message MsgCreateBond {
];
string creator_did = 7 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string controller_did = 8 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string oracle_did = 9 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
repeated string reserve_tokens = 10;
string tx_fee_percentage = 11 [
@@ -117,7 +117,7 @@ message MsgEditBond {
string sanity_margin_percentage = 6;
string editor_did = 7 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string editor_address = 8;
}
@@ -138,7 +138,7 @@ message MsgSetNextAlpha {
];
string oracle_did = 4 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string oracle_address = 5;
}
@@ -151,7 +151,7 @@ message MsgUpdateBondState {
string state = 2;
string editor_did = 3 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string editor_address = 4;
}
@@ -163,7 +163,7 @@ message MsgUpdateBondStateResponse {}
message MsgBuy {
string buyer_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ];
repeated cosmos.base.v1beta1.Coin max_prices = 3 [
@@ -181,7 +181,7 @@ message MsgBuyResponse {}
message MsgSell {
string seller_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ];
string bond_did = 3;
@@ -196,7 +196,7 @@ message MsgSellResponse {}
message MsgSwap {
string swapper_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string bond_did = 2;
cosmos.base.v1beta1.Coin from = 3 [ (gogoproto.nullable) = false ];
@@ -212,7 +212,7 @@ message MsgSwapResponse {}
message MsgMakeOutcomePayment {
string sender_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string amount = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
@@ -231,7 +231,7 @@ message MsgMakeOutcomePaymentResponse {}
message MsgWithdrawShare {
string recipient_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string bond_did = 2;
string recipient_address = 3;
@@ -244,7 +244,7 @@ message MsgWithdrawShareResponse {}
message MsgWithdrawReserve {
string withdrawer_did = 1 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
repeated cosmos.base.v1beta1.Coin amount = 2 [
(gogoproto.nullable) = false,
diff --git a/proto/ixo/claims/v1beta1/authz.proto b/proto/ixo/claims/v1beta1/authz.proto
index 1b14d649f..fcf47ab9b 100644
--- a/proto/ixo/claims/v1beta1/authz.proto
+++ b/proto/ixo/claims/v1beta1/authz.proto
@@ -8,7 +8,7 @@ import "cosmos/base/v1beta1/coin.proto";
import "ixo/claims/v1beta1/claims.proto";
import "ixo/claims/v1beta1/cosmos.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
message SubmitClaimAuthorization {
option (cosmos_proto.implements_interface) = "Authorization";
diff --git a/proto/ixo/claims/v1beta1/claims.proto b/proto/ixo/claims/v1beta1/claims.proto
index f4d094862..d9c454b57 100644
--- a/proto/ixo/claims/v1beta1/claims.proto
+++ b/proto/ixo/claims/v1beta1/claims.proto
@@ -6,7 +6,7 @@ import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/duration.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
message Params {
uint64 collection_sequence = 1;
@@ -32,6 +32,7 @@ enum EvaluationStatus {
APPROVED = 1 [ (gogoproto.enumvalue_customname) = "approved" ];
REJECTED = 2 [ (gogoproto.enumvalue_customname) = "rejected" ];
DISPUTED = 3 [ (gogoproto.enumvalue_customname) = "disputed" ];
+ INVALIDATED = 4 [ (gogoproto.enumvalue_customname) = "invalidated" ];
}
enum PaymentType {
@@ -60,7 +61,7 @@ message Collection {
// entity is the DID of the entity for which the claims are being created
string entity = 2;
// admin is the account address that will authorize or revoke agents and
- // payments (the grantor)
+ // payments (the grantor), and can update the collection
string admin = 3;
// protocol is the DID of the claim protocol
string protocol = 4;
@@ -92,6 +93,9 @@ message Collection {
Payments payments = 14;
// signer address
string signer = 15;
+ // invalidated is the number of claims that have been evaluated as invalid
+ // (internally calculated)
+ uint64 invalidated = 16;
}
message Payments {
diff --git a/proto/ixo/claims/v1beta1/cosmos.proto b/proto/ixo/claims/v1beta1/cosmos.proto
index d22a23a5a..d897d6f81 100644
--- a/proto/ixo/claims/v1beta1/cosmos.proto
+++ b/proto/ixo/claims/v1beta1/cosmos.proto
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
// Cosmos bank module types, creating here for ease of use
diff --git a/proto/ixo/claims/v1beta1/event.proto b/proto/ixo/claims/v1beta1/event.proto
index b83681931..16038fbc5 100644
--- a/proto/ixo/claims/v1beta1/event.proto
+++ b/proto/ixo/claims/v1beta1/event.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.claims.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
import "gogoproto/gogo.proto";
import "ixo/claims/v1beta1/claims.proto";
diff --git a/proto/ixo/claims/v1beta1/genesis.proto b/proto/ixo/claims/v1beta1/genesis.proto
index b6e521270..258566fcc 100644
--- a/proto/ixo/claims/v1beta1/genesis.proto
+++ b/proto/ixo/claims/v1beta1/genesis.proto
@@ -4,7 +4,7 @@ package ixo.claims.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/claims/v1beta1/claims.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
// GenesisState defines the claims module's genesis state.
message GenesisState {
diff --git a/proto/ixo/claims/v1beta1/query.proto b/proto/ixo/claims/v1beta1/query.proto
index 0b860a07a..eadeeb2c9 100644
--- a/proto/ixo/claims/v1beta1/query.proto
+++ b/proto/ixo/claims/v1beta1/query.proto
@@ -6,7 +6,7 @@ import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "ixo/claims/v1beta1/claims.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
// Query defines the gRPC querier service.
service Query {
diff --git a/proto/ixo/claims/v1beta1/tx.proto b/proto/ixo/claims/v1beta1/tx.proto
index cf1f51344..d59d261be 100644
--- a/proto/ixo/claims/v1beta1/tx.proto
+++ b/proto/ixo/claims/v1beta1/tx.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.claims.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
@@ -17,6 +17,12 @@ service Msg {
rpc EvaluateClaim(MsgEvaluateClaim) returns (MsgEvaluateClaimResponse);
rpc DisputeClaim(MsgDisputeClaim) returns (MsgDisputeClaimResponse);
rpc WithdrawPayment(MsgWithdrawPayment) returns (MsgWithdrawPaymentResponse);
+ rpc UpdateCollectionState(MsgUpdateCollectionState)
+ returns (MsgUpdateCollectionStateResponse);
+ rpc UpdateCollectionDates(MsgUpdateCollectionDates)
+ returns (MsgUpdateCollectionDatesResponse);
+ rpc UpdateCollectionPayments(MsgUpdateCollectionPayments)
+ returns (MsgUpdateCollectionPaymentsResponse);
}
message MsgCreateCollection {
@@ -50,7 +56,7 @@ message MsgSubmitClaim {
// agent is the DID of the agent submitting the claim
string agent_did = 3 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string agent_address = 4;
// admin address used to sign this message, validated against Collection Admin
@@ -62,14 +68,14 @@ message MsgSubmitClaimResponse {}
message MsgEvaluateClaim {
// claimID is the unique identifier of the claim to make evaluation against
string claim_id = 1;
- // claimID is the unique identifier of the claim to make evaluation against
+ // collection_id indicates to which Collection this claim belongs
string collection_id = 2;
// oracle is the DID of the Oracle entity that evaluates the claim
string oracle = 3;
// agent is the DID of the agent that submits the evaluation
string agent_did = 4 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string agent_address = 5;
// admin address used to sign this message, validated against Collection Admin
@@ -102,7 +108,7 @@ message MsgDisputeClaim {
// saved in kvStore
string agent_did = 2 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
string agent_address = 3;
// type is expressed as an integer, interpreted by the client
@@ -141,4 +147,42 @@ message MsgWithdrawPayment {
string admin_address = 9;
}
-message MsgWithdrawPaymentResponse {}
\ No newline at end of file
+message MsgWithdrawPaymentResponse {}
+
+message MsgUpdateCollectionState {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // state is the state of this Collection (open, paused, closed) you want to
+ // update to
+ CollectionState state = 2;
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 3;
+}
+
+message MsgUpdateCollectionStateResponse {}
+
+message MsgUpdateCollectionDates {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // startDate is the date after which claims may be submitted
+ google.protobuf.Timestamp start_date = 2 [ (gogoproto.stdtime) = true ];
+ // endDate is the date after which no more claims may be submitted (no endDate
+ // is allowed)
+ google.protobuf.Timestamp end_date = 3 [ (gogoproto.stdtime) = true ];
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 4;
+}
+
+message MsgUpdateCollectionDatesResponse {}
+
+message MsgUpdateCollectionPayments {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // payments is the amount paid for claim submission, evaluation, approval, or
+ // rejection
+ Payments payments = 2;
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 3;
+}
+
+message MsgUpdateCollectionPaymentsResponse {}
\ No newline at end of file
diff --git a/proto/ixo/entity/v1beta1/cosmos.proto b/proto/ixo/entity/v1beta1/cosmos.proto
index 35dbdb99c..39a8543b7 100644
--- a/proto/ixo/entity/v1beta1/cosmos.proto
+++ b/proto/ixo/entity/v1beta1/cosmos.proto
@@ -6,7 +6,7 @@ import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
// Cosmos authz module types, creating here for ease of use
diff --git a/proto/ixo/entity/v1beta1/entity.proto b/proto/ixo/entity/v1beta1/entity.proto
index 6145f4303..bc8ab945e 100644
--- a/proto/ixo/entity/v1beta1/entity.proto
+++ b/proto/ixo/entity/v1beta1/entity.proto
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "ixo/iid/v1beta1/iid.proto";
import "google/protobuf/timestamp.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
message Params {
string nftContractAddress = 1;
@@ -29,7 +29,7 @@ message Entity {
// Status of the Entity as defined by the implementer and interpreted by
// Client applications
int32 status = 5;
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
string relayer_node = 6;
// Credentials of the enitity to be verified
repeated string credentials = 7;
diff --git a/proto/ixo/entity/v1beta1/event.proto b/proto/ixo/entity/v1beta1/event.proto
index 28259e45a..2841eb052 100644
--- a/proto/ixo/entity/v1beta1/event.proto
+++ b/proto/ixo/entity/v1beta1/event.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.entity.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
import "gogoproto/gogo.proto";
import "ixo/entity/v1beta1/entity.proto";
@@ -42,7 +42,8 @@ message EntityAccountCreatedEvent {
string account_address = 4;
}
-// EntityAccountCreatedEvent is an event triggered on a entity account creation
+// EntityAccountCreatedEvent is an event triggered on a entity account authz
+// creation
message EntityAccountAuthzCreatedEvent {
string id = 1;
string signer = 2;
@@ -50,4 +51,15 @@ message EntityAccountAuthzCreatedEvent {
string granter = 4;
string grantee = 5;
Grant grant = 6;
+}
+
+// EntityAccountAuthzRevokedEvent is an event triggered on a entity account
+// authz revocation
+message EntityAccountAuthzRevokedEvent {
+ string id = 1;
+ string signer = 2;
+ string account_name = 3;
+ string granter = 4;
+ string grantee = 5;
+ string msg_type_url = 6;
}
\ No newline at end of file
diff --git a/proto/ixo/entity/v1beta1/genesis.proto b/proto/ixo/entity/v1beta1/genesis.proto
index 870141439..9ad9bb480 100644
--- a/proto/ixo/entity/v1beta1/genesis.proto
+++ b/proto/ixo/entity/v1beta1/genesis.proto
@@ -4,7 +4,7 @@ package ixo.entity.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/entity/v1beta1/entity.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
// GenesisState defines the project module's genesis state.
message GenesisState {
diff --git a/proto/ixo/entity/v1beta1/proposal.proto b/proto/ixo/entity/v1beta1/proposal.proto
index a1595066a..3c495678f 100644
--- a/proto/ixo/entity/v1beta1/proposal.proto
+++ b/proto/ixo/entity/v1beta1/proposal.proto
@@ -3,7 +3,7 @@ package ixo.entity.v1beta1;
import "gogoproto/gogo.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
message InitializeNftContract {
uint64 NftContractCodeId = 1;
diff --git a/proto/ixo/entity/v1beta1/query.proto b/proto/ixo/entity/v1beta1/query.proto
index af847fc68..83c2237cb 100644
--- a/proto/ixo/entity/v1beta1/query.proto
+++ b/proto/ixo/entity/v1beta1/query.proto
@@ -7,7 +7,7 @@ import "ixo/entity/v1beta1/entity.proto";
import "ixo/iid/v1beta1/iid.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
// Query defines the gRPC querier service.
service Query {
diff --git a/proto/ixo/entity/v1beta1/tx.proto b/proto/ixo/entity/v1beta1/tx.proto
index e0d009e37..9ea5cc85b 100644
--- a/proto/ixo/entity/v1beta1/tx.proto
+++ b/proto/ixo/entity/v1beta1/tx.proto
@@ -9,7 +9,7 @@ import "ixo/entity/v1beta1/entity.proto";
import "ixo/entity/v1beta1/cosmos.proto";
import "google/protobuf/timestamp.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types";
// Msg defines the project Msg service.
service Msg {
@@ -30,9 +30,13 @@ service Msg {
rpc CreateEntityAccount(MsgCreateEntityAccount)
returns (MsgCreateEntityAccountResponse);
- // Create a authz grant from entity account
+ // Create an authz grant from entity account
rpc GrantEntityAccountAuthz(MsgGrantEntityAccountAuthz)
returns (MsgGrantEntityAccountAuthzResponse);
+
+ // Revoke an authz grant from entity account
+ rpc RevokeEntityAccountAuthz(MsgRevokeEntityAccountAuthz)
+ returns (MsgRevokeEntityAccountAuthzResponse);
}
message MsgCreateEntity {
@@ -59,14 +63,14 @@ message MsgCreateEntity {
// End Date of the Entity as defined by the implementer and interpreted by
// Client applications
google.protobuf.Timestamp end_date = 11 [ (gogoproto.stdtime) = true ];
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
string relayer_node = 12;
// Content ID or Hash of public Verifiable Credentials associated with the
// subject
repeated string credentials = 13;
string owner_did = 14 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
]; // Owner of the Entity NFT | The ownersdid used to sign this transaction.
string owner_address =
15; // The ownersdid address used to sign this transaction.
@@ -102,7 +106,7 @@ message MsgUpdateEntity {
repeated string credentials = 5;
string controller_did = 6 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
]; // The controllerDid used to sign this transaction.
string controller_address =
7; // The controllerAddress used to sign this transaction.
@@ -118,7 +122,7 @@ message MsgUpdateEntityVerified {
bool entity_verified = 2;
string relayer_node_did = 3 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
]; // The relayer node's did used to sign this transaction.
string relayer_node_address =
4; // The relayer node's address used to sign this transaction.
@@ -131,20 +135,19 @@ message MsgTransferEntity {
// The owner_did used to sign this transaction.
string owner_did = 2 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
// The owner_address used to sign this transaction.
string owner_address = 3;
string recipient_did = 4 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
}
message MsgTransferEntityResponse {}
-// create a module account for an entity, account details will be added as a
-// linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+// create a module account for an entity
message MsgCreateEntityAccount {
// entity id (did) to create account for
string id = 1;
@@ -162,7 +165,7 @@ message MsgCreateEntityAccountResponse {
// Create a authz grant from entity account (as grantor) to recipient in msg as
// grantee for the specific authorization
message MsgGrantEntityAccountAuthz {
- // entity id (did) to create account for
+ // entity id (did) which has the account
string id = 1;
// name of account
string name = 2;
@@ -178,3 +181,19 @@ message MsgGrantEntityAccountAuthz {
}
message MsgGrantEntityAccountAuthzResponse {}
+
+// Revoke an existing authz grant from entity account (as grantor) to recipient
+message MsgRevokeEntityAccountAuthz {
+ // entity id (did) which has the account
+ string id = 1;
+ // name of account
+ string name = 2;
+ // the grantee address for which the authz grant will be revoked
+ string grantee_address = 3;
+ // the msg type url of the grant to be revoked for the specific grantee
+ string msg_type_url = 4;
+ // the owner_address used to sign this transaction.
+ string owner_address = 5;
+}
+
+message MsgRevokeEntityAccountAuthzResponse {}
diff --git a/proto/ixo/iid/v1beta1/event.proto b/proto/ixo/iid/v1beta1/event.proto
index a9c88599a..abd6bb2dc 100644
--- a/proto/ixo/iid/v1beta1/event.proto
+++ b/proto/ixo/iid/v1beta1/event.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.iid.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
import "gogoproto/gogo.proto";
import "ixo/iid/v1beta1/types.proto";
diff --git a/proto/ixo/iid/v1beta1/genesis.proto b/proto/ixo/iid/v1beta1/genesis.proto
index c301f33b0..14f84bb68 100644
--- a/proto/ixo/iid/v1beta1/genesis.proto
+++ b/proto/ixo/iid/v1beta1/genesis.proto
@@ -4,7 +4,7 @@ package ixo.iid.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/iid/v1beta1/iid.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
// GenesisState defines the did module's genesis state.
message GenesisState {
diff --git a/proto/ixo/iid/v1beta1/iid.proto b/proto/ixo/iid/v1beta1/iid.proto
index cb3ad1fbc..02563ecf8 100644
--- a/proto/ixo/iid/v1beta1/iid.proto
+++ b/proto/ixo/iid/v1beta1/iid.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.iid.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
import "gogoproto/gogo.proto";
import "ixo/iid/v1beta1/types.proto";
diff --git a/proto/ixo/iid/v1beta1/query.proto b/proto/ixo/iid/v1beta1/query.proto
index 9744c2287..281846239 100644
--- a/proto/ixo/iid/v1beta1/query.proto
+++ b/proto/ixo/iid/v1beta1/query.proto
@@ -6,7 +6,7 @@ import "ixo/iid/v1beta1/iid.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
// Query defines the gRPC querier service.
service Query {
diff --git a/proto/ixo/iid/v1beta1/tx.proto b/proto/ixo/iid/v1beta1/tx.proto
index 68d111df2..b6aac3c61 100644
--- a/proto/ixo/iid/v1beta1/tx.proto
+++ b/proto/ixo/iid/v1beta1/tx.proto
@@ -6,7 +6,7 @@ import "google/api/annotations.proto";
import "ixo/iid/v1beta1/iid.proto";
import "ixo/iid/v1beta1/types.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
// Msg defines the identity Msg service.
service Msg {
diff --git a/proto/ixo/iid/v1beta1/types.proto b/proto/ixo/iid/v1beta1/types.proto
index 549f8730c..bf6bafc4e 100644
--- a/proto/ixo/iid/v1beta1/types.proto
+++ b/proto/ixo/iid/v1beta1/types.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.iid.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
diff --git a/proto/ixo/token/v1beta1/authz.proto b/proto/ixo/token/v1beta1/authz.proto
index 4bfb83e0c..0c2d99296 100644
--- a/proto/ixo/token/v1beta1/authz.proto
+++ b/proto/ixo/token/v1beta1/authz.proto
@@ -6,7 +6,7 @@ import "ixo/iid/v1beta1/iid.proto";
import "ixo/token/v1beta1/token.proto";
import "cosmos_proto/cosmos.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
message MintAuthorization {
option (cosmos_proto.implements_interface) = "Authorization";
diff --git a/proto/ixo/token/v1beta1/event.proto b/proto/ixo/token/v1beta1/event.proto
index f1652bcee..b43e8873a 100644
--- a/proto/ixo/token/v1beta1/event.proto
+++ b/proto/ixo/token/v1beta1/event.proto
@@ -1,7 +1,7 @@
syntax = "proto3";
package ixo.token.v1beta1;
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
import "ixo/token/v1beta1/token.proto";
import "ixo/token/v1beta1/tx.proto";
diff --git a/proto/ixo/token/v1beta1/genesis.proto b/proto/ixo/token/v1beta1/genesis.proto
index a744e7dfd..21ce452e1 100644
--- a/proto/ixo/token/v1beta1/genesis.proto
+++ b/proto/ixo/token/v1beta1/genesis.proto
@@ -4,7 +4,7 @@ package ixo.token.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/token/v1beta1/token.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
// GenesisState defines the module's genesis state.
message GenesisState {
diff --git a/proto/ixo/token/v1beta1/proposal.proto b/proto/ixo/token/v1beta1/proposal.proto
index 3c1a170df..717292606 100644
--- a/proto/ixo/token/v1beta1/proposal.proto
+++ b/proto/ixo/token/v1beta1/proposal.proto
@@ -4,6 +4,6 @@ package ixo.token.v1beta1;
import "gogoproto/gogo.proto";
import "ixo/token/v1beta1/token.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
message SetTokenContractCodes { uint64 ixo1155_contract_code = 1; }
\ No newline at end of file
diff --git a/proto/ixo/token/v1beta1/query.proto b/proto/ixo/token/v1beta1/query.proto
index bffe23199..36e48bd80 100644
--- a/proto/ixo/token/v1beta1/query.proto
+++ b/proto/ixo/token/v1beta1/query.proto
@@ -6,7 +6,7 @@ import "google/api/annotations.proto";
import "ixo/token/v1beta1/token.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
// Query defines the gRPC querier service.
service Query {
diff --git a/proto/ixo/token/v1beta1/token.proto b/proto/ixo/token/v1beta1/token.proto
index c6cf27bd6..ced244b50 100644
--- a/proto/ixo/token/v1beta1/token.proto
+++ b/proto/ixo/token/v1beta1/token.proto
@@ -3,7 +3,7 @@ package ixo.token.v1beta1;
import "gogoproto/gogo.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
message Params { uint64 ixo1155_contract_code = 1; }
@@ -12,7 +12,7 @@ message Token {
// address of minter
string minter = 1;
- // generated on token intiation through MsgSetupMinter
+ // generated on token initiation
string contract_address = 2;
// class is the token protocol entity DID (validated)
string class = 3;
diff --git a/proto/ixo/token/v1beta1/tx.proto b/proto/ixo/token/v1beta1/tx.proto
index 43cb81622..87e6a50ee 100644
--- a/proto/ixo/token/v1beta1/tx.proto
+++ b/proto/ixo/token/v1beta1/tx.proto
@@ -6,7 +6,7 @@ import "ixo/iid/v1beta1/iid.proto";
import "ixo/token/v1beta1/token.proto";
import "google/protobuf/timestamp.proto";
-option go_package = "github.com/ixofoundation/ixo-blockchain/v2/x/token/types";
+option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/token/types";
// Msg defines the project Msg service.
service Msg {
@@ -25,7 +25,7 @@ message MsgCreateToken {
// class is the token protocol entity DID (validated)
string class = 2 [
(gogoproto.casttype) =
- "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types.DIDFragment"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
];
// name is the token name, which must be unique (namespace)
string name = 3;
diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh
index e41728434..0d185f0b0 100755
--- a/scripts/protocgen.sh
+++ b/scripts/protocgen.sh
@@ -31,5 +31,5 @@ done
# move proto files to the right places
#
# Note: Proto files are suffixed with the current binary version.
-cp -r github.com/ixofoundation/ixo-blockchain/v2/* ./
+cp -r github.com/ixofoundation/ixo-blockchain/v3/* ./
rm -rf github.com
diff --git a/scripts/run_only.sh b/scripts/run_only.sh
index cb5ef7278..1a5a4202e 100755
--- a/scripts/run_only.sh
+++ b/scripts/run_only.sh
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
ixod start --pruning "nothing"
+# ixod start --pruning "nothing" --log_level "trace" --trace
diff --git a/scripts/run_with_all_data.sh b/scripts/run_with_all_data.sh
index 335fff811..9e0220a11 100755
--- a/scripts/run_with_all_data.sh
+++ b/scripts/run_with_all_data.sh
@@ -52,6 +52,12 @@ FROM="\"reserved_bond_tokens\": \[\]"
TO="\"reserved_bond_tokens\": \[$RESERVED_BOND_TOKENS\]"
sed -i "s/$FROM/$TO/" "$HOME"/.ixod/config/genesis.json
+# Set bank denom metadata
+DENOM_METADATA="\{\"base\":\"uixo\",\"denom_units\":\[\{\"aliases\":\[\"microixo\"\],\"denom\":\"uixo\",\"exponent\":0\},\{\"aliases\":\[\"milliixo\"\],\"denom\":\"mixo\",\"exponent\":3\},\{\"aliases\":\[\],\"denom\":\"ixo\",\"exponent\":6\}\],\"description\":\"The native staking token of ixo.\",\"display\":\"ixo\",\"name\":\"ixo\",\"symbol\":\"ixo\"\}"
+FROM="\"denom_metadata\": \[\]"
+TO="\"denom_metadata\": \[$DENOM_METADATA\]"
+sed -i "s/$FROM/$TO/" "$HOME"/.ixod/config/genesis.json
+
# Set min-gas-prices (using fee token)
FROM="minimum-gas-prices = \"\""
TO="minimum-gas-prices = \"0.025$FEE_TOKEN\""
diff --git a/wasmbinding/query_plugin.go b/wasmbinding/query_plugin.go
index d77f30af7..fac334fbd 100644
--- a/wasmbinding/query_plugin.go
+++ b/wasmbinding/query_plugin.go
@@ -14,11 +14,15 @@ import (
// StargateQuerier dispatches whitelisted stargate queries
func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) {
return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) {
- protoResponseType, err := GetWhitelistedQuery(request.Path)
+ protoResponseType, err := getWhitelistedQuery(request.Path)
if err != nil {
return nil, err
}
+ // no matter what happens after this point, we must return
+ // the response type to prevent sync.Pool from leaking.
+ defer returnStargateResponseToPool(request.Path, protoResponseType)
+
route := queryRouter.Route(request.Path)
if route == nil {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("No route to query '%s'", request.Path)}
@@ -32,6 +36,11 @@ func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(
return nil, err
}
- return wasmkeeper.ConvertProtoToJSONMarshal(cdc, protoResponseType, res.Value)
+ bz, err := wasmkeeper.ConvertProtoToJSONMarshal(cdc, protoResponseType, res.Value)
+ if err != nil {
+ return nil, err
+ }
+
+ return bz, nil
}
}
diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go
index 6b8d07382..0daea89f5 100644
--- a/wasmbinding/stargate_whitelist.go
+++ b/wasmbinding/stargate_whitelist.go
@@ -14,19 +14,22 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
- bondstypes "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- claimstypes "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types"
- entitytypes "github.com/ixofoundation/ixo-blockchain/v2/x/entity/types"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
- tokentypes "github.com/ixofoundation/ixo-blockchain/v2/x/token/types"
+ bondstypes "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ claimstypes "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+ entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
+ tokentypes "github.com/ixofoundation/ixo-blockchain/v3/x/token/types"
)
-// stargateWhitelist keeps whitelist and its deterministic
+// stargateResponsePools keeps whitelist and its deterministic
// response binding for stargate queries.
+// CONTRACT: since results of queries go into blocks, queries being added here should always be
+// deterministic or can cause non-determinism in the state machine.
//
-// The query can be multi-thread, so we have to use
-// thread safe sync.Map.
-var stargateWhitelist sync.Map
+// The query is multi-threaded so we're using a sync.Pool
+// to manage the allocation and de-allocation of newly created
+// pb objects.
+var stargateResponsePools = make(map[string]*sync.Pool)
// Note: When adding a migration here, we should also add it to the Async ICQ params in the upgrade.
// In the future we may want to find a better way to keep these in sync
@@ -47,7 +50,8 @@ func init() {
// bank
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/Balance", &banktypes.QueryBalanceResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/AllBalances", &banktypes.QueryAllBalancesResponse{})
- setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomMetadata", &banktypes.QueryDenomsMetadataResponse{})
+ setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomMetadata", &banktypes.QueryDenomMetadataResponse{})
+ setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomsMetadata", &banktypes.QueryDenomsMetadataResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/Params", &banktypes.QueryParamsResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/SupplyOf", &banktypes.QuerySupplyOfResponse{})
@@ -106,34 +110,57 @@ func init() {
setWhitelistedQuery("/ixo.token.v1beta1.Query/TokenMetadata", &tokentypes.QueryTokenMetadataResponse{})
}
-// GetWhitelistedQuery returns the whitelisted query at the provided path.
+// IsWhitelistedQuery returns if the query is not whitelisted.
+func IsWhitelistedQuery(queryPath string) error {
+ _, isWhitelisted := stargateResponsePools[queryPath]
+ if !isWhitelisted {
+ return wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", queryPath)}
+ }
+ return nil
+}
+
+// getWhitelistedQuery returns the whitelisted query at the provided path.
// If the query does not exist, or it was setup wrong by the chain, this returns an error.
-func GetWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error) {
- protoResponseAny, isWhitelisted := stargateWhitelist.Load(queryPath)
+// CONTRACT: must call returnStargateResponseToPool in order to avoid pointless allocs.
+func getWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error) {
+ protoResponseAny, isWhitelisted := stargateResponsePools[queryPath]
if !isWhitelisted {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", queryPath)}
}
- protoResponseType, ok := protoResponseAny.(codec.ProtoMarshaler)
+ protoMarshaler, ok := protoResponseAny.Get().(codec.ProtoMarshaler)
if !ok {
- return nil, wasmvmtypes.Unknown{}
+ return nil, fmt.Errorf("failed to assert type to codec.ProtoMarshaler")
}
- return protoResponseType, nil
+ return protoMarshaler, nil
}
-func setWhitelistedQuery(queryPath string, protoType codec.ProtoMarshaler) {
- stargateWhitelist.Store(queryPath, protoType)
+type protoTypeG[T any] interface {
+ *T
+ codec.ProtoMarshaler
+}
+
+// setWhitelistedQuery sets the whitelisted query at the provided path.
+// This method also creates a sync.Pool for the provided protoMarshaler.
+// We use generics so we can properly instantiate an object that the
+// queryPath expects as a response.
+func setWhitelistedQuery[T any, PT protoTypeG[T]](queryPath string, _ PT) {
+ stargateResponsePools[queryPath] = &sync.Pool{
+ New: func() any {
+ return PT(new(T))
+ },
+ }
+}
+
+// returnStargateResponseToPool returns the provided protoMarshaler to the appropriate pool based on it's query path.
+func returnStargateResponseToPool(queryPath string, pb codec.ProtoMarshaler) {
+ stargateResponsePools[queryPath].Put(pb)
}
func GetStargateWhitelistedPaths() (keys []string) {
// Iterate over the map and collect the keys
- stargateWhitelist.Range(func(key, value interface{}) bool {
- keyStr, ok := key.(string)
- if !ok {
- panic("key is not a string")
- }
- keys = append(keys, keyStr)
- return true
- })
-
+ keys = make([]string, 0, len(stargateResponsePools))
+ for k := range stargateResponsePools {
+ keys = append(keys, k)
+ }
return keys
}
diff --git a/x/bonds/bondingmath/alphabond.go.ignore b/x/bonds/bondingmath/alphabond.go.ignore
deleted file mode 100644
index 9c4f4bae3..000000000
--- a/x/bonds/bondingmath/alphabond.go.ignore
+++ /dev/null
@@ -1,227 +0,0 @@
-package bondingmath
-
-import (
- "fmt"
- "math"
-
- sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
-)
-
-type BondingAlgorithmV2 interface {
- Init()
-
- CalculatePriceForTokens()
-
- CalculateTokensForPrice()
-}
-
-func ConvertFloat64ToDec(f float64) (sdk.Dec, error) {
- s := fmt.Sprintf("%.18f", f)
- fmt.Println(f)
- dec, err := sdk.NewDecFromStr(s)
- if err != nil {
- fmt.Println(err)
- return sdk.Dec{}, err
- }
- return dec, nil
-}
-
-type AlphabondV2 struct {
- // Economics
- _m float64 // CurrentSupply
- _M float64 // Max Supply
- _C float64 // Outcome Payment
- _T float64 // Time to Maturity
- _R float64 // Current Reserve
-
- // Issuance
- _F float64 // Targeted Funding
- _Fi float64 // Targeted Funding
- _Mh float64 // Hatch Supply
- _Ph float64 // Fixed hatch price
- _Mi float64 // Hatch Supply
- _APYmin float64 // Minimum APY
- _APYavg float64 // Minimum APY
- _APYmax float64 // Maximum APY
-
- // Initialization
- _theta float64 // Theta
- _a float64 // System Alpha
- _a0 float64 // Initial System Alpha
- _g float64 // System Gamma
- _ap float64 // System Alpha Public
- _ap0 float64 // Intial Alpha Public
- _t float64 // Time
-
- _r float64 // Discounting rate
- // _p1 sdk.Dec // Maximum Price
-
- _Pmin float64 // Minimum Price
- _Pavg float64 // Average Price
- _Pmax float64 // Maximum Price
-
- _kappa float64
-
- _B float64 // Beta (Shape of the curve)
-}
-
-func toPercentage(f float64, err error) (float64, error) {
- if err != nil {
- return f, err
- }
- return f / 100, err
-}
-
-func (bond *AlphabondV2) Init(alphabond types.Bond) {
-
- bond._m, _ = alphabond.CurrentSupply.Amount.ToDec().Float64()
- bond._M, _ = alphabond.MaxSupply.Amount.ToDec().Float64()
- bond._C, _ = alphabond.OutcomePayment.ToDec().Float64()
- //TODO: fix this to include many coins.
- bond._R, _ = alphabond.CurrentReserve[0].Amount.ToDec().Float64()
-
- params := alphabond.FunctionParameters.AsMap()
- bond._F, _ = params["Funding_Target"].Float64()
- bond._Mh, _ = params["Hatch_Supply"].Float64()
- bond._Ph, _ = params["Hatch_Price"].Float64()
- bond._APYmax, _ = toPercentage(params["APY_MAX"].Float64())
- bond._APYmin, _ = toPercentage(params["APY_MIN"].Float64())
- bond._r, _ = toPercentage(params["DISCOUNT_RATE"].Float64())
- bond._T, _ = params["MATURITY"].Float64()
- bond._g, _ = params["GAMMA"].Float64()
- bond._theta, _ = toPercentage(params["THETA"].Float64())
- bond._ap0, _ = toPercentage(params["INITIAL_PUBLIC_ALPHA"].Float64())
-
- bond._Mi = bond._M - bond._Mh
- bond._Fi = bond._F - (bond._Mi * bond._Ph)
-
- bond._a0 = math.Exp(-1 * (bond._APYmin - bond._r) * bond._T)
-
- bond._ap, _ = func() (float64, error) {
- if _paDec, exists := params["PUBLIC_ALPHA"]; exists {
- _pa, err := _paDec.Float64()
- return _pa, err
- } else {
- return bond._ap0, nil
- }
- }()
-
- bond._a, _ = func() (float64, error) {
- if _aDec, exists := params["SYSTEM_ALPHA"]; exists {
- _a, err := _aDec.Float64()
- return _a, err
- } else {
- return bond._a0, nil
- }
- }()
-
- bond._t = 0
-
- bond._kappa = (bond._a / bond._a0) * math.Exp(bond._r*bond._t)
-
- //TODO: work need here
-
- bond._Pavg = bond._kappa * bond._Fi / bond._Mi
- bond._APYavg = -1 * (math.Log(bond._Pavg * bond._M / bond._C)) / bond._T
-
- // bond._Pmax = bond._M * bond._C
-
- bond._Pmax = bond._kappa * math.Exp(-1*bond._APYmin*bond._T) * (bond._C / bond._M)
- bond._Pmin = bond._kappa * math.Exp(-1*bond._APYmax*bond._T) * (bond._C / bond._M)
-
- // bond.setCalculatedPavg()
- // bond.setCalculatedAPYavg()
- // bond.setCalculatedPmax()
-
- // bond.setCalculatedPmin()
- bond._B = (bond._Pmax - bond._Pavg) / (bond._Pavg - bond._Pmin)
- // bond.setCalculatedBeta()
- fmt.Printf("%+v", bond)
-}
-
-func calculateIssuance() {
-
-}
-
-func (bond *AlphabondV2) Pmax() {
-
-}
-
-func (bond *AlphabondV2) setCalculatedPavg() {
-
-}
-
-func (bond *AlphabondV2) setCalculatedPmin() {
-
-}
-
-// _B = (_Pmax - _Pmin) / (_Pavg - _Pmin)
-func (bond *AlphabondV2) setCalculatedBeta() error {
- bond._B = (bond._Pmax - bond._Pmin) / (bond._Pavg - bond._Pmin)
- return nil
-}
-
-func (bond *AlphabondV2) UpdateAlpha(_ap float64) error {
- // recalulate := func() {
-
- // }()
- // Constraints
- if _ap < 0 {
- return fmt.Errorf("alpha is smaller than 0 and must be greater than or equal to 0 and smaller than or equal to 1")
- }
- if _ap > 1 {
- return fmt.Errorf("alpha is larger than 1 and must be greater than or equal to 0 and smaller than or equal to 1")
- }
-
- gamma1 := bond._g * (1 - (1 / bond._a0)) / (1 - (1 / bond._ap0))
- fmt.Println("gamma1", gamma1)
- alpha_new := func() float64 {
- if _ap <= bond._ap0 {
- fmt.Println("_ap <= bond._ap0", "true")
- return bond._a0 * math.Pow((_ap/bond._ap0), gamma1)
- } else {
- fmt.Println("_ap <= bond._ap0", "false")
- return 1 - (1-bond._a0)*math.Pow((1-_ap)/(1-bond._ap0), bond._g)
- }
- }()
- fmt.Println("alpha_new", alpha_new)
- bond._a = (bond._theta * alpha_new) + (1-bond._theta)*bond._a
-
- bond._kappa = (bond._a / bond._a0) * math.Exp(bond._r*bond._t)
- bond._Pavg = bond._kappa * bond._Fi / bond._Mi
- bond._APYavg = -1 * (math.Log(bond._Pavg * bond._M / bond._C)) / bond._T
- bond._Pmax = bond._kappa * math.Exp(-1*bond._APYmin*bond._T) * (bond._C / bond._M)
- bond._Pmin = bond._kappa * math.Exp(-1*bond._APYmax*bond._T) * (bond._C / bond._M)
- bond._B = (bond._Pmax - bond._Pavg) / (bond._Pavg - bond._Pmin)
- bond._ap = _ap
-
- fmt.Println("alpha", bond._a)
-
- return nil
-}
-
-func (bond *AlphabondV2) CalculatePriceForTokens(price sdk.Coin) (sdk.DecCoin, error) {
- // if !alphaBond.AlphaBond {
- // return types.Price{}, errors.New("not an alpha bond")
- // }
-
- _mh := float64(0)
- // _dm, _ := price.Amount.ToDec().Float64()
- calc := (bond._Mh - _mh)
- dec, _ := ConvertFloat64ToDec(calc)
- return sdk.NewDecCoinFromDec(price.Denom, dec), nil
-
-}
-
-func (bond *AlphabondV2) CalculateTokensForPrice(price sdk.Coin) (sdk.DecCoin, error) {
-
- // if !bond.AlphaBond {
- // // return types.Price{}, errors.New("not an alpha bond")
- // }
-
- _dm, _ := price.Amount.ToDec().Float64()
- calc := (_dm * bond._Pmin) + (((bond._Mi * (bond._Pmax - bond._Pmin)) / (bond._B + 1)) * (math.Pow(((bond._m+_dm)/bond._Mi), (bond._B+1)) - math.Pow((bond._m/bond._M), (bond._B+1))))
- dec, _ := ConvertFloat64ToDec(calc)
- return sdk.NewDecCoinFromDec(price.Denom, dec), nil
-}
diff --git a/x/bonds/bondingmath/alphabond_test.go.ignore b/x/bonds/bondingmath/alphabond_test.go.ignore
deleted file mode 100644
index 1ab6997bb..000000000
--- a/x/bonds/bondingmath/alphabond_test.go.ignore
+++ /dev/null
@@ -1,267 +0,0 @@
-package bondingmath
-
-import (
- "fmt"
- "testing"
-
- sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
-)
-
-type simFunc func(*AugmentedBondRevision1, AugmentedBondRevision1) (AugmentedBondRevision1, error)
-
-func buyToken(amount int64, stateF func(state AugmentedBondRevision1) AugmentedBondRevision1) func(*AugmentedBondRevision1, AugmentedBondRevision1) (AugmentedBondRevision1, error) {
- return func(algo *AugmentedBondRevision1, state AugmentedBondRevision1) (AugmentedBondRevision1, error) {
- priceCoin, _ := algo.CalculateTokensForPrice(sdk.NewInt64Coin("bond", amount))
- price, _ := priceCoin.Amount.Float64()
- // fmt.Println("Buy price:", price)
- algo._R = algo._R + price
- algo._m = algo._m + float64(amount)
- return stateF(state), nil
- }
-}
-
-func updateAlpha(publicAloha float64, stateF func(state AugmentedBondRevision1) AugmentedBondRevision1) func(*AugmentedBondRevision1, AugmentedBondRevision1) (AugmentedBondRevision1, error) {
- return func(algo *AugmentedBondRevision1, state AugmentedBondRevision1) (AugmentedBondRevision1, error) {
- algo.UpdateAlpha(publicAloha)
- return stateF(state), nil
- }
-}
-
-func TestRejectBondCreation(t *testing.T) {
-
-}
-
-func TestBondWithoutMaturityOrAlphaUpdates(t *testing.T) {
-
- token := "bond"
- reserveToken := "xusd"
- alphaBond := types.Bond{
- Token: token,
- FunctionParameters: []types.FunctionParam{
- types.NewFunctionParam("Funding_Target", sdk.NewDec(60000)),
- types.NewFunctionParam("Hatch_Supply", sdk.NewDec(0)),
- types.NewFunctionParam("Hatch_Price", sdk.NewDec(0)),
- types.NewFunctionParam("APY_MAX", sdk.NewDec(150)),
- types.NewFunctionParam("APY_MIN", sdk.NewDec(10)),
- types.NewFunctionParam("MATURITY", sdk.NewDec(1)),
- types.NewFunctionParam("DISCOUNT_RATE", sdk.NewDec(2)),
- types.NewFunctionParam("GAMMA", sdk.NewDec(2)),
- types.NewFunctionParam("THETA", sdk.NewDec(100)),
- types.NewFunctionParam("INITIAL_PUBLIC_ALPHA", sdk.NewDec(50)),
- },
- CurrentSupply: sdk.NewInt64Coin(token, 0),
- Name: "Test Bond",
- Description: "Description",
- CreatorDid: "did:test:0000000000000",
- ControllerDid: "did:test:0000000000000",
- ReserveTokens: []string{},
- FunctionType: "augmented_bond_v2",
- TxFeePercentage: sdk.ZeroDec(),
- ExitFeePercentage: sdk.ZeroDec(),
- FeeAddress: "address",
- ReserveWithdrawalAddress: "address",
- MaxSupply: sdk.NewInt64Coin(token, 60000),
- OrderQuantityLimits: sdk.Coins{},
- SanityRate: sdk.ZeroDec(),
- SanityMarginPercentage: sdk.ZeroDec(),
- CurrentReserve: sdk.Coins{
- sdk.NewInt64Coin(reserveToken, 0),
- },
- AvailableReserve: sdk.Coins{
- sdk.NewInt64Coin(reserveToken, 0),
- },
- CurrentOutcomePaymentReserve: sdk.Coins{
- sdk.NewInt64Coin(reserveToken, 0),
- },
- AllowSells: false,
- AlphaBond: true,
- AllowReserveWithdrawals: true,
- OutcomePayment: sdk.NewInt(68100),
- State: "OPEN",
- BondDid: "did:test:0000000000000",
- }
-
- // algo, _ := InitializeAugmentedBond(alphaBond)
- fmt.Println(alphaBond)
- // algo.UpdatePublicAlpha(0.5)
- // algo.UpdateRivsion()
- // algo.Export(alphaBond)
-
- algo := &AugmentedBondRevision1{}
- err := algo.init(alphaBond)
-
- // // pbond, _ := algo.CalculatePriceForTokens(sdk.NewInt64Coin(reserveToken, 20000))
- // // fmt.Println("price for 20000 bond tokens:", pbond.Amount.String())
-
- // // pxusd, _ := algo.CalculateTokensForPrice(sdk.NewInt64Coin(reserveToken, 4500))
- // // fmt.Println("price for 4500 xusd:", pxusd.Amount.String())
-
- sim := []simFunc{
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = 10000
- // state._R = state._R + 4199
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- updateAlpha(0.6, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- // state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(10000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- updateAlpha(0.7, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- // state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- updateAlpha(0.8, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- // state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(400, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- buyToken(1000, func(state AugmentedBondRevision1) AugmentedBondRevision1 {
- state._m = state._m + 10000
- // state.price = 100000
- return state
- }),
- // updateAlpha(0.6, func(state AugmentedBondRevision1) {
- // state.alpha = 0.6
- // return state
- // }),
- }
-
- handleSim := func(t *testing.T, algo *AugmentedBondRevision1, sim []simFunc) {
- var nextState AugmentedBondRevision1 = *algo
- var err error
-
- for _, f := range sim {
- nextState, err = f(algo, nextState)
- if err != nil {
- t.Error(err)
- }
- fmt.Println()
- // fmt.Printf("\nSIM: %+v\n", nextState)
- // fmt.Println("SIM:", nextState == *algo)
- fmt.Printf("ALGO: %+v\n", algo)
- fmt.Printf("APYavg: %.2f\n", algo._APYavg)
- }
- }
-
- handleSim(t, algo, sim)
-}
-
-func TestBondWithAlphaUpdatesButWithoutMaturity(t *testing.T) {
-
-}
-
-func TestBondWithMaturityButWithoutAlphaUpdates(t *testing.T) {
-
-}
-
-func TestBondWithAlphaUpdatesAndMaturity(t *testing.T) {
-
-}
-
-// 2.4
-// func TestFiGeatherthan0() {}
-// func TestMiGeatherthan0() {}
-
-// func TestPmaxSmallerThanCoverM() {}
-
-// func Test_r_GreaterThanOrEqual0andSmallerThanAPYmin() {}
-// func Test_IncomeIsAvaialbleDueToTime() {}
diff --git a/x/bonds/bondingmath/old b/x/bonds/bondingmath/old
deleted file mode 100644
index 5bed570e0..000000000
--- a/x/bonds/bondingmath/old
+++ /dev/null
@@ -1,920 +0,0 @@
-
-
-// --------------------------------------------------------------------------------------------------------------------
-// type BondingAlgorithm
-// type BondingAlgorithm[R AugmentedBond] struct{}
-
-// type AugmentedBond interface{}
-// type AugmentedBondRevision1 BondingAlgorithm[AugmentedBond]
-
-// func (AugmentedBondRevision1) UpdatedAlpha() any
-
-// func (b BondingAlgorithm[R]) init() (BondingAlgorithm[R], error) {
-// return BondingAlgorithm[R]{}, nil
-// }
-
-// func (BondingAlgorithm[R]) recalculate() (BondingAlgorithm[R], error) {
-// return BondingAlgorithm[R]{}, nil
-// }
-
-// func InitializeBondingAlgorithm[A any](bond types.Bond) (BondingAlgorithm[A], error) {
-// bondingAlgorithm := AugmentedBondRevision1{}
-// return bondingAlgorithm.UpdatedAlpha(), nil
-
-// // bondFuncType := bond.FunctionType
-// // bondParams := bond.FunctionParameters.AsMap()
-// // bondFuncRevisionDec, err := getOrError(bondParams, "REVISION", fmt.Errorf("Unknown revision for bond %s", bond.BondDid))
-// // if err != nil {
-// // return nil, err
-// // }
-// // algo, err := matchRevisionToImplementation[A](bondFuncType, bondFuncRevisionDec.TruncateInt64())
-// // if err != nil {
-// // return nil, err
-// // }
-// // return algo.init()
-// return nil, nil
-// }
-
-// type BondingAlgorithm[A any, R any] interface {
-// init() R
-// recalculate() (A, error)
-// }
-
-// type AugmentedBond[A any] interface {
-// UpdateAlpha(any) A
-// }
-
-// type AugmentedBondRevision1 BondingAlgorithm[any, any]
-
-// type AugmentedBondRevision1Algo struct {
-// AugmentedBondRevision1
-// }
-
-// func (AugmentedBondRevision1Algo) init() any {
-// return nil
-// }
-
-// type Revision interface {
-// }
-// type BondingAlgorithm[A Revision] interface {
-// AugmentedBond
-// }
-
-// type AugmentedBond[R Revision] struct {
-
-// }
-
-// type ARevision1 struct {
-// }
-
-// func (a *AugmentedBond[A]) init() (A, error) {
-
-// }
-
-func getOrError[A any](m map[string]A, key string, err error) (A, error) {
- val, exists := m[key]
- if !exists {
- return *new(A), err
- }
- return val, nil
-}
-
-// type BondingAlgorithm[A any] interface {
-// // AugmentedBond[AugmentedBond]
-// init() (A, error)
-// recalculate() (A, error)
-// // Apply(bond types.Bond) error
-// }
-
-// type AugmentedBond[A AugmentedBond] interface {
-// init() (A, error)
-// recalculate() (A, error)
-// UpdateAlpha() error
-// }
-
-// func safeSetAndRecalculate[A BondingAlgorithm](a A, f func(a *A)) (A, error) {
-// ba, err := func(a A) A {
-// f(&a)
-// return a
-// }(a).recalculate()
-// if err != nil {
-// return a, err
-// }
-// return ba.(A), nil
-// }
-
-// type AugmentedBondRevision1 struct {
-// BondingAlgorithm[AugmentedBondRevision1]
-// m float64
-// }
-
-// func (a AugmentedBondRevision1) init() (BondingAlgorithm, error) {
-// return safeSetAndRecalculate(*new(AugmentedBondRevision1), func(aa *AugmentedBondRevision1) {
-// aa.m = 1
-// })
-// }
-
-// func (a AugmentedBondRevision1) recalculate() (BondingAlgorithm, error) {
-// a.m = 1
-// return a, nil
-// }
-
-// func (a AugmentedBondRevision1) UpdateAlpha() (AugmentedBondRevision1, error) {
-// return safeSetAndRecalculate(a, func(aa *AugmentedBondRevision1) {
-// aa.m = 1
-// })
-// }
-
-// type AugmentedBondRevision2 struct {
-// BondingAlgorithm
-// m float64
-// }
-
-// // //TODO: Unit test this.
-// func matchRevisionToImplementation[A BondingAlgorithm](_type string, revision int64) (A, error) {
-// matchAlgoTypeAndRevision := func(at string, ar int64) bool {
-// return at == _type && ar == int64(revision)
-// }
-// switch {
-// default:
-// return nil, fmt.Errorf("Unknown bonding algorithm type %s and revision %d", _type, revision)
-// case matchAlgoTypeAndRevision("Augmented", 1):
-// return *new(AugmentedBondRevision1), nil
-// case matchAlgoTypeAndRevision("Augmented", 2):
-// return *new(AugmentedBondRevision2), nil
-// }
-// }
-
-// func InitializeBondingAlgorithm[A BondingAlgorithm](bond types.Bond) (A, error) {
-// bondFuncType := bond.FunctionType
-// bondParams := bond.FunctionParameters.AsMap()
-// bondFuncRevisionDec, err := getOrError(bondParams, "REVISION", fmt.Errorf("Unknown revision for bond %s", bond.BondDid))
-// if err != nil {
-// return nil, err
-// }
-
-// algo, err := matchRevisionToImplementation[A](bondFuncType, bondFuncRevisionDec.TruncateInt64())
-// if err != nil {
-// return nil, err
-// }
-
-// return algo.init()
-// }
-
-// type BondingAlgorithm[A any] struct {
-// params A
-// }
-
-// func InitializeBondingAlgorithm[A any](bond types.Bond) {
-// ba := BondingAlgorithm[A]{}
-// ba.params.Init()
-// }
-
-// type AugmentedBondRevision1 struct {
-// m float64
-// }
-
-// type BondingAlgorithm interface {
-// AugmentedBond
-
-// recalculate() error
-
-// Revision() int64
-// Type() string
-// }
-
-// type AugmentedBond interface {
-// }
-
-// type AugmentedBondRevision1 struct {
-// }
-
-// func (ar AugmentedBondRevision1) UpdateAlpha(ap float64) {
-// x, _ := setAndRecalculate(*ar, func(state any) (any, error) {
-// return nil, nil
-// })
-// }
-
-// type AugmentedBond interface {
-// }
-
-// type AugmentedBondRevision1 int
-
-// func (AugmentedBondRevision1) Init()
-
-// func InitializeAugmentedBond(bond types.Bond) (AugmentedBond, error) {
-// revision := 1
-// params := map[string]sdk.Dec{}
-
-// switch revision {
-// case 1:
-// AugmentedBond
-// }
-
-// return nil, nil
-// }
-
-// type AugmentedBondRevision1 struct {
-
-// // Economics
-// _m float64 // CurrentSupply
-// _M float64 // Max Supply
-// _C float64 // Outcome Payment
-// _T float64 // Time to Maturity
-// _R float64 // Current Reserve
-
-// // Issuance
-// _F float64 // Targeted Funding
-// _Fi float64 // Targeted Funding
-// _Mh float64 // Hatch Supply
-// _Ph float64 // Fixed hatch price
-// _Mi float64 // Hatch Supply
-// _APYmin float64 // Minimum APY
-// _APYavg float64 // Minimum APY
-// _APYmax float64 // Maximum APY
-
-// // Initialization
-// _theta float64 // Theta
-// _a float64 // System Alpha
-// _a0 float64 // Initial System Alpha
-// _g float64 // System Gamma
-// _ap float64 // System Alpha Public
-// _ap0 float64 // Intial Alpha Public
-// _t float64 // Time
-
-// _r float64 // Discounting rate
-// // _p1 sdk.Dec // Maximum Price
-
-// _Pmin float64 // Minimum Price
-// _Pavg float64 // Average Price
-// _Pmax float64 // Maximum Price
-
-// _kappa float64
-
-// _B float64 // Beta (Shape of the curve)
-
-// }
-
-// func (b *AugmentedBondRevision1) Init() {
-
-// }
-// type AugmentedBond[R AugmentedBondRevision] struct {
-// m
-// }
-
-// type AugmentedBondRevision interface {
-// init()
-// updateAlpha()
-// }
-
-// type AugmentedBondRevision1 struct {
-
-// }
-
-// func alphabondRev1() {
-// // Economics
-// _m float64 // CurrentSupply
-// _M float64 // Max Supply
-// _C float64 // Outcome Payment
-// _T float64 // Time to Maturity
-// _R float64 // Current Reserve
-
-// // Issuance
-// _F float64 // Targeted Funding
-// _Fi float64 // Targeted Funding
-// _Mh float64 // Hatch Supply
-// _Ph float64 // Fixed hatch price
-// _Mi float64 // Hatch Supply
-// _APYmin float64 // Minimum APY
-// _APYavg float64 // Minimum APY
-// _APYmax float64 // Maximum APY
-// }
-
-// func (AugmentedBond[R]) Revision() int64 { return 1 }
-// func (AugmentedBond[R]) Type() string { return "AugmentedBond" }
-
-// func test() {
-
-// var x BondingAlgorithm = AugmentedBondRevision1{}
-// }
-
-// func (a BondingAlgorithm[A]) PricePerToken() {
-// a.algorithm
-// }
-
-// type BondingAlgorithmRevision interface {
-// AugmentedBond
-// Revision() int64
-// Type()
-// }
-
-// type AugmentedBond interface {
-// Init() (func(types.Bond) BondingAlgorithm[AugmentedBond], int64)
-// Type()
-// Revision() int64
-// UpdateAlpha()
-// }
-
-// type AugmentedBondRevision1 struct {
-// }
-
-// func (AugmentedBondRevision1) Init() (func(types.Bond) BondingAlgorithm[AugmentedBond], int64) {
-// return func(bond types.Bond) BondingAlgorithm[AugmentedBond] {
-
-// }
-// }
-
-// func (AugmentedBondRevision1) Type()
-// func (AugmentedBondRevision1) Revision() int64 { return 1 }
-// func (AugmentedBondRevision1) UpdateAlpha()
-
-// type AugmentedBondRevision2 struct {
-// }
-
-// func (AugmentedBondRevision2) Init() (func(types.Bond) BondingAlgorithm[AugmentedBond], int64) {
-// return func(bond types.Bond) BondingAlgorithm[AugmentedBond] {
-
-// }
-// }
-
-// func (AugmentedBondRevision2) Type()
-// func (AugmentedBondRevision2) Revision() int64 { return 1 }
-// func (AugmentedBondRevision2) UpdateAlpha()
-
-// func InitializeAugmentedBond(bond types.Bond) (BondingAlgorithm[AugmentedBond], error) {
-
-// x := AugmentedBondRevision1{}.Init()
-// y, rev := AugmentedBondRevision2{}.Init()
-
-// switch {
-// case y, rev := AugmentedBondRevision2{}.Init(); rev == 0:
-// }
-
-// // f := func(revision int64) AugmentedBond {
-// // switch revision {
-// // case AugmentedBondRevision1{}.Revision():
-// // return AugmentedBondRevision1{}.Init()
-// // default:
-// // return AugmentedBondRevision1{}
-// // }
-// // }(0)
-
-// return BondingAlgorithm[AugmentedBond]{}, nil
-// }
-
-// func Test() {
-
-// y := AugmentedBond(AugmentedBondRevision1{})
-
-// fmt.Println(y)
-
-// x, _ := InitializeAugmentedBond(types.Bond{})
-
-// }
-
-// type BondingAlgorithm interface {
-// Revision() int
-// }
-
-// type AugmentedBond interface {
-// BondingAlgorithm
-// }
-
-// func recalculate[A BondingAlgorithm](a *A, f func(A) (A, error)) (A, error) {
-// return f(*a)
-// }
-
-// type AugmentedBondRevision1 struct {
-// }
-
-// func (AugmentedBondRevision1) Revision() int { return 1 }
-
-// func (ab *AugmentedBondRevision1) UpdateAlpha() {
-// ab, err = recalculate(ab, func(state AugmentedBondRevision1) {
-
-// })
-// if err != nil {
-// return nil
-// }
-// ab = ab
-// }
-
-// type BondingAlgorithm interface{}
-
-// func InitializeBondingAlgorithm[B any](bond B, f func(B) BondingAlgorithm) BondingAlgorithm {
-// return f(bond)
-// }
-
-// type AugmentedBond struct {
-// BondingAlgorithm
-// }
-
-// func (AugmentedBond) Init() func(types.Bond) BondingAlgorithm {
-// return func(bb types.Bond) BondingAlgorithm {
-// return AugmentedBond{}
-// }
-// }
-
-// func Test() {
-// InitializeBondingAlgorithm(types.Bond{}, AugmentedBond{}.Init())
-// }
-
-// type BondingAlgorithmRevision interface {
-// }
-
-// type BondingAlgorithm[R BondingAlgorithmRevision] interface {
-// Revisions() []BondingAlgorithmRevision
-// }
-
-// type AugmentedBondRevision interface {
-// }
-
-// type AugmentedBond[R AugmentedBondRevision] struct {
-
-// }
-
-// func (a AugmentedBond[R]) Revisions() []R {
-// []R{
-
-// }
-// }
-
-// type AugmentedBondRevision1 struct {
-// }
-
-// func (x AugmentedBondRevision1) Revision() {
-
-// }
-
-// type AugmentedBondRevision2 struct{}
-
-// type AugmentedBondRevision interface {
-// AugmentedBondRevision1 | AugmentedBondRevision2
-// Revision()
-// }
-// type AugmentedBond[R AugmentedBondRevision] func(R) struct {
-// x string
-// }
-
-// func Test[R AugmentedBondRevision](r R) {
-
-// }
-
-// func Test2() {
-// Test(AugmentedBondRevision1{})
-// }
-
-// var t AugmentedBond[AugmentedBondRevision1] = func(a AugmentedBondRevision1) struct{ x string } {
-// return struct{ x string }{
-// x: "",
-// }
-// }
-
-// func (ab AugmentedBond[R]) UpdateAlpha(pa float64) {
-// rev := func() R {
-// return R(AugmentedBondRevision1{})
-// }()
-// y := ab(rev).x
-// fmt.Println(y)
-// // ab(x)
-
-// }
-
-// type AugmentedBondRevisionV1 struct {
-// }
-
-// func (x AugmentedBondRevisionV1) Revision() {
-
-// }
-
-// type AugmentedBondRevisionV2 struct {
-// }
-
-// type X struct {
-// }
-
-// func (x X) Revision() {
-
-// }
-
-// type AugmentedBond interface {
-// AugmentedBondRevisionV1 | AugmentedBondRevisionV2
-// Revision()
-// }
-
-// func Upgrade[A AugmentedBond](a A) {
-
-// }
-
-// func Test() {
-
-// Upgrade(X{})
-// }
-
-// type BondingAlgorithm string
-
-// const AugmentedBond BondingAlgorithm = "augmented_bond"
-
-// type AlgorithmRevision interface{}
-
-// func Init(bond types.Bond) {
-
-// }
-
-// type X struct {
-// AlgorithmRevision
-// }
-
-// type BondFunction[A BondingAlgorithm, R AlgorithmRevision] interface {
-// Revision() int64
-// GetPice() int64
-// }
-
-// type AlphaBond[A BondingAlgorithm, R AlgorithmRevision] func(A, R)
-
-// var AugmentedBond AlphaBond[BondingAlgorithm, X] = func(a BondingAlgorithm, r X) {
-
-// }
-
-// func (ab AlphaBond[A, R]) Revision() int64 { return 1 }
-// func (ab AlphaBond[A, R]) GetPrice() int64 { ab(nil, nil) }
-
-// type AlgorithmRevision interface {
-// Upgrade(func()) (AlgorithmRevision, error)
-// }
-
-// type BondingAlgorithm interface {
-// Revision() int64
-// Paramaters() map[string]string
-// SetParamaters() error
-// // UpdateToNextRevision(func(Rev[NRev]) (Rev, error)) (BondingAlgorithm[Rev, NRev], error)
-
-// CalculatePriceForTokens() (sdk.Coin, error)
-// }
-
-// type AugBond[R AlgorithmRevision] struct {
-// algorithmRevision R
-// _m float64 // CurrentSupply
-// _M float64 // Max Supply
-// _R float64 // Current Reserve
-// }
-
-// func (a AugBond[R]) Y(c R)
-
-// func InitializeAugmentedBond(bond types.Bond) (AugBond[AlgorithmRevision], error) {
-// AugBond[AlgorithmRevision]{
-// algorithmRevision: func(revision int) {
-
-// },
-// }
-
-// if bond.FunctionType != types.AugmentedFunction {
-// return AugBond[AlgorithmRevision]{}, fmt.Errorf("Unsupported bond revision")
-// }
-
-// params := bond.FunctionParameters.AsMap()
-// revision := params["revision"].TruncateInt64()
-
-// rev, _ := func(revision int64) (AlgorithmRevision, error) {
-// // switch revision {
-// // case 1:
-// // return AugmentedBondRevision1{}, nil
-// // case 2:
-// // return AugmentedBondRevision2{}, nil
-// // break
-// // }
-// return nil, fmt.Errorf("Unsupported bond revision")
-// }(revision)
-
-// state := AugBond[AlgorithmRevision]{
-// // revision: revision,
-// algorithmRevision: rev,
-// }
-
-// // ab.algorithmRevision = rev.initalize()
-// return state, nil
-// }
-
-// // func InitializeBondingAlgorithm(bond *types.Bond) (BondingAlgorithm, error) {
-
-// // }
-
-// // func (b *AugBond[Rev, NRev]) UpdateToNextRevision(f func(Rev) (Rev, error)) (BondingAlgorithm[Rev, NRev], error) {
-// // return nil, nil
-// // }
-
-// func UpdateAlpha()
-
-// // type AugmentedBond[T AugmentedBondRevision] struct {
-// // revision int64
-// // algorithmRevision T
-// // _m float64 // CurrentSupply
-// // _M float64 // Max Supply
-// // _R float64 // Current Reserve
-// // }
-
-// // type AugmentedBondRevision interface {
-// // X()
-// // }
-
-// // type InvalidRevision string
-
-// // func (InvalidRevision) X() {}
-
-// // type AugmentedBondRevision1 struct {
-// // x, y float64
-// // }
-
-// // func (x AugmentedBondRevision1) X() {}
-
-// // type AugmentedBondRevision2 struct {
-// // // Economics
-// // _C float64 // Outcome Payment
-// // _T float64 // Time to Maturity
-// // _F float64 // Targeted Funding
-
-// // // Issuance
-// // _Fi float64 // Targeted Funding
-// // _Mi float64 // Hatch Supply
-// // _Mh float64 // Hatch Supply
-// // _Ph float64 // Fixed hatch price
-
-// // _APYmin float64 // Minimum APY
-// // _APYavg float64 // Minimum APY
-// // _APYmax float64 // Maximum APY
-
-// // // Initialization
-// // _theta float64 // Theta
-// // _a float64 // System Alpha
-// // _a0 float64 // Initial System Alpha
-// // _g float64 // System Gamma
-// // _ap float64 // System Alpha Public
-// // _ap0 float64 // Intial Alpha Public
-// // _t float64 // Time
-
-// // _r float64 // Discounting rate
-// // // _p1 sdk.Dec // Maximum Price
-
-// // _Pmin float64 // Minimum Price
-// // _Pavg float64 // Average Price
-// // _Pmax float64 // Maximum Price
-
-// // _kappa float64
-
-// // _B float64 // Beta (Shape of the curve)
-// // }
-
-// // func (x AugmentedBondRevision2) X() {}
-
-// // func recalculate() {
-
-// // }
-
-// // func InitializeAugmentedBond(bond types.Bond) (AugmentedBond[AugmentedBondRevision], error) {
-// // if bond.FunctionType != types.AugmentedFunction {
-// // return AugmentedBond[AugmentedBondRevision]{}, fmt.Errorf("Unsupported bond revision")
-// // }
-
-// // params := bond.FunctionParameters.AsMap()
-// // revision := params["revision"].TruncateInt64()
-
-// // rev, _ := func(revision int64) (AugmentedBondRevision, error) {
-// // switch revision {
-// // case 1:
-// // return AugmentedBondRevision1{}, nil
-// // case 2:
-// // return AugmentedBondRevision2{}, nil
-// // break
-// // }
-// // return nil, fmt.Errorf("Unsupported bond revision")
-// // }(revision).initalize(params, )
-
-// // state := AugmentedBond[AugmentedBondRevision]{
-// // revision: revision,
-// // algorithmRevision: rev,
-// // }
-
-// // // ab.algorithmRevision = rev.initalize()
-// // return state, nil
-// // }
-
-// // func (ab *AugmentedBond[AugmentedBondRevision]) Initialize(bond *types.Bond) error {
-// // return nil
-// // }
-
-// // func (ab *AugmentedBond) UpdatePublicAlpha() error {
-// // return nil
-// // }
-
-// // func (ab *AugmentedBond) Apply(bond *types.Bond) error {
-// // return nil
-// // }
-
-// // func ConvertFloat64ToDec(f float64) (sdk.Dec, error) {
-// // s := fmt.Sprintf("%.18f", f)
-// // fmt.Println(f)
-// // dec, err := sdk.NewDecFromStr(s)
-// // if err != nil {
-// // fmt.Println(err)
-// // return sdk.Dec{}, err
-// // }
-// // return dec, nil
-// // }
-
-// // type AlphabondV2 struct {
-// // // Economics
-// // _m float64 // CurrentSupply
-// // _M float64 // Max Supply
-// // _C float64 // Outcome Payment
-// // _T float64 // Time to Maturity
-// // _R float64 // Current Reserve
-
-// // // Issuance
-// // _F float64 // Targeted Funding
-// // _Fi float64 // Targeted Funding
-// // _Mh float64 // Hatch Supply
-// // _Ph float64 // Fixed hatch price
-// // _Mi float64 // Hatch Supply
-// // _APYmin float64 // Minimum APY
-// // _APYavg float64 // Minimum APY
-// // _APYmax float64 // Maximum APY
-
-// // // Initialization
-// // _theta float64 // Theta
-// // _a float64 // System Alpha
-// // _a0 float64 // Initial System Alpha
-// // _g float64 // System Gamma
-// // _ap float64 // System Alpha Public
-// // _ap0 float64 // Intial Alpha Public
-// // _t float64 // Time
-
-// // _r float64 // Discounting rate
-// // // _p1 sdk.Dec // Maximum Price
-
-// // _Pmin float64 // Minimum Price
-// // _Pavg float64 // Average Price
-// // _Pmax float64 // Maximum Price
-
-// // _kappa float64
-
-// // _B float64 // Beta (Shape of the curve)
-// // }
-
-// // func toPercentage(f float64, err error) (float64, error) {
-// // if err != nil {
-// // return f, err
-// // }
-// // return f / 100, err
-// // }
-
-// // func (bond *AlphabondV2) Init(alphabond types.Bond) {
-
-// // bond._m, _ = alphabond.CurrentSupply.Amount.ToDec().Float64()
-// // bond._M, _ = alphabond.MaxSupply.Amount.ToDec().Float64()
-// // bond._C, _ = alphabond.OutcomePayment.ToDec().Float64()
-// // //TODO: fix this to include many coins.
-// // bond._R, _ = alphabond.CurrentReserve[0].Amount.ToDec().Float64()
-
-// // params := alphabond.FunctionParameters.AsMap()
-// // bond._F, _ = params["Funding_Target"].Float64()
-// // bond._Mh, _ = params["Hatch_Supply"].Float64()
-// // bond._Ph, _ = params["Hatch_Price"].Float64()
-// // bond._APYmax, _ = toPercentage(params["APY_MAX"].Float64())
-// // bond._APYmin, _ = toPercentage(params["APY_MIN"].Float64())
-// // bond._r, _ = toPercentage(params["DISCOUNT_RATE"].Float64())
-// // bond._T, _ = params["MATURITY"].Float64()
-// // bond._g, _ = params["GAMMA"].Float64()
-// // bond._theta, _ = toPercentage(params["THETA"].Float64())
-// // bond._ap0, _ = toPercentage(params["INITIAL_PUBLIC_ALPHA"].Float64())
-
-// // bond._Mi = bond._M - bond._Mh
-// // bond._Fi = bond._F - (bond._Mi * bond._Ph)
-
-// // bond._a0 = math.Exp(-1 * (bond._APYmin - bond._r) * bond._T)
-
-// // bond._ap, _ = func() (float64, error) {
-// // if _paDec, exists := params["PUBLIC_ALPHA"]; exists {
-// // _pa, err := _paDec.Float64()
-// // return _pa, err
-// // } else {
-// // return bond._ap0, nil
-// // }
-// // }()
-
-// // bond._a, _ = func() (float64, error) {
-// // if _aDec, exists := params["SYSTEM_ALPHA"]; exists {
-// // _a, err := _aDec.Float64()
-// // return _a, err
-// // } else {
-// // return bond._a0, nil
-// // }
-// // }()
-
-// // bond._t = 0
-
-// // bond._kappa = (bond._a / bond._a0) * math.Exp(bond._r*bond._t)
-
-// // //TODO: work need here
-
-// // bond._Pavg = bond._kappa * bond._Fi / bond._Mi
-// // bond._APYavg = -1 * (math.Log(bond._Pavg * bond._M / bond._C)) / bond._T
-
-// // // bond._Pmax = bond._M * bond._C
-
-// // bond._Pmax = bond._kappa * math.Exp(-1*bond._APYmin*bond._T) * (bond._C / bond._M)
-// // bond._Pmin = bond._kappa * math.Exp(-1*bond._APYmax*bond._T) * (bond._C / bond._M)
-
-// // // bond.setCalculatedPavg()
-// // // bond.setCalculatedAPYavg()
-// // // bond.setCalculatedPmax()
-
-// // // bond.setCalculatedPmin()
-// // bond._B = (bond._Pmax - bond._Pavg) / (bond._Pavg - bond._Pmin)
-// // // bond.setCalculatedBeta()
-// // fmt.Printf("%+v", bond)
-// // }
-
-// // func calculateIssuance() {
-
-// // }
-
-// // func (bond *AlphabondV2) Pmax() {
-
-// // }
-
-// // func (bond *AlphabondV2) setCalculatedPavg() {
-
-// // }
-
-// // func (bond *AlphabondV2) setCalculatedPmin() {
-
-// // }
-
-// // // _B = (_Pmax - _Pmin) / (_Pavg - _Pmin)
-// // func (bond *AlphabondV2) setCalculatedBeta() error {
-// // bond._B = (bond._Pmax - bond._Pmin) / (bond._Pavg - bond._Pmin)
-// // return nil
-// // }
-
-// // func (bond *AlphabondV2) UpdateAlpha(_ap float64) error {
-// // recalulate := func() {
-
-// // }()
-// // // Constraints
-// // if _ap < 0 {
-// // return fmt.Errorf("alpha is smaller than 0 and must be greater than or equal to 0 and smaller than or equal to 1")
-// // }
-// // if _ap > 1 {
-// // return fmt.Errorf("alpha is larger than 1 and must be greater than or equal to 0 and smaller than or equal to 1")
-// // }
-
-// // gamma1 := bond._g * (1 - (1 / bond._a0)) / (1 - (1 / bond._ap0))
-// // fmt.Println("gamma1", gamma1)
-// // alpha_new := func() float64 {
-// // if _ap <= bond._ap0 {
-// // fmt.Println("_ap <= bond._ap0", "true")
-// // return bond._a0 * math.Pow((_ap/bond._ap0), gamma1)
-// // } else {
-// // fmt.Println("_ap <= bond._ap0", "false")
-// // return 1 - (1-bond._a0)*math.Pow((1-_ap)/(1-bond._ap0), bond._g)
-// // }
-// // }()
-// // fmt.Println("alpha_new", alpha_new)
-// // bond._a = (bond._theta * alpha_new) + (1-bond._theta)*bond._a
-// // bond._kappa = (bond._a / bond._a0) * math.Exp(bond._r*bond._t)
-// // bond._Pavg = bond._kappa * bond._Fi / bond._Mi
-// // bond._APYavg = -1 * (math.Log(bond._Pavg * bond._M / bond._C)) / bond._T
-// // bond._Pmax = bond._kappa * math.Exp(-1*bond._APYmin*bond._T) * (bond._C / bond._M)
-// // bond._Pmin = bond._kappa * math.Exp(-1*bond._APYmax*bond._T) * (bond._C / bond._M)
-// // bond._B = (bond._Pmax - bond._Pavg) / (bond._Pavg - bond._Pmin)
-// // bond._ap = _ap
-
-// // fmt.Println("alpha", bond._a)
-
-// // return nil
-// // }
-
-// // func (bond *AlphabondV2) CalculatePriceForTokens(price sdk.Coin) (sdk.DecCoin, error) {
-// // // if !alphaBond.AlphaBond {
-// // // return types.Price{}, errors.New("not an alpha bond")
-// // // }
-
-// // _mh := float64(0)
-// // // _dm, _ := price.Amount.ToDec().Float64()
-// // calc := (bond._Mh - _mh)
-// // dec, _ := ConvertFloat64ToDec(calc)
-// // return sdk.NewDecCoinFromDec(price.Denom, dec), nil
-
-// // }
-
-// // func (bond *AlphabondV2) CalculateTokensForPrice(price sdk.Coin) (sdk.DecCoin, error) {
-
-// // // if !bond.AlphaBond {
-// // // // return types.Price{}, errors.New("not an alpha bond")
-// // // }
-
-// // _dm, _ := price.Amount.ToDec().Float64()
-// // calc := (_dm * bond._Pmin) + (((bond._Mi * (bond._Pmax - bond._Pmin)) / (bond._B + 1)) * (math.Pow(((bond._m+_dm)/bond._Mi), (bond._B+1)) - math.Pow((bond._m/bond._M), (bond._B+1))))
-// // dec, _ := ConvertFloat64ToDec(calc)
-// // return sdk.NewDecCoinFromDec(price.Denom, dec), nil
-// // }
diff --git a/x/bonds/client/cli/flags.go b/x/bonds/client/cli/flags.go
index 13f1b99b3..4c941bf6f 100644
--- a/x/bonds/client/cli/flags.go
+++ b/x/bonds/client/cli/flags.go
@@ -1,7 +1,7 @@
package cli
import (
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
flag "github.com/spf13/pflag"
)
diff --git a/x/bonds/client/cli/query.go b/x/bonds/client/cli/query.go
index 9f8d70452..2a0f3f848 100644
--- a/x/bonds/client/cli/query.go
+++ b/x/bonds/client/cli/query.go
@@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
"github.com/spf13/cobra"
)
diff --git a/x/bonds/client/cli/tx.go b/x/bonds/client/cli/tx.go
index 8bfae4f65..08ba8bc9e 100644
--- a/x/bonds/client/cli/tx.go
+++ b/x/bonds/client/cli/tx.go
@@ -11,9 +11,9 @@ import (
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- bondsclient "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
+ bondsclient "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/client"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
)
func NewTxCmd() *cobra.Command {
diff --git a/x/bonds/client/common.go b/x/bonds/client/common.go
index 8b869c505..2143e6265 100644
--- a/x/bonds/client/common.go
+++ b/x/bonds/client/common.go
@@ -5,7 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
)
func splitParameters(fnParamsStr string) (paramValuePairs []string) {
diff --git a/x/bonds/client/rest/query.go b/x/bonds/client/rest/query.go
deleted file mode 100644
index 61e0c5986..000000000
--- a/x/bonds/client/rest/query.go
+++ /dev/null
@@ -1,266 +0,0 @@
-package rest
-
-// import (
-// "fmt"
-// "net/http"
-
-// "github.com/cosmos/cosmos-sdk/client"
-// sdk "github.com/cosmos/cosmos-sdk/types"
-// "github.com/cosmos/cosmos-sdk/types/rest"
-// "github.com/gorilla/mux"
-// "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/keeper"
-// "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
-// )
-
-// func registerQueryRoutes(clientCtx client.Context, r *mux.Router) {
-// r.HandleFunc("/bonds", queryBondsHandler(clientCtx)).Methods("GET")
-// r.HandleFunc("/bonds_detailed", queryBondsDetailedHandler(clientCtx)).Methods("GET")
-// r.HandleFunc("/bonds/params", queryParamsRequestHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}", RestBondDid), queryBondHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/batch", RestBondDid), queryBatchHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/last_batch", RestBondDid), queryLastBatchHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/current_price", RestBondDid), queryCurrentPriceHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/current_reserve", RestBondDid), queryCurrentReserveHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/available_reserve", RestBondDid), queryAvailableReserveHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/price/{%s}", RestBondDid, RestBondAmount), queryCustomPriceHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/buy_price/{%s}", RestBondDid, RestBondAmount), queryBuyPriceHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/sell_return/{%s}", RestBondDid, RestBondAmount), querySellReturnHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/swap_return/{%s}/{%s}", RestBondDid, RestFromTokenWithAmount, RestToToken), querySwapReturnHandler(clientCtx)).Methods("GET")
-// r.HandleFunc(fmt.Sprintf("/bonds/{%s}/alpha_maximums", RestBondDid), queryAlphaMaximumsHandler(clientCtx)).Methods("GET")
-// }
-
-// func queryBondsHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s",
-// types.QuerierRoute, keeper.QueryBonds), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryBondsDetailedHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r)
-// if !ok {
-// return
-// }
-
-// res, height, err := cliCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s",
-// types.QuerierRoute, keeper.QueryBondsDetailed), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// cliCtx = cliCtx.WithHeight(height)
-
-// rest.PostProcessResponse(w, cliCtx, res)
-// }
-// }
-
-// func queryBondHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryBond, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryBatchHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryBatch, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryLastBatchHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryLastBatch, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryCurrentPriceHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryCurrentPrice, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryCurrentReserveHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryCurrentReserve, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryAvailableReserveHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryAvailableReserve, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryCustomPriceHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-// bondAmount := vars[RestBondAmount]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryCustomPrice, bondDid, bondAmount), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryBuyPriceHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-// bondAmount := vars[RestBondAmount]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryBuyPrice, bondDid, bondAmount), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func querySellReturnHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-// bondAmount := vars[RestBondAmount]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s/%s",
-// types.QuerierRoute, keeper.QuerySellReturn, bondDid, bondAmount), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func querySwapReturnHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-// fromTokenWithAmount := vars[RestFromTokenWithAmount]
-// toToken := vars[RestToToken]
-
-// reserveCoinWithAmount, err := sdk.ParseCoinNormalized(fromTokenWithAmount)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s/%s/%s/%s",
-// types.QuerierRoute, keeper.QuerySwapReturn, bondDid, reserveCoinWithAmount.Denom,
-// reserveCoinWithAmount.Amount.String(), toToken), nil)
-// if err != nil {
-// rest.WriteErrorResponse(w, http.StatusNotFound, err.Error())
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryAlphaMaximumsHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// vars := mux.Vars(r)
-// bondDid := vars[RestBondDid]
-
-// res, _, err := clientCtx.QueryWithData(
-// fmt.Sprintf("custom/%s/%s/%s",
-// types.QuerierRoute, keeper.QueryAlphaMaximums, bondDid), nil)
-// if rest.CheckNotFoundError(w, err) {
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
-
-// func queryParamsRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-
-// res, _, err := clientCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute,
-// keeper.QueryParams), nil)
-// if err != nil {
-// w.WriteHeader(http.StatusInternalServerError)
-// _, _ = w.Write([]byte(fmt.Sprintf("Couldn't get query iid %s", err.Error())))
-// return
-// }
-
-// rest.PostProcessResponse(w, clientCtx, res)
-// }
-// }
diff --git a/x/bonds/client/rest/rest.go b/x/bonds/client/rest/rest.go
deleted file mode 100644
index cc13502e5..000000000
--- a/x/bonds/client/rest/rest.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package rest
-
-// import (
-// "github.com/cosmos/cosmos-sdk/client"
-// "github.com/cosmos/cosmos-sdk/client/rest"
-// "github.com/gorilla/mux"
-// )
-
-// // REST variable names
-// //noinspection GoNameStartsWithPackageName
-// const (
-// RestBondDid = "bond_did"
-// RestBondAmount = "bond_amount"
-// RestFromTokenWithAmount = "from_token_with_amount"
-// RestToToken = "to_token"
-// )
-
-// func RegisterHandlers(cliCtx client.Context, rtr *mux.Router) {
-// r := rest.WithHTTPDeprecationHeaders(rtr)
-// registerQueryRoutes(cliCtx, r)
-// registerTxHandlers(cliCtx, r)
-// }
-// v
diff --git a/x/bonds/client/rest/tx.go b/x/bonds/client/rest/tx.go
deleted file mode 100644
index 9c38e5fff..000000000
--- a/x/bonds/client/rest/tx.go
+++ /dev/null
@@ -1,514 +0,0 @@
-package rest
-
-// import (
-// "net/http"
-// "strings"
-
-// "github.com/cosmos/cosmos-sdk/client"
-// "github.com/cosmos/cosmos-sdk/client/tx"
-// sdk "github.com/cosmos/cosmos-sdk/types"
-// sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
-// "github.com/cosmos/cosmos-sdk/types/rest"
-// "github.com/gorilla/mux"
-// bondsclient "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client"
-// "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
-// iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
-// )
-
-// func registerTxHandlers(clientCtx client.Context, r *mux.Router) {
-// r.HandleFunc("/bonds/create_bond", createBondRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/edit_bond", editBondRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/set_next_alpha", setNextAlphaRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/update_bond_state", updateBondStateRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/buy", buyRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/sell", sellRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/swap", swapRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/make_outcome_payment", makeOutcomePaymentRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/withdraw_share", withdrawShareRequestHandler(clientCtx)).Methods("POST")
-// r.HandleFunc("/bonds/withdraw_reserve", withdrawReserveRequestHandler(clientCtx)).Methods("POST")
-// }
-
-// type createBondReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// Token string `json:"token" yaml:"token"`
-// Name string `json:"name" yaml:"name"`
-// Description string `json:"description" yaml:"description"`
-// FunctionType string `json:"function_type" yaml:"function_type"`
-// FunctionParameters string `json:"function_parameters" yaml:"function_parameters"`
-// ReserveTokens string `json:"reserve_tokens" yaml:"reserve_tokens"`
-// TxFeePercentage string `json:"tx_fee_percentage" yaml:"tx_fee_percentage"`
-// ExitFeePercentage string `json:"exit_fee_percentage" yaml:"exit_fee_percentage"`
-// FeeAddress string `json:"fee_address" yaml:"fee_address"`
-// ReserveWithdrawalAddress string `json:"reserve_withdrawal_address" yaml:"reserve_withdrawal_address"`
-// MaxSupply string `json:"max_supply" yaml:"max_supply"`
-// OrderQuantityLimits string `json:"order_quantity_limits" yaml:"order_quantity_limits"`
-// SanityRate string `json:"sanity_rate" yaml:"sanity_rate"`
-// SanityMarginPercentage string `json:"sanity_margin_percentage" yaml:"sanity_margin_percentage"`
-// AllowSells string `json:"allow_sells" yaml:"allow_sells"`
-// AllowReserveWithdrawals string `json:"allow_reserve_withdrawals" yaml:"allow_reserve_withdrawals"`
-// AlphaBond string `json:"alpha_bond" yaml:"alpha_bond"`
-// BatchBlocks string `json:"batch_blocks" yaml:"batch_blocks"`
-// OutcomePayment string `json:"outcome_payment" yaml:"outcome_payment"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// CreatorDid string `json:"creator_did" yaml:"creator_did"`
-// ControllerDid string `json:"controller_did" yaml:"controller_did"`
-// OracleDid string `json:"oracle_did" yaml:"oracle_did"`
-// CreatorAddress string `json:"creator_address" yaml:"creator_address"`
-// }
-
-// func createBondRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req createBondReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// // Parse function parameters
-// functionParams, err := bondsclient.ParseFunctionParams(req.FunctionParameters)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse reserve tokens
-// reserveTokens := strings.Split(req.ReserveTokens, ",")
-
-// // Parse tx fee percentage
-// txFeePercentageDec, err := sdk.NewDecFromStr(req.TxFeePercentage)
-// if err != nil {
-// err = sdkerrors.Wrap(types.ErrArgumentMissingOrNonFloat, "tx fee percentage")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse exit fee percentage
-// exitFeePercentageDec, err := sdk.NewDecFromStr(req.ExitFeePercentage)
-// if err != nil {
-// err = sdkerrors.Wrap(types.ErrArgumentMissingOrNonFloat, "exit fee percentage")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse fee address
-// feeAddress, err := sdk.AccAddressFromBech32(req.FeeAddress)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse reserve withdrawal address
-// reserveWithdrawalAddress, err := sdk.AccAddressFromBech32(req.ReserveWithdrawalAddress)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse max supply
-// maxSupply, err := sdk.ParseCoinNormalized(req.MaxSupply)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse order quantity limits
-// orderQuantityLimits, err := sdk.ParseCoinsNormalized(req.OrderQuantityLimits)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse sanity rate
-// sanityRate, err := sdk.NewDecFromStr(req.SanityRate)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse sanity margin percentage
-// sanityMarginPercentage, err := sdk.NewDecFromStr(req.SanityMarginPercentage)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// // Parse allowSells
-// var allowSells bool
-// allowSellsStrLower := strings.ToLower(req.AllowSells)
-// if allowSellsStrLower == "true" {
-// allowSells = true
-// } else if allowSellsStrLower == "false" {
-// allowSells = false
-// } else {
-// err := sdkerrors.Wrap(types.ErrArgumentMissingOrNonBoolean, "allow_sells")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse allowReserveWithdrawals
-// var allowReserveWithdrawals bool
-// allowReserveWithdrawalsStrLower := strings.ToLower(req.AllowReserveWithdrawals)
-// if allowReserveWithdrawalsStrLower == "true" {
-// allowReserveWithdrawals = true
-// } else if allowReserveWithdrawalsStrLower == "false" {
-// allowReserveWithdrawals = false
-// } else {
-// err := sdkerrors.Wrap(types.ErrArgumentMissingOrNonBoolean, "allow_reserve_withdrawals")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse alphaBond
-// var alphaBond bool
-// alphaBondStrLower := strings.ToLower(req.AlphaBond)
-// if alphaBondStrLower == "true" {
-// alphaBond = true
-// } else if alphaBondStrLower == "false" {
-// alphaBond = false
-// } else {
-// err := sdkerrors.Wrap(types.ErrArgumentMissingOrNonBoolean, "alpha_bond")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse batch blocks
-// batchBlocks, err := sdk.ParseUint(req.BatchBlocks)
-// if err != nil {
-// err := sdkerrors.Wrap(types.ErrArgumentMissingOrNonUInteger, "max batch blocks")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// // Parse outcome payment
-// var outcomePayment sdk.Int
-// if len(req.OutcomePayment) == 0 {
-// outcomePayment = sdk.ZeroInt()
-// } else {
-// var ok bool
-// outcomePayment, ok = sdk.NewIntFromString(req.OutcomePayment)
-// if !ok {
-// err := sdkerrors.Wrap(types.ErrArgumentMustBeInteger, "outcome payment")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-// }
-
-// msg := types.NewMsgCreateBond(req.Token, req.Name, req.Description,
-// iidtypes.DIDFragment(req.CreatorDid), iidtypes.DIDFragment(req.ControllerDid), iidtypes.DIDFragment(req.OracleDid), req.FunctionType, functionParams,
-// reserveTokens, txFeePercentageDec, exitFeePercentageDec, feeAddress,
-// reserveWithdrawalAddress, maxSupply, orderQuantityLimits, sanityRate,
-// sanityMarginPercentage, allowSells, allowReserveWithdrawals, alphaBond,
-// batchBlocks, outcomePayment, req.BondDid, req.CreatorAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type editBondReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// Name string `json:"name" yaml:"name"`
-// Description string `json:"description" yaml:"description"`
-// OrderQuantityLimits string `json:"order_quantity_limits" yaml:"order_quantity_limits"`
-// SanityRate string `json:"sanity_rate" yaml:"sanity_rate"`
-// SanityMarginPercentage string `json:"sanity_margin_percentage" yaml:"sanity_margin_percentage"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// EditorDid string `json:"editor_did" yaml:"editor_did"`
-// EditorAddress string `json:"editor_address" yaml:"editor_address"`
-// }
-
-// func editBondRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req editBondReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// msg := types.NewMsgEditBond(req.Name, req.Description,
-// req.OrderQuantityLimits, req.SanityRate,
-// req.SanityMarginPercentage, iidtypes.DIDFragment(req.EditorDid), req.BondDid, req.EditorAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type setNextAlphaReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// NewAlpha string `json:"new_alpha" yaml:"new_alpha"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// EditorDid string `json:"editor_did" yaml:"editor_did"`
-// EditorAddress string `json:"editor_address" yaml:"editor_address"`
-// }
-
-// func setNextAlphaRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req setNextAlphaReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// // Parse new alpha
-// newAlpha, err := sdk.NewDecFromStr(req.NewAlpha)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// msg := types.NewMsgSetNextAlpha(newAlpha, iidtypes.DIDFragment(req.EditorDid), req.BondDid, req.EditorAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type updateBondStateReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// NewState string `json:"new_state" yaml:"new_state"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// EditorDid string `json:"editor_did" yaml:"editor_did"`
-// EditorAddress string `json:"editor_address" yaml:"editor_address"`
-// }
-
-// func updateBondStateRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req updateBondStateReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-// msg := types.NewMsgUpdateBondState(types.BondState(req.NewState), iidtypes.DIDFragment(req.EditorDid), req.BondDid, req.EditorAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type buyReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// BondToken string `json:"bond_token" yaml:"bond_token"`
-// BondAmount string `json:"bond_amount" yaml:"bond_amount"`
-// MaxPrices string `json:"max_prices" yaml:"max_prices"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// BuyerDid string `json:"buyer_did" yaml:"buyer_did"`
-// BuyerAddress string `json:"buyer_address" yaml:"buyer_address"`
-// }
-
-// func buyRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req buyReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// bondCoin, err := bondsclient.ParseTwoPartCoin(req.BondAmount, req.BondToken)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// maxPrices, err := sdk.ParseCoinsNormalized(req.MaxPrices)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// msg := types.NewMsgBuy(iidtypes.DIDFragment(req.BuyerDid), bondCoin, maxPrices, req.BondDid, req.BuyerAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type sellReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// BondToken string `json:"bond_token" yaml:"bond_token"`
-// BondAmount string `json:"bond_amount" yaml:"bond_amount"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// SellerDid string `json:"seller_did" yaml:"seller_did"`
-// SellerAddress string `json:"seller_address" yaml:"seller_address"`
-// }
-
-// func sellRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req sellReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// bondCoin, err := bondsclient.ParseTwoPartCoin(req.BondAmount, req.BondToken)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// msg := types.NewMsgSell(iidtypes.DIDFragment(req.SellerDid), bondCoin, req.BondDid, req.SellerAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type swapReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// FromAmount string `json:"from_amount" yaml:"from_amount"`
-// FromToken string `json:"from_token" yaml:"from_token"`
-// ToToken string `json:"to_token" yaml:"to_token"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// SwapperDid string `json:"swapper_did" yaml:"swapper_did"`
-// SwapperAddress string `json:"swapper_address" yaml:"swapper_address"`
-// }
-
-// func swapRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req swapReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// // Check that from amount and token can be parsed to a coin
-// fromCoin, err := bondsclient.ParseTwoPartCoin(req.FromAmount, req.FromToken)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// msg := types.NewMsgSwap(iidtypes.DIDFragment(req.SwapperDid), fromCoin, req.ToToken, req.BondDid, req.SwapperAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type makeOutcomePaymentReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// Amount string `json:"amount" yaml:"amount"`
-// SenderDid string `json:"sender_did" yaml:"sender_did"`
-// SenderAddress string `json:"sender_address" yaml:"sender_address"`
-// }
-
-// func makeOutcomePaymentRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req makeOutcomePaymentReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// amount, ok := sdk.NewIntFromString(req.Amount)
-// if !ok {
-// err := sdkerrors.Wrap(types.ErrArgumentMustBeInteger, "amount")
-// rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
-// return
-// }
-
-// msg := types.NewMsgMakeOutcomePayment(iidtypes.DIDFragment(req.SenderDid), amount, req.BondDid, req.SenderAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type withdrawShareReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// RecipientDid string `json:"recipient_did" yaml:"recipient_did"`
-// RecipientAddress string `json:"recipient_address" yaml:"recipient_address"`
-// }
-
-// func withdrawShareRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req withdrawShareReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// msg := types.NewMsgWithdrawShare(iidtypes.DIDFragment(req.RecipientDid), req.BondDid, req.RecipientAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
-
-// type withdrawReserveReq struct {
-// BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
-// BondDid string `json:"bond_did" yaml:"bond_did"`
-// Amount string `json:"amount" yaml:"amount"`
-// WithdrawerDid string `json:"withdrawer_did" yaml:"withdrawer_did"`
-// WithdrawerAddress string `json:"withdrawer_address" yaml:"withdrawer_address"`
-// }
-
-// func withdrawReserveRequestHandler(clientCtx client.Context) http.HandlerFunc {
-// return func(w http.ResponseWriter, r *http.Request) {
-// var req withdrawReserveReq
-// if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) {
-// return
-// }
-
-// baseReq := req.BaseReq.Sanitize()
-// if !baseReq.ValidateBasic(w) {
-// return
-// }
-
-// amount, err := sdk.ParseCoinsNormalized(req.Amount)
-// if rest.CheckBadRequestError(w, err) {
-// return
-// }
-
-// msg := types.NewMsgWithdrawReserve(iidtypes.DIDFragment(req.WithdrawerDid), amount, req.BondDid, req.WithdrawerAddress)
-// if rest.CheckBadRequestError(w, msg.ValidateBasic()) {
-// return
-// }
-
-// tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg)
-// }
-// }
diff --git a/x/bonds/genesis.go b/x/bonds/genesis.go
index fc070ab5c..e3fd56908 100644
--- a/x/bonds/genesis.go
+++ b/x/bonds/genesis.go
@@ -2,8 +2,8 @@ package bonds
import (
sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/keeper"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/keeper"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
)
func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) {
diff --git a/x/bonds/handler.go b/x/bonds/handler.go
index 710e51ca1..75d1cbd54 100644
--- a/x/bonds/handler.go
+++ b/x/bonds/handler.go
@@ -3,8 +3,8 @@ package bonds
import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/keeper"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/keeper"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
abci "github.com/tendermint/tendermint/abci/types"
)
diff --git a/x/bonds/keeper/batch.go b/x/bonds/keeper/batch.go
index 80f1360eb..8f32d60f3 100644
--- a/x/bonds/keeper/batch.go
+++ b/x/bonds/keeper/batch.go
@@ -5,8 +5,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- iidtypes "github.com/ixofoundation/ixo-blockchain/v2/x/iid/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
)
func (k Keeper) MustGetBatch(ctx sdk.Context, bondDid string) types.Batch {
diff --git a/x/bonds/keeper/bonds.go b/x/bonds/keeper/bonds.go
index 1c93d4f0a..644532af6 100644
--- a/x/bonds/keeper/bonds.go
+++ b/x/bonds/keeper/bonds.go
@@ -4,7 +4,7 @@ import (
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
"github.com/tendermint/go-amino"
)
diff --git a/x/bonds/keeper/grpc_query.go b/x/bonds/keeper/grpc_query.go
index cf2ca483e..2ae9bd6a6 100644
--- a/x/bonds/keeper/grpc_query.go
+++ b/x/bonds/keeper/grpc_query.go
@@ -5,8 +5,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/client"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/x/bonds/keeper/invariants.go b/x/bonds/keeper/invariants.go
index f59c179ba..0a1b5629c 100644
--- a/x/bonds/keeper/invariants.go
+++ b/x/bonds/keeper/invariants.go
@@ -6,7 +6,7 @@ import (
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
)
// RegisterInvariants registers all supply invariants
diff --git a/x/bonds/keeper/keeper.go b/x/bonds/keeper/keeper.go
index 601801baf..da27de356 100644
--- a/x/bonds/keeper/keeper.go
+++ b/x/bonds/keeper/keeper.go
@@ -9,8 +9,8 @@ import (
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
- iidkeeper "github.com/ixofoundation/ixo-blockchain/v2/x/iid/keeper"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
+ iidkeeper "github.com/ixofoundation/ixo-blockchain/v3/x/iid/keeper"
"github.com/tendermint/tendermint/libs/log"
)
diff --git a/x/bonds/keeper/msg_server.go b/x/bonds/keeper/msg_server.go
index 1ad15d712..e61f9275d 100644
--- a/x/bonds/keeper/msg_server.go
+++ b/x/bonds/keeper/msg_server.go
@@ -9,7 +9,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
)
type msgServer struct {
diff --git a/x/bonds/keeper/querier.go b/x/bonds/keeper/querier.go
deleted file mode 100644
index ecd2b7d7f..000000000
--- a/x/bonds/keeper/querier.go
+++ /dev/null
@@ -1,452 +0,0 @@
-package keeper
-
-// import (
-// "github.com/cosmos/cosmos-sdk/codec"
-// sdk "github.com/cosmos/cosmos-sdk/types"
-// sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
-// "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client"
-// "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
-// abci "github.com/tendermint/tendermint/abci/types"
-// )
-
-// const (
-// QueryBonds = "bonds"
-// QueryBondsDetailed = "bonds_detailed"
-// QueryBond = "bond"
-// QueryBatch = "batch"
-// QueryLastBatch = "last_batch"
-// QueryCurrentPrice = "current_price"
-// QueryCurrentReserve = "current_reserve"
-// QueryAvailableReserve = "available_reserve"
-// QueryCustomPrice = "custom_price"
-// QueryBuyPrice = "buy_price"
-// QuerySellReturn = "sell_return"
-// QuerySwapReturn = "swap_return"
-// QueryAlphaMaximums = "alpha_maximums"
-// QueryParams = "params"
-// QueryBondAccountDetails = "bond_account_details"
-// )
-
-// // NewQuerier is the module level router for state queries
-// func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
-// return func(ctx sdk.Context, path []string, req abci.RequestQuery) (res []byte, err error) {
-// switch path[0] {
-// case QueryBonds:
-// return queryBonds(ctx, keeper, legacyQuerierCdc)
-// case QueryBondsDetailed:
-// return queryBondsDetailed(ctx, keeper, legacyQuerierCdc)
-// case QueryBond:
-// return queryBond(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryBatch:
-// return queryBatch(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryLastBatch:
-// return queryLastBatch(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryCurrentPrice:
-// return queryCurrentPrice(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryCurrentReserve:
-// return queryCurrentReserve(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryAvailableReserve:
-// return queryAvailableReserve(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryCustomPrice:
-// return queryCustomPrice(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryBuyPrice:
-// return queryBuyPrice(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QuerySellReturn:
-// return querySellReturn(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QuerySwapReturn:
-// return querySwapReturn(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryAlphaMaximums:
-// return queryAlphaMaximums(ctx, path[1:], keeper, legacyQuerierCdc)
-// case QueryParams:
-// return queryParams(ctx, keeper, legacyQuerierCdc)
-// // case QueryBondAccountDetails:
-// // return queryBondAccountDetails(ctx, path[1:], keeper, legacyQuerierCdc)
-// default:
-// return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown bonds query endpoint")
-// }
-// }
-// }
-
-// func queryBonds(ctx sdk.Context, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// var bondsList []string
-// iterator := keeper.GetBondIterator(ctx)
-// defer iterator.Close()
-// for ; iterator.Valid(); iterator.Next() {
-// var bond types.Bond
-// keeper.cdc.MustUnmarshal(iterator.Value(), &bond)
-// bondsList = append(bondsList, bond.BondDid)
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, bondsList)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// // return nil, err
-// }
-
-// return bz, nil
-// }
-
-// func queryBondsDetailed(ctx sdk.Context, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// var bondsList []*types.BondDetails
-// iterator := keeper.GetBondIterator(ctx)
-// defer iterator.Close()
-// for ; iterator.Valid(); iterator.Next() {
-// var bond types.Bond
-// keeper.cdc.MustUnmarshal(iterator.Value(), &bond)
-// if bond.State == types.HatchState.String() || bond.State == types.OpenState.String() {
-// reserveBalances := keeper.GetReserveBalances(ctx, bond.BondDid)
-// reservePrices, _ := bond.GetCurrentPricesPT(reserveBalances)
-// reservePrices = zeroReserveTokensIfEmptyDec(reservePrices, bond)
-
-// bondsList = append(bondsList, &types.BondDetails{
-// BondDid: bond.BondDid,
-// SpotPrice: reservePrices,
-// Supply: bond.CurrentSupply,
-// Reserve: reserveBalances,
-// })
-// }
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, bondsList)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryBond(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, bond)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryBatch(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// if !keeper.BatchExists(ctx, bondDid) {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "batch for '%s' does not exist", bondDid)
-// }
-
-// batch := keeper.MustGetBatch(ctx, bondDid)
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, batch)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryLastBatch(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// if !keeper.LastBatchExists(ctx, bondDid) {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "last batch for '%s' does not exist", bondDid)
-// }
-
-// batch := keeper.MustGetLastBatch(ctx, bondDid)
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, batch)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryCurrentPrice(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// reserveBalances := keeper.GetReserveBalances(ctx, bondDid)
-// reservePrices, err := bond.GetCurrentPricesPT(reserveBalances)
-// if err != nil {
-// return nil, err
-// }
-// reservePrices = zeroReserveTokensIfEmptyDec(reservePrices, bond)
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, reservePrices)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryCurrentReserve(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// reserveBalances := zeroReserveTokensIfEmpty(bond.CurrentReserve, bond)
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, reserveBalances)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryAvailableReserve(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// availableReserve := zeroReserveTokensIfEmpty(bond.AvailableReserve, bond)
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, availableReserve)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryCustomPrice(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-// bondAmount := path[1]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// bondCoin, err := client.ParseTwoPartCoin(bondAmount, bond.Token)
-// if err != nil {
-// return nil, err
-// }
-
-// reservePrices, err := bond.GetPricesAtSupply(bondCoin.Amount)
-// if err != nil {
-// return nil, err
-// }
-// reservePrices = zeroReserveTokensIfEmptyDec(reservePrices, bond)
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, reservePrices)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryBuyPrice(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-// bondAmount := path[1]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// bondCoin, err := client.ParseTwoPartCoin(bondAmount, bond.Token)
-// if err != nil {
-// return nil, err
-
-// }
-
-// // Max supply cannot be less than supply (max supply >= supply)
-// adjustedSupply := keeper.GetSupplyAdjustedForBuy(ctx, bondDid)
-// if bond.MaxSupply.IsLT(adjustedSupply.Add(bondCoin)) {
-// return nil, types.ErrCannotMintMoreThanMaxSupply
-// }
-
-// reserveBalances := keeper.GetReserveBalances(ctx, bondDid)
-// reservePrices, err := bond.GetPricesToMint(bondCoin.Amount, reserveBalances)
-// if err != nil {
-// return nil, err
-// }
-// reservePricesRounded := types.RoundReservePrices(reservePrices)
-// txFee := bond.GetTxFees(reservePrices)
-
-// var result = types.QueryBuyPriceResponse{
-// AdjustedSupply: adjustedSupply,
-// Prices: zeroReserveTokensIfEmpty(reservePricesRounded, bond),
-// TxFees: zeroReserveTokensIfEmpty(txFee, bond),
-// TotalPrices: zeroReserveTokensIfEmpty(reservePricesRounded.Add(txFee...), bond),
-// TotalFees: zeroReserveTokensIfEmpty(txFee, bond),
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, result)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func querySellReturn(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-// bondAmount := path[1]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "bond '%s' does not exist", bondDid)
-// }
-
-// bondCoin, err := client.ParseTwoPartCoin(bondAmount, bond.Token)
-// if err != nil {
-// return nil, err
-// }
-
-// if !bond.AllowSells {
-// return nil, types.ErrBondDoesNotAllowSelling
-// }
-
-// // Cannot burn more tokens than what exists
-// adjustedSupply := keeper.GetSupplyAdjustedForSell(ctx, bondDid)
-// if adjustedSupply.IsLT(bondCoin) {
-// return nil, types.ErrCannotBurnMoreThanSupply
-// }
-
-// reserveBalances := keeper.GetReserveBalances(ctx, bondDid)
-// reserveReturns, err := bond.GetReturnsForBurn(bondCoin.Amount, reserveBalances)
-// if err != nil {
-// return nil, err
-// }
-// reserveReturnsRounded := types.RoundReserveReturns(reserveReturns)
-
-// txFees := bond.GetTxFees(reserveReturns)
-// exitFees := bond.GetExitFees(reserveReturns)
-// totalFees := types.AdjustFees(txFees.Add(exitFees...), reserveReturnsRounded)
-
-// var result = types.QuerySellReturnResponse{
-// AdjustedSupply: adjustedSupply,
-// Returns: zeroReserveTokensIfEmpty(reserveReturnsRounded, bond),
-// TxFees: zeroReserveTokensIfEmpty(txFees, bond),
-// ExitFees: zeroReserveTokensIfEmpty(exitFees, bond),
-// TotalReturns: zeroReserveTokensIfEmpty(reserveReturnsRounded.Sub(totalFees), bond),
-// TotalFees: zeroReserveTokensIfEmpty(totalFees, bond),
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, result)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func querySwapReturn(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-// fromToken := path[1]
-// fromAmount := path[2]
-// toToken := path[3]
-
-// fromCoin, err := client.ParseTwoPartCoin(fromAmount, fromToken)
-// if err != nil {
-// return nil, err
-// }
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(types.ErrBondDoesNotExist, bondDid)
-// }
-
-// reserveBalances := keeper.GetReserveBalances(ctx, bondDid)
-// reserveReturns, txFee, err := bond.GetReturnsForSwap(fromCoin, toToken, reserveBalances)
-// if err != nil {
-// return nil, err
-// }
-
-// if reserveReturns.Empty() {
-// reserveReturns = sdk.Coins{sdk.Coin{Denom: toToken, Amount: sdk.ZeroInt()}}
-// }
-
-// var result = types.QuerySwapReturnResponse{
-// TotalFees: sdk.Coins{txFee},
-// TotalReturns: reserveReturns,
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, result)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// func queryAlphaMaximums(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// bondDid := path[0]
-
-// bond, found := keeper.GetBond(ctx, bondDid)
-// if !found {
-// return nil, sdkerrors.Wrapf(types.ErrBondDoesNotExist, bondDid)
-// }
-
-// if bond.FunctionType != types.AugmentedFunction {
-// return nil, sdkerrors.Wrapf(types.ErrFunctionNotAvailableForFunctionType, bond.FunctionType)
-// } else if !bond.AlphaBond {
-// return nil, sdkerrors.Wrap(types.ErrFunctionNotAvailableForFunctionType, "bond is not an alpha bond")
-// }
-
-// var maxSystemAlphaIncrease, maxSystemAlpha sdk.Dec
-// if len(bond.CurrentReserve) == 0 {
-// maxSystemAlphaIncrease = sdk.ZeroDec()
-// maxSystemAlpha = sdk.ZeroDec()
-// } else {
-// R := bond.CurrentReserve[0].Amount // common reserve balance
-// C := bond.OutcomePayment
-// maxSystemAlphaIncrease = sdk.NewDecFromInt(R).QuoInt(C)
-
-// paramsMap := bond.FunctionParameters.AsMap()
-// I := paramsMap["I0"]
-// maxSystemAlpha = I.QuoInt(C)
-// }
-
-// var result = types.QueryAlphaMaximumsResponse{
-// MaxSystemAlphaIncrease: maxSystemAlphaIncrease,
-// MaxSystemAlpha: maxSystemAlpha,
-// }
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, result)
-// if err != nil {
-// panic("could not marshal result to JSON")
-// }
-
-// return bz, nil
-// }
-
-// // func queryBondAccountDetails(ctx sdk.Context, path []string, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) (res []byte, err error) {
-// // bondDid := path[0]
-
-// // bond, found := keeper.GetBond(ctx, bondDid)
-// // if !found {
-// // return nil, sdkerrors.Wrapf(types.ErrBondDoesNotExist, bondDid)
-// // }
-
-// // keeper.Get
-
-// // return bz, nil
-// // }
-
-// func queryParams(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) {
-// params := k.GetParams(ctx)
-
-// bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, params)
-// if err != nil {
-// return nil, sdkerrors.Wrapf(sdkerrors.ErrJSONMarshal, "failed to marshal iid %s", err)
-// }
-
-// return bz, nil
-// }
diff --git a/x/bonds/module.go b/x/bonds/module.go
index ae798e863..d1da26c7d 100644
--- a/x/bonds/module.go
+++ b/x/bonds/module.go
@@ -13,11 +13,11 @@ import (
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client/cli"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/client/cli"
- // "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/client/rest"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/keeper"
- "github.com/ixofoundation/ixo-blockchain/v2/x/bonds/types"
+ // "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/client/rest"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/keeper"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/bonds/types"
"github.com/spf13/cobra"
abci "github.com/tendermint/tendermint/abci/types"
)
diff --git a/x/bonds/spec/01_concepts.md b/x/bonds/spec/01_concepts.md
index 80a7e4e0b..34971084f 100644
--- a/x/bonds/spec/01_concepts.md
+++ b/x/bonds/spec/01_concepts.md
@@ -6,21 +6,22 @@ Bonding curves are continuous liquidity mechanisms which are used in market desi
Token Bonding Curves are therefore an important crypto-economic mechanism for building a wide range of capabilities directly into decentralised applications. They can function simultaneously as means of decentralised capital formation, liquidity provision and autonomous market maker.
Bonding curves are powerful tools because the tokens they issue can represent rights - including
-* rights of access
-* rights of use
-* rights of ownership, and
-* voting rights.
-In the case of continuous organizations, tokens issued through bonding curves embody rights to the future revenues of a startup.
-In the augmented bonding curve, tokens can embody the rights to govern how funds are spent by a not-for-profit organization.
+- rights of access
+- rights of use
+- rights of ownership, and
+- voting rights.
+
+In the case of continuous organizations, tokens issued through bonding curves embody rights to the future revenues of a startup.
+In the augmented bonding curve, tokens can embody the rights to govern how funds are spent by a not-for-profit organization.
In an Alpha-Bond, tokens can give holders the rights to future outcomes payments and performance incentive bonuses.
## Token Bonds Module
-The Token Bonds Cosmos SDK Module enables applications that use token bonding curves to be created on-the-fly.
+The Token Bonds Cosmos SDK Module enables applications that use token bonding curves to be created on-the-fly.
Each new Token B instance declares a new token denomination in the application, with a set of parameters.
The module stores the current state of all tokens that have been created using this module.
-Changes in state occur through transactions that are instructed by valid *buy, sell, and swap* messages.
+Changes in state occur through transactions that are instructed by valid _buy, sell, and swap_ messages.
**Buy** instructions cause bond tokens to be minted during a state transition. This increases the total supply balance of tokens.
**Sell** instructions burn bond tokens during a state transition that decreases the total supply balance of tokens.
@@ -30,10 +31,10 @@ Bond Tokens trade against pairings in their Bond Reserve.
The bonding curve forms an interface between the reserve token quantity and the bond token price (in the Reserve currency).
-Bonding curves are defined by their mathematical properties. This is determined by the type of curve function and by the function parameters that are set. Generally these parameters are chosen to best-fit empiricially-observed market dynamics of supply and demand.
-External parameters, such as market supply and demand, are complex and typically hard to predict.
+Bonding curves are defined by their mathematical properties. This is determined by the type of curve function and by the function parameters that are set. Generally these parameters are chosen to best-fit empiricially-observed market dynamics of supply and demand.
+External parameters, such as market supply and demand, are complex and typically hard to predict.
-*****
+---
Pricing is defined by the function type and function parameters, which can define either the pricing function of the bond as a function of the supply, or simply indicate that the bond is a token swapper, where pricing is instead defined by the first buyer and any swaps performed thereafter.
@@ -41,36 +42,38 @@ A bond may also specify non-zero fees, which are calculated based on the size of
```go
type Bond struct {
- Token string
- Name string
- Description string
- CreatorDid string
- ControllerDid string
- FunctionType string
- FunctionParameters FunctionParams
- ReserveTokens []string
- TxFeePercentage sdk.Dec
- ExitFeePercentage sdk.Dec
+ Token string
+ Name string
+ Description string
+ CreatorDid string
+ ControllerDid string
+ FunctionType string
+ FunctionParameters FunctionParams
+ ReserveTokens []string
+ TxFeePercentage sdk.Dec
+ ExitFeePercentage sdk.Dec
FeeAddress string
ReserveWithdrawalAddress string
- MaxSupply sdk.Coin
- OrderQuantityLimits sdk.Coins
- SanityRate sdk.Dec
- SanityMarginPercentage sdk.Dec
- CurrentSupply sdk.Coin
+ MaxSupply sdk.Coin
+ OrderQuantityLimits sdk.Coins
+ SanityRate sdk.Dec
+ SanityMarginPercentage sdk.Dec
+ CurrentSupply sdk.Coin
CurrentReserve sdk.Coins
AvailableReserve sdk.Coins
- CurrentOutcomePaymentReserve sdk.Coins
+ CurrentOutcomePaymentReserve sdk.Coins
AllowSells bool
AllowReserveWithdrawals bool
- AlphaBond bool
- BatchBlocks sdk.Uint
- OutcomePayment sdk.Int
- State string
- BondDid string
+ AlphaBond bool
+ BatchBlocks sdk.Uint
+ OutcomePayment sdk.Int
+ State string
+ BondDid string
}
```
+
The following is a list of all possible bond states:
+
- `"HATCH"`
- `"OPEN"`
- `"SETTLED"`
@@ -78,10 +81,12 @@ The following is a list of all possible bond states:
By default, a newly created bond will be in state OPEN, unless the bond is an augmented bonding curve, in which case the initial state is HATCH.
The following are the valid transitions between bond states.
+
- HATCH -> OPEN or FAILED
- OPEN -> SETTLE or FAILED
+
No valid transitions exist from the SETTLE and FAILED states.
## Batching
diff --git a/x/bonds/spec/02_state.md b/x/bonds/spec/02_state.md
index 33b5e8910..6c7db06b6 100644
--- a/x/bonds/spec/02_state.md
+++ b/x/bonds/spec/02_state.md
@@ -9,8 +9,8 @@ The instance of a bond is stored with its bond-specific parameters. This record
## Batches
As a protection against front-runnning orders, a batching mechanism creates a cache of orders and combines these into a single transaction when the batch conditions have been met.
-The state of 2 consecutive batches is held for both the current and last (previous) batch.
-This enables querying the final state of a batch before the orders were fulfilled, after the transaction has completed.
+The state of 2 consecutive batches is held for both the current and last (previous) batch.
+This enables querying the final state of a batch before the orders were fulfilled, after the transaction has completed.
The temporary state of a batch in the current block is not observable. This batch is cleared as soon as the batch transaction has completed.
### Querying Batches
diff --git a/x/bonds/spec/03_messages.md b/x/bonds/spec/03_messages.md
index 1a30cbcc0..3416e4819 100644
--- a/x/bonds/spec/03_messages.md
+++ b/x/bonds/spec/03_messages.md
@@ -6,30 +6,30 @@ In this section we describe the processing of the bonds messages and the corresp
Bonds can be created by any address using `MsgCreateBond`.
-| **Field** | **Type** | **Description** |
-|:-------------------------|:-----------------|:----------------|
-| BondDid | `did.Did` | DID of the bond (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Token | `string` | The denomination of the bond's tokens (e.g. `abc`, `mytoken1`)
-| Name | `string` | A friendly name as a title for the bond (e.g. `A B C`, `My Token`)
-| Description | `string` | A description of what the bond represents or its purpose
-| FunctionType | `string` | The type of function that will define the bonding curve (`power_function`, `sigmoid_function`, or `swapper_function`)
-| FunctionParameters | `FunctionParams` | The parameters of the function defining the bonding curve (e.g. `m:12,n:2,c:100`)
-| CreatorDid | `did.Did` | DID of the bond creator (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| ControllerDid | `did.Did` | DID of the bond controller (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| ReserveTokens | `[]string` | The token denominations that will be used as reserve (e.g. `res,rez`)
-| TxFeePercentage | `sdk.Dec` | The percentage fee charged for buys/sells/swaps (e.g. `0.3`)
-| ExitFeePercentage | `sdk.Dec` | The percentage fee charged for sells on top of the tx fee (e.g. `0.2`)
-| FeeAddress | `sdk.AccAddress` | The address of the account that will store charged fees
-| ReserveWithdrawalAddress | `sdk.AccAddress` | The address of the account that will receive any reserve withdrawn by the controller
-| MaxSupply | `sdk.Coin` | The maximum number of bond tokens that can be minted
-| OrderQuantityLimits | `sdk.Coins` | The maximum number of tokens that one can buy/sell/swap in a single order (e.g. `100abc,200res,300rez`)
-| SanityRate | `sdk.Dec` | For a swapper, restricts conversion rate (`r1/r2`) to `sanity rate ยฑ sanity margin percentage`. `0` for no sanity checks.
-| SanityMarginPercentage | `sdk.Dec` | Used as described above. `0` for no sanity checks
-| AllowSells | `bool` | Whether or not selling is allowed (cannot be True if AllowReserveWithdrawals is True)
-| AllowReserveWithdrawals | `bool` | Whether or not reserve withdrawals are allowed (cannot be True if AllowSells is True)
-| AlphaBond | `bool` | Whether or not bond is an alpha bond
-| BatchBlocks | `sdk.Uint` | The lifespan of each orders batch in blocks
-| OutcomePayment | `sdk.Int` | The approximate total payment required to be made in order to transition a bond from OPEN to SETTLE
+| **Field** | **Type** | **Description** |
+| :----------------------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------ |
+| BondDid | `did.Did` | DID of the bond (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Token | `string` | The denomination of the bond's tokens (e.g. `abc`, `mytoken1`) |
+| Name | `string` | A friendly name as a title for the bond (e.g. `A B C`, `My Token`) |
+| Description | `string` | A description of what the bond represents or its purpose |
+| FunctionType | `string` | The type of function that will define the bonding curve (`power_function`, `sigmoid_function`, or `swapper_function`) |
+| FunctionParameters | `FunctionParams` | The parameters of the function defining the bonding curve (e.g. `m:12,n:2,c:100`) |
+| CreatorDid | `did.Did` | DID of the bond creator (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| ControllerDid | `did.Did` | DID of the bond controller (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| ReserveTokens | `[]string` | The token denominations that will be used as reserve (e.g. `res,rez`) |
+| TxFeePercentage | `sdk.Dec` | The percentage fee charged for buys/sells/swaps (e.g. `0.3`) |
+| ExitFeePercentage | `sdk.Dec` | The percentage fee charged for sells on top of the tx fee (e.g. `0.2`) |
+| FeeAddress | `sdk.AccAddress` | The address of the account that will store charged fees |
+| ReserveWithdrawalAddress | `sdk.AccAddress` | The address of the account that will receive any reserve withdrawn by the controller |
+| MaxSupply | `sdk.Coin` | The maximum number of bond tokens that can be minted |
+| OrderQuantityLimits | `sdk.Coins` | The maximum number of tokens that one can buy/sell/swap in a single order (e.g. `100abc,200res,300rez`) |
+| SanityRate | `sdk.Dec` | For a swapper, restricts conversion rate (`r1/r2`) to `sanity rate ยฑ sanity margin percentage`. `0` for no sanity checks. |
+| SanityMarginPercentage | `sdk.Dec` | Used as described above. `0` for no sanity checks |
+| AllowSells | `bool` | Whether or not selling is allowed (cannot be True if AllowReserveWithdrawals is True) |
+| AllowReserveWithdrawals | `bool` | Whether or not reserve withdrawals are allowed (cannot be True if AllowSells is True) |
+| AlphaBond | `bool` | Whether or not bond is an alpha bond |
+| BatchBlocks | `sdk.Uint` | The lifespan of each orders batch in blocks |
+| OutcomePayment | `sdk.Int` | The approximate total payment required to be made in order to transition a bond from OPEN to SETTLE |
```go
type MsgCreateBond struct {
@@ -59,6 +59,7 @@ type MsgCreateBond struct {
```
This message is expected to fail if:
+
- another bond with this bond DID is already registered
- another bond with this token is already registered, the token is the staking token, or the token is not a valid denomination
- name or description is an empty string
@@ -101,17 +102,18 @@ This message creates and stores the `Bond` object at appropriate indexes. Note t
The owner of a bond can edit some of the bond's parameters using `MsgEditBond`.
-| **Field** | **Type** | **Description** |
-|:-----------------------|:----------|:----------------|
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Name | `string` | Refer to MsgCreateBond
-| Description | `string` | Refer to MsgCreateBond
-| OrderQuantityLimits | `string` | Refer to MsgCreateBond
-| SanityRate | `string` | Refer to MsgCreateBond
-| SanityMarginPercentage | `string` | Refer to MsgCreateBond
-| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :--------------------- | :-------- | :------------------------------------------------------------------------------ |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Name | `string` | Refer to MsgCreateBond |
+| Description | `string` | Refer to MsgCreateBond |
+| OrderQuantityLimits | `string` | Refer to MsgCreateBond |
+| SanityRate | `string` | Refer to MsgCreateBond |
+| SanityMarginPercentage | `string` | Refer to MsgCreateBond |
+| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist
- any editable field violates the restrictions set for the same field in `MsgCreateBond`
- all editable fields are `"[do-not-modify]"`
@@ -136,13 +138,14 @@ This message stores the updated `Bond` object.
The controller of a bond can set the next public alpha value for Augmented Bonding Curve type bonds using `MsgSetNextAlpha`.
-| **Field** | **Type** | **Description** |
-|:----------|:----------|:----------------|
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Alpha | `sdk.Dec` | Public alpha value to be set (e.g. `0.5`)
-| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :-------- | :-------- | :------------------------------------------------------------------------------ |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Alpha | `sdk.Dec` | Public alpha value to be set (e.g. `0.5`) |
+| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist
- public alpha value falls outside of 0.0001 <= alpha <= 0.9999
- public alpha value violates any of the below rules
@@ -168,13 +171,14 @@ This message stores the next alpha value in the current `Batch` object, where it
The controller of a bond can change a bond's state to SETTLE or FAILED using `MsgUpdateBondState`.
-| **Field** | **Type** | **Description** |
-|:----------|:------------|:----------------|
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| State | `BondState` | Bond state to be set (e.g. `SETTLE`)
-| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :-------- | :---------- | :------------------------------------------------------------------------------ |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| State | `BondState` | Bond state to be set (e.g. `SETTLE`) |
+| EditorDid | `did.Did` | DID of the bond editor (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist
- state is not SETTLE or FAILED
- state is not a valid transition from the current bond state
@@ -199,14 +203,15 @@ A buy order is cancelled if the max prices are exceeded at any point during the
In the case of `augmented_function` bonds, if the bond state is `HATCH`, a fixed price-per-token `p0` is used. This value (`p0`) is one of the function parameters required for this function type.
-| **Field** | **Type** | **Description** |
-|:----------|:------------|:----------------|
-| BuyerDid | `did.Did` | DID of the buyer (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Amount | `sdk.Coin` | The amount of bond tokens to be bought
-| MaxPrices | `sdk.Coins` | The max price to pay in reserve tokens
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :-------- | :---------- | :------------------------------------------------------------------------------ |
+| BuyerDid | `did.Did` | DID of the buyer (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Amount | `sdk.Coin` | The amount of bond tokens to be bought |
+| MaxPrices | `sdk.Coins` | The max price to pay in reserve tokens |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist or bond state is not HATCH or OPEN
- amount is not an amount of an existing bond
- max prices is greater than the balance of the buyer
@@ -217,7 +222,7 @@ This message is expected to fail if:
- amount violates an order quantity limit defined by the bond
- bond DID or buyer DID is not a valid DID
-The batch-adjusted current supply in the case of buys is the current supply of the bond plus any uncancelled buy amounts in the current batch.
+The batch-adjusted current supply in the case of buys is the current supply of the bond plus any uncancelled buy amounts in the current batch.
```go
type MsgBuy struct {
@@ -246,13 +251,14 @@ Once the sell order is fulfilled, the number of tokens to be sold are burned on
In general, but especially in the case of swapper function bonds, buying tokens from a bond can be seen as adding liquidity for that bond. To add liquidity to a swapper function, the current exchange rate is used to determine how much of each reserve token makes up the price. Otherwise, the price is an equal number of each of the reserve tokens according to the function type.
-| **Field** | **Type** | **Description** |
-|:----------|:-----------|:----------------|
-| SellerDid | `did.Did` | DID of the seller (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Amount | `sdk.Coin` | The amount of bond tokens to be sold
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :-------- | :--------- | :------------------------------------------------------------------------------ |
+| SellerDid | `did.Did` | DID of the seller (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Amount | `sdk.Coin` | The amount of bond tokens to be sold |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist or bond state is not OPEN
- amount is not an amount of an existing bond
- amount is greater than the balance of the seller
@@ -278,14 +284,15 @@ This message adds the sell order to the current batch.
Any address that holds tokens (_t1_) that a swapper function bond uses as one of its two reserves (_t1_ and _t2_) can swap the tokens in exchange for reserve tokens of the other type (_t2_). Similar to the `MsgBuy` and `MsgSell`, the `MsgSwap` handler just registers a swap order in the current orders batch which then gets fulfilled at the end of the batch's lifespan.
-| **Field** | **Type** | **Description** |
-|:-----------|:-----------|:----------------|
-| SwapperDid | `did.Did` | DID of the swapper (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| From | `sdk.Coin` | The amount of reserve tokens to be swapped
-| ToToken | `string` | The token denomination that will be given in return
+| **Field** | **Type** | **Description** |
+| :--------- | :--------- | :------------------------------------------------------------------------------ |
+| SwapperDid | `did.Did` | DID of the swapper (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| From | `sdk.Coin` | The amount of reserve tokens to be swapped |
+| ToToken | `string` | The token denomination that will be given in return |
This message is expected to fail if:
+
- bond does not exist, is not swapper function, or bond state is not OPEN
- from amount is greater than the balance of the swapper
- from and to tokens are the same token
@@ -308,13 +315,14 @@ This message adds the swap order to the current batch.
If a bond was created with an outcome payment field, then any token holder can make an outcome payment to the bond. If the token holder has enough tokens to pay the outcome payment, the tokens are sent to the bond's reserve and the bond's state gets set to SETTLE. The only action possible by bond token holders after the outcome payment has been made is a share withdrawal (using [MsgWithdrawShare](#MsgWithdrawShare)).
-| **Field** | **Type** | **Description** |
-|:----------|:----------|:----------------|
-| SenderDid | `did.Did` | DID of the sender (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Amount | `sdk.Int` | Amount of payment sender is making (e.g. `100000`)
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :-------- | :-------- | :------------------------------------------------------------------------------ |
+| SenderDid | `did.Did` | DID of the sender (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Amount | `sdk.Int` | Amount of payment sender is making (e.g. `100000`) |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist or bond state is not OPEN
- bond outcome payment is zero or negative
- bond outcome payment is greater than the balance of the sender
@@ -338,12 +346,13 @@ If a bond's outcome payment was paid, any bond token holder can use this message
- The second token holder to withdraw gets `667/2 = 333 tokens` (notice the current supply is now 2)
- The third token holder to withdraw gets `334/1 = 334 tokens` (because of rounding, the last holder got an extra token)
-| **Field** | **Type** | **Description** |
-|:-------------|:----------|:----------------|
-| RecipientDid | `did.Did` | DID of the recipient (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :----------- | :-------- | :------------------------------------------------------------------------------ |
+| RecipientDid | `did.Did` | DID of the recipient (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist or bond state is not SETTLE
- recipient does not own any bond tokens
- bond DID or recipient DID is not a valid DID
@@ -359,13 +368,14 @@ type MsgWithdrawShare struct {
If the bond allows it, i.e. if the `AllowReserveWithdrawals` flag is set to True, then the bond's controller has the ability to withdraw reserve out of the bond's reserve, for usage outside of the bond. This will not affect the `CurrentReserve` reported by the bond but will update the `AvailableReserve` value.
-| **Field** | **Type** | **Description** |
-|:--------------|:------------|:----------------|
-| WithdrawerDid | `did.Did` | DID of the withdrawer (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
-| Amount | `sdk.Coins` | The amount of reserve tokens to be withdrawn
-| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`)
+| **Field** | **Type** | **Description** |
+| :------------ | :---------- | :------------------------------------------------------------------------------ |
+| WithdrawerDid | `did.Did` | DID of the withdrawer (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
+| Amount | `sdk.Coins` | The amount of reserve tokens to be withdrawn |
+| BondDid | `did.Did` | DID of the bond we are interacting with (e.g. `did:ixo:U7GK8p8rVhJMKhBVRCJJ8c`) |
This message is expected to fail if:
+
- bond does not exist or bond state is not OPEN
- withdrawer is not the bond's controller
- bond DID or withdrawer DID is not a valid DID
diff --git a/x/bonds/spec/04_end_block.md b/x/bonds/spec/04_end_block.md
index 107171174..50a9da44c 100644
--- a/x/bonds/spec/04_end_block.md
+++ b/x/bonds/spec/04_end_block.md
@@ -1,6 +1,7 @@
# End-Block
At the end of each block, any batch of orders that has reached the end of its lifespan, measured in number of blocks, is cleared. For the rest of the batches, their blocks remaining value is decremented by 1. Orders are performed in the following order:
+
1. Buys
2. Sells
3. Swaps
@@ -12,6 +13,7 @@ In the case of `augmented_function` bonds, if the new bond supply after performi
## Buys
Using the buy price stored in the batch, the following steps are followed for each buy order:
+
1. Mint and send `n` bond tokens to the buyer
2. Calculate total price`total = r + f` in reserve tokens
1. `r` is the price of buying `n` bond tokens
@@ -26,6 +28,7 @@ Note: the `maxPrices` reserve tokens were locked upon submitting the buy order.
## Sells
Using the sell price stored in the batch, the following steps are followed for each sell order:
+
1. Calculate total returns `total = r - f` in reserve tokens
1. `r` is the return for selling `n` bond tokens
2. `f` is the transactional and exit fees based on `r`
@@ -38,6 +41,7 @@ Note: the `n` bond tokens were burned upon submitting the sell order.
## Swaps
The following steps are followed for each swap order:
+
1. Calculate the transactional fee `f` based on `t1` reserve tokens
2. Calculate the return `t2` for swapping `t1-f` reserve tokens
3. Check whether the swap violates the sanity rate
@@ -51,4 +55,4 @@ Note: the `t1` reserve tokens were locked upon submitting the swap order. If a s
## Set Last Batch
-Once all orders have been processed, the last batch is set as the current batch and the current batch is cleared in preparation for a new list of orders.
\ No newline at end of file
+Once all orders have been processed, the last batch is set as the current batch and the current batch is cleared in preparation for a new list of orders.
diff --git a/x/bonds/spec/05_events.md b/x/bonds/spec/05_events.md
index 2d0811412..a289478f1 100644
--- a/x/bonds/spec/05_events.md
+++ b/x/bonds/spec/05_events.md
@@ -1,162 +1,285 @@
# Events
-The bonds module emits the following events:
-
-## EndBlocker
-
-| Type | Attribute Key | Attribute Value |
-|---------------|-------------------|---------------------|
-| order_cancel | bond | {token} |
-| order_cancel | order_type | {orderType} |
-| order_cancel | address | {address} |
-| order_cancel | cancel_reason | {cancelReason} |
-| order_fulfill | bond | {token} |
-| order_fulfill | order_type | {orderType} |
-| order_fulfill | address | {address} |
-| order_fulfill | tokensMinted | {tokensMinted} |
-| order_fulfill | chargedPrices | {chargedPrices} |
-| order_fulfill | chargedFees | {chargedFees} |
-| order_fulfill | returnedToAddress | {returnedToAddress} |
-| state_change | bond | {token} |
-| state_change | old_state | {oldState} |
-| state_change | new_state | {newState} |
-
-## Handlers
-
-### MsgCreateBond
-
-| Type | Attribute Key | Attribute Value |
-|-------------|----------------------------|----------------------------|
-| create_bond | bond_did | {bondDid} |
-| create_bond | token | {token} |
-| create_bond | name | {name} |
-| create_bond | description | {description} |
-| create_bond | function_type | {functionType} |
-| create_bond | function_parameters [0] | {functionParameters} |
-| create_bond | creator_did | {creatorDid} |
-| create_bond | controller_did | {controllerDid} |
-| create_bond | reserve_tokens [1] | {reserveTokens} |
-| create_bond | tx_fee_percentage | {txFeePercentage} |
-| create_bond | exit_fee_percentage | {exitFeePercentage} |
-| create_bond | fee_address | {feeAddress} |
-| create_bond | reserve_withdrawal_address | {reserveWithdrawalAddress} |
-| create_bond | max_supply | {maxSupply} |
-| create_bond | order_quantity_limits | {orderQuantityLimits} |
-| create_bond | sanity_rate | {sanityRate} |
-| create_bond | sanity_margin_percentage | {sanityMarginPercentage} |
-| create_bond | allow_sells | {allowSells} |
-| create_bond | allow_reserve_withdrawals | {allowReserveWithdrawals} |
-| create_bond | alpha_bond | {alphaBond} |
-| create_bond | batch_blocks | {batchBlocks} |
-| create_bond | outcome_payment | {outcomePayment} |
-| create_bond | state | {state} |
-| message | module | bonds |
-| message | sender | {creatorDid} |
-
-* [0] Example formatting: `"{m:12,n:2,c:100}"`
-* [1] Example formatting: `"[res,rez]"`
-
-### MsgEditBond
-
-| Type | Attribute Key | Attribute Value |
-|-----------|--------------------------|--------------------------|
-| edit_bond | bond_did | {bondDid} |
-| edit_bond | name | {name} |
-| edit_bond | description | {description} |
-| edit_bond | order_quantity_limits | {orderQuantityLimits} |
-| edit_bond | sanity_rate | {sanityRate} |
-| edit_bond | sanity_margin_percentage | {sanityMarginPercentage} |
-| message | module | bonds |
-| message | sender | {editorDid} |
-
-### MsgSetNextAlpha
-
-| Type | Attribute Key | Attribute Value |
-|----------------|--------------------------|--------------------------|
-| set_next_alpha | bond_did | {bondDid} |
-| set_next_alpha | public_alpha | {name} |
-| message | module | bonds |
-| message | sender | {setterDid} |
-
-### MsgUpdateBondState
-
-| Type | Attribute Key | Attribute Value |
-|-----------|--------------------------|--------------------------|
-| message | module | bonds |
-| message | sender | {editorDid} |
-
-### MsgBuy
-
-#### First Buy for Swapper Function Bond
-
-| Type | Attribute Key | Attribute Value |
-|--------------|----------------|-----------------|
-| init_swapper | bond_did | {bondDid} |
-| init_swapper | amount | {amount} |
-| init_swapper | charged_prices | {chargedPrices} |
-| message | module | bonds |
-| message | sender | {buyerDid} |
-
-#### Otherwise
-
-| Type | Attribute Key | Attribute Value |
-|--------------|---------------|-----------------|
-| buy | bond_did | {bondDid} |
-| buy | amount | {amount} |
-| buy | max_prices | {maxPrices} |
-| order_cancel | bond | {token} |
-| order_cancel | order_type | {orderType} |
-| order_cancel | address | {address} |
-| order_cancel | cancel_reason | {cancelReason} |
-| message | module | bonds |
-| message | sender | {buyerDid} |
-
-### MsgSell
-
-| Type | Attribute Key | Attribute Value |
-|---------|---------------|-----------------|
-| sell | bond_did | {bondDid} |
-| sell | amount | {amount} |
-| message | module | bonds |
-| message | sender | {sellerDid} |
-
-### MsgSwap
-
-| Type | Attribute Key | Attribute Value |
-|---------|---------------|-----------------|
-| swap | bond_did | {bondDid} |
-| swap | amount | {amount} |
-| swap | from_token | {fromToken} |
-| swap | to_token | {toToken} |
-| message | module | bonds |
-| message | sender | {swapperDid} |
-
-### MsgMakeOutcomePayment
-
-| Type | Attribute Key | Attribute Value |
-|----------------------|---------------|----------------------|
-| make_outcome_payment | bond_did | {bondDid} |
-| make_outcome_payment | amount | {amount} |
-| make_outcome_payment | address | {senderAddress} |
-| message | module | bonds |
-| message | sender | {senderDid} |
-
-### MsgWithdrawShare
-
-| Type | Attribute Key | Attribute Value |
-|----------------|---------------|--------------------|
-| withdraw_share | bond_did | {bondDid} |
-| withdraw_share | address | {recipientAddress} |
-| withdraw_share | amount | {reserveOwed} |
-| message | module | bonds |
-| message | sender | {recipientDid} |
-
-### MsgWithdrawReserve
-
-| Type | Attribute Key | Attribute Value |
-|------------------|---------------|----------------------------|
-| withdraw_reserve | bond_did | {bondDid} |
-| withdraw_reserve | address | {reserveWithdrawalAddress} |
-| withdraw_reserve | amount | {amountWithdrawn} |
-| message | module | bonds |
-| message | sender | {withdrawerDid} |
+The bonds module emits the following typed events:
+
+### BondCreatedEvent
+
+Emitted after a successfull `MsgCreateBond`
+
+| **Field** | **Type** | **Description** |
+| :-------- | :------- | :-------------- |
+| Bond | `*Bond` | |
+
+```go
+type BondCreatedEvent struct {
+ Bond *Bond
+}
+```
+
+### BondUpdatedEvent
+
+Emitted after a successfull `MsgEditBond`, `MsgUpdateBondState`
+
+| **Field** | **Type** | **Description** |
+| :-------- | :------- | :-------------- |
+| Bond | `*Bond` | |
+
+```go
+type BondUpdatedEvent struct {
+ Bond *Bond
+}
+```
+
+### BondSetNextAlphaEvent
+
+Emitted after a successfull `MsgSetNextAlpha`. Note this doesn't mean the alpha has been updated, it has only been added to the batch for next batch update.
+
+| **Field** | **Type** | **Description** |
+| :-------- | :------- | :-------------- |
+| BondDid | `string` | |
+| NextAlpha | `string` | |
+| Signer | `string` | |
+
+```go
+type BondSetNextAlphaEvent struct {
+ BondDid string
+ NextAlpha string
+ Signer string
+}
+```
+
+### BondBuyOrderEvent
+
+Emitted after a successfull `MsgBuy`. Note this doesn't mean the buy has been executed, it has only been added to the batch.
+
+| **Field** | **Type** | **Description** |
+| :-------- | :---------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*BuyOrder` | |
+
+```go
+type BondBuyOrderEvent struct {
+ Order *BuyOrder
+ BondDid string
+}
+```
+
+### BondSellOrderEvent
+
+Emitted after a successfull `MsgSell`. Note this doesn't mean the sell has been executed, it has only been added to the batch.
+
+| **Field** | **Type** | **Description** |
+| :-------- | :----------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*SellOrder` | |
+
+```go
+type BondSellOrderEvent struct {
+ Order *SellOrder
+ BondDid string
+}
+```
+
+### BondSwapOrderEvent
+
+Emitted after a successfull `MsgSwap`. Note this doesn't mean the swap has been executed, it has only been added to the batch.
+
+| **Field** | **Type** | **Description** |
+| :-------- | :----------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*SwapOrder` | |
+
+```go
+type BondSwapOrderEvent struct {
+ Order *SwapOrder
+ BondDid string
+}
+```
+
+### BondMakeOutcomePaymentEvent
+
+Emitted after a successfull `MsgMakeOutcomePayment`
+
+| **Field** | **Type** | **Description** |
+| :------------- | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| OutcomePayment | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| SenderDid | `string` | |
+| SenderAddress | `string` | |
+
+```go
+type BondMakeOutcomePaymentEvent struct {
+ BondDid string
+ OutcomePayment github_com_cosmos_cosmos_sdk_types.Coins
+ SenderDid string
+ SenderAddress string
+}
+```
+
+### BondWithdrawShareEvent
+
+Emitted after a successfull `MsgWithdrawShare`
+
+| **Field** | **Type** | **Description** |
+| :--------------- | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| WithdrawPayment | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| RecipientDid | `string` | |
+| RecipientAddress | `string` | |
+
+```go
+type BondWithdrawShareEvent struct {
+ BondDid string
+ WithdrawPayment github_com_cosmos_cosmos_sdk_types.Coins
+ RecipientDid string
+ RecipientAddress string
+}
+```
+
+### BondWithdrawReserveEvent
+
+Emitted after a successfull `MsgWithdrawReserve`
+
+| **Field** | **Type** | **Description** |
+| :----------------------- | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| WithdrawAmount | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| WithdrawerDid | `string` | |
+| WithdrawerAddress | `string` | |
+| ReserveWithdrawalAddress | `string` | |
+
+```go
+type BondWithdrawReserveEvent struct {
+ BondDid string
+ WithdrawAmount github_com_cosmos_cosmos_sdk_types.Coins
+ WithdrawerDid string
+ WithdrawerAddress string
+ ReserveWithdrawalAddress string
+}
+```
+
+### BondEditAlphaSuccessEvent
+
+Emitted after a successfull update of the Alpha state which is done in `EndBlock`
+
+| **Field** | **Type** | **Description** |
+| :---------- | :------- | :-------------- |
+| BondDid | `string` | |
+| Token | `string` | |
+| PublicAlpha | `string` | |
+| SystemAlpha | `string` | |
+
+```go
+type BondEditAlphaSuccessEvent struct {
+ BondDid string
+ Token string
+ PublicAlpha string
+ SystemAlpha string
+}
+```
+
+### BondEditAlphaFailedEvent
+
+Emitted if update of the Alpha state failed which is done in `EndBlock`
+
+| **Field** | **Type** | **Description** |
+| :----------- | :------- | :-------------- |
+| BondDid | `string` | |
+| Token | `string` | |
+| CancelReason | `string` | |
+
+```go
+type BondEditAlphaFailedEvent struct {
+ BondDid string
+ Token string
+ CancelReason string
+}
+```
+
+### BondBuyOrderFulfilledEvent
+
+Emitted after a successfull `BuyOrder` has been executed which is done in `EndBlock`
+
+| **Field** | **Type** | **Description** |
+| :-------------------------- | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*BuyOrder` | |
+| ChargedPrices | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| ChargedFees | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| ReturnedToAddress | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| NewBondTokenBalance | `github_com_cosmos_cosmos_sdk_types.Int` | |
+| ChargedPricesOfWhichReserve | `*github_com_cosmos_cosmos_sdk_types.Int` | |
+| ChargedPricesOfWhichFunding | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+
+```go
+type BondBuyOrderFulfilledEvent struct {
+ BondDid string
+ Order *BuyOrder
+ ChargedPrices github_com_cosmos_cosmos_sdk_types.Coins
+ ChargedFees github_com_cosmos_cosmos_sdk_types.Coins
+ ReturnedToAddress github_com_cosmos_cosmos_sdk_types.Coins
+ NewBondTokenBalance github_com_cosmos_cosmos_sdk_types.Int
+ ChargedPricesOfWhichReserve *github_com_cosmos_cosmos_sdk_types.Int
+ ChargedPricesOfWhichFunding github_com_cosmos_cosmos_sdk_types.Coins
+}
+```
+
+### BondSellOrderFulfilledEvent
+
+Emitted after a successfull `SellOrder` has been executed which is done in `EndBlock`
+
+| **Field** | **Type** | **Description** |
+| :------------------ | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*SellOrder` | |
+| ChargedFees | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| ReturnedToAddress | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| NewBondTokenBalance | `github_com_cosmos_cosmos_sdk_types.Int` | |
+
+```go
+type BondSellOrderFulfilledEvent struct {
+ BondDid string
+ Order *SellOrder
+ ChargedFees github_com_cosmos_cosmos_sdk_types.Coins
+ ReturnedToAddress github_com_cosmos_cosmos_sdk_types.Coins
+ NewBondTokenBalance github_com_cosmos_cosmos_sdk_types.Int
+}
+```
+
+### BondSwapOrderFulfilledEvent
+
+Emitted after a successfull `SwapOrder` has been executed which is done in `EndBlock`
+
+| **Field** | **Type** | **Description** |
+| :---------------- | :----------------------------------------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*SwapOrder` | |
+| ChargedFee | `types.Coin` | |
+| ReturnedToAddress | `github_com_cosmos_cosmos_sdk_types.Coins` | |
+| TokensSwapped | `types.Coin` | |
+
+```go
+type BondSwapOrderFulfilledEvent struct {
+ BondDid string
+ Order *SwapOrder
+ ChargedFee types.Coin
+ ReturnedToAddress github_com_cosmos_cosmos_sdk_types.Coins
+ TokensSwapped types.Coin
+}
+```
+
+### BondBuyOrderCancelledEvent
+
+Emitted when a `BuyOrder` has been cancelled as it is not eligible to be executed anymore.
+
+| **Field** | **Type** | **Description** |
+| :-------- | :---------- | :-------------- |
+| BondDid | `string` | |
+| Order | `*BuyOrder` | |
+
+```go
+type BondBuyOrderCancelledEvent struct {
+ BondDid string
+ Order *BuyOrder
+}
+```
diff --git a/x/bonds/spec/06_params.md b/x/bonds/spec/06_params.md
index 392075e63..80d95dfe8 100644
--- a/x/bonds/spec/06_params.md
+++ b/x/bonds/spec/06_params.md
@@ -2,6 +2,6 @@
The bonds module contains the following parameter:
-| Key | Type | Example |
-|--------------------|------------|----------|
-| ReservedBondTokens | []string | "tokenA" |
\ No newline at end of file
+| **Key** | **Type** | **Description** |
+| :----------------- | :--------- | :----------------------------------------------------------- |
+| ReservedBondTokens | `[]string` | A list of tokens that is reserved and can't be used by users |
diff --git a/x/bonds/spec/README.md b/x/bonds/spec/README.md
index 052e12602..efc30de7b 100644
--- a/x/bonds/spec/README.md
+++ b/x/bonds/spec/README.md
@@ -1,54 +1,89 @@
# Bonds module specification
-## Abstract
-
-This document specifies the bonds module; a custom Cosmos SDK module.
+This document specifies the bonds module, a custom Ixo Cosmos SDK module.
The bonds module provides universal token bonding curve functions to mint, burn or swap any token in a Cosmos blockchain. Once the Inter-Blockchain Communication (IBC) protocol is available, this should enable cross-network exchanges of tokens at algorithmically-determined prices.
-The bonds module can be deployed through Cosmos Hubs and Zones to deliver applications such as:
-* Automated market-makers (like [Uniswap](https://uniswap.io))
-* Decentralised exchanges (like [Bancor](https://bancor.network))
-* Curation markets (like [Relevant](https://github.com/relevant-community/contracts/tree/bondingCurves/contracts))
-* Development Impact Bonds (like ixo alpha-Bonds)
-* Continuous organisations (like [Moloch DAO](https://molochdao.com/))
+The bonds module can deliver applications such as:
+
+- Automated market-makers (like [Uniswap](https://uniswap.io))
+- Decentralised exchanges (like [Bancor](https://bancor.network))
+- Curation markets (like [Relevant](https://github.com/relevant-community/contracts/tree/bondingCurves/contracts))
+- Development Impact Bonds (like ixo alpha-Bonds)
+- Continuous organisations (like [Moloch DAO](https://molochdao.com/))
Any Cosmos application chain that implements the Bonds module is able to perform functions such as:
-* Issue a new token with custom parameters.
-* Pool liquidity for reserves.
-* Provide continuous funding.
-* Automatically mint and burn tokens at deterministic prices.
-* Swap tokens atomically within the same network.
-* Exchange tokens across networks, with the IBC protocol.
-* (Batch token transactions to prevent front-running)
-* Launch a decentralised autonomous initial coin offerings ([DAICO](https://ethresear.ch/t/explanation-of-daicos/465))
-* ...*other **DeFi**ant* innovations.
+
+- Issue a new token with custom parameters.
+- Pool liquidity for reserves.
+- Provide continuous funding.
+- Automatically mint and burn tokens at deterministic prices.
+- Swap tokens atomically within the same network.
+- Exchange tokens across networks, with the IBC protocol.
+- (Batch token transactions to prevent front-running)
+- Launch a decentralised autonomous initial coin offerings ([DAICO](https://ethresear.ch/t/explanation-of-daicos/465))
+- ..._other **DeFi**ant_ innovations.
## Contents
1. **[Concepts](01_concepts.md)**
+
+ - [Concepts](01_concepts.md#concepts)
+ - [Token Bonding Curves](01_concepts.md#token-bonding-curves)
+ - [Token Bonds Module](01_concepts.md#token-bonds-module)
+ - [Batching](01_concepts.md#batching)
+
2. **[State](02_state.md)**
- - [Bonds](02_state.md#bonds)
- - [Batches](02_state.md#batches)
+
+ - [State](02_state.md#state)
+ - [Bonds](02_state.md#bonds)
+ - [Batches](02_state.md#batches)
+ - [Querying Batches](02_state.md#querying-batches)
+
3. **[Messages](03_messages.md)**
- - [MsgCreateBond](03_messages.md#msgcreatebond)
- - [MsgEditBond](03_messages.md#msgeditbond)
- - [MsgSetNextAlpha](03_messages.md#msgsetnextalpha)
- - [MsgUpdateBondState](03_messages.md#msgupdatebondstate)
- - [MsgBuy](03_messages.md#msgbuy)
- - [MsgSell](03_messages.md#msgsell)
- - [MsgSwap](03_messages.md#msgswap)
- - [MsgMakeOutcomePayment](03_messages.md#msgmakeoutcomepayment)
- - [MsgWithdrawShare](03_messages.md#msgwithdrawshare)
- - [MsgWithdrawReserve](03_messages.md#msgwithdrawreserve)
+
+ - [Messages](03_messages.md#messages)
+ - [MsgCreateBond](03_messages.md#msgcreatebond)
+ - [MsgEditBond](03_messages.md#msgeditbond)
+ - [MsgSetNextAlpha](03_messages.md#msgsetnextalpha)
+ - [MsgUpdateBondState](03_messages.md#msgupdatebondstate)
+ - [MsgBuy](03_messages.md#msgbuy)
+ - [MsgBuy for Swapper Function Bonds](03_messages.md#msgbuy-for-swapper-function-bonds)
+ - [MsgSell](03_messages.md#msgsell)
+ - [MsgSwap](03_messages.md#msgswap)
+ - [MsgMakeOutcomePayment](03_messages.md#msgmakeoutcomepayment)
+ - [MsgWithdrawShare](03_messages.md#msgwithdrawshare)
+ - [MsgWithdrawReserve](03_messages.md#msgwithdrawreserve)
+
4. **[End-Block](04_end_block.md)**
- - [Buys](04_end_block.md#buys)
- - [Sells](04_end_block.md#sells)
- - [Swaps](04_end_block.md#swaps)
- - [Set Last Batch](04_end_block.md#set-last-batch)
+
+ - [End-Block](04_end_block.md#end-block)
+ - [Buys](04_end_block.md#buys)
+ - [Sells](04_end_block.md#sells)
+ - [Swaps](04_end_block.md#swaps)
+ - [Set Last Batch](04_end_block.md#set-last-batch)
+
5. **[Events](05_events.md)**
- - [EndBlocker](05_events.md#endblocker)
- - [Handlers](05_events.md#handlers)
+
+ - [Events](05_events.md#events)
+ - [BondCreatedEvent](05_events.md#bondcreatedevent)
+ - [BondUpdatedEvent](05_events.md#bondupdatedevent)
+ - [BondSetNextAlphaEvent](05_events.md#bondsetnextalphaevent)
+ - [BondBuyOrderEvent](05_events.md#bondbuyorderevent)
+ - [BondSellOrderEvent](05_events.md#bondsellorderevent)
+ - [BondSwapOrderEvent](05_events.md#bondswaporderevent)
+ - [BondMakeOutcomePaymentEvent](05_events.md#bondmakeoutcomepaymentevent)
+ - [BondWithdrawShareEvent](05_events.md#bondwithdrawshareevent)
+ - [BondWithdrawReserveEvent](05_events.md#bondwithdrawreserveevent)
+ - [BondEditAlphaSuccessEvent](05_events.md#bondeditalphasuccessevent)
+ - [BondEditAlphaFailedEvent](05_events.md#bondeditalphafailedevent)
+ - [BondBuyOrderFulfilledEvent](05_events.md#bondbuyorderfulfilledevent)
+ - [BondSellOrderFulfilledEvent](05_events.md#bondsellorderfulfilledevent)
+ - [BondSwapOrderFulfilledEvent](05_events.md#bondswaporderfulfilledevent)
+ - [BondBuyOrderCancelledEvent](05_events.md#bondbuyordercancelledevent)
+
6. **[Parameters](06_params.md)**
+
7. **[Future Improvements](07_future_improvements.md)**
+
8. **[Functions Library](08_functions_library.ipynb)**
diff --git a/x/bonds/spec/client/lcd/swagger-ui/favicon-16x16.png b/x/bonds/spec/client/lcd/swagger-ui/favicon-16x16.png
deleted file mode 100644
index 0f7e13b0d..000000000
Binary files a/x/bonds/spec/client/lcd/swagger-ui/favicon-16x16.png and /dev/null differ
diff --git a/x/bonds/spec/client/lcd/swagger-ui/favicon-32x32.png b/x/bonds/spec/client/lcd/swagger-ui/favicon-32x32.png
deleted file mode 100644
index b0a3352ff..000000000
Binary files a/x/bonds/spec/client/lcd/swagger-ui/favicon-32x32.png and /dev/null differ
diff --git a/x/bonds/spec/client/lcd/swagger-ui/index.html b/x/bonds/spec/client/lcd/swagger-ui/index.html
deleted file mode 100644
index 0c4855763..000000000
--- a/x/bonds/spec/client/lcd/swagger-ui/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
- Swagger UI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/x/bonds/spec/client/lcd/swagger-ui/oauth2-redirect.html b/x/bonds/spec/client/lcd/swagger-ui/oauth2-redirect.html
deleted file mode 100644
index fb68399d2..000000000
--- a/x/bonds/spec/client/lcd/swagger-ui/oauth2-redirect.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
diff --git a/x/bonds/spec/client/lcd/swagger-ui/swagger-ui-bundle.js b/x/bonds/spec/client/lcd/swagger-ui/swagger-ui-bundle.js
deleted file mode 100644
index c9ba00bf5..000000000
--- a/x/bonds/spec/client/lcd/swagger-ui/swagger-ui-bundle.js
+++ /dev/null
@@ -1,41776 +0,0 @@
-! function(e, t) {
- "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.SwaggerUIBundle = t() : e.SwaggerUIBundle = t()
-}(this, function() {
- return function(e) {
- var t = {};
-
- function n(r) {
- if (t[r]) return t[r].exports;
- var o = t[r] = {
- i: r,
- l: !1,
- exports: {}
- };
- return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports
- }
- return n.m = e, n.c = t, n.d = function(e, t, r) {
- n.o(e, t) || Object.defineProperty(e, t, {
- configurable: !1,
- enumerable: !0,
- get: r
- })
- }, n.n = function(e) {
- var t = e && e.__esModule ? function() {
- return e.default
- } : function() {
- return e
- };
- return n.d(t, "a", t), t
- }, n.o = function(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }, n.p = "/dist", n(n.s = 445)
- }([function(e, t, n) {
- "use strict";
- e.exports = n(75)
- }, function(e, t, n) {
- e.exports = n(853)()
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.default = function(e, t) {
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, o = n(262),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- t.default = function() {
- function e(e, t) {
- for (var n = 0; n < t.length; n++) {
- var r = t[n];
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), (0, i.default)(e, r.key, r)
- }
- }
- return function(t, n, r) {
- return n && e(t.prototype, n), r && e(t, r), t
- }
- }()
- }, function(e, t, n) {
- e.exports = {
- default: n(766),
- __esModule: !0
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, o = n(45),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- t.default = function(e, t) {
- if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !t || "object" !== (void 0 === t ? "undefined" : (0, i.default)(t)) && "function" != typeof t ? e : t
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r = a(n(768)),
- o = a(n(349)),
- i = a(n(45));
-
- function a(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.default = function(e, t) {
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === t ? "undefined" : (0, i.default)(t)));
- e.prototype = (0, o.default)(t && t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), t && (r.default ? (0, r.default)(e, t) : e.__proto__ = t)
- }
- }, function(e, t, n) {
- var r;
- r = function() {
- "use strict";
- var e = Array.prototype.slice;
-
- function t(e, t) {
- t && (e.prototype = Object.create(t.prototype)), e.prototype.constructor = e
- }
-
- function n(e) {
- return a(e) ? e : J(e)
- }
-
- function r(e) {
- return u(e) ? e : Y(e)
- }
-
- function o(e) {
- return s(e) ? e : K(e)
- }
-
- function i(e) {
- return a(e) && !l(e) ? e : G(e)
- }
-
- function a(e) {
- return !(!e || !e[f])
- }
-
- function u(e) {
- return !(!e || !e[p])
- }
-
- function s(e) {
- return !(!e || !e[d])
- }
-
- function l(e) {
- return u(e) || s(e)
- }
-
- function c(e) {
- return !(!e || !e[h])
- }
- t(r, n), t(o, n), t(i, n), n.isIterable = a, n.isKeyed = u, n.isIndexed = s, n.isAssociative = l, n.isOrdered = c, n.Keyed = r, n.Indexed = o, n.Set = i;
- var f = "@@__IMMUTABLE_ITERABLE__@@",
- p = "@@__IMMUTABLE_KEYED__@@",
- d = "@@__IMMUTABLE_INDEXED__@@",
- h = "@@__IMMUTABLE_ORDERED__@@",
- v = 5,
- m = 1 << v,
- g = m - 1,
- y = {},
- b = {
- value: !1
- },
- _ = {
- value: !1
- };
-
- function w(e) {
- return e.value = !1, e
- }
-
- function E(e) {
- e && (e.value = !0)
- }
-
- function x() {}
-
- function S(e, t) {
- t = t || 0;
- for (var n = Math.max(0, e.length - t), r = new Array(n), o = 0; o < n; o++) r[o] = e[o + t];
- return r
- }
-
- function C(e) {
- return void 0 === e.size && (e.size = e.__iterate(A)), e.size
- }
-
- function k(e, t) {
- if ("number" != typeof t) {
- var n = t >>> 0;
- if ("" + n !== t || 4294967295 === n) return NaN;
- t = n
- }
- return t < 0 ? C(e) + t : t
- }
-
- function A() {
- return !0
- }
-
- function O(e, t, n) {
- return (0 === e || void 0 !== n && e <= -n) && (void 0 === t || void 0 !== n && t >= n)
- }
-
- function P(e, t) {
- return M(e, t, 0)
- }
-
- function T(e, t) {
- return M(e, t, t)
- }
-
- function M(e, t, n) {
- return void 0 === e ? n : e < 0 ? Math.max(0, t + e) : void 0 === t ? e : Math.min(t, e)
- }
- var I = 0,
- j = 1,
- N = 2,
- R = "function" == typeof Symbol && Symbol.iterator,
- D = "@@iterator",
- L = R || D;
-
- function U(e) {
- this.next = e
- }
-
- function q(e, t, n, r) {
- var o = 0 === e ? t : 1 === e ? n : [t, n];
- return r ? r.value = o : r = {
- value: o,
- done: !1
- }, r
- }
-
- function F() {
- return {
- value: void 0,
- done: !0
- }
- }
-
- function z(e) {
- return !!H(e)
- }
-
- function B(e) {
- return e && "function" == typeof e.next
- }
-
- function V(e) {
- var t = H(e);
- return t && t.call(e)
- }
-
- function H(e) {
- var t = e && (R && e[R] || e[D]);
- if ("function" == typeof t) return t
- }
-
- function W(e) {
- return e && "number" == typeof e.length
- }
-
- function J(e) {
- return null === e || void 0 === e ? ie() : a(e) ? e.toSeq() : function(e) {
- var t = se(e) || "object" == typeof e && new te(e);
- if (!t) throw new TypeError("Expected Array or iterable object of values, or keyed object: " + e);
- return t
- }(e)
- }
-
- function Y(e) {
- return null === e || void 0 === e ? ie().toKeyedSeq() : a(e) ? u(e) ? e.toSeq() : e.fromEntrySeq() : ae(e)
- }
-
- function K(e) {
- return null === e || void 0 === e ? ie() : a(e) ? u(e) ? e.entrySeq() : e.toIndexedSeq() : ue(e)
- }
-
- function G(e) {
- return (null === e || void 0 === e ? ie() : a(e) ? u(e) ? e.entrySeq() : e : ue(e)).toSetSeq()
- }
- U.prototype.toString = function() {
- return "[Iterator]"
- }, U.KEYS = I, U.VALUES = j, U.ENTRIES = N, U.prototype.inspect = U.prototype.toSource = function() {
- return this.toString()
- }, U.prototype[L] = function() {
- return this
- }, t(J, n), J.of = function() {
- return J(arguments)
- }, J.prototype.toSeq = function() {
- return this
- }, J.prototype.toString = function() {
- return this.__toString("Seq {", "}")
- }, J.prototype.cacheResult = function() {
- return !this._cache && this.__iterateUncached && (this._cache = this.entrySeq().toArray(), this.size = this._cache.length), this
- }, J.prototype.__iterate = function(e, t) {
- return le(this, e, t, !0)
- }, J.prototype.__iterator = function(e, t) {
- return ce(this, e, t, !0)
- }, t(Y, J), Y.prototype.toKeyedSeq = function() {
- return this
- }, t(K, J), K.of = function() {
- return K(arguments)
- }, K.prototype.toIndexedSeq = function() {
- return this
- }, K.prototype.toString = function() {
- return this.__toString("Seq [", "]")
- }, K.prototype.__iterate = function(e, t) {
- return le(this, e, t, !1)
- }, K.prototype.__iterator = function(e, t) {
- return ce(this, e, t, !1)
- }, t(G, J), G.of = function() {
- return G(arguments)
- }, G.prototype.toSetSeq = function() {
- return this
- }, J.isSeq = oe, J.Keyed = Y, J.Set = G, J.Indexed = K;
- var $, Z, X, Q = "@@__IMMUTABLE_SEQ__@@";
-
- function ee(e) {
- this._array = e, this.size = e.length
- }
-
- function te(e) {
- var t = Object.keys(e);
- this._object = e, this._keys = t, this.size = t.length
- }
-
- function ne(e) {
- this._iterable = e, this.size = e.length || e.size
- }
-
- function re(e) {
- this._iterator = e, this._iteratorCache = []
- }
-
- function oe(e) {
- return !(!e || !e[Q])
- }
-
- function ie() {
- return $ || ($ = new ee([]))
- }
-
- function ae(e) {
- var t = Array.isArray(e) ? new ee(e).fromEntrySeq() : B(e) ? new re(e).fromEntrySeq() : z(e) ? new ne(e).fromEntrySeq() : "object" == typeof e ? new te(e) : void 0;
- if (!t) throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: " + e);
- return t
- }
-
- function ue(e) {
- var t = se(e);
- if (!t) throw new TypeError("Expected Array or iterable object of values: " + e);
- return t
- }
-
- function se(e) {
- return W(e) ? new ee(e) : B(e) ? new re(e) : z(e) ? new ne(e) : void 0
- }
-
- function le(e, t, n, r) {
- var o = e._cache;
- if (o) {
- for (var i = o.length - 1, a = 0; a <= i; a++) {
- var u = o[n ? i - a : a];
- if (!1 === t(u[1], r ? u[0] : a, e)) return a + 1
- }
- return a
- }
- return e.__iterateUncached(t, n)
- }
-
- function ce(e, t, n, r) {
- var o = e._cache;
- if (o) {
- var i = o.length - 1,
- a = 0;
- return new U(function() {
- var e = o[n ? i - a : a];
- return a++ > i ? {
- value: void 0,
- done: !0
- } : q(t, r ? e[0] : a - 1, e[1])
- })
- }
- return e.__iteratorUncached(t, n)
- }
-
- function fe(e, t) {
- return t ? function e(t, n, r, o) {
- if (Array.isArray(n)) return t.call(o, r, K(n).map(function(r, o) {
- return e(t, r, o, n)
- }));
- if (de(n)) return t.call(o, r, Y(n).map(function(r, o) {
- return e(t, r, o, n)
- }));
- return n
- }(t, e, "", {
- "": e
- }) : pe(e)
- }
-
- function pe(e) {
- return Array.isArray(e) ? K(e).map(pe).toList() : de(e) ? Y(e).map(pe).toMap() : e
- }
-
- function de(e) {
- return e && (e.constructor === Object || void 0 === e.constructor)
- }
-
- function he(e, t) {
- if (e === t || e != e && t != t) return !0;
- if (!e || !t) return !1;
- if ("function" == typeof e.valueOf && "function" == typeof t.valueOf) {
- if ((e = e.valueOf()) === (t = t.valueOf()) || e != e && t != t) return !0;
- if (!e || !t) return !1
- }
- return !("function" != typeof e.equals || "function" != typeof t.equals || !e.equals(t))
- }
-
- function ve(e, t) {
- if (e === t) return !0;
- if (!a(t) || void 0 !== e.size && void 0 !== t.size && e.size !== t.size || void 0 !== e.__hash && void 0 !== t.__hash && e.__hash !== t.__hash || u(e) !== u(t) || s(e) !== s(t) || c(e) !== c(t)) return !1;
- if (0 === e.size && 0 === t.size) return !0;
- var n = !l(e);
- if (c(e)) {
- var r = e.entries();
- return t.every(function(e, t) {
- var o = r.next().value;
- return o && he(o[1], e) && (n || he(o[0], t))
- }) && r.next().done
- }
- var o = !1;
- if (void 0 === e.size)
- if (void 0 === t.size) "function" == typeof e.cacheResult && e.cacheResult();
- else {
- o = !0;
- var i = e;
- e = t, t = i
- }
- var f = !0,
- p = t.__iterate(function(t, r) {
- if (n ? !e.has(t) : o ? !he(t, e.get(r, y)) : !he(e.get(r, y), t)) return f = !1, !1
- });
- return f && e.size === p
- }
-
- function me(e, t) {
- if (!(this instanceof me)) return new me(e, t);
- if (this._value = e, this.size = void 0 === t ? 1 / 0 : Math.max(0, t), 0 === this.size) {
- if (Z) return Z;
- Z = this
- }
- }
-
- function ge(e, t) {
- if (!e) throw new Error(t)
- }
-
- function ye(e, t, n) {
- if (!(this instanceof ye)) return new ye(e, t, n);
- if (ge(0 !== n, "Cannot step a Range by 0"), e = e || 0, void 0 === t && (t = 1 / 0), n = void 0 === n ? 1 : Math.abs(n), t < e && (n = -n), this._start = e, this._end = t, this._step = n, this.size = Math.max(0, Math.ceil((t - e) / n - 1) + 1), 0 === this.size) {
- if (X) return X;
- X = this
- }
- }
-
- function be() {
- throw TypeError("Abstract")
- }
-
- function _e() {}
-
- function we() {}
-
- function Ee() {}
- J.prototype[Q] = !0, t(ee, K), ee.prototype.get = function(e, t) {
- return this.has(e) ? this._array[k(this, e)] : t
- }, ee.prototype.__iterate = function(e, t) {
- for (var n = this._array, r = n.length - 1, o = 0; o <= r; o++)
- if (!1 === e(n[t ? r - o : o], o, this)) return o + 1;
- return o
- }, ee.prototype.__iterator = function(e, t) {
- var n = this._array,
- r = n.length - 1,
- o = 0;
- return new U(function() {
- return o > r ? {
- value: void 0,
- done: !0
- } : q(e, o, n[t ? r - o++ : o++])
- })
- }, t(te, Y), te.prototype.get = function(e, t) {
- return void 0 === t || this.has(e) ? this._object[e] : t
- }, te.prototype.has = function(e) {
- return this._object.hasOwnProperty(e)
- }, te.prototype.__iterate = function(e, t) {
- for (var n = this._object, r = this._keys, o = r.length - 1, i = 0; i <= o; i++) {
- var a = r[t ? o - i : i];
- if (!1 === e(n[a], a, this)) return i + 1
- }
- return i
- }, te.prototype.__iterator = function(e, t) {
- var n = this._object,
- r = this._keys,
- o = r.length - 1,
- i = 0;
- return new U(function() {
- var a = r[t ? o - i : i];
- return i++ > o ? {
- value: void 0,
- done: !0
- } : q(e, a, n[a])
- })
- }, te.prototype[h] = !0, t(ne, K), ne.prototype.__iterateUncached = function(e, t) {
- if (t) return this.cacheResult().__iterate(e, t);
- var n = V(this._iterable),
- r = 0;
- if (B(n))
- for (var o; !(o = n.next()).done && !1 !== e(o.value, r++, this););
- return r
- }, ne.prototype.__iteratorUncached = function(e, t) {
- if (t) return this.cacheResult().__iterator(e, t);
- var n = V(this._iterable);
- if (!B(n)) return new U(F);
- var r = 0;
- return new U(function() {
- var t = n.next();
- return t.done ? t : q(e, r++, t.value)
- })
- }, t(re, K), re.prototype.__iterateUncached = function(e, t) {
- if (t) return this.cacheResult().__iterate(e, t);
- for (var n, r = this._iterator, o = this._iteratorCache, i = 0; i < o.length;)
- if (!1 === e(o[i], i++, this)) return i;
- for (; !(n = r.next()).done;) {
- var a = n.value;
- if (o[i] = a, !1 === e(a, i++, this)) break
- }
- return i
- }, re.prototype.__iteratorUncached = function(e, t) {
- if (t) return this.cacheResult().__iterator(e, t);
- var n = this._iterator,
- r = this._iteratorCache,
- o = 0;
- return new U(function() {
- if (o >= r.length) {
- var t = n.next();
- if (t.done) return t;
- r[o] = t.value
- }
- return q(e, o, r[o++])
- })
- }, t(me, K), me.prototype.toString = function() {
- return 0 === this.size ? "Repeat []" : "Repeat [ " + this._value + " " + this.size + " times ]"
- }, me.prototype.get = function(e, t) {
- return this.has(e) ? this._value : t
- }, me.prototype.includes = function(e) {
- return he(this._value, e)
- }, me.prototype.slice = function(e, t) {
- var n = this.size;
- return O(e, t, n) ? this : new me(this._value, T(t, n) - P(e, n))
- }, me.prototype.reverse = function() {
- return this
- }, me.prototype.indexOf = function(e) {
- return he(this._value, e) ? 0 : -1
- }, me.prototype.lastIndexOf = function(e) {
- return he(this._value, e) ? this.size : -1
- }, me.prototype.__iterate = function(e, t) {
- for (var n = 0; n < this.size; n++)
- if (!1 === e(this._value, n, this)) return n + 1;
- return n
- }, me.prototype.__iterator = function(e, t) {
- var n = this,
- r = 0;
- return new U(function() {
- return r < n.size ? q(e, r++, n._value) : {
- value: void 0,
- done: !0
- }
- })
- }, me.prototype.equals = function(e) {
- return e instanceof me ? he(this._value, e._value) : ve(e)
- }, t(ye, K), ye.prototype.toString = function() {
- return 0 === this.size ? "Range []" : "Range [ " + this._start + "..." + this._end + (1 !== this._step ? " by " + this._step : "") + " ]"
- }, ye.prototype.get = function(e, t) {
- return this.has(e) ? this._start + k(this, e) * this._step : t
- }, ye.prototype.includes = function(e) {
- var t = (e - this._start) / this._step;
- return t >= 0 && t < this.size && t === Math.floor(t)
- }, ye.prototype.slice = function(e, t) {
- return O(e, t, this.size) ? this : (e = P(e, this.size), (t = T(t, this.size)) <= e ? new ye(0, 0) : new ye(this.get(e, this._end), this.get(t, this._end), this._step))
- }, ye.prototype.indexOf = function(e) {
- var t = e - this._start;
- if (t % this._step == 0) {
- var n = t / this._step;
- if (n >= 0 && n < this.size) return n
- }
- return -1
- }, ye.prototype.lastIndexOf = function(e) {
- return this.indexOf(e)
- }, ye.prototype.__iterate = function(e, t) {
- for (var n = this.size - 1, r = this._step, o = t ? this._start + n * r : this._start, i = 0; i <= n; i++) {
- if (!1 === e(o, i, this)) return i + 1;
- o += t ? -r : r
- }
- return i
- }, ye.prototype.__iterator = function(e, t) {
- var n = this.size - 1,
- r = this._step,
- o = t ? this._start + n * r : this._start,
- i = 0;
- return new U(function() {
- var a = o;
- return o += t ? -r : r, i > n ? {
- value: void 0,
- done: !0
- } : q(e, i++, a)
- })
- }, ye.prototype.equals = function(e) {
- return e instanceof ye ? this._start === e._start && this._end === e._end && this._step === e._step : ve(this, e)
- }, t(be, n), t(_e, be), t(we, be), t(Ee, be), be.Keyed = _e, be.Indexed = we, be.Set = Ee;
- var xe = "function" == typeof Math.imul && -2 === Math.imul(4294967295, 2) ? Math.imul : function(e, t) {
- var n = 65535 & (e |= 0),
- r = 65535 & (t |= 0);
- return n * r + ((e >>> 16) * r + n * (t >>> 16) << 16 >>> 0) | 0
- };
-
- function Se(e) {
- return e >>> 1 & 1073741824 | 3221225471 & e
- }
-
- function Ce(e) {
- if (!1 === e || null === e || void 0 === e) return 0;
- if ("function" == typeof e.valueOf && (!1 === (e = e.valueOf()) || null === e || void 0 === e)) return 0;
- if (!0 === e) return 1;
- var t = typeof e;
- if ("number" === t) {
- if (e != e || e === 1 / 0) return 0;
- var n = 0 | e;
- for (n !== e && (n ^= 4294967295 * e); e > 4294967295;) n ^= e /= 4294967295;
- return Se(n)
- }
- if ("string" === t) return e.length > je ? function(e) {
- var t = De[e];
- void 0 === t && (t = ke(e), Re === Ne && (Re = 0, De = {}), Re++, De[e] = t);
- return t
- }(e) : ke(e);
- if ("function" == typeof e.hashCode) return e.hashCode();
- if ("object" === t) return function(e) {
- var t;
- if (Te && void 0 !== (t = Pe.get(e))) return t;
- if (void 0 !== (t = e[Ie])) return t;
- if (!Oe) {
- if (void 0 !== (t = e.propertyIsEnumerable && e.propertyIsEnumerable[Ie])) return t;
- if (void 0 !== (t = function(e) {
- if (e && e.nodeType > 0) switch (e.nodeType) {
- case 1:
- return e.uniqueID;
- case 9:
- return e.documentElement && e.documentElement.uniqueID
- }
- }(e))) return t
- }
- t = ++Me, 1073741824 & Me && (Me = 0);
- if (Te) Pe.set(e, t);
- else {
- if (void 0 !== Ae && !1 === Ae(e)) throw new Error("Non-extensible objects are not allowed as keys.");
- if (Oe) Object.defineProperty(e, Ie, {
- enumerable: !1,
- configurable: !1,
- writable: !1,
- value: t
- });
- else if (void 0 !== e.propertyIsEnumerable && e.propertyIsEnumerable === e.constructor.prototype.propertyIsEnumerable) e.propertyIsEnumerable = function() {
- return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments)
- }, e.propertyIsEnumerable[Ie] = t;
- else {
- if (void 0 === e.nodeType) throw new Error("Unable to set a non-enumerable property on object.");
- e[Ie] = t
- }
- }
- return t
- }(e);
- if ("function" == typeof e.toString) return ke(e.toString());
- throw new Error("Value type " + t + " cannot be hashed.")
- }
-
- function ke(e) {
- for (var t = 0, n = 0; n < e.length; n++) t = 31 * t + e.charCodeAt(n) | 0;
- return Se(t)
- }
- var Ae = Object.isExtensible,
- Oe = function() {
- try {
- return Object.defineProperty({}, "@", {}), !0
- } catch (e) {
- return !1
- }
- }();
- var Pe, Te = "function" == typeof WeakMap;
- Te && (Pe = new WeakMap);
- var Me = 0,
- Ie = "__immutablehash__";
- "function" == typeof Symbol && (Ie = Symbol(Ie));
- var je = 16,
- Ne = 255,
- Re = 0,
- De = {};
-
- function Le(e) {
- ge(e !== 1 / 0, "Cannot perform this action with an infinite size.")
- }
-
- function Ue(e) {
- return null === e || void 0 === e ? Xe() : qe(e) && !c(e) ? e : Xe().withMutations(function(t) {
- var n = r(e);
- Le(n.size), n.forEach(function(e, n) {
- return t.set(n, e)
- })
- })
- }
-
- function qe(e) {
- return !(!e || !e[ze])
- }
- t(Ue, _e), Ue.of = function() {
- var t = e.call(arguments, 0);
- return Xe().withMutations(function(e) {
- for (var n = 0; n < t.length; n += 2) {
- if (n + 1 >= t.length) throw new Error("Missing value for key: " + t[n]);
- e.set(t[n], t[n + 1])
- }
- })
- }, Ue.prototype.toString = function() {
- return this.__toString("Map {", "}")
- }, Ue.prototype.get = function(e, t) {
- return this._root ? this._root.get(0, void 0, e, t) : t
- }, Ue.prototype.set = function(e, t) {
- return Qe(this, e, t)
- }, Ue.prototype.setIn = function(e, t) {
- return this.updateIn(e, y, function() {
- return t
- })
- }, Ue.prototype.remove = function(e) {
- return Qe(this, e, y)
- }, Ue.prototype.deleteIn = function(e) {
- return this.updateIn(e, function() {
- return y
- })
- }, Ue.prototype.update = function(e, t, n) {
- return 1 === arguments.length ? e(this) : this.updateIn([e], t, n)
- }, Ue.prototype.updateIn = function(e, t, n) {
- n || (n = t, t = void 0);
- var r = function e(t, n, r, o) {
- var i = t === y;
- var a = n.next();
- if (a.done) {
- var u = i ? r : t,
- s = o(u);
- return s === u ? t : s
- }
- ge(i || t && t.set, "invalid keyPath");
- var l = a.value;
- var c = i ? y : t.get(l, y);
- var f = e(c, n, r, o);
- return f === c ? t : f === y ? t.remove(l) : (i ? Xe() : t).set(l, f)
- }(this, nn(e), t, n);
- return r === y ? void 0 : r
- }, Ue.prototype.clear = function() {
- return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._root = null, this.__hash = void 0, this.__altered = !0, this) : Xe()
- }, Ue.prototype.merge = function() {
- return rt(this, void 0, arguments)
- }, Ue.prototype.mergeWith = function(t) {
- return rt(this, t, e.call(arguments, 1))
- }, Ue.prototype.mergeIn = function(t) {
- var n = e.call(arguments, 1);
- return this.updateIn(t, Xe(), function(e) {
- return "function" == typeof e.merge ? e.merge.apply(e, n) : n[n.length - 1]
- })
- }, Ue.prototype.mergeDeep = function() {
- return rt(this, ot, arguments)
- }, Ue.prototype.mergeDeepWith = function(t) {
- var n = e.call(arguments, 1);
- return rt(this, it(t), n)
- }, Ue.prototype.mergeDeepIn = function(t) {
- var n = e.call(arguments, 1);
- return this.updateIn(t, Xe(), function(e) {
- return "function" == typeof e.mergeDeep ? e.mergeDeep.apply(e, n) : n[n.length - 1]
- })
- }, Ue.prototype.sort = function(e) {
- return Pt(Wt(this, e))
- }, Ue.prototype.sortBy = function(e, t) {
- return Pt(Wt(this, t, e))
- }, Ue.prototype.withMutations = function(e) {
- var t = this.asMutable();
- return e(t), t.wasAltered() ? t.__ensureOwner(this.__ownerID) : this
- }, Ue.prototype.asMutable = function() {
- return this.__ownerID ? this : this.__ensureOwner(new x)
- }, Ue.prototype.asImmutable = function() {
- return this.__ensureOwner()
- }, Ue.prototype.wasAltered = function() {
- return this.__altered
- }, Ue.prototype.__iterator = function(e, t) {
- return new Ke(this, e, t)
- }, Ue.prototype.__iterate = function(e, t) {
- var n = this,
- r = 0;
- return this._root && this._root.iterate(function(t) {
- return r++, e(t[1], t[0], n)
- }, t), r
- }, Ue.prototype.__ensureOwner = function(e) {
- return e === this.__ownerID ? this : e ? Ze(this.size, this._root, e, this.__hash) : (this.__ownerID = e, this.__altered = !1, this)
- }, Ue.isMap = qe;
- var Fe, ze = "@@__IMMUTABLE_MAP__@@",
- Be = Ue.prototype;
-
- function Ve(e, t) {
- this.ownerID = e, this.entries = t
- }
-
- function He(e, t, n) {
- this.ownerID = e, this.bitmap = t, this.nodes = n
- }
-
- function We(e, t, n) {
- this.ownerID = e, this.count = t, this.nodes = n
- }
-
- function Je(e, t, n) {
- this.ownerID = e, this.keyHash = t, this.entries = n
- }
-
- function Ye(e, t, n) {
- this.ownerID = e, this.keyHash = t, this.entry = n
- }
-
- function Ke(e, t, n) {
- this._type = t, this._reverse = n, this._stack = e._root && $e(e._root)
- }
-
- function Ge(e, t) {
- return q(e, t[0], t[1])
- }
-
- function $e(e, t) {
- return {
- node: e,
- index: 0,
- __prev: t
- }
- }
-
- function Ze(e, t, n, r) {
- var o = Object.create(Be);
- return o.size = e, o._root = t, o.__ownerID = n, o.__hash = r, o.__altered = !1, o
- }
-
- function Xe() {
- return Fe || (Fe = Ze(0))
- }
-
- function Qe(e, t, n) {
- var r, o;
- if (e._root) {
- var i = w(b),
- a = w(_);
- if (r = et(e._root, e.__ownerID, 0, void 0, t, n, i, a), !a.value) return e;
- o = e.size + (i.value ? n === y ? -1 : 1 : 0)
- } else {
- if (n === y) return e;
- o = 1, r = new Ve(e.__ownerID, [
- [t, n]
- ])
- }
- return e.__ownerID ? (e.size = o, e._root = r, e.__hash = void 0, e.__altered = !0, e) : r ? Ze(o, r) : Xe()
- }
-
- function et(e, t, n, r, o, i, a, u) {
- return e ? e.update(t, n, r, o, i, a, u) : i === y ? e : (E(u), E(a), new Ye(t, r, [o, i]))
- }
-
- function tt(e) {
- return e.constructor === Ye || e.constructor === Je
- }
-
- function nt(e, t, n, r, o) {
- if (e.keyHash === r) return new Je(t, r, [e.entry, o]);
- var i, a = (0 === n ? e.keyHash : e.keyHash >>> n) & g,
- u = (0 === n ? r : r >>> n) & g;
- return new He(t, 1 << a | 1 << u, a === u ? [nt(e, t, n + v, r, o)] : (i = new Ye(t, r, o), a < u ? [e, i] : [i, e]))
- }
-
- function rt(e, t, n) {
- for (var o = [], i = 0; i < n.length; i++) {
- var u = n[i],
- s = r(u);
- a(u) || (s = s.map(function(e) {
- return fe(e)
- })), o.push(s)
- }
- return at(e, t, o)
- }
-
- function ot(e, t, n) {
- return e && e.mergeDeep && a(t) ? e.mergeDeep(t) : he(e, t) ? e : t
- }
-
- function it(e) {
- return function(t, n, r) {
- if (t && t.mergeDeepWith && a(n)) return t.mergeDeepWith(e, n);
- var o = e(t, n, r);
- return he(t, o) ? t : o
- }
- }
-
- function at(e, t, n) {
- return 0 === (n = n.filter(function(e) {
- return 0 !== e.size
- })).length ? e : 0 !== e.size || e.__ownerID || 1 !== n.length ? e.withMutations(function(e) {
- for (var r = t ? function(n, r) {
- e.update(r, y, function(e) {
- return e === y ? n : t(e, n, r)
- })
- } : function(t, n) {
- e.set(n, t)
- }, o = 0; o < n.length; o++) n[o].forEach(r)
- }) : e.constructor(n[0])
- }
-
- function ut(e) {
- return e = (e = (858993459 & (e -= e >> 1 & 1431655765)) + (e >> 2 & 858993459)) + (e >> 4) & 252645135, e += e >> 8, 127 & (e += e >> 16)
- }
-
- function st(e, t, n, r) {
- var o = r ? e : S(e);
- return o[t] = n, o
- }
- Be[ze] = !0, Be.delete = Be.remove, Be.removeIn = Be.deleteIn, Ve.prototype.get = function(e, t, n, r) {
- for (var o = this.entries, i = 0, a = o.length; i < a; i++)
- if (he(n, o[i][0])) return o[i][1];
- return r
- }, Ve.prototype.update = function(e, t, n, r, o, i, a) {
- for (var u = o === y, s = this.entries, l = 0, c = s.length; l < c && !he(r, s[l][0]); l++);
- var f = l < c;
- if (f ? s[l][1] === o : u) return this;
- if (E(a), (u || !f) && E(i), !u || 1 !== s.length) {
- if (!f && !u && s.length >= lt) return function(e, t, n, r) {
- e || (e = new x);
- for (var o = new Ye(e, Ce(n), [n, r]), i = 0; i < t.length; i++) {
- var a = t[i];
- o = o.update(e, 0, void 0, a[0], a[1])
- }
- return o
- }(e, s, r, o);
- var p = e && e === this.ownerID,
- d = p ? s : S(s);
- return f ? u ? l === c - 1 ? d.pop() : d[l] = d.pop() : d[l] = [r, o] : d.push([r, o]), p ? (this.entries = d, this) : new Ve(e, d)
- }
- }, He.prototype.get = function(e, t, n, r) {
- void 0 === t && (t = Ce(n));
- var o = 1 << ((0 === e ? t : t >>> e) & g),
- i = this.bitmap;
- return 0 == (i & o) ? r : this.nodes[ut(i & o - 1)].get(e + v, t, n, r)
- }, He.prototype.update = function(e, t, n, r, o, i, a) {
- void 0 === n && (n = Ce(r));
- var u = (0 === t ? n : n >>> t) & g,
- s = 1 << u,
- l = this.bitmap,
- c = 0 != (l & s);
- if (!c && o === y) return this;
- var f = ut(l & s - 1),
- p = this.nodes,
- d = c ? p[f] : void 0,
- h = et(d, e, t + v, n, r, o, i, a);
- if (h === d) return this;
- if (!c && h && p.length >= ct) return function(e, t, n, r, o) {
- for (var i = 0, a = new Array(m), u = 0; 0 !== n; u++, n >>>= 1) a[u] = 1 & n ? t[i++] : void 0;
- return a[r] = o, new We(e, i + 1, a)
- }(e, p, l, u, h);
- if (c && !h && 2 === p.length && tt(p[1 ^ f])) return p[1 ^ f];
- if (c && h && 1 === p.length && tt(h)) return h;
- var b = e && e === this.ownerID,
- _ = c ? h ? l : l ^ s : l | s,
- w = c ? h ? st(p, f, h, b) : function(e, t, n) {
- var r = e.length - 1;
- if (n && t === r) return e.pop(), e;
- for (var o = new Array(r), i = 0, a = 0; a < r; a++) a === t && (i = 1), o[a] = e[a + i];
- return o
- }(p, f, b) : function(e, t, n, r) {
- var o = e.length + 1;
- if (r && t + 1 === o) return e[t] = n, e;
- for (var i = new Array(o), a = 0, u = 0; u < o; u++) u === t ? (i[u] = n, a = -1) : i[u] = e[u + a];
- return i
- }(p, f, h, b);
- return b ? (this.bitmap = _, this.nodes = w, this) : new He(e, _, w)
- }, We.prototype.get = function(e, t, n, r) {
- void 0 === t && (t = Ce(n));
- var o = (0 === e ? t : t >>> e) & g,
- i = this.nodes[o];
- return i ? i.get(e + v, t, n, r) : r
- }, We.prototype.update = function(e, t, n, r, o, i, a) {
- void 0 === n && (n = Ce(r));
- var u = (0 === t ? n : n >>> t) & g,
- s = o === y,
- l = this.nodes,
- c = l[u];
- if (s && !c) return this;
- var f = et(c, e, t + v, n, r, o, i, a);
- if (f === c) return this;
- var p = this.count;
- if (c) {
- if (!f && --p < ft) return function(e, t, n, r) {
- for (var o = 0, i = 0, a = new Array(n), u = 0, s = 1, l = t.length; u < l; u++, s <<= 1) {
- var c = t[u];
- void 0 !== c && u !== r && (o |= s, a[i++] = c)
- }
- return new He(e, o, a)
- }(e, l, p, u)
- } else p++;
- var d = e && e === this.ownerID,
- h = st(l, u, f, d);
- return d ? (this.count = p, this.nodes = h, this) : new We(e, p, h)
- }, Je.prototype.get = function(e, t, n, r) {
- for (var o = this.entries, i = 0, a = o.length; i < a; i++)
- if (he(n, o[i][0])) return o[i][1];
- return r
- }, Je.prototype.update = function(e, t, n, r, o, i, a) {
- void 0 === n && (n = Ce(r));
- var u = o === y;
- if (n !== this.keyHash) return u ? this : (E(a), E(i), nt(this, e, t, n, [r, o]));
- for (var s = this.entries, l = 0, c = s.length; l < c && !he(r, s[l][0]); l++);
- var f = l < c;
- if (f ? s[l][1] === o : u) return this;
- if (E(a), (u || !f) && E(i), u && 2 === c) return new Ye(e, this.keyHash, s[1 ^ l]);
- var p = e && e === this.ownerID,
- d = p ? s : S(s);
- return f ? u ? l === c - 1 ? d.pop() : d[l] = d.pop() : d[l] = [r, o] : d.push([r, o]), p ? (this.entries = d, this) : new Je(e, this.keyHash, d)
- }, Ye.prototype.get = function(e, t, n, r) {
- return he(n, this.entry[0]) ? this.entry[1] : r
- }, Ye.prototype.update = function(e, t, n, r, o, i, a) {
- var u = o === y,
- s = he(r, this.entry[0]);
- return (s ? o === this.entry[1] : u) ? this : (E(a), u ? void E(i) : s ? e && e === this.ownerID ? (this.entry[1] = o, this) : new Ye(e, this.keyHash, [r, o]) : (E(i), nt(this, e, t, Ce(r), [r, o])))
- }, Ve.prototype.iterate = Je.prototype.iterate = function(e, t) {
- for (var n = this.entries, r = 0, o = n.length - 1; r <= o; r++)
- if (!1 === e(n[t ? o - r : r])) return !1
- }, He.prototype.iterate = We.prototype.iterate = function(e, t) {
- for (var n = this.nodes, r = 0, o = n.length - 1; r <= o; r++) {
- var i = n[t ? o - r : r];
- if (i && !1 === i.iterate(e, t)) return !1
- }
- }, Ye.prototype.iterate = function(e, t) {
- return e(this.entry)
- }, t(Ke, U), Ke.prototype.next = function() {
- for (var e = this._type, t = this._stack; t;) {
- var n, r = t.node,
- o = t.index++;
- if (r.entry) {
- if (0 === o) return Ge(e, r.entry)
- } else if (r.entries) {
- if (o <= (n = r.entries.length - 1)) return Ge(e, r.entries[this._reverse ? n - o : o])
- } else if (o <= (n = r.nodes.length - 1)) {
- var i = r.nodes[this._reverse ? n - o : o];
- if (i) {
- if (i.entry) return Ge(e, i.entry);
- t = this._stack = $e(i, t)
- }
- continue
- }
- t = this._stack = this._stack.__prev
- }
- return {
- value: void 0,
- done: !0
- }
- };
- var lt = m / 4,
- ct = m / 2,
- ft = m / 4;
-
- function pt(e) {
- var t = Et();
- if (null === e || void 0 === e) return t;
- if (dt(e)) return e;
- var n = o(e),
- r = n.size;
- return 0 === r ? t : (Le(r), r > 0 && r < m ? wt(0, r, v, null, new mt(n.toArray())) : t.withMutations(function(e) {
- e.setSize(r), n.forEach(function(t, n) {
- return e.set(n, t)
- })
- }))
- }
-
- function dt(e) {
- return !(!e || !e[ht])
- }
- t(pt, we), pt.of = function() {
- return this(arguments)
- }, pt.prototype.toString = function() {
- return this.__toString("List [", "]")
- }, pt.prototype.get = function(e, t) {
- if ((e = k(this, e)) >= 0 && e < this.size) {
- var n = Ct(this, e += this._origin);
- return n && n.array[e & g]
- }
- return t
- }, pt.prototype.set = function(e, t) {
- return function(e, t, n) {
- if ((t = k(e, t)) != t) return e;
- if (t >= e.size || t < 0) return e.withMutations(function(e) {
- t < 0 ? kt(e, t).set(0, n) : kt(e, 0, t + 1).set(t, n)
- });
- t += e._origin;
- var r = e._tail,
- o = e._root,
- i = w(_);
- t >= Ot(e._capacity) ? r = xt(r, e.__ownerID, 0, t, n, i) : o = xt(o, e.__ownerID, e._level, t, n, i);
- if (!i.value) return e;
- if (e.__ownerID) return e._root = o, e._tail = r, e.__hash = void 0, e.__altered = !0, e;
- return wt(e._origin, e._capacity, e._level, o, r)
- }(this, e, t)
- }, pt.prototype.remove = function(e) {
- return this.has(e) ? 0 === e ? this.shift() : e === this.size - 1 ? this.pop() : this.splice(e, 1) : this
- }, pt.prototype.insert = function(e, t) {
- return this.splice(e, 0, t)
- }, pt.prototype.clear = function() {
- return 0 === this.size ? this : this.__ownerID ? (this.size = this._origin = this._capacity = 0, this._level = v, this._root = this._tail = null, this.__hash = void 0, this.__altered = !0, this) : Et()
- }, pt.prototype.push = function() {
- var e = arguments,
- t = this.size;
- return this.withMutations(function(n) {
- kt(n, 0, t + e.length);
- for (var r = 0; r < e.length; r++) n.set(t + r, e[r])
- })
- }, pt.prototype.pop = function() {
- return kt(this, 0, -1)
- }, pt.prototype.unshift = function() {
- var e = arguments;
- return this.withMutations(function(t) {
- kt(t, -e.length);
- for (var n = 0; n < e.length; n++) t.set(n, e[n])
- })
- }, pt.prototype.shift = function() {
- return kt(this, 1)
- }, pt.prototype.merge = function() {
- return At(this, void 0, arguments)
- }, pt.prototype.mergeWith = function(t) {
- return At(this, t, e.call(arguments, 1))
- }, pt.prototype.mergeDeep = function() {
- return At(this, ot, arguments)
- }, pt.prototype.mergeDeepWith = function(t) {
- var n = e.call(arguments, 1);
- return At(this, it(t), n)
- }, pt.prototype.setSize = function(e) {
- return kt(this, 0, e)
- }, pt.prototype.slice = function(e, t) {
- var n = this.size;
- return O(e, t, n) ? this : kt(this, P(e, n), T(t, n))
- }, pt.prototype.__iterator = function(e, t) {
- var n = 0,
- r = _t(this, t);
- return new U(function() {
- var t = r();
- return t === bt ? {
- value: void 0,
- done: !0
- } : q(e, n++, t)
- })
- }, pt.prototype.__iterate = function(e, t) {
- for (var n, r = 0, o = _t(this, t);
- (n = o()) !== bt && !1 !== e(n, r++, this););
- return r
- }, pt.prototype.__ensureOwner = function(e) {
- return e === this.__ownerID ? this : e ? wt(this._origin, this._capacity, this._level, this._root, this._tail, e, this.__hash) : (this.__ownerID = e, this)
- }, pt.isList = dt;
- var ht = "@@__IMMUTABLE_LIST__@@",
- vt = pt.prototype;
-
- function mt(e, t) {
- this.array = e, this.ownerID = t
- }
- vt[ht] = !0, vt.delete = vt.remove, vt.setIn = Be.setIn, vt.deleteIn = vt.removeIn = Be.removeIn, vt.update = Be.update, vt.updateIn = Be.updateIn, vt.mergeIn = Be.mergeIn, vt.mergeDeepIn = Be.mergeDeepIn, vt.withMutations = Be.withMutations, vt.asMutable = Be.asMutable, vt.asImmutable = Be.asImmutable, vt.wasAltered = Be.wasAltered, mt.prototype.removeBefore = function(e, t, n) {
- if (n === t ? 1 << t : 0 === this.array.length) return this;
- var r = n >>> t & g;
- if (r >= this.array.length) return new mt([], e);
- var o, i = 0 === r;
- if (t > 0) {
- var a = this.array[r];
- if ((o = a && a.removeBefore(e, t - v, n)) === a && i) return this
- }
- if (i && !o) return this;
- var u = St(this, e);
- if (!i)
- for (var s = 0; s < r; s++) u.array[s] = void 0;
- return o && (u.array[r] = o), u
- }, mt.prototype.removeAfter = function(e, t, n) {
- if (n === (t ? 1 << t : 0) || 0 === this.array.length) return this;
- var r, o = n - 1 >>> t & g;
- if (o >= this.array.length) return this;
- if (t > 0) {
- var i = this.array[o];
- if ((r = i && i.removeAfter(e, t - v, n)) === i && o === this.array.length - 1) return this
- }
- var a = St(this, e);
- return a.array.splice(o + 1), r && (a.array[o] = r), a
- };
- var gt, yt, bt = {};
-
- function _t(e, t) {
- var n = e._origin,
- r = e._capacity,
- o = Ot(r),
- i = e._tail;
- return a(e._root, e._level, 0);
-
- function a(e, u, s) {
- return 0 === u ? function(e, a) {
- var u = a === o ? i && i.array : e && e.array,
- s = a > n ? 0 : n - a,
- l = r - a;
- l > m && (l = m);
- return function() {
- if (s === l) return bt;
- var e = t ? --l : s++;
- return u && u[e]
- }
- }(e, s) : function(e, o, i) {
- var u, s = e && e.array,
- l = i > n ? 0 : n - i >> o,
- c = 1 + (r - i >> o);
- c > m && (c = m);
- return function() {
- for (;;) {
- if (u) {
- var e = u();
- if (e !== bt) return e;
- u = null
- }
- if (l === c) return bt;
- var n = t ? --c : l++;
- u = a(s && s[n], o - v, i + (n << o))
- }
- }
- }(e, u, s)
- }
- }
-
- function wt(e, t, n, r, o, i, a) {
- var u = Object.create(vt);
- return u.size = t - e, u._origin = e, u._capacity = t, u._level = n, u._root = r, u._tail = o, u.__ownerID = i, u.__hash = a, u.__altered = !1, u
- }
-
- function Et() {
- return gt || (gt = wt(0, 0, v))
- }
-
- function xt(e, t, n, r, o, i) {
- var a, u = r >>> n & g,
- s = e && u < e.array.length;
- if (!s && void 0 === o) return e;
- if (n > 0) {
- var l = e && e.array[u],
- c = xt(l, t, n - v, r, o, i);
- return c === l ? e : ((a = St(e, t)).array[u] = c, a)
- }
- return s && e.array[u] === o ? e : (E(i), a = St(e, t), void 0 === o && u === a.array.length - 1 ? a.array.pop() : a.array[u] = o, a)
- }
-
- function St(e, t) {
- return t && e && t === e.ownerID ? e : new mt(e ? e.array.slice() : [], t)
- }
-
- function Ct(e, t) {
- if (t >= Ot(e._capacity)) return e._tail;
- if (t < 1 << e._level + v) {
- for (var n = e._root, r = e._level; n && r > 0;) n = n.array[t >>> r & g], r -= v;
- return n
- }
- }
-
- function kt(e, t, n) {
- void 0 !== t && (t |= 0), void 0 !== n && (n |= 0);
- var r = e.__ownerID || new x,
- o = e._origin,
- i = e._capacity,
- a = o + t,
- u = void 0 === n ? i : n < 0 ? i + n : o + n;
- if (a === o && u === i) return e;
- if (a >= u) return e.clear();
- for (var s = e._level, l = e._root, c = 0; a + c < 0;) l = new mt(l && l.array.length ? [void 0, l] : [], r), c += 1 << (s += v);
- c && (a += c, o += c, u += c, i += c);
- for (var f = Ot(i), p = Ot(u); p >= 1 << s + v;) l = new mt(l && l.array.length ? [l] : [], r), s += v;
- var d = e._tail,
- h = p < f ? Ct(e, u - 1) : p > f ? new mt([], r) : d;
- if (d && p > f && a < i && d.array.length) {
- for (var m = l = St(l, r), y = s; y > v; y -= v) {
- var b = f >>> y & g;
- m = m.array[b] = St(m.array[b], r)
- }
- m.array[f >>> v & g] = d
- }
- if (u < i && (h = h && h.removeAfter(r, 0, u)), a >= p) a -= p, u -= p, s = v, l = null, h = h && h.removeBefore(r, 0, a);
- else if (a > o || p < f) {
- for (c = 0; l;) {
- var _ = a >>> s & g;
- if (_ !== p >>> s & g) break;
- _ && (c += (1 << s) * _), s -= v, l = l.array[_]
- }
- l && a > o && (l = l.removeBefore(r, s, a - c)), l && p < f && (l = l.removeAfter(r, s, p - c)), c && (a -= c, u -= c)
- }
- return e.__ownerID ? (e.size = u - a, e._origin = a, e._capacity = u, e._level = s, e._root = l, e._tail = h, e.__hash = void 0, e.__altered = !0, e) : wt(a, u, s, l, h)
- }
-
- function At(e, t, n) {
- for (var r = [], i = 0, u = 0; u < n.length; u++) {
- var s = n[u],
- l = o(s);
- l.size > i && (i = l.size), a(s) || (l = l.map(function(e) {
- return fe(e)
- })), r.push(l)
- }
- return i > e.size && (e = e.setSize(i)), at(e, t, r)
- }
-
- function Ot(e) {
- return e < m ? 0 : e - 1 >>> v << v
- }
-
- function Pt(e) {
- return null === e || void 0 === e ? It() : Tt(e) ? e : It().withMutations(function(t) {
- var n = r(e);
- Le(n.size), n.forEach(function(e, n) {
- return t.set(n, e)
- })
- })
- }
-
- function Tt(e) {
- return qe(e) && c(e)
- }
-
- function Mt(e, t, n, r) {
- var o = Object.create(Pt.prototype);
- return o.size = e ? e.size : 0, o._map = e, o._list = t, o.__ownerID = n, o.__hash = r, o
- }
-
- function It() {
- return yt || (yt = Mt(Xe(), Et()))
- }
-
- function jt(e, t, n) {
- var r, o, i = e._map,
- a = e._list,
- u = i.get(t),
- s = void 0 !== u;
- if (n === y) {
- if (!s) return e;
- a.size >= m && a.size >= 2 * i.size ? (r = (o = a.filter(function(e, t) {
- return void 0 !== e && u !== t
- })).toKeyedSeq().map(function(e) {
- return e[0]
- }).flip().toMap(), e.__ownerID && (r.__ownerID = o.__ownerID = e.__ownerID)) : (r = i.remove(t), o = u === a.size - 1 ? a.pop() : a.set(u, void 0))
- } else if (s) {
- if (n === a.get(u)[1]) return e;
- r = i, o = a.set(u, [t, n])
- } else r = i.set(t, a.size), o = a.set(a.size, [t, n]);
- return e.__ownerID ? (e.size = r.size, e._map = r, e._list = o, e.__hash = void 0, e) : Mt(r, o)
- }
-
- function Nt(e, t) {
- this._iter = e, this._useKeys = t, this.size = e.size
- }
-
- function Rt(e) {
- this._iter = e, this.size = e.size
- }
-
- function Dt(e) {
- this._iter = e, this.size = e.size
- }
-
- function Lt(e) {
- this._iter = e, this.size = e.size
- }
-
- function Ut(e) {
- var t = Qt(e);
- return t._iter = e, t.size = e.size, t.flip = function() {
- return e
- }, t.reverse = function() {
- var t = e.reverse.apply(this);
- return t.flip = function() {
- return e.reverse()
- }, t
- }, t.has = function(t) {
- return e.includes(t)
- }, t.includes = function(t) {
- return e.has(t)
- }, t.cacheResult = en, t.__iterateUncached = function(t, n) {
- var r = this;
- return e.__iterate(function(e, n) {
- return !1 !== t(n, e, r)
- }, n)
- }, t.__iteratorUncached = function(t, n) {
- if (t === N) {
- var r = e.__iterator(t, n);
- return new U(function() {
- var e = r.next();
- if (!e.done) {
- var t = e.value[0];
- e.value[0] = e.value[1], e.value[1] = t
- }
- return e
- })
- }
- return e.__iterator(t === j ? I : j, n)
- }, t
- }
-
- function qt(e, t, n) {
- var r = Qt(e);
- return r.size = e.size, r.has = function(t) {
- return e.has(t)
- }, r.get = function(r, o) {
- var i = e.get(r, y);
- return i === y ? o : t.call(n, i, r, e)
- }, r.__iterateUncached = function(r, o) {
- var i = this;
- return e.__iterate(function(e, o, a) {
- return !1 !== r(t.call(n, e, o, a), o, i)
- }, o)
- }, r.__iteratorUncached = function(r, o) {
- var i = e.__iterator(N, o);
- return new U(function() {
- var o = i.next();
- if (o.done) return o;
- var a = o.value,
- u = a[0];
- return q(r, u, t.call(n, a[1], u, e), o)
- })
- }, r
- }
-
- function Ft(e, t) {
- var n = Qt(e);
- return n._iter = e, n.size = e.size, n.reverse = function() {
- return e
- }, e.flip && (n.flip = function() {
- var t = Ut(e);
- return t.reverse = function() {
- return e.flip()
- }, t
- }), n.get = function(n, r) {
- return e.get(t ? n : -1 - n, r)
- }, n.has = function(n) {
- return e.has(t ? n : -1 - n)
- }, n.includes = function(t) {
- return e.includes(t)
- }, n.cacheResult = en, n.__iterate = function(t, n) {
- var r = this;
- return e.__iterate(function(e, n) {
- return t(e, n, r)
- }, !n)
- }, n.__iterator = function(t, n) {
- return e.__iterator(t, !n)
- }, n
- }
-
- function zt(e, t, n, r) {
- var o = Qt(e);
- return r && (o.has = function(r) {
- var o = e.get(r, y);
- return o !== y && !!t.call(n, o, r, e)
- }, o.get = function(r, o) {
- var i = e.get(r, y);
- return i !== y && t.call(n, i, r, e) ? i : o
- }), o.__iterateUncached = function(o, i) {
- var a = this,
- u = 0;
- return e.__iterate(function(e, i, s) {
- if (t.call(n, e, i, s)) return u++, o(e, r ? i : u - 1, a)
- }, i), u
- }, o.__iteratorUncached = function(o, i) {
- var a = e.__iterator(N, i),
- u = 0;
- return new U(function() {
- for (;;) {
- var i = a.next();
- if (i.done) return i;
- var s = i.value,
- l = s[0],
- c = s[1];
- if (t.call(n, c, l, e)) return q(o, r ? l : u++, c, i)
- }
- })
- }, o
- }
-
- function Bt(e, t, n, r) {
- var o = e.size;
- if (void 0 !== t && (t |= 0), void 0 !== n && (n === 1 / 0 ? n = o : n |= 0), O(t, n, o)) return e;
- var i = P(t, o),
- a = T(n, o);
- if (i != i || a != a) return Bt(e.toSeq().cacheResult(), t, n, r);
- var u, s = a - i;
- s == s && (u = s < 0 ? 0 : s);
- var l = Qt(e);
- return l.size = 0 === u ? u : e.size && u || void 0, !r && oe(e) && u >= 0 && (l.get = function(t, n) {
- return (t = k(this, t)) >= 0 && t < u ? e.get(t + i, n) : n
- }), l.__iterateUncached = function(t, n) {
- var o = this;
- if (0 === u) return 0;
- if (n) return this.cacheResult().__iterate(t, n);
- var a = 0,
- s = !0,
- l = 0;
- return e.__iterate(function(e, n) {
- if (!s || !(s = a++ < i)) return l++, !1 !== t(e, r ? n : l - 1, o) && l !== u
- }), l
- }, l.__iteratorUncached = function(t, n) {
- if (0 !== u && n) return this.cacheResult().__iterator(t, n);
- var o = 0 !== u && e.__iterator(t, n),
- a = 0,
- s = 0;
- return new U(function() {
- for (; a++ < i;) o.next();
- if (++s > u) return {
- value: void 0,
- done: !0
- };
- var e = o.next();
- return r || t === j ? e : q(t, s - 1, t === I ? void 0 : e.value[1], e)
- })
- }, l
- }
-
- function Vt(e, t, n, r) {
- var o = Qt(e);
- return o.__iterateUncached = function(o, i) {
- var a = this;
- if (i) return this.cacheResult().__iterate(o, i);
- var u = !0,
- s = 0;
- return e.__iterate(function(e, i, l) {
- if (!u || !(u = t.call(n, e, i, l))) return s++, o(e, r ? i : s - 1, a)
- }), s
- }, o.__iteratorUncached = function(o, i) {
- var a = this;
- if (i) return this.cacheResult().__iterator(o, i);
- var u = e.__iterator(N, i),
- s = !0,
- l = 0;
- return new U(function() {
- var e, i, c;
- do {
- if ((e = u.next()).done) return r || o === j ? e : q(o, l++, o === I ? void 0 : e.value[1], e);
- var f = e.value;
- i = f[0], c = f[1], s && (s = t.call(n, c, i, a))
- } while (s);
- return o === N ? e : q(o, i, c, e)
- })
- }, o
- }
-
- function Ht(e, t, n) {
- var r = Qt(e);
- return r.__iterateUncached = function(r, o) {
- var i = 0,
- u = !1;
- return function e(s, l) {
- var c = this;
- s.__iterate(function(o, s) {
- return (!t || l < t) && a(o) ? e(o, l + 1) : !1 === r(o, n ? s : i++, c) && (u = !0), !u
- }, o)
- }(e, 0), i
- }, r.__iteratorUncached = function(r, o) {
- var i = e.__iterator(r, o),
- u = [],
- s = 0;
- return new U(function() {
- for (; i;) {
- var e = i.next();
- if (!1 === e.done) {
- var l = e.value;
- if (r === N && (l = l[1]), t && !(u.length < t) || !a(l)) return n ? e : q(r, s++, l, e);
- u.push(i), i = l.__iterator(r, o)
- } else i = u.pop()
- }
- return {
- value: void 0,
- done: !0
- }
- })
- }, r
- }
-
- function Wt(e, t, n) {
- t || (t = tn);
- var r = u(e),
- o = 0,
- i = e.toSeq().map(function(t, r) {
- return [r, t, o++, n ? n(t, r, e) : t]
- }).toArray();
- return i.sort(function(e, n) {
- return t(e[3], n[3]) || e[2] - n[2]
- }).forEach(r ? function(e, t) {
- i[t].length = 2
- } : function(e, t) {
- i[t] = e[1]
- }), r ? Y(i) : s(e) ? K(i) : G(i)
- }
-
- function Jt(e, t, n) {
- if (t || (t = tn), n) {
- var r = e.toSeq().map(function(t, r) {
- return [t, n(t, r, e)]
- }).reduce(function(e, n) {
- return Yt(t, e[1], n[1]) ? n : e
- });
- return r && r[0]
- }
- return e.reduce(function(e, n) {
- return Yt(t, e, n) ? n : e
- })
- }
-
- function Yt(e, t, n) {
- var r = e(n, t);
- return 0 === r && n !== t && (void 0 === n || null === n || n != n) || r > 0
- }
-
- function Kt(e, t, r) {
- var o = Qt(e);
- return o.size = new ee(r).map(function(e) {
- return e.size
- }).min(), o.__iterate = function(e, t) {
- for (var n, r = this.__iterator(j, t), o = 0; !(n = r.next()).done && !1 !== e(n.value, o++, this););
- return o
- }, o.__iteratorUncached = function(e, o) {
- var i = r.map(function(e) {
- return e = n(e), V(o ? e.reverse() : e)
- }),
- a = 0,
- u = !1;
- return new U(function() {
- var n;
- return u || (n = i.map(function(e) {
- return e.next()
- }), u = n.some(function(e) {
- return e.done
- })), u ? {
- value: void 0,
- done: !0
- } : q(e, a++, t.apply(null, n.map(function(e) {
- return e.value
- })))
- })
- }, o
- }
-
- function Gt(e, t) {
- return oe(e) ? t : e.constructor(t)
- }
-
- function $t(e) {
- if (e !== Object(e)) throw new TypeError("Expected [K, V] tuple: " + e)
- }
-
- function Zt(e) {
- return Le(e.size), C(e)
- }
-
- function Xt(e) {
- return u(e) ? r : s(e) ? o : i
- }
-
- function Qt(e) {
- return Object.create((u(e) ? Y : s(e) ? K : G).prototype)
- }
-
- function en() {
- return this._iter.cacheResult ? (this._iter.cacheResult(), this.size = this._iter.size, this) : J.prototype.cacheResult.call(this)
- }
-
- function tn(e, t) {
- return e > t ? 1 : e < t ? -1 : 0
- }
-
- function nn(e) {
- var t = V(e);
- if (!t) {
- if (!W(e)) throw new TypeError("Expected iterable or array-like: " + e);
- t = V(n(e))
- }
- return t
- }
-
- function rn(e, t) {
- var n, r = function(i) {
- if (i instanceof r) return i;
- if (!(this instanceof r)) return new r(i);
- if (!n) {
- n = !0;
- var a = Object.keys(e);
- ! function(e, t) {
- try {
- t.forEach(function(e, t) {
- Object.defineProperty(e, t, {
- get: function() {
- return this.get(t)
- },
- set: function(e) {
- ge(this.__ownerID, "Cannot set on an immutable record."), this.set(t, e)
- }
- })
- }.bind(void 0, e))
- } catch (e) {}
- }(o, a), o.size = a.length, o._name = t, o._keys = a, o._defaultValues = e
- }
- this._map = Ue(i)
- },
- o = r.prototype = Object.create(on);
- return o.constructor = r, r
- }
- t(Pt, Ue), Pt.of = function() {
- return this(arguments)
- }, Pt.prototype.toString = function() {
- return this.__toString("OrderedMap {", "}")
- }, Pt.prototype.get = function(e, t) {
- var n = this._map.get(e);
- return void 0 !== n ? this._list.get(n)[1] : t
- }, Pt.prototype.clear = function() {
- return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._map.clear(), this._list.clear(), this) : It()
- }, Pt.prototype.set = function(e, t) {
- return jt(this, e, t)
- }, Pt.prototype.remove = function(e) {
- return jt(this, e, y)
- }, Pt.prototype.wasAltered = function() {
- return this._map.wasAltered() || this._list.wasAltered()
- }, Pt.prototype.__iterate = function(e, t) {
- var n = this;
- return this._list.__iterate(function(t) {
- return t && e(t[1], t[0], n)
- }, t)
- }, Pt.prototype.__iterator = function(e, t) {
- return this._list.fromEntrySeq().__iterator(e, t)
- }, Pt.prototype.__ensureOwner = function(e) {
- if (e === this.__ownerID) return this;
- var t = this._map.__ensureOwner(e),
- n = this._list.__ensureOwner(e);
- return e ? Mt(t, n, e, this.__hash) : (this.__ownerID = e, this._map = t, this._list = n, this)
- }, Pt.isOrderedMap = Tt, Pt.prototype[h] = !0, Pt.prototype.delete = Pt.prototype.remove, t(Nt, Y), Nt.prototype.get = function(e, t) {
- return this._iter.get(e, t)
- }, Nt.prototype.has = function(e) {
- return this._iter.has(e)
- }, Nt.prototype.valueSeq = function() {
- return this._iter.valueSeq()
- }, Nt.prototype.reverse = function() {
- var e = this,
- t = Ft(this, !0);
- return this._useKeys || (t.valueSeq = function() {
- return e._iter.toSeq().reverse()
- }), t
- }, Nt.prototype.map = function(e, t) {
- var n = this,
- r = qt(this, e, t);
- return this._useKeys || (r.valueSeq = function() {
- return n._iter.toSeq().map(e, t)
- }), r
- }, Nt.prototype.__iterate = function(e, t) {
- var n, r = this;
- return this._iter.__iterate(this._useKeys ? function(t, n) {
- return e(t, n, r)
- } : (n = t ? Zt(this) : 0, function(o) {
- return e(o, t ? --n : n++, r)
- }), t)
- }, Nt.prototype.__iterator = function(e, t) {
- if (this._useKeys) return this._iter.__iterator(e, t);
- var n = this._iter.__iterator(j, t),
- r = t ? Zt(this) : 0;
- return new U(function() {
- var o = n.next();
- return o.done ? o : q(e, t ? --r : r++, o.value, o)
- })
- }, Nt.prototype[h] = !0, t(Rt, K), Rt.prototype.includes = function(e) {
- return this._iter.includes(e)
- }, Rt.prototype.__iterate = function(e, t) {
- var n = this,
- r = 0;
- return this._iter.__iterate(function(t) {
- return e(t, r++, n)
- }, t)
- }, Rt.prototype.__iterator = function(e, t) {
- var n = this._iter.__iterator(j, t),
- r = 0;
- return new U(function() {
- var t = n.next();
- return t.done ? t : q(e, r++, t.value, t)
- })
- }, t(Dt, G), Dt.prototype.has = function(e) {
- return this._iter.includes(e)
- }, Dt.prototype.__iterate = function(e, t) {
- var n = this;
- return this._iter.__iterate(function(t) {
- return e(t, t, n)
- }, t)
- }, Dt.prototype.__iterator = function(e, t) {
- var n = this._iter.__iterator(j, t);
- return new U(function() {
- var t = n.next();
- return t.done ? t : q(e, t.value, t.value, t)
- })
- }, t(Lt, Y), Lt.prototype.entrySeq = function() {
- return this._iter.toSeq()
- }, Lt.prototype.__iterate = function(e, t) {
- var n = this;
- return this._iter.__iterate(function(t) {
- if (t) {
- $t(t);
- var r = a(t);
- return e(r ? t.get(1) : t[1], r ? t.get(0) : t[0], n)
- }
- }, t)
- }, Lt.prototype.__iterator = function(e, t) {
- var n = this._iter.__iterator(j, t);
- return new U(function() {
- for (;;) {
- var t = n.next();
- if (t.done) return t;
- var r = t.value;
- if (r) {
- $t(r);
- var o = a(r);
- return q(e, o ? r.get(0) : r[0], o ? r.get(1) : r[1], t)
- }
- }
- })
- }, Rt.prototype.cacheResult = Nt.prototype.cacheResult = Dt.prototype.cacheResult = Lt.prototype.cacheResult = en, t(rn, _e), rn.prototype.toString = function() {
- return this.__toString(un(this) + " {", "}")
- }, rn.prototype.has = function(e) {
- return this._defaultValues.hasOwnProperty(e)
- }, rn.prototype.get = function(e, t) {
- if (!this.has(e)) return t;
- var n = this._defaultValues[e];
- return this._map ? this._map.get(e, n) : n
- }, rn.prototype.clear = function() {
- if (this.__ownerID) return this._map && this._map.clear(), this;
- var e = this.constructor;
- return e._empty || (e._empty = an(this, Xe()))
- }, rn.prototype.set = function(e, t) {
- if (!this.has(e)) throw new Error('Cannot set unknown key "' + e + '" on ' + un(this));
- if (this._map && !this._map.has(e) && t === this._defaultValues[e]) return this;
- var n = this._map && this._map.set(e, t);
- return this.__ownerID || n === this._map ? this : an(this, n)
- }, rn.prototype.remove = function(e) {
- if (!this.has(e)) return this;
- var t = this._map && this._map.remove(e);
- return this.__ownerID || t === this._map ? this : an(this, t)
- }, rn.prototype.wasAltered = function() {
- return this._map.wasAltered()
- }, rn.prototype.__iterator = function(e, t) {
- var n = this;
- return r(this._defaultValues).map(function(e, t) {
- return n.get(t)
- }).__iterator(e, t)
- }, rn.prototype.__iterate = function(e, t) {
- var n = this;
- return r(this._defaultValues).map(function(e, t) {
- return n.get(t)
- }).__iterate(e, t)
- }, rn.prototype.__ensureOwner = function(e) {
- if (e === this.__ownerID) return this;
- var t = this._map && this._map.__ensureOwner(e);
- return e ? an(this, t, e) : (this.__ownerID = e, this._map = t, this)
- };
- var on = rn.prototype;
-
- function an(e, t, n) {
- var r = Object.create(Object.getPrototypeOf(e));
- return r._map = t, r.__ownerID = n, r
- }
-
- function un(e) {
- return e._name || e.constructor.name || "Record"
- }
-
- function sn(e) {
- return null === e || void 0 === e ? vn() : ln(e) && !c(e) ? e : vn().withMutations(function(t) {
- var n = i(e);
- Le(n.size), n.forEach(function(e) {
- return t.add(e)
- })
- })
- }
-
- function ln(e) {
- return !(!e || !e[fn])
- }
- on.delete = on.remove, on.deleteIn = on.removeIn = Be.removeIn, on.merge = Be.merge, on.mergeWith = Be.mergeWith, on.mergeIn = Be.mergeIn, on.mergeDeep = Be.mergeDeep, on.mergeDeepWith = Be.mergeDeepWith, on.mergeDeepIn = Be.mergeDeepIn, on.setIn = Be.setIn, on.update = Be.update, on.updateIn = Be.updateIn, on.withMutations = Be.withMutations, on.asMutable = Be.asMutable, on.asImmutable = Be.asImmutable, t(sn, Ee), sn.of = function() {
- return this(arguments)
- }, sn.fromKeys = function(e) {
- return this(r(e).keySeq())
- }, sn.prototype.toString = function() {
- return this.__toString("Set {", "}")
- }, sn.prototype.has = function(e) {
- return this._map.has(e)
- }, sn.prototype.add = function(e) {
- return dn(this, this._map.set(e, !0))
- }, sn.prototype.remove = function(e) {
- return dn(this, this._map.remove(e))
- }, sn.prototype.clear = function() {
- return dn(this, this._map.clear())
- }, sn.prototype.union = function() {
- var t = e.call(arguments, 0);
- return 0 === (t = t.filter(function(e) {
- return 0 !== e.size
- })).length ? this : 0 !== this.size || this.__ownerID || 1 !== t.length ? this.withMutations(function(e) {
- for (var n = 0; n < t.length; n++) i(t[n]).forEach(function(t) {
- return e.add(t)
- })
- }) : this.constructor(t[0])
- }, sn.prototype.intersect = function() {
- var t = e.call(arguments, 0);
- if (0 === t.length) return this;
- t = t.map(function(e) {
- return i(e)
- });
- var n = this;
- return this.withMutations(function(e) {
- n.forEach(function(n) {
- t.every(function(e) {
- return e.includes(n)
- }) || e.remove(n)
- })
- })
- }, sn.prototype.subtract = function() {
- var t = e.call(arguments, 0);
- if (0 === t.length) return this;
- t = t.map(function(e) {
- return i(e)
- });
- var n = this;
- return this.withMutations(function(e) {
- n.forEach(function(n) {
- t.some(function(e) {
- return e.includes(n)
- }) && e.remove(n)
- })
- })
- }, sn.prototype.merge = function() {
- return this.union.apply(this, arguments)
- }, sn.prototype.mergeWith = function(t) {
- var n = e.call(arguments, 1);
- return this.union.apply(this, n)
- }, sn.prototype.sort = function(e) {
- return mn(Wt(this, e))
- }, sn.prototype.sortBy = function(e, t) {
- return mn(Wt(this, t, e))
- }, sn.prototype.wasAltered = function() {
- return this._map.wasAltered()
- }, sn.prototype.__iterate = function(e, t) {
- var n = this;
- return this._map.__iterate(function(t, r) {
- return e(r, r, n)
- }, t)
- }, sn.prototype.__iterator = function(e, t) {
- return this._map.map(function(e, t) {
- return t
- }).__iterator(e, t)
- }, sn.prototype.__ensureOwner = function(e) {
- if (e === this.__ownerID) return this;
- var t = this._map.__ensureOwner(e);
- return e ? this.__make(t, e) : (this.__ownerID = e, this._map = t, this)
- }, sn.isSet = ln;
- var cn, fn = "@@__IMMUTABLE_SET__@@",
- pn = sn.prototype;
-
- function dn(e, t) {
- return e.__ownerID ? (e.size = t.size, e._map = t, e) : t === e._map ? e : 0 === t.size ? e.__empty() : e.__make(t)
- }
-
- function hn(e, t) {
- var n = Object.create(pn);
- return n.size = e ? e.size : 0, n._map = e, n.__ownerID = t, n
- }
-
- function vn() {
- return cn || (cn = hn(Xe()))
- }
-
- function mn(e) {
- return null === e || void 0 === e ? wn() : gn(e) ? e : wn().withMutations(function(t) {
- var n = i(e);
- Le(n.size), n.forEach(function(e) {
- return t.add(e)
- })
- })
- }
-
- function gn(e) {
- return ln(e) && c(e)
- }
- pn[fn] = !0, pn.delete = pn.remove, pn.mergeDeep = pn.merge, pn.mergeDeepWith = pn.mergeWith, pn.withMutations = Be.withMutations, pn.asMutable = Be.asMutable, pn.asImmutable = Be.asImmutable, pn.__empty = vn, pn.__make = hn, t(mn, sn), mn.of = function() {
- return this(arguments)
- }, mn.fromKeys = function(e) {
- return this(r(e).keySeq())
- }, mn.prototype.toString = function() {
- return this.__toString("OrderedSet {", "}")
- }, mn.isOrderedSet = gn;
- var yn, bn = mn.prototype;
-
- function _n(e, t) {
- var n = Object.create(bn);
- return n.size = e ? e.size : 0, n._map = e, n.__ownerID = t, n
- }
-
- function wn() {
- return yn || (yn = _n(It()))
- }
-
- function En(e) {
- return null === e || void 0 === e ? On() : xn(e) ? e : On().unshiftAll(e)
- }
-
- function xn(e) {
- return !(!e || !e[Cn])
- }
- bn[h] = !0, bn.__empty = wn, bn.__make = _n, t(En, we), En.of = function() {
- return this(arguments)
- }, En.prototype.toString = function() {
- return this.__toString("Stack [", "]")
- }, En.prototype.get = function(e, t) {
- var n = this._head;
- for (e = k(this, e); n && e--;) n = n.next;
- return n ? n.value : t
- }, En.prototype.peek = function() {
- return this._head && this._head.value
- }, En.prototype.push = function() {
- if (0 === arguments.length) return this;
- for (var e = this.size + arguments.length, t = this._head, n = arguments.length - 1; n >= 0; n--) t = {
- value: arguments[n],
- next: t
- };
- return this.__ownerID ? (this.size = e, this._head = t, this.__hash = void 0, this.__altered = !0, this) : An(e, t)
- }, En.prototype.pushAll = function(e) {
- if (0 === (e = o(e)).size) return this;
- Le(e.size);
- var t = this.size,
- n = this._head;
- return e.reverse().forEach(function(e) {
- t++, n = {
- value: e,
- next: n
- }
- }), this.__ownerID ? (this.size = t, this._head = n, this.__hash = void 0, this.__altered = !0, this) : An(t, n)
- }, En.prototype.pop = function() {
- return this.slice(1)
- }, En.prototype.unshift = function() {
- return this.push.apply(this, arguments)
- }, En.prototype.unshiftAll = function(e) {
- return this.pushAll(e)
- }, En.prototype.shift = function() {
- return this.pop.apply(this, arguments)
- }, En.prototype.clear = function() {
- return 0 === this.size ? this : this.__ownerID ? (this.size = 0, this._head = void 0, this.__hash = void 0, this.__altered = !0, this) : On()
- }, En.prototype.slice = function(e, t) {
- if (O(e, t, this.size)) return this;
- var n = P(e, this.size);
- if (T(t, this.size) !== this.size) return we.prototype.slice.call(this, e, t);
- for (var r = this.size - n, o = this._head; n--;) o = o.next;
- return this.__ownerID ? (this.size = r, this._head = o, this.__hash = void 0, this.__altered = !0, this) : An(r, o)
- }, En.prototype.__ensureOwner = function(e) {
- return e === this.__ownerID ? this : e ? An(this.size, this._head, e, this.__hash) : (this.__ownerID = e, this.__altered = !1, this)
- }, En.prototype.__iterate = function(e, t) {
- if (t) return this.reverse().__iterate(e);
- for (var n = 0, r = this._head; r && !1 !== e(r.value, n++, this);) r = r.next;
- return n
- }, En.prototype.__iterator = function(e, t) {
- if (t) return this.reverse().__iterator(e);
- var n = 0,
- r = this._head;
- return new U(function() {
- if (r) {
- var t = r.value;
- return r = r.next, q(e, n++, t)
- }
- return {
- value: void 0,
- done: !0
- }
- })
- }, En.isStack = xn;
- var Sn, Cn = "@@__IMMUTABLE_STACK__@@",
- kn = En.prototype;
-
- function An(e, t, n, r) {
- var o = Object.create(kn);
- return o.size = e, o._head = t, o.__ownerID = n, o.__hash = r, o.__altered = !1, o
- }
-
- function On() {
- return Sn || (Sn = An(0))
- }
-
- function Pn(e, t) {
- var n = function(n) {
- e.prototype[n] = t[n]
- };
- return Object.keys(t).forEach(n), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(t).forEach(n), e
- }
- kn[Cn] = !0, kn.withMutations = Be.withMutations, kn.asMutable = Be.asMutable, kn.asImmutable = Be.asImmutable, kn.wasAltered = Be.wasAltered, n.Iterator = U, Pn(n, {
- toArray: function() {
- Le(this.size);
- var e = new Array(this.size || 0);
- return this.valueSeq().__iterate(function(t, n) {
- e[n] = t
- }), e
- },
- toIndexedSeq: function() {
- return new Rt(this)
- },
- toJS: function() {
- return this.toSeq().map(function(e) {
- return e && "function" == typeof e.toJS ? e.toJS() : e
- }).__toJS()
- },
- toJSON: function() {
- return this.toSeq().map(function(e) {
- return e && "function" == typeof e.toJSON ? e.toJSON() : e
- }).__toJS()
- },
- toKeyedSeq: function() {
- return new Nt(this, !0)
- },
- toMap: function() {
- return Ue(this.toKeyedSeq())
- },
- toObject: function() {
- Le(this.size);
- var e = {};
- return this.__iterate(function(t, n) {
- e[n] = t
- }), e
- },
- toOrderedMap: function() {
- return Pt(this.toKeyedSeq())
- },
- toOrderedSet: function() {
- return mn(u(this) ? this.valueSeq() : this)
- },
- toSet: function() {
- return sn(u(this) ? this.valueSeq() : this)
- },
- toSetSeq: function() {
- return new Dt(this)
- },
- toSeq: function() {
- return s(this) ? this.toIndexedSeq() : u(this) ? this.toKeyedSeq() : this.toSetSeq()
- },
- toStack: function() {
- return En(u(this) ? this.valueSeq() : this)
- },
- toList: function() {
- return pt(u(this) ? this.valueSeq() : this)
- },
- toString: function() {
- return "[Iterable]"
- },
- __toString: function(e, t) {
- return 0 === this.size ? e + t : e + " " + this.toSeq().map(this.__toStringMapper).join(", ") + " " + t
- },
- concat: function() {
- return Gt(this, function(e, t) {
- var n = u(e),
- o = [e].concat(t).map(function(e) {
- return a(e) ? n && (e = r(e)) : e = n ? ae(e) : ue(Array.isArray(e) ? e : [e]), e
- }).filter(function(e) {
- return 0 !== e.size
- });
- if (0 === o.length) return e;
- if (1 === o.length) {
- var i = o[0];
- if (i === e || n && u(i) || s(e) && s(i)) return i
- }
- var l = new ee(o);
- return n ? l = l.toKeyedSeq() : s(e) || (l = l.toSetSeq()), (l = l.flatten(!0)).size = o.reduce(function(e, t) {
- if (void 0 !== e) {
- var n = t.size;
- if (void 0 !== n) return e + n
- }
- }, 0), l
- }(this, e.call(arguments, 0)))
- },
- includes: function(e) {
- return this.some(function(t) {
- return he(t, e)
- })
- },
- entries: function() {
- return this.__iterator(N)
- },
- every: function(e, t) {
- Le(this.size);
- var n = !0;
- return this.__iterate(function(r, o, i) {
- if (!e.call(t, r, o, i)) return n = !1, !1
- }), n
- },
- filter: function(e, t) {
- return Gt(this, zt(this, e, t, !0))
- },
- find: function(e, t, n) {
- var r = this.findEntry(e, t);
- return r ? r[1] : n
- },
- forEach: function(e, t) {
- return Le(this.size), this.__iterate(t ? e.bind(t) : e)
- },
- join: function(e) {
- Le(this.size), e = void 0 !== e ? "" + e : ",";
- var t = "",
- n = !0;
- return this.__iterate(function(r) {
- n ? n = !1 : t += e, t += null !== r && void 0 !== r ? r.toString() : ""
- }), t
- },
- keys: function() {
- return this.__iterator(I)
- },
- map: function(e, t) {
- return Gt(this, qt(this, e, t))
- },
- reduce: function(e, t, n) {
- var r, o;
- return Le(this.size), arguments.length < 2 ? o = !0 : r = t, this.__iterate(function(t, i, a) {
- o ? (o = !1, r = t) : r = e.call(n, r, t, i, a)
- }), r
- },
- reduceRight: function(e, t, n) {
- var r = this.toKeyedSeq().reverse();
- return r.reduce.apply(r, arguments)
- },
- reverse: function() {
- return Gt(this, Ft(this, !0))
- },
- slice: function(e, t) {
- return Gt(this, Bt(this, e, t, !0))
- },
- some: function(e, t) {
- return !this.every(Nn(e), t)
- },
- sort: function(e) {
- return Gt(this, Wt(this, e))
- },
- values: function() {
- return this.__iterator(j)
- },
- butLast: function() {
- return this.slice(0, -1)
- },
- isEmpty: function() {
- return void 0 !== this.size ? 0 === this.size : !this.some(function() {
- return !0
- })
- },
- count: function(e, t) {
- return C(e ? this.toSeq().filter(e, t) : this)
- },
- countBy: function(e, t) {
- return function(e, t, n) {
- var r = Ue().asMutable();
- return e.__iterate(function(o, i) {
- r.update(t.call(n, o, i, e), 0, function(e) {
- return e + 1
- })
- }), r.asImmutable()
- }(this, e, t)
- },
- equals: function(e) {
- return ve(this, e)
- },
- entrySeq: function() {
- var e = this;
- if (e._cache) return new ee(e._cache);
- var t = e.toSeq().map(jn).toIndexedSeq();
- return t.fromEntrySeq = function() {
- return e.toSeq()
- }, t
- },
- filterNot: function(e, t) {
- return this.filter(Nn(e), t)
- },
- findEntry: function(e, t, n) {
- var r = n;
- return this.__iterate(function(n, o, i) {
- if (e.call(t, n, o, i)) return r = [o, n], !1
- }), r
- },
- findKey: function(e, t) {
- var n = this.findEntry(e, t);
- return n && n[0]
- },
- findLast: function(e, t, n) {
- return this.toKeyedSeq().reverse().find(e, t, n)
- },
- findLastEntry: function(e, t, n) {
- return this.toKeyedSeq().reverse().findEntry(e, t, n)
- },
- findLastKey: function(e, t) {
- return this.toKeyedSeq().reverse().findKey(e, t)
- },
- first: function() {
- return this.find(A)
- },
- flatMap: function(e, t) {
- return Gt(this, function(e, t, n) {
- var r = Xt(e);
- return e.toSeq().map(function(o, i) {
- return r(t.call(n, o, i, e))
- }).flatten(!0)
- }(this, e, t))
- },
- flatten: function(e) {
- return Gt(this, Ht(this, e, !0))
- },
- fromEntrySeq: function() {
- return new Lt(this)
- },
- get: function(e, t) {
- return this.find(function(t, n) {
- return he(n, e)
- }, void 0, t)
- },
- getIn: function(e, t) {
- for (var n, r = this, o = nn(e); !(n = o.next()).done;) {
- var i = n.value;
- if ((r = r && r.get ? r.get(i, y) : y) === y) return t
- }
- return r
- },
- groupBy: function(e, t) {
- return function(e, t, n) {
- var r = u(e),
- o = (c(e) ? Pt() : Ue()).asMutable();
- e.__iterate(function(i, a) {
- o.update(t.call(n, i, a, e), function(e) {
- return (e = e || []).push(r ? [a, i] : i), e
- })
- });
- var i = Xt(e);
- return o.map(function(t) {
- return Gt(e, i(t))
- })
- }(this, e, t)
- },
- has: function(e) {
- return this.get(e, y) !== y
- },
- hasIn: function(e) {
- return this.getIn(e, y) !== y
- },
- isSubset: function(e) {
- return e = "function" == typeof e.includes ? e : n(e), this.every(function(t) {
- return e.includes(t)
- })
- },
- isSuperset: function(e) {
- return (e = "function" == typeof e.isSubset ? e : n(e)).isSubset(this)
- },
- keyOf: function(e) {
- return this.findKey(function(t) {
- return he(t, e)
- })
- },
- keySeq: function() {
- return this.toSeq().map(In).toIndexedSeq()
- },
- last: function() {
- return this.toSeq().reverse().first()
- },
- lastKeyOf: function(e) {
- return this.toKeyedSeq().reverse().keyOf(e)
- },
- max: function(e) {
- return Jt(this, e)
- },
- maxBy: function(e, t) {
- return Jt(this, t, e)
- },
- min: function(e) {
- return Jt(this, e ? Rn(e) : Un)
- },
- minBy: function(e, t) {
- return Jt(this, t ? Rn(t) : Un, e)
- },
- rest: function() {
- return this.slice(1)
- },
- skip: function(e) {
- return this.slice(Math.max(0, e))
- },
- skipLast: function(e) {
- return Gt(this, this.toSeq().reverse().skip(e).reverse())
- },
- skipWhile: function(e, t) {
- return Gt(this, Vt(this, e, t, !0))
- },
- skipUntil: function(e, t) {
- return this.skipWhile(Nn(e), t)
- },
- sortBy: function(e, t) {
- return Gt(this, Wt(this, t, e))
- },
- take: function(e) {
- return this.slice(0, Math.max(0, e))
- },
- takeLast: function(e) {
- return Gt(this, this.toSeq().reverse().take(e).reverse())
- },
- takeWhile: function(e, t) {
- return Gt(this, function(e, t, n) {
- var r = Qt(e);
- return r.__iterateUncached = function(r, o) {
- var i = this;
- if (o) return this.cacheResult().__iterate(r, o);
- var a = 0;
- return e.__iterate(function(e, o, u) {
- return t.call(n, e, o, u) && ++a && r(e, o, i)
- }), a
- }, r.__iteratorUncached = function(r, o) {
- var i = this;
- if (o) return this.cacheResult().__iterator(r, o);
- var a = e.__iterator(N, o),
- u = !0;
- return new U(function() {
- if (!u) return {
- value: void 0,
- done: !0
- };
- var e = a.next();
- if (e.done) return e;
- var o = e.value,
- s = o[0],
- l = o[1];
- return t.call(n, l, s, i) ? r === N ? e : q(r, s, l, e) : (u = !1, {
- value: void 0,
- done: !0
- })
- })
- }, r
- }(this, e, t))
- },
- takeUntil: function(e, t) {
- return this.takeWhile(Nn(e), t)
- },
- valueSeq: function() {
- return this.toIndexedSeq()
- },
- hashCode: function() {
- return this.__hash || (this.__hash = function(e) {
- if (e.size === 1 / 0) return 0;
- var t = c(e),
- n = u(e),
- r = t ? 1 : 0;
- return function(e, t) {
- return t = xe(t, 3432918353), t = xe(t << 15 | t >>> -15, 461845907), t = xe(t << 13 | t >>> -13, 5), t = xe((t = (t + 3864292196 | 0) ^ e) ^ t >>> 16, 2246822507), t = Se((t = xe(t ^ t >>> 13, 3266489909)) ^ t >>> 16)
- }(e.__iterate(n ? t ? function(e, t) {
- r = 31 * r + qn(Ce(e), Ce(t)) | 0
- } : function(e, t) {
- r = r + qn(Ce(e), Ce(t)) | 0
- } : t ? function(e) {
- r = 31 * r + Ce(e) | 0
- } : function(e) {
- r = r + Ce(e) | 0
- }), r)
- }(this))
- }
- });
- var Tn = n.prototype;
- Tn[f] = !0, Tn[L] = Tn.values, Tn.__toJS = Tn.toArray, Tn.__toStringMapper = Dn, Tn.inspect = Tn.toSource = function() {
- return this.toString()
- }, Tn.chain = Tn.flatMap, Tn.contains = Tn.includes, Pn(r, {
- flip: function() {
- return Gt(this, Ut(this))
- },
- mapEntries: function(e, t) {
- var n = this,
- r = 0;
- return Gt(this, this.toSeq().map(function(o, i) {
- return e.call(t, [i, o], r++, n)
- }).fromEntrySeq())
- },
- mapKeys: function(e, t) {
- var n = this;
- return Gt(this, this.toSeq().flip().map(function(r, o) {
- return e.call(t, r, o, n)
- }).flip())
- }
- });
- var Mn = r.prototype;
-
- function In(e, t) {
- return t
- }
-
- function jn(e, t) {
- return [t, e]
- }
-
- function Nn(e) {
- return function() {
- return !e.apply(this, arguments)
- }
- }
-
- function Rn(e) {
- return function() {
- return -e.apply(this, arguments)
- }
- }
-
- function Dn(e) {
- return "string" == typeof e ? JSON.stringify(e) : String(e)
- }
-
- function Ln() {
- return S(arguments)
- }
-
- function Un(e, t) {
- return e < t ? 1 : e > t ? -1 : 0
- }
-
- function qn(e, t) {
- return e ^ t + 2654435769 + (e << 6) + (e >> 2) | 0
- }
- return Mn[p] = !0, Mn[L] = Tn.entries, Mn.__toJS = Tn.toObject, Mn.__toStringMapper = function(e, t) {
- return JSON.stringify(t) + ": " + Dn(e)
- }, Pn(o, {
- toKeyedSeq: function() {
- return new Nt(this, !1)
- },
- filter: function(e, t) {
- return Gt(this, zt(this, e, t, !1))
- },
- findIndex: function(e, t) {
- var n = this.findEntry(e, t);
- return n ? n[0] : -1
- },
- indexOf: function(e) {
- var t = this.keyOf(e);
- return void 0 === t ? -1 : t
- },
- lastIndexOf: function(e) {
- var t = this.lastKeyOf(e);
- return void 0 === t ? -1 : t
- },
- reverse: function() {
- return Gt(this, Ft(this, !1))
- },
- slice: function(e, t) {
- return Gt(this, Bt(this, e, t, !1))
- },
- splice: function(e, t) {
- var n = arguments.length;
- if (t = Math.max(0 | t, 0), 0 === n || 2 === n && !t) return this;
- e = P(e, e < 0 ? this.count() : this.size);
- var r = this.slice(0, e);
- return Gt(this, 1 === n ? r : r.concat(S(arguments, 2), this.slice(e + t)))
- },
- findLastIndex: function(e, t) {
- var n = this.findLastEntry(e, t);
- return n ? n[0] : -1
- },
- first: function() {
- return this.get(0)
- },
- flatten: function(e) {
- return Gt(this, Ht(this, e, !1))
- },
- get: function(e, t) {
- return (e = k(this, e)) < 0 || this.size === 1 / 0 || void 0 !== this.size && e > this.size ? t : this.find(function(t, n) {
- return n === e
- }, void 0, t)
- },
- has: function(e) {
- return (e = k(this, e)) >= 0 && (void 0 !== this.size ? this.size === 1 / 0 || e < this.size : -1 !== this.indexOf(e))
- },
- interpose: function(e) {
- return Gt(this, function(e, t) {
- var n = Qt(e);
- return n.size = e.size && 2 * e.size - 1, n.__iterateUncached = function(n, r) {
- var o = this,
- i = 0;
- return e.__iterate(function(e, r) {
- return (!i || !1 !== n(t, i++, o)) && !1 !== n(e, i++, o)
- }, r), i
- }, n.__iteratorUncached = function(n, r) {
- var o, i = e.__iterator(j, r),
- a = 0;
- return new U(function() {
- return (!o || a % 2) && (o = i.next()).done ? o : a % 2 ? q(n, a++, t) : q(n, a++, o.value, o)
- })
- }, n
- }(this, e))
- },
- interleave: function() {
- var e = [this].concat(S(arguments)),
- t = Kt(this.toSeq(), K.of, e),
- n = t.flatten(!0);
- return t.size && (n.size = t.size * e.length), Gt(this, n)
- },
- keySeq: function() {
- return ye(0, this.size)
- },
- last: function() {
- return this.get(-1)
- },
- skipWhile: function(e, t) {
- return Gt(this, Vt(this, e, t, !1))
- },
- zip: function() {
- return Gt(this, Kt(this, Ln, [this].concat(S(arguments))))
- },
- zipWith: function(e) {
- var t = S(arguments);
- return t[0] = this, Gt(this, Kt(this, e, t))
- }
- }), o.prototype[d] = !0, o.prototype[h] = !0, Pn(i, {
- get: function(e, t) {
- return this.has(e) ? e : t
- },
- includes: function(e) {
- return this.has(e)
- },
- keySeq: function() {
- return this.valueSeq()
- }
- }), i.prototype.has = Tn.includes, i.prototype.contains = i.prototype.includes, Pn(Y, r.prototype), Pn(K, o.prototype), Pn(G, i.prototype), Pn(_e, r.prototype), Pn(we, o.prototype), Pn(Ee, i.prototype), {
- Iterable: n,
- Seq: J,
- Collection: be,
- Map: Ue,
- OrderedMap: Pt,
- List: pt,
- Stack: En,
- Set: sn,
- OrderedSet: mn,
- Record: rn,
- Range: ye,
- Repeat: me,
- is: he,
- fromJS: fe
- }
- }, e.exports = r()
- }, function(e, t, n) {
- "use strict";
- var r = function(e) {};
- e.exports = function(e, t, n, o, i, a, u, s) {
- if (r(t), !e) {
- var l;
- if (void 0 === t) l = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
- else {
- var c = [n, o, i, a, u, s],
- f = 0;
- (l = new Error(t.replace(/%s/g, function() {
- return c[f++]
- }))).name = "Invariant Violation"
- }
- throw l.framesToPop = 1, l
- }
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(34);
- e.exports = r
- }, function(e, t, n) {
- "use strict";
- (function(e) {
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.getCommonExtensions = t.getExtensions = t.escapeDeepLinkPath = t.createDeepLinkPath = t.shallowEqualKeys = t.buildFormData = t.sorters = t.btoa = t.serializeSearch = t.parseSearch = t.getSampleSchema = t.validateParam = t.validatePattern = t.validateMinLength = t.validateMaxLength = t.validateGuid = t.validateDateTime = t.validateString = t.validateBoolean = t.validateFile = t.validateInteger = t.validateNumber = t.validateMinimum = t.validateMaximum = t.propChecker = t.memoize = t.isImmutable = void 0;
- var r = _(n(41)),
- o = _(n(18)),
- i = _(n(91)),
- a = _(n(23)),
- u = _(n(42)),
- s = _(n(45));
- t.isJSONObject = function(e) {
- try {
- var t = JSON.parse(e);
- if (t && "object" === (void 0 === t ? "undefined" : (0, s.default)(t))) return t
- } catch (e) {}
- return !1
- }, t.objectify = function(e) {
- return S(e) ? E(e) ? e.toJS() : e : {}
- }, t.arrayify = function(e) {
- return e ? e.toArray ? e.toArray() : x(e) : []
- }, t.fromJSOrdered = function e(t) {
- if (E(t)) return t;
- if (t instanceof y.default.File) return t;
- return S(t) ? Array.isArray(t) ? l.default.Seq(t).map(e).toList() : l.default.OrderedMap(t).map(e) : t
- }, t.bindToState = function(e, t) {
- var n = {};
- return (0, u.default)(e).filter(function(t) {
- return "function" == typeof e[t]
- }).forEach(function(r) {
- return n[r] = e[r].bind(null, t)
- }), n
- }, t.normalizeArray = x, t.isFn = function(e) {
- return "function" == typeof e
- }, t.isObject = S, t.isFunc = function(e) {
- return "function" == typeof e
- }, t.isArray = function(e) {
- return Array.isArray(e)
- }, t.objMap = function(e, t) {
- return (0, u.default)(e).reduce(function(n, r) {
- return n[r] = t(e[r], r), n
- }, {})
- }, t.objReduce = function(e, t) {
- return (0, u.default)(e).reduce(function(n, r) {
- var o = t(e[r], r);
- return o && "object" === (void 0 === o ? "undefined" : (0, s.default)(o)) && (0, a.default)(n, o), n
- }, {})
- }, t.systemThunkMiddleware = function(e) {
- return function(t) {
- t.dispatch, t.getState;
- return function(t) {
- return function(n) {
- return "function" == typeof n ? n(e()) : t(n)
- }
- }
- }
- }, t.defaultStatusCode = function(e) {
- var t = e.keySeq();
- return t.contains(w) ? w : t.filter(function(e) {
- return "2" === (e + "")[0]
- }).sort().first()
- }, t.getList = function(e, t) {
- if (!l.default.Iterable.isIterable(e)) return l.default.List();
- var n = e.getIn(Array.isArray(t) ? t : [t]);
- return l.default.List.isList(n) ? n : l.default.List()
- }, t.highlight = function(e) {
- var t = document;
- if (!e) return "";
- if (e.textContent.length > 5e3) return e.textContent;
- return function(e) {
- for (var n, r, o, i, a, u = e.textContent, s = 0, l = u[0], c = 1, f = e.innerHTML = "", p = 0; r = n, n = p < 7 && "\\" == n ? 1 : c;) {
- if (c = l, l = u[++s], i = f.length > 1, !c || p > 8 && "\n" == c || [/\S/.test(c), 1, 1, !/[$\w]/.test(c), ("/" == n || "\n" == n) && i, '"' == n && i, "'" == n && i, u[s - 4] + r + n == "--\x3e", r + n == "*/"][p])
- for (f && (e.appendChild(a = t.createElement("span")).setAttribute("style", ["color: #555; font-weight: bold;", "", "", "color: #555;", ""][p ? p < 3 ? 2 : p > 6 ? 4 : p > 3 ? 3 : +/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/.test(f) : 0]), a.appendChild(t.createTextNode(f))), o = p && p < 7 ? p : o, f = "", p = 11; ![1, /[\/{}[(\-+*=<>:;|\\.,?!&@~]/.test(c), /[\])]/.test(c), /[$\w]/.test(c), "/" == c && o < 2 && "<" != n, '"' == c, "'" == c, c + l + u[s + 1] + u[s + 2] == "\x3c!--", c + l == "/*", c + l == "//", "#" == c][--p];);
- f += c
- }
- }(e)
- }, t.mapToList = function e(t) {
- var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "key";
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : l.default.Map();
- if (!l.default.Map.isMap(t) || !t.size) return l.default.List();
- Array.isArray(n) || (n = [n]);
- if (n.length < 1) return t.merge(r);
- var a = l.default.List();
- var u = n[0];
- var s = !0;
- var c = !1;
- var f = void 0;
- try {
- for (var p, d = (0, i.default)(t.entries()); !(s = (p = d.next()).done); s = !0) {
- var h = p.value,
- v = (0, o.default)(h, 2),
- m = v[0],
- g = v[1],
- y = e(g, n.slice(1), r.set(u, m));
- a = l.default.List.isList(y) ? a.concat(y) : a.push(y)
- }
- } catch (e) {
- c = !0, f = e
- } finally {
- try {
- !s && d.return && d.return()
- } finally {
- if (c) throw f
- }
- }
- return a
- }, t.extractFileNameFromContentDispositionHeader = function(e) {
- var t = /filename="([^;]*);?"/i.exec(e);
- null === t && (t = /filename=([^;]*);?/i.exec(e));
- if (null !== t && t.length > 1) return t[1];
- return null
- }, t.pascalCase = C, t.pascalCaseFilename = function(e) {
- return C(e.replace(/\.[^./]*$/, ""))
- }, t.sanitizeUrl = function(e) {
- if ("string" != typeof e || "" === e) return "";
- return (0, c.sanitizeUrl)(e)
- }, t.getAcceptControllingResponse = function(e) {
- if (!l.default.OrderedMap.isOrderedMap(e)) return null;
- if (!e.size) return null;
- var t = e.find(function(e, t) {
- return t.startsWith("2") && (0, u.default)(e.get("content") || {}).length > 0
- }),
- n = e.get("default") || l.default.OrderedMap(),
- r = (n.get("content") || l.default.OrderedMap()).keySeq().toJS().length ? n : null;
- return t || r
- }, t.deeplyStripKey = function e(t, n) {
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function() {
- return !0
- };
- if ("object" !== (void 0 === t ? "undefined" : (0, s.default)(t)) || Array.isArray(t) || null === t || !n) return t;
- var o = (0, a.default)({}, t);
- (0, u.default)(o).forEach(function(t) {
- t === n && r(o[t], t) ? delete o[t] : o[t] = e(o[t], n, r)
- });
- return o
- }, t.stringify = function(e) {
- if ("string" == typeof e) return e;
- e.toJS && (e = e.toJS());
- if ("object" === (void 0 === e ? "undefined" : (0, s.default)(e)) && null !== e) try {
- return (0, r.default)(e, null, 2)
- } catch (t) {
- return String(e)
- }
- return e.toString()
- }, t.numberToString = function(e) {
- if ("number" == typeof e) return e.toString();
- return e
- };
- var l = _(n(7)),
- c = n(571),
- f = _(n(572)),
- p = _(n(280)),
- d = _(n(284)),
- h = _(n(287)),
- v = _(n(650)),
- m = _(n(105)),
- g = n(192),
- y = _(n(32)),
- b = _(n(723));
-
- function _(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- var w = "default",
- E = t.isImmutable = function(e) {
- return l.default.Iterable.isIterable(e)
- };
-
- function x(e) {
- return Array.isArray(e) ? e : [e]
- }
-
- function S(e) {
- return !!e && "object" === (void 0 === e ? "undefined" : (0, s.default)(e))
- }
- t.memoize = d.default;
-
- function C(e) {
- return (0, p.default)((0, f.default)(e))
- }
- t.propChecker = function(e, t) {
- var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [],
- r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [];
- return (0, u.default)(e).length !== (0, u.default)(t).length || ((0, v.default)(e, function(e, n) {
- if (r.includes(n)) return !1;
- var o = t[n];
- return l.default.Iterable.isIterable(e) ? !l.default.is(e, o) : ("object" !== (void 0 === e ? "undefined" : (0, s.default)(e)) || "object" !== (void 0 === o ? "undefined" : (0, s.default)(o))) && e !== o
- }) || n.some(function(n) {
- return !(0, m.default)(e[n], t[n])
- }))
- };
- var k = t.validateMaximum = function(e, t) {
- if (e > t) return "Value must be less than Maximum"
- },
- A = t.validateMinimum = function(e, t) {
- if (e < t) return "Value must be greater than Minimum"
- },
- O = t.validateNumber = function(e) {
- if (!/^-?\d+(\.?\d+)?$/.test(e)) return "Value must be a number"
- },
- P = t.validateInteger = function(e) {
- if (!/^-?\d+$/.test(e)) return "Value must be an integer"
- },
- T = t.validateFile = function(e) {
- if (e && !(e instanceof y.default.File)) return "Value must be a file"
- },
- M = t.validateBoolean = function(e) {
- if ("true" !== e && "false" !== e && !0 !== e && !1 !== e) return "Value must be a boolean"
- },
- I = t.validateString = function(e) {
- if (e && "string" != typeof e) return "Value must be a string"
- },
- j = t.validateDateTime = function(e) {
- if (isNaN(Date.parse(e))) return "Value must be a DateTime"
- },
- N = t.validateGuid = function(e) {
- if (e = e.toString().toLowerCase(), !/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e)) return "Value must be a Guid"
- },
- R = t.validateMaxLength = function(e, t) {
- if (e.length > t) return "Value must be less than MaxLength"
- },
- D = t.validateMinLength = function(e, t) {
- if (e.length < t) return "Value must be greater than MinLength"
- },
- L = t.validatePattern = function(e, t) {
- if (!new RegExp(t).test(e)) return "Value must follow pattern " + t
- };
- t.validateParam = function(e, t) {
- var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
- r = [],
- o = t && "body" === e.get("in") ? e.get("value_xml") : e.get("value"),
- i = e.get("required"),
- a = n ? e.get("schema") : e;
- if (!a) return r;
- var u = a.get("maximum"),
- c = a.get("minimum"),
- f = a.get("type"),
- p = a.get("format"),
- d = a.get("maxLength"),
- h = a.get("minLength"),
- v = a.get("pattern");
- if (f && (i || o)) {
- var m = "string" === f && o,
- g = "array" === f && Array.isArray(o) && o.length,
- b = "array" === f && l.default.List.isList(o) && o.count(),
- _ = "file" === f && o instanceof y.default.File,
- w = "boolean" === f && (o || !1 === o),
- E = "number" === f && (o || 0 === o),
- x = "integer" === f && (o || 0 === o),
- S = !1;
- if (n && "object" === f)
- if ("object" === (void 0 === o ? "undefined" : (0, s.default)(o))) S = !0;
- else if ("string" == typeof o) try {
- JSON.parse(o), S = !0
- } catch (e) {
- return r.push("Parameter string value must be valid JSON"), r
- }
- var C = [m, g, b, _, w, E, x, S].some(function(e) {
- return !!e
- });
- if (i && !C) return r.push("Required field is not provided"), r;
- if (v) {
- var U = L(o, v);
- U && r.push(U)
- }
- if (d || 0 === d) {
- var q = R(o, d);
- q && r.push(q)
- }
- if (h) {
- var F = D(o, h);
- F && r.push(F)
- }
- if (u || 0 === u) {
- var z = k(o, u);
- z && r.push(z)
- }
- if (c || 0 === c) {
- var B = A(o, c);
- B && r.push(B)
- }
- if ("string" === f) {
- var V = void 0;
- if (!(V = "date-time" === p ? j(o) : "uuid" === p ? N(o) : I(o))) return r;
- r.push(V)
- } else if ("boolean" === f) {
- var H = M(o);
- if (!H) return r;
- r.push(H)
- } else if ("number" === f) {
- var W = O(o);
- if (!W) return r;
- r.push(W)
- } else if ("integer" === f) {
- var J = P(o);
- if (!J) return r;
- r.push(J)
- } else if ("array" === f) {
- var Y;
- if (!b || !o.count()) return r;
- Y = a.getIn(["items", "type"]), o.forEach(function(e, t) {
- var n = void 0;
- "number" === Y ? n = O(e) : "integer" === Y ? n = P(e) : "string" === Y && (n = I(e)), n && r.push({
- index: t,
- error: n
- })
- })
- } else if ("file" === f) {
- var K = T(o);
- if (!K) return r;
- r.push(K)
- }
- }
- return r
- }, t.getSampleSchema = function(e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "",
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
- if (/xml/.test(t)) {
- if (!e.xml || !e.xml.name) {
- if (e.xml = e.xml || {}, !e.$$ref) return e.type || e.items || e.properties || e.additionalProperties ? '\n\x3c!-- XML example cannot be generated --\x3e' : null;
- var o = e.$$ref.match(/\S*\/(\S+)$/);
- e.xml.name = o[1]
- }
- return (0, g.memoizedCreateXMLExample)(e, n)
- }
- var i = (0, g.memoizedSampleFromSchema)(e, n);
- return "object" === (void 0 === i ? "undefined" : (0, s.default)(i)) ? (0, r.default)(i, null, 2) : i
- }, t.parseSearch = function() {
- var e = {},
- t = y.default.location.search;
- if (!t) return {};
- if ("" != t) {
- var n = t.substr(1).split("&");
- for (var r in n) n.hasOwnProperty(r) && (r = n[r].split("="), e[decodeURIComponent(r[0])] = r[1] && decodeURIComponent(r[1]) || "")
- }
- return e
- }, t.serializeSearch = function(e) {
- return (0, u.default)(e).map(function(t) {
- return encodeURIComponent(t) + "=" + encodeURIComponent(e[t])
- }).join("&")
- }, t.btoa = function(t) {
- return (t instanceof e ? t : new e(t.toString(), "utf-8")).toString("base64")
- }, t.sorters = {
- operationsSorter: {
- alpha: function(e, t) {
- return e.get("path").localeCompare(t.get("path"))
- },
- method: function(e, t) {
- return e.get("method").localeCompare(t.get("method"))
- }
- },
- tagsSorter: {
- alpha: function(e, t) {
- return e.localeCompare(t)
- }
- }
- }, t.buildFormData = function(e) {
- var t = [];
- for (var n in e) {
- var r = e[n];
- void 0 !== r && "" !== r && t.push([n, "=", encodeURIComponent(r).replace(/%20/g, "+")].join(""))
- }
- return t.join("&")
- }, t.shallowEqualKeys = function(e, t, n) {
- return !!(0, h.default)(n, function(n) {
- return (0, m.default)(e[n], t[n])
- })
- };
- var U = t.createDeepLinkPath = function(e) {
- return "string" == typeof e || e instanceof String ? e.trim().replace(/\s/g, "_") : ""
- };
- t.escapeDeepLinkPath = function(e) {
- return (0, b.default)(U(e))
- }, t.getExtensions = function(e) {
- return e.filter(function(e, t) {
- return /^x-/.test(t)
- })
- }, t.getCommonExtensions = function(e) {
- return e.filter(function(e, t) {
- return /^pattern|maxLength|minLength|maximum|minimum/.test(t)
- })
- }
- }).call(t, n(54).Buffer)
- }, function(e, t, n) {
- "use strict";
- e.exports = function(e) {
- for (var t = arguments.length - 1, n = "Minified React error #" + e + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + e, r = 0; r < t; r++) n += "&args[]=" + encodeURIComponent(arguments[r + 1]);
- n += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
- var o = new Error(n);
- throw o.name = "Invariant Violation", o.framesToPop = 1, o
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(7),
- o = "<>",
- i = {
- listOf: function(e) {
- return l(e, "List", r.List.isList)
- },
- mapOf: function(e, t) {
- return c(e, t, "Map", r.Map.isMap)
- },
- orderedMapOf: function(e, t) {
- return c(e, t, "OrderedMap", r.OrderedMap.isOrderedMap)
- },
- setOf: function(e) {
- return l(e, "Set", r.Set.isSet)
- },
- orderedSetOf: function(e) {
- return l(e, "OrderedSet", r.OrderedSet.isOrderedSet)
- },
- stackOf: function(e) {
- return l(e, "Stack", r.Stack.isStack)
- },
- iterableOf: function(e) {
- return l(e, "Iterable", r.Iterable.isIterable)
- },
- recordOf: function(e) {
- return u(function(t, n, o, i, u) {
- for (var s = arguments.length, l = Array(s > 5 ? s - 5 : 0), c = 5; c < s; c++) l[c - 5] = arguments[c];
- var f = t[n];
- if (!(f instanceof r.Record)) {
- var p = a(f),
- d = i;
- return new Error("Invalid " + d + " `" + u + "` of type `" + p + "` supplied to `" + o + "`, expected an Immutable.js Record.")
- }
- for (var h in e) {
- var v = e[h];
- if (v) {
- var m = f.toObject(),
- g = v.apply(void 0, [m, h, o, i, u + "." + h].concat(l));
- if (g) return g
- }
- }
- })
- },
- shape: p,
- contains: p,
- mapContains: function(e) {
- return f(e, "Map", r.Map.isMap)
- },
- list: s("List", r.List.isList),
- map: s("Map", r.Map.isMap),
- orderedMap: s("OrderedMap", r.OrderedMap.isOrderedMap),
- set: s("Set", r.Set.isSet),
- orderedSet: s("OrderedSet", r.OrderedSet.isOrderedSet),
- stack: s("Stack", r.Stack.isStack),
- seq: s("Seq", r.Seq.isSeq),
- record: s("Record", function(e) {
- return e instanceof r.Record
- }),
- iterable: s("Iterable", r.Iterable.isIterable)
- };
-
- function a(e) {
- var t = typeof e;
- return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : e instanceof r.Iterable ? "Immutable." + e.toSource().split(" ")[0] : t
- }
-
- function u(e) {
- function t(t, n, r, i, a, u) {
- for (var s = arguments.length, l = Array(s > 6 ? s - 6 : 0), c = 6; c < s; c++) l[c - 6] = arguments[c];
- return u = u || r, i = i || o, null != n[r] ? e.apply(void 0, [n, r, i, a, u].concat(l)) : t ? new Error("Required " + a + " `" + u + "` was not specified in `" + i + "`.") : void 0
- }
- var n = t.bind(null, !1);
- return n.isRequired = t.bind(null, !0), n
- }
-
- function s(e, t) {
- return u(function(n, r, o, i, u) {
- var s = n[r];
- if (!t(s)) {
- var l = a(s);
- return new Error("Invalid " + i + " `" + u + "` of type `" + l + "` supplied to `" + o + "`, expected `" + e + "`.")
- }
- return null
- })
- }
-
- function l(e, t, n) {
- return u(function(r, o, i, u, s) {
- for (var l = arguments.length, c = Array(l > 5 ? l - 5 : 0), f = 5; f < l; f++) c[f - 5] = arguments[f];
- var p = r[o];
- if (!n(p)) {
- var d = u,
- h = a(p);
- return new Error("Invalid " + d + " `" + s + "` of type `" + h + "` supplied to `" + i + "`, expected an Immutable.js " + t + ".")
- }
- if ("function" != typeof e) return new Error("Invalid typeChecker supplied to `" + i + "` for propType `" + s + "`, expected a function.");
- for (var v = p.toArray(), m = 0, g = v.length; m < g; m++) {
- var y = e.apply(void 0, [v, m, i, u, s + "[" + m + "]"].concat(c));
- if (y instanceof Error) return y
- }
- })
- }
-
- function c(e, t, n, r) {
- return u(function() {
- for (var o = arguments.length, i = Array(o), a = 0; a < o; a++) i[a] = arguments[a];
- return l(e, n, r).apply(void 0, i) || t && (s = t, u(function(e, t, n, r, o) {
- for (var i = arguments.length, a = Array(i > 5 ? i - 5 : 0), u = 5; u < i; u++) a[u - 5] = arguments[u];
- var l = e[t];
- if ("function" != typeof s) return new Error("Invalid keysTypeChecker (optional second argument) supplied to `" + n + "` for propType `" + o + "`, expected a function.");
- for (var c = l.keySeq().toArray(), f = 0, p = c.length; f < p; f++) {
- var d = s.apply(void 0, [c, f, n, r, o + " -> key(" + c[f] + ")"].concat(a));
- if (d instanceof Error) return d
- }
- })).apply(void 0, i);
- var s
- })
- }
-
- function f(e) {
- var t = void 0 === arguments[1] ? "Iterable" : arguments[1],
- n = void 0 === arguments[2] ? r.Iterable.isIterable : arguments[2];
- return u(function(r, o, i, u, s) {
- for (var l = arguments.length, c = Array(l > 5 ? l - 5 : 0), f = 5; f < l; f++) c[f - 5] = arguments[f];
- var p = r[o];
- if (!n(p)) {
- var d = a(p);
- return new Error("Invalid " + u + " `" + s + "` of type `" + d + "` supplied to `" + i + "`, expected an Immutable.js " + t + ".")
- }
- var h = p.toObject();
- for (var v in e) {
- var m = e[v];
- if (m) {
- var g = m.apply(void 0, [h, v, i, u, s + "." + v].concat(c));
- if (g) return g
- }
- }
- })
- }
-
- function p(e) {
- return f(e)
- }
- e.exports = i
- }, function(e, t, n) {
- "use strict";
- /*
- object-assign
- (c) Sindre Sorhus
- @license MIT
- */
- var r = Object.getOwnPropertySymbols,
- o = Object.prototype.hasOwnProperty,
- i = Object.prototype.propertyIsEnumerable;
- e.exports = function() {
- try {
- if (!Object.assign) return !1;
- var e = new String("abc");
- if (e[5] = "de", "5" === Object.getOwnPropertyNames(e)[0]) return !1;
- for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n;
- if ("0123456789" !== Object.getOwnPropertyNames(t).map(function(e) {
- return t[e]
- }).join("")) return !1;
- var r = {};
- return "abcdefghijklmnopqrst".split("").forEach(function(e) {
- r[e] = e
- }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, r)).join("")
- } catch (e) {
- return !1
- }
- }() ? Object.assign : function(e, t) {
- for (var n, a, u = function(e) {
- if (null === e || void 0 === e) throw new TypeError("Object.assign cannot be called with null or undefined");
- return Object(e)
- }(e), s = 1; s < arguments.length; s++) {
- for (var l in n = Object(arguments[s])) o.call(n, l) && (u[l] = n[l]);
- if (r) {
- a = r(n);
- for (var c = 0; c < a.length; c++) i.call(n, a[c]) && (u[a[c]] = n[a[c]])
- }
- }
- return u
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(11),
- o = n(87),
- i = n(350),
- a = (n(8), o.ID_ATTRIBUTE_NAME),
- u = i,
- s = "__reactInternalInstance$" + Math.random().toString(36).slice(2);
-
- function l(e, t) {
- return 1 === e.nodeType && e.getAttribute(a) === String(t) || 8 === e.nodeType && e.nodeValue === " react-text: " + t + " " || 8 === e.nodeType && e.nodeValue === " react-empty: " + t + " "
- }
-
- function c(e) {
- for (var t; t = e._renderedComponent;) e = t;
- return e
- }
-
- function f(e, t) {
- var n = c(e);
- n._hostNode = t, t[s] = n
- }
-
- function p(e, t) {
- if (!(e._flags & u.hasCachedChildNodes)) {
- var n = e._renderedChildren,
- o = t.firstChild;
- e: for (var i in n)
- if (n.hasOwnProperty(i)) {
- var a = n[i],
- s = c(a)._domID;
- if (0 !== s) {
- for (; null !== o; o = o.nextSibling)
- if (l(o, s)) {
- f(a, o);
- continue e
- }
- r("32", s)
- }
- }
- e._flags |= u.hasCachedChildNodes
- }
- }
-
- function d(e) {
- if (e[s]) return e[s];
- for (var t, n, r = []; !e[s];) {
- if (r.push(e), !e.parentNode) return null;
- e = e.parentNode
- }
- for (; e && (n = e[s]); e = r.pop()) t = n, r.length && p(n, e);
- return t
- }
- var h = {
- getClosestInstanceFromNode: d,
- getInstanceFromNode: function(e) {
- var t = d(e);
- return null != t && t._hostNode === e ? t : null
- },
- getNodeFromInstance: function(e) {
- if (void 0 === e._hostNode && r("33"), e._hostNode) return e._hostNode;
- for (var t = []; !e._hostNode;) t.push(e), e._hostParent || r("34"), e = e._hostParent;
- for (; t.length; e = t.pop()) p(e, e._hostNode);
- return e._hostNode
- },
- precacheChildNodes: p,
- precacheNode: f,
- uncacheNode: function(e) {
- var t = e._hostNode;
- t && (delete t[s], e._hostNode = null)
- }
- };
- e.exports = h
- }, function(e, t) {
- var n = e.exports = {
- version: "2.5.5"
- };
- "number" == typeof __e && (__e = n)
- }, function(e, t, n) {
- "use strict";
- var r = n(107),
- o = ["kind", "resolve", "construct", "instanceOf", "predicate", "represent", "defaultStyle", "styleAliases"],
- i = ["scalar", "sequence", "mapping"];
- e.exports = function(e, t) {
- var n, a;
- if (t = t || {}, Object.keys(t).forEach(function(t) {
- if (-1 === o.indexOf(t)) throw new r('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.')
- }), this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
- return !0
- }, this.construct = t.construct || function(e) {
- return e
- }, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.defaultStyle = t.defaultStyle || null, this.styleAliases = (n = t.styleAliases || null, a = {}, null !== n && Object.keys(n).forEach(function(e) {
- n[e].forEach(function(t) {
- a[String(t)] = e
- })
- }), a), -1 === i.indexOf(this.kind)) throw new r('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.')
- }
- }, function(e, t, n) {
- var r = n(242)("wks"),
- o = n(167),
- i = n(33).Symbol,
- a = "function" == typeof i;
- (e.exports = function(e) {
- return r[e] || (r[e] = a && i[e] || (a ? i : o)("Symbol." + e))
- }).store = r
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r = i(n(568)),
- o = i(n(91));
-
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.default = function() {
- return function(e, t) {
- if (Array.isArray(e)) return e;
- if ((0, r.default)(Object(e))) return function(e, t) {
- var n = [],
- r = !0,
- i = !1,
- a = void 0;
- try {
- for (var u, s = (0, o.default)(e); !(r = (u = s.next()).done) && (n.push(u.value), !t || n.length !== t); r = !0);
- } catch (e) {
- i = !0, a = e
- } finally {
- try {
- !r && s.return && s.return()
- } finally {
- if (i) throw a
- }
- }
- return n
- }(e, t);
- throw new TypeError("Invalid attempt to destructure non-iterable instance")
- }
- }()
- }, function(e, t, n) {
- var r = n(162)("wks"),
- o = n(116),
- i = n(21).Symbol,
- a = "function" == typeof i;
- (e.exports = function(e) {
- return r[e] || (r[e] = a && i[e] || (a ? i : o)("Symbol." + e))
- }).store = r
- }, function(e, t, n) {
- var r = n(21),
- o = n(15),
- i = n(49),
- a = n(50),
- u = n(52),
- s = function(e, t, n) {
- var l, c, f, p = e & s.F,
- d = e & s.G,
- h = e & s.S,
- v = e & s.P,
- m = e & s.B,
- g = e & s.W,
- y = d ? o : o[t] || (o[t] = {}),
- b = y.prototype,
- _ = d ? r : h ? r[t] : (r[t] || {}).prototype;
- for (l in d && (n = t), n)(c = !p && _ && void 0 !== _[l]) && u(y, l) || (f = c ? _[l] : n[l], y[l] = d && "function" != typeof _[l] ? n[l] : m && c ? i(f, r) : g && _[l] == f ? function(e) {
- var t = function(t, n, r) {
- if (this instanceof e) {
- switch (arguments.length) {
- case 0:
- return new e;
- case 1:
- return new e(t);
- case 2:
- return new e(t, n)
- }
- return new e(t, n, r)
- }
- return e.apply(this, arguments)
- };
- return t.prototype = e.prototype, t
- }(f) : v && "function" == typeof f ? i(Function.call, f) : f, v && ((y.virtual || (y.virtual = {}))[l] = f, e & s.R && b && !b[l] && a(b, l, f)))
- };
- s.F = 1, s.G = 2, s.S = 4, s.P = 8, s.B = 16, s.W = 32, s.U = 64, s.R = 128, e.exports = s
- }, function(e, t) {
- var n = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
- "number" == typeof __g && (__g = n)
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, o = n(262),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- t.default = function(e, t, n) {
- return t in e ? (0, i.default)(e, t, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : e[t] = n, e
- }
- }, function(e, t, n) {
- e.exports = {
- default: n(533),
- __esModule: !0
- }
- }, function(e, t) {
- var n = Array.isArray;
- e.exports = n
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, o = n(23),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- t.default = i.default || function(e) {
- for (var t = 1; t < arguments.length; t++) {
- var n = arguments[t];
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
- }
- return e
- }
- }, function(e, t, n) {
- "use strict";
- var r = !("undefined" == typeof window || !window.document || !window.document.createElement),
- o = {
- canUseDOM: r,
- canUseWorkers: "undefined" != typeof Worker,
- canUseEventListeners: r && !(!window.addEventListener && !window.attachEvent),
- canUseViewport: r && !!window.screen,
- isInWorker: !r
- };
- e.exports = o
- }, function(e, t, n) {
- "use strict";
- var r = Object.prototype.hasOwnProperty;
-
- function o(e, t) {
- return !!e && r.call(e, t)
- }
- var i = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
-
- function a(e) {
- return !(e >= 55296 && e <= 57343) && (!(e >= 64976 && e <= 65007) && (65535 != (65535 & e) && 65534 != (65535 & e) && (!(e >= 0 && e <= 8) && (11 !== e && (!(e >= 14 && e <= 31) && (!(e >= 127 && e <= 159) && !(e > 1114111)))))))
- }
-
- function u(e) {
- if (e > 65535) {
- var t = 55296 + ((e -= 65536) >> 10),
- n = 56320 + (1023 & e);
- return String.fromCharCode(t, n)
- }
- return String.fromCharCode(e)
- }
- var s = /&([a-z#][a-z0-9]{1,31});/gi,
- l = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,
- c = n(416);
-
- function f(e, t) {
- var n = 0;
- return o(c, t) ? c[t] : 35 === t.charCodeAt(0) && l.test(t) && a(n = "x" === t[1].toLowerCase() ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10)) ? u(n) : e
- }
- var p = /[&<>"]/,
- d = /[&<>"]/g,
- h = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """
- };
-
- function v(e) {
- return h[e]
- }
- t.assign = function(e) {
- return [].slice.call(arguments, 1).forEach(function(t) {
- if (t) {
- if ("object" != typeof t) throw new TypeError(t + "must be object");
- Object.keys(t).forEach(function(n) {
- e[n] = t[n]
- })
- }
- }), e
- }, t.isString = function(e) {
- return "[object String]" === function(e) {
- return Object.prototype.toString.call(e)
- }(e)
- }, t.has = o, t.unescapeMd = function(e) {
- return e.indexOf("\\") < 0 ? e : e.replace(i, "$1")
- }, t.isValidEntityCode = a, t.fromCodePoint = u, t.replaceEntities = function(e) {
- return e.indexOf("&") < 0 ? e : e.replace(s, f)
- }, t.escapeHtml = function(e) {
- return p.test(e) ? e.replace(d, v) : e
- }
- }, function(e, t) {
- e.exports = function(e) {
- return "object" == typeof e ? null !== e : "function" == typeof e
- }
- }, function(e, t, n) {
- var r = n(33),
- o = n(60),
- i = n(58),
- a = n(73),
- u = n(120),
- s = function(e, t, n) {
- var l, c, f, p, d = e & s.F,
- h = e & s.G,
- v = e & s.S,
- m = e & s.P,
- g = e & s.B,
- y = h ? r : v ? r[t] || (r[t] = {}) : (r[t] || {}).prototype,
- b = h ? o : o[t] || (o[t] = {}),
- _ = b.prototype || (b.prototype = {});
- for (l in h && (n = t), n) f = ((c = !d && y && void 0 !== y[l]) ? y : n)[l], p = g && c ? u(f, r) : m && "function" == typeof f ? u(Function.call, f) : f, y && a(y, l, f, e & s.U), b[l] != f && i(b, l, p), m && _[l] != f && (_[l] = f)
- };
- r.core = o, s.F = 1, s.G = 2, s.S = 4, s.P = 8, s.B = 16, s.W = 32, s.U = 64, s.R = 128, e.exports = s
- }, function(e, t, n) {
- var r = n(29),
- o = n(101),
- i = n(53),
- a = /"/g,
- u = function(e, t, n, r) {
- var o = String(i(e)),
- u = "<" + t;
- return "" !== n && (u += " " + n + '="' + String(r).replace(a, """) + '"'), u + ">" + o + "" + t + ">"
- };
- e.exports = function(e, t) {
- var n = {};
- n[e] = t(u), r(r.P + r.F * o(function() {
- var t = "" [e]('"');
- return t !== t.toLowerCase() || t.split('"').length > 3
- }), "String", n)
- }
- }, function(e, t) {
- var n;
- n = function() {
- return this
- }();
- try {
- n = n || Function("return this")() || (0, eval)("this")
- } catch (e) {
- "object" == typeof window && (n = window)
- }
- e.exports = n
- }, function(e, t, n) {
- "use strict";
- var r, o = n(91),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- e.exports = function() {
- var e = {
- location: {},
- history: {},
- open: function() {},
- close: function() {},
- File: function() {}
- };
- if ("undefined" == typeof window) return e;
- try {
- e = window;
- var t = !0,
- n = !1,
- r = void 0;
- try {
- for (var o, a = (0, i.default)(["File", "Blob", "FormData"]); !(t = (o = a.next()).done); t = !0) {
- var u = o.value;
- u in window && (e[u] = window[u])
- }
- } catch (e) {
- n = !0, r = e
- } finally {
- try {
- !t && a.return && a.return()
- } finally {
- if (n) throw r
- }
- }
- } catch (e) {
- console.error(e)
- }
- return e
- }()
- }, function(e, t) {
- var n = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
- "number" == typeof __g && (__g = n)
- }, function(e, t, n) {
- "use strict";
-
- function r(e) {
- return function() {
- return e
- }
- }
- var o = function() {};
- o.thatReturns = r, o.thatReturnsFalse = r(!1), o.thatReturnsTrue = r(!0), o.thatReturnsNull = r(null), o.thatReturnsThis = function() {
- return this
- }, o.thatReturnsArgument = function(e) {
- return e
- }, e.exports = o
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var r = i(n(25));
- t.isOAS3 = a, t.isSwagger2 = function(e) {
- var t = e.get("swagger");
- if ("string" != typeof t) return !1;
- return t.startsWith("2.0")
- }, t.OAS3ComponentWrapFactory = function(e) {
- return function(t, n) {
- return function(i) {
- if (n && n.specSelectors && n.specSelectors.specJson) {
- var u = n.specSelectors.specJson();
- return a(u) ? o.default.createElement(e, (0, r.default)({}, i, n, {
- Ori: t
- })) : o.default.createElement(t, i)
- }
- return console.warn("OAS3 wrapper: couldn't get spec"), null
- }
- }
- };
- var o = i(n(0));
-
- function i(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
-
- function a(e) {
- var t = e.get("openapi");
- return "string" == typeof t && (t.startsWith("3.0.") && t.length > 4)
- }
- }, function(e, t, n) {
- var r = n(28);
- e.exports = function(e) {
- if (!r(e)) throw TypeError(e + " is not an object!");
- return e
- }
- }, function(e, t, n) {
- var r = n(278),
- o = "object" == typeof self && self && self.Object === Object && self,
- i = r || o || Function("return this")();
- e.exports = i
- }, function(e, t) {
- e.exports = function(e) {
- var t = typeof e;
- return null != e && ("object" == t || "function" == t)
- }
- }, function(e, t, n) {
- "use strict";
- var r = null;
- e.exports = {
- debugTool: r
- }
- }, function(e, t, n) {
- var r = n(36),
- o = n(238),
- i = n(157),
- a = Object.defineProperty;
- t.f = n(44) ? Object.defineProperty : function(e, t, n) {
- if (r(e), t = i(t, !0), r(n), o) try {
- return a(e, t, n)
- } catch (e) {}
- if ("get" in n || "set" in n) throw TypeError("Accessors not supported!");
- return "value" in n && (e[t] = n.value), e
- }
- }, function(e, t, n) {
- e.exports = {
- default: n(516),
- __esModule: !0
- }
- }, function(e, t, n) {
- e.exports = {
- default: n(517),
- __esModule: !0
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(11),
- o = n(13),
- i = n(354),
- a = n(69),
- u = n(355),
- s = n(88),
- l = n(147),
- c = n(8),
- f = [],
- p = 0,
- d = i.getPooled(),
- h = !1,
- v = null;
-
- function m() {
- E.ReactReconcileTransaction && v || r("123")
- }
- var g = [{
- initialize: function() {
- this.dirtyComponentsLength = f.length
- },
- close: function() {
- this.dirtyComponentsLength !== f.length ? (f.splice(0, this.dirtyComponentsLength), w()) : f.length = 0
- }
- }, {
- initialize: function() {
- this.callbackQueue.reset()
- },
- close: function() {
- this.callbackQueue.notifyAll()
- }
- }];
-
- function y() {
- this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = i.getPooled(), this.reconcileTransaction = E.ReactReconcileTransaction.getPooled(!0)
- }
-
- function b(e, t) {
- return e._mountOrder - t._mountOrder
- }
-
- function _(e) {
- var t = e.dirtyComponentsLength;
- t !== f.length && r("124", t, f.length), f.sort(b), p++;
- for (var n = 0; n < t; n++) {
- var o, i = f[n],
- a = i._pendingCallbacks;
- if (i._pendingCallbacks = null, u.logTopLevelRenders) {
- var l = i;
- i._currentElement.type.isReactTopLevelWrapper && (l = i._renderedComponent), o = "React update: " + l.getName(), console.time(o)
- }
- if (s.performUpdateIfNecessary(i, e.reconcileTransaction, p), o && console.timeEnd(o), a)
- for (var c = 0; c < a.length; c++) e.callbackQueue.enqueue(a[c], i.getPublicInstance())
- }
- }
- o(y.prototype, l, {
- getTransactionWrappers: function() {
- return g
- },
- destructor: function() {
- this.dirtyComponentsLength = null, i.release(this.callbackQueue), this.callbackQueue = null, E.ReactReconcileTransaction.release(this.reconcileTransaction), this.reconcileTransaction = null
- },
- perform: function(e, t, n) {
- return l.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, e, t, n)
- }
- }), a.addPoolingTo(y);
- var w = function() {
- for (; f.length || h;) {
- if (f.length) {
- var e = y.getPooled();
- e.perform(_, null, e), y.release(e)
- }
- if (h) {
- h = !1;
- var t = d;
- d = i.getPooled(), t.notifyAll(), i.release(t)
- }
- }
- };
- var E = {
- ReactReconcileTransaction: null,
- batchedUpdates: function(e, t, n, r, o, i) {
- return m(), v.batchedUpdates(e, t, n, r, o, i)
- },
- enqueueUpdate: function e(t) {
- m(), v.isBatchingUpdates ? (f.push(t), null == t._updateBatchNumber && (t._updateBatchNumber = p + 1)) : v.batchedUpdates(e, t)
- },
- flushBatchedUpdates: w,
- injection: {
- injectReconcileTransaction: function(e) {
- e || r("126"), E.ReactReconcileTransaction = e
- },
- injectBatchingStrategy: function(e) {
- e || r("127"), "function" != typeof e.batchedUpdates && r("128"), "boolean" != typeof e.isBatchingUpdates && r("129"), v = e
- }
- },
- asap: function(e, t) {
- c(v.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."), d.enqueue(e, t), h = !0
- }
- };
- e.exports = E
- }, function(e, t, n) {
- e.exports = !n(51)(function() {
- return 7 != Object.defineProperty({}, "a", {
- get: function() {
- return 7
- }
- }).a
- })
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r = a(n(519)),
- o = a(n(521)),
- i = "function" == typeof o.default && "symbol" == typeof r.default ? function(e) {
- return typeof e
- } : function(e) {
- return e && "function" == typeof o.default && e.constructor === o.default && e !== o.default.prototype ? "symbol" : typeof e
- };
-
- function a(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.default = "function" == typeof o.default && "symbol" === i(r.default) ? function(e) {
- return void 0 === e ? "undefined" : i(e)
- } : function(e) {
- return e && "function" == typeof o.default && e.constructor === o.default && e !== o.default.prototype ? "symbol" : void 0 === e ? "undefined" : i(e)
- }
- }, function(e, t, n) {
- "use strict";
- e.exports = {
- current: null
- }
- }, function(e, t) {
- e.exports = function(e) {
- return null != e && "object" == typeof e
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(13),
- o = n(69),
- i = n(34),
- a = (n(9), ["dispatchConfig", "_targetInst", "nativeEvent", "isDefaultPrevented", "isPropagationStopped", "_dispatchListeners", "_dispatchInstances"]),
- u = {
- type: null,
- target: null,
- currentTarget: i.thatReturnsNull,
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function(e) {
- return e.timeStamp || Date.now()
- },
- defaultPrevented: null,
- isTrusted: null
- };
-
- function s(e, t, n, r) {
- this.dispatchConfig = e, this._targetInst = t, this.nativeEvent = n;
- var o = this.constructor.Interface;
- for (var a in o)
- if (o.hasOwnProperty(a)) {
- 0;
- var u = o[a];
- u ? this[a] = u(n) : "target" === a ? this.target = r : this[a] = n[a]
- }
- var s = null != n.defaultPrevented ? n.defaultPrevented : !1 === n.returnValue;
- return this.isDefaultPrevented = s ? i.thatReturnsTrue : i.thatReturnsFalse, this.isPropagationStopped = i.thatReturnsFalse, this
- }
- r(s.prototype, {
- preventDefault: function() {
- this.defaultPrevented = !0;
- var e = this.nativeEvent;
- e && (e.preventDefault ? e.preventDefault() : "unknown" != typeof e.returnValue && (e.returnValue = !1), this.isDefaultPrevented = i.thatReturnsTrue)
- },
- stopPropagation: function() {
- var e = this.nativeEvent;
- e && (e.stopPropagation ? e.stopPropagation() : "unknown" != typeof e.cancelBubble && (e.cancelBubble = !0), this.isPropagationStopped = i.thatReturnsTrue)
- },
- persist: function() {
- this.isPersistent = i.thatReturnsTrue
- },
- isPersistent: i.thatReturnsFalse,
- destructor: function() {
- var e = this.constructor.Interface;
- for (var t in e) this[t] = null;
- for (var n = 0; n < a.length; n++) this[a[n]] = null
- }
- }), s.Interface = u, s.augmentClass = function(e, t) {
- var n = function() {};
- n.prototype = this.prototype;
- var i = new n;
- r(i, e.prototype), e.prototype = i, e.prototype.constructor = e, e.Interface = r({}, this.Interface, t), e.augmentClass = this.augmentClass, o.addPoolingTo(e, o.fourArgumentPooler)
- }, o.addPoolingTo(s, o.fourArgumentPooler), e.exports = s
- }, function(e, t, n) {
- var r = n(94);
- e.exports = function(e, t, n) {
- if (r(e), void 0 === t) return e;
- switch (n) {
- case 1:
- return function(n) {
- return e.call(t, n)
- };
- case 2:
- return function(n, r) {
- return e.call(t, n, r)
- };
- case 3:
- return function(n, r, o) {
- return e.call(t, n, r, o)
- }
- }
- return function() {
- return e.apply(t, arguments)
- }
- }
- }, function(e, t, n) {
- var r = n(40),
- o = n(95);
- e.exports = n(44) ? function(e, t, n) {
- return r.f(e, t, o(1, n))
- } : function(e, t, n) {
- return e[t] = n, e
- }
- }, function(e, t) {
- e.exports = function(e) {
- try {
- return !!e()
- } catch (e) {
- return !0
- }
- }
- }, function(e, t) {
- var n = {}.hasOwnProperty;
- e.exports = function(e, t) {
- return n.call(e, t)
- }
- }, function(e, t) {
- e.exports = function(e) {
- if (void 0 == e) throw TypeError("Can't call method on " + e);
- return e
- }
- }, function(e, t, n) {
- "use strict";
- (function(e) {
- /*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
- var r = n(528),
- o = n(529),
- i = n(261);
-
- function a() {
- return s.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
- }
-
- function u(e, t) {
- if (a() < t) throw new RangeError("Invalid typed array length");
- return s.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = s.prototype : (null === e && (e = new s(t)), e.length = t), e
- }
-
- function s(e, t, n) {
- if (!(s.TYPED_ARRAY_SUPPORT || this instanceof s)) return new s(e, t, n);
- if ("number" == typeof e) {
- if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string");
- return f(this, e)
- }
- return l(this, e, t, n)
- }
-
- function l(e, t, n, r) {
- if ("number" == typeof t) throw new TypeError('"value" argument must not be a number');
- return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function(e, t, n, r) {
- if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError("'offset' is out of bounds");
- if (t.byteLength < n + (r || 0)) throw new RangeError("'length' is out of bounds");
- t = void 0 === n && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, n) : new Uint8Array(t, n, r);
- s.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = s.prototype : e = p(e, t);
- return e
- }(e, t, n, r) : "string" == typeof t ? function(e, t, n) {
- "string" == typeof n && "" !== n || (n = "utf8");
- if (!s.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');
- var r = 0 | h(t, n),
- o = (e = u(e, r)).write(t, n);
- o !== r && (e = e.slice(0, o));
- return e
- }(e, t, n) : function(e, t) {
- if (s.isBuffer(t)) {
- var n = 0 | d(t.length);
- return 0 === (e = u(e, n)).length ? e : (t.copy(e, 0, 0, n), e)
- }
- if (t) {
- if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) return "number" != typeof t.length || (r = t.length) != r ? u(e, 0) : p(e, t);
- if ("Buffer" === t.type && i(t.data)) return p(e, t.data)
- }
- var r;
- throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
- }(e, t)
- }
-
- function c(e) {
- if ("number" != typeof e) throw new TypeError('"size" argument must be a number');
- if (e < 0) throw new RangeError('"size" argument must not be negative')
- }
-
- function f(e, t) {
- if (c(t), e = u(e, t < 0 ? 0 : 0 | d(t)), !s.TYPED_ARRAY_SUPPORT)
- for (var n = 0; n < t; ++n) e[n] = 0;
- return e
- }
-
- function p(e, t) {
- var n = t.length < 0 ? 0 : 0 | d(t.length);
- e = u(e, n);
- for (var r = 0; r < n; r += 1) e[r] = 255 & t[r];
- return e
- }
-
- function d(e) {
- if (e >= a()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(16) + " bytes");
- return 0 | e
- }
-
- function h(e, t) {
- if (s.isBuffer(e)) return e.length;
- if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;
- "string" != typeof e && (e = "" + e);
- var n = e.length;
- if (0 === n) return 0;
- for (var r = !1;;) switch (t) {
- case "ascii":
- case "latin1":
- case "binary":
- return n;
- case "utf8":
- case "utf-8":
- case void 0:
- return F(e).length;
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return 2 * n;
- case "hex":
- return n >>> 1;
- case "base64":
- return z(e).length;
- default:
- if (r) return F(e).length;
- t = ("" + t).toLowerCase(), r = !0
- }
- }
-
- function v(e, t, n) {
- var r = e[t];
- e[t] = e[n], e[n] = r
- }
-
- function m(e, t, n, r, o) {
- if (0 === e.length) return -1;
- if ("string" == typeof n ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = o ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
- if (o) return -1;
- n = e.length - 1
- } else if (n < 0) {
- if (!o) return -1;
- n = 0
- }
- if ("string" == typeof t && (t = s.from(t, r)), s.isBuffer(t)) return 0 === t.length ? -1 : g(e, t, n, r, o);
- if ("number" == typeof t) return t &= 255, s.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : g(e, [t], n, r, o);
- throw new TypeError("val must be string, number or Buffer")
- }
-
- function g(e, t, n, r, o) {
- var i, a = 1,
- u = e.length,
- s = t.length;
- if (void 0 !== r && ("ucs2" === (r = String(r).toLowerCase()) || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) {
- if (e.length < 2 || t.length < 2) return -1;
- a = 2, u /= 2, s /= 2, n /= 2
- }
-
- function l(e, t) {
- return 1 === a ? e[t] : e.readUInt16BE(t * a)
- }
- if (o) {
- var c = -1;
- for (i = n; i < u; i++)
- if (l(e, i) === l(t, -1 === c ? 0 : i - c)) {
- if (-1 === c && (c = i), i - c + 1 === s) return c * a
- } else -1 !== c && (i -= i - c), c = -1
- } else
- for (n + s > u && (n = u - s), i = n; i >= 0; i--) {
- for (var f = !0, p = 0; p < s; p++)
- if (l(e, i + p) !== l(t, p)) {
- f = !1;
- break
- }
- if (f) return i
- }
- return -1
- }
-
- function y(e, t, n, r) {
- n = Number(n) || 0;
- var o = e.length - n;
- r ? (r = Number(r)) > o && (r = o) : r = o;
- var i = t.length;
- if (i % 2 != 0) throw new TypeError("Invalid hex string");
- r > i / 2 && (r = i / 2);
- for (var a = 0; a < r; ++a) {
- var u = parseInt(t.substr(2 * a, 2), 16);
- if (isNaN(u)) return a;
- e[n + a] = u
- }
- return a
- }
-
- function b(e, t, n, r) {
- return B(F(t, e.length - n), e, n, r)
- }
-
- function _(e, t, n, r) {
- return B(function(e) {
- for (var t = [], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
- return t
- }(t), e, n, r)
- }
-
- function w(e, t, n, r) {
- return _(e, t, n, r)
- }
-
- function E(e, t, n, r) {
- return B(z(t), e, n, r)
- }
-
- function x(e, t, n, r) {
- return B(function(e, t) {
- for (var n, r, o, i = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) n = e.charCodeAt(a), r = n >> 8, o = n % 256, i.push(o), i.push(r);
- return i
- }(t, e.length - n), e, n, r)
- }
-
- function S(e, t, n) {
- return 0 === t && n === e.length ? r.fromByteArray(e) : r.fromByteArray(e.slice(t, n))
- }
-
- function C(e, t, n) {
- n = Math.min(e.length, n);
- for (var r = [], o = t; o < n;) {
- var i, a, u, s, l = e[o],
- c = null,
- f = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
- if (o + f <= n) switch (f) {
- case 1:
- l < 128 && (c = l);
- break;
- case 2:
- 128 == (192 & (i = e[o + 1])) && (s = (31 & l) << 6 | 63 & i) > 127 && (c = s);
- break;
- case 3:
- i = e[o + 1], a = e[o + 2], 128 == (192 & i) && 128 == (192 & a) && (s = (15 & l) << 12 | (63 & i) << 6 | 63 & a) > 2047 && (s < 55296 || s > 57343) && (c = s);
- break;
- case 4:
- i = e[o + 1], a = e[o + 2], u = e[o + 3], 128 == (192 & i) && 128 == (192 & a) && 128 == (192 & u) && (s = (15 & l) << 18 | (63 & i) << 12 | (63 & a) << 6 | 63 & u) > 65535 && s < 1114112 && (c = s)
- }
- null === c ? (c = 65533, f = 1) : c > 65535 && (c -= 65536, r.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c), r.push(c), o += f
- }
- return function(e) {
- var t = e.length;
- if (t <= k) return String.fromCharCode.apply(String, e);
- var n = "",
- r = 0;
- for (; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += k));
- return n
- }(r)
- }
- t.Buffer = s, t.SlowBuffer = function(e) {
- +e != e && (e = 0);
- return s.alloc(+e)
- }, t.INSPECT_MAX_BYTES = 50, s.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function() {
- try {
- var e = new Uint8Array(1);
- return e.__proto__ = {
- __proto__: Uint8Array.prototype,
- foo: function() {
- return 42
- }
- }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
- } catch (e) {
- return !1
- }
- }(), t.kMaxLength = a(), s.poolSize = 8192, s._augment = function(e) {
- return e.__proto__ = s.prototype, e
- }, s.from = function(e, t, n) {
- return l(null, e, t, n)
- }, s.TYPED_ARRAY_SUPPORT && (s.prototype.__proto__ = Uint8Array.prototype, s.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && s[Symbol.species] === s && Object.defineProperty(s, Symbol.species, {
- value: null,
- configurable: !0
- })), s.alloc = function(e, t, n) {
- return function(e, t, n, r) {
- return c(t), t <= 0 ? u(e, t) : void 0 !== n ? "string" == typeof r ? u(e, t).fill(n, r) : u(e, t).fill(n) : u(e, t)
- }(null, e, t, n)
- }, s.allocUnsafe = function(e) {
- return f(null, e)
- }, s.allocUnsafeSlow = function(e) {
- return f(null, e)
- }, s.isBuffer = function(e) {
- return !(null == e || !e._isBuffer)
- }, s.compare = function(e, t) {
- if (!s.isBuffer(e) || !s.isBuffer(t)) throw new TypeError("Arguments must be Buffers");
- if (e === t) return 0;
- for (var n = e.length, r = t.length, o = 0, i = Math.min(n, r); o < i; ++o)
- if (e[o] !== t[o]) {
- n = e[o], r = t[o];
- break
- }
- return n < r ? -1 : r < n ? 1 : 0
- }, s.isEncoding = function(e) {
- switch (String(e).toLowerCase()) {
- case "hex":
- case "utf8":
- case "utf-8":
- case "ascii":
- case "latin1":
- case "binary":
- case "base64":
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return !0;
- default:
- return !1
- }
- }, s.concat = function(e, t) {
- if (!i(e)) throw new TypeError('"list" argument must be an Array of Buffers');
- if (0 === e.length) return s.alloc(0);
- var n;
- if (void 0 === t)
- for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
- var r = s.allocUnsafe(t),
- o = 0;
- for (n = 0; n < e.length; ++n) {
- var a = e[n];
- if (!s.isBuffer(a)) throw new TypeError('"list" argument must be an Array of Buffers');
- a.copy(r, o), o += a.length
- }
- return r
- }, s.byteLength = h, s.prototype._isBuffer = !0, s.prototype.swap16 = function() {
- var e = this.length;
- if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
- for (var t = 0; t < e; t += 2) v(this, t, t + 1);
- return this
- }, s.prototype.swap32 = function() {
- var e = this.length;
- if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
- for (var t = 0; t < e; t += 4) v(this, t, t + 3), v(this, t + 1, t + 2);
- return this
- }, s.prototype.swap64 = function() {
- var e = this.length;
- if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
- for (var t = 0; t < e; t += 8) v(this, t, t + 7), v(this, t + 1, t + 6), v(this, t + 2, t + 5), v(this, t + 3, t + 4);
- return this
- }, s.prototype.toString = function() {
- var e = 0 | this.length;
- return 0 === e ? "" : 0 === arguments.length ? C(this, 0, e) : function(e, t, n) {
- var r = !1;
- if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
- if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) return "";
- if ((n >>>= 0) <= (t >>>= 0)) return "";
- for (e || (e = "utf8");;) switch (e) {
- case "hex":
- return P(this, t, n);
- case "utf8":
- case "utf-8":
- return C(this, t, n);
- case "ascii":
- return A(this, t, n);
- case "latin1":
- case "binary":
- return O(this, t, n);
- case "base64":
- return S(this, t, n);
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return T(this, t, n);
- default:
- if (r) throw new TypeError("Unknown encoding: " + e);
- e = (e + "").toLowerCase(), r = !0
- }
- }.apply(this, arguments)
- }, s.prototype.equals = function(e) {
- if (!s.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
- return this === e || 0 === s.compare(this, e)
- }, s.prototype.inspect = function() {
- var e = "",
- n = t.INSPECT_MAX_BYTES;
- return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "), this.length > n && (e += " ... ")), ""
- }, s.prototype.compare = function(e, t, n, r, o) {
- if (!s.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
- if (void 0 === t && (t = 0), void 0 === n && (n = e ? e.length : 0), void 0 === r && (r = 0), void 0 === o && (o = this.length), t < 0 || n > e.length || r < 0 || o > this.length) throw new RangeError("out of range index");
- if (r >= o && t >= n) return 0;
- if (r >= o) return -1;
- if (t >= n) return 1;
- if (t >>>= 0, n >>>= 0, r >>>= 0, o >>>= 0, this === e) return 0;
- for (var i = o - r, a = n - t, u = Math.min(i, a), l = this.slice(r, o), c = e.slice(t, n), f = 0; f < u; ++f)
- if (l[f] !== c[f]) {
- i = l[f], a = c[f];
- break
- }
- return i < a ? -1 : a < i ? 1 : 0
- }, s.prototype.includes = function(e, t, n) {
- return -1 !== this.indexOf(e, t, n)
- }, s.prototype.indexOf = function(e, t, n) {
- return m(this, e, t, n, !0)
- }, s.prototype.lastIndexOf = function(e, t, n) {
- return m(this, e, t, n, !1)
- }, s.prototype.write = function(e, t, n, r) {
- if (void 0 === t) r = "utf8", n = this.length, t = 0;
- else if (void 0 === n && "string" == typeof t) r = t, n = this.length, t = 0;
- else {
- if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
- t |= 0, isFinite(n) ? (n |= 0, void 0 === r && (r = "utf8")) : (r = n, n = void 0)
- }
- var o = this.length - t;
- if ((void 0 === n || n > o) && (n = o), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
- r || (r = "utf8");
- for (var i = !1;;) switch (r) {
- case "hex":
- return y(this, e, t, n);
- case "utf8":
- case "utf-8":
- return b(this, e, t, n);
- case "ascii":
- return _(this, e, t, n);
- case "latin1":
- case "binary":
- return w(this, e, t, n);
- case "base64":
- return E(this, e, t, n);
- case "ucs2":
- case "ucs-2":
- case "utf16le":
- case "utf-16le":
- return x(this, e, t, n);
- default:
- if (i) throw new TypeError("Unknown encoding: " + r);
- r = ("" + r).toLowerCase(), i = !0
- }
- }, s.prototype.toJSON = function() {
- return {
- type: "Buffer",
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
- };
- var k = 4096;
-
- function A(e, t, n) {
- var r = "";
- n = Math.min(e.length, n);
- for (var o = t; o < n; ++o) r += String.fromCharCode(127 & e[o]);
- return r
- }
-
- function O(e, t, n) {
- var r = "";
- n = Math.min(e.length, n);
- for (var o = t; o < n; ++o) r += String.fromCharCode(e[o]);
- return r
- }
-
- function P(e, t, n) {
- var r = e.length;
- (!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
- for (var o = "", i = t; i < n; ++i) o += q(e[i]);
- return o
- }
-
- function T(e, t, n) {
- for (var r = e.slice(t, n), o = "", i = 0; i < r.length; i += 2) o += String.fromCharCode(r[i] + 256 * r[i + 1]);
- return o
- }
-
- function M(e, t, n) {
- if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
- if (e + t > n) throw new RangeError("Trying to access beyond buffer length")
- }
-
- function I(e, t, n, r, o, i) {
- if (!s.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
- if (t > o || t < i) throw new RangeError('"value" argument is out of bounds');
- if (n + r > e.length) throw new RangeError("Index out of range")
- }
-
- function j(e, t, n, r) {
- t < 0 && (t = 65535 + t + 1);
- for (var o = 0, i = Math.min(e.length - n, 2); o < i; ++o) e[n + o] = (t & 255 << 8 * (r ? o : 1 - o)) >>> 8 * (r ? o : 1 - o)
- }
-
- function N(e, t, n, r) {
- t < 0 && (t = 4294967295 + t + 1);
- for (var o = 0, i = Math.min(e.length - n, 4); o < i; ++o) e[n + o] = t >>> 8 * (r ? o : 3 - o) & 255
- }
-
- function R(e, t, n, r, o, i) {
- if (n + r > e.length) throw new RangeError("Index out of range");
- if (n < 0) throw new RangeError("Index out of range")
- }
-
- function D(e, t, n, r, i) {
- return i || R(e, 0, n, 4), o.write(e, t, n, r, 23, 4), n + 4
- }
-
- function L(e, t, n, r, i) {
- return i || R(e, 0, n, 8), o.write(e, t, n, r, 52, 8), n + 8
- }
- s.prototype.slice = function(e, t) {
- var n, r = this.length;
- if (e = ~~e, t = void 0 === t ? r : ~~t, e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), t < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e), s.TYPED_ARRAY_SUPPORT)(n = this.subarray(e, t)).__proto__ = s.prototype;
- else {
- var o = t - e;
- n = new s(o, void 0);
- for (var i = 0; i < o; ++i) n[i] = this[i + e]
- }
- return n
- }, s.prototype.readUIntLE = function(e, t, n) {
- e |= 0, t |= 0, n || M(e, t, this.length);
- for (var r = this[e], o = 1, i = 0; ++i < t && (o *= 256);) r += this[e + i] * o;
- return r
- }, s.prototype.readUIntBE = function(e, t, n) {
- e |= 0, t |= 0, n || M(e, t, this.length);
- for (var r = this[e + --t], o = 1; t > 0 && (o *= 256);) r += this[e + --t] * o;
- return r
- }, s.prototype.readUInt8 = function(e, t) {
- return t || M(e, 1, this.length), this[e]
- }, s.prototype.readUInt16LE = function(e, t) {
- return t || M(e, 2, this.length), this[e] | this[e + 1] << 8
- }, s.prototype.readUInt16BE = function(e, t) {
- return t || M(e, 2, this.length), this[e] << 8 | this[e + 1]
- }, s.prototype.readUInt32LE = function(e, t) {
- return t || M(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
- }, s.prototype.readUInt32BE = function(e, t) {
- return t || M(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
- }, s.prototype.readIntLE = function(e, t, n) {
- e |= 0, t |= 0, n || M(e, t, this.length);
- for (var r = this[e], o = 1, i = 0; ++i < t && (o *= 256);) r += this[e + i] * o;
- return r >= (o *= 128) && (r -= Math.pow(2, 8 * t)), r
- }, s.prototype.readIntBE = function(e, t, n) {
- e |= 0, t |= 0, n || M(e, t, this.length);
- for (var r = t, o = 1, i = this[e + --r]; r > 0 && (o *= 256);) i += this[e + --r] * o;
- return i >= (o *= 128) && (i -= Math.pow(2, 8 * t)), i
- }, s.prototype.readInt8 = function(e, t) {
- return t || M(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
- }, s.prototype.readInt16LE = function(e, t) {
- t || M(e, 2, this.length);
- var n = this[e] | this[e + 1] << 8;
- return 32768 & n ? 4294901760 | n : n
- }, s.prototype.readInt16BE = function(e, t) {
- t || M(e, 2, this.length);
- var n = this[e + 1] | this[e] << 8;
- return 32768 & n ? 4294901760 | n : n
- }, s.prototype.readInt32LE = function(e, t) {
- return t || M(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
- }, s.prototype.readInt32BE = function(e, t) {
- return t || M(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
- }, s.prototype.readFloatLE = function(e, t) {
- return t || M(e, 4, this.length), o.read(this, e, !0, 23, 4)
- }, s.prototype.readFloatBE = function(e, t) {
- return t || M(e, 4, this.length), o.read(this, e, !1, 23, 4)
- }, s.prototype.readDoubleLE = function(e, t) {
- return t || M(e, 8, this.length), o.read(this, e, !0, 52, 8)
- }, s.prototype.readDoubleBE = function(e, t) {
- return t || M(e, 8, this.length), o.read(this, e, !1, 52, 8)
- }, s.prototype.writeUIntLE = function(e, t, n, r) {
- (e = +e, t |= 0, n |= 0, r) || I(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
- var o = 1,
- i = 0;
- for (this[t] = 255 & e; ++i < n && (o *= 256);) this[t + i] = e / o & 255;
- return t + n
- }, s.prototype.writeUIntBE = function(e, t, n, r) {
- (e = +e, t |= 0, n |= 0, r) || I(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
- var o = n - 1,
- i = 1;
- for (this[t + o] = 255 & e; --o >= 0 && (i *= 256);) this[t + o] = e / i & 255;
- return t + n
- }, s.prototype.writeUInt8 = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 1, 255, 0), s.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = 255 & e, t + 1
- }, s.prototype.writeUInt16LE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 2, 65535, 0), s.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : j(this, e, t, !0), t + 2
- }, s.prototype.writeUInt16BE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 2, 65535, 0), s.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : j(this, e, t, !1), t + 2
- }, s.prototype.writeUInt32LE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 4, 4294967295, 0), s.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : N(this, e, t, !0), t + 4
- }, s.prototype.writeUInt32BE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 4, 4294967295, 0), s.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : N(this, e, t, !1), t + 4
- }, s.prototype.writeIntLE = function(e, t, n, r) {
- if (e = +e, t |= 0, !r) {
- var o = Math.pow(2, 8 * n - 1);
- I(this, e, t, n, o - 1, -o)
- }
- var i = 0,
- a = 1,
- u = 0;
- for (this[t] = 255 & e; ++i < n && (a *= 256);) e < 0 && 0 === u && 0 !== this[t + i - 1] && (u = 1), this[t + i] = (e / a >> 0) - u & 255;
- return t + n
- }, s.prototype.writeIntBE = function(e, t, n, r) {
- if (e = +e, t |= 0, !r) {
- var o = Math.pow(2, 8 * n - 1);
- I(this, e, t, n, o - 1, -o)
- }
- var i = n - 1,
- a = 1,
- u = 0;
- for (this[t + i] = 255 & e; --i >= 0 && (a *= 256);) e < 0 && 0 === u && 0 !== this[t + i + 1] && (u = 1), this[t + i] = (e / a >> 0) - u & 255;
- return t + n
- }, s.prototype.writeInt8 = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 1, 127, -128), s.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1
- }, s.prototype.writeInt16LE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 2, 32767, -32768), s.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : j(this, e, t, !0), t + 2
- }, s.prototype.writeInt16BE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 2, 32767, -32768), s.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : j(this, e, t, !1), t + 2
- }, s.prototype.writeInt32LE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 4, 2147483647, -2147483648), s.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : N(this, e, t, !0), t + 4
- }, s.prototype.writeInt32BE = function(e, t, n) {
- return e = +e, t |= 0, n || I(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), s.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : N(this, e, t, !1), t + 4
- }, s.prototype.writeFloatLE = function(e, t, n) {
- return D(this, e, t, !0, n)
- }, s.prototype.writeFloatBE = function(e, t, n) {
- return D(this, e, t, !1, n)
- }, s.prototype.writeDoubleLE = function(e, t, n) {
- return L(this, e, t, !0, n)
- }, s.prototype.writeDoubleBE = function(e, t, n) {
- return L(this, e, t, !1, n)
- }, s.prototype.copy = function(e, t, n, r) {
- if (n || (n = 0), r || 0 === r || (r = this.length), t >= e.length && (t = e.length), t || (t = 0), r > 0 && r < n && (r = n), r === n) return 0;
- if (0 === e.length || 0 === this.length) return 0;
- if (t < 0) throw new RangeError("targetStart out of bounds");
- if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");
- if (r < 0) throw new RangeError("sourceEnd out of bounds");
- r > this.length && (r = this.length), e.length - t < r - n && (r = e.length - t + n);
- var o, i = r - n;
- if (this === e && n < t && t < r)
- for (o = i - 1; o >= 0; --o) e[o + t] = this[o + n];
- else if (i < 1e3 || !s.TYPED_ARRAY_SUPPORT)
- for (o = 0; o < i; ++o) e[o + t] = this[o + n];
- else Uint8Array.prototype.set.call(e, this.subarray(n, n + i), t);
- return i
- }, s.prototype.fill = function(e, t, n, r) {
- if ("string" == typeof e) {
- if ("string" == typeof t ? (r = t, t = 0, n = this.length) : "string" == typeof n && (r = n, n = this.length), 1 === e.length) {
- var o = e.charCodeAt(0);
- o < 256 && (e = o)
- }
- if (void 0 !== r && "string" != typeof r) throw new TypeError("encoding must be a string");
- if ("string" == typeof r && !s.isEncoding(r)) throw new TypeError("Unknown encoding: " + r)
- } else "number" == typeof e && (e &= 255);
- if (t < 0 || this.length < t || this.length < n) throw new RangeError("Out of range index");
- if (n <= t) return this;
- var i;
- if (t >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0), "number" == typeof e)
- for (i = t; i < n; ++i) this[i] = e;
- else {
- var a = s.isBuffer(e) ? e : F(new s(e, r).toString()),
- u = a.length;
- for (i = 0; i < n - t; ++i) this[i + t] = a[i % u]
- }
- return this
- };
- var U = /[^+\/0-9A-Za-z-_]/g;
-
- function q(e) {
- return e < 16 ? "0" + e.toString(16) : e.toString(16)
- }
-
- function F(e, t) {
- var n;
- t = t || 1 / 0;
- for (var r = e.length, o = null, i = [], a = 0; a < r; ++a) {
- if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
- if (!o) {
- if (n > 56319) {
- (t -= 3) > -1 && i.push(239, 191, 189);
- continue
- }
- if (a + 1 === r) {
- (t -= 3) > -1 && i.push(239, 191, 189);
- continue
- }
- o = n;
- continue
- }
- if (n < 56320) {
- (t -= 3) > -1 && i.push(239, 191, 189), o = n;
- continue
- }
- n = 65536 + (o - 55296 << 10 | n - 56320)
- } else o && (t -= 3) > -1 && i.push(239, 191, 189);
- if (o = null, n < 128) {
- if ((t -= 1) < 0) break;
- i.push(n)
- } else if (n < 2048) {
- if ((t -= 2) < 0) break;
- i.push(n >> 6 | 192, 63 & n | 128)
- } else if (n < 65536) {
- if ((t -= 3) < 0) break;
- i.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
- } else {
- if (!(n < 1114112)) throw new Error("Invalid code point");
- if ((t -= 4) < 0) break;
- i.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
- }
- }
- return i
- }
-
- function z(e) {
- return r.toByteArray(function(e) {
- if ((e = function(e) {
- return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
- }(e).replace(U, "")).length < 2) return "";
- for (; e.length % 4 != 0;) e += "=";
- return e
- }(e))
- }
-
- function B(e, t, n, r) {
- for (var o = 0; o < r && !(o + n >= t.length || o >= e.length); ++o) t[o + n] = e[o];
- return o
- }
- }).call(t, n(31))
- }, function(e, t) {
- var n, r, o = e.exports = {};
-
- function i() {
- throw new Error("setTimeout has not been defined")
- }
-
- function a() {
- throw new Error("clearTimeout has not been defined")
- }
-
- function u(e) {
- if (n === setTimeout) return setTimeout(e, 0);
- if ((n === i || !n) && setTimeout) return n = setTimeout, setTimeout(e, 0);
- try {
- return n(e, 0)
- } catch (t) {
- try {
- return n.call(null, e, 0)
- } catch (t) {
- return n.call(this, e, 0)
- }
- }
- }! function() {
- try {
- n = "function" == typeof setTimeout ? setTimeout : i
- } catch (e) {
- n = i
- }
- try {
- r = "function" == typeof clearTimeout ? clearTimeout : a
- } catch (e) {
- r = a
- }
- }();
- var s, l = [],
- c = !1,
- f = -1;
-
- function p() {
- c && s && (c = !1, s.length ? l = s.concat(l) : f = -1, l.length && d())
- }
-
- function d() {
- if (!c) {
- var e = u(p);
- c = !0;
- for (var t = l.length; t;) {
- for (s = l, l = []; ++f < t;) s && s[f].run();
- f = -1, t = l.length
- }
- s = null, c = !1,
- function(e) {
- if (r === clearTimeout) return clearTimeout(e);
- if ((r === a || !r) && clearTimeout) return r = clearTimeout, clearTimeout(e);
- try {
- r(e)
- } catch (t) {
- try {
- return r.call(null, e)
- } catch (t) {
- return r.call(this, e)
- }
- }
- }(e)
- }
- }
-
- function h(e, t) {
- this.fun = e, this.array = t
- }
-
- function v() {}
- o.nextTick = function(e) {
- var t = new Array(arguments.length - 1);
- if (arguments.length > 1)
- for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- l.push(new h(e, t)), 1 !== l.length || c || u(d)
- }, h.prototype.run = function() {
- this.fun.apply(null, this.array)
- }, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = v, o.addListener = v, o.once = v, o.off = v, o.removeListener = v, o.removeAllListeners = v, o.emit = v, o.prependListener = v, o.prependOnceListener = v, o.listeners = function(e) {
- return []
- }, o.binding = function(e) {
- throw new Error("process.binding is not supported")
- }, o.cwd = function() {
- return "/"
- }, o.chdir = function(e) {
- throw new Error("process.chdir is not supported")
- }, o.umask = function() {
- return 0
- }
- }, function(e, t, n) {
- "use strict";
- e.exports = function(e) {
- if ("function" != typeof e) throw new TypeError(e + " is not a function");
- return e
- }
- }, function(e, t, n) {
- "use strict";
-
- function r(e, t) {
- return e === t
- }
-
- function o(e) {
- var t = arguments.length <= 1 || void 0 === arguments[1] ? r : arguments[1],
- n = null,
- o = null;
- return function() {
- for (var r = arguments.length, i = Array(r), a = 0; a < r; a++) i[a] = arguments[a];
- return null !== n && n.length === i.length && i.every(function(e, r) {
- return t(e, n[r])
- }) || (o = e.apply(void 0, i)), n = i, o
- }
- }
-
- function i(e) {
- for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
- return function() {
- for (var t = arguments.length, r = Array(t), o = 0; o < t; o++) r[o] = arguments[o];
- var i = 0,
- a = r.pop(),
- u = function(e) {
- var t = Array.isArray(e[0]) ? e[0] : e;
- if (!t.every(function(e) {
- return "function" == typeof e
- })) {
- var n = t.map(function(e) {
- return typeof e
- }).join(", ");
- throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: [" + n + "]")
- }
- return t
- }(r),
- s = e.apply(void 0, [function() {
- return i++, a.apply(void 0, arguments)
- }].concat(n)),
- l = function(e, t) {
- for (var n = arguments.length, r = Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++) r[o - 2] = arguments[o];
- var i = u.map(function(n) {
- return n.apply(void 0, [e, t].concat(r))
- });
- return s.apply(void 0, function(e) {
- if (Array.isArray(e)) {
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
- return n
- }
- return Array.from(e)
- }(i))
- };
- return l.resultFunc = a, l.recomputations = function() {
- return i
- }, l.resetRecomputations = function() {
- return i = 0
- }, l
- }
- }
- t.__esModule = !0, t.defaultMemoize = o, t.createSelectorCreator = i, t.createStructuredSelector = function(e) {
- var t = arguments.length <= 1 || void 0 === arguments[1] ? a : arguments[1];
- if ("object" != typeof e) throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a " + typeof e);
- var n = Object.keys(e);
- return t(n.map(function(t) {
- return e[t]
- }), function() {
- for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
- return t.reduce(function(e, t, r) {
- return e[n[r]] = t, e
- }, {})
- })
- };
- var a = t.createSelector = i(o)
- }, function(e, t, n) {
- var r = n(117),
- o = n(243);
- e.exports = n(100) ? function(e, t, n) {
- return r.f(e, t, o(1, n))
- } : function(e, t, n) {
- return e[t] = n, e
- }
- }, function(e, t, n) {
- var r = n(74);
- e.exports = function(e) {
- if (!r(e)) throw TypeError(e + " is not an object!");
- return e
- }
- }, function(e, t) {
- var n = e.exports = {
- version: "2.5.5"
- };
- "number" == typeof __e && (__e = n)
- }, function(e, t, n) {
- var r = n(277);
- e.exports = function(e) {
- return null == e ? "" : r(e)
- }
- }, function(e, t, n) {
- var r = n(77),
- o = n(574),
- i = n(575),
- a = "[object Null]",
- u = "[object Undefined]",
- s = r ? r.toStringTag : void 0;
- e.exports = function(e) {
- return null == e ? void 0 === e ? u : a : s && s in Object(e) ? o(e) : i(e)
- }
- }, function(e, t, n) {
- var r = n(592),
- o = n(595);
- e.exports = function(e, t) {
- var n = o(e, t);
- return r(n) ? n : void 0
- }
- }, function(e, t, n) {
- var r = n(295),
- o = n(632),
- i = n(78);
- e.exports = function(e) {
- return i(e) ? r(e) : o(e)
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(140),
- o = Object.keys || function(e) {
- var t = [];
- for (var n in e) t.push(n);
- return t
- };
- e.exports = f;
- var i = n(106);
- i.inherits = n(81);
- var a = n(305),
- u = n(195);
- i.inherits(f, a);
- for (var s = o(u.prototype), l = 0; l < s.length; l++) {
- var c = s[l];
- f.prototype[c] || (f.prototype[c] = u.prototype[c])
- }
-
- function f(e) {
- if (!(this instanceof f)) return new f(e);
- a.call(this, e), u.call(this, e), e && !1 === e.readable && (this.readable = !1), e && !1 === e.writable && (this.writable = !1), this.allowHalfOpen = !0, e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1), this.once("end", p)
- }
-
- function p() {
- this.allowHalfOpen || this._writableState.ended || r.nextTick(d, this)
- }
-
- function d(e) {
- e.end()
- }
- Object.defineProperty(f.prototype, "writableHighWaterMark", {
- enumerable: !1,
- get: function() {
- return this._writableState.highWaterMark
- }
- }), Object.defineProperty(f.prototype, "destroyed", {
- get: function() {
- return void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed && this._writableState.destroyed)
- },
- set: function(e) {
- void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e)
- }
- }), f.prototype._destroy = function(e, t) {
- this.push(null), this.end(), r.nextTick(t, e)
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(312)();
- e.exports = function(e) {
- return e !== r && null !== e
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(670),
- o = Math.max;
- e.exports = function(e) {
- return o(0, r(e))
- }
- }, function(e, t, n) {
- "use strict"
- }, function(e, t, n) {
- "use strict";
- var r = n(11),
- o = (n(8), function(e) {
- if (this.instancePool.length) {
- var t = this.instancePool.pop();
- return this.call(t, e), t
- }
- return new this(e)
- }),
- i = function(e) {
- e instanceof this || r("25"), e.destructor(), this.instancePool.length < this.poolSize && this.instancePool.push(e)
- },
- a = o,
- u = {
- addPoolingTo: function(e, t) {
- var n = e;
- return n.instancePool = [], n.getPooled = t || a, n.poolSize || (n.poolSize = 10), n.release = i, n
- },
- oneArgumentPooler: o,
- twoArgumentPooler: function(e, t) {
- if (this.instancePool.length) {
- var n = this.instancePool.pop();
- return this.call(n, e, t), n
- }
- return new this(e, t)
- },
- threeArgumentPooler: function(e, t, n) {
- if (this.instancePool.length) {
- var r = this.instancePool.pop();
- return this.call(r, e, t, n), r
- }
- return new this(e, t, n)
- },
- fourArgumentPooler: function(e, t, n, r) {
- if (this.instancePool.length) {
- var o = this.instancePool.pop();
- return this.call(o, e, t, n, r), o
- }
- return new this(e, t, n, r)
- }
- };
- e.exports = u
- }, function(e, t) {
- e.exports = {}
- }, function(e, t, n) {
- var r = n(154),
- o = n(155);
- e.exports = function(e) {
- return r(o(e))
- }
- }, function(e, t, n) {
- var r = n(155);
- e.exports = function(e) {
- return Object(r(e))
- }
- }, function(e, t, n) {
- var r = n(33),
- o = n(58),
- i = n(118),
- a = n(167)("src"),
- u = Function.toString,
- s = ("" + u).split("toString");
- n(60).inspectSource = function(e) {
- return u.call(e)
- }, (e.exports = function(e, t, n, u) {
- var l = "function" == typeof n;
- l && (i(n, "name") || o(n, "name", t)), e[t] !== n && (l && (i(n, a) || o(n, a, e[t] ? "" + e[t] : s.join(String(t)))), e === r ? e[t] = n : u ? e[t] ? e[t] = n : o(e, t, n) : (delete e[t], o(e, t, n)))
- })(Function.prototype, "toString", function() {
- return "function" == typeof this && this[a] || u.call(this)
- })
- }, function(e, t) {
- e.exports = function(e) {
- return "object" == typeof e ? null !== e : "function" == typeof e
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(13),
- o = n(264),
- i = n(536),
- a = n(541),
- u = n(76),
- s = n(542),
- l = n(545),
- c = n(546),
- f = n(548),
- p = u.createElement,
- d = u.createFactory,
- h = u.cloneElement,
- v = r,
- m = function(e) {
- return e
- },
- g = {
- Children: {
- map: i.map,
- forEach: i.forEach,
- count: i.count,
- toArray: i.toArray,
- only: f
- },
- Component: o.Component,
- PureComponent: o.PureComponent,
- createElement: p,
- cloneElement: h,
- isValidElement: u.isValidElement,
- PropTypes: s,
- createClass: c,
- createFactory: d,
- createMixin: m,
- DOM: a,
- version: l,
- __spread: v
- };
- e.exports = g
- }, function(e, t, n) {
- "use strict";
- var r = n(13),
- o = n(46),
- i = (n(9), n(266), Object.prototype.hasOwnProperty),
- a = n(267),
- u = {
- key: !0,
- ref: !0,
- __self: !0,
- __source: !0
- };
-
- function s(e) {
- return void 0 !== e.ref
- }
-
- function l(e) {
- return void 0 !== e.key
- }
- var c = function(e, t, n, r, o, i, u) {
- var s = {
- $$typeof: a,
- type: e,
- key: t,
- ref: n,
- props: u,
- _owner: i
- };
- return s
- };
- c.createElement = function(e, t, n) {
- var r, a = {},
- f = null,
- p = null;
- if (null != t)
- for (r in s(t) && (p = t.ref), l(t) && (f = "" + t.key), void 0 === t.__self ? null : t.__self, void 0 === t.__source ? null : t.__source, t) i.call(t, r) && !u.hasOwnProperty(r) && (a[r] = t[r]);
- var d = arguments.length - 2;
- if (1 === d) a.children = n;
- else if (d > 1) {
- for (var h = Array(d), v = 0; v < d; v++) h[v] = arguments[v + 2];
- 0, a.children = h
- }
- if (e && e.defaultProps) {
- var m = e.defaultProps;
- for (r in m) void 0 === a[r] && (a[r] = m[r])
- }
- return c(e, f, p, 0, 0, o.current, a)
- }, c.createFactory = function(e) {
- var t = c.createElement.bind(null, e);
- return t.type = e, t
- }, c.cloneAndReplaceKey = function(e, t) {
- return c(e.type, t, e.ref, e._self, e._source, e._owner, e.props)
- }, c.cloneElement = function(e, t, n) {
- var a, f, p = r({}, e.props),
- d = e.key,
- h = e.ref,
- v = (e._self, e._source, e._owner);
- if (null != t)
- for (a in s(t) && (h = t.ref, v = o.current), l(t) && (d = "" + t.key), e.type && e.type.defaultProps && (f = e.type.defaultProps), t) i.call(t, a) && !u.hasOwnProperty(a) && (void 0 === t[a] && void 0 !== f ? p[a] = f[a] : p[a] = t[a]);
- var m = arguments.length - 2;
- if (1 === m) p.children = n;
- else if (m > 1) {
- for (var g = Array(m), y = 0; y < m; y++) g[y] = arguments[y + 2];
- p.children = g
- }
- return c(e.type, d, h, 0, 0, v, p)
- }, c.isValidElement = function(e) {
- return "object" == typeof e && null !== e && e.$$typeof === a
- }, e.exports = c
- }, function(e, t, n) {
- var r = n(37).Symbol;
- e.exports = r
- }, function(e, t, n) {
- var r = n(285),
- o = n(187);
- e.exports = function(e) {
- return null != e && o(e.length) && !r(e)
- }
- }, function(e, t, n) {
- var r = n(24),
- o = n(190),
- i = n(640),
- a = n(61);
- e.exports = function(e, t) {
- return r(e) ? e : o(e, t) ? [e] : i(a(e))
- }
- }, function(e, t, n) {
- var r = n(128),
- o = 1 / 0;
- e.exports = function(e) {
- if ("string" == typeof e || r(e)) return e;
- var t = e + "";
- return "0" == t && 1 / e == -o ? "-0" : t
- }
- }, function(e, t) {
- "function" == typeof Object.create ? e.exports = function(e, t) {
- e.super_ = t, e.prototype = Object.create(t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- })
- } : e.exports = function(e, t) {
- e.super_ = t;
- var n = function() {};
- n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(66);
- e.exports = function(e) {
- if (!r(e)) throw new TypeError("Cannot use null or undefined");
- return e
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, o = n(728),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- t.default = function(e) {
- if (Array.isArray(e)) {
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
- return n
- }
- return (0, i.default)(e)
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.default = function(e, t) {
- var n = {};
- for (var r in e) t.indexOf(r) >= 0 || Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
- return n
- }
- }, function(e, t, n) {
- "use strict";
-
- function r(e) {
- return void 0 === e || null === e
- }
- e.exports.isNothing = r, e.exports.isObject = function(e) {
- return "object" == typeof e && null !== e
- }, e.exports.toArray = function(e) {
- return Array.isArray(e) ? e : r(e) ? [] : [e]
- }, e.exports.repeat = function(e, t) {
- var n, r = "";
- for (n = 0; n < t; n += 1) r += e;
- return r
- }, e.exports.isNegativeZero = function(e) {
- return 0 === e && Number.NEGATIVE_INFINITY === 1 / e
- }, e.exports.extend = function(e, t) {
- var n, r, o, i;
- if (t)
- for (n = 0, r = (i = Object.keys(t)).length; n < r; n += 1) e[o = i[n]] = t[o];
- return e
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(85),
- o = n(107),
- i = n(16);
-
- function a(e, t, n) {
- var r = [];
- return e.include.forEach(function(e) {
- n = a(e, t, n)
- }), e[t].forEach(function(e) {
- n.forEach(function(t, n) {
- t.tag === e.tag && t.kind === e.kind && r.push(n)
- }), n.push(e)
- }), n.filter(function(e, t) {
- return -1 === r.indexOf(t)
- })
- }
-
- function u(e) {
- this.include = e.include || [], this.implicit = e.implicit || [], this.explicit = e.explicit || [], this.implicit.forEach(function(e) {
- if (e.loadKind && "scalar" !== e.loadKind) throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")
- }), this.compiledImplicit = a(this, "implicit", []), this.compiledExplicit = a(this, "explicit", []), this.compiledTypeMap = function() {
- var e, t, n = {
- scalar: {},
- sequence: {},
- mapping: {},
- fallback: {}
- };
-
- function r(e) {
- n[e.kind][e.tag] = n.fallback[e.tag] = e
- }
- for (e = 0, t = arguments.length; e < t; e += 1) arguments[e].forEach(r);
- return n
- }(this.compiledImplicit, this.compiledExplicit)
- }
- u.DEFAULT = null, u.create = function() {
- var e, t;
- switch (arguments.length) {
- case 1:
- e = u.DEFAULT, t = arguments[0];
- break;
- case 2:
- e = arguments[0], t = arguments[1];
- break;
- default:
- throw new o("Wrong number of arguments for Schema.create function")
- }
- if (e = r.toArray(e), t = r.toArray(t), !e.every(function(e) {
- return e instanceof u
- })) throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");
- if (!t.every(function(e) {
- return e instanceof i
- })) throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");
- return new u({
- include: e,
- explicit: t
- })
- }, e.exports = u
- }, function(e, t, n) {
- "use strict";
- var r = n(11);
- n(8);
-
- function o(e, t) {
- return (e & t) === t
- }
- var i = {
- MUST_USE_PROPERTY: 1,
- HAS_BOOLEAN_VALUE: 4,
- HAS_NUMERIC_VALUE: 8,
- HAS_POSITIVE_NUMERIC_VALUE: 24,
- HAS_OVERLOADED_BOOLEAN_VALUE: 32,
- injectDOMPropertyConfig: function(e) {
- var t = i,
- n = e.Properties || {},
- a = e.DOMAttributeNamespaces || {},
- s = e.DOMAttributeNames || {},
- l = e.DOMPropertyNames || {},
- c = e.DOMMutationMethods || {};
- for (var f in e.isCustomAttribute && u._isCustomAttributeFunctions.push(e.isCustomAttribute), n) {
- u.properties.hasOwnProperty(f) && r("48", f);
- var p = f.toLowerCase(),
- d = n[f],
- h = {
- attributeName: p,
- attributeNamespace: null,
- propertyName: f,
- mutationMethod: null,
- mustUseProperty: o(d, t.MUST_USE_PROPERTY),
- hasBooleanValue: o(d, t.HAS_BOOLEAN_VALUE),
- hasNumericValue: o(d, t.HAS_NUMERIC_VALUE),
- hasPositiveNumericValue: o(d, t.HAS_POSITIVE_NUMERIC_VALUE),
- hasOverloadedBooleanValue: o(d, t.HAS_OVERLOADED_BOOLEAN_VALUE)
- };
- if (h.hasBooleanValue + h.hasNumericValue + h.hasOverloadedBooleanValue <= 1 || r("50", f), s.hasOwnProperty(f)) {
- var v = s[f];
- h.attributeName = v
- }
- a.hasOwnProperty(f) && (h.attributeNamespace = a[f]), l.hasOwnProperty(f) && (h.propertyName = l[f]), c.hasOwnProperty(f) && (h.mutationMethod = c[f]), u.properties[f] = h
- }
- }
- },
- a = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",
- u = {
- ID_ATTRIBUTE_NAME: "iid-reactid",
- ROOT_ATTRIBUTE_NAME: "iid-reactroot",
- ATTRIBUTE_NAME_START_CHAR: a,
- ATTRIBUTE_NAME_CHAR: a + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",
- properties: {},
- getPossibleStandardName: null,
- _isCustomAttributeFunctions: [],
- isCustomAttribute: function(e) {
- for (var t = 0; t < u._isCustomAttributeFunctions.length; t++) {
- if ((0, u._isCustomAttributeFunctions[t])(e)) return !0
- }
- return !1
- },
- injection: i
- };
- e.exports = u
- }, function(e, t, n) {
- "use strict";
- var r = n(783);
- n(39), n(9);
-
- function o() {
- r.attachRefs(this, this._currentElement)
- }
- var i = {
- mountComponent: function(e, t, n, r, i, a) {
- var u = e.mountComponent(t, n, r, i, a);
- return e._currentElement && null != e._currentElement.ref && t.getReactMountReady().enqueue(o, e), u
- },
- getHostNode: function(e) {
- return e.getHostNode()
- },
- unmountComponent: function(e, t) {
- r.detachRefs(e, e._currentElement), e.unmountComponent(t)
- },
- receiveComponent: function(e, t, n, i) {
- var a = e._currentElement;
- if (t !== a || i !== e._context) {
- 0;
- var u = r.shouldUpdateRefs(a, t);
- u && r.detachRefs(e, a), e.receiveComponent(t, n, i), u && e._currentElement && null != e._currentElement.ref && n.getReactMountReady().enqueue(o, e)
- }
- },
- performUpdateIfNecessary: function(e, t, n) {
- e._updateBatchNumber === n && e.performUpdateIfNecessary(t)
- }
- };
- e.exports = i
- }, function(e, t, n) {
- "use strict";
- var r = n(217),
- o = n(149),
- i = n(218),
- a = n(359),
- u = "undefined" != typeof document && "number" == typeof document.documentMode || "undefined" != typeof navigator && "string" == typeof navigator.userAgent && /\bEdge\/\d/.test(navigator.userAgent);
-
- function s(e) {
- if (u) {
- var t = e.node,
- n = e.children;
- if (n.length)
- for (var r = 0; r < n.length; r++) l(t, n[r], null);
- else null != e.html ? o(t, e.html) : null != e.text && a(t, e.text)
- }
- }
- var l = i(function(e, t, n) {
- 11 === t.node.nodeType || 1 === t.node.nodeType && "object" === t.node.nodeName.toLowerCase() && (null == t.node.namespaceURI || t.node.namespaceURI === r.html) ? (s(t), e.insertBefore(t.node, n)) : (e.insertBefore(t.node, n), s(t))
- });
-
- function c() {
- return this.node.nodeName
- }
-
- function f(e) {
- return {
- node: e,
- children: [],
- html: null,
- text: null,
- toString: c
- }
- }
- f.insertTreeBefore = l, f.replaceChildWithTree = function(e, t) {
- e.parentNode.replaceChild(t.node, e), s(t)
- }, f.queueChild = function(e, t) {
- u ? e.children.push(t) : e.node.appendChild(t.node)
- }, f.queueHTML = function(e, t) {
- u ? e.html = t : o(e.node, t)
- }, f.queueText = function(e, t) {
- u ? e.text = t : a(e.node, t)
- }, e.exports = f
- }, function(e, t, n) {
- var r = n(146),
- o = n(344);
- e.exports = function(e, t, n, i) {
- var a = !n;
- n || (n = {});
- for (var u = -1, s = t.length; ++u < s;) {
- var l = t[u],
- c = i ? i(n[l], e[l], l, n, e) : void 0;
- void 0 === c && (c = e[l]), a ? o(n, l, c) : r(n, l, c)
- }
- return n
- }
- }, function(e, t, n) {
- e.exports = {
- default: n(447),
- __esModule: !0
- }
- }, function(e, t, n) {
- n(448);
- for (var r = n(21), o = n(50), i = n(70), a = n(19)("toStringTag"), u = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), s = 0; s < u.length; s++) {
- var l = u[s],
- c = r[l],
- f = c && c.prototype;
- f && !f[a] && o(f, a, l), i[l] = i.Array
- }
- }, function(e, t) {
- var n = {}.toString;
- e.exports = function(e) {
- return n.call(e).slice(8, -1)
- }
- }, function(e, t) {
- e.exports = function(e) {
- if ("function" != typeof e) throw TypeError(e + " is not a function!");
- return e
- }
- }, function(e, t) {
- e.exports = function(e, t) {
- return {
- enumerable: !(1 & e),
- configurable: !(2 & e),
- writable: !(4 & e),
- value: t
- }
- }
- }, function(e, t, n) {
- var r = n(239),
- o = n(163);
- e.exports = Object.keys || function(e) {
- return r(e, o)
- }
- }, function(e, t, n) {
- var r = n(40).f,
- o = n(52),
- i = n(19)("toStringTag");
- e.exports = function(e, t, n) {
- e && !o(e = n ? e : e.prototype, i) && r(e, i, {
- configurable: !0,
- value: t
- })
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(455)(!0);
- n(237)(String, "String", function(e) {
- this._t = String(e), this._i = 0
- }, function() {
- var e, t = this._t,
- n = this._i;
- return n >= t.length ? {
- value: void 0,
- done: !0
- } : (e = r(t, n), this._i += e.length, {
- value: e,
- done: !1
- })
- })
- }, function(e, t) {
- var n = {}.toString;
- e.exports = function(e) {
- return n.call(e).slice(8, -1)
- }
- }, function(e, t, n) {
- e.exports = !n(101)(function() {
- return 7 != Object.defineProperty({}, "a", {
- get: function() {
- return 7
- }
- }).a
- })
- }, function(e, t) {
- e.exports = function(e) {
- try {
- return !!e()
- } catch (e) {
- return !0
- }
- }
- }, function(e, t) {
- e.exports = {}
- }, function(e, t, n) {
- var r = n(119),
- o = Math.min;
- e.exports = function(e) {
- return e > 0 ? o(r(e), 9007199254740991) : 0
- }
- }, function(e, t, n) {
- "use strict";
- e.exports = function(e) {
- for (var t = arguments.length - 1, n = "Minified React error #" + e + "; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=" + e, r = 0; r < t; r++) n += "&args[]=" + encodeURIComponent(arguments[r + 1]);
- n += " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
- var o = new Error(n);
- throw o.name = "Invariant Violation", o.framesToPop = 1, o
- }
- }, function(e, t) {
- e.exports = function(e, t) {
- return e === t || e != e && t != t
- }
- }, function(e, t, n) {
- (function(e) {
- function n(e) {
- return Object.prototype.toString.call(e)
- }
- t.isArray = function(e) {
- return Array.isArray ? Array.isArray(e) : "[object Array]" === n(e)
- }, t.isBoolean = function(e) {
- return "boolean" == typeof e
- }, t.isNull = function(e) {
- return null === e
- }, t.isNullOrUndefined = function(e) {
- return null == e
- }, t.isNumber = function(e) {
- return "number" == typeof e
- }, t.isString = function(e) {
- return "string" == typeof e
- }, t.isSymbol = function(e) {
- return "symbol" == typeof e
- }, t.isUndefined = function(e) {
- return void 0 === e
- }, t.isRegExp = function(e) {
- return "[object RegExp]" === n(e)
- }, t.isObject = function(e) {
- return "object" == typeof e && null !== e
- }, t.isDate = function(e) {
- return "[object Date]" === n(e)
- }, t.isError = function(e) {
- return "[object Error]" === n(e) || e instanceof Error
- }, t.isFunction = function(e) {
- return "function" == typeof e
- }, t.isPrimitive = function(e) {
- return null === e || "boolean" == typeof e || "number" == typeof e || "string" == typeof e || "symbol" == typeof e || void 0 === e
- }, t.isBuffer = e.isBuffer
- }).call(t, n(54).Buffer)
- }, function(e, t, n) {
- "use strict";
-
- function r(e, t) {
- Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (new Error).stack || ""
- }
- r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r.prototype.toString = function(e) {
- var t = this.name + ": ";
- return t += this.reason || "(unknown reason)", !e && this.mark && (t += " " + this.mark.toString()), t
- }, e.exports = r
- }, function(e, t, n) {
- "use strict";
- var r = n(86);
- e.exports = new r({
- include: [n(340)],
- implicit: [n(751), n(752)],
- explicit: [n(753), n(754), n(755), n(756)]
- })
- }, function(e, t, n) {
- "use strict";
- var r = n(110),
- o = n(211),
- i = n(351),
- a = n(352),
- u = (n(9), r.getListener);
-
- function s(e, t, n) {
- var r = function(e, t, n) {
- var r = t.dispatchConfig.phasedRegistrationNames[n];
- return u(e, r)
- }(e, n, t);
- r && (n._dispatchListeners = i(n._dispatchListeners, r), n._dispatchInstances = i(n._dispatchInstances, e))
- }
-
- function l(e) {
- e && e.dispatchConfig.phasedRegistrationNames && o.traverseTwoPhase(e._targetInst, s, e)
- }
-
- function c(e) {
- if (e && e.dispatchConfig.phasedRegistrationNames) {
- var t = e._targetInst,
- n = t ? o.getParentInstance(t) : null;
- o.traverseTwoPhase(n, s, e)
- }
- }
-
- function f(e, t, n) {
- if (n && n.dispatchConfig.registrationName) {
- var r = n.dispatchConfig.registrationName,
- o = u(e, r);
- o && (n._dispatchListeners = i(n._dispatchListeners, o), n._dispatchInstances = i(n._dispatchInstances, e))
- }
- }
-
- function p(e) {
- e && e.dispatchConfig.registrationName && f(e._targetInst, 0, e)
- }
- var d = {
- accumulateTwoPhaseDispatches: function(e) {
- a(e, l)
- },
- accumulateTwoPhaseDispatchesSkipTarget: function(e) {
- a(e, c)
- },
- accumulateDirectDispatches: function(e) {
- a(e, p)
- },
- accumulateEnterLeaveDispatches: function(e, t, n, r) {
- o.traverseEnterLeave(n, r, f, e, t)
- }
- };
- e.exports = d
- }, function(e, t, n) {
- "use strict";
- var r = n(11),
- o = n(210),
- i = n(211),
- a = n(212),
- u = n(351),
- s = n(352),
- l = (n(8), {}),
- c = null,
- f = function(e, t) {
- e && (i.executeDispatchesInOrder(e, t), e.isPersistent() || e.constructor.release(e))
- },
- p = function(e) {
- return f(e, !0)
- },
- d = function(e) {
- return f(e, !1)
- },
- h = function(e) {
- return "." + e._rootNodeID
- };
- var v = {
- injection: {
- injectEventPluginOrder: o.injectEventPluginOrder,
- injectEventPluginsByName: o.injectEventPluginsByName
- },
- putListener: function(e, t, n) {
- "function" != typeof n && r("94", t, typeof n);
- var i = h(e);
- (l[t] || (l[t] = {}))[i] = n;
- var a = o.registrationNameModules[t];
- a && a.didPutListener && a.didPutListener(e, t, n)
- },
- getListener: function(e, t) {
- var n = l[t];
- if (function(e, t, n) {
- switch (e) {
- case "onClick":
- case "onClickCapture":
- case "onDoubleClick":
- case "onDoubleClickCapture":
- case "onMouseDown":
- case "onMouseDownCapture":
- case "onMouseMove":
- case "onMouseMoveCapture":
- case "onMouseUp":
- case "onMouseUpCapture":
- return !(!n.disabled || (r = t, "button" !== r && "input" !== r && "select" !== r && "textarea" !== r));
- default:
- return !1
- }
- var r
- }(t, e._currentElement.type, e._currentElement.props)) return null;
- var r = h(e);
- return n && n[r]
- },
- deleteListener: function(e, t) {
- var n = o.registrationNameModules[t];
- n && n.willDeleteListener && n.willDeleteListener(e, t);
- var r = l[t];
- r && delete r[h(e)]
- },
- deleteAllListeners: function(e) {
- var t = h(e);
- for (var n in l)
- if (l.hasOwnProperty(n) && l[n][t]) {
- var r = o.registrationNameModules[n];
- r && r.willDeleteListener && r.willDeleteListener(e, n), delete l[n][t]
- }
- },
- extractEvents: function(e, t, n, r) {
- for (var i, a = o.plugins, s = 0; s < a.length; s++) {
- var l = a[s];
- if (l) {
- var c = l.extractEvents(e, t, n, r);
- c && (i = u(i, c))
- }
- }
- return i
- },
- enqueueEvents: function(e) {
- e && (c = u(c, e))
- },
- processEventQueue: function(e) {
- var t = c;
- c = null, s(t, e ? p : d), c && r("95"), a.rethrowCaughtError()
- },
- __purge: function() {
- l = {}
- },
- __getListenerBank: function() {
- return l
- }
- };
- e.exports = v
- }, function(e, t, n) {
- "use strict";
- var r = n(48),
- o = n(213),
- i = {
- view: function(e) {
- if (e.view) return e.view;
- var t = o(e);
- if (t.window === t) return t;
- var n = t.ownerDocument;
- return n ? n.defaultView || n.parentWindow : window
- },
- detail: function(e) {
- return e.detail || 0
- }
- };
-
- function a(e, t, n, o) {
- return r.call(this, e, t, n, o)
- }
- r.augmentClass(a, i), e.exports = a
- }, function(e, t, n) {
- "use strict";
- var r = {
- remove: function(e) {
- e._reactInternalInstance = void 0
- },
- get: function(e) {
- return e._reactInternalInstance
- },
- has: function(e) {
- return void 0 !== e._reactInternalInstance
- },
- set: function(e, t) {
- e._reactInternalInstance = t
- }
- };
- e.exports = r
- }, function(e, t, n) {
- var r;
- /*!
- Copyright (c) 2016 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */
- /*!
- Copyright (c) 2016 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */
- ! function() {
- "use strict";
- var n = {}.hasOwnProperty;
-
- function o() {
- for (var e = [], t = 0; t < arguments.length; t++) {
- var r = arguments[t];
- if (r) {
- var i = typeof r;
- if ("string" === i || "number" === i) e.push(r);
- else if (Array.isArray(r)) e.push(o.apply(null, r));
- else if ("object" === i)
- for (var a in r) n.call(r, a) && r[a] && e.push(a)
- }
- }
- return e.join(" ")
- }
- void 0 !== e && e.exports ? e.exports = o : void 0 === (r = function() {
- return o
- }.apply(t, [])) || (e.exports = r)
- }()
- }, function(e, t) {
- e.exports = !0
- }, function(e, t, n) {
- var r = n(160),
- o = Math.min;
- e.exports = function(e) {
- return e > 0 ? o(r(e), 9007199254740991) : 0
- }
- }, function(e, t) {
- var n = 0,
- r = Math.random();
- e.exports = function(e) {
- return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + r).toString(36))
- }
- }, function(e, t, n) {
- var r = n(59),
- o = n(459),
- i = n(460),
- a = Object.defineProperty;
- t.f = n(100) ? Object.defineProperty : function(e, t, n) {
- if (r(e), t = i(t, !0), r(n), o) try {
- return a(e, t, n)
- } catch (e) {}
- if ("get" in n || "set" in n) throw TypeError("Accessors not supported!");
- return "value" in n && (e[t] = n.value), e
- }
- }, function(e, t) {
- var n = {}.hasOwnProperty;
- e.exports = function(e, t) {
- return n.call(e, t)
- }
- }, function(e, t) {
- var n = Math.ceil,
- r = Math.floor;
- e.exports = function(e) {
- return isNaN(e = +e) ? 0 : (e > 0 ? r : n)(e)
- }
- }, function(e, t, n) {
- var r = n(121);
- e.exports = function(e, t, n) {
- if (r(e), void 0 === t) return e;
- switch (n) {
- case 1:
- return function(n) {
- return e.call(t, n)
- };
- case 2:
- return function(n, r) {
- return e.call(t, n, r)
- };
- case 3:
- return function(n, r, o) {
- return e.call(t, n, r, o)
- }
- }
- return function() {
- return e.apply(t, arguments)
- }
- }
- }, function(e, t) {
- e.exports = function(e) {
- if ("function" != typeof e) throw TypeError(e + " is not a function!");
- return e
- }
- }, function(e, t, n) {
- var r = n(465),
- o = n(53);
- e.exports = function(e) {
- return r(o(e))
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(58),
- o = n(73),
- i = n(101),
- a = n(53),
- u = n(17);
- e.exports = function(e, t, n) {
- var s = u(e),
- l = n(a, s, "" [e]),
- c = l[0],
- f = l[1];
- i(function() {
- var t = {};
- return t[s] = function() {
- return 7
- }, 7 != "" [e](t)
- }) && (o(String.prototype, e, c), r(RegExp.prototype, s, 2 == t ? function(e, t) {
- return f.call(e, this, t)
- } : function(e) {
- return f.call(e, this)
- }))
- }
- }, function(e, t, n) {
- var r = n(116)("meta"),
- o = n(28),
- i = n(52),
- a = n(40).f,
- u = 0,
- s = Object.isExtensible || function() {
- return !0
- },
- l = !n(51)(function() {
- return s(Object.preventExtensions({}))
- }),
- c = function(e) {
- a(e, r, {
- value: {
- i: "O" + ++u,
- w: {}
- }
- })
- },
- f = e.exports = {
- KEY: r,
- NEED: !1,
- fastKey: function(e, t) {
- if (!o(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e;
- if (!i(e, r)) {
- if (!s(e)) return "F";
- if (!t) return "E";
- c(e)
- }
- return e[r].i
- },
- getWeak: function(e, t) {
- if (!i(e, r)) {
- if (!s(e)) return !0;
- if (!t) return !1;
- c(e)
- }
- return e[r].w
- },
- onFreeze: function(e) {
- return l && f.NEED && s(e) && !i(e, r) && c(e), e
- }
- }
- }, function(e, t) {
- t.f = {}.propertyIsEnumerable
- }, function(e, t, n) {
- "use strict";
- var r = {};
- e.exports = r
- }, function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- }), t.CLEAR_BY = t.CLEAR = t.NEW_AUTH_ERR = t.NEW_SPEC_ERR_BATCH = t.NEW_SPEC_ERR = t.NEW_THROWN_ERR_BATCH = t.NEW_THROWN_ERR = void 0, t.newThrownErr = function(e) {
- return {
- type: a,
- payload: (0, i.default)(e)
- }
- }, t.newThrownErrBatch = function(e) {
- return {
- type: u,
- payload: e
- }
- }, t.newSpecErr = function(e) {
- return {
- type: s,
- payload: e
- }
- }, t.newSpecErrBatch = function(e) {
- return {
- type: l,
- payload: e
- }
- }, t.newAuthErr = function(e) {
- return {
- type: c,
- payload: e
- }
- }, t.clear = function() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
- return {
- type: f,
- payload: e
- }
- }, t.clearBy = function() {
- var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function() {
- return !0
- };
- return {
- type: p,
- payload: e
- }
- };
- var r, o = n(179),
- i = (r = o) && r.__esModule ? r : {
- default: r
- };
- var a = t.NEW_THROWN_ERR = "err_new_thrown_err",
- u = t.NEW_THROWN_ERR_BATCH = "err_new_thrown_err_batch",
- s = t.NEW_SPEC_ERR = "err_new_spec_err",
- l = t.NEW_SPEC_ERR_BATCH = "err_new_spec_err_batch",
- c = t.NEW_AUTH_ERR = "err_new_auth_err",
- f = t.CLEAR = "err_clear",
- p = t.CLEAR_BY = "err_clear_by"
- }, function(e, t, n) {
- var r = n(62),
- o = n(47),
- i = "[object Symbol]";
- e.exports = function(e) {
- return "symbol" == typeof e || o(e) && r(e) == i
- }
- }, function(e, t, n) {
- var r = n(63)(Object, "create");
- e.exports = r
- }, function(e, t, n) {
- var r = n(600),
- o = n(601),
- i = n(602),
- a = n(603),
- u = n(604);
-
- function s(e) {
- var t = -1,
- n = null == e ? 0 : e.length;
- for (this.clear(); ++t < n;) {
- var r = e[t];
- this.set(r[0], r[1])
- }
- }
- s.prototype.clear = r, s.prototype.delete = o, s.prototype.get = i, s.prototype.has = a, s.prototype.set = u, e.exports = s
- }, function(e, t, n) {
- var r = n(105);
- e.exports = function(e, t) {
- for (var n = e.length; n--;)
- if (r(e[n][0], t)) return n;
- return -1
- }
- }, function(e, t, n) {
- var r = n(606);
- e.exports = function(e, t) {
- var n = e.__data__;
- return r(t) ? n["string" == typeof t ? "string" : "hash"] : n.map
- }
- }, function(e, t, n) {
- var r = n(611),
- o = n(639),
- i = n(191),
- a = n(24),
- u = n(644);
- e.exports = function(e) {
- return "function" == typeof e ? e : null == e ? i : "object" == typeof e ? a(e) ? o(e[0], e[1]) : r(e) : u(e)
- }
- }, function(e, t) {
- e.exports = function(e) {
- return e.webpackPolyfill || (e.deprecate = function() {}, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, "loaded", {
- enumerable: !0,
- get: function() {
- return e.l
- }
- }), Object.defineProperty(e, "id", {
- enumerable: !0,
- get: function() {
- return e.i
- }
- }), e.webpackPolyfill = 1), e
- }
- }, function(e, t) {
- var n = 9007199254740991,
- r = /^(?:0|[1-9]\d*)$/;
- e.exports = function(e, t) {
- var o = typeof e;
- return !!(t = null == t ? n : t) && ("number" == o || "symbol" != o && r.test(e)) && e > -1 && e % 1 == 0 && e < t
- }
- }, function(e, t) {
- var n = Object.prototype;
- e.exports = function(e) {
- var t = e && e.constructor;
- return e === ("function" == typeof t && t.prototype || n)
- }
- }, function(e, t, n) {
- var r = n(634),
- o = n(181),
- i = n(635),
- a = n(636),
- u = n(637),
- s = n(62),
- l = n(286),
- c = l(r),
- f = l(o),
- p = l(i),
- d = l(a),
- h = l(u),
- v = s;
- (r && "[object DataView]" != v(new r(new ArrayBuffer(1))) || o && "[object Map]" != v(new o) || i && "[object Promise]" != v(i.resolve()) || a && "[object Set]" != v(new a) || u && "[object WeakMap]" != v(new u)) && (v = function(e) {
- var t = s(e),
- n = "[object Object]" == t ? e.constructor : void 0,
- r = n ? l(n) : "";
- if (r) switch (r) {
- case c:
- return "[object DataView]";
- case f:
- return "[object Map]";
- case p:
- return "[object Promise]";
- case d:
- return "[object Set]";
- case h:
- return "[object WeakMap]"
- }
- return t
- }), e.exports = v
- }, function(e, t, n) {
- var r = n(139);
- e.exports = function(e, t, n) {
- var o = null == e ? void 0 : r(e, t);
- return void 0 === o ? n : o
- }
- }, function(e, t, n) {
- var r = n(79),
- o = n(80);
- e.exports = function(e, t) {
- for (var n = 0, i = (t = r(t, e)).length; null != e && n < i;) e = e[o(t[n++])];
- return n && n == i ? e : void 0
- }
- }, function(e, t, n) {
- "use strict";
- (function(t) {
- !t.version || 0 === t.version.indexOf("v0.") || 0 === t.version.indexOf("v1.") && 0 !== t.version.indexOf("v1.8.") ? e.exports = {
- nextTick: function(e, n, r, o) {
- if ("function" != typeof e) throw new TypeError('"callback" argument must be a function');
- var i, a, u = arguments.length;
- switch (u) {
- case 0:
- case 1:
- return t.nextTick(e);
- case 2:
- return t.nextTick(function() {
- e.call(null, n)
- });
- case 3:
- return t.nextTick(function() {
- e.call(null, n, r)
- });
- case 4:
- return t.nextTick(function() {
- e.call(null, n, r, o)
- });
- default:
- for (i = new Array(u - 1), a = 0; a < i.length;) i[a++] = arguments[a];
- return t.nextTick(function() {
- e.apply(null, i)
- })
- }
- }
- } : e.exports = t
- }).call(t, n(55))
- }, function(e, t, n) {
- var r = n(54),
- o = r.Buffer;
-
- function i(e, t) {
- for (var n in e) t[n] = e[n]
- }
-
- function a(e, t, n) {
- return o(e, t, n)
- }
- o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow ? e.exports = r : (i(r, t), t.Buffer = a), i(o, a), a.from = function(e, t, n) {
- if ("number" == typeof e) throw new TypeError("Argument must not be a number");
- return o(e, t, n)
- }, a.alloc = function(e, t, n) {
- if ("number" != typeof e) throw new TypeError("Argument must be a number");
- var r = o(e);
- return void 0 !== t ? "string" == typeof n ? r.fill(t, n) : r.fill(t) : r.fill(0), r
- }, a.allocUnsafe = function(e) {
- if ("number" != typeof e) throw new TypeError("Argument must be a number");
- return o(e)
- }, a.allocUnsafeSlow = function(e) {
- if ("number" != typeof e) throw new TypeError("Argument must be a number");
- return r.SlowBuffer(e)
- }
- }, function(e, t, n) {
- "use strict";
- e.exports = n(675)("forEach")
- }, function(e, t, n) {
- "use strict";
- var r = n(314),
- o = n(311),
- i = n(196),
- a = n(684);
- (e.exports = function(e, t) {
- var n, i, u, s, l;
- return arguments.length < 2 || "string" != typeof e ? (s = t, t = e, e = null) : s = arguments[2], null == e ? (n = u = !0, i = !1) : (n = a.call(e, "c"), i = a.call(e, "e"), u = a.call(e, "w")), l = {
- value: t,
- configurable: n,
- enumerable: i,
- writable: u
- }, s ? r(o(s), l) : l
- }).gs = function(e, t, n) {
- var u, s, l, c;
- return "string" != typeof e ? (l = n, n = t, t = e, e = null) : l = arguments[3], null == t ? t = void 0 : i(t) ? null == n ? n = void 0 : i(n) || (l = n, n = void 0) : (l = t, t = n = void 0), null == e ? (u = !0, s = !1) : (u = a.call(e, "c"), s = a.call(e, "e")), c = {
- get: t,
- set: n,
- configurable: u,
- enumerable: s
- }, l ? r(o(l), c) : c
- }
- }, function(e, t, n) {
- var r = n(49),
- o = n(329),
- i = n(330),
- a = n(36),
- u = n(115),
- s = n(164),
- l = {},
- c = {};
- (t = e.exports = function(e, t, n, f, p) {
- var d, h, v, m, g = p ? function() {
- return e
- } : s(e),
- y = r(n, f, t ? 2 : 1),
- b = 0;
- if ("function" != typeof g) throw TypeError(e + " is not iterable!");
- if (i(g)) {
- for (d = u(e.length); d > b; b++)
- if ((m = t ? y(a(h = e[b])[0], h[1]) : y(e[b])) === l || m === c) return m
- } else
- for (v = g.call(e); !(h = v.next()).done;)
- if ((m = o(v, y, h.value, t)) === l || m === c) return m
- }).BREAK = l, t.RETURN = c
- }, function(e, t, n) {
- "use strict";
- var r = n(86);
- e.exports = r.DEFAULT = new r({
- include: [n(108)],
- explicit: [n(757), n(758), n(759)]
- })
- }, function(e, t, n) {
- var r = n(344),
- o = n(105),
- i = Object.prototype.hasOwnProperty;
- e.exports = function(e, t, n) {
- var a = e[t];
- i.call(e, t) && o(a, n) && (void 0 !== n || t in e) || r(e, t, n)
- }
- }, function(e, t, n) {
- "use strict";
- var r = n(11),
- o = (n(8), {}),
- i = {
- reinitializeTransaction: function() {
- this.transactionWrappers = this.getTransactionWrappers(), this.wrapperInitData ? this.wrapperInitData.length = 0 : this.wrapperInitData = [], this._isInTransaction = !1
- },
- _isInTransaction: !1,
- getTransactionWrappers: null,
- isInTransaction: function() {
- return !!this._isInTransaction
- },
- perform: function(e, t, n, o, i, a, u, s) {
- var l, c;
- this.isInTransaction() && r("27");
- try {
- this._isInTransaction = !0, l = !0, this.initializeAll(0), c = e.call(t, n, o, i, a, u, s), l = !1
- } finally {
- try {
- if (l) try {
- this.closeAll(0)
- } catch (e) {} else this.closeAll(0)
- } finally {
- this._isInTransaction = !1
- }
- }
- return c
- },
- initializeAll: function(e) {
- for (var t = this.transactionWrappers, n = e; n < t.length; n++) {
- var r = t[n];
- try {
- this.wrapperInitData[n] = o, this.wrapperInitData[n] = r.initialize ? r.initialize.call(this) : null
- } finally {
- if (this.wrapperInitData[n] === o) try {
- this.initializeAll(n + 1)
- } catch (e) {}
- }
- }
- },
- closeAll: function(e) {
- this.isInTransaction() || r("28");
- for (var t = this.transactionWrappers, n = e; n < t.length; n++) {
- var i, a = t[n],
- u = this.wrapperInitData[n];
- try {
- i = !0, u !== o && a.close && a.close.call(this, u), i = !1
- } finally {
- if (i) try {
- this.closeAll(n + 1)
- } catch (e) {}
- }
- }
- this.wrapperInitData.length = 0
- }
- };
- e.exports = i
- }, function(e, t, n) {
- "use strict";
- var r = n(111),
- o = n(358),
- i = {
- screenX: null,
- screenY: null,
- clientX: null,
- clientY: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- getModifierState: n(215),
- button: function(e) {
- var t = e.button;
- return "which" in e ? t : 2 === t ? 2 : 4 === t ? 1 : 0
- },
- buttons: null,
- relatedTarget: function(e) {
- return e.relatedTarget || (e.fromElement === e.srcElement ? e.toElement : e.fromElement)
- },
- pageX: function(e) {
- return "pageX" in e ? e.pageX : e.clientX + o.currentScrollLeft
- },
- pageY: function(e) {
- return "pageY" in e ? e.pageY : e.clientY + o.currentScrollTop
- }
- };
-
- function a(e, t, n, o) {
- return r.call(this, e, t, n, o)
- }
- r.augmentClass(a, i), e.exports = a
- }, function(e, t, n) {
- "use strict";
- var r, o = n(26),
- i = n(217),
- a = /^[ \r\n\t\f]/,
- u = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,
- s = n(218)(function(e, t) {
- if (e.namespaceURI !== i.svg || "innerHTML" in e) e.innerHTML = t;
- else {
- (r = r || document.createElement("div")).innerHTML = "";
- for (var n = r.firstChild; n.firstChild;) e.appendChild(n.firstChild)
- }
- });
- if (o.canUseDOM) {
- var l = document.createElement("div");
- l.innerHTML = " ", "" === l.innerHTML && (s = function(e, t) {
- if (e.parentNode && e.parentNode.replaceChild(e, e), a.test(t) || "<" === t[0] && u.test(t)) {
- e.innerHTML = String.fromCharCode(65279) + t;
- var n = e.firstChild;
- 1 === n.data.length ? e.removeChild(n) : n.deleteData(0, 1)
- } else e.innerHTML = t
- }), l = null
- }
- e.exports = s
- }, function(e, t, n) {
- "use strict";
- var r = /["'&<>]/;
- e.exports = function(e) {
- return "boolean" == typeof e || "number" == typeof e ? "" + e : function(e) {
- var t, n = "" + e,
- o = r.exec(n);
- if (!o) return n;
- var i = "",
- a = 0,
- u = 0;
- for (a = o.index; a < n.length; a++) {
- switch (n.charCodeAt(a)) {
- case 34:
- t = """;
- break;
- case 38:
- t = "&";
- break;
- case 39:
- t = "'";
- break;
- case 60:
- t = "<";
- break;
- case 62:
- t = ">";
- break;
- default:
- continue
- }
- u !== a && (i += n.substring(u, a)), u = a + 1, i += t
- }
- return u !== a ? i + n.substring(u, a) : i
- }(e)
- }
- }, function(e, t, n) {
- "use strict";
- var r, o = n(13),
- i = n(210),
- a = n(804),
- u = n(358),
- s = n(805),
- l = n(214),
- c = {},
- f = !1,
- p = 0,
- d = {
- topAbort: "abort",
- topAnimationEnd: s("animationend") || "animationend",
- topAnimationIteration: s("animationiteration") || "animationiteration",
- topAnimationStart: s("animationstart") || "animationstart",
- topBlur: "blur",
- topCanPlay: "canplay",
- topCanPlayThrough: "canplaythrough",
- topChange: "change",
- topClick: "click",
- topCompositionEnd: "compositionend",
- topCompositionStart: "compositionstart",
- topCompositionUpdate: "compositionupdate",
- topContextMenu: "contextmenu",
- topCopy: "copy",
- topCut: "cut",
- topDoubleClick: "dblclick",
- topDrag: "drag",
- topDragEnd: "dragend",
- topDragEnter: "dragenter",
- topDragExit: "dragexit",
- topDragLeave: "dragleave",
- topDragOver: "dragover",
- topDragStart: "dragstart",
- topDrop: "drop",
- topDurationChange: "durationchange",
- topEmptied: "emptied",
- topEncrypted: "encrypted",
- topEnded: "ended",
- topError: "error",
- topFocus: "focus",
- topInput: "input",
- topKeyDown: "keydown",
- topKeyPress: "keypress",
- topKeyUp: "keyup",
- topLoadedData: "loadeddata",
- topLoadedMetadata: "loadedmetadata",
- topLoadStart: "loadstart",
- topMouseDown: "mousedown",
- topMouseMove: "mousemove",
- topMouseOut: "mouseout",
- topMouseOver: "mouseover",
- topMouseUp: "mouseup",
- topPaste: "paste",
- topPause: "pause",
- topPlay: "play",
- topPlaying: "playing",
- topProgress: "progress",
- topRateChange: "ratechange",
- topScroll: "scroll",
- topSeeked: "seeked",
- topSeeking: "seeking",
- topSelectionChange: "selectionchange",
- topStalled: "stalled",
- topSuspend: "suspend",
- topTextInput: "textInput",
- topTimeUpdate: "timeupdate",
- topTouchCancel: "touchcancel",
- topTouchEnd: "touchend",
- topTouchMove: "touchmove",
- topTouchStart: "touchstart",
- topTransitionEnd: s("transitionend") || "transitionend",
- topVolumeChange: "volumechange",
- topWaiting: "waiting",
- topWheel: "wheel"
- },
- h = "_reactListenersID" + String(Math.random()).slice(2);
- var v = o({}, a, {
- ReactEventListener: null,
- injection: {
- injectReactEventListener: function(e) {
- e.setHandleTopLevel(v.handleTopLevel), v.ReactEventListener = e
- }
- },
- setEnabled: function(e) {
- v.ReactEventListener && v.ReactEventListener.setEnabled(e)
- },
- isEnabled: function() {
- return !(!v.ReactEventListener || !v.ReactEventListener.isEnabled())
- },
- listenTo: function(e, t) {
- for (var n = t, r = function(e) {
- return Object.prototype.hasOwnProperty.call(e, h) || (e[h] = p++, c[e[h]] = {}), c[e[h]]
- }(n), o = i.registrationNameDependencies[e], a = 0; a < o.length; a++) {
- var u = o[a];
- r.hasOwnProperty(u) && r[u] || ("topWheel" === u ? l("wheel") ? v.ReactEventListener.trapBubbledEvent("topWheel", "wheel", n) : l("mousewheel") ? v.ReactEventListener.trapBubbledEvent("topWheel", "mousewheel", n) : v.ReactEventListener.trapBubbledEvent("topWheel", "DOMMouseScroll", n) : "topScroll" === u ? l("scroll", !0) ? v.ReactEventListener.trapCapturedEvent("topScroll", "scroll", n) : v.ReactEventListener.trapBubbledEvent("topScroll", "scroll", v.ReactEventListener.WINDOW_HANDLE) : "topFocus" === u || "topBlur" === u ? (l("focus", !0) ? (v.ReactEventListener.trapCapturedEvent("topFocus", "focus", n), v.ReactEventListener.trapCapturedEvent("topBlur", "blur", n)) : l("focusin") && (v.ReactEventListener.trapBubbledEvent("topFocus", "focusin", n), v.ReactEventListener.trapBubbledEvent("topBlur", "focusout", n)), r.topBlur = !0, r.topFocus = !0) : d.hasOwnProperty(u) && v.ReactEventListener.trapBubbledEvent(u, d[u], n), r[u] = !0)
- }
- },
- trapBubbledEvent: function(e, t, n) {
- return v.ReactEventListener.trapBubbledEvent(e, t, n)
- },
- trapCapturedEvent: function(e, t, n) {
- return v.ReactEventListener.trapCapturedEvent(e, t, n)
- },
- supportsEventPageXY: function() {
- if (!document.createEvent) return !1;
- var e = document.createEvent("MouseEvent");
- return null != e && "pageX" in e
- },
- ensureScrollValueMonitoring: function() {
- if (void 0 === r && (r = v.supportsEventPageXY()), !r && !f) {
- var e = u.refreshScrollValues;
- v.ReactEventListener.monitorScrollValue(e), f = !0
- }
- }
- });
- e.exports = v
- }, function(e, t, n) {
- "use strict";
-
- function r() {
- this.__rules__ = [], this.__cache__ = null
- }
- r.prototype.__find__ = function(e) {
- for (var t = this.__rules__.length, n = -1; t--;)
- if (this.__rules__[++n].name === e) return n;
- return -1
- }, r.prototype.__compile__ = function() {
- var e = this,
- t = [""];
- e.__rules__.forEach(function(e) {
- e.enabled && e.alt.forEach(function(e) {
- t.indexOf(e) < 0 && t.push(e)
- })
- }), e.__cache__ = {}, t.forEach(function(t) {
- e.__cache__[t] = [], e.__rules__.forEach(function(n) {
- n.enabled && (t && n.alt.indexOf(t) < 0 || e.__cache__[t].push(n.fn))
- })
- })
- }, r.prototype.at = function(e, t, n) {
- var r = this.__find__(e),
- o = n || {};
- if (-1 === r) throw new Error("Parser rule not found: " + e);
- this.__rules__[r].fn = t, this.__rules__[r].alt = o.alt || [], this.__cache__ = null
- }, r.prototype.before = function(e, t, n, r) {
- var o = this.__find__(e),
- i = r || {};
- if (-1 === o) throw new Error("Parser rule not found: " + e);
- this.__rules__.splice(o, 0, {
- name: t,
- enabled: !0,
- fn: n,
- alt: i.alt || []
- }), this.__cache__ = null
- }, r.prototype.after = function(e, t, n, r) {
- var o = this.__find__(e),
- i = r || {};
- if (-1 === o) throw new Error("Parser rule not found: " + e);
- this.__rules__.splice(o + 1, 0, {
- name: t,
- enabled: !0,
- fn: n,
- alt: i.alt || []
- }), this.__cache__ = null
- }, r.prototype.push = function(e, t, n) {
- var r = n || {};
- this.__rules__.push({
- name: e,
- enabled: !0,
- fn: t,
- alt: r.alt || []
- }), this.__cache__ = null
- }, r.prototype.enable = function(e, t) {
- e = Array.isArray(e) ? e : [e], t && this.__rules__.forEach(function(e) {
- e.enabled = !1
- }), e.forEach(function(e) {
- var t = this.__find__(e);
- if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
- this.__rules__[t].enabled = !0
- }, this), this.__cache__ = null
- }, r.prototype.disable = function(e) {
- (e = Array.isArray(e) ? e : [e]).forEach(function(e) {
- var t = this.__find__(e);
- if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
- this.__rules__[t].enabled = !1
- }, this), this.__cache__ = null
- }, r.prototype.getRules = function(e) {
- return null === this.__cache__ && this.__compile__(), this.__cache__[e] || []
- }, e.exports = r
- }, function(e, t, n) {
- "use strict";
- e.exports = function(e, t) {
- var n, r, o, i = -1,
- a = e.posMax,
- u = e.pos,
- s = e.isInLabel;
- if (e.isInLabel) return -1;
- if (e.labelUnmatchedScopes) return e.labelUnmatchedScopes--, -1;
- for (e.pos = t + 1, e.isInLabel = !0, n = 1; e.pos < a;) {
- if (91 === (o = e.src.charCodeAt(e.pos))) n++;
- else if (93 === o && 0 === --n) {
- r = !0;
- break
- }
- e.parser.skipToken(e)
- }
- return r ? (i = e.pos, e.labelUnmatchedScopes = 0) : e.labelUnmatchedScopes = n - 1, e.pos = u, e.isInLabel = s, i
- }
- }, function(e, t, n) {
- var r = n(93);
- e.exports = Object("z").propertyIsEnumerable(0) ? Object : function(e) {
- return "String" == r(e) ? e.split("") : Object(e)
- }
- }, function(e, t) {
- e.exports = function(e) {
- if (void 0 == e) throw TypeError("Can't call method on " + e);
- return e
- }
- }, function(e, t, n) {
- var r = n(28),
- o = n(21).document,
- i = r(o) && r(o.createElement);
- e.exports = function(e) {
- return i ? o.createElement(e) : {}
- }
- }, function(e, t, n) {
- var r = n(28);
- e.exports = function(e, t) {
- if (!r(e)) return e;
- var n, o;
- if (t && "function" == typeof(n = e.toString) && !r(o = n.call(e))) return o;
- if ("function" == typeof(n = e.valueOf) && !r(o = n.call(e))) return o;
- if (!t && "function" == typeof(n = e.toString) && !r(o = n.call(e))) return o;
- throw TypeError("Can't convert object to primitive value")
- }
- }, function(e, t, n) {
- e.exports = n(50)
- }, function(e, t, n) {
- var r = n(36),
- o = n(452),
- i = n(163),
- a = n(161)("IE_PROTO"),
- u = function() {},
- s = function() {
- var e, t = n(156)("iframe"),
- r = i.length;
- for (t.style.display = "none", n(240).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(), e.write("