@ozdao/prometheus-framework 0.2.133 → 0.2.134
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/alignment-pattern.cjs +1 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.cjs +1 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.cjs +1 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.cjs +1 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.cjs +1 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.cjs +1 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.cjs +1 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.cjs +1 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.cjs +1 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.cjs +1 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.cjs +1 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.cjs +1 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.cjs +1 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.cjs +1 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.cjs +1 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.cjs +1 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.cjs +1 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.cjs +1 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.cjs +1 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.cjs +1 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-C-8xOJnM.mjs +244 -0
- package/dist/index-CDbtWkBj.js +243 -0
- package/dist/main-5IrI2IOV.js +92 -0
- package/dist/main-BY2OvGB9.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/dijkstrajs/dijkstra.cjs +1 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/encode-utf8/index.cjs +1 -0
- package/dist/node_modules/encode-utf8/index.js +30 -0
- package/dist/node_modules/qrcode/lib/browser.cjs +1 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.cjs +1 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +24 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.cjs +4 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.cjs +2 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
- 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 +2 -2
- 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 +1 -1
- 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 +16 -16
- 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 +16 -16
- 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 +13 -13
- 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 +36 -36
- 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 +29 -29
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- 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 +23 -23
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +14 -14
- 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/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.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 +12 -12
- 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 +21 -21
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- 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 +5 -5
- 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 +7 -7
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
- 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 +2 -2
- 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 +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 +4 -4
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
- 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 +8 -8
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- 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 +4 -4
- 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 +1 -1
- 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 +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/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +12 -12
- 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 +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- 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 +19 -19
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- 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 +7 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
- 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 +18 -18
- 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 +32 -32
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +10 -10
- 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 +5 -5
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- 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 +1 -1
- 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 +3 -3
- 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 +9 -9
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
- 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 +140 -125
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +103 -13
- package/dist/wallet.server.mjs +103 -13
- package/dist/web-5eyiz9L7.mjs +54 -0
- package/dist/web-C04IcLk4.js +1 -0
- package/package.json +1 -1
- package/src/components/Field/Field.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/globals/components/partials/Header.vue +2 -2
- package/src/modules/globals/localization/vue-i18n.js +5 -5
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
- package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
- package/src/modules/middlewares/server/authSecret.js +22 -0
- package/src/modules/middlewares/server/index.js +7 -5
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
- package/src/modules/wallet/models/wallet.model.js +5 -5
- package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
- package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
- package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
- package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
- package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
- package/src/modules/wallet/views/localization/wallet.json +37 -0
- package/src/modules/wallet/views/store/wallet.store.js +145 -28
- package/src/modules/wallet/wallet.server.js +2 -2
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
- package/src/modules/wallet/localization/Wallet.json +0 -22
- /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
import "./mode.js";
|
2
|
+
import { __exports as s } from "../../../../_virtual/mode.js";
|
3
|
+
const g = s;
|
4
|
+
function n(i) {
|
5
|
+
this.mode = g.NUMERIC, this.data = i.toString();
|
6
|
+
}
|
7
|
+
n.getBitsLength = function(t) {
|
8
|
+
return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
|
9
|
+
};
|
10
|
+
n.prototype.getLength = function() {
|
11
|
+
return this.data.length;
|
12
|
+
};
|
13
|
+
n.prototype.getBitsLength = function() {
|
14
|
+
return n.getBitsLength(this.data.length);
|
15
|
+
};
|
16
|
+
n.prototype.write = function(t) {
|
17
|
+
let e, r, a;
|
18
|
+
for (e = 0; e + 3 <= this.data.length; e += 3)
|
19
|
+
r = this.data.substr(e, 3), a = parseInt(r, 10), t.put(a, 10);
|
20
|
+
const o = this.data.length - e;
|
21
|
+
o > 0 && (r = this.data.substr(e), a = parseInt(r, 10), t.put(a, o * 3 + 1));
|
22
|
+
};
|
23
|
+
var p = n;
|
24
|
+
export {
|
25
|
+
p as n
|
26
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const c=require("../../../../_virtual/polynomial.cjs");require("./galois-field.cjs");const g=require("../../../../_virtual/galois-field.cjs");(function(o){const u=g.__exports;o.mul=function(l,n){const e=new Uint8Array(l.length+n.length-1);for(let r=0;r<l.length;r++)for(let t=0;t<n.length;t++)e[r+t]^=u.mul(l[r],n[t]);return e},o.mod=function(l,n){let e=new Uint8Array(l);for(;e.length-n.length>=0;){const r=e[0];for(let i=0;i<n.length;i++)e[i]^=u.mul(n[i],r);let t=0;for(;t<e.length&&e[t]===0;)t++;e=e.slice(t)}return e},o.generateECPolynomial=function(l){let n=new Uint8Array([1]);for(let e=0;e<l;e++)n=o.mul(n,new Uint8Array([1,u.exp(e)]));return n}})(c.__exports);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { __exports as u } from "../../../../_virtual/polynomial.js";
|
2
|
+
import "./galois-field.js";
|
3
|
+
import { __exports as a } from "../../../../_virtual/galois-field.js";
|
4
|
+
(function(r) {
|
5
|
+
const f = a;
|
6
|
+
r.mul = function(l, n) {
|
7
|
+
const e = new Uint8Array(l.length + n.length - 1);
|
8
|
+
for (let o = 0; o < l.length; o++)
|
9
|
+
for (let t = 0; t < n.length; t++)
|
10
|
+
e[o + t] ^= f.mul(l[o], n[t]);
|
11
|
+
return e;
|
12
|
+
}, r.mod = function(l, n) {
|
13
|
+
let e = new Uint8Array(l);
|
14
|
+
for (; e.length - n.length >= 0; ) {
|
15
|
+
const o = e[0];
|
16
|
+
for (let i = 0; i < n.length; i++)
|
17
|
+
e[i] ^= f.mul(n[i], o);
|
18
|
+
let t = 0;
|
19
|
+
for (; t < e.length && e[t] === 0; ) t++;
|
20
|
+
e = e.slice(t);
|
21
|
+
}
|
22
|
+
return e;
|
23
|
+
}, r.generateECPolynomial = function(l) {
|
24
|
+
let n = new Uint8Array([1]);
|
25
|
+
for (let e = 0; e < l; e++)
|
26
|
+
n = r.mul(n, new Uint8Array([1, f.exp(e)]));
|
27
|
+
return n;
|
28
|
+
};
|
29
|
+
})(u);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../../../../_virtual/qrcode.cjs");require("./utils.cjs");require("./error-correction-level.cjs");const F=require("./bit-buffer.cjs"),x=require("./bit-matrix.cjs");require("./alignment-pattern.cjs");require("./finder-pattern.cjs");require("./mask-pattern.cjs");require("./error-correction-code.cjs");const D=require("./reed-solomon-encoder.cjs");require("./version.cjs");require("./format-info.cjs");require("./mode.cjs");require("./segments.cjs");const V=require("../../../../_virtual/utils.cjs"),G=require("../../../../_virtual/error-correction-level.cjs"),R=require("../../../../_virtual/mask-pattern.cjs"),J=require("../../../../_virtual/version.cjs"),N=require("../../../../_virtual/segments.cjs"),U=require("../../../../_virtual/alignment-pattern.cjs"),Q=require("../../../../_virtual/finder-pattern.cjs"),j=require("../../../../_virtual/error-correction-code.cjs"),L=require("../../../../_virtual/format-info.cjs"),O=require("../../../../_virtual/mode.cjs"),b=V.__exports,h=G.__exports,H=F.bitBuffer,K=x.bitMatrix,W=U.__exports,X=Q.__exports,I=R.__exports,y=j.__exports,Y=D.reedSolomonEncoder,p=J.__exports,Z=L.__exports,$=O.__exports,S=N.__exports;function v(n,c){const r=n.size,e=X.getPositions(c);for(let u=0;u<e.length;u++){const t=e[u][0],o=e[u][1];for(let i=-1;i<=7;i++)if(!(t+i<=-1||r<=t+i))for(let s=-1;s<=7;s++)o+s<=-1||r<=o+s||(i>=0&&i<=6&&(s===0||s===6)||s>=0&&s<=6&&(i===0||i===6)||i>=2&&i<=4&&s>=2&&s<=4?n.set(t+i,o+s,!0,!0):n.set(t+i,o+s,!1,!0))}}function ee(n){const c=n.size;for(let r=8;r<c-8;r++){const e=r%2===0;n.set(r,6,e,!0),n.set(6,r,e,!0)}}function te(n,c){const r=W.getPositions(c);for(let e=0;e<r.length;e++){const u=r[e][0],t=r[e][1];for(let o=-2;o<=2;o++)for(let i=-2;i<=2;i++)o===-2||o===2||i===-2||i===2||o===0&&i===0?n.set(u+o,t+i,!0,!0):n.set(u+o,t+i,!1,!0)}}function oe(n,c){const r=n.size,e=p.getEncodedBits(c);let u,t,o;for(let i=0;i<18;i++)u=Math.floor(i/3),t=i%3+r-8-3,o=(e>>i&1)===1,n.set(u,t,o,!0),n.set(t,u,o,!0)}function B(n,c,r){const e=n.size,u=Z.getEncodedBits(c,r);let t,o;for(t=0;t<15;t++)o=(u>>t&1)===1,t<6?n.set(t,8,o,!0):t<8?n.set(t+1,8,o,!0):n.set(e-15+t,8,o,!0),t<8?n.set(8,e-t-1,o,!0):t<9?n.set(8,15-t-1+1,o,!0):n.set(8,15-t-1,o,!0);n.set(e-8,8,1,!0)}function ne(n,c){const r=n.size;let e=-1,u=r-1,t=7,o=0;for(let i=r-1;i>0;i-=2)for(i===6&&i--;;){for(let s=0;s<2;s++)if(!n.isReserved(u,i-s)){let d=!1;o<c.length&&(d=(c[o]>>>t&1)===1),n.set(u,i-s,d),t--,t===-1&&(o++,t=7)}if(u+=e,u<0||r<=u){u-=e,e=-e;break}}}function re(n,c,r){const e=new H;r.forEach(function(s){e.put(s.mode.bit,4),e.put(s.getLength(),$.getCharCountIndicator(s.mode,n)),s.write(e)});const u=b.getSymbolTotalCodewords(n),t=y.getTotalCodewordsCount(n,c),o=(u-t)*8;for(e.getLengthInBits()+4<=o&&e.put(0,4);e.getLengthInBits()%8!==0;)e.putBit(0);const i=(o-e.getLengthInBits())/8;for(let s=0;s<i;s++)e.put(s%2?17:236,8);return se(e,n,c)}function se(n,c,r){const e=b.getSymbolTotalCodewords(c),u=y.getTotalCodewordsCount(c,r),t=e-u,o=y.getBlocksCount(c,r),i=e%o,s=o-i,d=Math.floor(e/o),g=Math.floor(t/o),P=g+1,M=d-g,k=new Y(M);let q=0;const w=new Array(o),T=new Array(o);let _=0;const A=new Uint8Array(n.buffer);for(let a=0;a<o;a++){const C=a<s?g:P;w[a]=A.slice(q,q+C),T[a]=k.encode(w[a]),q+=C,_=Math.max(_,C)}const m=new Uint8Array(e);let z=0,f,l;for(f=0;f<_;f++)for(l=0;l<o;l++)f<w[l].length&&(m[z++]=w[l][f]);for(f=0;f<M;f++)for(l=0;l<o;l++)m[z++]=T[l][f];return m}function ie(n,c,r,e){let u;if(Array.isArray(n))u=S.fromArray(n);else if(typeof n=="string"){let d=c;if(!d){const g=S.rawSplit(n);d=p.getBestVersionForData(g,r)}u=S.fromString(n,d||40)}else throw new Error("Invalid data");const t=p.getBestVersionForData(u,r);if(!t)throw new Error("The amount of data is too big to be stored in a QR Code");if(!c)c=t;else if(c<t)throw new Error(`
|
2
|
+
The chosen QR Code version cannot contain this amount of data.
|
3
|
+
Minimum version required to store current data is: `+t+`.
|
4
|
+
`);const o=re(c,r,u),i=b.getSymbolSize(c),s=new K(i);return v(s,c),ee(s),te(s,c),B(s,r,0),c>=7&&oe(s,c),ne(s,o),isNaN(e)&&(e=I.getBestMask(s,B.bind(null,s,r))),I.applyMask(e,s),B(s,r,e),{modules:s,version:c,errorCorrectionLevel:r,maskPattern:e,segments:u}}E.__exports.create=function(c,r){if(typeof c>"u"||c==="")throw new Error("No input text");let e=h.M,u,t;return typeof r<"u"&&(e=h.from(r.errorCorrectionLevel,h.M),u=p.from(r.version),t=I.from(r.maskPattern),r.toSJISFunc&&b.setToSJISFunction(r.toSJISFunc)),ie(c,u,e,t)};exports.default=E.__exports;
|
@@ -0,0 +1,159 @@
|
|
1
|
+
import { __exports as P } from "../../../../_virtual/qrcode.js";
|
2
|
+
import "./utils.js";
|
3
|
+
import "./error-correction-level.js";
|
4
|
+
import { b as D } from "./bit-buffer.js";
|
5
|
+
import { b as x } from "./bit-matrix.js";
|
6
|
+
import "./alignment-pattern.js";
|
7
|
+
import "./finder-pattern.js";
|
8
|
+
import "./mask-pattern.js";
|
9
|
+
import "./error-correction-code.js";
|
10
|
+
import { r as V } from "./reed-solomon-encoder.js";
|
11
|
+
import "./version.js";
|
12
|
+
import "./format-info.js";
|
13
|
+
import "./mode.js";
|
14
|
+
import "./segments.js";
|
15
|
+
import { __exports as G } from "../../../../_virtual/utils.js";
|
16
|
+
import { __exports as R } from "../../../../_virtual/error-correction-level.js";
|
17
|
+
import { __exports as J } from "../../../../_virtual/mask-pattern.js";
|
18
|
+
import { __exports as N } from "../../../../_virtual/version.js";
|
19
|
+
import { __exports as U } from "../../../../_virtual/segments.js";
|
20
|
+
import { __exports as q } from "../../../../_virtual/alignment-pattern.js";
|
21
|
+
import { __exports as Q } from "../../../../_virtual/finder-pattern.js";
|
22
|
+
import { __exports as L } from "../../../../_virtual/error-correction-code.js";
|
23
|
+
import { __exports as j } from "../../../../_virtual/format-info.js";
|
24
|
+
import { __exports as H } from "../../../../_virtual/mode.js";
|
25
|
+
const w = G, I = R, K = D, O = x, W = q, X = Q, y = J, z = L, Y = V, g = N, Z = j, $ = H, S = U;
|
26
|
+
function v(s, f) {
|
27
|
+
const n = s.size, t = X.getPositions(f);
|
28
|
+
for (let c = 0; c < t.length; c++) {
|
29
|
+
const e = t[c][0], o = t[c][1];
|
30
|
+
for (let i = -1; i <= 7; i++)
|
31
|
+
if (!(e + i <= -1 || n <= e + i))
|
32
|
+
for (let r = -1; r <= 7; r++)
|
33
|
+
o + r <= -1 || n <= o + r || (i >= 0 && i <= 6 && (r === 0 || r === 6) || r >= 0 && r <= 6 && (i === 0 || i === 6) || i >= 2 && i <= 4 && r >= 2 && r <= 4 ? s.set(e + i, o + r, !0, !0) : s.set(e + i, o + r, !1, !0));
|
34
|
+
}
|
35
|
+
}
|
36
|
+
function tt(s) {
|
37
|
+
const f = s.size;
|
38
|
+
for (let n = 8; n < f - 8; n++) {
|
39
|
+
const t = n % 2 === 0;
|
40
|
+
s.set(n, 6, t, !0), s.set(6, n, t, !0);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
function et(s, f) {
|
44
|
+
const n = W.getPositions(f);
|
45
|
+
for (let t = 0; t < n.length; t++) {
|
46
|
+
const c = n[t][0], e = n[t][1];
|
47
|
+
for (let o = -2; o <= 2; o++)
|
48
|
+
for (let i = -2; i <= 2; i++)
|
49
|
+
o === -2 || o === 2 || i === -2 || i === 2 || o === 0 && i === 0 ? s.set(c + o, e + i, !0, !0) : s.set(c + o, e + i, !1, !0);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
function ot(s, f) {
|
53
|
+
const n = s.size, t = g.getEncodedBits(f);
|
54
|
+
let c, e, o;
|
55
|
+
for (let i = 0; i < 18; i++)
|
56
|
+
c = Math.floor(i / 3), e = i % 3 + n - 8 - 3, o = (t >> i & 1) === 1, s.set(c, e, o, !0), s.set(e, c, o, !0);
|
57
|
+
}
|
58
|
+
function B(s, f, n) {
|
59
|
+
const t = s.size, c = Z.getEncodedBits(f, n);
|
60
|
+
let e, o;
|
61
|
+
for (e = 0; e < 15; e++)
|
62
|
+
o = (c >> e & 1) === 1, e < 6 ? s.set(e, 8, o, !0) : e < 8 ? s.set(e + 1, 8, o, !0) : s.set(t - 15 + e, 8, o, !0), e < 8 ? s.set(8, t - e - 1, o, !0) : e < 9 ? s.set(8, 15 - e - 1 + 1, o, !0) : s.set(8, 15 - e - 1, o, !0);
|
63
|
+
s.set(t - 8, 8, 1, !0);
|
64
|
+
}
|
65
|
+
function st(s, f) {
|
66
|
+
const n = s.size;
|
67
|
+
let t = -1, c = n - 1, e = 7, o = 0;
|
68
|
+
for (let i = n - 1; i > 0; i -= 2)
|
69
|
+
for (i === 6 && i--; ; ) {
|
70
|
+
for (let r = 0; r < 2; r++)
|
71
|
+
if (!s.isReserved(c, i - r)) {
|
72
|
+
let u = !1;
|
73
|
+
o < f.length && (u = (f[o] >>> e & 1) === 1), s.set(c, i - r, u), e--, e === -1 && (o++, e = 7);
|
74
|
+
}
|
75
|
+
if (c += t, c < 0 || n <= c) {
|
76
|
+
c -= t, t = -t;
|
77
|
+
break;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
function nt(s, f, n) {
|
82
|
+
const t = new K();
|
83
|
+
n.forEach(function(r) {
|
84
|
+
t.put(r.mode.bit, 4), t.put(r.getLength(), $.getCharCountIndicator(r.mode, s)), r.write(t);
|
85
|
+
});
|
86
|
+
const c = w.getSymbolTotalCodewords(s), e = z.getTotalCodewordsCount(s, f), o = (c - e) * 8;
|
87
|
+
for (t.getLengthInBits() + 4 <= o && t.put(0, 4); t.getLengthInBits() % 8 !== 0; )
|
88
|
+
t.putBit(0);
|
89
|
+
const i = (o - t.getLengthInBits()) / 8;
|
90
|
+
for (let r = 0; r < i; r++)
|
91
|
+
t.put(r % 2 ? 17 : 236, 8);
|
92
|
+
return rt(t, s, f);
|
93
|
+
}
|
94
|
+
function rt(s, f, n) {
|
95
|
+
const t = w.getSymbolTotalCodewords(f), c = z.getTotalCodewordsCount(f, n), e = t - c, o = z.getBlocksCount(f, n), i = t % o, r = o - i, u = Math.floor(t / o), m = Math.floor(e / o), k = m + 1, M = u - m, A = new Y(M);
|
96
|
+
let C = 0;
|
97
|
+
const p = new Array(o), T = new Array(o);
|
98
|
+
let b = 0;
|
99
|
+
const F = new Uint8Array(s.buffer);
|
100
|
+
for (let d = 0; d < o; d++) {
|
101
|
+
const _ = d < r ? m : k;
|
102
|
+
p[d] = F.slice(C, C + _), T[d] = A.encode(p[d]), C += _, b = Math.max(b, _);
|
103
|
+
}
|
104
|
+
const h = new Uint8Array(t);
|
105
|
+
let E = 0, l, a;
|
106
|
+
for (l = 0; l < b; l++)
|
107
|
+
for (a = 0; a < o; a++)
|
108
|
+
l < p[a].length && (h[E++] = p[a][l]);
|
109
|
+
for (l = 0; l < M; l++)
|
110
|
+
for (a = 0; a < o; a++)
|
111
|
+
h[E++] = T[a][l];
|
112
|
+
return h;
|
113
|
+
}
|
114
|
+
function it(s, f, n, t) {
|
115
|
+
let c;
|
116
|
+
if (Array.isArray(s))
|
117
|
+
c = S.fromArray(s);
|
118
|
+
else if (typeof s == "string") {
|
119
|
+
let u = f;
|
120
|
+
if (!u) {
|
121
|
+
const m = S.rawSplit(s);
|
122
|
+
u = g.getBestVersionForData(m, n);
|
123
|
+
}
|
124
|
+
c = S.fromString(s, u || 40);
|
125
|
+
} else
|
126
|
+
throw new Error("Invalid data");
|
127
|
+
const e = g.getBestVersionForData(c, n);
|
128
|
+
if (!e)
|
129
|
+
throw new Error("The amount of data is too big to be stored in a QR Code");
|
130
|
+
if (!f)
|
131
|
+
f = e;
|
132
|
+
else if (f < e)
|
133
|
+
throw new Error(
|
134
|
+
`
|
135
|
+
The chosen QR Code version cannot contain this amount of data.
|
136
|
+
Minimum version required to store current data is: ` + e + `.
|
137
|
+
`
|
138
|
+
);
|
139
|
+
const o = nt(f, n, c), i = w.getSymbolSize(f), r = new O(i);
|
140
|
+
return v(r, f), tt(r), et(r, f), B(r, n, 0), f >= 7 && ot(r, f), st(r, o), isNaN(t) && (t = y.getBestMask(
|
141
|
+
r,
|
142
|
+
B.bind(null, r, n)
|
143
|
+
)), y.applyMask(t, r), B(r, n, t), {
|
144
|
+
modules: r,
|
145
|
+
version: f,
|
146
|
+
errorCorrectionLevel: n,
|
147
|
+
maskPattern: t,
|
148
|
+
segments: c
|
149
|
+
};
|
150
|
+
}
|
151
|
+
P.create = function(f, n) {
|
152
|
+
if (typeof f > "u" || f === "")
|
153
|
+
throw new Error("No input text");
|
154
|
+
let t = I.M, c, e;
|
155
|
+
return typeof n < "u" && (t = I.from(n.errorCorrectionLevel, I.M), c = g.from(n.version), e = y.from(n.maskPattern), n.toSJISFunc && w.setToSJISFunction(n.toSJISFunc)), it(f, c, t, e);
|
156
|
+
};
|
157
|
+
export {
|
158
|
+
P as default
|
159
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./polynomial.cjs");const l=require("../../../../_virtual/polynomial.cjs"),s=l.__exports;function i(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=s.generateECPolynomial(this.degree)};i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(e.length+this.degree);o.set(e);const n=s.mod(o,this.genPoly),r=this.degree-n.length;if(r>0){const d=new Uint8Array(this.degree);return d.set(n,r),d}return n};var c=i;exports.reedSolomonEncoder=c;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import "./polynomial.js";
|
2
|
+
import { __exports as l } from "../../../../_virtual/polynomial.js";
|
3
|
+
const d = l;
|
4
|
+
function n(t) {
|
5
|
+
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
6
|
+
}
|
7
|
+
n.prototype.initialize = function(e) {
|
8
|
+
this.degree = e, this.genPoly = d.generateECPolynomial(this.degree);
|
9
|
+
};
|
10
|
+
n.prototype.encode = function(e) {
|
11
|
+
if (!this.genPoly)
|
12
|
+
throw new Error("Encoder not initialized");
|
13
|
+
const o = new Uint8Array(e.length + this.degree);
|
14
|
+
o.set(e);
|
15
|
+
const i = d.mod(o, this.genPoly), r = this.degree - i.length;
|
16
|
+
if (r > 0) {
|
17
|
+
const s = new Uint8Array(this.degree);
|
18
|
+
return s.set(i, r), s;
|
19
|
+
}
|
20
|
+
return i;
|
21
|
+
};
|
22
|
+
var g = n;
|
23
|
+
export {
|
24
|
+
g as r
|
25
|
+
};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../../../_virtual/regex.cjs"),r="[0-9]+",s="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r
|
2
|
+
]))+`;e.__exports.KANJI=new RegExp(t,"g");e.__exports.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");e.__exports.BYTE=new RegExp(o,"g");e.__exports.NUMERIC=new RegExp(r,"g");e.__exports.ALPHANUMERIC=new RegExp(s,"g");const _=new RegExp("^"+t+"$"),p=new RegExp("^"+r+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.__exports.testKanji=function(u){return _.test(u)};e.__exports.testNumeric=function(u){return p.test(u)};e.__exports.testAlphanumeric=function(u){return c.test(u)};exports.default=e.__exports;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { __exports as u } from "../../../../_virtual/regex.js";
|
2
|
+
const r = "[0-9]+", E = "[A-Z $%*+\\-./:]+";
|
3
|
+
let t = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
4
|
+
t = t.replace(/u/g, "\\u");
|
5
|
+
const s = "(?:(?![A-Z0-9 $%*+\\-./:]|" + t + `)(?:.|[\r
|
6
|
+
]))+`;
|
7
|
+
u.KANJI = new RegExp(t, "g");
|
8
|
+
u.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
9
|
+
u.BYTE = new RegExp(s, "g");
|
10
|
+
u.NUMERIC = new RegExp(r, "g");
|
11
|
+
u.ALPHANUMERIC = new RegExp(E, "g");
|
12
|
+
const A = new RegExp("^" + t + "$"), c = new RegExp("^" + r + "$"), g = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
13
|
+
u.testKanji = function(e) {
|
14
|
+
return A.test(e);
|
15
|
+
};
|
16
|
+
u.testNumeric = function(e) {
|
17
|
+
return c.test(e);
|
18
|
+
};
|
19
|
+
u.testAlphanumeric = function(e) {
|
20
|
+
return g.test(e);
|
21
|
+
};
|
22
|
+
export {
|
23
|
+
u as default
|
24
|
+
};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";const U=require("../../../../_virtual/segments.cjs");require("./mode.cjs");const Y=require("./numeric-data.cjs"),q=require("./alphanumeric-data.cjs"),K=require("./byte-data.cjs"),L=require("./kanji-data.cjs");require("./regex.cjs");require("./utils.cjs");const y=require("../../../dijkstrajs/dijkstra.cjs"),j=require("../../../../_virtual/utils.cjs"),k=require("../../../../_virtual/mode.cjs"),_=require("../../../../_virtual/regex.cjs");(function(g){const r=k.__exports,N=Y.numericData,I=q.alphanumericData,B=K.byteData,C=L.kanjiData,h=_.__exports,p=j.__exports,w=y.dijkstraExports;function b(n){return unescape(encodeURIComponent(n)).length}function m(n,o,t){const e=[];let s;for(;(s=n.exec(t))!==null;)e.push({data:s[0],index:s.index,mode:o,length:s[0].length});return e}function M(n){const o=m(h.NUMERIC,r.NUMERIC,n),t=m(h.ALPHANUMERIC,r.ALPHANUMERIC,n);let e,s;return p.isKanjiModeEnabled()?(e=m(h.BYTE,r.BYTE,n),s=m(h.KANJI,r.KANJI,n)):(e=m(h.BYTE_KANJI,r.BYTE,n),s=[]),o.concat(t,e,s).sort(function(i,c){return i.index-c.index}).map(function(i){return{data:i.data,mode:i.mode,length:i.length}})}function E(n,o){switch(o){case r.NUMERIC:return N.getBitsLength(n);case r.ALPHANUMERIC:return I.getBitsLength(n);case r.KANJI:return C.getBitsLength(n);case r.BYTE:return B.getBitsLength(n)}}function D(n){return n.reduce(function(o,t){const e=o.length-1>=0?o[o.length-1]:null;return e&&e.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function R(n){const o=[];for(let t=0;t<n.length;t++){const e=n[t];switch(e.mode){case r.NUMERIC:o.push([e,{data:e.data,mode:r.ALPHANUMERIC,length:e.length},{data:e.data,mode:r.BYTE,length:e.length}]);break;case r.ALPHANUMERIC:o.push([e,{data:e.data,mode:r.BYTE,length:e.length}]);break;case r.KANJI:o.push([e,{data:e.data,mode:r.BYTE,length:b(e.data)}]);break;case r.BYTE:o.push([{data:e.data,mode:r.BYTE,length:b(e.data)}])}}return o}function T(n,o){const t={},e={start:{}};let s=["start"];for(let a=0;a<n.length;a++){const i=n[a],c=[];for(let l=0;l<i.length;l++){const u=i[l],f=""+a+l;c.push(f),t[f]={node:u,lastCount:0},e[f]={};for(let A=0;A<s.length;A++){const d=s[A];t[d]&&t[d].node.mode===u.mode?(e[d][f]=E(t[d].lastCount+u.length,u.mode)-E(t[d].lastCount,u.mode),t[d].lastCount+=u.length):(t[d]&&(t[d].lastCount=u.length),e[d][f]=E(u.length,u.mode)+4+r.getCharCountIndicator(u.mode,o))}}s=c}for(let a=0;a<s.length;a++)e[s[a]].end=0;return{map:e,table:t}}function S(n,o){let t;const e=r.getBestModeForData(n);if(t=r.from(o,e),t!==r.BYTE&&t.bit<e.bit)throw new Error('"'+n+'" cannot be encoded with mode '+r.toString(t)+`.
|
2
|
+
Suggested mode is: `+r.toString(e));switch(t===r.KANJI&&!p.isKanjiModeEnabled()&&(t=r.BYTE),t){case r.NUMERIC:return new N(n);case r.ALPHANUMERIC:return new I(n);case r.KANJI:return new C(n);case r.BYTE:return new B(n)}}g.fromArray=function(o){return o.reduce(function(t,e){return typeof e=="string"?t.push(S(e,null)):e.data&&t.push(S(e.data,e.mode)),t},[])},g.fromString=function(o,t){const e=M(o,p.isKanjiModeEnabled()),s=R(e),a=T(s,t),i=w.find_path(a.map,"start","end"),c=[];for(let l=1;l<i.length-1;l++)c.push(a.table[i[l]].node);return g.fromArray(D(c))},g.rawSplit=function(o){return g.fromArray(M(o,p.isKanjiModeEnabled()))}})(U.__exports);
|
@@ -0,0 +1,143 @@
|
|
1
|
+
import { __exports as Y } from "../../../../_virtual/segments.js";
|
2
|
+
import "./mode.js";
|
3
|
+
import { n as K } from "./numeric-data.js";
|
4
|
+
import { a as L } from "./alphanumeric-data.js";
|
5
|
+
import { b as y } from "./byte-data.js";
|
6
|
+
import { k as _ } from "./kanji-data.js";
|
7
|
+
import "./regex.js";
|
8
|
+
import "./utils.js";
|
9
|
+
import { d as k } from "../../../dijkstrajs/dijkstra.js";
|
10
|
+
import { __exports as D } from "../../../../_virtual/utils.js";
|
11
|
+
import { __exports as j } from "../../../../_virtual/mode.js";
|
12
|
+
import { __exports as x } from "../../../../_virtual/regex.js";
|
13
|
+
(function(g) {
|
14
|
+
const o = j, N = K, I = L, B = y, C = _, c = x, p = D, w = k;
|
15
|
+
function b(n) {
|
16
|
+
return unescape(encodeURIComponent(n)).length;
|
17
|
+
}
|
18
|
+
function h(n, r, e) {
|
19
|
+
const t = [];
|
20
|
+
let s;
|
21
|
+
for (; (s = n.exec(e)) !== null; )
|
22
|
+
t.push({
|
23
|
+
data: s[0],
|
24
|
+
index: s.index,
|
25
|
+
mode: r,
|
26
|
+
length: s[0].length
|
27
|
+
});
|
28
|
+
return t;
|
29
|
+
}
|
30
|
+
function M(n) {
|
31
|
+
const r = h(c.NUMERIC, o.NUMERIC, n), e = h(c.ALPHANUMERIC, o.ALPHANUMERIC, n);
|
32
|
+
let t, s;
|
33
|
+
return p.isKanjiModeEnabled() ? (t = h(c.BYTE, o.BYTE, n), s = h(c.KANJI, o.KANJI, n)) : (t = h(c.BYTE_KANJI, o.BYTE, n), s = []), r.concat(e, t, s).sort(function(i, l) {
|
34
|
+
return i.index - l.index;
|
35
|
+
}).map(function(i) {
|
36
|
+
return {
|
37
|
+
data: i.data,
|
38
|
+
mode: i.mode,
|
39
|
+
length: i.length
|
40
|
+
};
|
41
|
+
});
|
42
|
+
}
|
43
|
+
function E(n, r) {
|
44
|
+
switch (r) {
|
45
|
+
case o.NUMERIC:
|
46
|
+
return N.getBitsLength(n);
|
47
|
+
case o.ALPHANUMERIC:
|
48
|
+
return I.getBitsLength(n);
|
49
|
+
case o.KANJI:
|
50
|
+
return C.getBitsLength(n);
|
51
|
+
case o.BYTE:
|
52
|
+
return B.getBitsLength(n);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
function R(n) {
|
56
|
+
return n.reduce(function(r, e) {
|
57
|
+
const t = r.length - 1 >= 0 ? r[r.length - 1] : null;
|
58
|
+
return t && t.mode === e.mode ? (r[r.length - 1].data += e.data, r) : (r.push(e), r);
|
59
|
+
}, []);
|
60
|
+
}
|
61
|
+
function T(n) {
|
62
|
+
const r = [];
|
63
|
+
for (let e = 0; e < n.length; e++) {
|
64
|
+
const t = n[e];
|
65
|
+
switch (t.mode) {
|
66
|
+
case o.NUMERIC:
|
67
|
+
r.push([
|
68
|
+
t,
|
69
|
+
{ data: t.data, mode: o.ALPHANUMERIC, length: t.length },
|
70
|
+
{ data: t.data, mode: o.BYTE, length: t.length }
|
71
|
+
]);
|
72
|
+
break;
|
73
|
+
case o.ALPHANUMERIC:
|
74
|
+
r.push([
|
75
|
+
t,
|
76
|
+
{ data: t.data, mode: o.BYTE, length: t.length }
|
77
|
+
]);
|
78
|
+
break;
|
79
|
+
case o.KANJI:
|
80
|
+
r.push([
|
81
|
+
t,
|
82
|
+
{ data: t.data, mode: o.BYTE, length: b(t.data) }
|
83
|
+
]);
|
84
|
+
break;
|
85
|
+
case o.BYTE:
|
86
|
+
r.push([
|
87
|
+
{ data: t.data, mode: o.BYTE, length: b(t.data) }
|
88
|
+
]);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return r;
|
92
|
+
}
|
93
|
+
function U(n, r) {
|
94
|
+
const e = {}, t = { start: {} };
|
95
|
+
let s = ["start"];
|
96
|
+
for (let a = 0; a < n.length; a++) {
|
97
|
+
const i = n[a], l = [];
|
98
|
+
for (let m = 0; m < i.length; m++) {
|
99
|
+
const d = i[m], f = "" + a + m;
|
100
|
+
l.push(f), e[f] = { node: d, lastCount: 0 }, t[f] = {};
|
101
|
+
for (let A = 0; A < s.length; A++) {
|
102
|
+
const u = s[A];
|
103
|
+
e[u] && e[u].node.mode === d.mode ? (t[u][f] = E(e[u].lastCount + d.length, d.mode) - E(e[u].lastCount, d.mode), e[u].lastCount += d.length) : (e[u] && (e[u].lastCount = d.length), t[u][f] = E(d.length, d.mode) + 4 + o.getCharCountIndicator(d.mode, r));
|
104
|
+
}
|
105
|
+
}
|
106
|
+
s = l;
|
107
|
+
}
|
108
|
+
for (let a = 0; a < s.length; a++)
|
109
|
+
t[s[a]].end = 0;
|
110
|
+
return { map: t, table: e };
|
111
|
+
}
|
112
|
+
function S(n, r) {
|
113
|
+
let e;
|
114
|
+
const t = o.getBestModeForData(n);
|
115
|
+
if (e = o.from(r, t), e !== o.BYTE && e.bit < t.bit)
|
116
|
+
throw new Error('"' + n + '" cannot be encoded with mode ' + o.toString(e) + `.
|
117
|
+
Suggested mode is: ` + o.toString(t));
|
118
|
+
switch (e === o.KANJI && !p.isKanjiModeEnabled() && (e = o.BYTE), e) {
|
119
|
+
case o.NUMERIC:
|
120
|
+
return new N(n);
|
121
|
+
case o.ALPHANUMERIC:
|
122
|
+
return new I(n);
|
123
|
+
case o.KANJI:
|
124
|
+
return new C(n);
|
125
|
+
case o.BYTE:
|
126
|
+
return new B(n);
|
127
|
+
}
|
128
|
+
}
|
129
|
+
g.fromArray = function(r) {
|
130
|
+
return r.reduce(function(e, t) {
|
131
|
+
return typeof t == "string" ? e.push(S(t, null)) : t.data && e.push(S(t.data, t.mode)), e;
|
132
|
+
}, []);
|
133
|
+
}, g.fromString = function(r, e) {
|
134
|
+
const t = M(r, p.isKanjiModeEnabled()), s = T(t), a = U(s, e), i = w.find_path(a.map, "start", "end"), l = [];
|
135
|
+
for (let m = 1; m < i.length - 1; m++)
|
136
|
+
l.push(a.table[i[m]].node);
|
137
|
+
return g.fromArray(R(l));
|
138
|
+
}, g.rawSplit = function(r) {
|
139
|
+
return g.fromArray(
|
140
|
+
M(r, p.isKanjiModeEnabled())
|
141
|
+
);
|
142
|
+
};
|
143
|
+
})(Y);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/utils.cjs");let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];o.__exports.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};o.__exports.getSymbolTotalCodewords=function(t){return r[t]};o.__exports.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};o.__exports.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');n=t};o.__exports.isKanjiModeEnabled=function(){return typeof n<"u"};o.__exports.toSJIS=function(t){return n(t)};exports.default=o.__exports;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { __exports as n } from "../../../../_virtual/utils.js";
|
2
|
+
let e;
|
3
|
+
const r = [
|
4
|
+
0,
|
5
|
+
// Not used
|
6
|
+
26,
|
7
|
+
44,
|
8
|
+
70,
|
9
|
+
100,
|
10
|
+
134,
|
11
|
+
172,
|
12
|
+
196,
|
13
|
+
242,
|
14
|
+
292,
|
15
|
+
346,
|
16
|
+
404,
|
17
|
+
466,
|
18
|
+
532,
|
19
|
+
581,
|
20
|
+
655,
|
21
|
+
733,
|
22
|
+
815,
|
23
|
+
901,
|
24
|
+
991,
|
25
|
+
1085,
|
26
|
+
1156,
|
27
|
+
1258,
|
28
|
+
1364,
|
29
|
+
1474,
|
30
|
+
1588,
|
31
|
+
1706,
|
32
|
+
1828,
|
33
|
+
1921,
|
34
|
+
2051,
|
35
|
+
2185,
|
36
|
+
2323,
|
37
|
+
2465,
|
38
|
+
2611,
|
39
|
+
2761,
|
40
|
+
2876,
|
41
|
+
3034,
|
42
|
+
3196,
|
43
|
+
3362,
|
44
|
+
3532,
|
45
|
+
3706
|
46
|
+
];
|
47
|
+
n.getSymbolSize = function(o) {
|
48
|
+
if (!o) throw new Error('"version" cannot be null or undefined');
|
49
|
+
if (o < 1 || o > 40) throw new Error('"version" should be in range from 1 to 40');
|
50
|
+
return o * 4 + 17;
|
51
|
+
};
|
52
|
+
n.getSymbolTotalCodewords = function(o) {
|
53
|
+
return r[o];
|
54
|
+
};
|
55
|
+
n.getBCHDigit = function(t) {
|
56
|
+
let o = 0;
|
57
|
+
for (; t !== 0; )
|
58
|
+
o++, t >>>= 1;
|
59
|
+
return o;
|
60
|
+
};
|
61
|
+
n.setToSJISFunction = function(o) {
|
62
|
+
if (typeof o != "function")
|
63
|
+
throw new Error('"toSJISFunc" is not a valid function.');
|
64
|
+
e = o;
|
65
|
+
};
|
66
|
+
n.isKanjiModeEnabled = function() {
|
67
|
+
return typeof e < "u";
|
68
|
+
};
|
69
|
+
n.toSJIS = function(o) {
|
70
|
+
return e(o);
|
71
|
+
};
|
72
|
+
export {
|
73
|
+
n as default
|
74
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/version-check.cjs");t.__exports.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};exports.default=t.__exports;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const w=require("../../../../_virtual/version.cjs");require("./utils.cjs");require("./error-correction-code.cjs");require("./error-correction-level.cjs");require("./mode.cjs");require("./version-check.cjs");const M=require("../../../../_virtual/utils.cjs"),D=require("../../../../_virtual/error-correction-code.cjs"),V=require("../../../../_virtual/error-correction-level.cjs"),y=require("../../../../_virtual/mode.cjs"),I=require("../../../../_virtual/version-check.cjs");(function(i){const c=M.__exports,h=D.__exports,f=V.__exports,n=y.__exports,a=I.__exports,l=7973,g=c.getBCHDigit(l);function B(o,e,t){for(let r=1;r<=40;r++)if(e<=i.getCapacity(r,t,o))return r}function d(o,e){return n.getCharCountIndicator(o,e)+4}function E(o,e){let t=0;return o.forEach(function(r){const s=d(r.mode,e);t+=s+r.getBitsLength()}),t}function _(o,e){for(let t=1;t<=40;t++)if(E(o,t)<=i.getCapacity(t,e,n.MIXED))return t}i.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},i.getCapacity=function(e,t,r){if(!a.isValid(e))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=n.BYTE);const s=c.getSymbolTotalCodewords(e),q=h.getTotalCodewordsCount(e,t),C=(s-q)*8;if(r===n.MIXED)return C;const u=C-d(r,e);switch(r){case n.NUMERIC:return Math.floor(u/10*3);case n.ALPHANUMERIC:return Math.floor(u/11*2);case n.KANJI:return Math.floor(u/13);case n.BYTE:default:return Math.floor(u/8)}},i.getBestVersionForData=function(e,t){let r;const s=f.from(t,f.M);if(Array.isArray(e)){if(e.length>1)return _(e,s);if(e.length===0)return 1;r=e[0]}else r=e;return B(r.mode,r.getLength(),s)},i.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;c.getBCHDigit(t)-g>=0;)t^=l<<c.getBCHDigit(t)-g;return e<<12|t}})(w.__exports);
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { __exports as _ } from "../../../../_virtual/version.js";
|
2
|
+
import "./utils.js";
|
3
|
+
import "./error-correction-code.js";
|
4
|
+
import "./error-correction-level.js";
|
5
|
+
import "./mode.js";
|
6
|
+
import "./version-check.js";
|
7
|
+
import { __exports as w } from "../../../../_virtual/utils.js";
|
8
|
+
import { __exports as M } from "../../../../_virtual/error-correction-code.js";
|
9
|
+
import { __exports as D } from "../../../../_virtual/error-correction-level.js";
|
10
|
+
import { __exports as V } from "../../../../_virtual/mode.js";
|
11
|
+
import { __exports as y } from "../../../../_virtual/version-check.js";
|
12
|
+
(function(i) {
|
13
|
+
const c = w, m = M, u = D, n = V, f = y, l = 7973, g = c.getBCHDigit(l);
|
14
|
+
function h(o, t, r) {
|
15
|
+
for (let e = 1; e <= 40; e++)
|
16
|
+
if (t <= i.getCapacity(e, r, o))
|
17
|
+
return e;
|
18
|
+
}
|
19
|
+
function d(o, t) {
|
20
|
+
return n.getCharCountIndicator(o, t) + 4;
|
21
|
+
}
|
22
|
+
function B(o, t) {
|
23
|
+
let r = 0;
|
24
|
+
return o.forEach(function(e) {
|
25
|
+
const s = d(e.mode, t);
|
26
|
+
r += s + e.getBitsLength();
|
27
|
+
}), r;
|
28
|
+
}
|
29
|
+
function p(o, t) {
|
30
|
+
for (let r = 1; r <= 40; r++)
|
31
|
+
if (B(o, r) <= i.getCapacity(r, t, n.MIXED))
|
32
|
+
return r;
|
33
|
+
}
|
34
|
+
i.from = function(t, r) {
|
35
|
+
return f.isValid(t) ? parseInt(t, 10) : r;
|
36
|
+
}, i.getCapacity = function(t, r, e) {
|
37
|
+
if (!f.isValid(t))
|
38
|
+
throw new Error("Invalid QR Code version");
|
39
|
+
typeof e > "u" && (e = n.BYTE);
|
40
|
+
const s = c.getSymbolTotalCodewords(t), E = m.getTotalCodewordsCount(t, r), C = (s - E) * 8;
|
41
|
+
if (e === n.MIXED) return C;
|
42
|
+
const a = C - d(e, t);
|
43
|
+
switch (e) {
|
44
|
+
case n.NUMERIC:
|
45
|
+
return Math.floor(a / 10 * 3);
|
46
|
+
case n.ALPHANUMERIC:
|
47
|
+
return Math.floor(a / 11 * 2);
|
48
|
+
case n.KANJI:
|
49
|
+
return Math.floor(a / 13);
|
50
|
+
case n.BYTE:
|
51
|
+
default:
|
52
|
+
return Math.floor(a / 8);
|
53
|
+
}
|
54
|
+
}, i.getBestVersionForData = function(t, r) {
|
55
|
+
let e;
|
56
|
+
const s = u.from(r, u.M);
|
57
|
+
if (Array.isArray(t)) {
|
58
|
+
if (t.length > 1)
|
59
|
+
return p(t, s);
|
60
|
+
if (t.length === 0)
|
61
|
+
return 1;
|
62
|
+
e = t[0];
|
63
|
+
} else
|
64
|
+
e = t;
|
65
|
+
return h(e.mode, e.getLength(), s);
|
66
|
+
}, i.getEncodedBits = function(t) {
|
67
|
+
if (!f.isValid(t) || t < 7)
|
68
|
+
throw new Error("Invalid QR Code version");
|
69
|
+
let r = t << 12;
|
70
|
+
for (; c.getBCHDigit(r) - g >= 0; )
|
71
|
+
r ^= l << c.getBCHDigit(r) - g;
|
72
|
+
return t << 12 | r;
|
73
|
+
};
|
74
|
+
})(_);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const s=require("../../../../_virtual/canvas.cjs");require("./utils.cjs");const h=require("../../../../_virtual/utils2.cjs");(function(u){const l=h.__exports;function c(d,n,e){d.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=e,n.width=e,n.style.height=e+"px",n.style.width=e+"px"}function p(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}u.render=function(n,e,f){let t=f,r=e;typeof t>"u"&&(!e||!e.getContext)&&(t=e,e=void 0),e||(r=p()),t=l.getOptions(t);const o=l.getImageWidth(n.modules.size,t),i=r.getContext("2d"),g=i.createImageData(o,o);return l.qrToImageData(g.data,n,t),c(i,r,o),i.putImageData(g,0,0),r},u.renderToDataURL=function(n,e,f){let t=f;typeof t>"u"&&(!e||!e.getContext)&&(t=e,e=void 0),t||(t={});const r=u.render(n,e,t),o=t.type||"image/png",i=t.rendererOpts||{};return r.toDataURL(o,i.quality)}})(s.__exports);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { __exports as h } from "../../../../_virtual/canvas.js";
|
2
|
+
import "./utils.js";
|
3
|
+
import { __exports as s } from "../../../../_virtual/utils2.js";
|
4
|
+
(function(f) {
|
5
|
+
const l = s;
|
6
|
+
function g(d, n, e) {
|
7
|
+
d.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = e, n.width = e, n.style.height = e + "px", n.style.width = e + "px";
|
8
|
+
}
|
9
|
+
function m() {
|
10
|
+
try {
|
11
|
+
return document.createElement("canvas");
|
12
|
+
} catch {
|
13
|
+
throw new Error("You need to specify a canvas element");
|
14
|
+
}
|
15
|
+
}
|
16
|
+
f.render = function(n, e, u) {
|
17
|
+
let t = u, r = e;
|
18
|
+
typeof t > "u" && (!e || !e.getContext) && (t = e, e = void 0), e || (r = m()), t = l.getOptions(t);
|
19
|
+
const o = l.getImageWidth(n.modules.size, t), i = r.getContext("2d"), p = i.createImageData(o, o);
|
20
|
+
return l.qrToImageData(p.data, n, t), g(i, r, o), i.putImageData(p, 0, 0), r;
|
21
|
+
}, f.renderToDataURL = function(n, e, u) {
|
22
|
+
let t = u;
|
23
|
+
typeof t > "u" && (!e || !e.getContext) && (t = e, e = void 0), t || (t = {});
|
24
|
+
const r = f.render(n, e, t), o = t.type || "image/png", i = t.rendererOpts || {};
|
25
|
+
return r.toDataURL(o, i.quality);
|
26
|
+
};
|
27
|
+
})(h);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("../../../../_virtual/svg-tag.cjs");require("./utils.cjs");const p=require("../../../../_virtual/utils2.cjs"),w=p.__exports;function f(s,n){const r=s.a/255,e=n+'="'+s.hex+'"';return r<1?e+" "+n+'-opacity="'+r.toFixed(2).slice(1)+'"':e}function u(s,n,r){let e=s+n;return typeof r<"u"&&(e+=" "+r),e}function v(s,n,r){let e="",o=0,i=!1,c=0;for(let t=0;t<s.length;t++){const l=Math.floor(t%n),h=Math.floor(t/n);!l&&!i&&(i=!0),s[t]?(c++,t>0&&l>0&&s[t-1]||(e+=i?u("M",l+r,.5+h+r):u("m",o,0),o=0,i=!1),l+1<n&&s[t+1]||(e+=u("h",c),c=0)):o++}return e}g.__exports.render=function(n,r,e){const o=w.getOptions(r),i=n.modules.size,c=n.modules.data,t=i+o.margin*2,l=o.color.light.a?"<path "+f(o.color.light,"fill")+' d="M0 0h'+t+"v"+t+'H0z"/>':"",h="<path "+f(o.color.dark,"stroke")+' d="'+v(c,i,o.margin)+'"/>',a='viewBox="0 0 '+t+" "+t+'"',d='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+a+' shape-rendering="crispEdges">'+l+h+`</svg>
|
2
|
+
`;return typeof e=="function"&&e(null,d),d};exports.default=g.__exports;
|