@ozdao/prometheus-framework 0.2.80 → 0.2.82
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
- package/dist/credentials.schema-CfhPcsuI.js +105 -0
- package/dist/events.server.js +4 -15
- package/dist/events.server.mjs +3 -14
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-B6a1mPgp.mjs +217 -0
- package/dist/index-BCCiEK_u.js +216 -0
- package/dist/main-8N2Jmsuk.js +91 -0
- package/dist/main-CkeuHuCY.mjs +13619 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-Cu_mPkjE.js +77 -0
- package/dist/metadata.schema-cbFgazeK.mjs +78 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
- package/dist/organizations.server.js +297 -134
- package/dist/organizations.server.mjs +295 -132
- package/dist/products.server.js +2 -2
- package/dist/products.server.mjs +2 -2
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +32 -155
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- 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 +28 -28
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
- 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 +78 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- 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 +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 +14 -14
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +132 -141
- 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 +29 -27
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +4 -4
- 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 +1 -1
- 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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +32 -25
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
- 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 +1 -1
- 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 +1 -13
- 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 +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
- 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 +39 -39
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
- 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 +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +39 -50
- 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 +6 -6
- 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 +161 -138
- 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 +199 -79
- 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 +83 -126
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +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 +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 +59 -70
- 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/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
- 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/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- 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 +2 -2
- 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 +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 +2 -2
- 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 +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 +24 -26
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
- package/dist/queryProcessor-DRMo_GWK.js +161 -0
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.server.js +69 -38
- package/dist/users.server.mjs +67 -36
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/dist/web-CtVocufd.js +1 -0
- package/dist/web-DNq1tHCE.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +13 -2
- package/src/components/Block/Block.vue +3 -2
- package/src/components/Button/Button.vue +9 -12
- package/src/components/Feed/Feed.vue +28 -6
- package/src/components/FieldPhone/FieldPhone.vue +592 -558
- package/src/components/LocationMarker/LocationMarker.vue +26 -22
- package/src/components/Popup/Popup.vue +22 -23
- package/src/components/Select/Select.vue +43 -32
- package/src/components/Slider/Slider.vue +3 -4
- package/src/modules/auth/components/pages/Invite.vue +7 -7
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +4 -3
- package/src/modules/events/components/pages/Event.vue +4 -3
- package/src/modules/events/components/pages/Events.vue +23 -6
- package/src/modules/events/components/sections/HeroEvent.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
- package/src/modules/globals/localization/vue-i18n.js +3 -0
- package/src/modules/globals/models/credentials.schema.js +7 -0
- package/src/modules/globals/models/metadata.schema.js +17 -0
- package/src/modules/globals/models/profile.schema.js +23 -0
- package/src/modules/globals/models/socials.schema.js +22 -0
- package/src/modules/globals/router/routerGuards.js +1 -0
- package/src/modules/globals/services/globals.cashe.js +26 -0
- package/src/modules/globals/services/globals.crud.js +115 -0
- package/src/modules/globals/services/globals.logger.js +41 -0
- package/src/modules/globals/services/globals.store.js +114 -0
- package/src/modules/icons/entities/IconGallery.vue +14 -0
- package/src/modules/icons/entities/IconLeftovers.vue +14 -0
- package/src/modules/icons/entities/IconOrders.vue +15 -0
- package/src/modules/icons/entities/IconProducts.vue +14 -0
- package/src/modules/landing/components/sections/HeroSection.vue +1 -1
- package/src/modules/landing/components/sections/MobileApp.vue +4 -4
- package/src/modules/landing/router/landing.js +1 -1
- package/src/modules/marketplace/components/sections/Filters.vue +3 -3
- package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
- package/src/modules/middlewares/server/verifyAccesses.js +33 -0
- package/src/modules/middlewares/server/verifyInvites.js +4 -4
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
- package/src/modules/orders/components/pages/Orders.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
- package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
- package/src/modules/orders/controllers/applications.controller.js +2 -0
- package/src/modules/orders/controllers/orders.controller.js +77 -52
- package/src/modules/orders/models/customer.model.js +54 -18
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/orders.client.js +51 -51
- package/src/modules/orders/orders.server.js +32 -12
- package/src/modules/orders/router/orders.router.js +36 -41
- package/src/modules/orders/routes/orders.routes.js +3 -21
- package/src/modules/orders/store/customers.store.js +5 -0
- package/src/modules/orders/store/models/customer.js +29 -0
- package/src/modules/orders/store/orders.js +14 -20
- package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
- package/src/modules/organizations/components/pages/Members.vue +178 -64
- package/src/modules/organizations/components/pages/Organization.vue +1 -41
- package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
- package/src/modules/organizations/controllers/departments.controller.js +2 -4
- package/src/modules/organizations/controllers/invites.controller.js +24 -23
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/department.model.js +52 -2
- package/src/modules/organizations/models/invite.model.js +29 -32
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +2 -1
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/routes/departments.routes.js +18 -7
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/departments.js +22 -1
- package/src/modules/organizations/store/invites.js +74 -90
- package/src/modules/products/components/blocks/CardProduct.vue +24 -0
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/reports/components/sections/FormReport.vue +40 -40
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
- package/src/modules/users/components/blocks/CardUser.vue +85 -0
- package/src/modules/users/controllers/users.controller.js +36 -13
- package/src/modules/users/middlewares/visitor.logger.js +66 -0
- package/src/modules/users/models/request.model.js +18 -0
- package/src/modules/users/models/user.model.js +26 -55
- package/src/modules/users/models/visitor.model.js +14 -0
- package/src/modules/users/store/users.js +2 -11
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
- package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
- package/src/components/FieldPhone/FieldPhone2.vue +0 -671
- package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
- package/src/modules/organizations/components/blocks/User.vue +0 -69
- /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
var common_schema = function applyCommonSchema(schema, db) {
|
3
|
+
schema.add({
|
4
|
+
status: {
|
5
|
+
type: String,
|
6
|
+
enum: ["draft", "published", "removed"],
|
7
|
+
default: "draft",
|
8
|
+
required: true
|
9
|
+
}
|
10
|
+
});
|
11
|
+
};
|
12
|
+
var engagement_schema = function applyEngagementSchema(schema, db) {
|
13
|
+
schema.add({ views: { type: Number, default: 0 } });
|
14
|
+
schema.post("aggregate", async function(docs) {
|
15
|
+
if (docs.length === 0)
|
16
|
+
return;
|
17
|
+
console.log("Post-aggregate hook in engagement schema triggered");
|
18
|
+
const model = this._model;
|
19
|
+
if (!model) {
|
20
|
+
console.error("No model is associated with this schema!");
|
21
|
+
return;
|
22
|
+
}
|
23
|
+
try {
|
24
|
+
await updateDocumentViews(docs, model);
|
25
|
+
} catch (error) {
|
26
|
+
console.error("Error updating views:", error);
|
27
|
+
}
|
28
|
+
});
|
29
|
+
async function updateDocumentViews(docs, model) {
|
30
|
+
const updateViewsPromises = docs.map((doc) => model.findOneAndUpdate(
|
31
|
+
{ _id: doc._id },
|
32
|
+
{ $inc: { views: 1 } }
|
33
|
+
).exec());
|
34
|
+
await Promise.all(updateViewsPromises);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
function createFriendlyURL$1(str) {
|
38
|
+
if (typeof str !== "string") {
|
39
|
+
throw new Error("Входные данные должны быть строкой");
|
40
|
+
}
|
41
|
+
str = str.trim().toLowerCase();
|
42
|
+
str = str.replace(/ /g, "-").replace(/[^\w-]+/g, "");
|
43
|
+
str = str.replace(/-+/g, "-");
|
44
|
+
str = str.replace(/^-+|-+$/g, "");
|
45
|
+
return str;
|
46
|
+
}
|
47
|
+
var seoFriendlyUrl = createFriendlyURL$1;
|
48
|
+
const createFriendlyURL = seoFriendlyUrl;
|
49
|
+
var metadata_schema = function applyMetadataSchema(schema, db) {
|
50
|
+
schema.add({
|
51
|
+
url: {
|
52
|
+
type: String,
|
53
|
+
unique: true,
|
54
|
+
required: true
|
55
|
+
},
|
56
|
+
tags: [{
|
57
|
+
type: String
|
58
|
+
}]
|
59
|
+
});
|
60
|
+
schema.pre("save", function(next) {
|
61
|
+
if (!this.url) {
|
62
|
+
const name = this.name || this.title || (this.profile ? this.profile.name : "");
|
63
|
+
if (name) {
|
64
|
+
this.url = createFriendlyURL(name);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
next();
|
68
|
+
});
|
69
|
+
schema.index({
|
70
|
+
"url": 1,
|
71
|
+
"tags": 1
|
72
|
+
});
|
73
|
+
};
|
74
|
+
exports.common_schema = common_schema;
|
75
|
+
exports.engagement_schema = engagement_schema;
|
76
|
+
exports.metadata_schema = metadata_schema;
|
77
|
+
exports.seoFriendlyUrl = seoFriendlyUrl;
|
@@ -0,0 +1,78 @@
|
|
1
|
+
var common_schema = function applyCommonSchema(schema, db) {
|
2
|
+
schema.add({
|
3
|
+
status: {
|
4
|
+
type: String,
|
5
|
+
enum: ["draft", "published", "removed"],
|
6
|
+
default: "draft",
|
7
|
+
required: true
|
8
|
+
}
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var engagement_schema = function applyEngagementSchema(schema, db) {
|
12
|
+
schema.add({ views: { type: Number, default: 0 } });
|
13
|
+
schema.post("aggregate", async function(docs) {
|
14
|
+
if (docs.length === 0)
|
15
|
+
return;
|
16
|
+
console.log("Post-aggregate hook in engagement schema triggered");
|
17
|
+
const model = this._model;
|
18
|
+
if (!model) {
|
19
|
+
console.error("No model is associated with this schema!");
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
try {
|
23
|
+
await updateDocumentViews(docs, model);
|
24
|
+
} catch (error) {
|
25
|
+
console.error("Error updating views:", error);
|
26
|
+
}
|
27
|
+
});
|
28
|
+
async function updateDocumentViews(docs, model) {
|
29
|
+
const updateViewsPromises = docs.map((doc) => model.findOneAndUpdate(
|
30
|
+
{ _id: doc._id },
|
31
|
+
{ $inc: { views: 1 } }
|
32
|
+
).exec());
|
33
|
+
await Promise.all(updateViewsPromises);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
function createFriendlyURL$1(str) {
|
37
|
+
if (typeof str !== "string") {
|
38
|
+
throw new Error("Входные данные должны быть строкой");
|
39
|
+
}
|
40
|
+
str = str.trim().toLowerCase();
|
41
|
+
str = str.replace(/ /g, "-").replace(/[^\w-]+/g, "");
|
42
|
+
str = str.replace(/-+/g, "-");
|
43
|
+
str = str.replace(/^-+|-+$/g, "");
|
44
|
+
return str;
|
45
|
+
}
|
46
|
+
var seoFriendlyUrl = createFriendlyURL$1;
|
47
|
+
const createFriendlyURL = seoFriendlyUrl;
|
48
|
+
var metadata_schema = function applyMetadataSchema(schema, db) {
|
49
|
+
schema.add({
|
50
|
+
url: {
|
51
|
+
type: String,
|
52
|
+
unique: true,
|
53
|
+
required: true
|
54
|
+
},
|
55
|
+
tags: [{
|
56
|
+
type: String
|
57
|
+
}]
|
58
|
+
});
|
59
|
+
schema.pre("save", function(next) {
|
60
|
+
if (!this.url) {
|
61
|
+
const name = this.name || this.title || (this.profile ? this.profile.name : "");
|
62
|
+
if (name) {
|
63
|
+
this.url = createFriendlyURL(name);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
next();
|
67
|
+
});
|
68
|
+
schema.index({
|
69
|
+
"url": 1,
|
70
|
+
"tags": 1
|
71
|
+
});
|
72
|
+
};
|
73
|
+
export {
|
74
|
+
common_schema as c,
|
75
|
+
engagement_schema as e,
|
76
|
+
metadata_schema as m,
|
77
|
+
seoFriendlyUrl as s
|
78
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
|
-
const index = require("./index-
|
3
|
+
const index = require("./index-BCCiEK_u.js");
|
4
4
|
const verifyUser = index.verifyUser;
|
5
5
|
const verifyInvites = index.verifyInvites;
|
6
6
|
const authJwt = index.authJwt;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
|
-
import { v as verifyUser$1, a as verifyInvites$1, b as authJwt$1, c as verifySignUp$1, d as verifyCategory$1, s as server } from "./index-
|
2
|
+
import { v as verifyUser$1, a as verifyInvites$1, b as authJwt$1, c as verifySignUp$1, d as verifyCategory$1, s as server } from "./index-B6a1mPgp.mjs";
|
3
3
|
const verifyUser = verifyUser$1;
|
4
4
|
const verifyInvites = verifyInvites$1;
|
5
5
|
const authJwt = authJwt$1;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function k(s,e,t,r){function o(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function l(a){try{c(r.next(a))}catch(h){n(h)}}function u(a){try{c(r.throw(a))}catch(h){n(h)}}function c(a){a.done?i(a.value):o(a.value).then(l,u)}c((r=r.apply(s,e||[])).next())})}function L(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var P=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(o=r;o--!==0;)if(!s(e[o],t[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){var n=i[o];if(!s(e[n],t[n]))return!1}return!0}return e!==e&&t!==t},_=L(P);const I="__googleMapsScriptId";exports.LoaderStatus=void 0;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(exports.LoaderStatus||(exports.LoaderStatus={}));class d{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:o,id:i=I,language:n,libraries:l=[],mapIds:u,nonce:c,region:a,retries:h=3,url:g="https://maps.googleapis.com/maps/api/js",version:p}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=r,this.client=o,this.id=i||I,this.language=n,this.libraries=l,this.mapIds=u,this.nonce=c,this.region=a,this.retries=h,this.url=g,this.version=p,d.instance){if(!_(this.options,d.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(d.instance.options)}`);return d.instance}d.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?exports.LoaderStatus.FAILURE:this.done?exports.LoaderStatus.SUCCESS:this.loading?exports.LoaderStatus.LOADING:exports.LoaderStatus.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(r=>{r?t(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(i=>!r[i]&&delete r[i]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(i=>{let n,l,u,c="The Google Maps JavaScript API",a="google",h="importLibrary",g="__ib__",p=document,f=window;f=f[a]||(f[a]={});const m=f.maps||(f.maps={}),E=new Set,y=new URLSearchParams,S=()=>n||(n=new Promise((v,b)=>k(this,void 0,void 0,function*(){var w;yield l=p.createElement("script"),l.id=this.id,y.set("libraries",[...E]+"");for(u in i)y.set(u.replace(/[A-Z]/g,O=>"_"+O[0].toLowerCase()),i[u]);y.set("callback",a+".maps."+g),l.src=this.url+"?"+y,m[g]=v,l.onerror=()=>n=b(Error(c+" could not load.")),l.nonce=this.nonce||((w=p.querySelector("script[nonce]"))===null||w===void 0?void 0:w.nonce)||"",p.head.append(l)})));m[h]?console.warn(c+" only loads once. Ignoring:",i):m[h]=(v,...b)=>E.add(v)&&S().then(()=>m[h](v,...b))})(r);const o=this.libraries.map(i=>this.importLibrary(i));o.length||o.push(this.importLibrary("core")),Promise.all(o).then(()=>this.callback(),i=>{const n=new ErrorEvent("error",{error:i});this.loadErrorCallback(n)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}exports.DEFAULT_ID=I;exports.Loader=d;
|
@@ -0,0 +1,238 @@
|
|
1
|
+
function P(s, e, i, r) {
|
2
|
+
function n(t) {
|
3
|
+
return t instanceof i ? t : new i(function(o) {
|
4
|
+
o(t);
|
5
|
+
});
|
6
|
+
}
|
7
|
+
return new (i || (i = Promise))(function(t, o) {
|
8
|
+
function a(l) {
|
9
|
+
try {
|
10
|
+
c(r.next(l));
|
11
|
+
} catch (h) {
|
12
|
+
o(h);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
function u(l) {
|
16
|
+
try {
|
17
|
+
c(r.throw(l));
|
18
|
+
} catch (h) {
|
19
|
+
o(h);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
function c(l) {
|
23
|
+
l.done ? t(l.value) : n(l.value).then(a, u);
|
24
|
+
}
|
25
|
+
c((r = r.apply(s, e || [])).next());
|
26
|
+
});
|
27
|
+
}
|
28
|
+
function _(s) {
|
29
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
30
|
+
}
|
31
|
+
var j = function s(e, i) {
|
32
|
+
if (e === i)
|
33
|
+
return !0;
|
34
|
+
if (e && i && typeof e == "object" && typeof i == "object") {
|
35
|
+
if (e.constructor !== i.constructor)
|
36
|
+
return !1;
|
37
|
+
var r, n, t;
|
38
|
+
if (Array.isArray(e)) {
|
39
|
+
if (r = e.length, r != i.length)
|
40
|
+
return !1;
|
41
|
+
for (n = r; n-- !== 0; )
|
42
|
+
if (!s(e[n], i[n]))
|
43
|
+
return !1;
|
44
|
+
return !0;
|
45
|
+
}
|
46
|
+
if (e.constructor === RegExp)
|
47
|
+
return e.source === i.source && e.flags === i.flags;
|
48
|
+
if (e.valueOf !== Object.prototype.valueOf)
|
49
|
+
return e.valueOf() === i.valueOf();
|
50
|
+
if (e.toString !== Object.prototype.toString)
|
51
|
+
return e.toString() === i.toString();
|
52
|
+
if (t = Object.keys(e), r = t.length, r !== Object.keys(i).length)
|
53
|
+
return !1;
|
54
|
+
for (n = r; n-- !== 0; )
|
55
|
+
if (!Object.prototype.hasOwnProperty.call(i, t[n]))
|
56
|
+
return !1;
|
57
|
+
for (n = r; n-- !== 0; ) {
|
58
|
+
var o = t[n];
|
59
|
+
if (!s(e[o], i[o]))
|
60
|
+
return !1;
|
61
|
+
}
|
62
|
+
return !0;
|
63
|
+
}
|
64
|
+
return e !== e && i !== i;
|
65
|
+
}, A = /* @__PURE__ */ _(j);
|
66
|
+
const S = "__googleMapsScriptId";
|
67
|
+
var f;
|
68
|
+
(function(s) {
|
69
|
+
s[s.INITIALIZED = 0] = "INITIALIZED", s[s.LOADING = 1] = "LOADING", s[s.SUCCESS = 2] = "SUCCESS", s[s.FAILURE = 3] = "FAILURE";
|
70
|
+
})(f || (f = {}));
|
71
|
+
class p {
|
72
|
+
/**
|
73
|
+
* Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
|
74
|
+
* using this library, instead the defaults are set by the Google Maps
|
75
|
+
* JavaScript API server.
|
76
|
+
*
|
77
|
+
* ```
|
78
|
+
* const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
|
79
|
+
* ```
|
80
|
+
*/
|
81
|
+
constructor({ apiKey: e, authReferrerPolicy: i, channel: r, client: n, id: t = S, language: o, libraries: a = [], mapIds: u, nonce: c, region: l, retries: h = 3, url: m = "https://maps.googleapis.com/maps/api/js", version: d }) {
|
82
|
+
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = i, this.channel = r, this.client = n, this.id = t || S, this.language = o, this.libraries = a, this.mapIds = u, this.nonce = c, this.region = l, this.retries = h, this.url = m, this.version = d, p.instance) {
|
83
|
+
if (!A(this.options, p.instance.options))
|
84
|
+
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(p.instance.options)}`);
|
85
|
+
return p.instance;
|
86
|
+
}
|
87
|
+
p.instance = this;
|
88
|
+
}
|
89
|
+
get options() {
|
90
|
+
return {
|
91
|
+
version: this.version,
|
92
|
+
apiKey: this.apiKey,
|
93
|
+
channel: this.channel,
|
94
|
+
client: this.client,
|
95
|
+
id: this.id,
|
96
|
+
libraries: this.libraries,
|
97
|
+
language: this.language,
|
98
|
+
region: this.region,
|
99
|
+
mapIds: this.mapIds,
|
100
|
+
nonce: this.nonce,
|
101
|
+
url: this.url,
|
102
|
+
authReferrerPolicy: this.authReferrerPolicy
|
103
|
+
};
|
104
|
+
}
|
105
|
+
get status() {
|
106
|
+
return this.errors.length ? f.FAILURE : this.done ? f.SUCCESS : this.loading ? f.LOADING : f.INITIALIZED;
|
107
|
+
}
|
108
|
+
get failed() {
|
109
|
+
return this.done && !this.loading && this.errors.length >= this.retries + 1;
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
|
113
|
+
*
|
114
|
+
* @ignore
|
115
|
+
* @deprecated
|
116
|
+
*/
|
117
|
+
createUrl() {
|
118
|
+
let e = this.url;
|
119
|
+
return e += "?callback=__googleMapsCallback&loading=async", this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `®ion=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (e += `&auth_referrer_policy=${this.authReferrerPolicy}`), e;
|
120
|
+
}
|
121
|
+
deleteScript() {
|
122
|
+
const e = document.getElementById(this.id);
|
123
|
+
e && e.remove();
|
124
|
+
}
|
125
|
+
/**
|
126
|
+
* Load the Google Maps JavaScript API script and return a Promise.
|
127
|
+
* @deprecated, use importLibrary() instead.
|
128
|
+
*/
|
129
|
+
load() {
|
130
|
+
return this.loadPromise();
|
131
|
+
}
|
132
|
+
/**
|
133
|
+
* Load the Google Maps JavaScript API script and return a Promise.
|
134
|
+
*
|
135
|
+
* @ignore
|
136
|
+
* @deprecated, use importLibrary() instead.
|
137
|
+
*/
|
138
|
+
loadPromise() {
|
139
|
+
return new Promise((e, i) => {
|
140
|
+
this.loadCallback((r) => {
|
141
|
+
r ? i(r.error) : e(window.google);
|
142
|
+
});
|
143
|
+
});
|
144
|
+
}
|
145
|
+
importLibrary(e) {
|
146
|
+
return this.execute(), google.maps.importLibrary(e);
|
147
|
+
}
|
148
|
+
/**
|
149
|
+
* Load the Google Maps JavaScript API script with a callback.
|
150
|
+
* @deprecated, use importLibrary() instead.
|
151
|
+
*/
|
152
|
+
loadCallback(e) {
|
153
|
+
this.callbacks.push(e), this.execute();
|
154
|
+
}
|
155
|
+
/**
|
156
|
+
* Set the script on document.
|
157
|
+
*/
|
158
|
+
setScript() {
|
159
|
+
var e, i;
|
160
|
+
if (document.getElementById(this.id)) {
|
161
|
+
this.callback();
|
162
|
+
return;
|
163
|
+
}
|
164
|
+
const r = {
|
165
|
+
key: this.apiKey,
|
166
|
+
channel: this.channel,
|
167
|
+
client: this.client,
|
168
|
+
libraries: this.libraries.length && this.libraries,
|
169
|
+
v: this.version,
|
170
|
+
mapIds: this.mapIds,
|
171
|
+
language: this.language,
|
172
|
+
region: this.region,
|
173
|
+
authReferrerPolicy: this.authReferrerPolicy
|
174
|
+
};
|
175
|
+
Object.keys(r).forEach(
|
176
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
177
|
+
(t) => !r[t] && delete r[t]
|
178
|
+
), !((i = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || i === void 0) && i.importLibrary || ((t) => {
|
179
|
+
let o, a, u, c = "The Google Maps JavaScript API", l = "google", h = "importLibrary", m = "__ib__", d = document, g = window;
|
180
|
+
g = g[l] || (g[l] = {});
|
181
|
+
const y = g.maps || (g.maps = {}), E = /* @__PURE__ */ new Set(), v = new URLSearchParams(), k = () => (
|
182
|
+
// @ts-ignore
|
183
|
+
o || (o = new Promise((b, w) => P(this, void 0, void 0, function* () {
|
184
|
+
var I;
|
185
|
+
yield a = d.createElement("script"), a.id = this.id, v.set("libraries", [...E] + "");
|
186
|
+
for (u in t)
|
187
|
+
v.set(u.replace(/[A-Z]/g, (O) => "_" + O[0].toLowerCase()), t[u]);
|
188
|
+
v.set("callback", l + ".maps." + m), a.src = this.url + "?" + v, y[m] = b, a.onerror = () => o = w(Error(c + " could not load.")), a.nonce = this.nonce || ((I = d.querySelector("script[nonce]")) === null || I === void 0 ? void 0 : I.nonce) || "", d.head.append(a);
|
189
|
+
})))
|
190
|
+
);
|
191
|
+
y[h] ? console.warn(c + " only loads once. Ignoring:", t) : y[h] = (b, ...w) => E.add(b) && k().then(() => y[h](b, ...w));
|
192
|
+
})(r);
|
193
|
+
const n = this.libraries.map((t) => this.importLibrary(t));
|
194
|
+
n.length || n.push(this.importLibrary("core")), Promise.all(n).then(() => this.callback(), (t) => {
|
195
|
+
const o = new ErrorEvent("error", { error: t });
|
196
|
+
this.loadErrorCallback(o);
|
197
|
+
});
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* Reset the loader state.
|
201
|
+
*/
|
202
|
+
reset() {
|
203
|
+
this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null;
|
204
|
+
}
|
205
|
+
resetIfRetryingFailed() {
|
206
|
+
this.failed && this.reset();
|
207
|
+
}
|
208
|
+
loadErrorCallback(e) {
|
209
|
+
if (this.errors.push(e), this.errors.length <= this.retries) {
|
210
|
+
const i = this.errors.length * Math.pow(2, this.errors.length);
|
211
|
+
console.error(`Failed to load Google Maps script, retrying in ${i} ms.`), setTimeout(() => {
|
212
|
+
this.deleteScript(), this.setScript();
|
213
|
+
}, i);
|
214
|
+
} else
|
215
|
+
this.onerrorEvent = e, this.callback();
|
216
|
+
}
|
217
|
+
callback() {
|
218
|
+
this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
|
219
|
+
e(this.onerrorEvent);
|
220
|
+
}), this.callbacks = [];
|
221
|
+
}
|
222
|
+
execute() {
|
223
|
+
if (this.resetIfRetryingFailed(), this.done)
|
224
|
+
this.callback();
|
225
|
+
else {
|
226
|
+
if (window.google && window.google.maps && window.google.maps.version) {
|
227
|
+
console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."), this.callback();
|
228
|
+
return;
|
229
|
+
}
|
230
|
+
this.loading || (this.loading = !0, this.setScript());
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
export {
|
235
|
+
S as DEFAULT_ID,
|
236
|
+
p as Loader,
|
237
|
+
f as LoaderStatus
|
238
|
+
};
|