@ozdao/prometheus-framework 0.2.71 → 0.2.74
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +8 -21
- package/dist/auth.server.mjs +8 -21
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +306 -48
- package/dist/events.server.mjs +306 -48
- package/dist/files.server.js +9 -9
- package/dist/files.server.mjs +9 -9
- package/dist/gallery.server.js +2 -2
- package/dist/gallery.server.mjs +2 -2
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/mailing-BX0q8DIs.js +77 -0
- package/dist/mailing-Cdp8NXhP.mjs +78 -0
- package/dist/main-C0wbYN41.mjs +13744 -0
- package/dist/main-vACUb_p5.js +91 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -0
- package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +3174 -0
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/ownership.schema-BQmRnCsc.mjs +184 -0
- package/dist/ownership.schema-D13NqEgo.js +183 -0
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -225
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +225 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +53 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +56 -57
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +1 -4
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -46
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- 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 +3 -3
- 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 +3 -3
- 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 +19 -20
- 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 +3 -3
- 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 +3 -3
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +3 -3
- 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 +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 +2 -2
- 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 +3 -3
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +81 -0
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue2.js +1 -0
- 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 +3 -3
- 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 +127 -83
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +8 -5
- package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/tickets.js +24 -24
- 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 +2 -2
- 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 +2 -2
- 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/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.js +21 -14
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +205 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue2.js +1 -0
- 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 +157 -72
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +65 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +79 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +34 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +27 -22
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- 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/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/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.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 +4 -4
- 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 +2 -2
- 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 +3 -3
- 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 +1 -1
- 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 +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 +1 -1
- 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 +2 -2
- 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 +3 -3
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +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 +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- 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 +1 -1
- 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 +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 +24 -20
- 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 +1 -1
- 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 +3 -3
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/users/components/sections/ProfileCompletion.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/sections/ProfileCompletion.vue.js +39 -27
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Payments.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Payments.vue.js +57 -0
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Payments.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Payments.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/users.server.js +5 -5
- package/dist/users.server.mjs +5 -5
- package/dist/web-BJSg7vH_.js +1 -0
- package/dist/web-DOXRo6XB.mjs +54 -0
- package/package.json +1 -1
- package/src/modules/events/components/pages/EditEventTickets.vue +11 -6
- package/src/modules/users/users.server.js +0 -1
@@ -0,0 +1,3174 @@
|
|
1
|
+
import { defineComponent as so, ref as we, watch as We, onMounted as co, onUnmounted as uo, computed as Rt, openBlock as lo, createElementBlock as fo, createElementVNode as nt, normalizeStyle as ho, withDirectives as po, vShow as vo, renderSlot as mo } from "vue";
|
2
|
+
var $r = (r, i, a) => {
|
3
|
+
if (!i.has(r))
|
4
|
+
throw TypeError("Cannot " + a);
|
5
|
+
}, pr = (r, i, a) => ($r(r, i, "read from private field"), a ? a.call(r) : i.get(r)), yo = (r, i, a) => {
|
6
|
+
if (i.has(r))
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
8
|
+
i instanceof WeakSet ? i.add(r) : i.set(r, a);
|
9
|
+
}, go = (r, i, a, c) => ($r(r, i, "write to private field"), c ? c.call(r, a) : i.set(r, a), a);
|
10
|
+
const Sr = [
|
11
|
+
["aztec", "Aztec"],
|
12
|
+
["code_128", "Code128"],
|
13
|
+
["code_39", "Code39"],
|
14
|
+
["code_93", "Code93"],
|
15
|
+
["codabar", "Codabar"],
|
16
|
+
["databar", "DataBar"],
|
17
|
+
["databar_expanded", "DataBarExpanded"],
|
18
|
+
["data_matrix", "DataMatrix"],
|
19
|
+
["dx_film_edge", "DXFilmEdge"],
|
20
|
+
["ean_13", "EAN-13"],
|
21
|
+
["ean_8", "EAN-8"],
|
22
|
+
["itf", "ITF"],
|
23
|
+
["maxi_code", "MaxiCode"],
|
24
|
+
["micro_qr_code", "MicroQRCode"],
|
25
|
+
["pdf417", "PDF417"],
|
26
|
+
["qr_code", "QRCode"],
|
27
|
+
["rm_qr_code", "rMQRCode"],
|
28
|
+
["upc_a", "UPC-A"],
|
29
|
+
["upc_e", "UPC-E"],
|
30
|
+
["linear_codes", "Linear-Codes"],
|
31
|
+
["matrix_codes", "Matrix-Codes"]
|
32
|
+
], wo = [...Sr, ["unknown"]].map((r) => r[0]), ot = new Map(
|
33
|
+
Sr
|
34
|
+
);
|
35
|
+
function bo(r) {
|
36
|
+
for (const [i, a] of ot)
|
37
|
+
if (r === a)
|
38
|
+
return i;
|
39
|
+
return "unknown";
|
40
|
+
}
|
41
|
+
function Co(r) {
|
42
|
+
if (Pr(r))
|
43
|
+
return {
|
44
|
+
width: r.naturalWidth,
|
45
|
+
height: r.naturalHeight
|
46
|
+
};
|
47
|
+
if (_r(r))
|
48
|
+
return {
|
49
|
+
width: r.width.baseVal.value,
|
50
|
+
height: r.height.baseVal.value
|
51
|
+
};
|
52
|
+
if (Er(r))
|
53
|
+
return {
|
54
|
+
width: r.videoWidth,
|
55
|
+
height: r.videoHeight
|
56
|
+
};
|
57
|
+
if (Mr(r))
|
58
|
+
return {
|
59
|
+
width: r.width,
|
60
|
+
height: r.height
|
61
|
+
};
|
62
|
+
if (xr(r))
|
63
|
+
return {
|
64
|
+
width: r.displayWidth,
|
65
|
+
height: r.displayHeight
|
66
|
+
};
|
67
|
+
if (Or(r))
|
68
|
+
return {
|
69
|
+
width: r.width,
|
70
|
+
height: r.height
|
71
|
+
};
|
72
|
+
if (Ar(r))
|
73
|
+
return {
|
74
|
+
width: r.width,
|
75
|
+
height: r.height
|
76
|
+
};
|
77
|
+
throw new TypeError(
|
78
|
+
"The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
|
79
|
+
);
|
80
|
+
}
|
81
|
+
function Pr(r) {
|
82
|
+
try {
|
83
|
+
return r instanceof HTMLImageElement;
|
84
|
+
} catch {
|
85
|
+
return !1;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
function _r(r) {
|
89
|
+
try {
|
90
|
+
return r instanceof SVGImageElement;
|
91
|
+
} catch {
|
92
|
+
return !1;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
function Er(r) {
|
96
|
+
try {
|
97
|
+
return r instanceof HTMLVideoElement;
|
98
|
+
} catch {
|
99
|
+
return !1;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
function Or(r) {
|
103
|
+
try {
|
104
|
+
return r instanceof HTMLCanvasElement;
|
105
|
+
} catch {
|
106
|
+
return !1;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
function Mr(r) {
|
110
|
+
try {
|
111
|
+
return r instanceof ImageBitmap;
|
112
|
+
} catch {
|
113
|
+
return !1;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
function Ar(r) {
|
117
|
+
try {
|
118
|
+
return r instanceof OffscreenCanvas;
|
119
|
+
} catch {
|
120
|
+
return !1;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
function xr(r) {
|
124
|
+
try {
|
125
|
+
return r instanceof VideoFrame;
|
126
|
+
} catch {
|
127
|
+
return !1;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
function jr(r) {
|
131
|
+
try {
|
132
|
+
return r instanceof Blob;
|
133
|
+
} catch {
|
134
|
+
return !1;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
function To(r) {
|
138
|
+
try {
|
139
|
+
return r instanceof ImageData;
|
140
|
+
} catch {
|
141
|
+
return !1;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
function $o(r, i) {
|
145
|
+
try {
|
146
|
+
const a = new OffscreenCanvas(r, i);
|
147
|
+
if (a.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
|
148
|
+
return a;
|
149
|
+
throw void 0;
|
150
|
+
} catch {
|
151
|
+
const c = document.createElement("canvas");
|
152
|
+
return c.width = r, c.height = i, c;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
async function Dr(r) {
|
156
|
+
if (Pr(r) && !await Eo(r))
|
157
|
+
throw new DOMException(
|
158
|
+
"Failed to load or decode HTMLImageElement.",
|
159
|
+
"InvalidStateError"
|
160
|
+
);
|
161
|
+
if (_r(r) && !await Oo(r))
|
162
|
+
throw new DOMException(
|
163
|
+
"Failed to load or decode SVGImageElement.",
|
164
|
+
"InvalidStateError"
|
165
|
+
);
|
166
|
+
if (xr(r) && Mo(r))
|
167
|
+
throw new DOMException("VideoFrame is closed.", "InvalidStateError");
|
168
|
+
if (Er(r) && (r.readyState === 0 || r.readyState === 1))
|
169
|
+
throw new DOMException("Invalid element or state.", "InvalidStateError");
|
170
|
+
if (Mr(r) && xo(r))
|
171
|
+
throw new DOMException(
|
172
|
+
"The image source is detached.",
|
173
|
+
"InvalidStateError"
|
174
|
+
);
|
175
|
+
const { width: i, height: a } = Co(r);
|
176
|
+
if (i === 0 || a === 0)
|
177
|
+
return null;
|
178
|
+
const c = $o(i, a).getContext("2d");
|
179
|
+
c.drawImage(r, 0, 0);
|
180
|
+
try {
|
181
|
+
return c.getImageData(0, 0, i, a);
|
182
|
+
} catch {
|
183
|
+
throw new DOMException("Source would taint origin.", "SecurityError");
|
184
|
+
}
|
185
|
+
}
|
186
|
+
async function So(r) {
|
187
|
+
let i;
|
188
|
+
try {
|
189
|
+
if (globalThis.createImageBitmap)
|
190
|
+
i = await createImageBitmap(r);
|
191
|
+
else if (globalThis.Image) {
|
192
|
+
i = new Image();
|
193
|
+
let a = "";
|
194
|
+
try {
|
195
|
+
a = URL.createObjectURL(r), i.src = a, await i.decode();
|
196
|
+
} finally {
|
197
|
+
URL.revokeObjectURL(a);
|
198
|
+
}
|
199
|
+
} else
|
200
|
+
return r;
|
201
|
+
} catch {
|
202
|
+
throw new DOMException(
|
203
|
+
"Failed to load or decode Blob.",
|
204
|
+
"InvalidStateError"
|
205
|
+
);
|
206
|
+
}
|
207
|
+
return await Dr(i);
|
208
|
+
}
|
209
|
+
function Po(r) {
|
210
|
+
const { width: i, height: a } = r;
|
211
|
+
if (i === 0 || a === 0)
|
212
|
+
return null;
|
213
|
+
const c = r.getContext("2d");
|
214
|
+
try {
|
215
|
+
return c.getImageData(0, 0, i, a);
|
216
|
+
} catch {
|
217
|
+
throw new DOMException("Source would taint origin.", "SecurityError");
|
218
|
+
}
|
219
|
+
}
|
220
|
+
async function _o(r) {
|
221
|
+
if (jr(r))
|
222
|
+
return await So(r);
|
223
|
+
if (To(r)) {
|
224
|
+
if (Ao(r))
|
225
|
+
throw new DOMException(
|
226
|
+
"The image data has been detached.",
|
227
|
+
"InvalidStateError"
|
228
|
+
);
|
229
|
+
return r;
|
230
|
+
}
|
231
|
+
return Or(r) || Ar(r) ? Po(r) : await Dr(r);
|
232
|
+
}
|
233
|
+
async function Eo(r) {
|
234
|
+
try {
|
235
|
+
return await r.decode(), !0;
|
236
|
+
} catch {
|
237
|
+
return !1;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
async function Oo(r) {
|
241
|
+
var i;
|
242
|
+
try {
|
243
|
+
return await ((i = r.decode) == null ? void 0 : i.call(r)), !0;
|
244
|
+
} catch {
|
245
|
+
return !1;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
function Mo(r) {
|
249
|
+
return r.format === null;
|
250
|
+
}
|
251
|
+
function Ao(r) {
|
252
|
+
return r.data.buffer.byteLength === 0;
|
253
|
+
}
|
254
|
+
function xo(r) {
|
255
|
+
return r.width === 0 && r.height === 0;
|
256
|
+
}
|
257
|
+
function vr(r, i) {
|
258
|
+
return r instanceof DOMException ? new DOMException(`${i}: ${r.message}`, r.name) : r instanceof Error ? new r.constructor(`${i}: ${r.message}`) : new Error(`${i}: ${r}`);
|
259
|
+
}
|
260
|
+
const mr = [
|
261
|
+
"Aztec",
|
262
|
+
"Codabar",
|
263
|
+
"Code128",
|
264
|
+
"Code39",
|
265
|
+
"Code93",
|
266
|
+
"DataBar",
|
267
|
+
"DataBarExpanded",
|
268
|
+
"DataMatrix",
|
269
|
+
"DXFilmEdge",
|
270
|
+
"EAN-13",
|
271
|
+
"EAN-8",
|
272
|
+
"ITF",
|
273
|
+
"Linear-Codes",
|
274
|
+
"Matrix-Codes",
|
275
|
+
"MaxiCode",
|
276
|
+
"MicroQRCode",
|
277
|
+
"None",
|
278
|
+
"PDF417",
|
279
|
+
"QRCode",
|
280
|
+
"rMQRCode",
|
281
|
+
"UPC-A",
|
282
|
+
"UPC-E"
|
283
|
+
];
|
284
|
+
function jo(r) {
|
285
|
+
return r.join("|");
|
286
|
+
}
|
287
|
+
function Do(r) {
|
288
|
+
const i = yr(r);
|
289
|
+
let a = 0, c = mr.length - 1;
|
290
|
+
for (; a <= c; ) {
|
291
|
+
const f = Math.floor((a + c) / 2), v = mr[f], y = yr(v);
|
292
|
+
if (y === i)
|
293
|
+
return v;
|
294
|
+
y < i ? a = f + 1 : c = f - 1;
|
295
|
+
}
|
296
|
+
return "None";
|
297
|
+
}
|
298
|
+
function yr(r) {
|
299
|
+
return r.toLowerCase().replace(/_-\[\]/g, "");
|
300
|
+
}
|
301
|
+
function Ro(r, i) {
|
302
|
+
return r.Binarizer[i];
|
303
|
+
}
|
304
|
+
function ko(r, i) {
|
305
|
+
return r.CharacterSet[i];
|
306
|
+
}
|
307
|
+
const Fo = [
|
308
|
+
"Text",
|
309
|
+
"Binary",
|
310
|
+
"Mixed",
|
311
|
+
"GS1",
|
312
|
+
"ISO15434",
|
313
|
+
"UnknownECI"
|
314
|
+
];
|
315
|
+
function Io(r) {
|
316
|
+
return Fo[r.value];
|
317
|
+
}
|
318
|
+
function Wo(r, i) {
|
319
|
+
return r.EanAddOnSymbol[i];
|
320
|
+
}
|
321
|
+
function Uo(r, i) {
|
322
|
+
return r.TextMode[i];
|
323
|
+
}
|
324
|
+
const Ee = {
|
325
|
+
formats: [],
|
326
|
+
tryHarder: !0,
|
327
|
+
tryRotate: !0,
|
328
|
+
tryInvert: !0,
|
329
|
+
tryDownscale: !0,
|
330
|
+
binarizer: "LocalAverage",
|
331
|
+
isPure: !1,
|
332
|
+
downscaleFactor: 3,
|
333
|
+
downscaleThreshold: 500,
|
334
|
+
minLineCount: 2,
|
335
|
+
maxNumberOfSymbols: 255,
|
336
|
+
tryCode39ExtendedMode: !1,
|
337
|
+
validateCode39CheckSum: !1,
|
338
|
+
validateITFCheckSum: !1,
|
339
|
+
returnCodabarStartEnd: !1,
|
340
|
+
returnErrors: !1,
|
341
|
+
eanAddOnSymbol: "Read",
|
342
|
+
textMode: "Plain",
|
343
|
+
characterSet: "Unknown"
|
344
|
+
};
|
345
|
+
function Rr(r, i) {
|
346
|
+
return {
|
347
|
+
...i,
|
348
|
+
formats: jo(i.formats),
|
349
|
+
binarizer: Ro(r, i.binarizer),
|
350
|
+
eanAddOnSymbol: Wo(
|
351
|
+
r,
|
352
|
+
i.eanAddOnSymbol
|
353
|
+
),
|
354
|
+
textMode: Uo(r, i.textMode),
|
355
|
+
characterSet: ko(
|
356
|
+
r,
|
357
|
+
i.characterSet
|
358
|
+
)
|
359
|
+
};
|
360
|
+
}
|
361
|
+
function kr(r) {
|
362
|
+
return {
|
363
|
+
...r,
|
364
|
+
format: Do(r.format),
|
365
|
+
eccLevel: r.eccLevel,
|
366
|
+
contentType: Io(r.contentType)
|
367
|
+
};
|
368
|
+
}
|
369
|
+
const Lo = {
|
370
|
+
locateFile: (r, i) => {
|
371
|
+
const a = r.match(/_(.+?)\.wasm$/);
|
372
|
+
return a ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}` : i + r;
|
373
|
+
}
|
374
|
+
};
|
375
|
+
let gr = /* @__PURE__ */ new WeakMap();
|
376
|
+
function Ft(r, i) {
|
377
|
+
var a;
|
378
|
+
const c = gr.get(r);
|
379
|
+
if (c != null && c.modulePromise && (i === void 0 || Object.is(i, c.moduleOverrides)))
|
380
|
+
return c.modulePromise;
|
381
|
+
const f = (a = i ?? (c == null ? void 0 : c.moduleOverrides)) != null ? a : Lo, v = r({
|
382
|
+
...f
|
383
|
+
});
|
384
|
+
return gr.set(r, {
|
385
|
+
moduleOverrides: f,
|
386
|
+
modulePromise: v
|
387
|
+
}), v;
|
388
|
+
}
|
389
|
+
async function Ho(r, i, a = Ee) {
|
390
|
+
const c = {
|
391
|
+
...Ee,
|
392
|
+
...a
|
393
|
+
}, f = await Ft(r), { size: v } = i, y = new Uint8Array(await i.arrayBuffer()), S = f._malloc(v);
|
394
|
+
f.HEAPU8.set(y, S);
|
395
|
+
const h = f.readBarcodesFromImage(
|
396
|
+
S,
|
397
|
+
v,
|
398
|
+
Rr(f, c)
|
399
|
+
);
|
400
|
+
f._free(S);
|
401
|
+
const w = [];
|
402
|
+
for (let T = 0; T < h.size(); ++T)
|
403
|
+
w.push(
|
404
|
+
kr(h.get(T))
|
405
|
+
);
|
406
|
+
return w;
|
407
|
+
}
|
408
|
+
async function No(r, i, a = Ee) {
|
409
|
+
const c = {
|
410
|
+
...Ee,
|
411
|
+
...a
|
412
|
+
}, f = await Ft(r), {
|
413
|
+
data: v,
|
414
|
+
width: y,
|
415
|
+
height: S,
|
416
|
+
data: { byteLength: h }
|
417
|
+
} = i, w = f._malloc(h);
|
418
|
+
f.HEAPU8.set(v, w);
|
419
|
+
const T = f.readBarcodesFromPixmap(
|
420
|
+
w,
|
421
|
+
y,
|
422
|
+
S,
|
423
|
+
Rr(f, c)
|
424
|
+
);
|
425
|
+
f._free(w);
|
426
|
+
const b = [];
|
427
|
+
for (let j = 0; j < T.size(); ++j)
|
428
|
+
b.push(
|
429
|
+
kr(T.get(j))
|
430
|
+
);
|
431
|
+
return b;
|
432
|
+
}
|
433
|
+
({
|
434
|
+
...Ee,
|
435
|
+
formats: [...Ee.formats]
|
436
|
+
});
|
437
|
+
var It = (() => {
|
438
|
+
var r = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
439
|
+
return function(i = {}) {
|
440
|
+
var a = i, c, f;
|
441
|
+
a.ready = new Promise((e, t) => {
|
442
|
+
c = e, f = t;
|
443
|
+
});
|
444
|
+
var v = Object.assign({}, a), y = "./this.program", S = typeof window == "object", h = typeof importScripts == "function";
|
445
|
+
typeof process == "object" && typeof process.versions == "object" && process.versions.node;
|
446
|
+
var w = "";
|
447
|
+
function T(e) {
|
448
|
+
return a.locateFile ? a.locateFile(e, w) : w + e;
|
449
|
+
}
|
450
|
+
var b;
|
451
|
+
(S || h) && (h ? w = self.location.href : typeof document < "u" && document.currentScript && (w = document.currentScript.src), r && (w = r), w.indexOf("blob:") !== 0 ? w = w.substr(0, w.replace(/[?#].*/, "").lastIndexOf("/") + 1) : w = "", h && (b = (e) => {
|
452
|
+
var t = new XMLHttpRequest();
|
453
|
+
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
|
454
|
+
})), a.print || console.log.bind(console);
|
455
|
+
var j = a.printErr || console.error.bind(console);
|
456
|
+
Object.assign(a, v), v = null, a.arguments && a.arguments, a.thisProgram && (y = a.thisProgram), a.quit && a.quit;
|
457
|
+
var D;
|
458
|
+
a.wasmBinary && (D = a.wasmBinary), typeof WebAssembly != "object" && X("no native wasm support detected");
|
459
|
+
var x, F = !1, I, z, ue, R, O, M, le, ae;
|
460
|
+
function be() {
|
461
|
+
var e = x.buffer;
|
462
|
+
a.HEAP8 = I = new Int8Array(e), a.HEAP16 = ue = new Int16Array(e), a.HEAPU8 = z = new Uint8Array(e), a.HEAPU16 = R = new Uint16Array(e), a.HEAP32 = O = new Int32Array(e), a.HEAPU32 = M = new Uint32Array(e), a.HEAPF32 = le = new Float32Array(e), a.HEAPF64 = ae = new Float64Array(e);
|
463
|
+
}
|
464
|
+
var Ce = [], Oe = [], Me = [];
|
465
|
+
function Le() {
|
466
|
+
if (a.preRun)
|
467
|
+
for (typeof a.preRun == "function" && (a.preRun = [a.preRun]); a.preRun.length; )
|
468
|
+
lt(a.preRun.shift());
|
469
|
+
vt(Ce);
|
470
|
+
}
|
471
|
+
function ct() {
|
472
|
+
vt(Oe);
|
473
|
+
}
|
474
|
+
function ut() {
|
475
|
+
if (a.postRun)
|
476
|
+
for (typeof a.postRun == "function" && (a.postRun = [a.postRun]); a.postRun.length; )
|
477
|
+
Ae(a.postRun.shift());
|
478
|
+
vt(Me);
|
479
|
+
}
|
480
|
+
function lt(e) {
|
481
|
+
Ce.unshift(e);
|
482
|
+
}
|
483
|
+
function dt(e) {
|
484
|
+
Oe.unshift(e);
|
485
|
+
}
|
486
|
+
function Ae(e) {
|
487
|
+
Me.unshift(e);
|
488
|
+
}
|
489
|
+
var ee = 0, me = null;
|
490
|
+
function ft(e) {
|
491
|
+
var t;
|
492
|
+
ee++, (t = a.monitorRunDependencies) === null || t === void 0 || t.call(a, ee);
|
493
|
+
}
|
494
|
+
function de(e) {
|
495
|
+
var t;
|
496
|
+
if (ee--, (t = a.monitorRunDependencies) === null || t === void 0 || t.call(a, ee), ee == 0 && me) {
|
497
|
+
var n = me;
|
498
|
+
me = null, n();
|
499
|
+
}
|
500
|
+
}
|
501
|
+
function X(e) {
|
502
|
+
var t;
|
503
|
+
(t = a.onAbort) === null || t === void 0 || t.call(a, e), e = "Aborted(" + e + ")", j(e), F = !0, e += ". Build with -sASSERTIONS for more info.";
|
504
|
+
var n = new WebAssembly.RuntimeError(e);
|
505
|
+
throw f(n), n;
|
506
|
+
}
|
507
|
+
var ht = "data:application/octet-stream;base64,", He = (e) => e.startsWith(ht), fe;
|
508
|
+
fe = "zxing_reader.wasm", He(fe) || (fe = T(fe));
|
509
|
+
function Ne(e) {
|
510
|
+
if (e == fe && D)
|
511
|
+
return new Uint8Array(D);
|
512
|
+
if (b)
|
513
|
+
return b(e);
|
514
|
+
throw "both async and sync fetching of the wasm failed";
|
515
|
+
}
|
516
|
+
function pt(e) {
|
517
|
+
return !D && (S || h) && typeof fetch == "function" ? fetch(e, {
|
518
|
+
credentials: "same-origin"
|
519
|
+
}).then((t) => {
|
520
|
+
if (!t.ok)
|
521
|
+
throw "failed to load wasm binary file at '" + e + "'";
|
522
|
+
return t.arrayBuffer();
|
523
|
+
}).catch(() => Ne(e)) : Promise.resolve().then(() => Ne(e));
|
524
|
+
}
|
525
|
+
function Ve(e, t, n) {
|
526
|
+
return pt(e).then((o) => WebAssembly.instantiate(o, t)).then((o) => o).then(n, (o) => {
|
527
|
+
j(`failed to asynchronously prepare wasm: ${o}`), X(o);
|
528
|
+
});
|
529
|
+
}
|
530
|
+
function Qr(e, t, n, o) {
|
531
|
+
return !e && typeof WebAssembly.instantiateStreaming == "function" && !He(t) && typeof fetch == "function" ? fetch(t, {
|
532
|
+
credentials: "same-origin"
|
533
|
+
}).then((s) => {
|
534
|
+
var u = WebAssembly.instantiateStreaming(s, n);
|
535
|
+
return u.then(o, function(l) {
|
536
|
+
return j(`wasm streaming compile failed: ${l}`), j("falling back to ArrayBuffer instantiation"), Ve(t, n, o);
|
537
|
+
});
|
538
|
+
}) : Ve(t, n, o);
|
539
|
+
}
|
540
|
+
function Xr() {
|
541
|
+
var e = {
|
542
|
+
a: Ua
|
543
|
+
};
|
544
|
+
function t(o, s) {
|
545
|
+
return G = o.exports, x = G.ia, be(), Jt = G.ma, dt(G.ja), de(), G;
|
546
|
+
}
|
547
|
+
ft();
|
548
|
+
function n(o) {
|
549
|
+
t(o.instance);
|
550
|
+
}
|
551
|
+
if (a.instantiateWasm)
|
552
|
+
try {
|
553
|
+
return a.instantiateWasm(e, t);
|
554
|
+
} catch (o) {
|
555
|
+
j(`Module.instantiateWasm callback failed with error: ${o}`), f(o);
|
556
|
+
}
|
557
|
+
return Qr(D, fe, e, n).catch(f), {};
|
558
|
+
}
|
559
|
+
var vt = (e) => {
|
560
|
+
for (; e.length > 0; )
|
561
|
+
e.shift()(a);
|
562
|
+
};
|
563
|
+
a.noExitRuntime;
|
564
|
+
var Be = [], ze = 0, Kr = (e) => {
|
565
|
+
var t = new mt(e);
|
566
|
+
return t.get_caught() || (t.set_caught(!0), ze--), t.set_rethrown(!1), Be.push(t), sr(t.excPtr), t.get_exception_ptr();
|
567
|
+
}, oe = 0, Zr = () => {
|
568
|
+
W(0, 0);
|
569
|
+
var e = Be.pop();
|
570
|
+
ir(e.excPtr), oe = 0;
|
571
|
+
};
|
572
|
+
function mt(e) {
|
573
|
+
this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) {
|
574
|
+
M[this.ptr + 4 >> 2] = t;
|
575
|
+
}, this.get_type = function() {
|
576
|
+
return M[this.ptr + 4 >> 2];
|
577
|
+
}, this.set_destructor = function(t) {
|
578
|
+
M[this.ptr + 8 >> 2] = t;
|
579
|
+
}, this.get_destructor = function() {
|
580
|
+
return M[this.ptr + 8 >> 2];
|
581
|
+
}, this.set_caught = function(t) {
|
582
|
+
t = t ? 1 : 0, I[this.ptr + 12 >> 0] = t;
|
583
|
+
}, this.get_caught = function() {
|
584
|
+
return I[this.ptr + 12 >> 0] != 0;
|
585
|
+
}, this.set_rethrown = function(t) {
|
586
|
+
t = t ? 1 : 0, I[this.ptr + 13 >> 0] = t;
|
587
|
+
}, this.get_rethrown = function() {
|
588
|
+
return I[this.ptr + 13 >> 0] != 0;
|
589
|
+
}, this.init = function(t, n) {
|
590
|
+
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(n);
|
591
|
+
}, this.set_adjusted_ptr = function(t) {
|
592
|
+
M[this.ptr + 16 >> 2] = t;
|
593
|
+
}, this.get_adjusted_ptr = function() {
|
594
|
+
return M[this.ptr + 16 >> 2];
|
595
|
+
}, this.get_exception_ptr = function() {
|
596
|
+
var t = ur(this.get_type());
|
597
|
+
if (t)
|
598
|
+
return M[this.excPtr >> 2];
|
599
|
+
var n = this.get_adjusted_ptr();
|
600
|
+
return n !== 0 ? n : this.excPtr;
|
601
|
+
};
|
602
|
+
}
|
603
|
+
var en = (e) => {
|
604
|
+
throw oe || (oe = e), oe;
|
605
|
+
}, yt = (e) => {
|
606
|
+
var t = oe;
|
607
|
+
if (!t)
|
608
|
+
return Ie(0), 0;
|
609
|
+
var n = new mt(t);
|
610
|
+
n.set_adjusted_ptr(t);
|
611
|
+
var o = n.get_type();
|
612
|
+
if (!o)
|
613
|
+
return Ie(0), t;
|
614
|
+
for (var s in e) {
|
615
|
+
var u = e[s];
|
616
|
+
if (u === 0 || u === o)
|
617
|
+
break;
|
618
|
+
var l = n.ptr + 16;
|
619
|
+
if (cr(u, o, l))
|
620
|
+
return Ie(u), t;
|
621
|
+
}
|
622
|
+
return Ie(o), t;
|
623
|
+
}, tn = () => yt([]), rn = (e) => yt([e]), nn = (e, t) => yt([e, t]), an = () => {
|
624
|
+
var e = Be.pop();
|
625
|
+
e || X("no exception to throw");
|
626
|
+
var t = e.excPtr;
|
627
|
+
throw e.get_rethrown() || (Be.push(e), e.set_rethrown(!0), e.set_caught(!1), ze++), oe = t, oe;
|
628
|
+
}, on = (e, t, n) => {
|
629
|
+
var o = new mt(e);
|
630
|
+
throw o.init(t, n), oe = e, ze++, oe;
|
631
|
+
}, sn = () => ze, Ge = {}, gt = (e) => {
|
632
|
+
for (; e.length; ) {
|
633
|
+
var t = e.pop(), n = e.pop();
|
634
|
+
n(t);
|
635
|
+
}
|
636
|
+
};
|
637
|
+
function wt(e) {
|
638
|
+
return this.fromWireType(O[e >> 2]);
|
639
|
+
}
|
640
|
+
var Te = {}, ye = {}, Je = {}, Wt, Ye = (e) => {
|
641
|
+
throw new Wt(e);
|
642
|
+
}, ge = (e, t, n) => {
|
643
|
+
e.forEach(function(d) {
|
644
|
+
Je[d] = t;
|
645
|
+
});
|
646
|
+
function o(d) {
|
647
|
+
var p = n(d);
|
648
|
+
p.length !== e.length && Ye("Mismatched type converter count");
|
649
|
+
for (var g = 0; g < e.length; ++g)
|
650
|
+
te(e[g], p[g]);
|
651
|
+
}
|
652
|
+
var s = new Array(t.length), u = [], l = 0;
|
653
|
+
t.forEach((d, p) => {
|
654
|
+
ye.hasOwnProperty(d) ? s[p] = ye[d] : (u.push(d), Te.hasOwnProperty(d) || (Te[d] = []), Te[d].push(() => {
|
655
|
+
s[p] = ye[d], ++l, l === u.length && o(s);
|
656
|
+
}));
|
657
|
+
}), u.length === 0 && o(s);
|
658
|
+
}, cn = (e) => {
|
659
|
+
var t = Ge[e];
|
660
|
+
delete Ge[e];
|
661
|
+
var n = t.rawConstructor, o = t.rawDestructor, s = t.fields, u = s.map((l) => l.getterReturnType).concat(s.map((l) => l.setterArgumentType));
|
662
|
+
ge([e], u, (l) => {
|
663
|
+
var d = {};
|
664
|
+
return s.forEach((p, g) => {
|
665
|
+
var C = p.fieldName, P = l[g], _ = p.getter, E = p.getterContext, U = l[g + s.length], V = p.setter, k = p.setterContext;
|
666
|
+
d[C] = {
|
667
|
+
read: (q) => P.fromWireType(_(E, q)),
|
668
|
+
write: (q, m) => {
|
669
|
+
var $ = [];
|
670
|
+
V(k, q, U.toWireType($, m)), gt($);
|
671
|
+
}
|
672
|
+
};
|
673
|
+
}), [{
|
674
|
+
name: t.name,
|
675
|
+
fromWireType: (p) => {
|
676
|
+
var g = {};
|
677
|
+
for (var C in d)
|
678
|
+
g[C] = d[C].read(p);
|
679
|
+
return o(p), g;
|
680
|
+
},
|
681
|
+
toWireType: (p, g) => {
|
682
|
+
for (var C in d)
|
683
|
+
if (!(C in g))
|
684
|
+
throw new TypeError(`Missing field: "${C}"`);
|
685
|
+
var P = n();
|
686
|
+
for (C in d)
|
687
|
+
d[C].write(P, g[C]);
|
688
|
+
return p !== null && p.push(o, P), P;
|
689
|
+
},
|
690
|
+
argPackAdvance: re,
|
691
|
+
readValueFromPointer: wt,
|
692
|
+
destructorFunction: o
|
693
|
+
}];
|
694
|
+
});
|
695
|
+
}, un = (e, t, n, o, s) => {
|
696
|
+
}, ln = () => {
|
697
|
+
for (var e = new Array(256), t = 0; t < 256; ++t)
|
698
|
+
e[t] = String.fromCharCode(t);
|
699
|
+
Ut = e;
|
700
|
+
}, Ut, Y = (e) => {
|
701
|
+
for (var t = "", n = e; z[n]; )
|
702
|
+
t += Ut[z[n++]];
|
703
|
+
return t;
|
704
|
+
}, $e, A = (e) => {
|
705
|
+
throw new $e(e);
|
706
|
+
};
|
707
|
+
function dn(e, t) {
|
708
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
709
|
+
var o = t.name;
|
710
|
+
if (e || A(`type "${o}" must have a positive integer typeid pointer`), ye.hasOwnProperty(e)) {
|
711
|
+
if (n.ignoreDuplicateRegistrations)
|
712
|
+
return;
|
713
|
+
A(`Cannot register type '${o}' twice`);
|
714
|
+
}
|
715
|
+
if (ye[e] = t, delete Je[e], Te.hasOwnProperty(e)) {
|
716
|
+
var s = Te[e];
|
717
|
+
delete Te[e], s.forEach((u) => u());
|
718
|
+
}
|
719
|
+
}
|
720
|
+
function te(e, t) {
|
721
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
722
|
+
if (!("argPackAdvance" in t))
|
723
|
+
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
724
|
+
return dn(e, t, n);
|
725
|
+
}
|
726
|
+
var re = 8, fn = (e, t, n, o) => {
|
727
|
+
t = Y(t), te(e, {
|
728
|
+
name: t,
|
729
|
+
fromWireType: function(s) {
|
730
|
+
return !!s;
|
731
|
+
},
|
732
|
+
toWireType: function(s, u) {
|
733
|
+
return u ? n : o;
|
734
|
+
},
|
735
|
+
argPackAdvance: re,
|
736
|
+
readValueFromPointer: function(s) {
|
737
|
+
return this.fromWireType(z[s]);
|
738
|
+
},
|
739
|
+
destructorFunction: null
|
740
|
+
});
|
741
|
+
}, hn = (e) => ({
|
742
|
+
count: e.count,
|
743
|
+
deleteScheduled: e.deleteScheduled,
|
744
|
+
preservePointerOnDelete: e.preservePointerOnDelete,
|
745
|
+
ptr: e.ptr,
|
746
|
+
ptrType: e.ptrType,
|
747
|
+
smartPtr: e.smartPtr,
|
748
|
+
smartPtrType: e.smartPtrType
|
749
|
+
}), bt = (e) => {
|
750
|
+
function t(n) {
|
751
|
+
return n.$$.ptrType.registeredClass.name;
|
752
|
+
}
|
753
|
+
A(t(e) + " instance already deleted");
|
754
|
+
}, Ct = !1, Lt = (e) => {
|
755
|
+
}, pn = (e) => {
|
756
|
+
e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
|
757
|
+
}, Ht = (e) => {
|
758
|
+
e.count.value -= 1;
|
759
|
+
var t = e.count.value === 0;
|
760
|
+
t && pn(e);
|
761
|
+
}, Nt = (e, t, n) => {
|
762
|
+
if (t === n)
|
763
|
+
return e;
|
764
|
+
if (n.baseClass === void 0)
|
765
|
+
return null;
|
766
|
+
var o = Nt(e, t, n.baseClass);
|
767
|
+
return o === null ? null : n.downcast(o);
|
768
|
+
}, Vt = {}, vn = () => Object.keys(De).length, mn = () => {
|
769
|
+
var e = [];
|
770
|
+
for (var t in De)
|
771
|
+
De.hasOwnProperty(t) && e.push(De[t]);
|
772
|
+
return e;
|
773
|
+
}, xe = [], Tt = () => {
|
774
|
+
for (; xe.length; ) {
|
775
|
+
var e = xe.pop();
|
776
|
+
e.$$.deleteScheduled = !1, e.delete();
|
777
|
+
}
|
778
|
+
}, je, yn = (e) => {
|
779
|
+
je = e, xe.length && je && je(Tt);
|
780
|
+
}, gn = () => {
|
781
|
+
a.getInheritedInstanceCount = vn, a.getLiveInheritedInstances = mn, a.flushPendingDeletes = Tt, a.setDelayFunction = yn;
|
782
|
+
}, De = {}, wn = (e, t) => {
|
783
|
+
for (t === void 0 && A("ptr should not be undefined"); e.baseClass; )
|
784
|
+
t = e.upcast(t), e = e.baseClass;
|
785
|
+
return t;
|
786
|
+
}, bn = (e, t) => (t = wn(e, t), De[t]), qe = (e, t) => {
|
787
|
+
(!t.ptrType || !t.ptr) && Ye("makeClassHandle requires ptr and ptrType");
|
788
|
+
var n = !!t.smartPtrType, o = !!t.smartPtr;
|
789
|
+
return n !== o && Ye("Both smartPtrType and smartPtr must be specified"), t.count = {
|
790
|
+
value: 1
|
791
|
+
}, Re(Object.create(e, {
|
792
|
+
$$: {
|
793
|
+
value: t,
|
794
|
+
writable: !0
|
795
|
+
}
|
796
|
+
}));
|
797
|
+
};
|
798
|
+
function Cn(e) {
|
799
|
+
var t = this.getPointee(e);
|
800
|
+
if (!t)
|
801
|
+
return this.destructor(e), null;
|
802
|
+
var n = bn(this.registeredClass, t);
|
803
|
+
if (n !== void 0) {
|
804
|
+
if (n.$$.count.value === 0)
|
805
|
+
return n.$$.ptr = t, n.$$.smartPtr = e, n.clone();
|
806
|
+
var o = n.clone();
|
807
|
+
return this.destructor(e), o;
|
808
|
+
}
|
809
|
+
function s() {
|
810
|
+
return this.isSmartPointer ? qe(this.registeredClass.instancePrototype, {
|
811
|
+
ptrType: this.pointeeType,
|
812
|
+
ptr: t,
|
813
|
+
smartPtrType: this,
|
814
|
+
smartPtr: e
|
815
|
+
}) : qe(this.registeredClass.instancePrototype, {
|
816
|
+
ptrType: this,
|
817
|
+
ptr: e
|
818
|
+
});
|
819
|
+
}
|
820
|
+
var u = this.registeredClass.getActualType(t), l = Vt[u];
|
821
|
+
if (!l)
|
822
|
+
return s.call(this);
|
823
|
+
var d;
|
824
|
+
this.isConst ? d = l.constPointerType : d = l.pointerType;
|
825
|
+
var p = Nt(t, this.registeredClass, d.registeredClass);
|
826
|
+
return p === null ? s.call(this) : this.isSmartPointer ? qe(d.registeredClass.instancePrototype, {
|
827
|
+
ptrType: d,
|
828
|
+
ptr: p,
|
829
|
+
smartPtrType: this,
|
830
|
+
smartPtr: e
|
831
|
+
}) : qe(d.registeredClass.instancePrototype, {
|
832
|
+
ptrType: d,
|
833
|
+
ptr: p
|
834
|
+
});
|
835
|
+
}
|
836
|
+
var Re = (e) => typeof FinalizationRegistry > "u" ? (Re = (t) => t, e) : (Ct = new FinalizationRegistry((t) => {
|
837
|
+
Ht(t.$$);
|
838
|
+
}), Re = (t) => {
|
839
|
+
var n = t.$$, o = !!n.smartPtr;
|
840
|
+
if (o) {
|
841
|
+
var s = {
|
842
|
+
$$: n
|
843
|
+
};
|
844
|
+
Ct.register(t, s, t);
|
845
|
+
}
|
846
|
+
return t;
|
847
|
+
}, Lt = (t) => Ct.unregister(t), Re(e)), Tn = () => {
|
848
|
+
Object.assign(Qe.prototype, {
|
849
|
+
isAliasOf(e) {
|
850
|
+
if (!(this instanceof Qe) || !(e instanceof Qe))
|
851
|
+
return !1;
|
852
|
+
var t = this.$$.ptrType.registeredClass, n = this.$$.ptr;
|
853
|
+
e.$$ = e.$$;
|
854
|
+
for (var o = e.$$.ptrType.registeredClass, s = e.$$.ptr; t.baseClass; )
|
855
|
+
n = t.upcast(n), t = t.baseClass;
|
856
|
+
for (; o.baseClass; )
|
857
|
+
s = o.upcast(s), o = o.baseClass;
|
858
|
+
return t === o && n === s;
|
859
|
+
},
|
860
|
+
clone() {
|
861
|
+
if (this.$$.ptr || bt(this), this.$$.preservePointerOnDelete)
|
862
|
+
return this.$$.count.value += 1, this;
|
863
|
+
var e = Re(Object.create(Object.getPrototypeOf(this), {
|
864
|
+
$$: {
|
865
|
+
value: hn(this.$$)
|
866
|
+
}
|
867
|
+
}));
|
868
|
+
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e;
|
869
|
+
},
|
870
|
+
delete() {
|
871
|
+
this.$$.ptr || bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && A("Object already scheduled for deletion"), Lt(this), Ht(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
872
|
+
},
|
873
|
+
isDeleted() {
|
874
|
+
return !this.$$.ptr;
|
875
|
+
},
|
876
|
+
deleteLater() {
|
877
|
+
return this.$$.ptr || bt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && A("Object already scheduled for deletion"), xe.push(this), xe.length === 1 && je && je(Tt), this.$$.deleteScheduled = !0, this;
|
878
|
+
}
|
879
|
+
});
|
880
|
+
};
|
881
|
+
function Qe() {
|
882
|
+
}
|
883
|
+
var ke = (e, t) => Object.defineProperty(t, "name", {
|
884
|
+
value: e
|
885
|
+
}), Bt = (e, t, n) => {
|
886
|
+
if (e[t].overloadTable === void 0) {
|
887
|
+
var o = e[t];
|
888
|
+
e[t] = function() {
|
889
|
+
return e[t].overloadTable.hasOwnProperty(arguments.length) || A(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[arguments.length].apply(this, arguments);
|
890
|
+
}, e[t].overloadTable = [], e[t].overloadTable[o.argCount] = o;
|
891
|
+
}
|
892
|
+
}, $t = (e, t, n) => {
|
893
|
+
a.hasOwnProperty(e) ? ((n === void 0 || a[e].overloadTable !== void 0 && a[e].overloadTable[n] !== void 0) && A(`Cannot register public name '${e}' twice`), Bt(a, e, e), a.hasOwnProperty(n) && A(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`), a[e].overloadTable[n] = t) : (a[e] = t, n !== void 0 && (a[e].numArguments = n));
|
894
|
+
}, $n = 48, Sn = 57, Pn = (e) => {
|
895
|
+
if (e === void 0)
|
896
|
+
return "_unknown";
|
897
|
+
e = e.replace(/[^a-zA-Z0-9_]/g, "$");
|
898
|
+
var t = e.charCodeAt(0);
|
899
|
+
return t >= $n && t <= Sn ? `_${e}` : e;
|
900
|
+
};
|
901
|
+
function _n(e, t, n, o, s, u, l, d) {
|
902
|
+
this.name = e, this.constructor = t, this.instancePrototype = n, this.rawDestructor = o, this.baseClass = s, this.getActualType = u, this.upcast = l, this.downcast = d, this.pureVirtualFunctions = [];
|
903
|
+
}
|
904
|
+
var St = (e, t, n) => {
|
905
|
+
for (; t !== n; )
|
906
|
+
t.upcast || A(`Expected null or instance of ${n.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
|
907
|
+
return e;
|
908
|
+
};
|
909
|
+
function En(e, t) {
|
910
|
+
if (t === null)
|
911
|
+
return this.isReference && A(`null is not a valid ${this.name}`), 0;
|
912
|
+
t.$$ || A(`Cannot pass "${Mt(t)}" as a ${this.name}`), t.$$.ptr || A(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
913
|
+
var n = t.$$.ptrType.registeredClass, o = St(t.$$.ptr, n, this.registeredClass);
|
914
|
+
return o;
|
915
|
+
}
|
916
|
+
function On(e, t) {
|
917
|
+
var n;
|
918
|
+
if (t === null)
|
919
|
+
return this.isReference && A(`null is not a valid ${this.name}`), this.isSmartPointer ? (n = this.rawConstructor(), e !== null && e.push(this.rawDestructor, n), n) : 0;
|
920
|
+
(!t || !t.$$) && A(`Cannot pass "${Mt(t)}" as a ${this.name}`), t.$$.ptr || A(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && A(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
921
|
+
var o = t.$$.ptrType.registeredClass;
|
922
|
+
if (n = St(t.$$.ptr, o, this.registeredClass), this.isSmartPointer)
|
923
|
+
switch (t.$$.smartPtr === void 0 && A("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
924
|
+
case 0:
|
925
|
+
t.$$.smartPtrType === this ? n = t.$$.smartPtr : A(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
926
|
+
break;
|
927
|
+
case 1:
|
928
|
+
n = t.$$.smartPtr;
|
929
|
+
break;
|
930
|
+
case 2:
|
931
|
+
if (t.$$.smartPtrType === this)
|
932
|
+
n = t.$$.smartPtr;
|
933
|
+
else {
|
934
|
+
var s = t.clone();
|
935
|
+
n = this.rawShare(n, ie.toHandle(() => s.delete())), e !== null && e.push(this.rawDestructor, n);
|
936
|
+
}
|
937
|
+
break;
|
938
|
+
default:
|
939
|
+
A("Unsupporting sharing policy");
|
940
|
+
}
|
941
|
+
return n;
|
942
|
+
}
|
943
|
+
function Mn(e, t) {
|
944
|
+
if (t === null)
|
945
|
+
return this.isReference && A(`null is not a valid ${this.name}`), 0;
|
946
|
+
t.$$ || A(`Cannot pass "${Mt(t)}" as a ${this.name}`), t.$$.ptr || A(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && A(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
|
947
|
+
var n = t.$$.ptrType.registeredClass, o = St(t.$$.ptr, n, this.registeredClass);
|
948
|
+
return o;
|
949
|
+
}
|
950
|
+
function zt(e) {
|
951
|
+
return this.fromWireType(M[e >> 2]);
|
952
|
+
}
|
953
|
+
var An = () => {
|
954
|
+
Object.assign(Xe.prototype, {
|
955
|
+
getPointee(e) {
|
956
|
+
return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
|
957
|
+
},
|
958
|
+
destructor(e) {
|
959
|
+
var t;
|
960
|
+
(t = this.rawDestructor) === null || t === void 0 || t.call(this, e);
|
961
|
+
},
|
962
|
+
argPackAdvance: re,
|
963
|
+
readValueFromPointer: zt,
|
964
|
+
deleteObject(e) {
|
965
|
+
e !== null && e.delete();
|
966
|
+
},
|
967
|
+
fromWireType: Cn
|
968
|
+
});
|
969
|
+
};
|
970
|
+
function Xe(e, t, n, o, s, u, l, d, p, g, C) {
|
971
|
+
this.name = e, this.registeredClass = t, this.isReference = n, this.isConst = o, this.isSmartPointer = s, this.pointeeType = u, this.sharingPolicy = l, this.rawGetPointee = d, this.rawConstructor = p, this.rawShare = g, this.rawDestructor = C, !s && t.baseClass === void 0 ? o ? (this.toWireType = En, this.destructorFunction = null) : (this.toWireType = Mn, this.destructorFunction = null) : this.toWireType = On;
|
972
|
+
}
|
973
|
+
var Gt = (e, t, n) => {
|
974
|
+
a.hasOwnProperty(e) || Ye("Replacing nonexistant public symbol"), a[e].overloadTable !== void 0 && n !== void 0 ? a[e].overloadTable[n] = t : (a[e] = t, a[e].argCount = n);
|
975
|
+
}, xn = (e, t, n) => {
|
976
|
+
var o = a["dynCall_" + e];
|
977
|
+
return n && n.length ? o.apply(null, [t].concat(n)) : o.call(null, t);
|
978
|
+
}, Ke = [], Jt, L = (e) => {
|
979
|
+
var t = Ke[e];
|
980
|
+
return t || (e >= Ke.length && (Ke.length = e + 1), Ke[e] = t = Jt.get(e)), t;
|
981
|
+
}, jn = (e, t, n) => {
|
982
|
+
if (e.includes("j"))
|
983
|
+
return xn(e, t, n);
|
984
|
+
var o = L(t).apply(null, n);
|
985
|
+
return o;
|
986
|
+
}, Dn = (e, t) => {
|
987
|
+
var n = [];
|
988
|
+
return function() {
|
989
|
+
return n.length = 0, Object.assign(n, arguments), jn(e, t, n);
|
990
|
+
};
|
991
|
+
}, Z = (e, t) => {
|
992
|
+
e = Y(e);
|
993
|
+
function n() {
|
994
|
+
return e.includes("j") ? Dn(e, t) : L(t);
|
995
|
+
}
|
996
|
+
var o = n();
|
997
|
+
return typeof o != "function" && A(`unknown function pointer with signature ${e}: ${t}`), o;
|
998
|
+
}, Rn = (e, t) => {
|
999
|
+
var n = ke(t, function(o) {
|
1000
|
+
this.name = t, this.message = o;
|
1001
|
+
var s = new Error(o).stack;
|
1002
|
+
s !== void 0 && (this.stack = this.toString() + `
|
1003
|
+
` + s.replace(/^Error(:[^\n]*)?\n/, ""));
|
1004
|
+
});
|
1005
|
+
return n.prototype = Object.create(e.prototype), n.prototype.constructor = n, n.prototype.toString = function() {
|
1006
|
+
return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
|
1007
|
+
}, n;
|
1008
|
+
}, Yt, qt = (e) => {
|
1009
|
+
var t = or(e), n = Y(t);
|
1010
|
+
return se(t), n;
|
1011
|
+
}, Ze = (e, t) => {
|
1012
|
+
var n = [], o = {};
|
1013
|
+
function s(u) {
|
1014
|
+
if (!o[u] && !ye[u]) {
|
1015
|
+
if (Je[u]) {
|
1016
|
+
Je[u].forEach(s);
|
1017
|
+
return;
|
1018
|
+
}
|
1019
|
+
n.push(u), o[u] = !0;
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
throw t.forEach(s), new Yt(`${e}: ` + n.map(qt).join([", "]));
|
1023
|
+
}, kn = (e, t, n, o, s, u, l, d, p, g, C, P, _) => {
|
1024
|
+
C = Y(C), u = Z(s, u), d && (d = Z(l, d)), g && (g = Z(p, g)), _ = Z(P, _);
|
1025
|
+
var E = Pn(C);
|
1026
|
+
$t(E, function() {
|
1027
|
+
Ze(`Cannot construct ${C} due to unbound types`, [o]);
|
1028
|
+
}), ge([e, t, n], o ? [o] : [], function(U) {
|
1029
|
+
U = U[0];
|
1030
|
+
var V, k;
|
1031
|
+
o ? (V = U.registeredClass, k = V.instancePrototype) : k = Qe.prototype;
|
1032
|
+
var q = ke(C, function() {
|
1033
|
+
if (Object.getPrototypeOf(this) !== m)
|
1034
|
+
throw new $e("Use 'new' to construct " + C);
|
1035
|
+
if ($.constructor_body === void 0)
|
1036
|
+
throw new $e(C + " has no accessible constructor");
|
1037
|
+
var hr = $.constructor_body[arguments.length];
|
1038
|
+
if (hr === void 0)
|
1039
|
+
throw new $e(`Tried to invoke ctor of ${C} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);
|
1040
|
+
return hr.apply(this, arguments);
|
1041
|
+
}), m = Object.create(k, {
|
1042
|
+
constructor: {
|
1043
|
+
value: q
|
1044
|
+
}
|
1045
|
+
});
|
1046
|
+
q.prototype = m;
|
1047
|
+
var $ = new _n(C, q, m, _, V, u, d, g);
|
1048
|
+
if ($.baseClass) {
|
1049
|
+
var B, J;
|
1050
|
+
(J = (B = $.baseClass).__derivedClasses) !== null && J !== void 0 || (B.__derivedClasses = []), $.baseClass.__derivedClasses.push($);
|
1051
|
+
}
|
1052
|
+
var Se = new Xe(C, $, !0, !1, !1), rt = new Xe(C + "*", $, !1, !1, !1), fr = new Xe(C + " const*", $, !1, !0, !1);
|
1053
|
+
return Vt[e] = {
|
1054
|
+
pointerType: rt,
|
1055
|
+
constPointerType: fr
|
1056
|
+
}, Gt(E, q), [Se, rt, fr];
|
1057
|
+
});
|
1058
|
+
}, Pt = (e, t) => {
|
1059
|
+
for (var n = [], o = 0; o < e; o++)
|
1060
|
+
n.push(M[t + o * 4 >> 2]);
|
1061
|
+
return n;
|
1062
|
+
};
|
1063
|
+
function Fn(e) {
|
1064
|
+
for (var t = 1; t < e.length; ++t)
|
1065
|
+
if (e[t] !== null && e[t].destructorFunction === void 0)
|
1066
|
+
return !0;
|
1067
|
+
return !1;
|
1068
|
+
}
|
1069
|
+
function _t(e, t, n, o, s, u) {
|
1070
|
+
var l = t.length;
|
1071
|
+
l < 2 && A("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
1072
|
+
var d = t[1] !== null && n !== null, p = Fn(t), g = t[0].name !== "void", C = l - 2, P = new Array(C), _ = [], E = [], U = function() {
|
1073
|
+
arguments.length !== C && A(`function ${e} called with ${arguments.length} arguments, expected ${C}`), E.length = 0;
|
1074
|
+
var V;
|
1075
|
+
_.length = d ? 2 : 1, _[0] = s, d && (V = t[1].toWireType(E, this), _[1] = V);
|
1076
|
+
for (var k = 0; k < C; ++k)
|
1077
|
+
P[k] = t[k + 2].toWireType(E, arguments[k]), _.push(P[k]);
|
1078
|
+
var q = o.apply(null, _);
|
1079
|
+
function m($) {
|
1080
|
+
if (p)
|
1081
|
+
gt(E);
|
1082
|
+
else
|
1083
|
+
for (var B = d ? 1 : 2; B < t.length; B++) {
|
1084
|
+
var J = B === 1 ? V : P[B - 2];
|
1085
|
+
t[B].destructorFunction !== null && t[B].destructorFunction(J);
|
1086
|
+
}
|
1087
|
+
if (g)
|
1088
|
+
return t[0].fromWireType($);
|
1089
|
+
}
|
1090
|
+
return m(q);
|
1091
|
+
};
|
1092
|
+
return ke(e, U);
|
1093
|
+
}
|
1094
|
+
var In = (e, t, n, o, s, u) => {
|
1095
|
+
var l = Pt(t, n);
|
1096
|
+
s = Z(o, s), ge([], [e], function(d) {
|
1097
|
+
d = d[0];
|
1098
|
+
var p = `constructor ${d.name}`;
|
1099
|
+
if (d.registeredClass.constructor_body === void 0 && (d.registeredClass.constructor_body = []), d.registeredClass.constructor_body[t - 1] !== void 0)
|
1100
|
+
throw new $e(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
1101
|
+
return d.registeredClass.constructor_body[t - 1] = () => {
|
1102
|
+
Ze(`Cannot construct ${d.name} due to unbound types`, l);
|
1103
|
+
}, ge([], l, (g) => (g.splice(1, 0, null), d.registeredClass.constructor_body[t - 1] = _t(p, g, null, s, u), [])), [];
|
1104
|
+
});
|
1105
|
+
}, Qt = (e) => {
|
1106
|
+
e = e.trim();
|
1107
|
+
const t = e.indexOf("(");
|
1108
|
+
return t !== -1 ? e.substr(0, t) : e;
|
1109
|
+
}, Wn = (e, t, n, o, s, u, l, d, p) => {
|
1110
|
+
var g = Pt(n, o);
|
1111
|
+
t = Y(t), t = Qt(t), u = Z(s, u), ge([], [e], function(C) {
|
1112
|
+
C = C[0];
|
1113
|
+
var P = `${C.name}.${t}`;
|
1114
|
+
t.startsWith("@@") && (t = Symbol[t.substring(2)]), d && C.registeredClass.pureVirtualFunctions.push(t);
|
1115
|
+
function _() {
|
1116
|
+
Ze(`Cannot call ${P} due to unbound types`, g);
|
1117
|
+
}
|
1118
|
+
var E = C.registeredClass.instancePrototype, U = E[t];
|
1119
|
+
return U === void 0 || U.overloadTable === void 0 && U.className !== C.name && U.argCount === n - 2 ? (_.argCount = n - 2, _.className = C.name, E[t] = _) : (Bt(E, t, P), E[t].overloadTable[n - 2] = _), ge([], g, function(V) {
|
1120
|
+
var k = _t(P, V, C, u, l);
|
1121
|
+
return E[t].overloadTable === void 0 ? (k.argCount = n - 2, E[t] = k) : E[t].overloadTable[n - 2] = k, [];
|
1122
|
+
}), [];
|
1123
|
+
});
|
1124
|
+
};
|
1125
|
+
function Un() {
|
1126
|
+
Object.assign(Xt.prototype, {
|
1127
|
+
get(e) {
|
1128
|
+
return this.allocated[e];
|
1129
|
+
},
|
1130
|
+
has(e) {
|
1131
|
+
return this.allocated[e] !== void 0;
|
1132
|
+
},
|
1133
|
+
allocate(e) {
|
1134
|
+
var t = this.freelist.pop() || this.allocated.length;
|
1135
|
+
return this.allocated[t] = e, t;
|
1136
|
+
},
|
1137
|
+
free(e) {
|
1138
|
+
this.allocated[e] = void 0, this.freelist.push(e);
|
1139
|
+
}
|
1140
|
+
});
|
1141
|
+
}
|
1142
|
+
function Xt() {
|
1143
|
+
this.allocated = [void 0], this.freelist = [];
|
1144
|
+
}
|
1145
|
+
var K = new Xt(), Et = (e) => {
|
1146
|
+
e >= K.reserved && --K.get(e).refcount === 0 && K.free(e);
|
1147
|
+
}, Ln = () => {
|
1148
|
+
for (var e = 0, t = K.reserved; t < K.allocated.length; ++t)
|
1149
|
+
K.allocated[t] !== void 0 && ++e;
|
1150
|
+
return e;
|
1151
|
+
}, Hn = () => {
|
1152
|
+
K.allocated.push({
|
1153
|
+
value: void 0
|
1154
|
+
}, {
|
1155
|
+
value: null
|
1156
|
+
}, {
|
1157
|
+
value: !0
|
1158
|
+
}, {
|
1159
|
+
value: !1
|
1160
|
+
}), K.reserved = K.allocated.length, a.count_emval_handles = Ln;
|
1161
|
+
}, ie = {
|
1162
|
+
toValue: (e) => (e || A("Cannot use deleted val. handle = " + e), K.get(e).value),
|
1163
|
+
toHandle: (e) => {
|
1164
|
+
switch (e) {
|
1165
|
+
case void 0:
|
1166
|
+
return 1;
|
1167
|
+
case null:
|
1168
|
+
return 2;
|
1169
|
+
case !0:
|
1170
|
+
return 3;
|
1171
|
+
case !1:
|
1172
|
+
return 4;
|
1173
|
+
default:
|
1174
|
+
return K.allocate({
|
1175
|
+
refcount: 1,
|
1176
|
+
value: e
|
1177
|
+
});
|
1178
|
+
}
|
1179
|
+
}
|
1180
|
+
}, Nn = (e, t) => {
|
1181
|
+
t = Y(t), te(e, {
|
1182
|
+
name: t,
|
1183
|
+
fromWireType: (n) => {
|
1184
|
+
var o = ie.toValue(n);
|
1185
|
+
return Et(n), o;
|
1186
|
+
},
|
1187
|
+
toWireType: (n, o) => ie.toHandle(o),
|
1188
|
+
argPackAdvance: re,
|
1189
|
+
readValueFromPointer: wt,
|
1190
|
+
destructorFunction: null
|
1191
|
+
});
|
1192
|
+
}, Vn = (e, t, n) => {
|
1193
|
+
switch (t) {
|
1194
|
+
case 1:
|
1195
|
+
return n ? function(o) {
|
1196
|
+
return this.fromWireType(I[o >> 0]);
|
1197
|
+
} : function(o) {
|
1198
|
+
return this.fromWireType(z[o >> 0]);
|
1199
|
+
};
|
1200
|
+
case 2:
|
1201
|
+
return n ? function(o) {
|
1202
|
+
return this.fromWireType(ue[o >> 1]);
|
1203
|
+
} : function(o) {
|
1204
|
+
return this.fromWireType(R[o >> 1]);
|
1205
|
+
};
|
1206
|
+
case 4:
|
1207
|
+
return n ? function(o) {
|
1208
|
+
return this.fromWireType(O[o >> 2]);
|
1209
|
+
} : function(o) {
|
1210
|
+
return this.fromWireType(M[o >> 2]);
|
1211
|
+
};
|
1212
|
+
default:
|
1213
|
+
throw new TypeError(`invalid integer width (${t}): ${e}`);
|
1214
|
+
}
|
1215
|
+
}, Bn = (e, t, n, o) => {
|
1216
|
+
t = Y(t);
|
1217
|
+
function s() {
|
1218
|
+
}
|
1219
|
+
s.values = {}, te(e, {
|
1220
|
+
name: t,
|
1221
|
+
constructor: s,
|
1222
|
+
fromWireType: function(u) {
|
1223
|
+
return this.constructor.values[u];
|
1224
|
+
},
|
1225
|
+
toWireType: (u, l) => l.value,
|
1226
|
+
argPackAdvance: re,
|
1227
|
+
readValueFromPointer: Vn(t, n, o),
|
1228
|
+
destructorFunction: null
|
1229
|
+
}), $t(t, s);
|
1230
|
+
}, Ot = (e, t) => {
|
1231
|
+
var n = ye[e];
|
1232
|
+
return n === void 0 && A(t + " has unknown type " + qt(e)), n;
|
1233
|
+
}, zn = (e, t, n) => {
|
1234
|
+
var o = Ot(e, "enum");
|
1235
|
+
t = Y(t);
|
1236
|
+
var s = o.constructor, u = Object.create(o.constructor.prototype, {
|
1237
|
+
value: {
|
1238
|
+
value: n
|
1239
|
+
},
|
1240
|
+
constructor: {
|
1241
|
+
value: ke(`${o.name}_${t}`, function() {
|
1242
|
+
})
|
1243
|
+
}
|
1244
|
+
});
|
1245
|
+
s.values[n] = u, s[t] = u;
|
1246
|
+
}, Mt = (e) => {
|
1247
|
+
if (e === null)
|
1248
|
+
return "null";
|
1249
|
+
var t = typeof e;
|
1250
|
+
return t === "object" || t === "array" || t === "function" ? e.toString() : "" + e;
|
1251
|
+
}, Gn = (e, t) => {
|
1252
|
+
switch (t) {
|
1253
|
+
case 4:
|
1254
|
+
return function(n) {
|
1255
|
+
return this.fromWireType(le[n >> 2]);
|
1256
|
+
};
|
1257
|
+
case 8:
|
1258
|
+
return function(n) {
|
1259
|
+
return this.fromWireType(ae[n >> 3]);
|
1260
|
+
};
|
1261
|
+
default:
|
1262
|
+
throw new TypeError(`invalid float width (${t}): ${e}`);
|
1263
|
+
}
|
1264
|
+
}, Jn = (e, t, n) => {
|
1265
|
+
t = Y(t), te(e, {
|
1266
|
+
name: t,
|
1267
|
+
fromWireType: (o) => o,
|
1268
|
+
toWireType: (o, s) => s,
|
1269
|
+
argPackAdvance: re,
|
1270
|
+
readValueFromPointer: Gn(t, n),
|
1271
|
+
destructorFunction: null
|
1272
|
+
});
|
1273
|
+
}, Yn = (e, t, n, o, s, u, l) => {
|
1274
|
+
var d = Pt(t, n);
|
1275
|
+
e = Y(e), e = Qt(e), s = Z(o, s), $t(e, function() {
|
1276
|
+
Ze(`Cannot call ${e} due to unbound types`, d);
|
1277
|
+
}, t - 1), ge([], d, function(p) {
|
1278
|
+
var g = [p[0], null].concat(p.slice(1));
|
1279
|
+
return Gt(e, _t(e, g, null, s, u), t - 1), [];
|
1280
|
+
});
|
1281
|
+
}, qn = (e, t, n) => {
|
1282
|
+
switch (t) {
|
1283
|
+
case 1:
|
1284
|
+
return n ? (o) => I[o >> 0] : (o) => z[o >> 0];
|
1285
|
+
case 2:
|
1286
|
+
return n ? (o) => ue[o >> 1] : (o) => R[o >> 1];
|
1287
|
+
case 4:
|
1288
|
+
return n ? (o) => O[o >> 2] : (o) => M[o >> 2];
|
1289
|
+
default:
|
1290
|
+
throw new TypeError(`invalid integer width (${t}): ${e}`);
|
1291
|
+
}
|
1292
|
+
}, Qn = (e, t, n, o, s) => {
|
1293
|
+
t = Y(t);
|
1294
|
+
var u = (C) => C;
|
1295
|
+
if (o === 0) {
|
1296
|
+
var l = 32 - 8 * n;
|
1297
|
+
u = (C) => C << l >>> l;
|
1298
|
+
}
|
1299
|
+
var d = t.includes("unsigned"), p = (C, P) => {
|
1300
|
+
}, g;
|
1301
|
+
d ? g = function(C, P) {
|
1302
|
+
return p(P, this.name), P >>> 0;
|
1303
|
+
} : g = function(C, P) {
|
1304
|
+
return p(P, this.name), P;
|
1305
|
+
}, te(e, {
|
1306
|
+
name: t,
|
1307
|
+
fromWireType: u,
|
1308
|
+
toWireType: g,
|
1309
|
+
argPackAdvance: re,
|
1310
|
+
readValueFromPointer: qn(t, n, o !== 0),
|
1311
|
+
destructorFunction: null
|
1312
|
+
});
|
1313
|
+
}, Xn = (e, t, n) => {
|
1314
|
+
var o = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], s = o[t];
|
1315
|
+
function u(l) {
|
1316
|
+
var d = M[l >> 2], p = M[l + 4 >> 2];
|
1317
|
+
return new s(I.buffer, p, d);
|
1318
|
+
}
|
1319
|
+
n = Y(n), te(e, {
|
1320
|
+
name: n,
|
1321
|
+
fromWireType: u,
|
1322
|
+
argPackAdvance: re,
|
1323
|
+
readValueFromPointer: u
|
1324
|
+
}, {
|
1325
|
+
ignoreDuplicateRegistrations: !0
|
1326
|
+
});
|
1327
|
+
}, Kt = (e, t, n, o) => {
|
1328
|
+
if (!(o > 0))
|
1329
|
+
return 0;
|
1330
|
+
for (var s = n, u = n + o - 1, l = 0; l < e.length; ++l) {
|
1331
|
+
var d = e.charCodeAt(l);
|
1332
|
+
if (d >= 55296 && d <= 57343) {
|
1333
|
+
var p = e.charCodeAt(++l);
|
1334
|
+
d = 65536 + ((d & 1023) << 10) | p & 1023;
|
1335
|
+
}
|
1336
|
+
if (d <= 127) {
|
1337
|
+
if (n >= u)
|
1338
|
+
break;
|
1339
|
+
t[n++] = d;
|
1340
|
+
} else if (d <= 2047) {
|
1341
|
+
if (n + 1 >= u)
|
1342
|
+
break;
|
1343
|
+
t[n++] = 192 | d >> 6, t[n++] = 128 | d & 63;
|
1344
|
+
} else if (d <= 65535) {
|
1345
|
+
if (n + 2 >= u)
|
1346
|
+
break;
|
1347
|
+
t[n++] = 224 | d >> 12, t[n++] = 128 | d >> 6 & 63, t[n++] = 128 | d & 63;
|
1348
|
+
} else {
|
1349
|
+
if (n + 3 >= u)
|
1350
|
+
break;
|
1351
|
+
t[n++] = 240 | d >> 18, t[n++] = 128 | d >> 12 & 63, t[n++] = 128 | d >> 6 & 63, t[n++] = 128 | d & 63;
|
1352
|
+
}
|
1353
|
+
}
|
1354
|
+
return t[n] = 0, n - s;
|
1355
|
+
}, Kn = (e, t, n) => Kt(e, z, t, n), Zt = (e) => {
|
1356
|
+
for (var t = 0, n = 0; n < e.length; ++n) {
|
1357
|
+
var o = e.charCodeAt(n);
|
1358
|
+
o <= 127 ? t++ : o <= 2047 ? t += 2 : o >= 55296 && o <= 57343 ? (t += 4, ++n) : t += 3;
|
1359
|
+
}
|
1360
|
+
return t;
|
1361
|
+
}, er = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Zn = (e, t, n) => {
|
1362
|
+
for (var o = t + n, s = t; e[s] && !(s >= o); )
|
1363
|
+
++s;
|
1364
|
+
if (s - t > 16 && e.buffer && er)
|
1365
|
+
return er.decode(e.subarray(t, s));
|
1366
|
+
for (var u = ""; t < s; ) {
|
1367
|
+
var l = e[t++];
|
1368
|
+
if (!(l & 128)) {
|
1369
|
+
u += String.fromCharCode(l);
|
1370
|
+
continue;
|
1371
|
+
}
|
1372
|
+
var d = e[t++] & 63;
|
1373
|
+
if ((l & 224) == 192) {
|
1374
|
+
u += String.fromCharCode((l & 31) << 6 | d);
|
1375
|
+
continue;
|
1376
|
+
}
|
1377
|
+
var p = e[t++] & 63;
|
1378
|
+
if ((l & 240) == 224 ? l = (l & 15) << 12 | d << 6 | p : l = (l & 7) << 18 | d << 12 | p << 6 | e[t++] & 63, l < 65536)
|
1379
|
+
u += String.fromCharCode(l);
|
1380
|
+
else {
|
1381
|
+
var g = l - 65536;
|
1382
|
+
u += String.fromCharCode(55296 | g >> 10, 56320 | g & 1023);
|
1383
|
+
}
|
1384
|
+
}
|
1385
|
+
return u;
|
1386
|
+
}, At = (e, t) => e ? Zn(z, e, t) : "", ea = (e, t) => {
|
1387
|
+
t = Y(t);
|
1388
|
+
var n = t === "std::string";
|
1389
|
+
te(e, {
|
1390
|
+
name: t,
|
1391
|
+
fromWireType(o) {
|
1392
|
+
var s = M[o >> 2], u = o + 4, l;
|
1393
|
+
if (n)
|
1394
|
+
for (var d = u, p = 0; p <= s; ++p) {
|
1395
|
+
var g = u + p;
|
1396
|
+
if (p == s || z[g] == 0) {
|
1397
|
+
var C = g - d, P = At(d, C);
|
1398
|
+
l === void 0 ? l = P : (l += "\0", l += P), d = g + 1;
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
else {
|
1402
|
+
for (var _ = new Array(s), p = 0; p < s; ++p)
|
1403
|
+
_[p] = String.fromCharCode(z[u + p]);
|
1404
|
+
l = _.join("");
|
1405
|
+
}
|
1406
|
+
return se(o), l;
|
1407
|
+
},
|
1408
|
+
toWireType(o, s) {
|
1409
|
+
s instanceof ArrayBuffer && (s = new Uint8Array(s));
|
1410
|
+
var u, l = typeof s == "string";
|
1411
|
+
l || s instanceof Uint8Array || s instanceof Uint8ClampedArray || s instanceof Int8Array || A("Cannot pass non-string to std::string"), n && l ? u = Zt(s) : u = s.length;
|
1412
|
+
var d = Dt(4 + u + 1), p = d + 4;
|
1413
|
+
if (M[d >> 2] = u, n && l)
|
1414
|
+
Kn(s, p, u + 1);
|
1415
|
+
else if (l)
|
1416
|
+
for (var g = 0; g < u; ++g) {
|
1417
|
+
var C = s.charCodeAt(g);
|
1418
|
+
C > 255 && (se(p), A("String has UTF-16 code units that do not fit in 8 bits")), z[p + g] = C;
|
1419
|
+
}
|
1420
|
+
else
|
1421
|
+
for (var g = 0; g < u; ++g)
|
1422
|
+
z[p + g] = s[g];
|
1423
|
+
return o !== null && o.push(se, d), d;
|
1424
|
+
},
|
1425
|
+
argPackAdvance: re,
|
1426
|
+
readValueFromPointer: zt,
|
1427
|
+
destructorFunction(o) {
|
1428
|
+
se(o);
|
1429
|
+
}
|
1430
|
+
});
|
1431
|
+
}, tr = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, ta = (e, t) => {
|
1432
|
+
for (var n = e, o = n >> 1, s = o + t / 2; !(o >= s) && R[o]; )
|
1433
|
+
++o;
|
1434
|
+
if (n = o << 1, n - e > 32 && tr)
|
1435
|
+
return tr.decode(z.subarray(e, n));
|
1436
|
+
for (var u = "", l = 0; !(l >= t / 2); ++l) {
|
1437
|
+
var d = ue[e + l * 2 >> 1];
|
1438
|
+
if (d == 0)
|
1439
|
+
break;
|
1440
|
+
u += String.fromCharCode(d);
|
1441
|
+
}
|
1442
|
+
return u;
|
1443
|
+
}, ra = (e, t, n) => {
|
1444
|
+
var o;
|
1445
|
+
if ((o = n) !== null && o !== void 0 || (n = 2147483647), n < 2)
|
1446
|
+
return 0;
|
1447
|
+
n -= 2;
|
1448
|
+
for (var s = t, u = n < e.length * 2 ? n / 2 : e.length, l = 0; l < u; ++l) {
|
1449
|
+
var d = e.charCodeAt(l);
|
1450
|
+
ue[t >> 1] = d, t += 2;
|
1451
|
+
}
|
1452
|
+
return ue[t >> 1] = 0, t - s;
|
1453
|
+
}, na = (e) => e.length * 2, aa = (e, t) => {
|
1454
|
+
for (var n = 0, o = ""; !(n >= t / 4); ) {
|
1455
|
+
var s = O[e + n * 4 >> 2];
|
1456
|
+
if (s == 0)
|
1457
|
+
break;
|
1458
|
+
if (++n, s >= 65536) {
|
1459
|
+
var u = s - 65536;
|
1460
|
+
o += String.fromCharCode(55296 | u >> 10, 56320 | u & 1023);
|
1461
|
+
} else
|
1462
|
+
o += String.fromCharCode(s);
|
1463
|
+
}
|
1464
|
+
return o;
|
1465
|
+
}, oa = (e, t, n) => {
|
1466
|
+
var o;
|
1467
|
+
if ((o = n) !== null && o !== void 0 || (n = 2147483647), n < 4)
|
1468
|
+
return 0;
|
1469
|
+
for (var s = t, u = s + n - 4, l = 0; l < e.length; ++l) {
|
1470
|
+
var d = e.charCodeAt(l);
|
1471
|
+
if (d >= 55296 && d <= 57343) {
|
1472
|
+
var p = e.charCodeAt(++l);
|
1473
|
+
d = 65536 + ((d & 1023) << 10) | p & 1023;
|
1474
|
+
}
|
1475
|
+
if (O[t >> 2] = d, t += 4, t + 4 > u)
|
1476
|
+
break;
|
1477
|
+
}
|
1478
|
+
return O[t >> 2] = 0, t - s;
|
1479
|
+
}, ia = (e) => {
|
1480
|
+
for (var t = 0, n = 0; n < e.length; ++n) {
|
1481
|
+
var o = e.charCodeAt(n);
|
1482
|
+
o >= 55296 && o <= 57343 && ++n, t += 4;
|
1483
|
+
}
|
1484
|
+
return t;
|
1485
|
+
}, sa = (e, t, n) => {
|
1486
|
+
n = Y(n);
|
1487
|
+
var o, s, u, l, d;
|
1488
|
+
t === 2 ? (o = ta, s = ra, l = na, u = () => R, d = 1) : t === 4 && (o = aa, s = oa, l = ia, u = () => M, d = 2), te(e, {
|
1489
|
+
name: n,
|
1490
|
+
fromWireType: (p) => {
|
1491
|
+
for (var g = M[p >> 2], C = u(), P, _ = p + 4, E = 0; E <= g; ++E) {
|
1492
|
+
var U = p + 4 + E * t;
|
1493
|
+
if (E == g || C[U >> d] == 0) {
|
1494
|
+
var V = U - _, k = o(_, V);
|
1495
|
+
P === void 0 ? P = k : (P += "\0", P += k), _ = U + t;
|
1496
|
+
}
|
1497
|
+
}
|
1498
|
+
return se(p), P;
|
1499
|
+
},
|
1500
|
+
toWireType: (p, g) => {
|
1501
|
+
typeof g != "string" && A(`Cannot pass non-string to C++ string type ${n}`);
|
1502
|
+
var C = l(g), P = Dt(4 + C + t);
|
1503
|
+
return M[P >> 2] = C >> d, s(g, P + 4, C + t), p !== null && p.push(se, P), P;
|
1504
|
+
},
|
1505
|
+
argPackAdvance: re,
|
1506
|
+
readValueFromPointer: wt,
|
1507
|
+
destructorFunction(p) {
|
1508
|
+
se(p);
|
1509
|
+
}
|
1510
|
+
});
|
1511
|
+
}, ca = (e, t, n, o, s, u) => {
|
1512
|
+
Ge[e] = {
|
1513
|
+
name: Y(t),
|
1514
|
+
rawConstructor: Z(n, o),
|
1515
|
+
rawDestructor: Z(s, u),
|
1516
|
+
fields: []
|
1517
|
+
};
|
1518
|
+
}, ua = (e, t, n, o, s, u, l, d, p, g) => {
|
1519
|
+
Ge[e].fields.push({
|
1520
|
+
fieldName: Y(t),
|
1521
|
+
getterReturnType: n,
|
1522
|
+
getter: Z(o, s),
|
1523
|
+
getterContext: u,
|
1524
|
+
setterArgumentType: l,
|
1525
|
+
setter: Z(d, p),
|
1526
|
+
setterContext: g
|
1527
|
+
});
|
1528
|
+
}, la = (e, t) => {
|
1529
|
+
t = Y(t), te(e, {
|
1530
|
+
isVoid: !0,
|
1531
|
+
name: t,
|
1532
|
+
argPackAdvance: 0,
|
1533
|
+
fromWireType: () => {
|
1534
|
+
},
|
1535
|
+
toWireType: (n, o) => {
|
1536
|
+
}
|
1537
|
+
});
|
1538
|
+
}, xt = [], da = (e, t, n, o) => (e = xt[e], t = ie.toValue(t), e(null, t, n, o)), fa = {}, ha = (e) => {
|
1539
|
+
var t = fa[e];
|
1540
|
+
return t === void 0 ? Y(e) : t;
|
1541
|
+
}, rr = () => {
|
1542
|
+
if (typeof globalThis == "object")
|
1543
|
+
return globalThis;
|
1544
|
+
function e(t) {
|
1545
|
+
t.$$$embind_global$$$ = t;
|
1546
|
+
var n = typeof $$$embind_global$$$ == "object" && t.$$$embind_global$$$ == t;
|
1547
|
+
return n || delete t.$$$embind_global$$$, n;
|
1548
|
+
}
|
1549
|
+
if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && e(global) ? $$$embind_global$$$ = global : typeof self == "object" && e(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
|
1550
|
+
return $$$embind_global$$$;
|
1551
|
+
throw Error("unable to get global object.");
|
1552
|
+
}, pa = (e) => e === 0 ? ie.toHandle(rr()) : (e = ha(e), ie.toHandle(rr()[e])), va = (e) => {
|
1553
|
+
var t = xt.length;
|
1554
|
+
return xt.push(e), t;
|
1555
|
+
}, ma = (e, t) => {
|
1556
|
+
for (var n = new Array(e), o = 0; o < e; ++o)
|
1557
|
+
n[o] = Ot(M[t + o * 4 >> 2], "parameter " + o);
|
1558
|
+
return n;
|
1559
|
+
}, ya = Reflect.construct, ga = (e, t, n) => {
|
1560
|
+
var o = [], s = e.toWireType(o, n);
|
1561
|
+
return o.length && (M[t >> 2] = ie.toHandle(o)), s;
|
1562
|
+
}, wa = (e, t, n) => {
|
1563
|
+
var o = ma(e, t), s = o.shift();
|
1564
|
+
e--;
|
1565
|
+
var u = new Array(e), l = (p, g, C, P) => {
|
1566
|
+
for (var _ = 0, E = 0; E < e; ++E)
|
1567
|
+
u[E] = o[E].readValueFromPointer(P + _), _ += o[E].argPackAdvance;
|
1568
|
+
for (var U = n === 1 ? ya(g, u) : g.apply(p, u), E = 0; E < e; ++E) {
|
1569
|
+
var V, k;
|
1570
|
+
(V = (k = o[E]).deleteObject) === null || V === void 0 || V.call(k, u[E]);
|
1571
|
+
}
|
1572
|
+
return ga(s, C, U);
|
1573
|
+
}, d = `methodCaller<(${o.map((p) => p.name).join(", ")}) => ${s.name}>`;
|
1574
|
+
return va(ke(d, l));
|
1575
|
+
}, ba = (e) => {
|
1576
|
+
e > 4 && (K.get(e).refcount += 1);
|
1577
|
+
}, Ca = (e) => {
|
1578
|
+
var t = ie.toValue(e);
|
1579
|
+
gt(t), Et(e);
|
1580
|
+
}, Ta = (e, t) => {
|
1581
|
+
e = Ot(e, "_emval_take_value");
|
1582
|
+
var n = e.readValueFromPointer(t);
|
1583
|
+
return ie.toHandle(n);
|
1584
|
+
}, $a = () => {
|
1585
|
+
X("");
|
1586
|
+
}, Sa = (e, t, n) => z.copyWithin(e, t, t + n), Pa = () => 2147483648, _a = (e) => {
|
1587
|
+
var t = x.buffer, n = (e - t.byteLength + 65535) / 65536;
|
1588
|
+
try {
|
1589
|
+
return x.grow(n), be(), 1;
|
1590
|
+
} catch {
|
1591
|
+
}
|
1592
|
+
}, Ea = (e) => {
|
1593
|
+
var t = z.length;
|
1594
|
+
e >>>= 0;
|
1595
|
+
var n = Pa();
|
1596
|
+
if (e > n)
|
1597
|
+
return !1;
|
1598
|
+
for (var o = (p, g) => p + (g - p % g) % g, s = 1; s <= 4; s *= 2) {
|
1599
|
+
var u = t * (1 + 0.2 / s);
|
1600
|
+
u = Math.min(u, e + 100663296);
|
1601
|
+
var l = Math.min(n, o(Math.max(e, u), 65536)), d = _a(l);
|
1602
|
+
if (d)
|
1603
|
+
return !0;
|
1604
|
+
}
|
1605
|
+
return !1;
|
1606
|
+
}, jt = {}, Oa = () => y || "./this.program", Fe = () => {
|
1607
|
+
if (!Fe.strings) {
|
1608
|
+
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = {
|
1609
|
+
USER: "web_user",
|
1610
|
+
LOGNAME: "web_user",
|
1611
|
+
PATH: "/",
|
1612
|
+
PWD: "/",
|
1613
|
+
HOME: "/home/web_user",
|
1614
|
+
LANG: e,
|
1615
|
+
_: Oa()
|
1616
|
+
};
|
1617
|
+
for (var n in jt)
|
1618
|
+
jt[n] === void 0 ? delete t[n] : t[n] = jt[n];
|
1619
|
+
var o = [];
|
1620
|
+
for (var n in t)
|
1621
|
+
o.push(`${n}=${t[n]}`);
|
1622
|
+
Fe.strings = o;
|
1623
|
+
}
|
1624
|
+
return Fe.strings;
|
1625
|
+
}, Ma = (e, t) => {
|
1626
|
+
for (var n = 0; n < e.length; ++n)
|
1627
|
+
I[t++ >> 0] = e.charCodeAt(n);
|
1628
|
+
I[t >> 0] = 0;
|
1629
|
+
}, Aa = (e, t) => {
|
1630
|
+
var n = 0;
|
1631
|
+
return Fe().forEach((o, s) => {
|
1632
|
+
var u = t + n;
|
1633
|
+
M[e + s * 4 >> 2] = u, Ma(o, u), n += o.length + 1;
|
1634
|
+
}), 0;
|
1635
|
+
}, xa = (e, t) => {
|
1636
|
+
var n = Fe();
|
1637
|
+
M[e >> 2] = n.length;
|
1638
|
+
var o = 0;
|
1639
|
+
return n.forEach((s) => o += s.length + 1), M[t >> 2] = o, 0;
|
1640
|
+
}, ja = (e) => e, et = (e) => e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0), Da = (e, t) => {
|
1641
|
+
for (var n = 0, o = 0; o <= t; n += e[o++])
|
1642
|
+
;
|
1643
|
+
return n;
|
1644
|
+
}, nr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ar = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ra = (e, t) => {
|
1645
|
+
for (var n = new Date(e.getTime()); t > 0; ) {
|
1646
|
+
var o = et(n.getFullYear()), s = n.getMonth(), u = (o ? nr : ar)[s];
|
1647
|
+
if (t > u - n.getDate())
|
1648
|
+
t -= u - n.getDate() + 1, n.setDate(1), s < 11 ? n.setMonth(s + 1) : (n.setMonth(0), n.setFullYear(n.getFullYear() + 1));
|
1649
|
+
else
|
1650
|
+
return n.setDate(n.getDate() + t), n;
|
1651
|
+
}
|
1652
|
+
return n;
|
1653
|
+
};
|
1654
|
+
function ka(e, t, n) {
|
1655
|
+
var o = n > 0 ? n : Zt(e) + 1, s = new Array(o), u = Kt(e, s, 0, s.length);
|
1656
|
+
return t && (s.length = u), s;
|
1657
|
+
}
|
1658
|
+
var Fa = (e, t) => {
|
1659
|
+
I.set(e, t);
|
1660
|
+
}, Ia = (e, t, n, o) => {
|
1661
|
+
var s = M[o + 40 >> 2], u = {
|
1662
|
+
tm_sec: O[o >> 2],
|
1663
|
+
tm_min: O[o + 4 >> 2],
|
1664
|
+
tm_hour: O[o + 8 >> 2],
|
1665
|
+
tm_mday: O[o + 12 >> 2],
|
1666
|
+
tm_mon: O[o + 16 >> 2],
|
1667
|
+
tm_year: O[o + 20 >> 2],
|
1668
|
+
tm_wday: O[o + 24 >> 2],
|
1669
|
+
tm_yday: O[o + 28 >> 2],
|
1670
|
+
tm_isdst: O[o + 32 >> 2],
|
1671
|
+
tm_gmtoff: O[o + 36 >> 2],
|
1672
|
+
tm_zone: s ? At(s) : ""
|
1673
|
+
}, l = At(n), d = {
|
1674
|
+
"%c": "%a %b %d %H:%M:%S %Y",
|
1675
|
+
"%D": "%m/%d/%y",
|
1676
|
+
"%F": "%Y-%m-%d",
|
1677
|
+
"%h": "%b",
|
1678
|
+
"%r": "%I:%M:%S %p",
|
1679
|
+
"%R": "%H:%M",
|
1680
|
+
"%T": "%H:%M:%S",
|
1681
|
+
"%x": "%m/%d/%y",
|
1682
|
+
"%X": "%H:%M:%S",
|
1683
|
+
"%Ec": "%c",
|
1684
|
+
"%EC": "%C",
|
1685
|
+
"%Ex": "%m/%d/%y",
|
1686
|
+
"%EX": "%H:%M:%S",
|
1687
|
+
"%Ey": "%y",
|
1688
|
+
"%EY": "%Y",
|
1689
|
+
"%Od": "%d",
|
1690
|
+
"%Oe": "%e",
|
1691
|
+
"%OH": "%H",
|
1692
|
+
"%OI": "%I",
|
1693
|
+
"%Om": "%m",
|
1694
|
+
"%OM": "%M",
|
1695
|
+
"%OS": "%S",
|
1696
|
+
"%Ou": "%u",
|
1697
|
+
"%OU": "%U",
|
1698
|
+
"%OV": "%V",
|
1699
|
+
"%Ow": "%w",
|
1700
|
+
"%OW": "%W",
|
1701
|
+
"%Oy": "%y"
|
1702
|
+
};
|
1703
|
+
for (var p in d)
|
1704
|
+
l = l.replace(new RegExp(p, "g"), d[p]);
|
1705
|
+
var g = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], C = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
1706
|
+
function P(m, $, B) {
|
1707
|
+
for (var J = typeof m == "number" ? m.toString() : m || ""; J.length < $; )
|
1708
|
+
J = B[0] + J;
|
1709
|
+
return J;
|
1710
|
+
}
|
1711
|
+
function _(m, $) {
|
1712
|
+
return P(m, $, "0");
|
1713
|
+
}
|
1714
|
+
function E(m, $) {
|
1715
|
+
function B(Se) {
|
1716
|
+
return Se < 0 ? -1 : Se > 0 ? 1 : 0;
|
1717
|
+
}
|
1718
|
+
var J;
|
1719
|
+
return (J = B(m.getFullYear() - $.getFullYear())) === 0 && (J = B(m.getMonth() - $.getMonth())) === 0 && (J = B(m.getDate() - $.getDate())), J;
|
1720
|
+
}
|
1721
|
+
function U(m) {
|
1722
|
+
switch (m.getDay()) {
|
1723
|
+
case 0:
|
1724
|
+
return new Date(m.getFullYear() - 1, 11, 29);
|
1725
|
+
case 1:
|
1726
|
+
return m;
|
1727
|
+
case 2:
|
1728
|
+
return new Date(m.getFullYear(), 0, 3);
|
1729
|
+
case 3:
|
1730
|
+
return new Date(m.getFullYear(), 0, 2);
|
1731
|
+
case 4:
|
1732
|
+
return new Date(m.getFullYear(), 0, 1);
|
1733
|
+
case 5:
|
1734
|
+
return new Date(m.getFullYear() - 1, 11, 31);
|
1735
|
+
case 6:
|
1736
|
+
return new Date(m.getFullYear() - 1, 11, 30);
|
1737
|
+
}
|
1738
|
+
}
|
1739
|
+
function V(m) {
|
1740
|
+
var $ = Ra(new Date(m.tm_year + 1900, 0, 1), m.tm_yday), B = new Date($.getFullYear(), 0, 4), J = new Date($.getFullYear() + 1, 0, 4), Se = U(B), rt = U(J);
|
1741
|
+
return E(Se, $) <= 0 ? E(rt, $) <= 0 ? $.getFullYear() + 1 : $.getFullYear() : $.getFullYear() - 1;
|
1742
|
+
}
|
1743
|
+
var k = {
|
1744
|
+
"%a": (m) => g[m.tm_wday].substring(0, 3),
|
1745
|
+
"%A": (m) => g[m.tm_wday],
|
1746
|
+
"%b": (m) => C[m.tm_mon].substring(0, 3),
|
1747
|
+
"%B": (m) => C[m.tm_mon],
|
1748
|
+
"%C": (m) => {
|
1749
|
+
var $ = m.tm_year + 1900;
|
1750
|
+
return _($ / 100 | 0, 2);
|
1751
|
+
},
|
1752
|
+
"%d": (m) => _(m.tm_mday, 2),
|
1753
|
+
"%e": (m) => P(m.tm_mday, 2, " "),
|
1754
|
+
"%g": (m) => V(m).toString().substring(2),
|
1755
|
+
"%G": (m) => V(m),
|
1756
|
+
"%H": (m) => _(m.tm_hour, 2),
|
1757
|
+
"%I": (m) => {
|
1758
|
+
var $ = m.tm_hour;
|
1759
|
+
return $ == 0 ? $ = 12 : $ > 12 && ($ -= 12), _($, 2);
|
1760
|
+
},
|
1761
|
+
"%j": (m) => _(m.tm_mday + Da(et(m.tm_year + 1900) ? nr : ar, m.tm_mon - 1), 3),
|
1762
|
+
"%m": (m) => _(m.tm_mon + 1, 2),
|
1763
|
+
"%M": (m) => _(m.tm_min, 2),
|
1764
|
+
"%n": () => `
|
1765
|
+
`,
|
1766
|
+
"%p": (m) => m.tm_hour >= 0 && m.tm_hour < 12 ? "AM" : "PM",
|
1767
|
+
"%S": (m) => _(m.tm_sec, 2),
|
1768
|
+
"%t": () => " ",
|
1769
|
+
"%u": (m) => m.tm_wday || 7,
|
1770
|
+
"%U": (m) => {
|
1771
|
+
var $ = m.tm_yday + 7 - m.tm_wday;
|
1772
|
+
return _(Math.floor($ / 7), 2);
|
1773
|
+
},
|
1774
|
+
"%V": (m) => {
|
1775
|
+
var $ = Math.floor((m.tm_yday + 7 - (m.tm_wday + 6) % 7) / 7);
|
1776
|
+
if ((m.tm_wday + 371 - m.tm_yday - 2) % 7 <= 2 && $++, $) {
|
1777
|
+
if ($ == 53) {
|
1778
|
+
var B = (m.tm_wday + 371 - m.tm_yday) % 7;
|
1779
|
+
B != 4 && (B != 3 || !et(m.tm_year)) && ($ = 1);
|
1780
|
+
}
|
1781
|
+
} else {
|
1782
|
+
$ = 52;
|
1783
|
+
var J = (m.tm_wday + 7 - m.tm_yday - 1) % 7;
|
1784
|
+
(J == 4 || J == 5 && et(m.tm_year % 400 - 1)) && $++;
|
1785
|
+
}
|
1786
|
+
return _($, 2);
|
1787
|
+
},
|
1788
|
+
"%w": (m) => m.tm_wday,
|
1789
|
+
"%W": (m) => {
|
1790
|
+
var $ = m.tm_yday + 7 - (m.tm_wday + 6) % 7;
|
1791
|
+
return _(Math.floor($ / 7), 2);
|
1792
|
+
},
|
1793
|
+
"%y": (m) => (m.tm_year + 1900).toString().substring(2),
|
1794
|
+
"%Y": (m) => m.tm_year + 1900,
|
1795
|
+
"%z": (m) => {
|
1796
|
+
var $ = m.tm_gmtoff, B = $ >= 0;
|
1797
|
+
return $ = Math.abs($) / 60, $ = $ / 60 * 100 + $ % 60, (B ? "+" : "-") + ("0000" + $).slice(-4);
|
1798
|
+
},
|
1799
|
+
"%Z": (m) => m.tm_zone,
|
1800
|
+
"%%": () => "%"
|
1801
|
+
};
|
1802
|
+
l = l.replace(/%%/g, "\0\0");
|
1803
|
+
for (var p in k)
|
1804
|
+
l.includes(p) && (l = l.replace(new RegExp(p, "g"), k[p](u)));
|
1805
|
+
l = l.replace(/\0\0/g, "%");
|
1806
|
+
var q = ka(l, !1);
|
1807
|
+
return q.length > t ? 0 : (Fa(q, e), q.length - 1);
|
1808
|
+
}, Wa = (e, t, n, o, s) => Ia(e, t, n, o);
|
1809
|
+
Wt = a.InternalError = class extends Error {
|
1810
|
+
constructor(e) {
|
1811
|
+
super(e), this.name = "InternalError";
|
1812
|
+
}
|
1813
|
+
}, ln(), $e = a.BindingError = class extends Error {
|
1814
|
+
constructor(e) {
|
1815
|
+
super(e), this.name = "BindingError";
|
1816
|
+
}
|
1817
|
+
}, Tn(), gn(), An(), Yt = a.UnboundTypeError = Rn(Error, "UnboundTypeError"), Un(), Hn();
|
1818
|
+
var Ua = {
|
1819
|
+
s: Kr,
|
1820
|
+
u: Zr,
|
1821
|
+
b: tn,
|
1822
|
+
g: rn,
|
1823
|
+
q: nn,
|
1824
|
+
J: an,
|
1825
|
+
f: on,
|
1826
|
+
V: sn,
|
1827
|
+
d: en,
|
1828
|
+
da: cn,
|
1829
|
+
Q: un,
|
1830
|
+
_: fn,
|
1831
|
+
ca: kn,
|
1832
|
+
ba: In,
|
1833
|
+
w: Wn,
|
1834
|
+
Y: Nn,
|
1835
|
+
x: Bn,
|
1836
|
+
h: zn,
|
1837
|
+
L: Jn,
|
1838
|
+
M: Yn,
|
1839
|
+
t: Qn,
|
1840
|
+
o: Xn,
|
1841
|
+
K: ea,
|
1842
|
+
C: sa,
|
1843
|
+
A: ca,
|
1844
|
+
ea: ua,
|
1845
|
+
$: la,
|
1846
|
+
R: da,
|
1847
|
+
ha: Et,
|
1848
|
+
fa: pa,
|
1849
|
+
Z: wa,
|
1850
|
+
N: ba,
|
1851
|
+
O: Ca,
|
1852
|
+
aa: Ta,
|
1853
|
+
B: $a,
|
1854
|
+
X: Sa,
|
1855
|
+
W: Ea,
|
1856
|
+
T: Aa,
|
1857
|
+
U: xa,
|
1858
|
+
E: to,
|
1859
|
+
D: Ba,
|
1860
|
+
F: eo,
|
1861
|
+
n: ro,
|
1862
|
+
a: La,
|
1863
|
+
e: Ga,
|
1864
|
+
m: Va,
|
1865
|
+
k: Ya,
|
1866
|
+
H: Ka,
|
1867
|
+
v: Qa,
|
1868
|
+
G: Za,
|
1869
|
+
z: ao,
|
1870
|
+
P: io,
|
1871
|
+
l: Ja,
|
1872
|
+
j: za,
|
1873
|
+
c: Na,
|
1874
|
+
p: Ha,
|
1875
|
+
I: Xa,
|
1876
|
+
r: no,
|
1877
|
+
i: qa,
|
1878
|
+
y: oo,
|
1879
|
+
ga: ja,
|
1880
|
+
S: Wa
|
1881
|
+
}, G = Xr(), se = a._free = (e) => (se = a._free = G.ka)(e), Dt = a._malloc = (e) => (Dt = a._malloc = G.la)(e), or = (e) => (or = G.na)(e), W = (e, t) => (W = G.oa)(e, t), Ie = (e) => (Ie = G.pa)(e), H = () => (H = G.qa)(), N = (e) => (N = G.ra)(e), ir = (e) => (ir = G.sa)(e), sr = (e) => (sr = G.ta)(e), cr = (e, t, n) => (cr = G.ua)(e, t, n), ur = (e) => (ur = G.va)(e);
|
1882
|
+
a.dynCall_viijii = (e, t, n, o, s, u, l) => (a.dynCall_viijii = G.wa)(e, t, n, o, s, u, l);
|
1883
|
+
var lr = a.dynCall_jiiii = (e, t, n, o, s) => (lr = a.dynCall_jiiii = G.xa)(e, t, n, o, s);
|
1884
|
+
a.dynCall_iiiiij = (e, t, n, o, s, u, l) => (a.dynCall_iiiiij = G.ya)(e, t, n, o, s, u, l), a.dynCall_iiiiijj = (e, t, n, o, s, u, l, d, p) => (a.dynCall_iiiiijj = G.za)(e, t, n, o, s, u, l, d, p), a.dynCall_iiiiiijj = (e, t, n, o, s, u, l, d, p, g) => (a.dynCall_iiiiiijj = G.Aa)(e, t, n, o, s, u, l, d, p, g);
|
1885
|
+
function La(e, t) {
|
1886
|
+
var n = H();
|
1887
|
+
try {
|
1888
|
+
return L(e)(t);
|
1889
|
+
} catch (o) {
|
1890
|
+
if (N(n), o !== o + 0)
|
1891
|
+
throw o;
|
1892
|
+
W(1, 0);
|
1893
|
+
}
|
1894
|
+
}
|
1895
|
+
function Ha(e, t, n, o) {
|
1896
|
+
var s = H();
|
1897
|
+
try {
|
1898
|
+
L(e)(t, n, o);
|
1899
|
+
} catch (u) {
|
1900
|
+
if (N(s), u !== u + 0)
|
1901
|
+
throw u;
|
1902
|
+
W(1, 0);
|
1903
|
+
}
|
1904
|
+
}
|
1905
|
+
function Na(e, t, n) {
|
1906
|
+
var o = H();
|
1907
|
+
try {
|
1908
|
+
L(e)(t, n);
|
1909
|
+
} catch (s) {
|
1910
|
+
if (N(o), s !== s + 0)
|
1911
|
+
throw s;
|
1912
|
+
W(1, 0);
|
1913
|
+
}
|
1914
|
+
}
|
1915
|
+
function Va(e, t, n, o) {
|
1916
|
+
var s = H();
|
1917
|
+
try {
|
1918
|
+
return L(e)(t, n, o);
|
1919
|
+
} catch (u) {
|
1920
|
+
if (N(s), u !== u + 0)
|
1921
|
+
throw u;
|
1922
|
+
W(1, 0);
|
1923
|
+
}
|
1924
|
+
}
|
1925
|
+
function Ba(e, t, n, o, s) {
|
1926
|
+
var u = H();
|
1927
|
+
try {
|
1928
|
+
return L(e)(t, n, o, s);
|
1929
|
+
} catch (l) {
|
1930
|
+
if (N(u), l !== l + 0)
|
1931
|
+
throw l;
|
1932
|
+
W(1, 0);
|
1933
|
+
}
|
1934
|
+
}
|
1935
|
+
function za(e, t) {
|
1936
|
+
var n = H();
|
1937
|
+
try {
|
1938
|
+
L(e)(t);
|
1939
|
+
} catch (o) {
|
1940
|
+
if (N(n), o !== o + 0)
|
1941
|
+
throw o;
|
1942
|
+
W(1, 0);
|
1943
|
+
}
|
1944
|
+
}
|
1945
|
+
function Ga(e, t, n) {
|
1946
|
+
var o = H();
|
1947
|
+
try {
|
1948
|
+
return L(e)(t, n);
|
1949
|
+
} catch (s) {
|
1950
|
+
if (N(o), s !== s + 0)
|
1951
|
+
throw s;
|
1952
|
+
W(1, 0);
|
1953
|
+
}
|
1954
|
+
}
|
1955
|
+
function Ja(e) {
|
1956
|
+
var t = H();
|
1957
|
+
try {
|
1958
|
+
L(e)();
|
1959
|
+
} catch (n) {
|
1960
|
+
if (N(t), n !== n + 0)
|
1961
|
+
throw n;
|
1962
|
+
W(1, 0);
|
1963
|
+
}
|
1964
|
+
}
|
1965
|
+
function Ya(e, t, n, o, s) {
|
1966
|
+
var u = H();
|
1967
|
+
try {
|
1968
|
+
return L(e)(t, n, o, s);
|
1969
|
+
} catch (l) {
|
1970
|
+
if (N(u), l !== l + 0)
|
1971
|
+
throw l;
|
1972
|
+
W(1, 0);
|
1973
|
+
}
|
1974
|
+
}
|
1975
|
+
function qa(e, t, n, o, s, u, l, d, p, g, C) {
|
1976
|
+
var P = H();
|
1977
|
+
try {
|
1978
|
+
L(e)(t, n, o, s, u, l, d, p, g, C);
|
1979
|
+
} catch (_) {
|
1980
|
+
if (N(P), _ !== _ + 0)
|
1981
|
+
throw _;
|
1982
|
+
W(1, 0);
|
1983
|
+
}
|
1984
|
+
}
|
1985
|
+
function Qa(e, t, n, o, s, u, l) {
|
1986
|
+
var d = H();
|
1987
|
+
try {
|
1988
|
+
return L(e)(t, n, o, s, u, l);
|
1989
|
+
} catch (p) {
|
1990
|
+
if (N(d), p !== p + 0)
|
1991
|
+
throw p;
|
1992
|
+
W(1, 0);
|
1993
|
+
}
|
1994
|
+
}
|
1995
|
+
function Xa(e, t, n, o, s) {
|
1996
|
+
var u = H();
|
1997
|
+
try {
|
1998
|
+
L(e)(t, n, o, s);
|
1999
|
+
} catch (l) {
|
2000
|
+
if (N(u), l !== l + 0)
|
2001
|
+
throw l;
|
2002
|
+
W(1, 0);
|
2003
|
+
}
|
2004
|
+
}
|
2005
|
+
function Ka(e, t, n, o, s, u) {
|
2006
|
+
var l = H();
|
2007
|
+
try {
|
2008
|
+
return L(e)(t, n, o, s, u);
|
2009
|
+
} catch (d) {
|
2010
|
+
if (N(l), d !== d + 0)
|
2011
|
+
throw d;
|
2012
|
+
W(1, 0);
|
2013
|
+
}
|
2014
|
+
}
|
2015
|
+
function Za(e, t, n, o, s, u, l, d) {
|
2016
|
+
var p = H();
|
2017
|
+
try {
|
2018
|
+
return L(e)(t, n, o, s, u, l, d);
|
2019
|
+
} catch (g) {
|
2020
|
+
if (N(p), g !== g + 0)
|
2021
|
+
throw g;
|
2022
|
+
W(1, 0);
|
2023
|
+
}
|
2024
|
+
}
|
2025
|
+
function eo(e, t, n, o) {
|
2026
|
+
var s = H();
|
2027
|
+
try {
|
2028
|
+
return L(e)(t, n, o);
|
2029
|
+
} catch (u) {
|
2030
|
+
if (N(s), u !== u + 0)
|
2031
|
+
throw u;
|
2032
|
+
W(1, 0);
|
2033
|
+
}
|
2034
|
+
}
|
2035
|
+
function to(e, t, n, o) {
|
2036
|
+
var s = H();
|
2037
|
+
try {
|
2038
|
+
return L(e)(t, n, o);
|
2039
|
+
} catch (u) {
|
2040
|
+
if (N(s), u !== u + 0)
|
2041
|
+
throw u;
|
2042
|
+
W(1, 0);
|
2043
|
+
}
|
2044
|
+
}
|
2045
|
+
function ro(e) {
|
2046
|
+
var t = H();
|
2047
|
+
try {
|
2048
|
+
return L(e)();
|
2049
|
+
} catch (n) {
|
2050
|
+
if (N(t), n !== n + 0)
|
2051
|
+
throw n;
|
2052
|
+
W(1, 0);
|
2053
|
+
}
|
2054
|
+
}
|
2055
|
+
function no(e, t, n, o, s, u, l, d) {
|
2056
|
+
var p = H();
|
2057
|
+
try {
|
2058
|
+
L(e)(t, n, o, s, u, l, d);
|
2059
|
+
} catch (g) {
|
2060
|
+
if (N(p), g !== g + 0)
|
2061
|
+
throw g;
|
2062
|
+
W(1, 0);
|
2063
|
+
}
|
2064
|
+
}
|
2065
|
+
function ao(e, t, n, o, s, u, l, d, p, g, C, P) {
|
2066
|
+
var _ = H();
|
2067
|
+
try {
|
2068
|
+
return L(e)(t, n, o, s, u, l, d, p, g, C, P);
|
2069
|
+
} catch (E) {
|
2070
|
+
if (N(_), E !== E + 0)
|
2071
|
+
throw E;
|
2072
|
+
W(1, 0);
|
2073
|
+
}
|
2074
|
+
}
|
2075
|
+
function oo(e, t, n, o, s, u, l, d, p, g, C, P, _, E, U, V) {
|
2076
|
+
var k = H();
|
2077
|
+
try {
|
2078
|
+
L(e)(t, n, o, s, u, l, d, p, g, C, P, _, E, U, V);
|
2079
|
+
} catch (q) {
|
2080
|
+
if (N(k), q !== q + 0)
|
2081
|
+
throw q;
|
2082
|
+
W(1, 0);
|
2083
|
+
}
|
2084
|
+
}
|
2085
|
+
function io(e, t, n, o, s) {
|
2086
|
+
var u = H();
|
2087
|
+
try {
|
2088
|
+
return lr(e, t, n, o, s);
|
2089
|
+
} catch (l) {
|
2090
|
+
if (N(u), l !== l + 0)
|
2091
|
+
throw l;
|
2092
|
+
W(1, 0);
|
2093
|
+
}
|
2094
|
+
}
|
2095
|
+
var tt;
|
2096
|
+
me = function e() {
|
2097
|
+
tt || dr(), tt || (me = e);
|
2098
|
+
};
|
2099
|
+
function dr() {
|
2100
|
+
if (ee > 0 || (Le(), ee > 0))
|
2101
|
+
return;
|
2102
|
+
function e() {
|
2103
|
+
tt || (tt = !0, a.calledRun = !0, !F && (ct(), c(a), a.onRuntimeInitialized && a.onRuntimeInitialized(), ut()));
|
2104
|
+
}
|
2105
|
+
a.setStatus ? (a.setStatus("Running..."), setTimeout(function() {
|
2106
|
+
setTimeout(function() {
|
2107
|
+
a.setStatus("");
|
2108
|
+
}, 1), e();
|
2109
|
+
}, 1)) : e();
|
2110
|
+
}
|
2111
|
+
if (a.preInit)
|
2112
|
+
for (typeof a.preInit == "function" && (a.preInit = [a.preInit]); a.preInit.length > 0; )
|
2113
|
+
a.preInit.pop()();
|
2114
|
+
return dr(), i.ready;
|
2115
|
+
};
|
2116
|
+
})();
|
2117
|
+
function Vo(r) {
|
2118
|
+
return Ft(
|
2119
|
+
It,
|
2120
|
+
r
|
2121
|
+
);
|
2122
|
+
}
|
2123
|
+
async function Bo(r, i) {
|
2124
|
+
return Ho(
|
2125
|
+
It,
|
2126
|
+
r,
|
2127
|
+
i
|
2128
|
+
);
|
2129
|
+
}
|
2130
|
+
async function zo(r, i) {
|
2131
|
+
return No(
|
2132
|
+
It,
|
2133
|
+
r,
|
2134
|
+
i
|
2135
|
+
);
|
2136
|
+
}
|
2137
|
+
var Ue;
|
2138
|
+
class Fr extends EventTarget {
|
2139
|
+
constructor(i = {}) {
|
2140
|
+
var a;
|
2141
|
+
super(), yo(this, Ue, void 0);
|
2142
|
+
try {
|
2143
|
+
const c = (a = i == null ? void 0 : i.formats) == null ? void 0 : a.filter(
|
2144
|
+
(f) => f !== "unknown"
|
2145
|
+
);
|
2146
|
+
if ((c == null ? void 0 : c.length) === 0)
|
2147
|
+
throw new TypeError("Hint option provided, but is empty.");
|
2148
|
+
c == null || c.forEach((f) => {
|
2149
|
+
if (!ot.has(f))
|
2150
|
+
throw new TypeError(
|
2151
|
+
`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`
|
2152
|
+
);
|
2153
|
+
}), go(this, Ue, c ?? []), Vo().then((f) => {
|
2154
|
+
this.dispatchEvent(
|
2155
|
+
new CustomEvent("load", {
|
2156
|
+
detail: f
|
2157
|
+
})
|
2158
|
+
);
|
2159
|
+
}).catch((f) => {
|
2160
|
+
this.dispatchEvent(new CustomEvent("error", { detail: f }));
|
2161
|
+
});
|
2162
|
+
} catch (c) {
|
2163
|
+
throw vr(
|
2164
|
+
c,
|
2165
|
+
"Failed to construct 'BarcodeDetector'"
|
2166
|
+
);
|
2167
|
+
}
|
2168
|
+
}
|
2169
|
+
static async getSupportedFormats() {
|
2170
|
+
return wo.filter((i) => i !== "unknown");
|
2171
|
+
}
|
2172
|
+
async detect(i) {
|
2173
|
+
try {
|
2174
|
+
const a = await _o(i);
|
2175
|
+
if (a === null)
|
2176
|
+
return [];
|
2177
|
+
let c;
|
2178
|
+
try {
|
2179
|
+
jr(a) ? c = await Bo(a, {
|
2180
|
+
tryHarder: !0,
|
2181
|
+
formats: pr(this, Ue).map((f) => ot.get(f))
|
2182
|
+
}) : c = await zo(a, {
|
2183
|
+
tryHarder: !0,
|
2184
|
+
formats: pr(this, Ue).map((f) => ot.get(f))
|
2185
|
+
});
|
2186
|
+
} catch (f) {
|
2187
|
+
throw console.error(f), new DOMException(
|
2188
|
+
"Barcode detection service unavailable.",
|
2189
|
+
"NotSupportedError"
|
2190
|
+
);
|
2191
|
+
}
|
2192
|
+
return c.map((f) => {
|
2193
|
+
const {
|
2194
|
+
topLeft: { x: v, y },
|
2195
|
+
topRight: { x: S, y: h },
|
2196
|
+
bottomLeft: { x: w, y: T },
|
2197
|
+
bottomRight: { x: b, y: j }
|
2198
|
+
} = f.position, D = Math.min(v, S, w, b), x = Math.min(y, h, T, j), F = Math.max(v, S, w, b), I = Math.max(y, h, T, j);
|
2199
|
+
return {
|
2200
|
+
boundingBox: new DOMRectReadOnly(
|
2201
|
+
D,
|
2202
|
+
x,
|
2203
|
+
F - D,
|
2204
|
+
I - x
|
2205
|
+
),
|
2206
|
+
rawValue: f.text,
|
2207
|
+
format: bo(f.format),
|
2208
|
+
cornerPoints: [
|
2209
|
+
{
|
2210
|
+
x: v,
|
2211
|
+
y
|
2212
|
+
},
|
2213
|
+
{
|
2214
|
+
x: S,
|
2215
|
+
y: h
|
2216
|
+
},
|
2217
|
+
{
|
2218
|
+
x: b,
|
2219
|
+
y: j
|
2220
|
+
},
|
2221
|
+
{
|
2222
|
+
x: w,
|
2223
|
+
y: T
|
2224
|
+
}
|
2225
|
+
]
|
2226
|
+
};
|
2227
|
+
});
|
2228
|
+
} catch (a) {
|
2229
|
+
throw vr(
|
2230
|
+
a,
|
2231
|
+
"Failed to execute 'detect' on 'BarcodeDetector'"
|
2232
|
+
);
|
2233
|
+
}
|
2234
|
+
}
|
2235
|
+
}
|
2236
|
+
Ue = /* @__PURE__ */ new WeakMap();
|
2237
|
+
const Ir = (r, i, a = "error") => {
|
2238
|
+
let c, f;
|
2239
|
+
const v = new Promise(
|
2240
|
+
(y, S) => {
|
2241
|
+
c = y, f = S, r.addEventListener(i, c), r.addEventListener(a, f);
|
2242
|
+
}
|
2243
|
+
);
|
2244
|
+
return v.finally(() => {
|
2245
|
+
r.removeEventListener(i, c), r.removeEventListener(a, f);
|
2246
|
+
}), v;
|
2247
|
+
}, wr = (r) => new Promise((i) => setTimeout(i, r));
|
2248
|
+
class Wr extends Error {
|
2249
|
+
constructor() {
|
2250
|
+
super("this browser has no Stream API support"), this.name = "StreamApiNotSupportedError";
|
2251
|
+
}
|
2252
|
+
}
|
2253
|
+
class Go extends Error {
|
2254
|
+
constructor() {
|
2255
|
+
super(
|
2256
|
+
"camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."
|
2257
|
+
), this.name = "InsecureContextError";
|
2258
|
+
}
|
2259
|
+
}
|
2260
|
+
class Jo extends Error {
|
2261
|
+
constructor() {
|
2262
|
+
super(
|
2263
|
+
"Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"
|
2264
|
+
), this.name = "StreamLoadTimeoutError";
|
2265
|
+
}
|
2266
|
+
}
|
2267
|
+
let kt;
|
2268
|
+
const Yo = (r) => {
|
2269
|
+
kt = new Fr({ formats: r });
|
2270
|
+
}, qo = async (r, {
|
2271
|
+
detectHandler: i,
|
2272
|
+
locateHandler: a,
|
2273
|
+
minDelay: c,
|
2274
|
+
formats: f
|
2275
|
+
}) => {
|
2276
|
+
kt = new Fr({ formats: f });
|
2277
|
+
const v = (y) => async (S) => {
|
2278
|
+
if (r.readyState > 1) {
|
2279
|
+
const { lastScanned: h, contentBefore: w, lastScanHadContent: T } = y;
|
2280
|
+
if (S - h < c)
|
2281
|
+
window.requestAnimationFrame(v(y));
|
2282
|
+
else {
|
2283
|
+
const b = await kt.detect(r), j = b.some((F) => !w.includes(F.rawValue));
|
2284
|
+
j && i(b);
|
2285
|
+
const D = b.length > 0;
|
2286
|
+
D && a(b), !D && T && a(b);
|
2287
|
+
const x = {
|
2288
|
+
lastScanned: S,
|
2289
|
+
lastScanHadContent: D,
|
2290
|
+
// It can happen that a QR code is constantly in view of the camera but
|
2291
|
+
// maybe a scanned frame is a bit blurry and we detect nothing but in the
|
2292
|
+
// next frame we detect the code again. We also want to avoid emitting
|
2293
|
+
// a `detect` event in such a case. So we don't reset `contentBefore`,
|
2294
|
+
// if we detect nothing, only if we detect something new.
|
2295
|
+
contentBefore: j ? b.map((F) => F.rawValue) : w
|
2296
|
+
};
|
2297
|
+
window.requestAnimationFrame(v(x));
|
2298
|
+
}
|
2299
|
+
}
|
2300
|
+
};
|
2301
|
+
v({
|
2302
|
+
lastScanned: performance.now(),
|
2303
|
+
contentBefore: [],
|
2304
|
+
lastScanHadContent: !1
|
2305
|
+
})(performance.now());
|
2306
|
+
};
|
2307
|
+
var Ur = {}, Q = {};
|
2308
|
+
Object.defineProperty(Q, "__esModule", {
|
2309
|
+
value: !0
|
2310
|
+
});
|
2311
|
+
Q.compactObject = Nr;
|
2312
|
+
Q.deprecated = ai;
|
2313
|
+
var Qo = Q.detectBrowser = oi;
|
2314
|
+
Q.disableLog = ti;
|
2315
|
+
Q.disableWarnings = ri;
|
2316
|
+
Q.extractVersion = it;
|
2317
|
+
Q.filterStats = ii;
|
2318
|
+
Q.log = ni;
|
2319
|
+
Q.walkStats = st;
|
2320
|
+
Q.wrapPeerConnectionEvent = ei;
|
2321
|
+
function Xo(r, i, a) {
|
2322
|
+
return i = Ko(i), i in r ? Object.defineProperty(r, i, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : r[i] = a, r;
|
2323
|
+
}
|
2324
|
+
function Ko(r) {
|
2325
|
+
var i = Zo(r, "string");
|
2326
|
+
return pe(i) === "symbol" ? i : String(i);
|
2327
|
+
}
|
2328
|
+
function Zo(r, i) {
|
2329
|
+
if (pe(r) !== "object" || r === null)
|
2330
|
+
return r;
|
2331
|
+
var a = r[Symbol.toPrimitive];
|
2332
|
+
if (a !== void 0) {
|
2333
|
+
var c = a.call(r, i || "default");
|
2334
|
+
if (pe(c) !== "object")
|
2335
|
+
return c;
|
2336
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
2337
|
+
}
|
2338
|
+
return (i === "string" ? String : Number)(r);
|
2339
|
+
}
|
2340
|
+
function pe(r) {
|
2341
|
+
"@babel/helpers - typeof";
|
2342
|
+
return pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
2343
|
+
return typeof i;
|
2344
|
+
} : function(i) {
|
2345
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
2346
|
+
}, pe(r);
|
2347
|
+
}
|
2348
|
+
var Lr = !0, Hr = !0;
|
2349
|
+
function it(r, i, a) {
|
2350
|
+
var c = r.match(i);
|
2351
|
+
return c && c.length >= a && parseInt(c[a], 10);
|
2352
|
+
}
|
2353
|
+
function ei(r, i, a) {
|
2354
|
+
if (r.RTCPeerConnection) {
|
2355
|
+
var c = r.RTCPeerConnection.prototype, f = c.addEventListener;
|
2356
|
+
c.addEventListener = function(y, S) {
|
2357
|
+
if (y !== i)
|
2358
|
+
return f.apply(this, arguments);
|
2359
|
+
var h = function(w) {
|
2360
|
+
var T = a(w);
|
2361
|
+
T && (S.handleEvent ? S.handleEvent(T) : S(T));
|
2362
|
+
};
|
2363
|
+
return this._eventMap = this._eventMap || {}, this._eventMap[i] || (this._eventMap[i] = /* @__PURE__ */ new Map()), this._eventMap[i].set(S, h), f.apply(this, [y, h]);
|
2364
|
+
};
|
2365
|
+
var v = c.removeEventListener;
|
2366
|
+
c.removeEventListener = function(y, S) {
|
2367
|
+
if (y !== i || !this._eventMap || !this._eventMap[i])
|
2368
|
+
return v.apply(this, arguments);
|
2369
|
+
if (!this._eventMap[i].has(S))
|
2370
|
+
return v.apply(this, arguments);
|
2371
|
+
var h = this._eventMap[i].get(S);
|
2372
|
+
return this._eventMap[i].delete(S), this._eventMap[i].size === 0 && delete this._eventMap[i], Object.keys(this._eventMap).length === 0 && delete this._eventMap, v.apply(this, [y, h]);
|
2373
|
+
}, Object.defineProperty(c, "on" + i, {
|
2374
|
+
get: function() {
|
2375
|
+
return this["_on" + i];
|
2376
|
+
},
|
2377
|
+
set: function(y) {
|
2378
|
+
this["_on" + i] && (this.removeEventListener(i, this["_on" + i]), delete this["_on" + i]), y && this.addEventListener(i, this["_on" + i] = y);
|
2379
|
+
},
|
2380
|
+
enumerable: !0,
|
2381
|
+
configurable: !0
|
2382
|
+
});
|
2383
|
+
}
|
2384
|
+
}
|
2385
|
+
function ti(r) {
|
2386
|
+
return typeof r != "boolean" ? new Error("Argument type: " + pe(r) + ". Please use a boolean.") : (Lr = r, r ? "adapter.js logging disabled" : "adapter.js logging enabled");
|
2387
|
+
}
|
2388
|
+
function ri(r) {
|
2389
|
+
return typeof r != "boolean" ? new Error("Argument type: " + pe(r) + ". Please use a boolean.") : (Hr = !r, "adapter.js deprecation warnings " + (r ? "disabled" : "enabled"));
|
2390
|
+
}
|
2391
|
+
function ni() {
|
2392
|
+
if ((typeof window > "u" ? "undefined" : pe(window)) === "object") {
|
2393
|
+
if (Lr)
|
2394
|
+
return;
|
2395
|
+
typeof console < "u" && typeof console.log == "function" && console.log.apply(console, arguments);
|
2396
|
+
}
|
2397
|
+
}
|
2398
|
+
function ai(r, i) {
|
2399
|
+
Hr && console.warn(r + " is deprecated, please use " + i + " instead.");
|
2400
|
+
}
|
2401
|
+
function oi(r) {
|
2402
|
+
var i = {
|
2403
|
+
browser: null,
|
2404
|
+
version: null
|
2405
|
+
};
|
2406
|
+
if (typeof r > "u" || !r.navigator || !r.navigator.userAgent)
|
2407
|
+
return i.browser = "Not a browser.", i;
|
2408
|
+
var a = r.navigator;
|
2409
|
+
if (a.mozGetUserMedia)
|
2410
|
+
i.browser = "firefox", i.version = it(a.userAgent, /Firefox\/(\d+)\./, 1);
|
2411
|
+
else if (a.webkitGetUserMedia || r.isSecureContext === !1 && r.webkitRTCPeerConnection)
|
2412
|
+
i.browser = "chrome", i.version = it(a.userAgent, /Chrom(e|ium)\/(\d+)\./, 2);
|
2413
|
+
else if (r.RTCPeerConnection && a.userAgent.match(/AppleWebKit\/(\d+)\./))
|
2414
|
+
i.browser = "safari", i.version = it(a.userAgent, /AppleWebKit\/(\d+)\./, 1), i.supportsUnifiedPlan = r.RTCRtpTransceiver && "currentDirection" in r.RTCRtpTransceiver.prototype;
|
2415
|
+
else
|
2416
|
+
return i.browser = "Not a supported browser.", i;
|
2417
|
+
return i;
|
2418
|
+
}
|
2419
|
+
function br(r) {
|
2420
|
+
return Object.prototype.toString.call(r) === "[object Object]";
|
2421
|
+
}
|
2422
|
+
function Nr(r) {
|
2423
|
+
return br(r) ? Object.keys(r).reduce(function(i, a) {
|
2424
|
+
var c = br(r[a]), f = c ? Nr(r[a]) : r[a], v = c && !Object.keys(f).length;
|
2425
|
+
return f === void 0 || v ? i : Object.assign(i, Xo({}, a, f));
|
2426
|
+
}, {}) : r;
|
2427
|
+
}
|
2428
|
+
function st(r, i, a) {
|
2429
|
+
!i || a.has(i.id) || (a.set(i.id, i), Object.keys(i).forEach(function(c) {
|
2430
|
+
c.endsWith("Id") ? st(r, r.get(i[c]), a) : c.endsWith("Ids") && i[c].forEach(function(f) {
|
2431
|
+
st(r, r.get(f), a);
|
2432
|
+
});
|
2433
|
+
}));
|
2434
|
+
}
|
2435
|
+
function ii(r, i, a) {
|
2436
|
+
var c = a ? "outbound-rtp" : "inbound-rtp", f = /* @__PURE__ */ new Map();
|
2437
|
+
if (i === null)
|
2438
|
+
return f;
|
2439
|
+
var v = [];
|
2440
|
+
return r.forEach(function(y) {
|
2441
|
+
y.type === "track" && y.trackIdentifier === i.id && v.push(y);
|
2442
|
+
}), v.forEach(function(y) {
|
2443
|
+
r.forEach(function(S) {
|
2444
|
+
S.type === c && S.trackId === y.id && st(r, S, f);
|
2445
|
+
});
|
2446
|
+
}), f;
|
2447
|
+
}
|
2448
|
+
Object.defineProperty(Ur, "__esModule", {
|
2449
|
+
value: !0
|
2450
|
+
});
|
2451
|
+
var si = Ur.shimGetUserMedia = li, ci = ui(Q);
|
2452
|
+
function Vr(r) {
|
2453
|
+
if (typeof WeakMap != "function")
|
2454
|
+
return null;
|
2455
|
+
var i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap();
|
2456
|
+
return (Vr = function(c) {
|
2457
|
+
return c ? a : i;
|
2458
|
+
})(r);
|
2459
|
+
}
|
2460
|
+
function ui(r, i) {
|
2461
|
+
if (!i && r && r.__esModule)
|
2462
|
+
return r;
|
2463
|
+
if (r === null || he(r) !== "object" && typeof r != "function")
|
2464
|
+
return { default: r };
|
2465
|
+
var a = Vr(i);
|
2466
|
+
if (a && a.has(r))
|
2467
|
+
return a.get(r);
|
2468
|
+
var c = {}, f = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
2469
|
+
for (var v in r)
|
2470
|
+
if (v !== "default" && Object.prototype.hasOwnProperty.call(r, v)) {
|
2471
|
+
var y = f ? Object.getOwnPropertyDescriptor(r, v) : null;
|
2472
|
+
y && (y.get || y.set) ? Object.defineProperty(c, v, y) : c[v] = r[v];
|
2473
|
+
}
|
2474
|
+
return c.default = r, a && a.set(r, c), c;
|
2475
|
+
}
|
2476
|
+
function he(r) {
|
2477
|
+
"@babel/helpers - typeof";
|
2478
|
+
return he = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
2479
|
+
return typeof i;
|
2480
|
+
} : function(i) {
|
2481
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
2482
|
+
}, he(r);
|
2483
|
+
}
|
2484
|
+
var Cr = ci.log;
|
2485
|
+
function li(r, i) {
|
2486
|
+
var a = r && r.navigator;
|
2487
|
+
if (a.mediaDevices) {
|
2488
|
+
var c = function(h) {
|
2489
|
+
if (he(h) !== "object" || h.mandatory || h.optional)
|
2490
|
+
return h;
|
2491
|
+
var w = {};
|
2492
|
+
return Object.keys(h).forEach(function(T) {
|
2493
|
+
if (!(T === "require" || T === "advanced" || T === "mediaSource")) {
|
2494
|
+
var b = he(h[T]) === "object" ? h[T] : {
|
2495
|
+
ideal: h[T]
|
2496
|
+
};
|
2497
|
+
b.exact !== void 0 && typeof b.exact == "number" && (b.min = b.max = b.exact);
|
2498
|
+
var j = function(x, F) {
|
2499
|
+
return x ? x + F.charAt(0).toUpperCase() + F.slice(1) : F === "deviceId" ? "sourceId" : F;
|
2500
|
+
};
|
2501
|
+
if (b.ideal !== void 0) {
|
2502
|
+
w.optional = w.optional || [];
|
2503
|
+
var D = {};
|
2504
|
+
typeof b.ideal == "number" ? (D[j("min", T)] = b.ideal, w.optional.push(D), D = {}, D[j("max", T)] = b.ideal, w.optional.push(D)) : (D[j("", T)] = b.ideal, w.optional.push(D));
|
2505
|
+
}
|
2506
|
+
b.exact !== void 0 && typeof b.exact != "number" ? (w.mandatory = w.mandatory || {}, w.mandatory[j("", T)] = b.exact) : ["min", "max"].forEach(function(x) {
|
2507
|
+
b[x] !== void 0 && (w.mandatory = w.mandatory || {}, w.mandatory[j(x, T)] = b[x]);
|
2508
|
+
});
|
2509
|
+
}
|
2510
|
+
}), h.advanced && (w.optional = (w.optional || []).concat(h.advanced)), w;
|
2511
|
+
}, f = function(h, w) {
|
2512
|
+
if (i.version >= 61)
|
2513
|
+
return w(h);
|
2514
|
+
if (h = JSON.parse(JSON.stringify(h)), h && he(h.audio) === "object") {
|
2515
|
+
var T = function(x, F, I) {
|
2516
|
+
F in x && !(I in x) && (x[I] = x[F], delete x[F]);
|
2517
|
+
};
|
2518
|
+
h = JSON.parse(JSON.stringify(h)), T(h.audio, "autoGainControl", "googAutoGainControl"), T(h.audio, "noiseSuppression", "googNoiseSuppression"), h.audio = c(h.audio);
|
2519
|
+
}
|
2520
|
+
if (h && he(h.video) === "object") {
|
2521
|
+
var b = h.video.facingMode;
|
2522
|
+
b = b && (he(b) === "object" ? b : {
|
2523
|
+
ideal: b
|
2524
|
+
});
|
2525
|
+
var j = i.version < 66;
|
2526
|
+
if (b && (b.exact === "user" || b.exact === "environment" || b.ideal === "user" || b.ideal === "environment") && !(a.mediaDevices.getSupportedConstraints && a.mediaDevices.getSupportedConstraints().facingMode && !j)) {
|
2527
|
+
delete h.video.facingMode;
|
2528
|
+
var D;
|
2529
|
+
if (b.exact === "environment" || b.ideal === "environment" ? D = ["back", "rear"] : (b.exact === "user" || b.ideal === "user") && (D = ["front"]), D)
|
2530
|
+
return a.mediaDevices.enumerateDevices().then(function(x) {
|
2531
|
+
x = x.filter(function(I) {
|
2532
|
+
return I.kind === "videoinput";
|
2533
|
+
});
|
2534
|
+
var F = x.find(function(I) {
|
2535
|
+
return D.some(function(z) {
|
2536
|
+
return I.label.toLowerCase().includes(z);
|
2537
|
+
});
|
2538
|
+
});
|
2539
|
+
return !F && x.length && D.includes("back") && (F = x[x.length - 1]), F && (h.video.deviceId = b.exact ? {
|
2540
|
+
exact: F.deviceId
|
2541
|
+
} : {
|
2542
|
+
ideal: F.deviceId
|
2543
|
+
}), h.video = c(h.video), Cr("chrome: " + JSON.stringify(h)), w(h);
|
2544
|
+
});
|
2545
|
+
}
|
2546
|
+
h.video = c(h.video);
|
2547
|
+
}
|
2548
|
+
return Cr("chrome: " + JSON.stringify(h)), w(h);
|
2549
|
+
}, v = function(h) {
|
2550
|
+
return i.version >= 64 ? h : {
|
2551
|
+
name: {
|
2552
|
+
PermissionDeniedError: "NotAllowedError",
|
2553
|
+
PermissionDismissedError: "NotAllowedError",
|
2554
|
+
InvalidStateError: "NotAllowedError",
|
2555
|
+
DevicesNotFoundError: "NotFoundError",
|
2556
|
+
ConstraintNotSatisfiedError: "OverconstrainedError",
|
2557
|
+
TrackStartError: "NotReadableError",
|
2558
|
+
MediaDeviceFailedDueToShutdown: "NotAllowedError",
|
2559
|
+
MediaDeviceKillSwitchOn: "NotAllowedError",
|
2560
|
+
TabCaptureError: "AbortError",
|
2561
|
+
ScreenCaptureError: "AbortError",
|
2562
|
+
DeviceCaptureError: "AbortError"
|
2563
|
+
}[h.name] || h.name,
|
2564
|
+
message: h.message,
|
2565
|
+
constraint: h.constraint || h.constraintName,
|
2566
|
+
toString: function() {
|
2567
|
+
return this.name + (this.message && ": ") + this.message;
|
2568
|
+
}
|
2569
|
+
};
|
2570
|
+
}, y = function(h, w, T) {
|
2571
|
+
f(h, function(b) {
|
2572
|
+
a.webkitGetUserMedia(b, w, function(j) {
|
2573
|
+
T && T(v(j));
|
2574
|
+
});
|
2575
|
+
});
|
2576
|
+
};
|
2577
|
+
if (a.getUserMedia = y.bind(a), a.mediaDevices.getUserMedia) {
|
2578
|
+
var S = a.mediaDevices.getUserMedia.bind(a.mediaDevices);
|
2579
|
+
a.mediaDevices.getUserMedia = function(h) {
|
2580
|
+
return f(h, function(w) {
|
2581
|
+
return S(w).then(function(T) {
|
2582
|
+
if (w.audio && !T.getAudioTracks().length || w.video && !T.getVideoTracks().length)
|
2583
|
+
throw T.getTracks().forEach(function(b) {
|
2584
|
+
b.stop();
|
2585
|
+
}), new DOMException("", "NotFoundError");
|
2586
|
+
return T;
|
2587
|
+
}, function(T) {
|
2588
|
+
return Promise.reject(v(T));
|
2589
|
+
});
|
2590
|
+
});
|
2591
|
+
};
|
2592
|
+
}
|
2593
|
+
}
|
2594
|
+
}
|
2595
|
+
var Br = {};
|
2596
|
+
Object.defineProperty(Br, "__esModule", {
|
2597
|
+
value: !0
|
2598
|
+
});
|
2599
|
+
var di = Br.shimGetUserMedia = pi, fi = hi(Q);
|
2600
|
+
function zr(r) {
|
2601
|
+
if (typeof WeakMap != "function")
|
2602
|
+
return null;
|
2603
|
+
var i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap();
|
2604
|
+
return (zr = function(c) {
|
2605
|
+
return c ? a : i;
|
2606
|
+
})(r);
|
2607
|
+
}
|
2608
|
+
function hi(r, i) {
|
2609
|
+
if (!i && r && r.__esModule)
|
2610
|
+
return r;
|
2611
|
+
if (r === null || Pe(r) !== "object" && typeof r != "function")
|
2612
|
+
return { default: r };
|
2613
|
+
var a = zr(i);
|
2614
|
+
if (a && a.has(r))
|
2615
|
+
return a.get(r);
|
2616
|
+
var c = {}, f = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
2617
|
+
for (var v in r)
|
2618
|
+
if (v !== "default" && Object.prototype.hasOwnProperty.call(r, v)) {
|
2619
|
+
var y = f ? Object.getOwnPropertyDescriptor(r, v) : null;
|
2620
|
+
y && (y.get || y.set) ? Object.defineProperty(c, v, y) : c[v] = r[v];
|
2621
|
+
}
|
2622
|
+
return c.default = r, a && a.set(r, c), c;
|
2623
|
+
}
|
2624
|
+
function Pe(r) {
|
2625
|
+
"@babel/helpers - typeof";
|
2626
|
+
return Pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
2627
|
+
return typeof i;
|
2628
|
+
} : function(i) {
|
2629
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
2630
|
+
}, Pe(r);
|
2631
|
+
}
|
2632
|
+
function pi(r, i) {
|
2633
|
+
var a = r && r.navigator, c = r && r.MediaStreamTrack;
|
2634
|
+
if (a.getUserMedia = function(h, w, T) {
|
2635
|
+
fi.deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia"), a.mediaDevices.getUserMedia(h).then(w, T);
|
2636
|
+
}, !(i.version > 55 && "autoGainControl" in a.mediaDevices.getSupportedConstraints())) {
|
2637
|
+
var f = function(h, w, T) {
|
2638
|
+
w in h && !(T in h) && (h[T] = h[w], delete h[w]);
|
2639
|
+
}, v = a.mediaDevices.getUserMedia.bind(a.mediaDevices);
|
2640
|
+
if (a.mediaDevices.getUserMedia = function(h) {
|
2641
|
+
return Pe(h) === "object" && Pe(h.audio) === "object" && (h = JSON.parse(JSON.stringify(h)), f(h.audio, "autoGainControl", "mozAutoGainControl"), f(h.audio, "noiseSuppression", "mozNoiseSuppression")), v(h);
|
2642
|
+
}, c && c.prototype.getSettings) {
|
2643
|
+
var y = c.prototype.getSettings;
|
2644
|
+
c.prototype.getSettings = function() {
|
2645
|
+
var h = y.apply(this, arguments);
|
2646
|
+
return f(h, "mozAutoGainControl", "autoGainControl"), f(h, "mozNoiseSuppression", "noiseSuppression"), h;
|
2647
|
+
};
|
2648
|
+
}
|
2649
|
+
if (c && c.prototype.applyConstraints) {
|
2650
|
+
var S = c.prototype.applyConstraints;
|
2651
|
+
c.prototype.applyConstraints = function(h) {
|
2652
|
+
return this.kind === "audio" && Pe(h) === "object" && (h = JSON.parse(JSON.stringify(h)), f(h, "autoGainControl", "mozAutoGainControl"), f(h, "noiseSuppression", "mozNoiseSuppression")), S.apply(this, [h]);
|
2653
|
+
};
|
2654
|
+
}
|
2655
|
+
}
|
2656
|
+
}
|
2657
|
+
var ne = {};
|
2658
|
+
Object.defineProperty(ne, "__esModule", {
|
2659
|
+
value: !0
|
2660
|
+
});
|
2661
|
+
ne.shimAudioContext = Si;
|
2662
|
+
ne.shimCallbacksAPI = wi;
|
2663
|
+
ne.shimConstraints = Yr;
|
2664
|
+
ne.shimCreateOfferLegacy = $i;
|
2665
|
+
var vi = ne.shimGetUserMedia = bi;
|
2666
|
+
ne.shimLocalStreamsAPI = yi;
|
2667
|
+
ne.shimRTCIceServerUrls = Ci;
|
2668
|
+
ne.shimRemoteStreamsAPI = gi;
|
2669
|
+
ne.shimTrackEventTransceiver = Ti;
|
2670
|
+
var Gr = mi(Q);
|
2671
|
+
function Jr(r) {
|
2672
|
+
if (typeof WeakMap != "function")
|
2673
|
+
return null;
|
2674
|
+
var i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap();
|
2675
|
+
return (Jr = function(c) {
|
2676
|
+
return c ? a : i;
|
2677
|
+
})(r);
|
2678
|
+
}
|
2679
|
+
function mi(r, i) {
|
2680
|
+
if (!i && r && r.__esModule)
|
2681
|
+
return r;
|
2682
|
+
if (r === null || ve(r) !== "object" && typeof r != "function")
|
2683
|
+
return { default: r };
|
2684
|
+
var a = Jr(i);
|
2685
|
+
if (a && a.has(r))
|
2686
|
+
return a.get(r);
|
2687
|
+
var c = {}, f = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
2688
|
+
for (var v in r)
|
2689
|
+
if (v !== "default" && Object.prototype.hasOwnProperty.call(r, v)) {
|
2690
|
+
var y = f ? Object.getOwnPropertyDescriptor(r, v) : null;
|
2691
|
+
y && (y.get || y.set) ? Object.defineProperty(c, v, y) : c[v] = r[v];
|
2692
|
+
}
|
2693
|
+
return c.default = r, a && a.set(r, c), c;
|
2694
|
+
}
|
2695
|
+
function ve(r) {
|
2696
|
+
"@babel/helpers - typeof";
|
2697
|
+
return ve = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
|
2698
|
+
return typeof i;
|
2699
|
+
} : function(i) {
|
2700
|
+
return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
|
2701
|
+
}, ve(r);
|
2702
|
+
}
|
2703
|
+
function yi(r) {
|
2704
|
+
if (!(ve(r) !== "object" || !r.RTCPeerConnection)) {
|
2705
|
+
if ("getLocalStreams" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getLocalStreams = function() {
|
2706
|
+
return this._localStreams || (this._localStreams = []), this._localStreams;
|
2707
|
+
}), !("addStream" in r.RTCPeerConnection.prototype)) {
|
2708
|
+
var i = r.RTCPeerConnection.prototype.addTrack;
|
2709
|
+
r.RTCPeerConnection.prototype.addStream = function(a) {
|
2710
|
+
var c = this;
|
2711
|
+
this._localStreams || (this._localStreams = []), this._localStreams.includes(a) || this._localStreams.push(a), a.getAudioTracks().forEach(function(f) {
|
2712
|
+
return i.call(c, f, a);
|
2713
|
+
}), a.getVideoTracks().forEach(function(f) {
|
2714
|
+
return i.call(c, f, a);
|
2715
|
+
});
|
2716
|
+
}, r.RTCPeerConnection.prototype.addTrack = function(a) {
|
2717
|
+
for (var c = this, f = arguments.length, v = new Array(f > 1 ? f - 1 : 0), y = 1; y < f; y++)
|
2718
|
+
v[y - 1] = arguments[y];
|
2719
|
+
return v && v.forEach(function(S) {
|
2720
|
+
c._localStreams ? c._localStreams.includes(S) || c._localStreams.push(S) : c._localStreams = [S];
|
2721
|
+
}), i.apply(this, arguments);
|
2722
|
+
};
|
2723
|
+
}
|
2724
|
+
"removeStream" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.removeStream = function(a) {
|
2725
|
+
var c = this;
|
2726
|
+
this._localStreams || (this._localStreams = []);
|
2727
|
+
var f = this._localStreams.indexOf(a);
|
2728
|
+
if (f !== -1) {
|
2729
|
+
this._localStreams.splice(f, 1);
|
2730
|
+
var v = a.getTracks();
|
2731
|
+
this.getSenders().forEach(function(y) {
|
2732
|
+
v.includes(y.track) && c.removeTrack(y);
|
2733
|
+
});
|
2734
|
+
}
|
2735
|
+
});
|
2736
|
+
}
|
2737
|
+
}
|
2738
|
+
function gi(r) {
|
2739
|
+
if (!(ve(r) !== "object" || !r.RTCPeerConnection) && ("getRemoteStreams" in r.RTCPeerConnection.prototype || (r.RTCPeerConnection.prototype.getRemoteStreams = function() {
|
2740
|
+
return this._remoteStreams ? this._remoteStreams : [];
|
2741
|
+
}), !("onaddstream" in r.RTCPeerConnection.prototype))) {
|
2742
|
+
Object.defineProperty(r.RTCPeerConnection.prototype, "onaddstream", {
|
2743
|
+
get: function() {
|
2744
|
+
return this._onaddstream;
|
2745
|
+
},
|
2746
|
+
set: function(a) {
|
2747
|
+
var c = this;
|
2748
|
+
this._onaddstream && (this.removeEventListener("addstream", this._onaddstream), this.removeEventListener("track", this._onaddstreampoly)), this.addEventListener("addstream", this._onaddstream = a), this.addEventListener("track", this._onaddstreampoly = function(f) {
|
2749
|
+
f.streams.forEach(function(v) {
|
2750
|
+
if (c._remoteStreams || (c._remoteStreams = []), !c._remoteStreams.includes(v)) {
|
2751
|
+
c._remoteStreams.push(v);
|
2752
|
+
var y = new Event("addstream");
|
2753
|
+
y.stream = v, c.dispatchEvent(y);
|
2754
|
+
}
|
2755
|
+
});
|
2756
|
+
});
|
2757
|
+
}
|
2758
|
+
});
|
2759
|
+
var i = r.RTCPeerConnection.prototype.setRemoteDescription;
|
2760
|
+
r.RTCPeerConnection.prototype.setRemoteDescription = function() {
|
2761
|
+
var a = this;
|
2762
|
+
return this._onaddstreampoly || this.addEventListener("track", this._onaddstreampoly = function(c) {
|
2763
|
+
c.streams.forEach(function(f) {
|
2764
|
+
if (a._remoteStreams || (a._remoteStreams = []), !(a._remoteStreams.indexOf(f) >= 0)) {
|
2765
|
+
a._remoteStreams.push(f);
|
2766
|
+
var v = new Event("addstream");
|
2767
|
+
v.stream = f, a.dispatchEvent(v);
|
2768
|
+
}
|
2769
|
+
});
|
2770
|
+
}), i.apply(a, arguments);
|
2771
|
+
};
|
2772
|
+
}
|
2773
|
+
}
|
2774
|
+
function wi(r) {
|
2775
|
+
if (!(ve(r) !== "object" || !r.RTCPeerConnection)) {
|
2776
|
+
var i = r.RTCPeerConnection.prototype, a = i.createOffer, c = i.createAnswer, f = i.setLocalDescription, v = i.setRemoteDescription, y = i.addIceCandidate;
|
2777
|
+
i.createOffer = function(h, w) {
|
2778
|
+
var T = arguments.length >= 2 ? arguments[2] : arguments[0], b = a.apply(this, [T]);
|
2779
|
+
return w ? (b.then(h, w), Promise.resolve()) : b;
|
2780
|
+
}, i.createAnswer = function(h, w) {
|
2781
|
+
var T = arguments.length >= 2 ? arguments[2] : arguments[0], b = c.apply(this, [T]);
|
2782
|
+
return w ? (b.then(h, w), Promise.resolve()) : b;
|
2783
|
+
};
|
2784
|
+
var S = function(h, w, T) {
|
2785
|
+
var b = f.apply(this, [h]);
|
2786
|
+
return T ? (b.then(w, T), Promise.resolve()) : b;
|
2787
|
+
};
|
2788
|
+
i.setLocalDescription = S, S = function(h, w, T) {
|
2789
|
+
var b = v.apply(this, [h]);
|
2790
|
+
return T ? (b.then(w, T), Promise.resolve()) : b;
|
2791
|
+
}, i.setRemoteDescription = S, S = function(h, w, T) {
|
2792
|
+
var b = y.apply(this, [h]);
|
2793
|
+
return T ? (b.then(w, T), Promise.resolve()) : b;
|
2794
|
+
}, i.addIceCandidate = S;
|
2795
|
+
}
|
2796
|
+
}
|
2797
|
+
function bi(r) {
|
2798
|
+
var i = r && r.navigator;
|
2799
|
+
if (i.mediaDevices && i.mediaDevices.getUserMedia) {
|
2800
|
+
var a = i.mediaDevices, c = a.getUserMedia.bind(a);
|
2801
|
+
i.mediaDevices.getUserMedia = function(f) {
|
2802
|
+
return c(Yr(f));
|
2803
|
+
};
|
2804
|
+
}
|
2805
|
+
!i.getUserMedia && i.mediaDevices && i.mediaDevices.getUserMedia && (i.getUserMedia = (function(f, v, y) {
|
2806
|
+
i.mediaDevices.getUserMedia(f).then(v, y);
|
2807
|
+
}).bind(i));
|
2808
|
+
}
|
2809
|
+
function Yr(r) {
|
2810
|
+
return r && r.video !== void 0 ? Object.assign({}, r, {
|
2811
|
+
video: Gr.compactObject(r.video)
|
2812
|
+
}) : r;
|
2813
|
+
}
|
2814
|
+
function Ci(r) {
|
2815
|
+
if (r.RTCPeerConnection) {
|
2816
|
+
var i = r.RTCPeerConnection;
|
2817
|
+
r.RTCPeerConnection = function(a, c) {
|
2818
|
+
if (a && a.iceServers) {
|
2819
|
+
for (var f = [], v = 0; v < a.iceServers.length; v++) {
|
2820
|
+
var y = a.iceServers[v];
|
2821
|
+
y.urls === void 0 && y.url ? (Gr.deprecated("RTCIceServer.url", "RTCIceServer.urls"), y = JSON.parse(JSON.stringify(y)), y.urls = y.url, delete y.url, f.push(y)) : f.push(a.iceServers[v]);
|
2822
|
+
}
|
2823
|
+
a.iceServers = f;
|
2824
|
+
}
|
2825
|
+
return new i(a, c);
|
2826
|
+
}, r.RTCPeerConnection.prototype = i.prototype, "generateCertificate" in i && Object.defineProperty(r.RTCPeerConnection, "generateCertificate", {
|
2827
|
+
get: function() {
|
2828
|
+
return i.generateCertificate;
|
2829
|
+
}
|
2830
|
+
});
|
2831
|
+
}
|
2832
|
+
}
|
2833
|
+
function Ti(r) {
|
2834
|
+
ve(r) === "object" && r.RTCTrackEvent && "receiver" in r.RTCTrackEvent.prototype && !("transceiver" in r.RTCTrackEvent.prototype) && Object.defineProperty(r.RTCTrackEvent.prototype, "transceiver", {
|
2835
|
+
get: function() {
|
2836
|
+
return {
|
2837
|
+
receiver: this.receiver
|
2838
|
+
};
|
2839
|
+
}
|
2840
|
+
});
|
2841
|
+
}
|
2842
|
+
function $i(r) {
|
2843
|
+
var i = r.RTCPeerConnection.prototype.createOffer;
|
2844
|
+
r.RTCPeerConnection.prototype.createOffer = function(a) {
|
2845
|
+
if (a) {
|
2846
|
+
typeof a.offerToReceiveAudio < "u" && (a.offerToReceiveAudio = !!a.offerToReceiveAudio);
|
2847
|
+
var c = this.getTransceivers().find(function(v) {
|
2848
|
+
return v.receiver.track.kind === "audio";
|
2849
|
+
});
|
2850
|
+
a.offerToReceiveAudio === !1 && c ? c.direction === "sendrecv" ? c.setDirection ? c.setDirection("sendonly") : c.direction = "sendonly" : c.direction === "recvonly" && (c.setDirection ? c.setDirection("inactive") : c.direction = "inactive") : a.offerToReceiveAudio === !0 && !c && this.addTransceiver("audio", {
|
2851
|
+
direction: "recvonly"
|
2852
|
+
}), typeof a.offerToReceiveVideo < "u" && (a.offerToReceiveVideo = !!a.offerToReceiveVideo);
|
2853
|
+
var f = this.getTransceivers().find(function(v) {
|
2854
|
+
return v.receiver.track.kind === "video";
|
2855
|
+
});
|
2856
|
+
a.offerToReceiveVideo === !1 && f ? f.direction === "sendrecv" ? f.setDirection ? f.setDirection("sendonly") : f.direction = "sendonly" : f.direction === "recvonly" && (f.setDirection ? f.setDirection("inactive") : f.direction = "inactive") : a.offerToReceiveVideo === !0 && !f && this.addTransceiver("video", {
|
2857
|
+
direction: "recvonly"
|
2858
|
+
});
|
2859
|
+
}
|
2860
|
+
return i.apply(this, arguments);
|
2861
|
+
};
|
2862
|
+
}
|
2863
|
+
function Si(r) {
|
2864
|
+
ve(r) !== "object" || r.AudioContext || (r.AudioContext = r.webkitAudioContext);
|
2865
|
+
}
|
2866
|
+
const Pi = (r) => {
|
2867
|
+
let i = !1, a;
|
2868
|
+
return (...c) => (i || (a = r(c), i = !0), a);
|
2869
|
+
};
|
2870
|
+
function ce(r, i) {
|
2871
|
+
if (r === !1)
|
2872
|
+
throw new Error(i ?? "assertion failure");
|
2873
|
+
}
|
2874
|
+
const _i = Pi(() => {
|
2875
|
+
const r = Qo(window);
|
2876
|
+
switch (r.browser) {
|
2877
|
+
case "chrome":
|
2878
|
+
si(window, r);
|
2879
|
+
break;
|
2880
|
+
case "firefox":
|
2881
|
+
di(window, r);
|
2882
|
+
break;
|
2883
|
+
case "safari":
|
2884
|
+
vi(window, r);
|
2885
|
+
break;
|
2886
|
+
default:
|
2887
|
+
throw new Wr();
|
2888
|
+
}
|
2889
|
+
});
|
2890
|
+
let _e = Promise.resolve({ type: "stop", data: {} });
|
2891
|
+
async function Tr(r, i, a) {
|
2892
|
+
var c, f, v;
|
2893
|
+
if (window.isSecureContext !== !0)
|
2894
|
+
throw new Go();
|
2895
|
+
if (((c = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : c.getUserMedia) === void 0)
|
2896
|
+
throw new Wr();
|
2897
|
+
_i();
|
2898
|
+
const y = await navigator.mediaDevices.getUserMedia({
|
2899
|
+
audio: !1,
|
2900
|
+
video: i
|
2901
|
+
});
|
2902
|
+
r.srcObject !== void 0 ? r.srcObject = y : r.mozSrcObject !== void 0 ? r.mozSrcObject = y : window.URL.createObjectURL ? r.src = window.URL.createObjectURL(y) : window.webkitURL ? r.src = window.webkitURL.createObjectURL(y) : r.src = y.id, r.play(), await Promise.race([
|
2903
|
+
Ir(r, "loadeddata"),
|
2904
|
+
// On iOS devices in PWA mode, QrcodeStream works initially, but after
|
2905
|
+
// killing and restarting the PWA, all video elements fail to load camera
|
2906
|
+
// streams and never emit the `loadeddata` event. Looks like this is
|
2907
|
+
// related to a WebKit issue (see #298). No workarounds at the moment.
|
2908
|
+
// To at least detect this situation, we throw an error if the event
|
2909
|
+
// has not been emitted after a 3 second timeout.
|
2910
|
+
wr(3e3).then(() => {
|
2911
|
+
throw new Jo();
|
2912
|
+
})
|
2913
|
+
]), await wr(500);
|
2914
|
+
const [S] = y.getVideoTracks(), h = (v = (f = S == null ? void 0 : S.getCapabilities) == null ? void 0 : f.call(S)) != null ? v : {};
|
2915
|
+
let w = !1;
|
2916
|
+
return a && h.torch && (await S.applyConstraints({ advanced: [{ torch: !0 }] }), w = !0), {
|
2917
|
+
type: "start",
|
2918
|
+
data: {
|
2919
|
+
videoEl: r,
|
2920
|
+
stream: y,
|
2921
|
+
capabilities: h,
|
2922
|
+
constraints: i,
|
2923
|
+
isTorchOn: w
|
2924
|
+
}
|
2925
|
+
};
|
2926
|
+
}
|
2927
|
+
async function Ei(r, {
|
2928
|
+
constraints: i,
|
2929
|
+
torch: a,
|
2930
|
+
restart: c = !1
|
2931
|
+
}) {
|
2932
|
+
_e = _e.then((v) => {
|
2933
|
+
if (v.type === "start") {
|
2934
|
+
const {
|
2935
|
+
data: {
|
2936
|
+
videoEl: y,
|
2937
|
+
stream: S,
|
2938
|
+
constraints: h,
|
2939
|
+
isTorchOn: w
|
2940
|
+
}
|
2941
|
+
} = v;
|
2942
|
+
return !c && r === y && i === h && a === w ? v : qr(y, S, w).then(
|
2943
|
+
() => Tr(r, i, a)
|
2944
|
+
);
|
2945
|
+
}
|
2946
|
+
return Tr(r, i, a);
|
2947
|
+
});
|
2948
|
+
const f = await _e;
|
2949
|
+
if (f.type === "stop")
|
2950
|
+
throw new Error("Something went wrong with the camera task queue (start task).");
|
2951
|
+
return f.data.capabilities;
|
2952
|
+
}
|
2953
|
+
async function qr(r, i, a) {
|
2954
|
+
r.src = "", r.srcObject = null, r.load(), await Ir(r, "error");
|
2955
|
+
for (const c of i.getTracks())
|
2956
|
+
a != null || await c.applyConstraints({ advanced: [{ torch: !1 }] }), i.removeTrack(c), c.stop();
|
2957
|
+
return {
|
2958
|
+
type: "stop",
|
2959
|
+
data: {}
|
2960
|
+
};
|
2961
|
+
}
|
2962
|
+
async function at() {
|
2963
|
+
if (_e = _e.then((r) => {
|
2964
|
+
if (r.type === "stop")
|
2965
|
+
return r;
|
2966
|
+
const {
|
2967
|
+
data: { videoEl: i, stream: a, isTorchOn: c }
|
2968
|
+
} = r;
|
2969
|
+
return qr(i, a, c);
|
2970
|
+
}), (await _e).type === "start")
|
2971
|
+
throw new Error("Something went wrong with the camera task queue (stop task).");
|
2972
|
+
}
|
2973
|
+
const Mi = /* @__PURE__ */ so({
|
2974
|
+
__name: "QrcodeStream",
|
2975
|
+
props: {
|
2976
|
+
// in this file: don't use `props.constraints` directly. Use `constraintsCached`.
|
2977
|
+
constraints: {
|
2978
|
+
type: Object,
|
2979
|
+
default() {
|
2980
|
+
return { facingMode: "environment" };
|
2981
|
+
}
|
2982
|
+
},
|
2983
|
+
// in this file: don't use `props.formats` directly. Use `formatsCached`.
|
2984
|
+
formats: {
|
2985
|
+
type: Array,
|
2986
|
+
default: () => ["qr_code"]
|
2987
|
+
},
|
2988
|
+
paused: {
|
2989
|
+
type: Boolean,
|
2990
|
+
default: !1
|
2991
|
+
},
|
2992
|
+
torch: {
|
2993
|
+
type: Boolean,
|
2994
|
+
default: !1
|
2995
|
+
},
|
2996
|
+
track: {
|
2997
|
+
type: Function
|
2998
|
+
}
|
2999
|
+
},
|
3000
|
+
emits: ["detect", "camera-on", "camera-off", "error"],
|
3001
|
+
setup(r, { emit: i }) {
|
3002
|
+
const a = r, c = i, f = we(a.constraints), v = we(a.formats);
|
3003
|
+
We(
|
3004
|
+
() => a.constraints,
|
3005
|
+
(R, O) => {
|
3006
|
+
JSON.stringify(R) !== JSON.stringify(O) && (f.value = R);
|
3007
|
+
},
|
3008
|
+
{ deep: !0 }
|
3009
|
+
), We(
|
3010
|
+
() => a.formats,
|
3011
|
+
(R, O) => {
|
3012
|
+
JSON.stringify(R) !== JSON.stringify(O) && (v.value = R);
|
3013
|
+
},
|
3014
|
+
{ deep: !0 }
|
3015
|
+
);
|
3016
|
+
const y = we(), S = we(), h = we(), w = we(!1), T = we(!1);
|
3017
|
+
co(() => {
|
3018
|
+
T.value = !0;
|
3019
|
+
}), uo(() => {
|
3020
|
+
at();
|
3021
|
+
});
|
3022
|
+
const b = Rt(() => ({
|
3023
|
+
torch: a.torch,
|
3024
|
+
constraints: f.value,
|
3025
|
+
shouldStream: T.value && !a.paused
|
3026
|
+
}));
|
3027
|
+
We(
|
3028
|
+
b,
|
3029
|
+
async (R) => {
|
3030
|
+
const O = h.value;
|
3031
|
+
ce(
|
3032
|
+
O !== void 0,
|
3033
|
+
"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined."
|
3034
|
+
);
|
3035
|
+
const M = y.value;
|
3036
|
+
ce(
|
3037
|
+
M !== void 0,
|
3038
|
+
"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined."
|
3039
|
+
);
|
3040
|
+
const le = M.getContext("2d");
|
3041
|
+
if (ce(le !== null, "if cavnas is defined, canvas 2d context should also be non-null"), R.shouldStream) {
|
3042
|
+
at(), w.value = !1;
|
3043
|
+
try {
|
3044
|
+
const ae = await Ei(O, R);
|
3045
|
+
T.value ? (w.value = !0, c("camera-on", ae)) : await at();
|
3046
|
+
} catch (ae) {
|
3047
|
+
c("error", ae);
|
3048
|
+
}
|
3049
|
+
} else
|
3050
|
+
M.width = O.videoWidth, M.height = O.videoHeight, le.drawImage(O, 0, 0, O.videoWidth, O.videoHeight), at(), w.value = !1, c("camera-off");
|
3051
|
+
},
|
3052
|
+
{ deep: !0 }
|
3053
|
+
), We(v, (R) => {
|
3054
|
+
T.value && Yo(R);
|
3055
|
+
});
|
3056
|
+
const j = Rt(() => b.value.shouldStream && w.value);
|
3057
|
+
We(j, (R) => {
|
3058
|
+
if (R) {
|
3059
|
+
ce(
|
3060
|
+
y.value !== void 0,
|
3061
|
+
"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"
|
3062
|
+
), D(y.value), ce(
|
3063
|
+
S.value !== void 0,
|
3064
|
+
"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"
|
3065
|
+
), D(S.value);
|
3066
|
+
const O = () => a.track === void 0 ? 500 : 40;
|
3067
|
+
ce(
|
3068
|
+
h.value !== void 0,
|
3069
|
+
"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"
|
3070
|
+
), qo(h.value, {
|
3071
|
+
detectHandler: (M) => c("detect", M),
|
3072
|
+
formats: v.value,
|
3073
|
+
locateHandler: x,
|
3074
|
+
minDelay: O()
|
3075
|
+
});
|
3076
|
+
}
|
3077
|
+
});
|
3078
|
+
const D = (R) => {
|
3079
|
+
const O = R.getContext("2d");
|
3080
|
+
ce(O !== null, "canvas 2d context should always be non-null"), O.clearRect(0, 0, R.width, R.height);
|
3081
|
+
}, x = (R) => {
|
3082
|
+
const O = S.value;
|
3083
|
+
ce(
|
3084
|
+
O !== void 0,
|
3085
|
+
"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined."
|
3086
|
+
);
|
3087
|
+
const M = h.value;
|
3088
|
+
if (ce(
|
3089
|
+
M !== void 0,
|
3090
|
+
"onLocate handler should only be called when component is mounted. Thus video element is always defined."
|
3091
|
+
), R.length === 0 || a.track === void 0)
|
3092
|
+
D(O);
|
3093
|
+
else {
|
3094
|
+
const le = M.offsetWidth, ae = M.offsetHeight, be = M.videoWidth, Ce = M.videoHeight, Oe = Math.max(le / be, ae / Ce), Me = be * Oe, Le = Ce * Oe, ct = Me / be, ut = Le / Ce, lt = (le - Me) / 2, dt = (ae - Le) / 2, Ae = ({ x: de, y: X }) => ({
|
3095
|
+
x: Math.floor(de * ct),
|
3096
|
+
y: Math.floor(X * ut)
|
3097
|
+
}), ee = ({ x: de, y: X }) => ({
|
3098
|
+
x: Math.floor(de + lt),
|
3099
|
+
y: Math.floor(X + dt)
|
3100
|
+
}), me = R.map((de) => {
|
3101
|
+
const { boundingBox: X, cornerPoints: ht } = de, { x: He, y: fe } = ee(
|
3102
|
+
Ae({
|
3103
|
+
x: X.x,
|
3104
|
+
y: X.y
|
3105
|
+
})
|
3106
|
+
), { x: Ne, y: pt } = Ae({
|
3107
|
+
x: X.width,
|
3108
|
+
y: X.height
|
3109
|
+
});
|
3110
|
+
return {
|
3111
|
+
...de,
|
3112
|
+
cornerPoints: ht.map((Ve) => ee(Ae(Ve))),
|
3113
|
+
boundingBox: DOMRectReadOnly.fromRect({ x: He, y: fe, width: Ne, height: pt })
|
3114
|
+
};
|
3115
|
+
});
|
3116
|
+
O.width = M.offsetWidth, O.height = M.offsetHeight;
|
3117
|
+
const ft = O.getContext("2d");
|
3118
|
+
a.track(me, ft);
|
3119
|
+
}
|
3120
|
+
}, F = {
|
3121
|
+
width: "100%",
|
3122
|
+
height: "100%",
|
3123
|
+
position: "relative",
|
3124
|
+
// notice that we use z-index only once for the wrapper div.
|
3125
|
+
// If z-index is not defined, elements are stacked in the order they appear in the DOM.
|
3126
|
+
// The first element is at the very bottom and subsequent elements are added on top.
|
3127
|
+
"z-index": "0"
|
3128
|
+
}, I = {
|
3129
|
+
width: "100%",
|
3130
|
+
height: "100%",
|
3131
|
+
position: "absolute",
|
3132
|
+
top: "0",
|
3133
|
+
left: "0"
|
3134
|
+
}, z = {
|
3135
|
+
width: "100%",
|
3136
|
+
height: "100%",
|
3137
|
+
"object-fit": "cover"
|
3138
|
+
}, ue = Rt(() => j.value ? z : {
|
3139
|
+
...z,
|
3140
|
+
visibility: "hidden",
|
3141
|
+
position: "absolute"
|
3142
|
+
});
|
3143
|
+
return (R, O) => (lo(), fo("div", { style: F }, [
|
3144
|
+
nt("video", {
|
3145
|
+
ref_key: "videoRef",
|
3146
|
+
ref: h,
|
3147
|
+
style: ho(ue.value),
|
3148
|
+
autoplay: "",
|
3149
|
+
muted: "",
|
3150
|
+
playsinline: ""
|
3151
|
+
}, null, 4),
|
3152
|
+
po(nt("canvas", {
|
3153
|
+
id: "qrcode-stream-pause-frame",
|
3154
|
+
ref_key: "pauseFrameRef",
|
3155
|
+
ref: y,
|
3156
|
+
style: z
|
3157
|
+
}, null, 512), [
|
3158
|
+
[vo, !j.value]
|
3159
|
+
]),
|
3160
|
+
nt("canvas", {
|
3161
|
+
id: "qrcode-stream-tracking-layer",
|
3162
|
+
ref_key: "trackingLayerRef",
|
3163
|
+
ref: S,
|
3164
|
+
style: I
|
3165
|
+
}, null, 512),
|
3166
|
+
nt("div", { style: I }, [
|
3167
|
+
mo(R.$slots, "default")
|
3168
|
+
])
|
3169
|
+
]));
|
3170
|
+
}
|
3171
|
+
});
|
3172
|
+
export {
|
3173
|
+
Mi as QrcodeStream
|
3174
|
+
};
|