@ozdao/prometheus-framework 0.2.112 → 0.2.113
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/common.schema-BFhpUXUt.js +12 -0
- package/dist/common.schema-ChBVARrs.mjs +13 -0
- package/dist/community.server.js +6 -4
- package/dist/community.server.mjs +4 -2
- package/dist/engagement.schema-CI2ifjXN.mjs +28 -0
- package/dist/engagement.schema-fdLNO2_6.js +27 -0
- package/dist/events.server.js +6 -4
- package/dist/events.server.mjs +4 -2
- package/dist/files.server.js +81 -29
- package/dist/files.server.mjs +81 -29
- package/dist/gallery.server.js +66 -39
- package/dist/gallery.server.mjs +66 -39
- package/dist/main-8APITHuW.mjs +14201 -0
- package/dist/main-8N2Jmsuk.js +2 -2
- package/dist/main-BJvlNekm.mjs +5 -5
- package/dist/main-BQisDfLk.js +2 -2
- package/dist/main-BV1Yv9Hy.js +2 -2
- package/dist/main-Bw0PvTs-.mjs +5 -5
- package/dist/main-ByCtZbHD.mjs +5 -5
- package/dist/main-CX2ISR43.mjs +5 -5
- package/dist/main-CXObXjv-.js +2 -2
- package/dist/main-CkeuHuCY.mjs +5 -5
- package/dist/main-CnfcBov2.mjs +5 -5
- package/dist/main-D50VqYhy.js +2 -2
- package/dist/main-D8gNZLSa.js +2 -2
- package/dist/main-DPsHxX0l.mjs +5 -5
- package/dist/main-DTlUA63C.mjs +5 -5
- package/dist/main-DfD5hLQo.mjs +5 -5
- package/dist/main-Dh6Zfei9.js +2 -2
- package/dist/main-DmNP-t33.mjs +5 -5
- package/dist/main-DwyUYWFX.js +2 -2
- package/dist/main-VcxO-jAt.js +92 -0
- package/dist/main-cffh4bbv.js +2 -2
- package/dist/main-pGo7JpSP.js +2 -2
- package/dist/main.css +1 -1
- package/dist/metadata.schema-6slGhpQS.js +40 -0
- package/dist/metadata.schema-CK5e2O3f.mjs +41 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +410 -407
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +469 -456
- package/dist/node_modules/web3/lib/esm/accounts.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/accounts.js +5 -2
- package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/index.js +45 -42
- package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/version.js +1 -1
- package/dist/node_modules/web3/lib/esm/web3.cjs +1 -1
- package/dist/node_modules/web3/lib/esm/web3.js +40 -37
- package/dist/node_modules/web3-core/lib/esm/web3_config.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_config.js +28 -18
- package/dist/node_modules/web3-core/lib/esm/web3_context.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_context.js +56 -53
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.cjs +1 -1
- package/dist/node_modules/web3-core/lib/esm/web3_request_manager.js +100 -87
- package/dist/node_modules/web3-errors/lib/esm/error_codes.cjs +1 -1
- package/dist/node_modules/web3-errors/lib/esm/error_codes.js +97 -95
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.cjs +1 -1
- package/dist/node_modules/web3-errors/lib/esm/errors/contract_errors.js +8 -8
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.cjs +1 -1
- package/dist/node_modules/web3-errors/lib/esm/errors/response_errors.js +20 -20
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.cjs +4 -4
- package/dist/node_modules/web3-errors/lib/esm/errors/transaction_errors.js +2 -2
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.cjs +1 -1
- package/dist/node_modules/web3-errors/lib/esm/errors/utils_errors.js +33 -27
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.cjs +1 -1
- package/dist/node_modules/web3-errors/lib/esm/web3_error_base.js +33 -12
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/rpc_method_wrappers.js +183 -179
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_revert_reason.js +10 -10
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_gas_pricing.js +45 -44
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/send_tx_helper.js +59 -57
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/transaction_builder.js +43 -43
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/wait_for_transaction_receipt.js +31 -31
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_polling.js +26 -26
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_by_subscription.js +53 -51
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/utils/watch_transaction_for_confirmations.js +25 -23
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.cjs +1 -1
- package/dist/node_modules/web3-eth/lib/esm/web3_eth.js +103 -101
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +2 -2
- package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +159 -156
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +11 -8
- package/dist/node_modules/web3-eth-contract/lib/esm/index.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/index.js +3 -0
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.cjs +1 -1
- package/dist/node_modules/web3-eth-contract/lib/esm/log_subscription.js +5 -2
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +19 -16
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.cjs +1 -1
- package/dist/node_modules/web3-eth-ens/lib/esm/registry.js +5 -2
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.cjs +1 -1
- package/dist/node_modules/web3-eth-personal/lib/esm/rpc_method_wrappers.js +50 -47
- package/dist/node_modules/web3-net/lib/esm/net.cjs +1 -1
- package/dist/node_modules/web3-net/lib/esm/net.js +27 -27
- package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/converters.js +100 -83
- package/dist/node_modules/web3-utils/lib/esm/formatter.cjs +1 -1
- package/dist/node_modules/web3-utils/lib/esm/formatter.js +123 -104
- package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/utils.js +21 -21
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/bytes.js +10 -10
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.cjs +1 -1
- package/dist/node_modules/web3-validator/lib/esm/validation/numbers.js +30 -28
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +56 -59
- package/dist/organizations.server.mjs +56 -59
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +17 -17
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +4 -4
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +33 -30
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +9 -9
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue.js +1 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +165 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +22 -19
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +132 -64
- package/dist/prometheus-framework/src/components/Feed/Feed.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue2.js +1 -0
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +9 -9
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +12 -12
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +16 -16
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +14 -13
- package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Marquee/Marquee.vue.js +8 -8
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Radio/Radio.vue.js +29 -36
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +26 -26
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +45 -45
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +19 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +213 -213
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +167 -202
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +73 -165
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +3 -47
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSorting.vue.js +75 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +96 -77
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.js +27 -0
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonSort.vue.js +31 -0
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -19
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +10 -4
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconCalendar.vue.js +31 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconFilter.vue.js +31 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSort.vue.js +59 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +80 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +8 -6
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +21 -45
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +36 -36
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +53 -53
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +33 -33
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/applications.js +37 -0
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +41 -41
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -36
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +20 -20
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +33 -34
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +51 -56
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +32 -32
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +28 -30
- package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/pages/BackofficeReports.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +30 -26
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +41 -41
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +13 -10
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-BJoJAetd.mjs +162 -0
- package/dist/queryProcessor-DWf9tsis.js +161 -0
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/web-TGdVOTnw.js +1 -0
- package/dist/web-_W9a_nWD.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +1 -1
- package/src/components/AskToLogin/AskToLogin.vue +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/components/Checkbox/Checkbox.vue +40 -43
- package/src/components/Chips/Chips.vue +2 -2
- package/src/components/DatePicker/Calendar.vue +29 -31
- package/src/components/Dropdown/Dropdown.vue +5 -11
- package/src/components/Feed/Feed.vue +98 -15
- package/src/components/FieldTags/BlockTags.vue +3 -3
- package/src/components/FieldTags/FieldTags.vue +1 -1
- package/src/components/FieldTags/vue-tags-input.scss +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/LocationSelection/LocationSelection.vue +5 -30
- package/src/components/Map/LoaderGMaps.js +66 -0
- package/src/components/Map/Map.vue +2 -1
- package/src/components/Marquee/Marquee.vue +1 -1
- package/src/components/Radio/Radio.vue +36 -13
- package/src/configurator/components/pages/Styles.vue +1 -1
- package/src/modules/auth/components/layouts/Auth.vue +1 -1
- package/src/modules/auth/components/pages/EnterCode.vue +4 -4
- package/src/modules/auth/components/pages/EnterPassword.vue +2 -2
- package/src/modules/auth/components/pages/Invite.vue +2 -2
- package/src/modules/auth/components/pages/ResetPassword.vue +3 -3
- package/src/modules/auth/components/pages/SignIn.vue +4 -4
- package/src/modules/auth/components/pages/SignUp.vue +3 -3
- package/src/modules/backoffice/components/admin/Backcalls.vue +1 -1
- package/src/modules/backoffice/components/admin/FastOrders.vue +1 -1
- package/src/modules/backoffice/components/admin/Pages.vue +1 -1
- package/src/modules/backoffice/components/admin/ProductEdit.vue +1 -1
- package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
- package/src/modules/backoffice/components/admin/Users.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +3 -3
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/layouts/Community.vue +2 -2
- package/src/modules/community/components/pages/BlogPost.vue +2 -2
- package/src/modules/community/components/pages/CreateBlogPost.vue +4 -4
- package/src/modules/community/components/sections/Comments.vue +2 -2
- package/src/modules/community/components/sections/Feed.vue +1 -1
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/constructor/components/elements/Image.vue +1 -1
- package/src/modules/constructor/components/elements/Video.vue +2 -2
- package/src/modules/events/components/blocks/CardEvent.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +32 -32
- package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
- package/src/modules/events/components/pages/Event.vue +3 -3
- package/src/modules/events/components/pages/Events.vue +4 -3
- package/src/modules/events/components/sections/Feed.vue +3 -3
- package/src/modules/events/components/sections/List.vue +2 -2
- package/src/modules/files/controllers/files.controller.js +8 -6
- package/src/modules/files/middlewares/server/middlewareBusboy.js +79 -14
- package/src/modules/files/routes/files.routes.js +11 -9
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +158 -355
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +26 -244
- package/src/modules/gallery/controllers/gallery.controller.js +57 -38
- package/src/modules/gallery/models/photo.model.js +20 -11
- package/src/modules/gallery/routes/gallery.routes.js +3 -3
- package/src/modules/gallery/store/gallery.js +3 -78
- package/src/modules/globals/components/blocks/BlockSearch.vue +1 -1
- package/src/modules/globals/components/blocks/BlockSorting.vue +77 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +27 -25
- package/src/modules/globals/components/elements/ButtonDate.vue +66 -0
- package/src/modules/globals/components/elements/ButtonSort.vue +41 -0
- package/src/modules/globals/components/layouts/Client.vue +273 -0
- package/src/{components/Footer → modules/globals/components/partials}/Footer.vue +1 -1
- package/src/{components/Header → modules/globals/components/partials}/Header.vue +98 -84
- package/src/modules/globals/controllers/utils/queryProcessor.js +3 -3
- package/src/modules/globals/models/common.schema.js +1 -1
- package/src/modules/globals/services/globals.store.js +11 -6
- package/src/modules/globals/store/globals.js +12 -10
- package/src/modules/icons/logos/Logotype.vue +23 -19
- package/src/modules/icons/navigation/IconCalendar.vue +18 -0
- package/src/modules/icons/navigation/IconFilter.vue +18 -0
- package/src/modules/icons/navigation/IconSearch.vue +1 -3
- package/src/modules/icons/navigation/IconSort.vue +21 -0
- package/src/modules/landing/components/pages/Home.vue +4 -4
- package/src/modules/landing/components/sections/FeatureSection.vue +5 -5
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -2
- package/src/modules/landing/components/sections/SectionFeature.vue +2 -2
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
- package/src/modules/landing/components/sections/SectionsSection.vue +4 -4
- package/src/modules/{orders → landing}/components/sections/SubscribeNewsletter.vue +0 -2
- package/src/modules/landing/components/sections/WhatIsWDRSection.vue +6 -6
- package/src/modules/landing/landing.client.js +2 -0
- package/src/modules/landing/router/landing.js +1 -1
- package/src/modules/legal/components/pages/Legal.vue +2 -2
- package/src/modules/legal/components/pages/legal/Cookies.vue +1 -1
- package/src/modules/legal/components/pages/legal/EULA.vue +1 -1
- package/src/modules/legal/components/pages/legal/Privacy.vue +1 -1
- package/src/modules/legal/components/pages/legal/Terms.vue +1 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +37 -49
- package/src/modules/marketplace/components/pages/Catalog.vue +43 -131
- package/src/modules/marketplace/components/sections/Filters.vue +63 -115
- package/src/modules/marketplace/store/marketplace.js +22 -167
- package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +1 -1
- package/src/modules/orders/components/blocks/CardOrderItem.vue +6 -6
- package/src/modules/orders/components/blocks/CardOrderVar1.vue +1 -1
- package/src/modules/orders/components/blocks/StatusHistory.vue +1 -1
- package/src/modules/orders/components/pages/Order.vue +8 -8
- package/src/modules/orders/components/pages/OrderBackoffice.vue +7 -7
- package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +3 -3
- package/src/modules/orders/components/pages/Orders.vue +3 -5
- package/src/modules/orders/components/partials/ShopCart.vue +5 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
- package/src/modules/orders/store/applications.js +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/blocks/Contacts.vue +4 -4
- package/src/modules/organizations/components/pages/Department.vue +3 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +6 -6
- package/src/modules/organizations/components/pages/Members.vue +4 -4
- package/src/modules/organizations/components/pages/Organization.vue +3 -3
- package/src/modules/organizations/components/pages/OrganizationCreate.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationDetails.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +9 -9
- package/src/modules/organizations/components/pages/OrganizationPeople.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/DetailsTab.vue +4 -4
- package/src/modules/organizations/components/sections/Feed.vue +2 -2
- package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
- package/src/modules/organizations/components/sections/Publics.vue +1 -1
- package/src/modules/organizations/controllers/organizations.controller.js +103 -93
- package/src/modules/organizations/models/organization.model.js +10 -7
- package/src/modules/organizations/store/organizations.js +3 -34
- package/src/modules/products/components/blocks/CardPosition.vue +2 -2
- package/src/modules/products/components/blocks/LeftoverPositions.vue +2 -2
- package/src/modules/products/components/pages/Categories.vue +1 -1
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Leftovers.vue +4 -4
- package/src/modules/products/components/pages/Product.vue +1 -5
- package/src/modules/products/components/pages/ProductEdit.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +2 -2
- package/src/modules/products/components/sections/EditProductInfo.vue +1 -1
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +67 -74
- package/src/modules/products/components/sections/MenuSection.vue +2 -2
- package/src/modules/products/components/sections/PopularProducts.vue +2 -2
- package/src/modules/products/components/sections/SectionProduct.vue +3 -3
- package/src/modules/products/products.client.js +0 -2
- package/src/modules/reports/components/pages/BackofficeReports.vue +4 -4
- package/src/modules/spots/components/blocks/CardSpot.vue +9 -1
- package/src/modules/spots/components/blocks/SpotMemberModify.vue +2 -2
- package/src/modules/spots/components/layouts/Spots.vue +0 -2
- package/src/modules/spots/components/pages/Spot.vue +4 -4
- package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
- package/src/modules/spots/components/sections/PlaceModify.vue +1 -1
- package/src/modules/spots/components/sections/Places.vue +1 -1
- package/src/modules/users/components/pages/Profile.vue +5 -5
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/pages/ProfileComments.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +11 -11
- package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
- package/src/modules/users/components/pages/ProfileLikes.vue +1 -1
- package/src/modules/users/components/sections/FeaturedUsers.vue +3 -3
- package/src/modules/wallet/views/components/pages/Payments.vue +2 -2
- package/src/modules/wallet/views/components/pages/Wallet.vue +3 -3
- package/src/styles/base/borders.scss +4 -0
- package/src/styles/base/shadow_transitions_hover_refactor.scss +4 -0
- package/src/styles/config.scss +15 -9
- package/src/styles/layout.scss +37 -8
- package/src/styles/typography.scss +24 -24
- package/src/modules/products/components/sections/SortProducts.vue +0 -74
- /package/src/{components/Navigation → modules/globals/components/partials}/Navigation.vue +0 -0
@@ -1,21 +1,21 @@
|
|
1
|
-
import { keccak256 as
|
2
|
-
import { bytesToUtf8 as
|
3
|
-
import { InvalidBytesError as
|
1
|
+
import { keccak256 as W } from "../../../ethereum-cryptography/esm/keccak.js";
|
2
|
+
import { bytesToUtf8 as a } from "../../../ethereum-cryptography/esm/utils.js";
|
3
|
+
import { InvalidBytesError as u, HexProcessingError as k, InvalidNumberError as A, InvalidUnitError as N, InvalidIntegerError as S, InvalidAddressError as D, InvalidBooleanError as L } from "../../../web3-errors/lib/esm/errors/utils_errors.js";
|
4
4
|
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
5
5
|
import "../../../web3-validator/lib/esm/formats.js";
|
6
|
-
import * as
|
7
|
-
import { hexToUint8Array as _, hexToNumber as F, numberToHex as G, uint8ArrayToHexString as
|
6
|
+
import * as V from "../../../web3-validator/lib/esm/utils.js";
|
7
|
+
import { hexToUint8Array as _, hexToNumber as F, numberToHex as G, uint8ArrayToHexString as M, ensureIfUint8Array as P } from "../../../web3-validator/lib/esm/utils.js";
|
8
8
|
import { validator as s } from "../../../web3-validator/lib/esm/default_validator.js";
|
9
|
-
import { isAddress as
|
9
|
+
import { isAddress as T } from "../../../web3-validator/lib/esm/validation/address.js";
|
10
10
|
import "../../../web3-types/lib/esm/data_format_types.js";
|
11
11
|
import "../../../web3-types/lib/esm/eth_types.js";
|
12
12
|
import "../../../web3-types/lib/esm/web3_base_provider.js";
|
13
|
-
import { isInt as
|
14
|
-
import { isHexStrict as m, isHex as
|
15
|
-
import { isNullish as
|
16
|
-
import { isUint8Array as
|
17
|
-
import { utf8ToBytes as
|
18
|
-
const
|
13
|
+
import { isInt as y, isUInt as w, bigintPower as l } from "../../../web3-validator/lib/esm/validation/numbers.js";
|
14
|
+
import { isHexStrict as m, isHex as B } from "../../../web3-validator/lib/esm/validation/string.js";
|
15
|
+
import { isNullish as z } from "../../../web3-validator/lib/esm/validation/object.js";
|
16
|
+
import { isUint8Array as $ } from "./uint8array.js";
|
17
|
+
import { utf8ToBytes as O } from "../../../@noble/hashes/esm/utils.js";
|
18
|
+
const H = {
|
19
19
|
noether: BigInt(0),
|
20
20
|
wei: BigInt(1),
|
21
21
|
kwei: BigInt(1e3),
|
@@ -43,32 +43,32 @@ const N = {
|
|
43
43
|
mether: BigInt("1000000000000000000000000"),
|
44
44
|
gether: BigInt("1000000000000000000000000000"),
|
45
45
|
tether: BigInt("1000000000000000000000000000000")
|
46
|
-
},
|
47
|
-
if (s.validate(["bytes"], [t]),
|
46
|
+
}, p = "Warning: Using type `number` with values that are large or contain many decimals may cause loss of precision, it is recommended to use type `string` or `BigInt` when using conversion methods", b = (t) => {
|
47
|
+
if (s.validate(["bytes"], [t]), $(t))
|
48
48
|
return t;
|
49
49
|
if (Array.isArray(t))
|
50
50
|
return new Uint8Array(t);
|
51
51
|
if (typeof t == "string")
|
52
52
|
return _(t);
|
53
|
-
throw new
|
54
|
-
}, { uint8ArrayToHexString:
|
53
|
+
throw new u(t);
|
54
|
+
}, { uint8ArrayToHexString: R } = V, E = (t) => R(b(t)), U = (t) => typeof t == "string" && t.slice(0, 2).toLowerCase() !== "0x" ? b(`0x${t}`) : b(t), x = (t) => (s.validate(["hex"], [t]), F(t)), m0 = x, g = (t, r) => {
|
55
55
|
typeof t != "bigint" && s.validate(["int"], [t]);
|
56
|
-
let
|
57
|
-
return r && (!
|
58
|
-
},
|
56
|
+
let i = G(t);
|
57
|
+
return r && (!i.startsWith("-") && i.length % 2 === 1 ? i = "0x0".concat(i.slice(2)) : i.length % 2 === 0 && i.startsWith("-") && (i = "-0x0".concat(i.slice(3)))), i;
|
58
|
+
}, h0 = g, I0 = (t) => x(t).toString(), h = (t) => {
|
59
59
|
s.validate(["string"], [t]);
|
60
60
|
let r = t.replace(/^(?:\u0000)/, "");
|
61
|
-
return r = r.replace(/(?:\u0000)$/, ""),
|
62
|
-
},
|
61
|
+
return r = r.replace(/(?:\u0000)$/, ""), E(new TextEncoder().encode(r));
|
62
|
+
}, d0 = h, B0 = h, C = (t) => a(U(t)), p0 = (t) => typeof t == "string" ? C(t) : (s.validate(["bytes"], [t]), a(t)), X = O, b0 = C, j = (t) => {
|
63
63
|
s.validate(["string"], [t]);
|
64
64
|
let r = "";
|
65
|
-
for (let
|
66
|
-
const
|
67
|
-
r +=
|
65
|
+
for (let i = 0; i < t.length; i += 1) {
|
66
|
+
const n = t.charCodeAt(i).toString(16);
|
67
|
+
r += n.length % 2 !== 0 ? `0${n}` : n;
|
68
68
|
}
|
69
69
|
return `0x${r}`;
|
70
|
-
}, x0 =
|
71
|
-
if (typeof t == "string" &&
|
70
|
+
}, x0 = j, J = (t) => new TextDecoder("ascii").decode(U(t)), y0 = J, w0 = (t, r) => {
|
71
|
+
if (typeof t == "string" && T(t))
|
72
72
|
return r ? "address" : `0x${t.toLowerCase().replace(/^0x/i, "")}`;
|
73
73
|
if (typeof t == "boolean")
|
74
74
|
return r ? "bool" : t ? "0x01" : "0x00";
|
@@ -76,8 +76,8 @@ const N = {
|
|
76
76
|
return r ? t < 0 ? "int256" : "uint256" : g(t);
|
77
77
|
if (typeof t == "bigint")
|
78
78
|
return r ? "bigint" : g(t);
|
79
|
-
if (
|
80
|
-
return r ? "bytes" :
|
79
|
+
if ($(t))
|
80
|
+
return r ? "bytes" : E(t);
|
81
81
|
if (typeof t == "object" && t)
|
82
82
|
return r ? "string" : h(JSON.stringify(t));
|
83
83
|
if (typeof t == "string") {
|
@@ -85,62 +85,79 @@ const N = {
|
|
85
85
|
return r ? "int256" : g(t);
|
86
86
|
if (m(t))
|
87
87
|
return r ? "bytes" : t;
|
88
|
-
if (
|
88
|
+
if (B(t) && !y(t) && !w(t))
|
89
89
|
return r ? "bytes" : `0x${t}`;
|
90
|
-
if (
|
90
|
+
if (B(t) && !y(t) && w(t))
|
91
91
|
return r ? "uint" : g(t);
|
92
92
|
if (!Number.isFinite(t))
|
93
93
|
return r ? "string" : h(t);
|
94
94
|
}
|
95
|
-
throw new
|
95
|
+
throw new k(t);
|
96
96
|
}, I = (t) => {
|
97
97
|
if (typeof t == "number")
|
98
|
-
return t > 1e20 ? BigInt(t) : t;
|
98
|
+
return t > 1e20 ? (console.warn(p), BigInt(t)) : t;
|
99
99
|
if (typeof t == "bigint")
|
100
100
|
return t >= Number.MIN_SAFE_INTEGER && t <= Number.MAX_SAFE_INTEGER ? Number(t) : t;
|
101
101
|
if (typeof t == "string" && m(t))
|
102
|
-
return
|
102
|
+
return x(t);
|
103
103
|
try {
|
104
104
|
return I(BigInt(t));
|
105
105
|
} catch {
|
106
106
|
throw new A(t);
|
107
107
|
}
|
108
|
-
},
|
108
|
+
}, a0 = (t) => {
|
109
109
|
if (typeof t == "number")
|
110
110
|
return BigInt(t);
|
111
111
|
if (typeof t == "bigint")
|
112
112
|
return t;
|
113
|
-
if (typeof t == "string" &&
|
113
|
+
if (typeof t == "string" && B(t))
|
114
114
|
return t.startsWith("-") ? -BigInt(t.substring(1)) : BigInt(t);
|
115
115
|
throw new A(t);
|
116
|
-
},
|
117
|
-
|
118
|
-
if (
|
119
|
-
|
120
|
-
|
116
|
+
}, A0 = (t, r) => {
|
117
|
+
let i;
|
118
|
+
if (typeof r == "string") {
|
119
|
+
if (i = H[r], !i)
|
120
|
+
throw new N(r);
|
121
|
+
} else {
|
122
|
+
if (r < 0 || !Number.isInteger(r))
|
123
|
+
throw new S(r);
|
124
|
+
i = l(BigInt(10), BigInt(r));
|
125
|
+
}
|
126
|
+
const n = String(I(t)), o = i.toString().length - 1;
|
121
127
|
if (o <= 0)
|
122
|
-
return
|
123
|
-
const e =
|
124
|
-
return
|
125
|
-
},
|
128
|
+
return n.toString();
|
129
|
+
const e = n.padStart(o, "0"), c = e.slice(0, -o), f = e.slice(-o).replace(/\.?0+$/, "");
|
130
|
+
return c === "" ? `0.${f}` : f === "" ? c : `${c}.${f}`.slice(0, c.length + o + 1);
|
131
|
+
}, N0 = (t, r) => {
|
126
132
|
s.validate(["number"], [t]);
|
127
|
-
|
128
|
-
if (
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
133
|
+
let i;
|
134
|
+
if (typeof r == "string") {
|
135
|
+
if (i = H[r], !i)
|
136
|
+
throw new N(r);
|
137
|
+
} else {
|
138
|
+
if (r < 0 || !Number.isInteger(r))
|
139
|
+
throw new S(r);
|
140
|
+
i = l(BigInt(10), BigInt(r));
|
141
|
+
}
|
142
|
+
let n = t;
|
143
|
+
typeof n == "number" && (n < 1e-15 && console.warn(p), n > 1e20 ? (console.warn(p), n = BigInt(n)) : n = n.toLocaleString("fullwide", {
|
144
|
+
useGrouping: !1,
|
145
|
+
maximumFractionDigits: 20
|
146
|
+
}));
|
147
|
+
const [o, e] = String(typeof n == "string" && !m(n) ? n : I(n)).split(".").concat(""), f = BigInt(`${o}${e}`) * i, d = e.length;
|
148
|
+
return d === 0 ? f.toString() : f.toString().slice(0, -d);
|
149
|
+
}, S0 = (t) => {
|
150
|
+
if (!T(t, !1))
|
151
|
+
throw new D(t);
|
152
|
+
const r = t.toLowerCase().replace(/^0x/i, ""), i = M(W(P(X(r))));
|
153
|
+
if (z(i) || i === "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")
|
137
154
|
return "";
|
138
|
-
let
|
139
|
-
const o =
|
155
|
+
let n = "0x";
|
156
|
+
const o = i.replace(/^0x/i, "");
|
140
157
|
for (let e = 0; e < r.length; e += 1)
|
141
|
-
parseInt(o[e], 16) > 7 ?
|
142
|
-
return
|
143
|
-
},
|
158
|
+
parseInt(o[e], 16) > 7 ? n += r[e].toUpperCase() : n += r[e];
|
159
|
+
return n;
|
160
|
+
}, T0 = (t) => {
|
144
161
|
if (typeof t == "boolean")
|
145
162
|
return t;
|
146
163
|
if (typeof t == "number" && (t === 0 || t === 1) || typeof t == "bigint" && (t === BigInt(0) || t === BigInt(1)))
|
@@ -149,34 +166,34 @@ const N = {
|
|
149
166
|
return t === "true" ? !0 : t === "false" ? !1 : !!Number(t);
|
150
167
|
if (typeof t == "string" && m(t) && (t === "0x1" || t === "0x0"))
|
151
168
|
return !!I(t);
|
152
|
-
throw new
|
169
|
+
throw new L(t);
|
153
170
|
};
|
154
171
|
export {
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
172
|
+
j as asciiToHex,
|
173
|
+
E as bytesToHex,
|
174
|
+
b as bytesToUint8Array,
|
175
|
+
H as ethUnitMap,
|
159
176
|
x0 as fromAscii,
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
177
|
+
h0 as fromDecimal,
|
178
|
+
d0 as fromUtf8,
|
179
|
+
A0 as fromWei,
|
180
|
+
J as hexToAscii,
|
181
|
+
U as hexToBytes,
|
182
|
+
x as hexToNumber,
|
183
|
+
I0 as hexToNumberString,
|
184
|
+
b0 as hexToString,
|
185
|
+
C as hexToUtf8,
|
169
186
|
g as numberToHex,
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
187
|
+
B0 as stringToHex,
|
188
|
+
y0 as toAscii,
|
189
|
+
a0 as toBigInt,
|
190
|
+
T0 as toBool,
|
191
|
+
S0 as toChecksumAddress,
|
192
|
+
m0 as toDecimal,
|
193
|
+
w0 as toHex,
|
177
194
|
I as toNumber,
|
178
|
-
|
179
|
-
|
180
|
-
|
195
|
+
p0 as toUtf8,
|
196
|
+
N0 as toWei,
|
197
|
+
X as utf8ToBytes,
|
181
198
|
h as utf8ToHex
|
182
199
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const b=require("../../../web3-types/lib/esm/data_format_types.cjs");require("../../../web3-types/lib/esm/eth_types.cjs");require("../../../web3-types/lib/esm/web3_base_provider.cjs");require("../../../web3-validator/lib/esm/formats.cjs");const E=require("../../../web3-validator/lib/esm/utils.cjs");require("../../../web3-validator/lib/esm/default_validator.cjs");const f=require("../../../web3-validator/lib/esm/validation/object.cjs"),p=require("./converters.cjs"),q=require("./objects.cjs"),M=require("./string_manipulation.cjs"),_=require("./uint8array.cjs"),{parseBaseType:N}=E,U=e=>typeof e=="object"&&!f.isNullish(e)&&"number"in e&&"bytes"in e,I=(e,i,s=[])=>{let r=Object.assign({},e),t;for(const n of i){if(r.oneOf&&t){const u=s.find(function(c){return this===c[0]},t??"");u&&u[0]===t&&(r=r.oneOf[u[1]])}if(!r.properties&&!r.items)return;if(r.properties)r=r.properties[n];else if(r.items&&r.items.properties){const u=r.items.properties;if(!u)return;r=u[n]}else r.items&&f.isObject(r.items)?r=r.items:r.items&&Array.isArray(r.items)&&(r=r.items[parseInt(n,10)]);r&&n&&(t=n)}return r},v=(e,i,s)=>{try{const{baseType:r,baseTypeSize:t}=N(i);if(r==="int"||r==="uint")switch(s.number){case b.FMT_NUMBER.NUMBER:return Number(p.toBigInt(e));case b.FMT_NUMBER.HEX:return p.numberToHex(p.toBigInt(e));case b.FMT_NUMBER.STR:return p.toBigInt(e).toString();case b.FMT_NUMBER.BIGINT:return p.toBigInt(e);default:throw new g.FormatterError(`Invalid format: ${String(s.number)}`)}if(r==="bytes"){let n;switch(t?typeof e=="string"?n=M.padLeft(e,t*2):_.isUint8Array(e)&&(n=_.uint8ArrayConcat(new Uint8Array(t-e.length),e)):n=e,s.bytes){case b.FMT_BYTES.HEX:return p.bytesToHex(p.bytesToUint8Array(n));case b.FMT_BYTES.UINT8ARRAY:return p.bytesToUint8Array(n);default:throw new g.FormatterError(`Invalid format: ${String(s.bytes)}`)}}}catch{return e}return e},m=({value:e,schemaProp:i,schema:s,object:r,key:t,dataPath:n,format:u,oneOfPath:c=[]})=>{var y,d;if(Array.isArray(e)){let l=i;if((i==null?void 0:i.oneOf)!==void 0&&i.oneOf.forEach((o,B)=>{var T,j;!Array.isArray(i==null?void 0:i.items)&&(typeof e[0]=="object"&&((T=o==null?void 0:o.items)===null||T===void 0?void 0:T.type)==="object"||typeof e[0]=="string"&&((j=o==null?void 0:o.items)===null||j===void 0?void 0:j.type)!=="object")&&(l=o,c.push([t,B]))}),f.isNullish(l==null?void 0:l.items))return delete r[t],n.pop(),!0;if(f.isObject(l.items)&&!f.isNullish(l.items.format)){for(let o=0;o<e.length;o+=1)r[t][o]=v(e[o],(y=l==null?void 0:l.items)===null||y===void 0?void 0:y.format,u);return n.pop(),!0}if(!Array.isArray(l==null?void 0:l.items)&&((d=l==null?void 0:l.items)===null||d===void 0?void 0:d.type)==="object"){for(const o of e)A(o,s,n,u,c);return n.pop(),!0}if(Array.isArray(l==null?void 0:l.items)){for(let o=0;o<e.length;o+=1)r[t][o]=v(e[o],l.items[o].format,u);return n.pop(),!0}}return!1},A=(e,i,s,r,t=[])=>{var n;if(!f.isObject(e)&&!Array.isArray(e))return v(e,i==null?void 0:i.format,r);const u=e;if(Array.isArray(u)&&(i==null?void 0:i.type)==="array"&&((n=i==null?void 0:i.items)===null||n===void 0?void 0:n.type)==="object")m({value:u,schemaProp:i,schema:i,object:u,key:"",dataPath:s,format:r,oneOfPath:t});else for(const[c,y]of Object.entries(u)){s.push(c);const d=I(i,s,t);if(f.isNullish(d)){delete u[c],s.pop();continue}if(f.isObject(y)){A(y,i,s,r),s.pop();continue}m({value:y,schemaProp:d,schema:i,object:u,key:c,dataPath:s,format:r,oneOfPath:t})||(u[c]=v(y,d.format,r),s.pop())}return u},R=(e,i,s=b.DEFAULT_RETURN_FORMAT)=>{let r;f.isObject(i)?r=q.mergeDeep({},i):Array.isArray(i)?r=[...i]:r=i;const t=f.isObject(e)?e:E.ethAbiToJsonSchema(e);if(!t.properties&&!t.items&&!t.format)throw new g.FormatterError("Invalid json schema for formatting");return A(r,t,[],s)};exports.convert=A;exports.convertScalarValue=v;exports.format=R;exports.isDataFormat=U;
|
@@ -1,134 +1,153 @@
|
|
1
|
-
import { FormatterError as
|
1
|
+
import { FormatterError as g } from "../../../web3-errors/lib/esm/errors/generic_errors.js";
|
2
2
|
import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
|
3
|
-
import { FMT_NUMBER as
|
3
|
+
import { FMT_NUMBER as m, FMT_BYTES as _, DEFAULT_RETURN_FORMAT as R } from "../../../web3-types/lib/esm/data_format_types.js";
|
4
4
|
import "../../../web3-types/lib/esm/eth_types.js";
|
5
5
|
import "../../../web3-types/lib/esm/web3_base_provider.js";
|
6
6
|
import "../../../web3-validator/lib/esm/formats.js";
|
7
|
-
import * as
|
8
|
-
import { ethAbiToJsonSchema as
|
7
|
+
import * as U from "../../../web3-validator/lib/esm/utils.js";
|
8
|
+
import { ethAbiToJsonSchema as B } from "../../../web3-validator/lib/esm/utils.js";
|
9
9
|
import "../../../web3-validator/lib/esm/default_validator.js";
|
10
|
-
import { isNullish as A, isObject as
|
11
|
-
import { toBigInt as v, numberToHex as
|
12
|
-
import { mergeDeep as
|
10
|
+
import { isNullish as A, isObject as d } from "../../../web3-validator/lib/esm/validation/object.js";
|
11
|
+
import { toBigInt as v, numberToHex as N, bytesToUint8Array as w, bytesToHex as D } from "./converters.js";
|
12
|
+
import { mergeDeep as M } from "./objects.js";
|
13
13
|
import { padLeft as H } from "./string_manipulation.js";
|
14
|
-
import { isUint8Array as
|
15
|
-
const { parseBaseType:
|
16
|
-
let
|
17
|
-
for (const
|
18
|
-
if (
|
19
|
-
const
|
20
|
-
return this ===
|
21
|
-
},
|
22
|
-
|
14
|
+
import { isUint8Array as S, uint8ArrayConcat as x } from "./uint8array.js";
|
15
|
+
const { parseBaseType: F } = U, Z = (i) => typeof i == "object" && !A(i) && "number" in i && "bytes" in i, L = (i, t, s = []) => {
|
16
|
+
let r = Object.assign({}, i), e;
|
17
|
+
for (const o of t) {
|
18
|
+
if (r.oneOf && e) {
|
19
|
+
const f = s.find(function(p) {
|
20
|
+
return this === p[0];
|
21
|
+
}, e ?? "");
|
22
|
+
f && f[0] === e && (r = r.oneOf[f[1]]);
|
23
23
|
}
|
24
|
-
if (!
|
24
|
+
if (!r.properties && !r.items)
|
25
25
|
return;
|
26
|
-
if (
|
27
|
-
|
28
|
-
else if (
|
29
|
-
const
|
30
|
-
if (!
|
26
|
+
if (r.properties)
|
27
|
+
r = r.properties[o];
|
28
|
+
else if (r.items && r.items.properties) {
|
29
|
+
const f = r.items.properties;
|
30
|
+
if (!f)
|
31
31
|
return;
|
32
|
-
|
32
|
+
r = f[o];
|
33
33
|
} else
|
34
|
-
|
35
|
-
|
34
|
+
r.items && d(r.items) ? r = r.items : r.items && Array.isArray(r.items) && (r = r.items[parseInt(o, 10)]);
|
35
|
+
r && o && (e = o);
|
36
36
|
}
|
37
|
-
return
|
38
|
-
}, b = (
|
37
|
+
return r;
|
38
|
+
}, b = (i, t, s) => {
|
39
39
|
try {
|
40
|
-
const { baseType:
|
41
|
-
if (
|
42
|
-
switch (
|
43
|
-
case
|
44
|
-
return Number(v(
|
45
|
-
case
|
46
|
-
return
|
47
|
-
case
|
48
|
-
return v(
|
49
|
-
case
|
50
|
-
return v(
|
40
|
+
const { baseType: r, baseTypeSize: e } = F(t);
|
41
|
+
if (r === "int" || r === "uint")
|
42
|
+
switch (s.number) {
|
43
|
+
case m.NUMBER:
|
44
|
+
return Number(v(i));
|
45
|
+
case m.HEX:
|
46
|
+
return N(v(i));
|
47
|
+
case m.STR:
|
48
|
+
return v(i).toString();
|
49
|
+
case m.BIGINT:
|
50
|
+
return v(i);
|
51
51
|
default:
|
52
|
-
throw new
|
52
|
+
throw new g(`Invalid format: ${String(s.number)}`);
|
53
53
|
}
|
54
|
-
if (
|
55
|
-
let
|
56
|
-
switch (
|
57
|
-
case
|
58
|
-
return
|
59
|
-
case
|
60
|
-
return
|
54
|
+
if (r === "bytes") {
|
55
|
+
let o;
|
56
|
+
switch (e ? typeof i == "string" ? o = H(i, e * 2) : S(i) && (o = x(new Uint8Array(e - i.length), i)) : o = i, s.bytes) {
|
57
|
+
case _.HEX:
|
58
|
+
return D(w(o));
|
59
|
+
case _.UINT8ARRAY:
|
60
|
+
return w(o);
|
61
61
|
default:
|
62
|
-
throw new
|
62
|
+
throw new g(`Invalid format: ${String(s.bytes)}`);
|
63
63
|
}
|
64
64
|
}
|
65
65
|
} catch {
|
66
|
-
return
|
66
|
+
return i;
|
67
67
|
}
|
68
|
-
return
|
69
|
-
},
|
70
|
-
var
|
71
|
-
if (
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
68
|
+
return i;
|
69
|
+
}, E = ({ value: i, schemaProp: t, schema: s, object: r, key: e, dataPath: o, format: f, oneOfPath: p = [] }) => {
|
70
|
+
var u, y;
|
71
|
+
if (Array.isArray(i)) {
|
72
|
+
let l = t;
|
73
|
+
if ((t == null ? void 0 : t.oneOf) !== void 0 && t.oneOf.forEach((n, I) => {
|
74
|
+
var c, T;
|
75
|
+
!Array.isArray(t == null ? void 0 : t.items) && (typeof i[0] == "object" && ((c = n == null ? void 0 : n.items) === null || c === void 0 ? void 0 : c.type) === "object" || typeof i[0] == "string" && ((T = n == null ? void 0 : n.items) === null || T === void 0 ? void 0 : T.type) !== "object") && (l = n, p.push([e, I]));
|
76
|
+
}), A(l == null ? void 0 : l.items))
|
77
|
+
return delete r[e], o.pop(), !0;
|
78
|
+
if (d(l.items) && !A(l.items.format)) {
|
79
|
+
for (let n = 0; n < i.length; n += 1)
|
80
|
+
r[e][n] = b(
|
81
|
+
i[n],
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
83
|
+
(u = l == null ? void 0 : l.items) === null || u === void 0 ? void 0 : u.format,
|
84
|
+
f
|
85
|
+
);
|
86
|
+
return o.pop(), !0;
|
80
87
|
}
|
81
|
-
if (
|
82
|
-
|
83
|
-
|
88
|
+
if (!Array.isArray(l == null ? void 0 : l.items) && ((y = l == null ? void 0 : l.items) === null || y === void 0 ? void 0 : y.type) === "object") {
|
89
|
+
for (const n of i)
|
90
|
+
j(n, s, o, f, p);
|
91
|
+
return o.pop(), !0;
|
84
92
|
}
|
85
|
-
if (Array.isArray(
|
86
|
-
let n =
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
93
|
+
if (Array.isArray(l == null ? void 0 : l.items)) {
|
94
|
+
for (let n = 0; n < i.length; n += 1)
|
95
|
+
r[e][n] = b(i[n], l.items[n].format, f);
|
96
|
+
return o.pop(), !0;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
return !1;
|
100
|
+
}, j = (i, t, s, r, e = []) => {
|
101
|
+
var o;
|
102
|
+
if (!d(i) && !Array.isArray(i))
|
103
|
+
return b(i, t == null ? void 0 : t.format, r);
|
104
|
+
const f = i;
|
105
|
+
if (Array.isArray(f) && (t == null ? void 0 : t.type) === "array" && ((o = t == null ? void 0 : t.items) === null || o === void 0 ? void 0 : o.type) === "object")
|
106
|
+
E({
|
107
|
+
value: f,
|
108
|
+
schemaProp: t,
|
109
|
+
schema: t,
|
110
|
+
object: f,
|
111
|
+
key: "",
|
112
|
+
dataPath: s,
|
113
|
+
format: r,
|
114
|
+
oneOfPath: e
|
115
|
+
});
|
116
|
+
else
|
117
|
+
for (const [p, u] of Object.entries(f)) {
|
118
|
+
s.push(p);
|
119
|
+
const y = L(t, s, e);
|
120
|
+
if (A(y)) {
|
121
|
+
delete f[p], s.pop();
|
109
122
|
continue;
|
110
123
|
}
|
111
|
-
if (
|
112
|
-
|
113
|
-
m[c][t] = b(p[t], n.items[t].format, i);
|
114
|
-
r.pop();
|
124
|
+
if (d(u)) {
|
125
|
+
j(u, t, s, r), s.pop();
|
115
126
|
continue;
|
116
127
|
}
|
128
|
+
E({
|
129
|
+
value: u,
|
130
|
+
schemaProp: y,
|
131
|
+
schema: t,
|
132
|
+
object: f,
|
133
|
+
key: p,
|
134
|
+
dataPath: s,
|
135
|
+
format: r,
|
136
|
+
oneOfPath: e
|
137
|
+
}) || (f[p] = b(u, y.format, r), s.pop());
|
117
138
|
}
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
throw new j("Invalid json schema for formatting");
|
127
|
-
return w(i, o, [], r);
|
139
|
+
return f;
|
140
|
+
}, k = (i, t, s = R) => {
|
141
|
+
let r;
|
142
|
+
d(t) ? r = M({}, t) : Array.isArray(t) ? r = [...t] : r = t;
|
143
|
+
const e = d(i) ? i : B(i);
|
144
|
+
if (!e.properties && !e.items && !e.format)
|
145
|
+
throw new g("Invalid json schema for formatting");
|
146
|
+
return j(r, e, [], s);
|
128
147
|
};
|
129
148
|
export {
|
130
|
-
|
149
|
+
j as convert,
|
131
150
|
b as convertScalarValue,
|
132
|
-
|
133
|
-
|
151
|
+
k as format,
|
152
|
+
Z as isDataFormat
|
134
153
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../../../web3-errors/lib/esm/errors/utils_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const W=require("./constants.cjs"),N=require("./validation/abi.cjs"),b=require("./validation/string.cjs"),E=require("./errors.cjs"),q=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],g=e=>{let t=e.replace(/ /,""),n,r=!1,s=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),s=[...e.matchAll(/(?:\[(\d*)\])/g)].map(i=>parseInt(i[1],10)).map(i=>Number.isNaN(i)?-1:i),r=s.length>0),W.VALID_ETH_BASE_TYPES.includes(t))return{baseType:t,isArray:r,baseTypeSize:n,arraySizes:s};if(t.startsWith("int"))n=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))n=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))n=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:s};return{baseType:t,isArray:r,baseTypeSize:n,arraySizes:s}},T=(e,t={})=>{if(Object.keys(t).includes("type"))throw new E.Web3ValidatorError([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);const{baseType:r,baseTypeSize:s}=g(e);if(!r&&!q.includes(e))throw new E.Web3ValidatorError([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(r){if(r==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${r}${s??""}`,required:!0}}return e?{format:e,required:!0}:{}},d=(e,t="/0")=>{const n={type:"array",items:[],maxItems:e.length,minItems:e.length};for(const[r,s]of e.entries()){let i,o,f=[];N.isAbiParameterSchema(s)?(i=s.type,o=s.name
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../../../web3-errors/lib/esm/errors/utils_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const W=require("./constants.cjs"),N=require("./validation/abi.cjs"),b=require("./validation/string.cjs"),E=require("./errors.cjs"),q=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],g=e=>{let t=e.replace(/ /,""),n,r=!1,s=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),s=[...e.matchAll(/(?:\[(\d*)\])/g)].map(i=>parseInt(i[1],10)).map(i=>Number.isNaN(i)?-1:i),r=s.length>0),W.VALID_ETH_BASE_TYPES.includes(t))return{baseType:t,isArray:r,baseTypeSize:n,arraySizes:s};if(t.startsWith("int"))n=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))n=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))n=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:s};return{baseType:t,isArray:r,baseTypeSize:n,arraySizes:s}},T=(e,t={})=>{if(Object.keys(t).includes("type"))throw new E.Web3ValidatorError([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);const{baseType:r,baseTypeSize:s}=g(e);if(!r&&!q.includes(e))throw new E.Web3ValidatorError([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(r){if(r==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${r}${s??""}`,required:!0}}return e?{format:e,required:!0}:{}},d=(e,t="/0")=>{const n={type:"array",items:[],maxItems:e.length,minItems:e.length};for(const[r,s]of e.entries()){let i,o,f=[];N.isAbiParameterSchema(s)?(i=s.type,o=s.name||`${t}/${r}`,f=s.components):typeof s=="string"?(i=s,o=`${t}/${r}`):Array.isArray(s)&&(s[0]&&typeof s[0]=="string"&&s[0].startsWith("tuple")&&!Array.isArray(s[0])&&s[1]&&Array.isArray(s[1])?(i=s[0],o=`${t}/${r}`,f=s[1]):(i="tuple",o=`${t}/${r}`,f=s));const{baseType:u,isArray:l,arraySizes:p}=g(i);let m,c=n;for(let a=p.length-1;a>0;a-=1)m={type:"array",$id:o,items:[],maxItems:p[a],minItems:p[a]},p[a]<0&&(delete m.maxItems,delete m.minItems),Array.isArray(c.items)?c.items.length===0?c.items=[m]:c.items.push(m):c.items=[c.items,m],c=m;if(u==="tuple"&&!l){const a=d(f,o);a.$id=o,c.items.push(a)}else if(u==="tuple"&&l){const a=p[0],h=Object.assign({type:"array",$id:o,items:d(f,o)},a>=0&&{minItems:a,maxItems:a});c.items.push(h)}else if(l){const a=p[0],h=Object.assign({type:"array",$id:o,items:T(i)},a>=0&&{minItems:a,maxItems:a});c.items.push(h)}else Array.isArray(c.items)?c.items.push(Object.assign({$id:o},T(i))):c.items.push(Object.assign({$id:o},T(i)));c=n}return n},_=e=>d(e),I=(e,t)=>t===1?e:I(e[0],t-1),A=(e,t,n)=>{const r=[];for(const[s,i]of e.entries()){let o,f,u=[];N.isAbiParameterSchema(i)?(o=i.type,f=i.name,u=i.components):typeof i=="string"?o=i:Array.isArray(i)&&(i[1]&&Array.isArray(i[1])?(o=i[0],u=i[1]):(o="tuple",u=i));const{baseType:l,isArray:p,arraySizes:m}=g(o),c=Array.isArray(t)?t[s]:t[f];if(l==="tuple"&&!p)r.push(A(u,c,n));else if(l==="tuple"&&p){const a=[];for(const h of c)if(m.length>1){const z=I(h,m.length-1),$=[];for(const H of z)$.push(A(u,H,n));a.push($)}else a.push(A(u,h,n));r.push(a)}else r.push(c)}return n=n??[],n.push(...r),n},B=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},O=e=>{if(!b.isHexStrict(e))throw new Error("Invalid hex string");const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=BigInt(n);return r>Number.MAX_SAFE_INTEGER?t?-r:r:r<Number.MIN_SAFE_INTEGER?r:t?-1*Number(r):Number(r)},x=e=>{if((typeof e=="number"||typeof e=="bigint")&&e<0)return`-0x${e.toString(16).slice(1)}`;if((typeof e=="number"||typeof e=="bigint")&&e>=0)return`0x${e.toString(16)}`;if(typeof e=="string"&&b.isHexStrict(e)){const[t,n]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],r=n.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${r.replace(/^0+/,"").toLowerCase()}`}if(typeof e=="string"&&!b.isHexStrict(e))return x(BigInt(e));throw new S.InvalidNumberError(e)},U=(e,t,n="0")=>{if(typeof e=="string"&&!b.isHexStrict(e))return e.padStart(t,n);const r=typeof e=="string"&&b.isHexStrict(e)?e:x(e),[s,i]=r.startsWith("-")?["-0x",r.slice(3)]:["0x",r.slice(2)];return`${s}${i.padStart(t,n)}`};function j(e){let t="0x";for(const n of e){const r=n.toString(16);t+=r.length===1?`0${r}`:r}return t}const y={zero:48,nine:57,A:65,F:70,a:97,f:102};function w(e){if(e>=y.zero&&e<=y.nine)return e-y.zero;if(e>=y.A&&e<=y.F)return e-(y.A-10);if(e>=y.a&&e<=y.f)return e-(y.a-10)}function C(e){let t=0;if(e.startsWith("0")&&(e[1]==="x"||e[1]==="X")&&(t=2),e.length%2!==0)throw new S.InvalidBytesError(`hex string has odd length: ${e}`);const n=(e.length-t)/2,r=new Uint8Array(n);for(let s=0,i=t;s<n;s+=1){const o=w(e.charCodeAt(i++)),f=w(e.charCodeAt(i++));if(o===void 0||f===void 0)throw new S.InvalidBytesError(`Invalid byte sequence ("${e[i-2]}${e[i-1]}" in "${e}").`);r[s]=o*16+f}return r}function F(e){var t;return!(e instanceof Uint8Array)&&((t=e==null?void 0:e.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"?Uint8Array.from(e):e}exports.abiSchemaToJsonSchema=d;exports.codePointToInt=B;exports.ensureIfUint8Array=F;exports.ethAbiToJsonSchema=_;exports.fetchArrayElement=I;exports.hexToNumber=O;exports.hexToUint8Array=C;exports.numberToHex=x;exports.padLeft=U;exports.parseBaseType=g;exports.transformJsonDataToAbiFormat=A;exports.uint8ArrayToHexString=j;
|