@saasquatch/mint-components 2.5.5-2 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AsYouType-5f15a922.js +4764 -0
- package/dist/cjs/{ErrorView-17578c10.js → ErrorView-8f6cf1cb.js} +1 -1
- package/dist/cjs/{GenericTableView-4c48c630.js → GenericTableView-12d35117.js} +17 -15
- package/dist/cjs/{JSS-8503a151.js → JSS-bf8078e9.js} +342 -338
- package/dist/cjs/{ShadowViewAddon-f57cb460.js → ShadowViewAddon-ee16ec1d.js} +312 -292
- package/dist/cjs/{copy-text-view-bb2c0ea7.js → copy-text-view-49517b2a.js} +2 -2
- package/dist/cjs/{data-ae38fa86.js → data-77273531.js} +5 -5
- package/dist/cjs/demoMerge-6f125494.js +203 -0
- package/dist/cjs/{dom-context-hooks.module-e7b6727c.js → dom-context-hooks.module-735c3942.js} +133 -76
- package/dist/cjs/{email-registration-view-306c8878.js → email-registration-view-36a74293.js} +10 -9
- package/dist/cjs/{global-3ba30270.js → global-973bc63c.js} +587 -583
- package/dist/cjs/{index.module-3221a469.js → index-8530c62f.js} +2911 -511
- package/dist/cjs/{index-8277cbb3.js → index-d41c2c94.js} +766 -340
- package/dist/cjs/{index-8c6255f5.js → index-f1dd6136.js} +47 -29
- package/dist/cjs/{jsonpointer-11327262.js → jsonpointer-0db21316.js} +8 -4
- package/dist/cjs/loader.cjs.js +6 -5
- package/dist/cjs/{luxon-c1ad356a.js → luxon-d3612a3d.js} +486 -299
- package/dist/cjs/mint-components.cjs.js +11 -7
- package/dist/cjs/{mockRewardData-ed603fca.js → mockRewardData-e6a0a048.js} +5 -3
- package/dist/cjs/{parseStates-d1effc19.js → parseStates-35013ba4.js} +3 -0
- package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
- package/dist/cjs/{re-render-34b36aca.js → re-render-51c48d7c.js} +5 -5
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +399 -1395
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +813 -2891
- package/dist/cjs/{sqm-close-button-view-e9f2a454.js → sqm-close-button-view-74e5e1e9.js} +2 -2
- package/dist/cjs/sqm-close-button.cjs.entry.js +6 -11
- package/dist/cjs/sqm-code-verification.cjs.entry.js +20 -47
- package/dist/cjs/sqm-context-router.cjs.entry.js +9 -8
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +71 -182
- package/dist/cjs/sqm-empty_4.cjs.entry.js +21 -58
- package/dist/cjs/sqm-form-message_2.cjs.entry.js +7 -19
- package/dist/cjs/sqm-google-sign-in.cjs.entry.js +10 -9
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +11 -10
- package/dist/cjs/sqm-header-logo.cjs.entry.js +4 -19
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +14 -89
- package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +6 -8
- package/dist/cjs/{sqm-lead-checkbox-field-view-d6df81c7.js → sqm-lead-checkbox-field-view-24ac7358.js} +12 -11
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +14 -30
- package/dist/cjs/sqm-lead-input-field-view-7dfbc714.js +52 -0
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +15 -31
- package/dist/cjs/{sqm-leaderboard-rank-view-67fd7934.js → sqm-leaderboard-rank-view-e992762c.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +25 -22
- package/dist/cjs/{sqm-logout-current-user-view-f330d641.js → sqm-logout-current-user-view-ebee238e.js} +2 -2
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +17 -28
- package/dist/cjs/{sqm-navigation-sidebar-item-view-9134e64e.js → sqm-navigation-sidebar-item-view-a2cab80e.js} +4 -4
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +23 -18
- package/dist/cjs/{sqm-navigation-sidebar-view-6616e3e0.js → sqm-navigation-sidebar-view-873e0c44.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +12 -17
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +40 -102
- package/dist/cjs/{sqm-partner-info-modal-view-6173c618.js → sqm-partner-info-modal-view-c8972001.js} +4 -4
- package/dist/cjs/sqm-password-field.cjs.entry.js +186 -86
- package/dist/cjs/sqm-popup-container.cjs.entry.js +12 -12
- package/dist/cjs/{sqm-portal-container-view-757f921b.js → sqm-portal-container-view-c0cf9af9.js} +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-38d8344c.js → sqm-portal-email-verification-view-92866725.js} +4 -4
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +22 -52
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +101 -429
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +7 -13
- package/dist/cjs/{sqm-portal-profile-view-062eda68.js → sqm-portal-profile-view-60e78cdb.js} +20 -17
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +20 -56
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -24
- package/dist/cjs/{sqm-portal-registration-form-view-a45f7a52.js → sqm-portal-registration-form-view-5473e24d.js} +26 -21
- package/dist/cjs/{sqm-portal-reset-password-view-b2c546bd.js → sqm-portal-reset-password-view-7a6f55c5.js} +3 -3
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +21 -89
- package/dist/cjs/{sqm-portal-verify-email-view-2a120d0a.js → sqm-portal-verify-email-view-7efa70c9.js} +48 -45
- package/dist/cjs/{sqm-qr-code-view-0d43424e.js → sqm-qr-code-view-70da70f9.js} +3 -3
- package/dist/cjs/sqm-qr-code.cjs.entry.js +22 -48
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +37 -140
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +5 -4
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -7
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +98 -217
- package/dist/cjs/sqm-route.cjs.entry.js +2 -1
- package/dist/cjs/sqm-scroll.cjs.entry.js +12 -8
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2892 -2264
- package/dist/cjs/sqm-tab.cjs.entry.js +5 -4
- package/dist/cjs/sqm-tabs.cjs.entry.js +9 -8
- package/dist/cjs/{sqm-text-span-view-b9e10f5d.js → sqm-text-span-view-c6938acd.js} +2 -2
- package/dist/cjs/sqm-text-span.cjs.entry.js +8 -4
- package/dist/cjs/{sqm-user-info-form-view-aedca5fe.js → sqm-user-info-form-view-e878a9a3.js} +173 -163
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +6 -11
- package/dist/cjs/subregions-3dbacb18.js +1467 -0
- package/dist/cjs/{useChildElements-36f7e4bb.js → useChildElements-e5e26816.js} +3 -3
- package/dist/cjs/{useIndirectTaxForm-7656fc63.js → useIndirectTaxForm-691691c2.js} +42 -38
- package/dist/cjs/{useInstantAccessRegistration-43514e50.js → useInstantAccessRegistration-9201777d.js} +6 -6
- package/dist/cjs/{useLeadFormState-34f9834b.js → useLeadFormState-f5b768b9.js} +20 -20
- package/dist/cjs/{usePortalRegistrationForm-b18a1f6b.js → usePortalRegistrationForm-b3c0451b.js} +16 -13
- package/dist/cjs/{useReferralCodes-25d5320a.js → useReferralCodes-5794a177.js} +11 -11
- package/dist/cjs/{useReferralTable-ad86986b.js → useReferralTable-32b3541b.js} +19 -19
- package/dist/cjs/{useRegistrationFormState-ea81d55a.js → useRegistrationFormState-feccd2c8.js} +3 -3
- package/dist/cjs/{useVerificationEmail-70aad5f1.js → useVerificationEmail-f0807562.js} +17 -15
- package/dist/cjs/{utilities-dfc34bea.js → utilities-04345466.js} +3 -3
- package/dist/collection/ShadowViewAddon.js +1 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/raisins-plop-target/raisins-plop-target.js +36 -34
- package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +3 -7
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +11 -23
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +11 -27
- package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +2 -16
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +1 -4
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +294 -298
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +3 -3
- package/dist/collection/components/sqm-brand/SqmBrand.stories.js +4 -72
- package/dist/collection/components/sqm-brand/sqm-brand.js +61 -58
- package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +43 -120
- package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +1 -5
- package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +55 -59
- package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +17 -22
- package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +5 -19
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +18 -21
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +167 -179
- package/dist/collection/components/sqm-close-button/CloseButton.stories.js +3 -5
- package/dist/collection/components/sqm-close-button/sqm-close-button-view.js +1 -5
- package/dist/collection/components/sqm-close-button/sqm-close-button.js +32 -35
- package/dist/collection/components/sqm-context-router/ContextRouter.js +4 -33
- package/dist/collection/components/sqm-context-router/sqm-context-router.js +39 -33
- package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +13 -13
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -7
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +601 -695
- package/dist/collection/components/sqm-coupon-code/useCouponCode.js +10 -5
- package/dist/collection/components/sqm-divided-layout/DividedLayout.stories.js +19 -36
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +1 -5
- package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +129 -135
- package/dist/collection/components/sqm-dropdown-field/DropdownField.stories.js +7 -7
- package/dist/collection/components/sqm-dropdown-field/UseDropdownField.stories.js +3 -15
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +13 -15
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +128 -133
- package/dist/collection/components/sqm-edit-profile/EditProfileForm.stories.js +2 -2
- package/dist/collection/components/sqm-edit-profile/UseEditProfile.stories.js +9 -9
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +27 -45
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile.js +272 -264
- package/dist/collection/components/sqm-edit-profile/useEditProfile.js +4 -3
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +4 -7
- package/dist/collection/components/sqm-empty/sqm-empty-view.js +6 -12
- package/dist/collection/components/sqm-empty/sqm-empty.js +102 -95
- package/dist/collection/components/sqm-form-message/FormMessage.stories.js +9 -27
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +102 -108
- package/dist/collection/components/sqm-google-sign-in/sqm-google-sign-in.js +61 -56
- package/dist/collection/components/sqm-graphql-client-provider/sqm-graphql-client-provider.js +32 -28
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +147 -161
- package/dist/collection/components/sqm-hero/Hero.stories.js +20 -54
- package/dist/collection/components/sqm-hero/sqm-hero-view.js +5 -11
- package/dist/collection/components/sqm-hero/sqm-hero.js +177 -202
- package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +9 -26
- package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +533 -590
- package/dist/collection/components/sqm-hook-story-container/sqm-hook-story-container.js +28 -23
- package/dist/collection/components/sqm-image/sqm-image-view.js +1 -6
- package/dist/collection/components/sqm-image/sqm-image.js +131 -131
- package/dist/collection/components/sqm-input-field/InputField.stories.js +17 -17
- package/dist/collection/components/sqm-input-field/UseInputField.stories.js +7 -22
- package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +14 -15
- package/dist/collection/components/sqm-input-field/sqm-input-field.js +156 -162
- package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +410 -481
- package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +2 -18
- package/dist/collection/components/sqm-invoice-table/UseInvoiceTable.stories.js +2 -14
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-data-cell.js +27 -23
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +29 -29
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +85 -80
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +68 -64
- package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +40 -39
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -8
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +287 -310
- package/dist/collection/components/sqm-invoice-table/useInvoiceTable.js +1 -3
- package/dist/collection/components/sqm-lead-form/LeadCheckboxField.stories.js +7 -7
- package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +6 -10
- package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +10 -10
- package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +7 -7
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field-view.js +20 -24
- package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +167 -179
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +13 -17
- package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +174 -189
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +22 -48
- package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +365 -420
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +13 -16
- package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +179 -191
- package/dist/collection/components/sqm-lead-form/useLeadForm.js +3 -1
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +23 -29
- package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +3 -15
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +11 -35
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +553 -563
- package/dist/collection/components/sqm-leaderboard-rank/LeaderboardRank.stories.js +3 -12
- package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +200 -192
- package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +4 -3
- package/dist/collection/components/sqm-link-button/LinkButton.stories.js +2 -2
- package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +1 -6
- package/dist/collection/components/sqm-link-button/sqm-link-button.js +73 -77
- package/dist/collection/components/sqm-logout-current-user/LogoutCurrentUser.stories.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user-view.js +1 -9
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +106 -115
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +104 -109
- package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +21 -20
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +104 -109
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu-view.js +6 -9
- package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.js +92 -82
- package/dist/collection/components/sqm-navigation-sidebar/NavigationSidebar.stories.js +1 -3
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +1 -8
- package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +71 -73
- package/dist/collection/components/sqm-navigation-sidebar-item/SidebarItem.stories.js +2 -2
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +1 -4
- package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +315 -308
- package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +1 -9
- package/dist/collection/components/sqm-pagination/sqm-pagination.js +94 -100
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +13 -13
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +22 -54
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +515 -603
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +3 -3
- package/dist/collection/components/sqm-password-field/passwordValidation.js +8 -20
- package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +16 -18
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +197 -219
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -7
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -4
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +82 -84
- package/dist/collection/components/sqm-popup-container/PopupContainer.stories.js +1 -2
- package/dist/collection/components/sqm-popup-container/sqm-popup-container-view.js +1 -5
- package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +161 -155
- package/dist/collection/components/sqm-portal-change-marketing/ChangeMarketing.stories.js +5 -5
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.js +8 -17
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing.js +142 -154
- package/dist/collection/components/sqm-portal-change-password/ChangePassword.stories.js +6 -6
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -24
- package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +380 -436
- package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +5 -2
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +16 -119
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -5
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +280 -299
- package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +5 -5
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +13 -25
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +216 -243
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
- package/dist/collection/components/sqm-portal-footer/PortalFooter.stories.js +6 -6
- package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +1 -12
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -16
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +317 -351
- package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -4
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -14
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +279 -316
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +2 -1
- package/dist/collection/components/sqm-portal-frame/PortalFrame.stories.js +14 -55
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +1 -7
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +141 -158
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +295 -342
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +19 -26
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +645 -749
- package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +2 -5
- package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -17
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +255 -292
- package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
- package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +33 -36
- package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +6 -6
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +15 -26
- package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +282 -314
- package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +72 -82
- package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +8 -13
- package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +15 -28
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +525 -610
- package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -1
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +10 -15
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +20 -33
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +573 -663
- package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +5 -2
- package/dist/collection/components/sqm-portal-reset-password/PortalResetPassword.stories.js +6 -6
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +7 -29
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +449 -514
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +2 -1
- package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -2
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -14
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +196 -222
- package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +4 -2
- package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +20 -32
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +1 -7
- package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +84 -78
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +4 -10
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +231 -220
- package/dist/collection/components/sqm-program-menu/ProgramMenu.stories.js +8 -25
- package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +8 -9
- package/dist/collection/components/sqm-qr-code/QRCode.stories.js +8 -8
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -11
- package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +206 -230
- package/dist/collection/components/sqm-radio-card/RadioCard.stories.js +2 -2
- package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +1 -9
- package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +29 -86
- package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -11
- package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +304 -335
- package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +14 -14
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +369 -410
- package/dist/collection/components/sqm-referral-code/useReferralCode.js +3 -3
- package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +9 -36
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +3 -14
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +167 -175
- package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +2 -4
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -3
- package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +125 -132
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +9 -24
- package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -1
- package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +5 -8
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +1 -1
- package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +30 -30
- package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +8 -30
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-cell.js +28 -23
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +219 -278
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +81 -76
- package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +24 -20
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +65 -61
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +120 -139
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +260 -300
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +208 -225
- package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +124 -133
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +229 -253
- package/dist/collection/components/sqm-referral-table/useReferralTable.js +1 -3
- package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +479 -557
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +1 -1
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +1 -0
- package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +5 -26
- package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +8 -18
- package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +26 -28
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +96 -174
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +618 -726
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +16 -31
- package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +12 -15
- package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +11 -11
- package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +8 -30
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +45 -40
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +44 -40
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +97 -103
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +160 -156
- package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +336 -332
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +96 -105
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +67 -66
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +127 -135
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +173 -197
- package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +390 -463
- package/dist/collection/components/sqm-rewards-table/mockRewardData.js +4 -2
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +206 -219
- package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -3
- package/dist/collection/components/sqm-route/sqm-route.js +31 -26
- package/dist/collection/components/sqm-router/Router.stories.js +4 -33
- package/dist/collection/components/sqm-router/sqm-router.js +17 -14
- package/dist/collection/components/sqm-scroll/Scroll.stories.js +6 -89
- package/dist/collection/components/sqm-scroll/sqm-scroll.js +259 -255
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +12 -46
- package/dist/collection/components/sqm-share-button/UseShareButton.stories.js +2 -7
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -6
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +509 -521
- package/dist/collection/components/sqm-share-code/ShareCode.stories.js +13 -13
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +329 -360
- package/dist/collection/components/sqm-share-code/useShareCode.js +3 -3
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +85 -86
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +17 -20
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +21 -49
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +987 -1192
- package/dist/collection/components/sqm-share-link/useShareLink.js +3 -3
- package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +55 -59
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +1 -5
- package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +162 -185
- package/dist/collection/components/sqm-stencilbook/AutoColor.js +1 -1
- package/dist/collection/components/sqm-stencilbook/BrandSelector.js +12 -15
- package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -5
- package/dist/collection/components/sqm-stencilbook/HookStoryAddon.js +1 -2
- package/dist/collection/components/sqm-stencilbook/Matrix.js +4 -13
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +8 -13
- package/dist/collection/components/sqm-tab/sqm-tab.js +27 -25
- package/dist/collection/components/sqm-table-cell/sqm-table-cell.js +47 -49
- package/dist/collection/components/sqm-table-row/sqm-table-row.js +27 -30
- package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +10 -17
- package/dist/collection/components/sqm-tabs/sqm-tabs.js +62 -59
- package/dist/collection/components/sqm-tabs/useTabs.js +1 -2
- package/dist/collection/components/sqm-task-card/DetailsView.js +1 -7
- package/dist/collection/components/sqm-task-card/SVGs.js +3 -7
- package/dist/collection/components/sqm-task-card/TaskCard.stories.js +31 -277
- package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +1 -17
- package/dist/collection/components/sqm-task-card/progress-bar/ProgressBar.stories.js +1 -1
- package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +2 -10
- package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +10 -13
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +56 -83
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +780 -860
- package/dist/collection/components/sqm-text/Text.stories.js +2 -4
- package/dist/collection/components/sqm-text/sqm-text.js +61 -57
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -5
- package/dist/collection/components/sqm-text-span/sqm-text-span.js +109 -101
- package/dist/collection/components/sqm-timeline/SVGs.js +3 -9
- package/dist/collection/components/sqm-timeline/Timeline.stories.js +5 -57
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +1 -16
- package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +178 -166
- package/dist/collection/components/sqm-timeline/sqm-timeline.js +41 -45
- package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +5 -206
- package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +1 -4
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +129 -148
- package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +4 -7
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +1 -3
- package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +146 -137
- package/dist/collection/components/sqm-user-name/sqm-user-name.js +82 -84
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +6 -26
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +215 -240
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +12 -22
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +12 -30
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +177 -195
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +33 -41
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +771 -921
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +4 -2
- package/dist/collection/components/tax-and-cash/SVGs.js +1 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -3
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +188 -198
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +34 -83
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1864 -2210
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +8 -7
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +13 -31
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +26 -53
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +565 -660
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +6 -3
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +24 -63
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +699 -816
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +11 -7
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +1 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -20
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +130 -147
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +12 -33
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +910 -1035
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +2 -19
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4760 -5686
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +89 -176
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +1857 -2159
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +27 -27
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/DocusignExpiredView.js +5 -9
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +24 -44
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/SlotViews.stories.js +6 -6
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +120 -157
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +713 -823
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -7
- package/dist/collection/components/views/EmailRegistration.stories.js +60 -60
- package/dist/collection/components/views/copy-text-view.js +6 -17
- package/dist/collection/components/views/email-registration-view.js +14 -28
- package/dist/collection/global/styles.js +8 -4
- package/dist/collection/stories/NewPortal.stories.js +106 -178
- package/dist/collection/tables/GenericTableView.js +19 -27
- package/dist/collection/tables/TableSlots.js +5 -19
- package/dist/collection/utils/DefaultTemplateView.js +6 -24
- package/dist/collection/utils/RequiredPropsError.js +10 -24
- package/dist/collection/utils/TemplateView.js +1 -3
- package/dist/collection/utils/demoMerge.js +10 -0
- package/dist/esm/AsYouType-cc09fa68.js +4746 -0
- package/dist/esm/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
- package/dist/esm/{GenericTableView-471a9386.js → GenericTableView-4f7ac63d.js} +17 -15
- package/dist/esm/{JSS-67b5cff8.js → JSS-e97b34f4.js} +341 -337
- package/dist/esm/{ShadowViewAddon-e1375e0d.js → ShadowViewAddon-0c8005bd.js} +284 -264
- package/dist/esm/{copy-text-view-87259b11.js → copy-text-view-e1c3f2cd.js} +2 -2
- package/dist/esm/{data-04d2da44.js → data-510cc9b7.js} +1 -1
- package/dist/esm/demoMerge-a0320a8e.js +201 -0
- package/dist/esm/{dom-context-hooks.module-50442785.js → dom-context-hooks.module-f88a3e54.js} +129 -72
- package/dist/esm/{email-registration-view-4cdb4129.js → email-registration-view-7a63a912.js} +10 -9
- package/dist/esm/{global-f019575d.js → global-cf0cc6b1.js} +586 -582
- package/dist/esm/{index-38ad4957.js → index-7a8b0c0b.js} +766 -341
- package/dist/esm/{index.module-cc08450c.js → index-b04013cc.js} +2873 -473
- package/dist/esm/{index-ffa26b43.js → index-e6f5153e.js} +47 -29
- package/dist/esm/{jsonpointer-388a7082.js → jsonpointer-c5423376.js} +8 -4
- package/dist/esm/loader.js +6 -5
- package/dist/esm/{luxon-1be92a8e.js → luxon-40b943cb.js} +486 -299
- package/dist/esm/mint-components.js +8 -7
- package/dist/esm/{mockRewardData-9b27d6f1.js → mockRewardData-2cceba7a.js} +5 -3
- package/dist/esm/{parseStates-ed75e224.js → parseStates-0c27f2de.js} +3 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/raisins-plop-target.entry.js +1 -1
- package/dist/esm/{re-render-380499f8.js → re-render-e911a0f7.js} +5 -5
- package/dist/esm/sqm-banking-info-form_10.entry.js +381 -1377
- package/dist/esm/sqm-big-stat_47.entry.js +762 -2840
- package/dist/esm/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +2 -2
- package/dist/esm/sqm-close-button.entry.js +5 -10
- package/dist/esm/sqm-code-verification.entry.js +19 -46
- package/dist/esm/sqm-context-router.entry.js +6 -5
- package/dist/esm/sqm-email-verification_2.entry.js +43 -154
- package/dist/esm/sqm-empty_4.entry.js +21 -58
- package/dist/esm/sqm-form-message_2.entry.js +7 -19
- package/dist/esm/sqm-google-sign-in.entry.js +4 -3
- package/dist/esm/sqm-graphql-client-provider.entry.js +9 -8
- package/dist/esm/sqm-header-logo.entry.js +4 -19
- package/dist/esm/sqm-instant-access-registration.entry.js +12 -87
- package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +6 -8
- package/dist/esm/{sqm-lead-checkbox-field-view-04aa32a7.js → sqm-lead-checkbox-field-view-d055e7bd.js} +12 -11
- package/dist/esm/sqm-lead-checkbox-field.entry.js +12 -28
- package/dist/esm/sqm-lead-input-field-view-b0d62f1c.js +50 -0
- package/dist/esm/sqm-lead-input-field.entry.js +13 -29
- package/dist/esm/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +22 -19
- package/dist/esm/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +2 -2
- package/dist/esm/sqm-logout-current-user.entry.js +12 -23
- package/dist/esm/{sqm-navigation-sidebar-item-view-40837457.js → sqm-navigation-sidebar-item-view-754b2484.js} +4 -4
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +21 -16
- package/dist/esm/{sqm-navigation-sidebar-view-2b66457a.js → sqm-navigation-sidebar-view-e2094399.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar.entry.js +11 -16
- package/dist/esm/sqm-pagination_3.entry.js +35 -97
- package/dist/esm/{sqm-partner-info-modal-view-e02fb63a.js → sqm-partner-info-modal-view-3b59be37.js} +4 -4
- package/dist/esm/sqm-password-field.entry.js +185 -85
- package/dist/esm/sqm-popup-container.entry.js +12 -12
- package/dist/esm/{sqm-portal-container-view-200c9df8.js → sqm-portal-container-view-fcd53673.js} +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +4 -4
- package/dist/esm/sqm-portal-email-verification.entry.js +18 -48
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +73 -401
- package/dist/esm/sqm-portal-logout.entry.js +5 -11
- package/dist/esm/{sqm-portal-profile-view-41894261.js → sqm-portal-profile-view-f27adfba.js} +20 -17
- package/dist/esm/sqm-portal-profile.entry.js +16 -52
- package/dist/esm/sqm-portal-protected-route.entry.js +8 -21
- package/dist/esm/{sqm-portal-registration-form-view-79265df5.js → sqm-portal-registration-form-view-113e1969.js} +26 -21
- package/dist/esm/{sqm-portal-reset-password-view-c7dd1c01.js → sqm-portal-reset-password-view-f9fb6355.js} +3 -3
- package/dist/esm/sqm-portal-reset-password.entry.js +18 -86
- package/dist/esm/{sqm-portal-verify-email-view-c102aa7c.js → sqm-portal-verify-email-view-ee40e3f2.js} +48 -45
- package/dist/esm/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +3 -3
- package/dist/esm/sqm-qr-code.entry.js +18 -44
- package/dist/esm/sqm-referral-table_11.entry.js +36 -139
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +5 -4
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -7
- package/dist/esm/sqm-rewards-table_9.entry.js +55 -174
- package/dist/esm/sqm-route.entry.js +2 -1
- package/dist/esm/sqm-scroll.entry.js +12 -8
- package/dist/esm/sqm-stencilbook.entry.js +4808 -4180
- package/dist/esm/sqm-tab.entry.js +5 -4
- package/dist/esm/sqm-tabs.entry.js +9 -8
- package/dist/esm/{sqm-text-span-view-72f43dff.js → sqm-text-span-view-ed92b3c6.js} +2 -2
- package/dist/esm/sqm-text-span.entry.js +8 -4
- package/dist/esm/{sqm-user-info-form-view-8a95c5eb.js → sqm-user-info-form-view-c044a385.js} +173 -163
- package/dist/esm/sqm-widget-verification-controller.entry.js +4 -9
- package/dist/esm/subregions-d9f177f6.js +1452 -0
- package/dist/esm/{useChildElements-aa9eb7c9.js → useChildElements-a69f208f.js} +3 -3
- package/dist/esm/{useIndirectTaxForm-8d2e873d.js → useIndirectTaxForm-64a3ca69.js} +32 -28
- package/dist/esm/{useInstantAccessRegistration-7b11eb02.js → useInstantAccessRegistration-8c678a5a.js} +6 -6
- package/dist/esm/{useLeadFormState-b67018f2.js → useLeadFormState-34e05463.js} +7 -7
- package/dist/esm/{usePortalRegistrationForm-91e5786d.js → usePortalRegistrationForm-c6519939.js} +14 -11
- package/dist/esm/{useReferralCodes-a0a271ca.js → useReferralCodes-d0a384e4.js} +9 -9
- package/dist/esm/{useReferralTable-670580ff.js → useReferralTable-214dff06.js} +11 -11
- package/dist/esm/{useRegistrationFormState-95a75c57.js → useRegistrationFormState-72b4786d.js} +3 -3
- package/dist/esm/{useVerificationEmail-99d9f705.js → useVerificationEmail-b2c349a3.js} +12 -10
- package/dist/esm/{utilities-23a276e0.js → utilities-ceab25cd.js} +2 -2
- package/dist/esm-es5/AsYouType-cc09fa68.js +1 -0
- package/dist/esm-es5/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
- package/dist/esm-es5/GenericTableView-4f7ac63d.js +1 -0
- package/dist/esm-es5/JSS-e97b34f4.js +8 -0
- package/dist/esm-es5/ShadowViewAddon-0c8005bd.js +1 -0
- package/dist/esm-es5/copy-text-view-e1c3f2cd.js +1 -0
- package/dist/esm-es5/data-510cc9b7.js +1 -0
- package/dist/esm-es5/demoMerge-a0320a8e.js +1 -0
- package/dist/esm-es5/dom-context-hooks.module-f88a3e54.js +53 -0
- package/dist/esm-es5/email-registration-view-7a63a912.js +1 -0
- package/dist/esm-es5/global-cf0cc6b1.js +271 -0
- package/dist/esm-es5/imageUrl-4775f17b.js +1 -1
- package/dist/esm-es5/index-7a8b0c0b.js +2 -0
- package/dist/esm-es5/index-b04013cc.js +1 -0
- package/dist/esm-es5/index-e6f5153e.js +1 -0
- package/dist/esm-es5/jsonpointer-c5423376.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/luxon-40b943cb.js +1 -0
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/mockRewardData-2cceba7a.js +1 -0
- package/dist/esm-es5/parseStates-0c27f2de.js +1 -0
- package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
- package/dist/esm-es5/re-render-e911a0f7.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-context-router.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
- package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field-view-d055e7bd.js +1 -0
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/sqm-lead-input-field-view-b0d62f1c.js +1 -0
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-754b2484.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-e2094399.js +1 -0
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-3b59be37.js +1 -0
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-fcd53673.js +1 -0
- package/dist/esm-es5/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-profile-view-f27adfba.js +1 -0
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-113e1969.js +1 -0
- package/dist/esm-es5/sqm-portal-reset-password-view-f9fb6355.js +1 -0
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-ee40e3f2.js +1 -0
- package/dist/esm-es5/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-route.entry.js +1 -1
- package/dist/esm-es5/sqm-scroll.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/sqm-text-span-view-ed92b3c6.js +1 -0
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-c044a385.js +1 -0
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/subregions-d9f177f6.js +1 -0
- package/dist/esm-es5/useChildElements-a69f208f.js +1 -0
- package/dist/esm-es5/useIndirectTaxForm-64a3ca69.js +6 -0
- package/dist/esm-es5/useInstantAccessRegistration-8c678a5a.js +1 -0
- package/dist/esm-es5/useLeadFormState-34e05463.js +1 -0
- package/dist/esm-es5/usePortalRegistrationForm-c6519939.js +1 -0
- package/dist/esm-es5/useReferralCodes-d0a384e4.js +1 -0
- package/dist/esm-es5/useReferralTable-214dff06.js +1 -0
- package/dist/esm-es5/useRegistrationFormState-72b4786d.js +1 -0
- package/dist/esm-es5/useVerificationEmail-b2c349a3.js +1 -0
- package/dist/esm-es5/utilities-ceab25cd.js +1 -0
- package/dist/esm-es5/utils-334c1e34.js +1 -1
- package/dist/loader/index.d.ts +9 -1
- package/dist/loader/package.json +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +2 -1
- package/dist/mint-components/p-029ee766.system.js +1 -0
- package/dist/mint-components/p-04eaa3bb.system.js +1 -0
- package/dist/mint-components/p-056845fb.js +56 -0
- package/dist/mint-components/p-05715d8c.system.entry.js +1 -0
- package/dist/mint-components/p-0650e0f1.system.js +1 -0
- package/dist/mint-components/p-09a6ab1f.entry.js +1 -0
- package/dist/mint-components/p-0a8c9f35.system.entry.js +1 -0
- package/dist/mint-components/{p-11c127f5.js → p-0b77b3fe.js} +1 -1
- package/dist/mint-components/p-0bc61e27.system.entry.js +1 -0
- package/dist/mint-components/p-0bdacc2d.system.js +1 -0
- package/dist/mint-components/p-0c81f11f.system.entry.js +1 -0
- package/dist/mint-components/p-0c97293e.entry.js +1 -0
- package/dist/mint-components/p-0d69fc17.system.entry.js +1 -0
- package/dist/mint-components/p-0daa339e.entry.js +1 -0
- package/dist/mint-components/p-0f65e4ad.system.js +1 -0
- package/dist/mint-components/p-11028f98.system.js +1 -0
- package/dist/mint-components/p-119b9680.system.js +1 -0
- package/dist/mint-components/{p-ed741b3b.js → p-125c5bec.js} +6 -6
- package/dist/mint-components/p-12ae9c97.entry.js +1 -0
- package/dist/mint-components/p-139825b2.entry.js +1 -0
- package/dist/mint-components/p-14f0af4c.system.entry.js +1 -0
- package/dist/mint-components/{p-1a3a57c0.js → p-159a9368.js} +1 -1
- package/dist/mint-components/{p-78e98761.js → p-15f170d4.js} +4 -4
- package/dist/mint-components/p-162e5426.system.js +1 -0
- package/dist/mint-components/p-1933e4cc.system.entry.js +1 -0
- package/dist/mint-components/p-1aa5cdff.entry.js +1 -0
- package/dist/mint-components/p-1b673705.system.js +1 -0
- package/dist/mint-components/p-1e1543c7.entry.js +1 -0
- package/dist/mint-components/p-201ae45a.js +1 -0
- package/dist/mint-components/p-20b90db3.system.entry.js +1 -0
- package/dist/mint-components/p-2380b28e.system.entry.js +1 -0
- package/dist/mint-components/p-258152c8.system.entry.js +1 -0
- package/dist/mint-components/p-29be0454.system.entry.js +1 -0
- package/dist/mint-components/p-2af001d4.system.js +1 -0
- package/dist/mint-components/{p-88e16945.js → p-2b052eed.js} +1 -1
- package/dist/mint-components/p-2b5c577a.system.js +1 -0
- package/dist/mint-components/p-2ff39583.entry.js +33 -0
- package/dist/mint-components/p-3104b4ba.entry.js +1 -0
- package/dist/mint-components/p-324dd9c9.system.entry.js +1 -0
- package/dist/mint-components/p-32b3c92e.system.entry.js +1 -0
- package/dist/mint-components/{p-c813ec64.js → p-3595dbe3.js} +1 -1
- package/dist/mint-components/p-384d4366.system.entry.js +1 -0
- package/dist/mint-components/{p-a417a4c7.js → p-388fdcdc.js} +1 -1
- package/dist/mint-components/{p-acaf505d.entry.js → p-39e59497.entry.js} +1 -1
- package/dist/mint-components/p-3a8fa8df.system.entry.js +1 -0
- package/dist/mint-components/{p-456ccda6.system.js → p-3aab5e80.system.js} +1 -1
- package/dist/mint-components/p-3b7eac48.js +1 -0
- package/dist/mint-components/p-3f9d4025.js +254 -0
- package/dist/mint-components/p-4639a9ed.entry.js +1 -0
- package/dist/mint-components/p-483c2ce0.system.entry.js +1 -0
- package/dist/mint-components/p-487dac4b.system.js +271 -0
- package/dist/mint-components/p-49ca1533.system.entry.js +1 -0
- package/dist/mint-components/p-49d4188a.system.js +1 -0
- package/dist/mint-components/p-4be3689e.system.entry.js +1 -0
- package/dist/mint-components/p-4d690bf1.system.js +1 -0
- package/dist/mint-components/p-4ea630ba.system.js +1 -0
- package/dist/mint-components/p-5a1be3aa.entry.js +83 -0
- package/dist/mint-components/p-5a2c495f.js +1 -0
- package/dist/mint-components/p-5b043988.system.entry.js +1 -0
- package/dist/mint-components/p-5bacacba.entry.js +13 -0
- package/dist/mint-components/p-5e7e4e54.system.entry.js +1 -0
- package/dist/mint-components/p-6333265f.system.js +1 -1
- package/dist/mint-components/p-643a756b.system.js +53 -0
- package/dist/mint-components/p-647ca265.entry.js +1 -0
- package/dist/mint-components/p-647ffff2.entry.js +1 -0
- package/dist/mint-components/p-64c93b03.system.js +1 -0
- package/dist/mint-components/p-6708043c.entry.js +1 -0
- package/dist/mint-components/p-6a7c9ae4.system.entry.js +1 -0
- package/dist/mint-components/p-6a7cd966.system.js +1 -0
- package/dist/mint-components/p-6b9ff091.system.js +1 -0
- package/dist/mint-components/p-6be0e0a7.system.entry.js +1 -0
- package/dist/mint-components/p-6ccdf33a.js +1 -0
- package/dist/mint-components/p-6cdde5e8.system.js +1 -0
- package/dist/mint-components/p-6cfca206.js +1 -0
- package/dist/mint-components/{p-d276468c.js → p-6e00edce.js} +1 -1
- package/dist/mint-components/p-6eb14db9.system.entry.js +1 -0
- package/dist/mint-components/p-6f3ba1ad.system.js +1 -0
- package/dist/mint-components/p-6f66bb97.system.js +1 -0
- package/dist/mint-components/p-7127e360.system.entry.js +1 -0
- package/dist/mint-components/{p-d0559e66.js → p-71759064.js} +1 -1
- package/dist/mint-components/p-72f11f03.js +1 -0
- package/dist/mint-components/p-732ac03d.js +1 -0
- package/dist/mint-components/p-74f50554.js +1 -0
- package/dist/mint-components/p-7558fe46.js +499 -0
- package/dist/mint-components/{p-c43e1d3b.js → p-75b7496e.js} +1 -1
- package/dist/mint-components/p-76d36b05.js +1 -0
- package/dist/mint-components/p-7a8ed2f3.system.entry.js +1 -0
- package/dist/mint-components/{p-3390f1f2.system.js → p-7d992af1.system.js} +2 -2
- package/dist/mint-components/p-7f71b56b.system.entry.js +1 -0
- package/dist/mint-components/p-81b63e83.system.entry.js +1 -0
- package/dist/mint-components/p-83330731.system.js +1 -0
- package/dist/mint-components/p-834cd992.js +2 -0
- package/dist/mint-components/p-843c9997.system.js +1 -0
- package/dist/mint-components/{p-956f9479.system.js → p-8680e52b.system.js} +1 -1
- package/dist/mint-components/p-8740794e.system.js +2 -0
- package/dist/mint-components/p-885630e6.entry.js +1 -0
- package/dist/mint-components/p-8886a874.system.js +1 -0
- package/dist/mint-components/p-88b65807.system.js +1 -0
- package/dist/mint-components/p-89b410d5.system.entry.js +1 -0
- package/dist/mint-components/p-89eef397.entry.js +1 -0
- package/dist/mint-components/p-8aae5dba.system.entry.js +1 -0
- package/dist/mint-components/p-8ba39302.entry.js +1 -0
- package/dist/mint-components/{p-c2254b88.js → p-8d85f34c.js} +1 -1
- package/dist/mint-components/p-8f67c580.js +1 -0
- package/dist/mint-components/p-8fa1f8e3.entry.js +1 -0
- package/dist/mint-components/p-930cc94f.system.js +1 -0
- package/dist/mint-components/p-94f3e0a2.js +1 -0
- package/dist/mint-components/p-96e332db.entry.js +17 -0
- package/dist/mint-components/p-9755e82a.system.entry.js +1 -0
- package/dist/mint-components/p-9a7f186b.entry.js +1 -0
- package/dist/mint-components/p-9c2e286c.entry.js +11 -0
- package/dist/mint-components/{p-e30abc44.js → p-9cabd2d1.js} +1 -1
- package/dist/mint-components/p-9d06abb3.entry.js +13 -0
- package/dist/mint-components/p-9d1659c4.entry.js +308 -0
- package/dist/mint-components/p-9d6ef5ca.entry.js +11 -0
- package/dist/mint-components/p-a0e6ccbc.system.js +1 -0
- package/dist/mint-components/p-a35191ca.system.js +1 -0
- package/dist/mint-components/p-a3d1c665.system.entry.js +1 -0
- package/dist/mint-components/p-a43a9fa9.system.js +1 -1
- package/dist/mint-components/{p-04da3964.system.js → p-a6c96b8a.system.js} +1 -1
- package/dist/mint-components/p-a75748c4.js +13 -0
- package/dist/mint-components/{p-f9fcc772.js → p-a7a74002.js} +1 -1
- package/dist/mint-components/{p-3484f1c1.js → p-a8e2f45b.js} +1 -1
- package/dist/mint-components/p-a976d930.system.entry.js +1 -0
- package/dist/mint-components/p-aadbe44d.js +1 -0
- package/dist/mint-components/p-aaf15612.entry.js +1 -0
- package/dist/mint-components/p-ab1e96ea.system.js +1 -0
- package/dist/mint-components/p-abd9e52b.system.entry.js +1 -0
- package/dist/mint-components/{p-19aebd7d.js → p-ac32d96a.js} +1 -1
- package/dist/mint-components/{p-381af581.js → p-acd3e9e3.js} +1 -1
- package/dist/mint-components/{p-9a69f781.system.js → p-ae5f7df6.system.js} +1 -1
- package/dist/mint-components/p-af9d3491.js +1 -0
- package/dist/mint-components/p-b1f880ee.entry.js +1 -0
- package/dist/mint-components/p-b492fd4b.system.entry.js +1 -0
- package/dist/mint-components/p-b652d3b3.js +1 -0
- package/dist/mint-components/p-b6f5ab75.system.entry.js +1 -0
- package/dist/mint-components/p-b907384d.entry.js +1 -0
- package/dist/mint-components/p-bbb494a8.system.js +1 -0
- package/dist/mint-components/p-bd1a14ba.js +1 -0
- package/dist/mint-components/p-bd66c171.js +1 -0
- package/dist/mint-components/p-be38ae67.js +1 -0
- package/dist/mint-components/p-c30dfd5d.entry.js +92 -0
- package/dist/mint-components/p-c380988f.system.js +1 -0
- package/dist/mint-components/{p-104f6ced.entry.js → p-c3a07f51.entry.js} +1 -1
- package/dist/mint-components/p-c50c206e.system.js +1 -0
- package/dist/mint-components/p-c6d2a452.js +1 -0
- package/dist/mint-components/p-c7dd2eaa.system.entry.js +1 -0
- package/dist/mint-components/p-c8f697e4.system.js +1 -0
- package/dist/mint-components/p-c980e369.entry.js +1 -0
- package/dist/mint-components/p-cb714df1.system.js +1 -0
- package/dist/mint-components/p-cdf099fe.js +108 -0
- package/dist/mint-components/p-ce06d498.js +52 -0
- package/dist/mint-components/p-d08ebaa9.js +1 -0
- package/dist/mint-components/p-d8fac546.entry.js +1 -0
- package/dist/mint-components/p-d91a97d2.js +1 -0
- package/dist/mint-components/p-da6cb2c3.system.entry.js +1 -0
- package/dist/mint-components/p-dd7e8c95.system.js +8 -0
- package/dist/mint-components/p-dd82a675.system.entry.js +1 -0
- package/dist/mint-components/p-df1206f0.entry.js +1 -0
- package/dist/mint-components/p-df45273e.js +1 -0
- package/dist/mint-components/p-df531a5d.entry.js +1 -0
- package/dist/mint-components/p-e1c55f04.system.entry.js +1 -0
- package/dist/mint-components/p-e33839b3.system.js +1 -0
- package/dist/mint-components/p-e389aded.entry.js +1 -0
- package/dist/mint-components/p-e73e0fc4.system.js +1 -0
- package/dist/mint-components/p-e7f7b9c6.entry.js +1 -0
- package/dist/mint-components/{p-b47e3740.system.js → p-e9942aae.system.js} +1 -1
- package/dist/mint-components/p-eac100d1.system.js +1 -0
- package/dist/mint-components/p-eb47b174.entry.js +1 -0
- package/dist/mint-components/p-eba82926.js +1 -0
- package/dist/mint-components/p-ec00bb5f.js +1 -0
- package/dist/mint-components/p-edc8d9bc.system.js +1 -0
- package/dist/mint-components/p-f0e1d538.entry.js +147 -0
- package/dist/mint-components/{p-ff75998a.system.entry.js → p-f53c7a87.system.entry.js} +1 -1
- package/dist/mint-components/p-f686c142.system.js +1 -0
- package/dist/mint-components/{p-5b0de730.js → p-fa2edc58.js} +152 -152
- package/dist/mint-components/p-fab41ea8.system.entry.js +1 -0
- package/dist/mint-components/p-fd14377b.entry.js +1 -0
- package/dist/mint-components/p-ff1336b3.entry.js +148 -0
- package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -1
- package/dist/types/components/sqm-context-router/useContextRouter.d.ts +1 -1
- package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -1
- package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +1 -1
- package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +2 -2
- package/dist/types/components/sqm-lead-form/useLeadFormState.d.ts +3 -3
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -2
- package/dist/types/components/sqm-pagination/usePagination.d.ts +1 -1
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +3 -3
- package/dist/types/components/sqm-popup-container/sqm-popup-container-view.d.ts +1 -1
- package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
- package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +1 -1
- package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +1 -1
- package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -1
- package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -1
- package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +1 -1
- package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +3 -3
- package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +2 -2
- package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -1
- package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +1 -1
- package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +2 -2
- package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +5 -5
- package/dist/types/components/sqm-router/useRouter.d.ts +1 -1
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +1 -1
- package/dist/types/components/sqm-stencilbook/Matrix.d.ts +1 -1
- package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +1 -1
- package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -1
- package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +1 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
- package/dist/types/components/sqm-widget-verification/getVerificationStep.d.ts +2 -2
- package/dist/types/components/tax-and-cash/data.d.ts +13 -13
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/mockData.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -2
- package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +5 -5
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +6 -6
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -3
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/extractProps.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +5 -5
- package/dist/types/components/tax-and-cash/subregions.d.ts +1 -1
- package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
- package/dist/types/components.d.ts +3771 -3
- package/dist/types/global/mixins.d.ts +5 -5
- package/dist/types/stencil-public-runtime.d.ts +275 -193
- package/dist/types/utils/RequiredPropsError.d.ts +1 -1
- package/dist/types/utils/demoMerge.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/docs/docs.docx +0 -0
- package/docs/stats.json +120116 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +34 -45
- package/dist/cjs/AsYouType-d15caac8.js +0 -4128
- package/dist/cjs/cjs-1066ec21.js +0 -135
- package/dist/cjs/eventKeys-7af4df4d.js +0 -5
- package/dist/cjs/sqm-lead-input-field-view-cd3f8076.js +0 -51
- package/dist/cjs/subregions-36662566.js +0 -1101
- package/dist/esm/AsYouType-2d56519e.js +0 -4108
- package/dist/esm/cjs-bdfb4486.js +0 -133
- package/dist/esm/eventKeys-f76b6a03.js +0 -3
- package/dist/esm/sqm-lead-input-field-view-919dc0a9.js +0 -49
- package/dist/esm/subregions-16dc47a9.js +0 -1086
- package/dist/esm-es5/AsYouType-2d56519e.js +0 -1
- package/dist/esm-es5/GenericTableView-471a9386.js +0 -1
- package/dist/esm-es5/JSS-67b5cff8.js +0 -8
- package/dist/esm-es5/ShadowViewAddon-e1375e0d.js +0 -1
- package/dist/esm-es5/cjs-bdfb4486.js +0 -1
- package/dist/esm-es5/copy-text-view-87259b11.js +0 -1
- package/dist/esm-es5/data-04d2da44.js +0 -1
- package/dist/esm-es5/dom-context-hooks.module-50442785.js +0 -53
- package/dist/esm-es5/email-registration-view-4cdb4129.js +0 -1
- package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
- package/dist/esm-es5/global-f019575d.js +0 -271
- package/dist/esm-es5/index-38ad4957.js +0 -1
- package/dist/esm-es5/index-ffa26b43.js +0 -1
- package/dist/esm-es5/index.module-cc08450c.js +0 -1
- package/dist/esm-es5/jsonpointer-388a7082.js +0 -1
- package/dist/esm-es5/luxon-1be92a8e.js +0 -1
- package/dist/esm-es5/mockRewardData-9b27d6f1.js +0 -1
- package/dist/esm-es5/parseStates-ed75e224.js +0 -1
- package/dist/esm-es5/re-render-380499f8.js +0 -1
- package/dist/esm-es5/sqm-lead-checkbox-field-view-04aa32a7.js +0 -1
- package/dist/esm-es5/sqm-lead-input-field-view-919dc0a9.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item-view-40837457.js +0 -1
- package/dist/esm-es5/sqm-navigation-sidebar-view-2b66457a.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-e02fb63a.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +0 -1
- package/dist/esm-es5/sqm-portal-profile-view-41894261.js +0 -1
- package/dist/esm-es5/sqm-portal-registration-form-view-79265df5.js +0 -1
- package/dist/esm-es5/sqm-portal-reset-password-view-c7dd1c01.js +0 -1
- package/dist/esm-es5/sqm-portal-verify-email-view-c102aa7c.js +0 -1
- package/dist/esm-es5/sqm-text-span-view-72f43dff.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-8a95c5eb.js +0 -1
- package/dist/esm-es5/subregions-16dc47a9.js +0 -1
- package/dist/esm-es5/useChildElements-aa9eb7c9.js +0 -1
- package/dist/esm-es5/useIndirectTaxForm-8d2e873d.js +0 -6
- package/dist/esm-es5/useInstantAccessRegistration-7b11eb02.js +0 -1
- package/dist/esm-es5/useLeadFormState-b67018f2.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-91e5786d.js +0 -1
- package/dist/esm-es5/useReferralCodes-a0a271ca.js +0 -1
- package/dist/esm-es5/useReferralTable-670580ff.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-95a75c57.js +0 -1
- package/dist/esm-es5/useVerificationEmail-99d9f705.js +0 -1
- package/dist/esm-es5/utilities-23a276e0.js +0 -1
- package/dist/mint-components/p-0306ce68.js +0 -1
- package/dist/mint-components/p-03361685.system.entry.js +0 -1
- package/dist/mint-components/p-036b876f.system.js +0 -1
- package/dist/mint-components/p-083180bf.js +0 -1
- package/dist/mint-components/p-08f36275.entry.js +0 -92
- package/dist/mint-components/p-08f82f9e.system.entry.js +0 -1
- package/dist/mint-components/p-092305db.entry.js +0 -1
- package/dist/mint-components/p-0ac8d8f4.system.js +0 -1
- package/dist/mint-components/p-0b1e90fe.system.js +0 -1
- package/dist/mint-components/p-0dca7884.entry.js +0 -148
- package/dist/mint-components/p-0ec9eb9b.entry.js +0 -1
- package/dist/mint-components/p-115dfc03.system.js +0 -1
- package/dist/mint-components/p-128610fb.system.js +0 -1
- package/dist/mint-components/p-13d1b10d.entry.js +0 -1
- package/dist/mint-components/p-13f3a647.js +0 -1
- package/dist/mint-components/p-16bd4751.system.entry.js +0 -1
- package/dist/mint-components/p-1a673057.system.js +0 -8
- package/dist/mint-components/p-1cf59d96.system.js +0 -1
- package/dist/mint-components/p-1ee1dd9c.system.entry.js +0 -1
- package/dist/mint-components/p-1f292473.entry.js +0 -1
- package/dist/mint-components/p-220cd813.system.entry.js +0 -1
- package/dist/mint-components/p-2392aabe.entry.js +0 -1
- package/dist/mint-components/p-263ca1be.system.js +0 -1
- package/dist/mint-components/p-274816ae.entry.js +0 -1
- package/dist/mint-components/p-2786819c.js +0 -1
- package/dist/mint-components/p-28ed2ae9.js +0 -1
- package/dist/mint-components/p-28fa5159.entry.js +0 -1
- package/dist/mint-components/p-290314a6.js +0 -52
- package/dist/mint-components/p-2cc01e0a.system.js +0 -1
- package/dist/mint-components/p-319bf866.system.entry.js +0 -1
- package/dist/mint-components/p-31b7d861.entry.js +0 -1
- package/dist/mint-components/p-31c5f477.entry.js +0 -1
- package/dist/mint-components/p-31cfa118.system.entry.js +0 -1
- package/dist/mint-components/p-3268c98c.system.entry.js +0 -1
- package/dist/mint-components/p-34917ee4.system.js +0 -1
- package/dist/mint-components/p-34bea1be.system.js +0 -1
- package/dist/mint-components/p-3db7a3c0.system.entry.js +0 -1
- package/dist/mint-components/p-429fa431.js +0 -1
- package/dist/mint-components/p-44ce74b6.js +0 -1
- package/dist/mint-components/p-45be99ae.system.js +0 -1
- package/dist/mint-components/p-47dc2362.system.entry.js +0 -1
- package/dist/mint-components/p-48b25874.system.js +0 -1
- package/dist/mint-components/p-4bd679a7.system.js +0 -1
- package/dist/mint-components/p-4ca6cc3c.system.entry.js +0 -1
- package/dist/mint-components/p-51d06654.system.js +0 -1
- package/dist/mint-components/p-5218d9dd.system.entry.js +0 -1
- package/dist/mint-components/p-5264ea68.js +0 -1
- package/dist/mint-components/p-5300edb5.js +0 -1
- package/dist/mint-components/p-556338c3.system.js +0 -1
- package/dist/mint-components/p-573ea3fd.system.entry.js +0 -1
- package/dist/mint-components/p-57c693ef.system.entry.js +0 -1
- package/dist/mint-components/p-59d5f239.system.entry.js +0 -1
- package/dist/mint-components/p-5c3cdefe.entry.js +0 -1
- package/dist/mint-components/p-5cda271c.system.entry.js +0 -1
- package/dist/mint-components/p-5d99dbc9.js +0 -1
- package/dist/mint-components/p-6196e0f6.entry.js +0 -308
- package/dist/mint-components/p-641f968d.system.js +0 -1
- package/dist/mint-components/p-686dd5eb.system.js +0 -1
- package/dist/mint-components/p-6b5528b1.entry.js +0 -33
- package/dist/mint-components/p-6c3a1d86.js +0 -1
- package/dist/mint-components/p-6c8758ac.entry.js +0 -1
- package/dist/mint-components/p-6dffb326.entry.js +0 -13
- package/dist/mint-components/p-6e9738a4.js +0 -1
- package/dist/mint-components/p-6f8dde97.system.js +0 -1
- package/dist/mint-components/p-7010498f.js +0 -1
- package/dist/mint-components/p-7062154c.system.js +0 -1
- package/dist/mint-components/p-717fa601.js +0 -1
- package/dist/mint-components/p-732907b1.system.entry.js +0 -1
- package/dist/mint-components/p-7562cd98.system.js +0 -1
- package/dist/mint-components/p-7ae8fb53.system.js +0 -1
- package/dist/mint-components/p-808f7f22.entry.js +0 -1
- package/dist/mint-components/p-80cee817.system.js +0 -1
- package/dist/mint-components/p-8452837a.system.js +0 -1
- package/dist/mint-components/p-85996c52.system.entry.js +0 -1
- package/dist/mint-components/p-8629d0be.system.entry.js +0 -1
- package/dist/mint-components/p-86c430f8.system.entry.js +0 -1
- package/dist/mint-components/p-8707c7fb.entry.js +0 -1
- package/dist/mint-components/p-8899ff38.system.entry.js +0 -1
- package/dist/mint-components/p-88a5350b.entry.js +0 -11
- package/dist/mint-components/p-8d363802.js +0 -1
- package/dist/mint-components/p-952eefec.system.js +0 -1
- package/dist/mint-components/p-95f82a6f.entry.js +0 -9
- package/dist/mint-components/p-9715be5b.entry.js +0 -1
- package/dist/mint-components/p-97b8073f.system.js +0 -1
- package/dist/mint-components/p-99f7e6f1.js +0 -1
- package/dist/mint-components/p-9f517f81.entry.js +0 -1
- package/dist/mint-components/p-9f7d1197.system.entry.js +0 -1
- package/dist/mint-components/p-a04be06d.system.entry.js +0 -1
- package/dist/mint-components/p-a08157c4.js +0 -1
- package/dist/mint-components/p-a495e3a5.entry.js +0 -1
- package/dist/mint-components/p-a52a961e.entry.js +0 -1
- package/dist/mint-components/p-a6920cc9.system.entry.js +0 -1
- package/dist/mint-components/p-a7fc1e02.js +0 -42
- package/dist/mint-components/p-ab8a551f.system.entry.js +0 -1
- package/dist/mint-components/p-ac65d2c1.entry.js +0 -1
- package/dist/mint-components/p-ad9ea625.system.entry.js +0 -1
- package/dist/mint-components/p-b0aa9348.entry.js +0 -1
- package/dist/mint-components/p-b2295bc5.system.js +0 -1
- package/dist/mint-components/p-b56f3e55.js +0 -1
- package/dist/mint-components/p-b61be711.entry.js +0 -1
- package/dist/mint-components/p-b6504987.system.js +0 -53
- package/dist/mint-components/p-b69dbed8.system.js +0 -1
- package/dist/mint-components/p-b6b5fa4f.system.entry.js +0 -1
- package/dist/mint-components/p-bc625793.system.js +0 -1
- package/dist/mint-components/p-bee4af5d.js +0 -1
- package/dist/mint-components/p-c03131dd.js +0 -1
- package/dist/mint-components/p-c09ae087.system.js +0 -1
- package/dist/mint-components/p-c1086930.js +0 -1
- package/dist/mint-components/p-c50e77ad.entry.js +0 -1
- package/dist/mint-components/p-c5698ef9.system.js +0 -1
- package/dist/mint-components/p-ca872769.system.entry.js +0 -1
- package/dist/mint-components/p-ca90ea64.js +0 -499
- package/dist/mint-components/p-cdf5354f.entry.js +0 -1
- package/dist/mint-components/p-cef45012.js +0 -1
- package/dist/mint-components/p-d0318b41.entry.js +0 -13
- package/dist/mint-components/p-d0ce74bd.system.js +0 -1
- package/dist/mint-components/p-d267f4bb.system.js +0 -1
- package/dist/mint-components/p-d26df2da.entry.js +0 -1
- package/dist/mint-components/p-d3b1ab20.system.entry.js +0 -1
- package/dist/mint-components/p-d463fa82.system.js +0 -1
- package/dist/mint-components/p-d46a048d.system.entry.js +0 -1
- package/dist/mint-components/p-d533ff7b.system.js +0 -271
- package/dist/mint-components/p-d6a7f402.entry.js +0 -1
- package/dist/mint-components/p-d6fd8f37.system.entry.js +0 -1
- package/dist/mint-components/p-d9dbbf22.system.entry.js +0 -1
- package/dist/mint-components/p-db30fbd1.js +0 -13
- package/dist/mint-components/p-de8d7e90.entry.js +0 -17
- package/dist/mint-components/p-df28013f.system.entry.js +0 -1
- package/dist/mint-components/p-dffad4a8.entry.js +0 -1
- package/dist/mint-components/p-e006b6ad.entry.js +0 -1
- package/dist/mint-components/p-e0578030.system.js +0 -1
- package/dist/mint-components/p-e31c7242.system.entry.js +0 -1
- package/dist/mint-components/p-e4eac70d.js +0 -108
- package/dist/mint-components/p-e506bf7f.entry.js +0 -1
- package/dist/mint-components/p-e66187b6.system.entry.js +0 -1
- package/dist/mint-components/p-e7cf6632.js +0 -1
- package/dist/mint-components/p-e7d6e1e0.entry.js +0 -11
- package/dist/mint-components/p-e7e129ac.js +0 -1
- package/dist/mint-components/p-eb992f94.js +0 -1
- package/dist/mint-components/p-ec3e44c8.system.js +0 -1
- package/dist/mint-components/p-ec58040a.system.js +0 -1
- package/dist/mint-components/p-eedda43c.system.js +0 -1
- package/dist/mint-components/p-f0b63c48.entry.js +0 -83
- package/dist/mint-components/p-f1584abb.system.entry.js +0 -1
- package/dist/mint-components/p-f381533a.js +0 -1
- package/dist/mint-components/p-f45e076d.system.js +0 -1
- package/dist/mint-components/p-f507b364.system.entry.js +0 -1
- package/dist/mint-components/p-f69a4eb1.system.entry.js +0 -1
- package/dist/mint-components/p-f89c6a57.system.js +0 -1
- package/dist/mint-components/p-f982278b.entry.js +0 -1
- package/dist/mint-components/p-fbdd8c2a.system.entry.js +0 -1
- package/dist/mint-components/p-fdc4f293.system.entry.js +0 -1
- package/dist/mint-components/p-ff1a5481.system.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const domContextHooks_module = require('./dom-context-hooks.module-
|
|
3
|
+
const domContextHooks_module = require('./dom-context-hooks.module-735c3942.js');
|
|
4
4
|
|
|
5
|
-
function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
|
|
5
|
+
function e$1(e){this.message=e;}e$1.prototype=new Error,e$1.prototype.name="InvalidCharacterError";var r$1="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e$1("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t$1(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r$1(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r$1(t)}}function n$1(e){this.message=e;}function o$1(e,r){if("string"!=typeof e)throw new n$1("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t$1(e.split(".")[o]))}catch(e){throw new n$1("Invalid token specified: "+e.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";
|
|
6
6
|
|
|
7
7
|
const { toString, hasOwnProperty } = Object.prototype;
|
|
8
8
|
const fnToStr = Function.prototype.toString;
|
|
@@ -199,25 +199,25 @@ function previouslyCompared(a, b) {
|
|
|
199
199
|
return false;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
var __defProp = Object.defineProperty;
|
|
203
|
-
var __defProps = Object.defineProperties;
|
|
204
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
205
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
206
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
207
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
208
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
209
|
-
var __spreadValues = (a, b) => {
|
|
202
|
+
var __defProp$1 = Object.defineProperty;
|
|
203
|
+
var __defProps$1 = Object.defineProperties;
|
|
204
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
205
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
206
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
207
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
208
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
209
|
+
var __spreadValues$1 = (a, b) => {
|
|
210
210
|
for (var prop in b || (b = {}))
|
|
211
|
-
if (__hasOwnProp.call(b, prop))
|
|
212
|
-
__defNormalProp(a, prop, b[prop]);
|
|
213
|
-
if (__getOwnPropSymbols)
|
|
214
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
215
|
-
if (__propIsEnum.call(b, prop))
|
|
216
|
-
__defNormalProp(a, prop, b[prop]);
|
|
211
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
212
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
213
|
+
if (__getOwnPropSymbols$1)
|
|
214
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
215
|
+
if (__propIsEnum$1.call(b, prop))
|
|
216
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
217
217
|
}
|
|
218
218
|
return a;
|
|
219
219
|
};
|
|
220
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
220
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
221
221
|
|
|
222
222
|
// src/types.ts
|
|
223
223
|
var USER_CONTEXT_NAME = "sq:user-identity";
|
|
@@ -433,7 +433,7 @@ var MemoryHistory = class {
|
|
|
433
433
|
state
|
|
434
434
|
};
|
|
435
435
|
} else {
|
|
436
|
-
entry = __spreadProps(__spreadValues({}, to), {
|
|
436
|
+
entry = __spreadProps$1(__spreadValues$1({}, to), {
|
|
437
437
|
state
|
|
438
438
|
});
|
|
439
439
|
}
|
|
@@ -450,7 +450,7 @@ var MemoryHistory = class {
|
|
|
450
450
|
state
|
|
451
451
|
};
|
|
452
452
|
} else {
|
|
453
|
-
this.history[this.index] = __spreadProps(__spreadValues({}, to), {
|
|
453
|
+
this.history[this.index] = __spreadProps$1(__spreadValues$1({}, to), {
|
|
454
454
|
state
|
|
455
455
|
});
|
|
456
456
|
}
|
|
@@ -628,7 +628,7 @@ function userIdentityFromJwt(jwt) {
|
|
|
628
628
|
if (!jwt)
|
|
629
629
|
return void 0;
|
|
630
630
|
try {
|
|
631
|
-
const decoded = o(jwt);
|
|
631
|
+
const decoded = o$1(jwt);
|
|
632
632
|
const exp = decoded.exp;
|
|
633
633
|
let userId = void 0;
|
|
634
634
|
let accountId = void 0;
|
|
@@ -694,7 +694,7 @@ function _getInitialValue() {
|
|
|
694
694
|
const potentialUserIdent = JSON.parse(stored);
|
|
695
695
|
const identity = userIdentityFromJwt(potentialUserIdent.jwt);
|
|
696
696
|
if (identity) {
|
|
697
|
-
return __spreadValues(__spreadValues({}, potentialUserIdent), identity);
|
|
697
|
+
return __spreadValues$1(__spreadValues$1({}, potentialUserIdent), identity);
|
|
698
698
|
}
|
|
699
699
|
return void 0;
|
|
700
700
|
} catch (e) {
|
|
@@ -744,16 +744,31 @@ function setProgramId(programId) {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
+
/**
|
|
748
|
+
* @function
|
|
749
|
+
* @template {Function} T
|
|
750
|
+
* @param {T} fn - callback to memoize
|
|
751
|
+
* @param {unknown[]} inputs - dependencies to callback memoization
|
|
752
|
+
* @return {T}
|
|
753
|
+
*/
|
|
747
754
|
const useCallback = (fn, inputs) => domContextHooks_module.useMemo(() => fn, inputs);
|
|
748
755
|
|
|
749
|
-
function
|
|
756
|
+
function devAssert(condition, message) {
|
|
757
|
+
var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
|
|
758
|
+
|
|
759
|
+
if (!booleanCondition) {
|
|
760
|
+
throw new Error(message);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
|
|
750
765
|
|
|
751
766
|
/**
|
|
752
767
|
* Return true if `value` is object-like. A value is object-like if it's not
|
|
753
768
|
* `null` and has a `typeof` result of "object".
|
|
754
769
|
*/
|
|
755
770
|
function isObjectLike(value) {
|
|
756
|
-
return _typeof(value) == 'object' && value !== null;
|
|
771
|
+
return _typeof$2(value) == 'object' && value !== null;
|
|
757
772
|
}
|
|
758
773
|
|
|
759
774
|
// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
|
|
@@ -852,11 +867,17 @@ function leftPad(len, str) {
|
|
|
852
867
|
|
|
853
868
|
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
854
869
|
|
|
870
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
871
|
+
|
|
872
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
873
|
+
|
|
874
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
875
|
+
|
|
855
876
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
856
877
|
|
|
857
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
878
|
+
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
858
879
|
|
|
859
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
880
|
+
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
860
881
|
|
|
861
882
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
862
883
|
|
|
@@ -889,14 +910,6 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
889
910
|
|
|
890
911
|
var _super = _createSuper(GraphQLError);
|
|
891
912
|
|
|
892
|
-
/**
|
|
893
|
-
* A message describing the Error for debugging purposes.
|
|
894
|
-
*
|
|
895
|
-
* Enumerable, and appears in the result of JSON.stringify().
|
|
896
|
-
*
|
|
897
|
-
* Note: should be treated as readonly, despite invariant usage.
|
|
898
|
-
*/
|
|
899
|
-
|
|
900
913
|
/**
|
|
901
914
|
* An array of { line, column } locations within the source GraphQL document
|
|
902
915
|
* which correspond to this error.
|
|
@@ -939,117 +952,79 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
939
952
|
* Extension fields to add to the formatted error.
|
|
940
953
|
*/
|
|
941
954
|
function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {
|
|
942
|
-
var
|
|
955
|
+
var _nodeLocations, _nodeLocations2, _nodeLocations3;
|
|
943
956
|
|
|
944
957
|
var _this;
|
|
945
958
|
|
|
946
959
|
_classCallCheck(this, GraphQLError);
|
|
947
960
|
|
|
948
|
-
_this = _super.call(this, message);
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
var _source = source;
|
|
954
|
-
|
|
955
|
-
if (!_source && _nodes) {
|
|
956
|
-
var _nodes$0$loc;
|
|
957
|
-
|
|
958
|
-
_source = (_nodes$0$loc = _nodes[0].loc) === null || _nodes$0$loc === void 0 ? void 0 : _nodes$0$loc.source;
|
|
959
|
-
}
|
|
961
|
+
_this = _super.call(this, message);
|
|
962
|
+
_this.name = 'GraphQLError';
|
|
963
|
+
_this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.
|
|
960
964
|
|
|
961
|
-
|
|
965
|
+
_this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);
|
|
966
|
+
var nodeLocations = [];
|
|
962
967
|
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
if (node.loc) {
|
|
966
|
-
list.push(node.loc.start);
|
|
967
|
-
}
|
|
968
|
+
for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {
|
|
969
|
+
var _this$nodes;
|
|
968
970
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
971
|
+
var _ref4 = _ref3[_i2];
|
|
972
|
+
var loc = _ref4.loc;
|
|
972
973
|
|
|
973
|
-
|
|
974
|
-
|
|
974
|
+
if (loc != null) {
|
|
975
|
+
nodeLocations.push(loc);
|
|
976
|
+
}
|
|
975
977
|
}
|
|
976
978
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
if (positions && source) {
|
|
980
|
-
_locations = positions.map(function (pos) {
|
|
981
|
-
return getLocation(source, pos);
|
|
982
|
-
});
|
|
983
|
-
} else if (_nodes) {
|
|
984
|
-
_locations = _nodes.reduce(function (list, node) {
|
|
985
|
-
if (node.loc) {
|
|
986
|
-
list.push(getLocation(node.loc.source, node.loc.start));
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
return list;
|
|
990
|
-
}, []);
|
|
991
|
-
}
|
|
979
|
+
nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.
|
|
992
980
|
|
|
993
|
-
|
|
981
|
+
_this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;
|
|
982
|
+
_this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {
|
|
983
|
+
return loc.start;
|
|
984
|
+
});
|
|
985
|
+
_this.locations = positions && source ? positions.map(function (pos) {
|
|
986
|
+
return getLocation(source, pos);
|
|
987
|
+
}) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {
|
|
988
|
+
return getLocation(loc.source, loc.start);
|
|
989
|
+
});
|
|
990
|
+
_this.path = path !== null && path !== void 0 ? path : undefined;
|
|
991
|
+
var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;
|
|
994
992
|
|
|
995
|
-
if (
|
|
996
|
-
|
|
993
|
+
if (extensions == null && isObjectLike(originalExtensions)) {
|
|
994
|
+
_this.extensions = _objectSpread({}, originalExtensions);
|
|
995
|
+
} else {
|
|
996
|
+
_this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};
|
|
997
|
+
} // By being enumerable, JSON.stringify will include bellow properties in the resulting output.
|
|
998
|
+
// This ensures that the simplest possible GraphQL service adheres to the spec.
|
|
997
999
|
|
|
998
|
-
if (isObjectLike(originalExtensions)) {
|
|
999
|
-
_extensions = originalExtensions;
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
1000
|
|
|
1003
1001
|
Object.defineProperties(_assertThisInitialized(_this), {
|
|
1004
|
-
name: {
|
|
1005
|
-
value: 'GraphQLError'
|
|
1006
|
-
},
|
|
1007
1002
|
message: {
|
|
1008
|
-
|
|
1009
|
-
// By being enumerable, JSON.stringify will include `message` in the
|
|
1010
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
1011
|
-
// service adheres to the spec.
|
|
1012
|
-
enumerable: true,
|
|
1013
|
-
writable: true
|
|
1003
|
+
enumerable: true
|
|
1014
1004
|
},
|
|
1015
1005
|
locations: {
|
|
1016
|
-
|
|
1017
|
-
// in JSON.stringify() when not provided.
|
|
1018
|
-
value: (_locations2 = _locations) !== null && _locations2 !== void 0 ? _locations2 : undefined,
|
|
1019
|
-
// By being enumerable, JSON.stringify will include `locations` in the
|
|
1020
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
1021
|
-
// service adheres to the spec.
|
|
1022
|
-
enumerable: _locations != null
|
|
1006
|
+
enumerable: _this.locations != null
|
|
1023
1007
|
},
|
|
1024
1008
|
path: {
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
enumerable:
|
|
1009
|
+
enumerable: _this.path != null
|
|
1010
|
+
},
|
|
1011
|
+
extensions: {
|
|
1012
|
+
enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0
|
|
1013
|
+
},
|
|
1014
|
+
name: {
|
|
1015
|
+
enumerable: false
|
|
1032
1016
|
},
|
|
1033
1017
|
nodes: {
|
|
1034
|
-
|
|
1018
|
+
enumerable: false
|
|
1035
1019
|
},
|
|
1036
1020
|
source: {
|
|
1037
|
-
|
|
1021
|
+
enumerable: false
|
|
1038
1022
|
},
|
|
1039
1023
|
positions: {
|
|
1040
|
-
|
|
1024
|
+
enumerable: false
|
|
1041
1025
|
},
|
|
1042
1026
|
originalError: {
|
|
1043
|
-
|
|
1044
|
-
},
|
|
1045
|
-
extensions: {
|
|
1046
|
-
// Coercing falsy values to undefined ensures they will not be included
|
|
1047
|
-
// in JSON.stringify() when not provided.
|
|
1048
|
-
value: (_extensions2 = _extensions) !== null && _extensions2 !== void 0 ? _extensions2 : undefined,
|
|
1049
|
-
// By being enumerable, JSON.stringify will include `path` in the
|
|
1050
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
1051
|
-
// service adheres to the spec.
|
|
1052
|
-
enumerable: _extensions != null
|
|
1027
|
+
enumerable: false
|
|
1053
1028
|
}
|
|
1054
1029
|
}); // Include (non-enumerable) stack trace.
|
|
1055
1030
|
|
|
@@ -1076,10 +1051,15 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
1076
1051
|
return _this;
|
|
1077
1052
|
}
|
|
1078
1053
|
|
|
1079
|
-
_createClass(GraphQLError, [{
|
|
1054
|
+
_createClass$1(GraphQLError, [{
|
|
1080
1055
|
key: "toString",
|
|
1081
1056
|
value: function toString() {
|
|
1082
1057
|
return printError(this);
|
|
1058
|
+
}
|
|
1059
|
+
}, {
|
|
1060
|
+
key: "toJSON",
|
|
1061
|
+
value: function toJSON() {
|
|
1062
|
+
return formatError(this);
|
|
1083
1063
|
} // FIXME: workaround to not break chai comparisons, should be remove in v16
|
|
1084
1064
|
// $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
1085
1065
|
|
|
@@ -1092,31 +1072,63 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
1092
1072
|
|
|
1093
1073
|
return GraphQLError;
|
|
1094
1074
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1075
|
+
|
|
1076
|
+
function undefinedIfEmpty(array) {
|
|
1077
|
+
return array === undefined || array.length === 0 ? undefined : array;
|
|
1078
|
+
}
|
|
1095
1079
|
/**
|
|
1096
1080
|
* Prints a GraphQLError to a string, representing useful location information
|
|
1097
1081
|
* about the error's position in the source.
|
|
1098
1082
|
*/
|
|
1099
1083
|
|
|
1084
|
+
|
|
1100
1085
|
function printError(error) {
|
|
1101
1086
|
var output = error.message;
|
|
1102
1087
|
|
|
1103
1088
|
if (error.nodes) {
|
|
1104
|
-
for (var
|
|
1105
|
-
var node = _error$nodes2[
|
|
1089
|
+
for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {
|
|
1090
|
+
var node = _error$nodes2[_i4];
|
|
1106
1091
|
|
|
1107
1092
|
if (node.loc) {
|
|
1108
1093
|
output += '\n\n' + printLocation(node.loc);
|
|
1109
1094
|
}
|
|
1110
1095
|
}
|
|
1111
1096
|
} else if (error.source && error.locations) {
|
|
1112
|
-
for (var
|
|
1113
|
-
var location = _error$locations2[
|
|
1097
|
+
for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {
|
|
1098
|
+
var location = _error$locations2[_i6];
|
|
1114
1099
|
output += '\n\n' + printSourceLocation(error.source, location);
|
|
1115
1100
|
}
|
|
1116
1101
|
}
|
|
1117
1102
|
|
|
1118
1103
|
return output;
|
|
1119
1104
|
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Given a GraphQLError, format it according to the rules described by the
|
|
1107
|
+
* Response Format, Errors section of the GraphQL Specification.
|
|
1108
|
+
*/
|
|
1109
|
+
|
|
1110
|
+
function formatError(error) {
|
|
1111
|
+
var _error$message;
|
|
1112
|
+
|
|
1113
|
+
error || devAssert(0, 'Received null or undefined error.');
|
|
1114
|
+
var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.';
|
|
1115
|
+
var locations = error.locations;
|
|
1116
|
+
var path = error.path;
|
|
1117
|
+
var extensions = error.extensions;
|
|
1118
|
+
return extensions && Object.keys(extensions).length > 0 ? {
|
|
1119
|
+
message: message,
|
|
1120
|
+
locations: locations,
|
|
1121
|
+
path: path,
|
|
1122
|
+
extensions: extensions
|
|
1123
|
+
} : {
|
|
1124
|
+
message: message,
|
|
1125
|
+
locations: locations,
|
|
1126
|
+
path: path
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors
|
|
1131
|
+
*/
|
|
1120
1132
|
|
|
1121
1133
|
/**
|
|
1122
1134
|
* Produces a GraphQLError representing a syntax error, containing useful
|
|
@@ -1364,7 +1376,7 @@ var TokenKind = Object.freeze({
|
|
|
1364
1376
|
* The enum type representing the token kinds values.
|
|
1365
1377
|
*/
|
|
1366
1378
|
|
|
1367
|
-
function _typeof
|
|
1379
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1368
1380
|
var MAX_ARRAY_LENGTH = 10;
|
|
1369
1381
|
var MAX_RECURSIVE_DEPTH = 2;
|
|
1370
1382
|
/**
|
|
@@ -1376,7 +1388,7 @@ function inspect(value) {
|
|
|
1376
1388
|
}
|
|
1377
1389
|
|
|
1378
1390
|
function formatValue(value, seenValues) {
|
|
1379
|
-
switch (_typeof
|
|
1391
|
+
switch (_typeof(value)) {
|
|
1380
1392
|
case 'string':
|
|
1381
1393
|
return JSON.stringify(value);
|
|
1382
1394
|
|
|
@@ -1486,14 +1498,6 @@ function getObjectTag(object) {
|
|
|
1486
1498
|
return tag;
|
|
1487
1499
|
}
|
|
1488
1500
|
|
|
1489
|
-
function devAssert(condition, message) {
|
|
1490
|
-
var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
|
|
1491
|
-
|
|
1492
|
-
if (!booleanCondition) {
|
|
1493
|
-
throw new Error(message);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
1501
|
/**
|
|
1498
1502
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
1499
1503
|
* constructors are detected.
|
|
@@ -1501,15 +1505,15 @@ function devAssert(condition, message) {
|
|
|
1501
1505
|
|
|
1502
1506
|
// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
|
|
1503
1507
|
// See: https://webpack.js.org/guides/production/
|
|
1504
|
-
const instanceOf =
|
|
1508
|
+
const instanceOf = // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
|
|
1505
1509
|
// eslint-disable-next-line no-shadow
|
|
1506
1510
|
function instanceOf(value, constructor) {
|
|
1507
1511
|
return value instanceof constructor;
|
|
1508
1512
|
} ;
|
|
1509
1513
|
|
|
1510
|
-
function _defineProperties
|
|
1514
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1511
1515
|
|
|
1512
|
-
function _createClass
|
|
1516
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1513
1517
|
|
|
1514
1518
|
/**
|
|
1515
1519
|
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
|
@@ -1534,7 +1538,7 @@ var Source = /*#__PURE__*/function () {
|
|
|
1534
1538
|
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
1535
1539
|
|
|
1536
1540
|
|
|
1537
|
-
_createClass
|
|
1541
|
+
_createClass(Source, [{
|
|
1538
1542
|
key: SYMBOL_TO_STRING_TAG,
|
|
1539
1543
|
get: function get() {
|
|
1540
1544
|
return 'Source';
|
|
@@ -4527,7 +4531,7 @@ function hasMultilineItems(maybeArray) {
|
|
|
4527
4531
|
return maybeArray != null && maybeArray.some(isMultiline);
|
|
4528
4532
|
}
|
|
4529
4533
|
|
|
4530
|
-
function e
|
|
4534
|
+
function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
|
|
4531
4535
|
|
|
4532
4536
|
//
|
|
4533
4537
|
// Main
|
|
@@ -4764,10 +4768,10 @@ function renameVariables(variables, renameFn) {
|
|
|
4764
4768
|
}, {});
|
|
4765
4769
|
}
|
|
4766
4770
|
exports.renameVariables = renameVariables;
|
|
4767
|
-
|
|
4771
|
+
//# sourceMappingURL=utils.js.map
|
|
4768
4772
|
});
|
|
4769
4773
|
|
|
4770
|
-
var dist = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
4774
|
+
var dist$1 = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
4771
4775
|
var __extends = (domContextHooks_module.commonjsGlobal && domContextHooks_module.commonjsGlobal.__extends) || (function () {
|
|
4772
4776
|
var extendStatics = function (d, b) {
|
|
4773
4777
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -4832,15 +4836,15 @@ var CombinedQueryBuilderImpl = /** @class */ (function () {
|
|
|
4832
4836
|
otherOpDefs.forEach(function (_def) {
|
|
4833
4837
|
var _a, _b;
|
|
4834
4838
|
if (_def.operation !== def.operation) {
|
|
4835
|
-
throw new CombinedQueryError("expected all operations to be of the
|
|
4839
|
+
throw new CombinedQueryError("expected all operations to be of the same type, but " + ((_a = _def.name) === null || _a === void 0 ? void 0 : _a.value) + " is " + _def.operation + " and " + ((_b = def.name) === null || _b === void 0 ? void 0 : _b.value) + " is " + def.operation);
|
|
4836
4840
|
}
|
|
4837
4841
|
});
|
|
4838
|
-
// all top level fields mut be unique. doesn't drill down
|
|
4842
|
+
// all top level fields mut be unique. doesn't drill down fragments tho. maybe someday
|
|
4839
4843
|
(_a = def.selectionSet.selections) === null || _a === void 0 ? void 0 : _a.filter(function (s) { return s.kind === 'Field'; }).forEach(function (sel) {
|
|
4840
4844
|
otherOpDefs.forEach(function (_def) { var _a; return (_a = _def.selectionSet.selections) === null || _a === void 0 ? void 0 : _a.filter(function (s) { return s.kind === 'Field'; }).forEach(function (_sel) {
|
|
4841
4845
|
var _a, _b, _c, _d;
|
|
4842
4846
|
if ((((_a = sel.alias) === null || _a === void 0 ? void 0 : _a.value) || sel.name.value) === (((_b = _sel.alias) === null || _b === void 0 ? void 0 : _b.value) || _sel.name.value)) {
|
|
4843
|
-
throw new CombinedQueryError("duplicate field definition " + _sel.name.value + " for
|
|
4847
|
+
throw new CombinedQueryError("duplicate field definition " + _sel.name.value + " for operations " + ((_c = def.name) === null || _c === void 0 ? void 0 : _c.value) + " and " + ((_d = _def.name) === null || _d === void 0 ? void 0 : _d.value));
|
|
4844
4848
|
}
|
|
4845
4849
|
}); });
|
|
4846
4850
|
});
|
|
@@ -4849,7 +4853,7 @@ var CombinedQueryBuilderImpl = /** @class */ (function () {
|
|
|
4849
4853
|
otherOpDefs.forEach(function (_def) { var _a; return (_a = _def.variableDefinitions) === null || _a === void 0 ? void 0 : _a.forEach(function (_variable) {
|
|
4850
4854
|
var _a, _b;
|
|
4851
4855
|
if (variable.variable.name.value === _variable.variable.name.value) {
|
|
4852
|
-
throw new CombinedQueryError("duplicate variable definition " + _variable.variable.name.value + " for
|
|
4856
|
+
throw new CombinedQueryError("duplicate variable definition " + _variable.variable.name.value + " for operations " + ((_a = def.name) === null || _a === void 0 ? void 0 : _a.value) + " and " + ((_b = _def.name) === null || _b === void 0 ? void 0 : _b.value));
|
|
4853
4857
|
}
|
|
4854
4858
|
}); });
|
|
4855
4859
|
});
|
|
@@ -4918,31 +4922,46 @@ function combinedQuery(operationName) {
|
|
|
4918
4922
|
};
|
|
4919
4923
|
}
|
|
4920
4924
|
exports.default = combinedQuery;
|
|
4921
|
-
|
|
4925
|
+
//# sourceMappingURL=index.js.map
|
|
4922
4926
|
});
|
|
4923
4927
|
|
|
4924
|
-
const
|
|
4928
|
+
const combineQuery = /*@__PURE__*/domContextHooks_module.getDefaultExportFromCjs(dist$1);
|
|
4925
4929
|
|
|
4926
4930
|
var browserPonyfill = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
4927
|
-
|
|
4928
|
-
var
|
|
4931
|
+
// Save global object in a variable
|
|
4932
|
+
var __global__ =
|
|
4933
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
4934
|
+
(typeof self !== 'undefined' && self) ||
|
|
4935
|
+
(typeof domContextHooks_module.commonjsGlobal !== 'undefined' && domContextHooks_module.commonjsGlobal);
|
|
4936
|
+
// Create an object that extends from __global__ without the fetch function
|
|
4937
|
+
var __globalThis__ = (function () {
|
|
4929
4938
|
function F() {
|
|
4930
4939
|
this.fetch = false;
|
|
4931
|
-
this.DOMException =
|
|
4940
|
+
this.DOMException = __global__.DOMException;
|
|
4932
4941
|
}
|
|
4933
|
-
F.prototype =
|
|
4942
|
+
F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
|
|
4934
4943
|
return new F();
|
|
4935
4944
|
})();
|
|
4936
|
-
|
|
4945
|
+
// Wraps whatwg-fetch with a function scope to hijack the global object
|
|
4946
|
+
// "globalThis" that's going to be patched
|
|
4947
|
+
(function(globalThis) {
|
|
4937
4948
|
|
|
4938
|
-
|
|
4949
|
+
((function (exports) {
|
|
4950
|
+
|
|
4951
|
+
/* eslint-disable no-prototype-builtins */
|
|
4952
|
+
var g =
|
|
4953
|
+
(typeof globalThis !== 'undefined' && globalThis) ||
|
|
4954
|
+
(typeof self !== 'undefined' && self) ||
|
|
4955
|
+
// eslint-disable-next-line no-undef
|
|
4956
|
+
(typeof domContextHooks_module.commonjsGlobal !== 'undefined' && domContextHooks_module.commonjsGlobal) ||
|
|
4957
|
+
{};
|
|
4939
4958
|
|
|
4940
4959
|
var support = {
|
|
4941
|
-
searchParams: 'URLSearchParams' in
|
|
4942
|
-
iterable: 'Symbol' in
|
|
4960
|
+
searchParams: 'URLSearchParams' in g,
|
|
4961
|
+
iterable: 'Symbol' in g && 'iterator' in Symbol,
|
|
4943
4962
|
blob:
|
|
4944
|
-
'FileReader' in
|
|
4945
|
-
'Blob' in
|
|
4963
|
+
'FileReader' in g &&
|
|
4964
|
+
'Blob' in g &&
|
|
4946
4965
|
(function() {
|
|
4947
4966
|
try {
|
|
4948
4967
|
new Blob();
|
|
@@ -4951,8 +4970,8 @@ var irrelevant = (function (exports) {
|
|
|
4951
4970
|
return false
|
|
4952
4971
|
}
|
|
4953
4972
|
})(),
|
|
4954
|
-
formData: 'FormData' in
|
|
4955
|
-
arrayBuffer: 'ArrayBuffer' in
|
|
4973
|
+
formData: 'FormData' in g,
|
|
4974
|
+
arrayBuffer: 'ArrayBuffer' in g
|
|
4956
4975
|
};
|
|
4957
4976
|
|
|
4958
4977
|
function isDataView(obj) {
|
|
@@ -4983,8 +5002,8 @@ var irrelevant = (function (exports) {
|
|
|
4983
5002
|
if (typeof name !== 'string') {
|
|
4984
5003
|
name = String(name);
|
|
4985
5004
|
}
|
|
4986
|
-
if (/[^a-z0-9\-#$%&'*+.^_
|
|
4987
|
-
throw new TypeError('Invalid character in header field name')
|
|
5005
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
|
|
5006
|
+
throw new TypeError('Invalid character in header field name: "' + name + '"')
|
|
4988
5007
|
}
|
|
4989
5008
|
return name.toLowerCase()
|
|
4990
5009
|
}
|
|
@@ -5023,6 +5042,9 @@ var irrelevant = (function (exports) {
|
|
|
5023
5042
|
}, this);
|
|
5024
5043
|
} else if (Array.isArray(headers)) {
|
|
5025
5044
|
headers.forEach(function(header) {
|
|
5045
|
+
if (header.length != 2) {
|
|
5046
|
+
throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
|
|
5047
|
+
}
|
|
5026
5048
|
this.append(header[0], header[1]);
|
|
5027
5049
|
}, this);
|
|
5028
5050
|
} else if (headers) {
|
|
@@ -5093,6 +5115,7 @@ var irrelevant = (function (exports) {
|
|
|
5093
5115
|
}
|
|
5094
5116
|
|
|
5095
5117
|
function consumed(body) {
|
|
5118
|
+
if (body._noBody) return
|
|
5096
5119
|
if (body.bodyUsed) {
|
|
5097
5120
|
return Promise.reject(new TypeError('Already read'))
|
|
5098
5121
|
}
|
|
@@ -5120,7 +5143,9 @@ var irrelevant = (function (exports) {
|
|
|
5120
5143
|
function readBlobAsText(blob) {
|
|
5121
5144
|
var reader = new FileReader();
|
|
5122
5145
|
var promise = fileReaderReady(reader);
|
|
5123
|
-
|
|
5146
|
+
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
|
|
5147
|
+
var encoding = match ? match[1] : 'utf-8';
|
|
5148
|
+
reader.readAsText(blob, encoding);
|
|
5124
5149
|
return promise
|
|
5125
5150
|
}
|
|
5126
5151
|
|
|
@@ -5148,8 +5173,21 @@ var irrelevant = (function (exports) {
|
|
|
5148
5173
|
this.bodyUsed = false;
|
|
5149
5174
|
|
|
5150
5175
|
this._initBody = function(body) {
|
|
5176
|
+
/*
|
|
5177
|
+
fetch-mock wraps the Response object in an ES6 Proxy to
|
|
5178
|
+
provide useful test harness features such as flush. However, on
|
|
5179
|
+
ES5 browsers without fetch or Proxy support pollyfills must be used;
|
|
5180
|
+
the proxy-pollyfill is unable to proxy an attribute unless it exists
|
|
5181
|
+
on the object before the Proxy is created. This change ensures
|
|
5182
|
+
Response.bodyUsed exists on the instance, while maintaining the
|
|
5183
|
+
semantic of setting Request.bodyUsed in the constructor before
|
|
5184
|
+
_initBody is called.
|
|
5185
|
+
*/
|
|
5186
|
+
// eslint-disable-next-line no-self-assign
|
|
5187
|
+
this.bodyUsed = this.bodyUsed;
|
|
5151
5188
|
this._bodyInit = body;
|
|
5152
5189
|
if (!body) {
|
|
5190
|
+
this._noBody = true;
|
|
5153
5191
|
this._bodyText = '';
|
|
5154
5192
|
} else if (typeof body === 'string') {
|
|
5155
5193
|
this._bodyText = body;
|
|
@@ -5197,15 +5235,29 @@ var irrelevant = (function (exports) {
|
|
|
5197
5235
|
return Promise.resolve(new Blob([this._bodyText]))
|
|
5198
5236
|
}
|
|
5199
5237
|
};
|
|
5238
|
+
}
|
|
5200
5239
|
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5240
|
+
this.arrayBuffer = function() {
|
|
5241
|
+
if (this._bodyArrayBuffer) {
|
|
5242
|
+
var isConsumed = consumed(this);
|
|
5243
|
+
if (isConsumed) {
|
|
5244
|
+
return isConsumed
|
|
5245
|
+
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
|
|
5246
|
+
return Promise.resolve(
|
|
5247
|
+
this._bodyArrayBuffer.buffer.slice(
|
|
5248
|
+
this._bodyArrayBuffer.byteOffset,
|
|
5249
|
+
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
5250
|
+
)
|
|
5251
|
+
)
|
|
5204
5252
|
} else {
|
|
5205
|
-
return
|
|
5253
|
+
return Promise.resolve(this._bodyArrayBuffer)
|
|
5206
5254
|
}
|
|
5207
|
-
}
|
|
5208
|
-
|
|
5255
|
+
} else if (support.blob) {
|
|
5256
|
+
return this.blob().then(readBlobAsArrayBuffer)
|
|
5257
|
+
} else {
|
|
5258
|
+
throw new Error('could not read as ArrayBuffer')
|
|
5259
|
+
}
|
|
5260
|
+
};
|
|
5209
5261
|
|
|
5210
5262
|
this.text = function() {
|
|
5211
5263
|
var rejected = consumed(this);
|
|
@@ -5238,7 +5290,7 @@ var irrelevant = (function (exports) {
|
|
|
5238
5290
|
}
|
|
5239
5291
|
|
|
5240
5292
|
// HTTP methods whose capitalization should be normalized
|
|
5241
|
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
|
5293
|
+
var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
|
|
5242
5294
|
|
|
5243
5295
|
function normalizeMethod(method) {
|
|
5244
5296
|
var upcased = method.toUpperCase();
|
|
@@ -5246,6 +5298,10 @@ var irrelevant = (function (exports) {
|
|
|
5246
5298
|
}
|
|
5247
5299
|
|
|
5248
5300
|
function Request(input, options) {
|
|
5301
|
+
if (!(this instanceof Request)) {
|
|
5302
|
+
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
|
|
5303
|
+
}
|
|
5304
|
+
|
|
5249
5305
|
options = options || {};
|
|
5250
5306
|
var body = options.body;
|
|
5251
5307
|
|
|
@@ -5275,13 +5331,33 @@ var irrelevant = (function (exports) {
|
|
|
5275
5331
|
}
|
|
5276
5332
|
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
5277
5333
|
this.mode = options.mode || this.mode || null;
|
|
5278
|
-
this.signal = options.signal || this.signal
|
|
5334
|
+
this.signal = options.signal || this.signal || (function () {
|
|
5335
|
+
if ('AbortController' in g) {
|
|
5336
|
+
var ctrl = new AbortController();
|
|
5337
|
+
return ctrl.signal;
|
|
5338
|
+
}
|
|
5339
|
+
}());
|
|
5279
5340
|
this.referrer = null;
|
|
5280
5341
|
|
|
5281
5342
|
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
5282
5343
|
throw new TypeError('Body not allowed for GET or HEAD requests')
|
|
5283
5344
|
}
|
|
5284
5345
|
this._initBody(body);
|
|
5346
|
+
|
|
5347
|
+
if (this.method === 'GET' || this.method === 'HEAD') {
|
|
5348
|
+
if (options.cache === 'no-store' || options.cache === 'no-cache') {
|
|
5349
|
+
// Search for a '_' parameter in the query string
|
|
5350
|
+
var reParamSearch = /([?&])_=[^&]*/;
|
|
5351
|
+
if (reParamSearch.test(this.url)) {
|
|
5352
|
+
// If it already exists then set the value with the current time
|
|
5353
|
+
this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
|
|
5354
|
+
} else {
|
|
5355
|
+
// Otherwise add a new '_' parameter to the end with the current time
|
|
5356
|
+
var reQueryString = /\?/;
|
|
5357
|
+
this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
|
|
5358
|
+
}
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5285
5361
|
}
|
|
5286
5362
|
|
|
5287
5363
|
Request.prototype.clone = function() {
|
|
@@ -5309,28 +5385,46 @@ var irrelevant = (function (exports) {
|
|
|
5309
5385
|
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
|
5310
5386
|
// https://tools.ietf.org/html/rfc7230#section-3.2
|
|
5311
5387
|
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5388
|
+
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
|
|
5389
|
+
// https://github.com/github/fetch/issues/748
|
|
5390
|
+
// https://github.com/zloirock/core-js/issues/751
|
|
5391
|
+
preProcessedHeaders
|
|
5392
|
+
.split('\r')
|
|
5393
|
+
.map(function(header) {
|
|
5394
|
+
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
|
|
5395
|
+
})
|
|
5396
|
+
.forEach(function(line) {
|
|
5397
|
+
var parts = line.split(':');
|
|
5398
|
+
var key = parts.shift().trim();
|
|
5399
|
+
if (key) {
|
|
5400
|
+
var value = parts.join(':').trim();
|
|
5401
|
+
try {
|
|
5402
|
+
headers.append(key, value);
|
|
5403
|
+
} catch (error) {
|
|
5404
|
+
console.warn('Response ' + error.message);
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
});
|
|
5320
5408
|
return headers
|
|
5321
5409
|
}
|
|
5322
5410
|
|
|
5323
5411
|
Body.call(Request.prototype);
|
|
5324
5412
|
|
|
5325
5413
|
function Response(bodyInit, options) {
|
|
5414
|
+
if (!(this instanceof Response)) {
|
|
5415
|
+
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
|
|
5416
|
+
}
|
|
5326
5417
|
if (!options) {
|
|
5327
5418
|
options = {};
|
|
5328
5419
|
}
|
|
5329
5420
|
|
|
5330
5421
|
this.type = 'default';
|
|
5331
5422
|
this.status = options.status === undefined ? 200 : options.status;
|
|
5423
|
+
if (this.status < 200 || this.status > 599) {
|
|
5424
|
+
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
|
|
5425
|
+
}
|
|
5332
5426
|
this.ok = this.status >= 200 && this.status < 300;
|
|
5333
|
-
this.statusText =
|
|
5427
|
+
this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
|
|
5334
5428
|
this.headers = new Headers(options.headers);
|
|
5335
5429
|
this.url = options.url || '';
|
|
5336
5430
|
this._initBody(bodyInit);
|
|
@@ -5348,7 +5442,9 @@ var irrelevant = (function (exports) {
|
|
|
5348
5442
|
};
|
|
5349
5443
|
|
|
5350
5444
|
Response.error = function() {
|
|
5351
|
-
var response = new Response(null, {status:
|
|
5445
|
+
var response = new Response(null, {status: 200, statusText: ''});
|
|
5446
|
+
response.ok = false;
|
|
5447
|
+
response.status = 0;
|
|
5352
5448
|
response.type = 'error';
|
|
5353
5449
|
return response
|
|
5354
5450
|
};
|
|
@@ -5363,7 +5459,7 @@ var irrelevant = (function (exports) {
|
|
|
5363
5459
|
return new Response(null, {status: status, headers: {location: url}})
|
|
5364
5460
|
};
|
|
5365
5461
|
|
|
5366
|
-
exports.DOMException =
|
|
5462
|
+
exports.DOMException = g.DOMException;
|
|
5367
5463
|
try {
|
|
5368
5464
|
new exports.DOMException();
|
|
5369
5465
|
} catch (err) {
|
|
@@ -5393,28 +5489,50 @@ var irrelevant = (function (exports) {
|
|
|
5393
5489
|
|
|
5394
5490
|
xhr.onload = function() {
|
|
5395
5491
|
var options = {
|
|
5396
|
-
status: xhr.status,
|
|
5397
5492
|
statusText: xhr.statusText,
|
|
5398
5493
|
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
|
5399
5494
|
};
|
|
5495
|
+
// This check if specifically for when a user fetches a file locally from the file system
|
|
5496
|
+
// Only if the status is out of a normal range
|
|
5497
|
+
if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
|
|
5498
|
+
options.status = 200;
|
|
5499
|
+
} else {
|
|
5500
|
+
options.status = xhr.status;
|
|
5501
|
+
}
|
|
5400
5502
|
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
|
5401
5503
|
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
|
5402
|
-
|
|
5504
|
+
setTimeout(function() {
|
|
5505
|
+
resolve(new Response(body, options));
|
|
5506
|
+
}, 0);
|
|
5403
5507
|
};
|
|
5404
5508
|
|
|
5405
5509
|
xhr.onerror = function() {
|
|
5406
|
-
|
|
5510
|
+
setTimeout(function() {
|
|
5511
|
+
reject(new TypeError('Network request failed'));
|
|
5512
|
+
}, 0);
|
|
5407
5513
|
};
|
|
5408
5514
|
|
|
5409
5515
|
xhr.ontimeout = function() {
|
|
5410
|
-
|
|
5516
|
+
setTimeout(function() {
|
|
5517
|
+
reject(new TypeError('Network request timed out'));
|
|
5518
|
+
}, 0);
|
|
5411
5519
|
};
|
|
5412
5520
|
|
|
5413
5521
|
xhr.onabort = function() {
|
|
5414
|
-
|
|
5522
|
+
setTimeout(function() {
|
|
5523
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
5524
|
+
}, 0);
|
|
5415
5525
|
};
|
|
5416
5526
|
|
|
5417
|
-
|
|
5527
|
+
function fixUrl(url) {
|
|
5528
|
+
try {
|
|
5529
|
+
return url === '' && g.location.href ? g.location.href : url
|
|
5530
|
+
} catch (e) {
|
|
5531
|
+
return url
|
|
5532
|
+
}
|
|
5533
|
+
}
|
|
5534
|
+
|
|
5535
|
+
xhr.open(request.method, fixUrl(request.url), true);
|
|
5418
5536
|
|
|
5419
5537
|
if (request.credentials === 'include') {
|
|
5420
5538
|
xhr.withCredentials = true;
|
|
@@ -5422,13 +5540,32 @@ var irrelevant = (function (exports) {
|
|
|
5422
5540
|
xhr.withCredentials = false;
|
|
5423
5541
|
}
|
|
5424
5542
|
|
|
5425
|
-
if ('responseType' in xhr
|
|
5426
|
-
|
|
5543
|
+
if ('responseType' in xhr) {
|
|
5544
|
+
if (support.blob) {
|
|
5545
|
+
xhr.responseType = 'blob';
|
|
5546
|
+
} else if (
|
|
5547
|
+
support.arrayBuffer
|
|
5548
|
+
) {
|
|
5549
|
+
xhr.responseType = 'arraybuffer';
|
|
5550
|
+
}
|
|
5427
5551
|
}
|
|
5428
5552
|
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5553
|
+
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
|
|
5554
|
+
var names = [];
|
|
5555
|
+
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
|
|
5556
|
+
names.push(normalizeName(name));
|
|
5557
|
+
xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
|
|
5558
|
+
});
|
|
5559
|
+
request.headers.forEach(function(value, name) {
|
|
5560
|
+
if (names.indexOf(name) === -1) {
|
|
5561
|
+
xhr.setRequestHeader(name, value);
|
|
5562
|
+
}
|
|
5563
|
+
});
|
|
5564
|
+
} else {
|
|
5565
|
+
request.headers.forEach(function(value, name) {
|
|
5566
|
+
xhr.setRequestHeader(name, value);
|
|
5567
|
+
});
|
|
5568
|
+
}
|
|
5432
5569
|
|
|
5433
5570
|
if (request.signal) {
|
|
5434
5571
|
request.signal.addEventListener('abort', abortXhr);
|
|
@@ -5447,11 +5584,11 @@ var irrelevant = (function (exports) {
|
|
|
5447
5584
|
|
|
5448
5585
|
fetch.polyfill = true;
|
|
5449
5586
|
|
|
5450
|
-
if (!
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5587
|
+
if (!g.fetch) {
|
|
5588
|
+
g.fetch = fetch;
|
|
5589
|
+
g.Headers = Headers;
|
|
5590
|
+
g.Request = Request;
|
|
5591
|
+
g.Response = Response;
|
|
5455
5592
|
}
|
|
5456
5593
|
|
|
5457
5594
|
exports.Headers = Headers;
|
|
@@ -5463,14 +5600,13 @@ var irrelevant = (function (exports) {
|
|
|
5463
5600
|
|
|
5464
5601
|
return exports;
|
|
5465
5602
|
|
|
5466
|
-
})({});
|
|
5467
|
-
})(
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
delete
|
|
5471
|
-
// Choose between native implementation (
|
|
5472
|
-
|
|
5473
|
-
var ctx = __self__; // this line disable service worker support temporarily
|
|
5603
|
+
}))({});
|
|
5604
|
+
})(__globalThis__);
|
|
5605
|
+
// This is a ponyfill, so...
|
|
5606
|
+
__globalThis__.fetch.ponyfill = true;
|
|
5607
|
+
delete __globalThis__.fetch.polyfill;
|
|
5608
|
+
// Choose between native implementation (__global__) or custom implementation (__globalThis__)
|
|
5609
|
+
var ctx = __global__.fetch ? __global__ : __globalThis__;
|
|
5474
5610
|
exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
|
|
5475
5611
|
exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
|
|
5476
5612
|
exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
|
|
@@ -6663,7 +6799,7 @@ function hasMultilineItems(maybeArray) {
|
|
|
6663
6799
|
}
|
|
6664
6800
|
});
|
|
6665
6801
|
|
|
6666
|
-
var ReactNativeFile = function ReactNativeFile(_ref) {
|
|
6802
|
+
var ReactNativeFile$1 = function ReactNativeFile(_ref) {
|
|
6667
6803
|
var uri = _ref.uri,
|
|
6668
6804
|
name = _ref.name,
|
|
6669
6805
|
type = _ref.type;
|
|
@@ -6672,21 +6808,21 @@ var ReactNativeFile = function ReactNativeFile(_ref) {
|
|
|
6672
6808
|
this.type = type;
|
|
6673
6809
|
};
|
|
6674
6810
|
|
|
6675
|
-
var isExtractableFile = function isExtractableFile(value) {
|
|
6811
|
+
var isExtractableFile$1 = function isExtractableFile(value) {
|
|
6676
6812
|
return (
|
|
6677
6813
|
(typeof File !== 'undefined' && value instanceof File) ||
|
|
6678
6814
|
(typeof Blob !== 'undefined' && value instanceof Blob) ||
|
|
6679
|
-
value instanceof ReactNativeFile
|
|
6815
|
+
value instanceof ReactNativeFile$1
|
|
6680
6816
|
);
|
|
6681
6817
|
};
|
|
6682
6818
|
|
|
6683
|
-
var extractFiles = function extractFiles(value, path, isExtractableFile
|
|
6819
|
+
var extractFiles$1 = function extractFiles(value, path, isExtractableFile) {
|
|
6684
6820
|
if (path === void 0) {
|
|
6685
6821
|
path = '';
|
|
6686
6822
|
}
|
|
6687
6823
|
|
|
6688
|
-
if (isExtractableFile
|
|
6689
|
-
isExtractableFile
|
|
6824
|
+
if (isExtractableFile === void 0) {
|
|
6825
|
+
isExtractableFile = isExtractableFile$1;
|
|
6690
6826
|
}
|
|
6691
6827
|
|
|
6692
6828
|
var clone;
|
|
@@ -6698,7 +6834,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
|
|
|
6698
6834
|
else files.set(file, paths);
|
|
6699
6835
|
}
|
|
6700
6836
|
|
|
6701
|
-
if (isExtractableFile
|
|
6837
|
+
if (isExtractableFile(value)) {
|
|
6702
6838
|
clone = null;
|
|
6703
6839
|
addFile([path], value);
|
|
6704
6840
|
} else {
|
|
@@ -6710,7 +6846,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
|
|
|
6710
6846
|
});
|
|
6711
6847
|
else if (Array.isArray(value))
|
|
6712
6848
|
clone = value.map(function (child, i) {
|
|
6713
|
-
var result = extractFiles(child, '' + prefix + i, isExtractableFile
|
|
6849
|
+
var result = extractFiles(child, '' + prefix + i, isExtractableFile);
|
|
6714
6850
|
result.files.forEach(addFile);
|
|
6715
6851
|
return result.clone;
|
|
6716
6852
|
});
|
|
@@ -6718,7 +6854,7 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
|
|
|
6718
6854
|
clone = {};
|
|
6719
6855
|
|
|
6720
6856
|
for (var i in value) {
|
|
6721
|
-
var result = extractFiles(value[i], '' + prefix + i, isExtractableFile
|
|
6857
|
+
var result = extractFiles(value[i], '' + prefix + i, isExtractableFile);
|
|
6722
6858
|
result.files.forEach(addFile);
|
|
6723
6859
|
clone[i] = result.clone;
|
|
6724
6860
|
}
|
|
@@ -6731,18 +6867,18 @@ var extractFiles = function extractFiles(value, path, isExtractableFile$1) {
|
|
|
6731
6867
|
};
|
|
6732
6868
|
};
|
|
6733
6869
|
|
|
6734
|
-
var ReactNativeFile
|
|
6735
|
-
var extractFiles
|
|
6736
|
-
var isExtractableFile
|
|
6870
|
+
var ReactNativeFile = ReactNativeFile$1;
|
|
6871
|
+
var extractFiles = extractFiles$1;
|
|
6872
|
+
var isExtractableFile = isExtractableFile$1;
|
|
6737
6873
|
|
|
6738
6874
|
var _public = {
|
|
6739
|
-
ReactNativeFile: ReactNativeFile
|
|
6740
|
-
extractFiles: extractFiles
|
|
6741
|
-
isExtractableFile: isExtractableFile
|
|
6875
|
+
ReactNativeFile: ReactNativeFile,
|
|
6876
|
+
extractFiles: extractFiles,
|
|
6877
|
+
isExtractableFile: isExtractableFile
|
|
6742
6878
|
};
|
|
6743
6879
|
|
|
6744
6880
|
/* eslint-env browser */
|
|
6745
|
-
var browser = typeof self
|
|
6881
|
+
var browser = typeof self === 'object' ? self.FormData : window.FormData;
|
|
6746
6882
|
|
|
6747
6883
|
var createRequestBody_1 = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
6748
6884
|
var __importDefault = (domContextHooks_module.commonjsGlobal && domContextHooks_module.commonjsGlobal.__importDefault) || function (mod) {
|
|
@@ -6764,10 +6900,21 @@ var isExtractableFileEnhanced = function (value) {
|
|
|
6764
6900
|
* (https://github.com/jaydenseric/graphql-multipart-request-spec)
|
|
6765
6901
|
* Otherwise returns JSON
|
|
6766
6902
|
*/
|
|
6767
|
-
function createRequestBody(query, variables) {
|
|
6768
|
-
var _a = _public.extractFiles({ query: query, variables: variables }, '', isExtractableFileEnhanced), clone = _a.clone, files = _a.files;
|
|
6903
|
+
function createRequestBody(query, variables, operationName) {
|
|
6904
|
+
var _a = _public.extractFiles({ query: query, variables: variables, operationName: operationName }, '', isExtractableFileEnhanced), clone = _a.clone, files = _a.files;
|
|
6769
6905
|
if (files.size === 0) {
|
|
6770
|
-
|
|
6906
|
+
if (!Array.isArray(query)) {
|
|
6907
|
+
return JSON.stringify(clone);
|
|
6908
|
+
}
|
|
6909
|
+
if (typeof variables !== 'undefined' && !Array.isArray(variables)) {
|
|
6910
|
+
throw new Error('Cannot create request body with given variable type, array expected');
|
|
6911
|
+
}
|
|
6912
|
+
// Batch support
|
|
6913
|
+
var payload = query.reduce(function (accu, currentQuery, index) {
|
|
6914
|
+
accu.push({ query: currentQuery, variables: variables ? variables[index] : undefined });
|
|
6915
|
+
return accu;
|
|
6916
|
+
}, []);
|
|
6917
|
+
return JSON.stringify(payload);
|
|
6771
6918
|
}
|
|
6772
6919
|
var Form = typeof FormData === 'undefined' ? form_data_1.default : FormData;
|
|
6773
6920
|
var form = new Form();
|
|
@@ -6785,7 +6932,7 @@ function createRequestBody(query, variables) {
|
|
|
6785
6932
|
return form;
|
|
6786
6933
|
}
|
|
6787
6934
|
exports.default = createRequestBody;
|
|
6788
|
-
|
|
6935
|
+
//# sourceMappingURL=createRequestBody.js.map
|
|
6789
6936
|
});
|
|
6790
6937
|
|
|
6791
6938
|
var types = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
@@ -6797,6 +6944,8 @@ var __extends = (domContextHooks_module.commonjsGlobal && domContextHooks_module
|
|
|
6797
6944
|
return extendStatics(d, b);
|
|
6798
6945
|
};
|
|
6799
6946
|
return function (d, b) {
|
|
6947
|
+
if (typeof b !== "function" && b !== null)
|
|
6948
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
6800
6949
|
extendStatics(d, b);
|
|
6801
6950
|
function __() { this.constructor = d; }
|
|
6802
6951
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -6833,10 +6982,10 @@ var ClientError = /** @class */ (function (_super) {
|
|
|
6833
6982
|
return ClientError;
|
|
6834
6983
|
}(Error));
|
|
6835
6984
|
exports.ClientError = ClientError;
|
|
6836
|
-
|
|
6985
|
+
//# sourceMappingURL=types.js.map
|
|
6837
6986
|
});
|
|
6838
6987
|
|
|
6839
|
-
var dist
|
|
6988
|
+
var dist = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
6840
6989
|
var __assign = (domContextHooks_module.commonjsGlobal && domContextHooks_module.commonjsGlobal.__assign) || function () {
|
|
6841
6990
|
__assign = Object.assign || function(t) {
|
|
6842
6991
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -6918,13 +7067,12 @@ var __importDefault = (domContextHooks_module.commonjsGlobal && domContextHooks_
|
|
|
6918
7067
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6919
7068
|
};
|
|
6920
7069
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6921
|
-
exports.gql = exports.request = exports.rawRequest = exports.GraphQLClient = exports.ClientError = void 0;
|
|
7070
|
+
exports.gql = exports.batchRequests = exports.request = exports.rawRequest = exports.GraphQLClient = exports.ClientError = void 0;
|
|
6922
7071
|
var cross_fetch_1 = __importStar(browserPonyfill), CrossFetch = cross_fetch_1;
|
|
6923
7072
|
|
|
6924
7073
|
var createRequestBody_1$1 = __importDefault(createRequestBody_1);
|
|
6925
7074
|
|
|
6926
|
-
|
|
6927
|
-
Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return types_2.ClientError; } });
|
|
7075
|
+
Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return types.ClientError; } });
|
|
6928
7076
|
/**
|
|
6929
7077
|
* Convert the given headers configuration into a plain object.
|
|
6930
7078
|
*/
|
|
@@ -6947,6 +7095,85 @@ var resolveHeaders = function (headers) {
|
|
|
6947
7095
|
}
|
|
6948
7096
|
return oHeaders;
|
|
6949
7097
|
};
|
|
7098
|
+
/**
|
|
7099
|
+
* Clean a GraphQL document to send it via a GET query
|
|
7100
|
+
*
|
|
7101
|
+
* @param {string} str GraphQL query
|
|
7102
|
+
* @returns {string} Cleaned query
|
|
7103
|
+
*/
|
|
7104
|
+
var queryCleanner = function (str) { return str.replace(/([\s,]|#[^\n\r]+)+/g, ' ').trim(); };
|
|
7105
|
+
/**
|
|
7106
|
+
* Create query string for GraphQL request
|
|
7107
|
+
*
|
|
7108
|
+
* @param {object} param0 -
|
|
7109
|
+
*
|
|
7110
|
+
* @param {string|string[]} param0.query the GraphQL document or array of document if it's a batch request
|
|
7111
|
+
* @param {string|undefined} param0.operationName the GraphQL operation name
|
|
7112
|
+
* @param {any|any[]} param0.variables the GraphQL variables to use
|
|
7113
|
+
*/
|
|
7114
|
+
var buildGetQueryParams = function (_a) {
|
|
7115
|
+
var query = _a.query, variables = _a.variables, operationName = _a.operationName;
|
|
7116
|
+
if (!Array.isArray(query)) {
|
|
7117
|
+
var search = ["query=" + encodeURIComponent(queryCleanner(query))];
|
|
7118
|
+
if (variables) {
|
|
7119
|
+
search.push("variables=" + encodeURIComponent(JSON.stringify(variables)));
|
|
7120
|
+
}
|
|
7121
|
+
if (operationName) {
|
|
7122
|
+
search.push("operationName=" + encodeURIComponent(operationName));
|
|
7123
|
+
}
|
|
7124
|
+
return search.join('&');
|
|
7125
|
+
}
|
|
7126
|
+
if (typeof variables !== 'undefined' && !Array.isArray(variables)) {
|
|
7127
|
+
throw new Error('Cannot create query with given variable type, array expected');
|
|
7128
|
+
}
|
|
7129
|
+
// Batch support
|
|
7130
|
+
var payload = query.reduce(function (accu, currentQuery, index) {
|
|
7131
|
+
accu.push({
|
|
7132
|
+
query: queryCleanner(currentQuery),
|
|
7133
|
+
variables: variables ? JSON.stringify(variables[index]) : undefined,
|
|
7134
|
+
});
|
|
7135
|
+
return accu;
|
|
7136
|
+
}, []);
|
|
7137
|
+
return "query=" + encodeURIComponent(JSON.stringify(payload));
|
|
7138
|
+
};
|
|
7139
|
+
/**
|
|
7140
|
+
* Fetch data using POST method
|
|
7141
|
+
*/
|
|
7142
|
+
var post = function (_a) {
|
|
7143
|
+
var url = _a.url, query = _a.query, variables = _a.variables, operationName = _a.operationName, headers = _a.headers, fetch = _a.fetch, fetchOptions = _a.fetchOptions;
|
|
7144
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
7145
|
+
var body;
|
|
7146
|
+
return __generator(this, function (_b) {
|
|
7147
|
+
switch (_b.label) {
|
|
7148
|
+
case 0:
|
|
7149
|
+
body = createRequestBody_1$1.default(query, variables, operationName);
|
|
7150
|
+
return [4 /*yield*/, fetch(url, __assign({ method: 'POST', headers: __assign(__assign({}, (typeof body === 'string' ? { 'Content-Type': 'application/json' } : {})), headers), body: body }, fetchOptions))];
|
|
7151
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
7152
|
+
}
|
|
7153
|
+
});
|
|
7154
|
+
});
|
|
7155
|
+
};
|
|
7156
|
+
/**
|
|
7157
|
+
* Fetch data using GET method
|
|
7158
|
+
*/
|
|
7159
|
+
var get = function (_a) {
|
|
7160
|
+
var url = _a.url, query = _a.query, variables = _a.variables, operationName = _a.operationName, headers = _a.headers, fetch = _a.fetch, fetchOptions = _a.fetchOptions;
|
|
7161
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
7162
|
+
var queryParams;
|
|
7163
|
+
return __generator(this, function (_b) {
|
|
7164
|
+
switch (_b.label) {
|
|
7165
|
+
case 0:
|
|
7166
|
+
queryParams = buildGetQueryParams({
|
|
7167
|
+
query: query,
|
|
7168
|
+
variables: variables,
|
|
7169
|
+
operationName: operationName,
|
|
7170
|
+
});
|
|
7171
|
+
return [4 /*yield*/, fetch(url + "?" + queryParams, __assign({ method: 'GET', headers: headers }, fetchOptions))];
|
|
7172
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
7173
|
+
}
|
|
7174
|
+
});
|
|
7175
|
+
});
|
|
7176
|
+
};
|
|
6950
7177
|
/**
|
|
6951
7178
|
* todo
|
|
6952
7179
|
*/
|
|
@@ -6956,27 +7183,44 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
6956
7183
|
this.options = options || {};
|
|
6957
7184
|
}
|
|
6958
7185
|
GraphQLClient.prototype.rawRequest = function (query, variables, requestHeaders) {
|
|
7186
|
+
var _a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
|
|
7187
|
+
var url = this.url;
|
|
7188
|
+
return makeRequest({
|
|
7189
|
+
url: url,
|
|
7190
|
+
query: query,
|
|
7191
|
+
variables: variables,
|
|
7192
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
|
|
7193
|
+
operationName: undefined,
|
|
7194
|
+
fetch: fetch,
|
|
7195
|
+
method: method,
|
|
7196
|
+
fetchOptions: fetchOptions,
|
|
7197
|
+
});
|
|
7198
|
+
};
|
|
7199
|
+
/**
|
|
7200
|
+
* Send a GraphQL document to the server.
|
|
7201
|
+
*/
|
|
7202
|
+
GraphQLClient.prototype.request = function (document, variables, requestHeaders) {
|
|
6959
7203
|
return __awaiter(this, void 0, void 0, function () {
|
|
6960
|
-
var _a, headers, _b,
|
|
6961
|
-
return __generator(this, function (
|
|
6962
|
-
switch (
|
|
7204
|
+
var _a, headers, _b, fetch, _c, method, fetchOptions, url, _d, query, operationName, data;
|
|
7205
|
+
return __generator(this, function (_e) {
|
|
7206
|
+
switch (_e.label) {
|
|
6963
7207
|
case 0:
|
|
6964
|
-
_a = this.options, headers = _a.headers, _b = _a.fetch,
|
|
6965
|
-
|
|
6966
|
-
|
|
7208
|
+
_a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
|
|
7209
|
+
url = this.url;
|
|
7210
|
+
_d = resolveRequestDocument(document), query = _d.query, operationName = _d.operationName;
|
|
7211
|
+
return [4 /*yield*/, makeRequest({
|
|
7212
|
+
url: url,
|
|
7213
|
+
query: query,
|
|
7214
|
+
variables: variables,
|
|
7215
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
|
|
7216
|
+
operationName: operationName,
|
|
7217
|
+
fetch: fetch,
|
|
7218
|
+
method: method,
|
|
7219
|
+
fetchOptions: fetchOptions,
|
|
7220
|
+
})];
|
|
6967
7221
|
case 1:
|
|
6968
|
-
|
|
6969
|
-
return [
|
|
6970
|
-
case 2:
|
|
6971
|
-
result = _c.sent();
|
|
6972
|
-
if (response.ok && !result.errors && result.data) {
|
|
6973
|
-
headers_1 = response.headers, status_1 = response.status;
|
|
6974
|
-
return [2 /*return*/, __assign(__assign({}, result), { headers: headers_1, status: status_1 })];
|
|
6975
|
-
}
|
|
6976
|
-
else {
|
|
6977
|
-
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
6978
|
-
throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
|
|
6979
|
-
}
|
|
7222
|
+
data = (_e.sent()).data;
|
|
7223
|
+
return [2 /*return*/, data];
|
|
6980
7224
|
}
|
|
6981
7225
|
});
|
|
6982
7226
|
});
|
|
@@ -6984,28 +7228,35 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
6984
7228
|
/**
|
|
6985
7229
|
* Send a GraphQL document to the server.
|
|
6986
7230
|
*/
|
|
6987
|
-
GraphQLClient.prototype.
|
|
7231
|
+
GraphQLClient.prototype.batchRequests = function (documents, requestHeaders) {
|
|
6988
7232
|
return __awaiter(this, void 0, void 0, function () {
|
|
6989
|
-
var _a, headers, _b,
|
|
6990
|
-
return __generator(this, function (
|
|
6991
|
-
switch (
|
|
7233
|
+
var _a, headers, _b, fetch, _c, method, fetchOptions, url, queries, variables, data;
|
|
7234
|
+
return __generator(this, function (_d) {
|
|
7235
|
+
switch (_d.label) {
|
|
6992
7236
|
case 0:
|
|
6993
|
-
_a = this.options, headers = _a.headers, _b = _a.fetch,
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
7237
|
+
_a = this.options, headers = _a.headers, _b = _a.fetch, fetch = _b === void 0 ? cross_fetch_1.default : _b, _c = _a.method, method = _c === void 0 ? 'POST' : _c, fetchOptions = __rest(_a, ["headers", "fetch", "method"]);
|
|
7238
|
+
url = this.url;
|
|
7239
|
+
queries = documents.map(function (_a) {
|
|
7240
|
+
var document = _a.document;
|
|
7241
|
+
return resolveRequestDocument(document).query;
|
|
7242
|
+
});
|
|
7243
|
+
variables = documents.map(function (_a) {
|
|
7244
|
+
var variables = _a.variables;
|
|
7245
|
+
return variables;
|
|
7246
|
+
});
|
|
7247
|
+
return [4 /*yield*/, makeRequest({
|
|
7248
|
+
url: url,
|
|
7249
|
+
query: queries,
|
|
7250
|
+
variables: variables,
|
|
7251
|
+
headers: __assign(__assign({}, resolveHeaders(headers)), resolveHeaders(requestHeaders)),
|
|
7252
|
+
operationName: undefined,
|
|
7253
|
+
fetch: fetch,
|
|
7254
|
+
method: method,
|
|
7255
|
+
fetchOptions: fetchOptions,
|
|
7256
|
+
})];
|
|
6997
7257
|
case 1:
|
|
6998
|
-
|
|
6999
|
-
return [
|
|
7000
|
-
case 2:
|
|
7001
|
-
result = _c.sent();
|
|
7002
|
-
if (response.ok && !result.errors && result.data) {
|
|
7003
|
-
return [2 /*return*/, result.data];
|
|
7004
|
-
}
|
|
7005
|
-
else {
|
|
7006
|
-
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
7007
|
-
throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status }), { query: resolvedDoc, variables: variables });
|
|
7008
|
-
}
|
|
7258
|
+
data = (_d.sent()).data;
|
|
7259
|
+
return [2 /*return*/, data];
|
|
7009
7260
|
}
|
|
7010
7261
|
});
|
|
7011
7262
|
});
|
|
@@ -7030,18 +7281,64 @@ var GraphQLClient = /** @class */ (function () {
|
|
|
7030
7281
|
}
|
|
7031
7282
|
return this;
|
|
7032
7283
|
};
|
|
7284
|
+
/**
|
|
7285
|
+
* Change the client endpoint. All subsequent requests will send to this endpoint.
|
|
7286
|
+
*/
|
|
7287
|
+
GraphQLClient.prototype.setEndpoint = function (value) {
|
|
7288
|
+
this.url = value;
|
|
7289
|
+
return this;
|
|
7290
|
+
};
|
|
7033
7291
|
return GraphQLClient;
|
|
7034
7292
|
}());
|
|
7035
7293
|
exports.GraphQLClient = GraphQLClient;
|
|
7294
|
+
function makeRequest(_a) {
|
|
7295
|
+
var url = _a.url, query = _a.query, variables = _a.variables, headers = _a.headers, operationName = _a.operationName, fetch = _a.fetch, _b = _a.method, method = _b === void 0 ? 'POST' : _b, fetchOptions = _a.fetchOptions;
|
|
7296
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7297
|
+
var fetcher, isBathchingQuery, response, result, successfullyReceivedData, headers_1, status_1, errorResult;
|
|
7298
|
+
return __generator(this, function (_c) {
|
|
7299
|
+
switch (_c.label) {
|
|
7300
|
+
case 0:
|
|
7301
|
+
fetcher = method.toUpperCase() === 'POST' ? post : get;
|
|
7302
|
+
isBathchingQuery = Array.isArray(query);
|
|
7303
|
+
return [4 /*yield*/, fetcher({
|
|
7304
|
+
url: url,
|
|
7305
|
+
query: query,
|
|
7306
|
+
variables: variables,
|
|
7307
|
+
operationName: operationName,
|
|
7308
|
+
headers: headers,
|
|
7309
|
+
fetch: fetch,
|
|
7310
|
+
fetchOptions: fetchOptions,
|
|
7311
|
+
})];
|
|
7312
|
+
case 1:
|
|
7313
|
+
response = _c.sent();
|
|
7314
|
+
return [4 /*yield*/, getResult(response)];
|
|
7315
|
+
case 2:
|
|
7316
|
+
result = _c.sent();
|
|
7317
|
+
successfullyReceivedData = isBathchingQuery && Array.isArray(result) ? !result.some(function (_a) {
|
|
7318
|
+
var data = _a.data;
|
|
7319
|
+
return !data;
|
|
7320
|
+
}) : !!result.data;
|
|
7321
|
+
if (response.ok && !result.errors && successfullyReceivedData) {
|
|
7322
|
+
headers_1 = response.headers, status_1 = response.status;
|
|
7323
|
+
return [2 /*return*/, __assign(__assign({}, (isBathchingQuery ? { data: result } : result)), { headers: headers_1, status: status_1 })];
|
|
7324
|
+
}
|
|
7325
|
+
else {
|
|
7326
|
+
errorResult = typeof result === 'string' ? { error: result } : result;
|
|
7327
|
+
throw new types.ClientError(__assign(__assign({}, errorResult), { status: response.status, headers: response.headers }), { query: query, variables: variables });
|
|
7328
|
+
}
|
|
7329
|
+
}
|
|
7330
|
+
});
|
|
7331
|
+
});
|
|
7332
|
+
}
|
|
7036
7333
|
/**
|
|
7037
7334
|
* todo
|
|
7038
7335
|
*/
|
|
7039
|
-
function rawRequest(url, query, variables) {
|
|
7336
|
+
function rawRequest(url, query, variables, requestHeaders) {
|
|
7040
7337
|
return __awaiter(this, void 0, void 0, function () {
|
|
7041
7338
|
var client;
|
|
7042
7339
|
return __generator(this, function (_a) {
|
|
7043
7340
|
client = new GraphQLClient(url);
|
|
7044
|
-
return [2 /*return*/, client.rawRequest(query, variables)];
|
|
7341
|
+
return [2 /*return*/, client.rawRequest(query, variables, requestHeaders)];
|
|
7045
7342
|
});
|
|
7046
7343
|
});
|
|
7047
7344
|
}
|
|
@@ -7080,16 +7377,60 @@ exports.rawRequest = rawRequest;
|
|
|
7080
7377
|
* await request('https://foo.bar/graphql', gql`...`)
|
|
7081
7378
|
* ```
|
|
7082
7379
|
*/
|
|
7083
|
-
function request(url, document, variables) {
|
|
7380
|
+
function request(url, document, variables, requestHeaders) {
|
|
7084
7381
|
return __awaiter(this, void 0, void 0, function () {
|
|
7085
7382
|
var client;
|
|
7086
7383
|
return __generator(this, function (_a) {
|
|
7087
7384
|
client = new GraphQLClient(url);
|
|
7088
|
-
return [2 /*return*/, client.request(document, variables)];
|
|
7385
|
+
return [2 /*return*/, client.request(document, variables, requestHeaders)];
|
|
7089
7386
|
});
|
|
7090
7387
|
});
|
|
7091
7388
|
}
|
|
7092
7389
|
exports.request = request;
|
|
7390
|
+
/**
|
|
7391
|
+
* Send a batch of GraphQL Document to the GraphQL server for exectuion.
|
|
7392
|
+
*
|
|
7393
|
+
* @example
|
|
7394
|
+
*
|
|
7395
|
+
* ```ts
|
|
7396
|
+
* // You can pass a raw string
|
|
7397
|
+
*
|
|
7398
|
+
* await batchRequests('https://foo.bar/graphql', [
|
|
7399
|
+
* {
|
|
7400
|
+
* query: `
|
|
7401
|
+
* {
|
|
7402
|
+
* query {
|
|
7403
|
+
* users
|
|
7404
|
+
* }
|
|
7405
|
+
* }`
|
|
7406
|
+
* },
|
|
7407
|
+
* {
|
|
7408
|
+
* query: `
|
|
7409
|
+
* {
|
|
7410
|
+
* query {
|
|
7411
|
+
* users
|
|
7412
|
+
* }
|
|
7413
|
+
* }`
|
|
7414
|
+
* }])
|
|
7415
|
+
*
|
|
7416
|
+
* // You can also pass a GraphQL DocumentNode as query. Convenient if you
|
|
7417
|
+
* // are using graphql-tag package.
|
|
7418
|
+
*
|
|
7419
|
+
* import gql from 'graphql-tag'
|
|
7420
|
+
*
|
|
7421
|
+
* await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])
|
|
7422
|
+
* ```
|
|
7423
|
+
*/
|
|
7424
|
+
function batchRequests(url, documents, requestHeaders) {
|
|
7425
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7426
|
+
var client;
|
|
7427
|
+
return __generator(this, function (_a) {
|
|
7428
|
+
client = new GraphQLClient(url);
|
|
7429
|
+
return [2 /*return*/, client.batchRequests(documents, requestHeaders)];
|
|
7430
|
+
});
|
|
7431
|
+
});
|
|
7432
|
+
}
|
|
7433
|
+
exports.batchRequests = batchRequests;
|
|
7093
7434
|
exports.default = request;
|
|
7094
7435
|
/**
|
|
7095
7436
|
* todo
|
|
@@ -7107,9 +7448,15 @@ function getResult(response) {
|
|
|
7107
7448
|
* helpers
|
|
7108
7449
|
*/
|
|
7109
7450
|
function resolveRequestDocument(document) {
|
|
7451
|
+
var _a;
|
|
7110
7452
|
if (typeof document === 'string')
|
|
7111
|
-
return document;
|
|
7112
|
-
|
|
7453
|
+
return { query: document };
|
|
7454
|
+
var operationName = undefined;
|
|
7455
|
+
var operationDefinitions = document.definitions.filter(function (definition) { return definition.kind === 'OperationDefinition'; });
|
|
7456
|
+
if (operationDefinitions.length === 1) {
|
|
7457
|
+
operationName = (_a = operationDefinitions[0].name) === null || _a === void 0 ? void 0 : _a.value;
|
|
7458
|
+
}
|
|
7459
|
+
return { query: printer.print(document), operationName: operationName };
|
|
7113
7460
|
}
|
|
7114
7461
|
/**
|
|
7115
7462
|
* Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.
|
|
@@ -7142,37 +7489,23 @@ function HeadersInstanceToPlainObject(headers) {
|
|
|
7142
7489
|
});
|
|
7143
7490
|
return o;
|
|
7144
7491
|
}
|
|
7145
|
-
|
|
7492
|
+
//# sourceMappingURL=index.js.map
|
|
7146
7493
|
});
|
|
7147
7494
|
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
let id = '';
|
|
7152
|
-
let bytes = crypto.getRandomValues(new Uint8Array(size));
|
|
7153
|
-
|
|
7154
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
7155
|
-
while (size--) {
|
|
7156
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
7157
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
7158
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
7159
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
7160
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
7161
|
-
let byte = bytes[size] & 63;
|
|
7495
|
+
let nanoid = (size = 21) =>
|
|
7496
|
+
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
7497
|
+
byte &= 63;
|
|
7162
7498
|
if (byte < 36) {
|
|
7163
|
-
// `0-9a-z`
|
|
7164
7499
|
id += byte.toString(36);
|
|
7165
7500
|
} else if (byte < 62) {
|
|
7166
|
-
// `A-Z`
|
|
7167
7501
|
id += (byte - 26).toString(36).toUpperCase();
|
|
7168
|
-
} else if (byte
|
|
7169
|
-
id += '_';
|
|
7170
|
-
} else {
|
|
7502
|
+
} else if (byte > 62) {
|
|
7171
7503
|
id += '-';
|
|
7504
|
+
} else {
|
|
7505
|
+
id += '_';
|
|
7172
7506
|
}
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
};
|
|
7507
|
+
return id
|
|
7508
|
+
}, '');
|
|
7176
7509
|
|
|
7177
7510
|
function isFunction(x) {
|
|
7178
7511
|
return typeof x === 'function';
|
|
@@ -7731,7 +8064,7 @@ Observable.create = (subscribe) => {
|
|
|
7731
8064
|
};
|
|
7732
8065
|
function getPromiseCtor(promiseCtor) {
|
|
7733
8066
|
if (!promiseCtor) {
|
|
7734
|
-
promiseCtor =
|
|
8067
|
+
promiseCtor = Promise;
|
|
7735
8068
|
}
|
|
7736
8069
|
if (!promiseCtor) {
|
|
7737
8070
|
throw new Error('no Promise impl found');
|
|
@@ -8205,10 +8538,11 @@ function dispatchBufferClose(arg) {
|
|
|
8205
8538
|
|
|
8206
8539
|
var umd = domContextHooks_module.createCommonjsModule(function (module, exports) {
|
|
8207
8540
|
(function (global, factory) {
|
|
8208
|
-
|
|
8541
|
+
factory(exports) ;
|
|
8209
8542
|
})(domContextHooks_module.commonjsGlobal, (function (exports) {
|
|
8210
|
-
|
|
8211
|
-
|
|
8543
|
+
const { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
8544
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
8545
|
+
const { hasOwnProperty } = Object.prototype;
|
|
8212
8546
|
/**
|
|
8213
8547
|
* Combine two comparators into a single comparators.
|
|
8214
8548
|
*/
|
|
@@ -8227,20 +8561,26 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8227
8561
|
if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {
|
|
8228
8562
|
return areItemsEqual(a, b, state);
|
|
8229
8563
|
}
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8564
|
+
const { cache } = state;
|
|
8565
|
+
const cachedA = cache.get(a);
|
|
8566
|
+
const cachedB = cache.get(b);
|
|
8233
8567
|
if (cachedA && cachedB) {
|
|
8234
8568
|
return cachedA === b && cachedB === a;
|
|
8235
8569
|
}
|
|
8236
8570
|
cache.set(a, b);
|
|
8237
8571
|
cache.set(b, a);
|
|
8238
|
-
|
|
8572
|
+
const result = areItemsEqual(a, b, state);
|
|
8239
8573
|
cache.delete(a);
|
|
8240
8574
|
cache.delete(b);
|
|
8241
8575
|
return result;
|
|
8242
8576
|
};
|
|
8243
8577
|
}
|
|
8578
|
+
/**
|
|
8579
|
+
* Get the `@@toStringTag` of the value, if it exists.
|
|
8580
|
+
*/
|
|
8581
|
+
function getShortTag(value) {
|
|
8582
|
+
return value != null ? value[Symbol.toStringTag] : undefined;
|
|
8583
|
+
}
|
|
8244
8584
|
/**
|
|
8245
8585
|
* Get the properties to strictly examine, which include both own properties that are
|
|
8246
8586
|
* not enumerable and symbol properties.
|
|
@@ -8251,24 +8591,43 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8251
8591
|
/**
|
|
8252
8592
|
* Whether the object contains the property passed as an own property.
|
|
8253
8593
|
*/
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
});
|
|
8594
|
+
const hasOwn =
|
|
8595
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8596
|
+
Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property));
|
|
8258
8597
|
/**
|
|
8259
8598
|
* Whether the values passed are strictly equal or both NaN.
|
|
8260
8599
|
*/
|
|
8261
8600
|
function sameValueZeroEqual(a, b) {
|
|
8262
|
-
return a
|
|
8601
|
+
return a === b || (!a && !b && a !== a && b !== b);
|
|
8263
8602
|
}
|
|
8264
8603
|
|
|
8265
|
-
|
|
8266
|
-
|
|
8604
|
+
const PREACT_VNODE = '__v';
|
|
8605
|
+
const PREACT_OWNER = '__o';
|
|
8606
|
+
const REACT_OWNER = '_owner';
|
|
8607
|
+
/**
|
|
8608
|
+
* Above this many keys, out-of-position keys are checked with `propertyIsEnumerable` rather than by
|
|
8609
|
+
* scanning the other object's keys. Measured in V8: scanning wins up to 50 keys and loses from 100.
|
|
8610
|
+
*/
|
|
8611
|
+
const MAX_SCANNED_PROPERTIES = 64;
|
|
8612
|
+
const { getOwnPropertyDescriptor, keys } = Object;
|
|
8613
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
8614
|
+
const { propertyIsEnumerable } = Object.prototype;
|
|
8615
|
+
/**
|
|
8616
|
+
* Identify the element type of TypedArrays across realms and subclasses.
|
|
8617
|
+
*/
|
|
8618
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
8619
|
+
const getTypedArrayTag = getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype), Symbol.toStringTag).get;
|
|
8620
|
+
/**
|
|
8621
|
+
* Whether the array buffers are equal in value.
|
|
8622
|
+
*/
|
|
8623
|
+
function areArrayBuffersEqual(a, b) {
|
|
8624
|
+
return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b));
|
|
8625
|
+
}
|
|
8267
8626
|
/**
|
|
8268
8627
|
* Whether the arrays are equal in value.
|
|
8269
8628
|
*/
|
|
8270
8629
|
function areArraysEqual(a, b, state) {
|
|
8271
|
-
|
|
8630
|
+
let index = a.length;
|
|
8272
8631
|
if (b.length !== index) {
|
|
8273
8632
|
return false;
|
|
8274
8633
|
}
|
|
@@ -8279,6 +8638,13 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8279
8638
|
}
|
|
8280
8639
|
return true;
|
|
8281
8640
|
}
|
|
8641
|
+
/**
|
|
8642
|
+
* Whether the dataviews are equal in value.
|
|
8643
|
+
*/
|
|
8644
|
+
function areDataViewsEqual(a, b) {
|
|
8645
|
+
return (a.byteLength === b.byteLength
|
|
8646
|
+
&& areTypedArraysEqual(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)));
|
|
8647
|
+
}
|
|
8282
8648
|
/**
|
|
8283
8649
|
* Whether the dates passed are equal in value.
|
|
8284
8650
|
*/
|
|
@@ -8286,36 +8652,118 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8286
8652
|
return sameValueZeroEqual(a.getTime(), b.getTime());
|
|
8287
8653
|
}
|
|
8288
8654
|
/**
|
|
8289
|
-
* Whether the
|
|
8655
|
+
* Whether the errors passed are equal in value.
|
|
8656
|
+
*
|
|
8657
|
+
* @note
|
|
8658
|
+
* `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
|
|
8659
|
+
* explicitly. `cause` and `errors` are compared by value rather than by reference, matching how
|
|
8660
|
+
* every other nested value in the comparison is treated. They are compared exactly once, regardless
|
|
8661
|
+
* of whether they were assigned (enumerable) or set by the constructor (non-enumerable). Other own
|
|
8662
|
+
* enumerable properties (which custom `Error` subclasses commonly add) are compared afterward.
|
|
8663
|
+
*
|
|
8664
|
+
* The own property comparison is inlined rather than extracted, which measured faster in V8 when
|
|
8665
|
+
* recursing through `cause`. Keep the bytecode under V8's 460-byte TurboFan inlining limit (383 bytes
|
|
8666
|
+
* at time of writing; check with `node --print-bytecode --print-bytecode-filter=areErrorsEqual`), or
|
|
8667
|
+
* this stops being inlined into its callers.
|
|
8290
8668
|
*/
|
|
8291
|
-
function
|
|
8292
|
-
if (a.
|
|
8669
|
+
function areErrorsEqual(a, b, state) {
|
|
8670
|
+
if (a.name !== b.name || a.message !== b.message || a.stack !== b.stack) {
|
|
8293
8671
|
return false;
|
|
8294
8672
|
}
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8673
|
+
const causeA = a.cause;
|
|
8674
|
+
const causeB = b.cause;
|
|
8675
|
+
if (causeA !== causeB && !state.equals(causeA, causeB, 'cause', 'cause', a, b, state)) {
|
|
8676
|
+
return false;
|
|
8677
|
+
}
|
|
8678
|
+
const errorsA = a.errors;
|
|
8679
|
+
const errorsB = b.errors;
|
|
8680
|
+
if (errorsA !== errorsB && !state.equals(errorsA, errorsB, 'errors', 'errors', a, b, state)) {
|
|
8681
|
+
return false;
|
|
8682
|
+
}
|
|
8683
|
+
const propertiesA = keys(a);
|
|
8684
|
+
const propertiesB = keys(b);
|
|
8685
|
+
let index = propertiesA.length;
|
|
8686
|
+
// Constructed errors rarely have enumerable own properties.
|
|
8687
|
+
if (!index && !propertiesB.length) {
|
|
8688
|
+
return true;
|
|
8689
|
+
}
|
|
8690
|
+
let compared = 0;
|
|
8691
|
+
let property;
|
|
8692
|
+
while (index-- > 0) {
|
|
8693
|
+
property = propertiesA[index];
|
|
8694
|
+
// Already compared above regardless of enumerability, so we can ignore them.
|
|
8695
|
+
if (property === 'cause' || property === 'errors') {
|
|
8696
|
+
continue;
|
|
8697
|
+
}
|
|
8698
|
+
// `propertyIsEnumerable` rather than `hasOwn`, so that a non-enumerable own property on `b` cannot
|
|
8699
|
+
// stand in for an enumerable one. Keys in the same position are trivially enumerable on `b`.
|
|
8700
|
+
if ((property !== propertiesB[index] && !propertyIsEnumerable.call(b, property))
|
|
8701
|
+
|| !state.equals(a[property], b[property], property, property, a, b, state)) {
|
|
8702
|
+
return false;
|
|
8703
|
+
}
|
|
8704
|
+
++compared;
|
|
8705
|
+
}
|
|
8706
|
+
// Every compared key is enumerable on `b`, so any of `b`'s keys left over must be `cause` / `errors`.
|
|
8707
|
+
const remaining = propertiesB.length - compared;
|
|
8708
|
+
return (!remaining
|
|
8709
|
+
|| remaining === (propertyIsEnumerable.call(b, 'cause') ? 1 : 0) + (propertyIsEnumerable.call(b, 'errors') ? 1 : 0));
|
|
8710
|
+
}
|
|
8711
|
+
/**
|
|
8712
|
+
* Whether the functions passed are equal in value.
|
|
8713
|
+
*/
|
|
8714
|
+
function areFunctionsEqual(a, b) {
|
|
8715
|
+
return a === b;
|
|
8716
|
+
}
|
|
8717
|
+
/**
|
|
8718
|
+
* Whether the errors passed are equal in value.
|
|
8719
|
+
*
|
|
8720
|
+
* @note
|
|
8721
|
+
* `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
|
|
8722
|
+
* explicitly. `cause` and `errors` are own properties, so `areObjectsEqualStrict` compares them along
|
|
8723
|
+
* with every other own property; they are not compared explicitly to avoid comparing them twice.
|
|
8724
|
+
*/
|
|
8725
|
+
function areErrorsEqualStrict(a, b, state) {
|
|
8726
|
+
return a.name === b.name && a.message === b.message && a.stack === b.stack && areObjectsEqualStrict(a, b, state);
|
|
8727
|
+
}
|
|
8728
|
+
/**
|
|
8729
|
+
* Whether the `Map`s are equal in value.
|
|
8730
|
+
*/
|
|
8731
|
+
function areMapsEqual(a, b, state) {
|
|
8732
|
+
const size = a.size;
|
|
8733
|
+
if (size !== b.size) {
|
|
8734
|
+
return false;
|
|
8735
|
+
}
|
|
8736
|
+
if (!size) {
|
|
8737
|
+
return true;
|
|
8738
|
+
}
|
|
8739
|
+
const matchedIndices = new Array(size);
|
|
8740
|
+
const aIterable = a.entries();
|
|
8741
|
+
let aResult;
|
|
8742
|
+
let bResult;
|
|
8743
|
+
let index = 0;
|
|
8744
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8745
|
+
while ((aResult = aIterable.next())) {
|
|
8746
|
+
if (aResult.done) {
|
|
8747
|
+
break;
|
|
8748
|
+
}
|
|
8749
|
+
const bIterable = b.entries();
|
|
8750
|
+
let hasMatch = false;
|
|
8751
|
+
let matchIndex = 0;
|
|
8752
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8753
|
+
while ((bResult = bIterable.next())) {
|
|
8308
8754
|
if (bResult.done) {
|
|
8309
8755
|
break;
|
|
8310
8756
|
}
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8757
|
+
if (matchedIndices[matchIndex]) {
|
|
8758
|
+
matchIndex++;
|
|
8759
|
+
continue;
|
|
8760
|
+
}
|
|
8761
|
+
const aEntry = aResult.value;
|
|
8762
|
+
const bEntry = bResult.value;
|
|
8763
|
+
if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state)
|
|
8764
|
+
&& state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
|
|
8765
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
8766
|
+
break;
|
|
8319
8767
|
}
|
|
8320
8768
|
matchIndex++;
|
|
8321
8769
|
}
|
|
@@ -8326,29 +8774,39 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8326
8774
|
}
|
|
8327
8775
|
return true;
|
|
8328
8776
|
}
|
|
8777
|
+
/**
|
|
8778
|
+
* Whether the numbers are equal in value.
|
|
8779
|
+
*/
|
|
8780
|
+
const areNumbersEqual = sameValueZeroEqual;
|
|
8329
8781
|
/**
|
|
8330
8782
|
* Whether the objects are equal in value.
|
|
8331
8783
|
*/
|
|
8332
8784
|
function areObjectsEqual(a, b, state) {
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8785
|
+
const properties = keys(a);
|
|
8786
|
+
const propertiesB = keys(b);
|
|
8787
|
+
let index = properties.length;
|
|
8788
|
+
if (propertiesB.length !== index) {
|
|
8336
8789
|
return false;
|
|
8337
8790
|
}
|
|
8338
|
-
|
|
8791
|
+
const isScannable = index <= MAX_SCANNED_PROPERTIES;
|
|
8792
|
+
let property;
|
|
8339
8793
|
// Decrementing `while` showed faster results than either incrementing or
|
|
8340
8794
|
// decrementing `for` loop and than an incrementing `while` loop. Declarative
|
|
8341
8795
|
// methods like `some` / `every` were not used to avoid incurring the garbage
|
|
8342
8796
|
// cost of anonymous callbacks.
|
|
8343
8797
|
while (index-- > 0) {
|
|
8344
8798
|
property = properties[index];
|
|
8345
|
-
if (
|
|
8346
|
-
|
|
8347
|
-
a.$$typeof !== b.$$typeof) {
|
|
8348
|
-
return false;
|
|
8799
|
+
if (isReactProperty(a, b, property)) {
|
|
8800
|
+
continue;
|
|
8349
8801
|
}
|
|
8350
|
-
|
|
8351
|
-
|
|
8802
|
+
// Objects built the same way list their keys in the same order, in which case the key is
|
|
8803
|
+
// already known to be an own enumerable property of `b` and the lookup can be skipped.
|
|
8804
|
+
// Otherwise, `propertiesB` is exactly `b`'s own enumerable keys. Scanning it is faster than
|
|
8805
|
+
// `propertyIsEnumerable` for smaller objects, but it is linear per key, so larger objects
|
|
8806
|
+
// (where reordering would make it quadratic) use the lookup instead.
|
|
8807
|
+
if ((property !== propertiesB[index]
|
|
8808
|
+
&& !(isScannable ? propertiesB.includes(property) : propertyIsEnumerable.call(b, property)))
|
|
8809
|
+
|| !state.equals(a[property], b[property], property, property, a, b, state)) {
|
|
8352
8810
|
return false;
|
|
8353
8811
|
}
|
|
8354
8812
|
}
|
|
@@ -8358,39 +8816,32 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8358
8816
|
* Whether the objects are equal in value with strict property checking.
|
|
8359
8817
|
*/
|
|
8360
8818
|
function areObjectsEqualStrict(a, b, state) {
|
|
8361
|
-
|
|
8362
|
-
|
|
8819
|
+
const properties = getStrictProperties(a);
|
|
8820
|
+
let index = properties.length;
|
|
8363
8821
|
if (getStrictProperties(b).length !== index) {
|
|
8364
8822
|
return false;
|
|
8365
8823
|
}
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8824
|
+
let property;
|
|
8825
|
+
let descriptorA;
|
|
8826
|
+
let descriptorB;
|
|
8369
8827
|
// Decrementing `while` showed faster results than either incrementing or
|
|
8370
8828
|
// decrementing `for` loop and than an incrementing `while` loop. Declarative
|
|
8371
8829
|
// methods like `some` / `every` were not used to avoid incurring the garbage
|
|
8372
8830
|
// cost of anonymous callbacks.
|
|
8373
8831
|
while (index-- > 0) {
|
|
8374
8832
|
property = properties[index];
|
|
8375
|
-
if (
|
|
8376
|
-
(
|
|
8377
|
-
a.$$typeof !== b.$$typeof) {
|
|
8378
|
-
return false;
|
|
8379
|
-
}
|
|
8380
|
-
if (!hasOwn(b, property)) {
|
|
8381
|
-
return false;
|
|
8382
|
-
}
|
|
8383
|
-
if (!state.equals(a[property], b[property], property, property, a, b, state)) {
|
|
8833
|
+
if (!isReactProperty(a, b, property)
|
|
8834
|
+
&& (!hasOwn(b, property) || !state.equals(a[property], b[property], property, property, a, b, state))) {
|
|
8384
8835
|
return false;
|
|
8385
8836
|
}
|
|
8386
8837
|
descriptorA = getOwnPropertyDescriptor(a, property);
|
|
8387
8838
|
descriptorB = getOwnPropertyDescriptor(b, property);
|
|
8388
|
-
if ((descriptorA || descriptorB)
|
|
8389
|
-
(!descriptorA
|
|
8390
|
-
!descriptorB
|
|
8391
|
-
descriptorA.configurable !== descriptorB.configurable
|
|
8392
|
-
descriptorA.enumerable !== descriptorB.enumerable
|
|
8393
|
-
descriptorA.writable !== descriptorB.writable)) {
|
|
8839
|
+
if ((descriptorA || descriptorB)
|
|
8840
|
+
&& (!descriptorA
|
|
8841
|
+
|| !descriptorB
|
|
8842
|
+
|| descriptorA.configurable !== descriptorB.configurable
|
|
8843
|
+
|| descriptorA.enumerable !== descriptorB.enumerable
|
|
8844
|
+
|| descriptorA.writable !== descriptorB.writable)) {
|
|
8394
8845
|
return false;
|
|
8395
8846
|
}
|
|
8396
8847
|
}
|
|
@@ -8412,28 +8863,34 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8412
8863
|
* Whether the `Set`s are equal in value.
|
|
8413
8864
|
*/
|
|
8414
8865
|
function areSetsEqual(a, b, state) {
|
|
8415
|
-
|
|
8866
|
+
const size = a.size;
|
|
8867
|
+
if (size !== b.size) {
|
|
8416
8868
|
return false;
|
|
8417
8869
|
}
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8870
|
+
if (!size) {
|
|
8871
|
+
return true;
|
|
8872
|
+
}
|
|
8873
|
+
const matchedIndices = new Array(size);
|
|
8874
|
+
const aIterable = a.values();
|
|
8875
|
+
let aResult;
|
|
8876
|
+
let bResult;
|
|
8877
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8422
8878
|
while ((aResult = aIterable.next())) {
|
|
8423
8879
|
if (aResult.done) {
|
|
8424
8880
|
break;
|
|
8425
8881
|
}
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8882
|
+
const bIterable = b.values();
|
|
8883
|
+
let hasMatch = false;
|
|
8884
|
+
let matchIndex = 0;
|
|
8885
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
8429
8886
|
while ((bResult = bIterable.next())) {
|
|
8430
8887
|
if (bResult.done) {
|
|
8431
8888
|
break;
|
|
8432
8889
|
}
|
|
8433
|
-
if (!
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8890
|
+
if (!matchedIndices[matchIndex]
|
|
8891
|
+
&& state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
|
|
8892
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
8893
|
+
break;
|
|
8437
8894
|
}
|
|
8438
8895
|
matchIndex++;
|
|
8439
8896
|
}
|
|
@@ -8447,10 +8904,24 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8447
8904
|
* Whether the TypedArray instances are equal in value.
|
|
8448
8905
|
*/
|
|
8449
8906
|
function areTypedArraysEqual(a, b) {
|
|
8450
|
-
|
|
8451
|
-
if (b.length !== index) {
|
|
8907
|
+
let index = a.length;
|
|
8908
|
+
if (b.length !== index || a.byteOffset !== b.byteOffset) {
|
|
8452
8909
|
return false;
|
|
8453
8910
|
}
|
|
8911
|
+
// Only float-backed views can hold `NaN`, and the additional check needed to treat it as equal
|
|
8912
|
+
// to itself measurably slows the loop, so integer views keep the plain comparison. This is
|
|
8913
|
+
// hoisted out of the loop so the cost is paid once per call rather than once per element.
|
|
8914
|
+
const tag = getTypedArrayTag.call(a);
|
|
8915
|
+
if (tag === 'Float64Array' || tag === 'Float32Array' || tag === 'Float16Array') {
|
|
8916
|
+
while (index-- > 0) {
|
|
8917
|
+
// `NaN` is the only value not equal to itself, and it is treated as equal here to match
|
|
8918
|
+
// the SameValueZero semantics used for every other numeric comparison in the library.
|
|
8919
|
+
if (a[index] !== b[index] && (a[index] === a[index] || b[index] === b[index])) {
|
|
8920
|
+
return false;
|
|
8921
|
+
}
|
|
8922
|
+
}
|
|
8923
|
+
return true;
|
|
8924
|
+
}
|
|
8454
8925
|
while (index-- > 0) {
|
|
8455
8926
|
if (a[index] !== b[index]) {
|
|
8456
8927
|
return false;
|
|
@@ -8458,27 +8929,87 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8458
8929
|
}
|
|
8459
8930
|
return true;
|
|
8460
8931
|
}
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8932
|
+
/**
|
|
8933
|
+
* Whether the URL instances are equal in value.
|
|
8934
|
+
*/
|
|
8935
|
+
function areUrlsEqual(a, b) {
|
|
8936
|
+
// `href` is the normalized serialization of every component, so matching hrefs are equal without
|
|
8937
|
+
// any further work. Only a difference in query parameter ordering can survive a mismatch here.
|
|
8938
|
+
if (a.href === b.href) {
|
|
8939
|
+
return true;
|
|
8940
|
+
}
|
|
8941
|
+
return (a.protocol === b.protocol
|
|
8942
|
+
&& a.username === b.username
|
|
8943
|
+
&& a.password === b.password
|
|
8944
|
+
// `host` covers both the hostname and the port.
|
|
8945
|
+
&& a.host === b.host
|
|
8946
|
+
&& a.pathname === b.pathname
|
|
8947
|
+
&& a.hash === b.hash
|
|
8948
|
+
&& areSearchParamsEqual(a.searchParams, b.searchParams));
|
|
8949
|
+
}
|
|
8950
|
+
/**
|
|
8951
|
+
* Whether the search params passed are equal in value.
|
|
8952
|
+
*
|
|
8953
|
+
* @note
|
|
8954
|
+
* Order is not significant, matching how the other unordered collections in the library are
|
|
8955
|
+
* compared. Repeated keys are, so this is a comparison of multisets rather than of sets:
|
|
8956
|
+
* `a=1&a=2` is equal to `a=2&a=1`, but not to `a=1&a=1`.
|
|
8957
|
+
*/
|
|
8958
|
+
function areSearchParamsEqual(a, b) {
|
|
8959
|
+
const serializedA = a.toString();
|
|
8960
|
+
const serializedB = b.toString();
|
|
8961
|
+
// Identical serializations are equal under any ordering, and this is by far the common case, so
|
|
8962
|
+
// it is worth checking before sorting anything.
|
|
8963
|
+
return serializedA === serializedB || sortSearchParams(serializedA) === sortSearchParams(serializedB);
|
|
8964
|
+
}
|
|
8965
|
+
/**
|
|
8966
|
+
* Reorder a serialized query string so that params holding the same pairs compare as equal
|
|
8967
|
+
* regardless of the order they appear in.
|
|
8968
|
+
*
|
|
8969
|
+
* @note
|
|
8970
|
+
* The serializer percent-encodes `&` and `=` wherever they appear inside a name or a value, so
|
|
8971
|
+
* splitting on `&` recovers exactly the pairs and nothing else.
|
|
8972
|
+
*/
|
|
8973
|
+
function sortSearchParams(serialized) {
|
|
8974
|
+
return serialized.split('&').sort().join('&');
|
|
8975
|
+
}
|
|
8976
|
+
function isReactProperty(a, b, property) {
|
|
8977
|
+
return ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && !!(a.$$typeof || b.$$typeof));
|
|
8978
|
+
}
|
|
8979
|
+
|
|
8980
|
+
const ARRAY_BUFFER_TAG = '[object ArrayBuffer]';
|
|
8981
|
+
const ARGUMENTS_TAG = '[object Arguments]';
|
|
8982
|
+
const BOOLEAN_TAG = '[object Boolean]';
|
|
8983
|
+
const DATA_VIEW_TAG = '[object DataView]';
|
|
8984
|
+
const DATE_TAG = '[object Date]';
|
|
8985
|
+
const ERROR_TAG = '[object Error]';
|
|
8986
|
+
const MAP_TAG = '[object Map]';
|
|
8987
|
+
const NUMBER_TAG = '[object Number]';
|
|
8988
|
+
const OBJECT_TAG = '[object Object]';
|
|
8989
|
+
const REG_EXP_TAG = '[object RegExp]';
|
|
8990
|
+
const SET_TAG = '[object Set]';
|
|
8991
|
+
const STRING_TAG = '[object String]';
|
|
8992
|
+
const TYPED_ARRAY_TAGS = {
|
|
8993
|
+
'[object Int8Array]': true,
|
|
8994
|
+
'[object Uint8Array]': true,
|
|
8995
|
+
'[object Uint8ClampedArray]': true,
|
|
8996
|
+
'[object Int16Array]': true,
|
|
8997
|
+
'[object Uint16Array]': true,
|
|
8998
|
+
'[object Int32Array]': true,
|
|
8999
|
+
'[object Uint32Array]': true,
|
|
9000
|
+
'[object Float16Array]': true,
|
|
9001
|
+
'[object Float32Array]': true,
|
|
9002
|
+
'[object Float64Array]': true,
|
|
9003
|
+
'[object BigInt64Array]': true,
|
|
9004
|
+
'[object BigUint64Array]': true,
|
|
9005
|
+
};
|
|
9006
|
+
const URL_TAG = '[object URL]';
|
|
9007
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
9008
|
+
const toString = Object.prototype.toString;
|
|
8477
9009
|
/**
|
|
8478
9010
|
* Create a comparator method based on the type-specific equality comparators passed.
|
|
8479
9011
|
*/
|
|
8480
|
-
function createEqualityComparator(
|
|
8481
|
-
var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;
|
|
9012
|
+
function createEqualityComparator({ areArrayBuffersEqual, areArraysEqual, areDataViewsEqual, areDatesEqual, areErrorsEqual, areFunctionsEqual, areMapsEqual, areNumbersEqual, areObjectsEqual, arePrimitiveWrappersEqual, areRegExpsEqual, areSetsEqual, areTypedArraysEqual, areUrlsEqual, unknownTagComparators, }) {
|
|
8482
9013
|
/**
|
|
8483
9014
|
* compare the value of the two objects and return true if they are equivalent in values
|
|
8484
9015
|
*/
|
|
@@ -8487,17 +9018,26 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8487
9018
|
if (a === b) {
|
|
8488
9019
|
return true;
|
|
8489
9020
|
}
|
|
8490
|
-
// If the items are
|
|
8491
|
-
//
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
9021
|
+
// If either of the items are nullish and fail the strictly equal check
|
|
9022
|
+
// above, then they must be unequal.
|
|
9023
|
+
if (a == null || b == null) {
|
|
9024
|
+
return false;
|
|
9025
|
+
}
|
|
9026
|
+
const type = typeof a;
|
|
9027
|
+
if (type !== typeof b) {
|
|
9028
|
+
return false;
|
|
9029
|
+
}
|
|
9030
|
+
if (type !== 'object') {
|
|
9031
|
+
if (type === 'number') {
|
|
9032
|
+
return areNumbersEqual(a, b, state);
|
|
9033
|
+
}
|
|
9034
|
+
if (type === 'function') {
|
|
9035
|
+
return areFunctionsEqual(a, b, state);
|
|
9036
|
+
}
|
|
9037
|
+
// If a primitive value that is not strictly equal, it must be unequal.
|
|
9038
|
+
return false;
|
|
8499
9039
|
}
|
|
8500
|
-
|
|
9040
|
+
const constructor = a.constructor;
|
|
8501
9041
|
// Checks are listed in order of commonality of use-case:
|
|
8502
9042
|
// 1. Common complex object types (plain object, array)
|
|
8503
9043
|
// 2. Common data values (date, regexp)
|
|
@@ -8519,14 +9059,9 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8519
9059
|
}
|
|
8520
9060
|
// `isArray()` works on subclasses and is cross-realm, so we can avoid capturing
|
|
8521
9061
|
// the string tag or doing an `instanceof` check.
|
|
8522
|
-
if (isArray(a)) {
|
|
9062
|
+
if (Array.isArray(a)) {
|
|
8523
9063
|
return areArraysEqual(a, b, state);
|
|
8524
9064
|
}
|
|
8525
|
-
// `isTypedArray()` works on all possible TypedArray classes, so we can avoid
|
|
8526
|
-
// capturing the string tag or comparing against all possible constructors.
|
|
8527
|
-
if (isTypedArray != null && isTypedArray(a)) {
|
|
8528
|
-
return areTypedArraysEqual(a, b, state);
|
|
8529
|
-
}
|
|
8530
9065
|
// Try to fast-path equality checks for other complex object types in the
|
|
8531
9066
|
// same realm to avoid capturing the string tag. Strict equality is used
|
|
8532
9067
|
// instead of `instanceof` because it is more performant for the common
|
|
@@ -8544,12 +9079,18 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8544
9079
|
if (constructor === Set) {
|
|
8545
9080
|
return areSetsEqual(a, b, state);
|
|
8546
9081
|
}
|
|
9082
|
+
if (constructor == null) {
|
|
9083
|
+
// Objects with a prototype of `null` are plain objects.
|
|
9084
|
+
return areObjectsEqual(a, b, state);
|
|
9085
|
+
}
|
|
8547
9086
|
// Since this is a custom object, capture the string tag to determing its type.
|
|
8548
9087
|
// This is reasonably performant in modern environments like v8 and SpiderMonkey.
|
|
8549
|
-
|
|
9088
|
+
const tag = toString.call(a);
|
|
8550
9089
|
if (tag === DATE_TAG) {
|
|
8551
9090
|
return areDatesEqual(a, b, state);
|
|
8552
9091
|
}
|
|
9092
|
+
// For RegExp, the properties are not enumerable, and therefore will give false positives if
|
|
9093
|
+
// tested like a standard object.
|
|
8553
9094
|
if (tag === REG_EXP_TAG) {
|
|
8554
9095
|
return areRegExpsEqual(a, b, state);
|
|
8555
9096
|
}
|
|
@@ -8563,20 +9104,51 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8563
9104
|
// The exception for value comparison is custom `Promise`-like class instances. These should
|
|
8564
9105
|
// be treated the same as standard `Promise` objects, which means strict equality, and if
|
|
8565
9106
|
// it reaches this point then that strict equality comparison has already failed.
|
|
8566
|
-
return
|
|
8567
|
-
|
|
8568
|
-
|
|
9107
|
+
return typeof a.then !== 'function' && typeof b.then !== 'function' && areObjectsEqual(a, b, state);
|
|
9108
|
+
}
|
|
9109
|
+
// If a URL tag, it should be tested explicitly. Like RegExp, the properties are not
|
|
9110
|
+
// enumerable, and therefore will give false positives if tested like a standard object.
|
|
9111
|
+
if (tag === URL_TAG) {
|
|
9112
|
+
return areUrlsEqual(a, b, state);
|
|
9113
|
+
}
|
|
9114
|
+
// If an error tag, it should be tested explicitly. Like RegExp, the properties are not
|
|
9115
|
+
// enumerable, and therefore will give false positives if tested like a standard object.
|
|
9116
|
+
if (tag === ERROR_TAG) {
|
|
9117
|
+
return areErrorsEqual(a, b, state);
|
|
8569
9118
|
}
|
|
8570
9119
|
// If an arguments tag, it should be treated as a standard object.
|
|
8571
9120
|
if (tag === ARGUMENTS_TAG) {
|
|
8572
9121
|
return areObjectsEqual(a, b, state);
|
|
8573
9122
|
}
|
|
9123
|
+
if (TYPED_ARRAY_TAGS[tag]) {
|
|
9124
|
+
return areTypedArraysEqual(a, b, state);
|
|
9125
|
+
}
|
|
9126
|
+
if (tag === ARRAY_BUFFER_TAG) {
|
|
9127
|
+
return areArrayBuffersEqual(a, b, state);
|
|
9128
|
+
}
|
|
9129
|
+
if (tag === DATA_VIEW_TAG) {
|
|
9130
|
+
return areDataViewsEqual(a, b, state);
|
|
9131
|
+
}
|
|
8574
9132
|
// As the penultimate fallback, check if the values passed are primitive wrappers. This
|
|
8575
9133
|
// is very rare in modern JS, which is why it is deprioritized compared to all other object
|
|
8576
9134
|
// types.
|
|
8577
9135
|
if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
|
|
8578
9136
|
return arePrimitiveWrappersEqual(a, b, state);
|
|
8579
9137
|
}
|
|
9138
|
+
if (unknownTagComparators) {
|
|
9139
|
+
let unknownTagComparator = unknownTagComparators[tag];
|
|
9140
|
+
if (!unknownTagComparator) {
|
|
9141
|
+
const shortTag = getShortTag(a);
|
|
9142
|
+
if (shortTag) {
|
|
9143
|
+
unknownTagComparator = unknownTagComparators[shortTag];
|
|
9144
|
+
}
|
|
9145
|
+
}
|
|
9146
|
+
// If the custom config has an unknown tag comparator that matches the captured tag or the
|
|
9147
|
+
// @@toStringTag, it is the source of truth for whether the values are equal.
|
|
9148
|
+
if (unknownTagComparator) {
|
|
9149
|
+
return unknownTagComparator(a, b, state);
|
|
9150
|
+
}
|
|
9151
|
+
}
|
|
8580
9152
|
// If not matching any tags that require a specific type of comparison, then we hard-code false because
|
|
8581
9153
|
// the only thing remaining is strict equality, which has already been compared. This is for a few reasons:
|
|
8582
9154
|
// - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only
|
|
@@ -8594,41 +9166,47 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8594
9166
|
/**
|
|
8595
9167
|
* Create the configuration object used for building comparators.
|
|
8596
9168
|
*/
|
|
8597
|
-
function createEqualityComparatorConfig(
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
areArraysEqual: strict
|
|
8601
|
-
|
|
8602
|
-
: areArraysEqual,
|
|
9169
|
+
function createEqualityComparatorConfig({ circular, createCustomConfig, strict, }) {
|
|
9170
|
+
let config = {
|
|
9171
|
+
areArrayBuffersEqual,
|
|
9172
|
+
areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
|
|
9173
|
+
areDataViewsEqual,
|
|
8603
9174
|
areDatesEqual: areDatesEqual,
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
9175
|
+
// `name` / `message` / `stack` / `cause` / `errors` are not enumerable (unless assigned), which is why
|
|
9176
|
+
// errors need a comparator of their own rather than being treated as plain objects. Each variant also
|
|
9177
|
+
// compares the own properties that `Error` subclasses routinely carry (`status`, `code`, ...):
|
|
9178
|
+
// enumerable ones in loose mode, and all of them (via `areObjectsEqualStrict`) in strict mode.
|
|
9179
|
+
areErrorsEqual: strict ? areErrorsEqualStrict : areErrorsEqual,
|
|
9180
|
+
areFunctionsEqual: areFunctionsEqual,
|
|
9181
|
+
areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
|
|
9182
|
+
areNumbersEqual: areNumbersEqual,
|
|
9183
|
+
areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
|
|
8610
9184
|
arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,
|
|
8611
9185
|
areRegExpsEqual: areRegExpsEqual,
|
|
8612
|
-
areSetsEqual: strict
|
|
8613
|
-
? combineComparators(areSetsEqual, areObjectsEqualStrict)
|
|
8614
|
-
: areSetsEqual,
|
|
9186
|
+
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
|
|
8615
9187
|
areTypedArraysEqual: strict
|
|
8616
|
-
? areObjectsEqualStrict
|
|
9188
|
+
? combineComparators(areTypedArraysEqual, areObjectsEqualStrict)
|
|
8617
9189
|
: areTypedArraysEqual,
|
|
9190
|
+
areUrlsEqual: areUrlsEqual,
|
|
9191
|
+
unknownTagComparators: undefined,
|
|
8618
9192
|
};
|
|
8619
9193
|
if (createCustomConfig) {
|
|
8620
|
-
config = assign({}, config, createCustomConfig(config));
|
|
9194
|
+
config = Object.assign({}, config, createCustomConfig(config));
|
|
8621
9195
|
}
|
|
8622
9196
|
if (circular) {
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
9197
|
+
const areArraysEqual = createIsCircular(config.areArraysEqual);
|
|
9198
|
+
// Errors are included because comparing `cause` and own properties by value means an error
|
|
9199
|
+
// that references itself would otherwise recurse without bound.
|
|
9200
|
+
const areErrorsEqual = createIsCircular(config.areErrorsEqual);
|
|
9201
|
+
const areMapsEqual = createIsCircular(config.areMapsEqual);
|
|
9202
|
+
const areObjectsEqual = createIsCircular(config.areObjectsEqual);
|
|
9203
|
+
const areSetsEqual = createIsCircular(config.areSetsEqual);
|
|
9204
|
+
config = Object.assign({}, config, {
|
|
9205
|
+
areArraysEqual,
|
|
9206
|
+
areErrorsEqual,
|
|
9207
|
+
areMapsEqual,
|
|
9208
|
+
areObjectsEqual,
|
|
9209
|
+
areSetsEqual,
|
|
8632
9210
|
});
|
|
8633
9211
|
}
|
|
8634
9212
|
return config;
|
|
@@ -8645,16 +9223,15 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8645
9223
|
/**
|
|
8646
9224
|
* Create the `isEqual` function used by the consuming application.
|
|
8647
9225
|
*/
|
|
8648
|
-
function createIsEqual(
|
|
8649
|
-
var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;
|
|
9226
|
+
function createIsEqual({ circular, comparator, createState, equals, strict }) {
|
|
8650
9227
|
if (createState) {
|
|
8651
9228
|
return function isEqual(a, b) {
|
|
8652
|
-
|
|
9229
|
+
const { cache = circular ? new WeakMap() : undefined, meta } = createState();
|
|
8653
9230
|
return comparator(a, b, {
|
|
8654
|
-
cache
|
|
8655
|
-
equals
|
|
8656
|
-
meta
|
|
8657
|
-
strict
|
|
9231
|
+
cache,
|
|
9232
|
+
equals,
|
|
9233
|
+
meta,
|
|
9234
|
+
strict,
|
|
8658
9235
|
});
|
|
8659
9236
|
};
|
|
8660
9237
|
}
|
|
@@ -8662,17 +9239,17 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8662
9239
|
return function isEqual(a, b) {
|
|
8663
9240
|
return comparator(a, b, {
|
|
8664
9241
|
cache: new WeakMap(),
|
|
8665
|
-
equals
|
|
9242
|
+
equals,
|
|
8666
9243
|
meta: undefined,
|
|
8667
|
-
strict
|
|
9244
|
+
strict,
|
|
8668
9245
|
});
|
|
8669
9246
|
};
|
|
8670
9247
|
}
|
|
8671
|
-
|
|
9248
|
+
const state = {
|
|
8672
9249
|
cache: undefined,
|
|
8673
|
-
equals
|
|
9250
|
+
equals,
|
|
8674
9251
|
meta: undefined,
|
|
8675
|
-
strict
|
|
9252
|
+
strict,
|
|
8676
9253
|
};
|
|
8677
9254
|
return function isEqual(a, b) {
|
|
8678
9255
|
return comparator(a, b, state);
|
|
@@ -8682,50 +9259,50 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8682
9259
|
/**
|
|
8683
9260
|
* Whether the items passed are deeply-equal in value.
|
|
8684
9261
|
*/
|
|
8685
|
-
|
|
9262
|
+
const deepEqual = createCustomEqual();
|
|
8686
9263
|
/**
|
|
8687
9264
|
* Whether the items passed are deeply-equal in value based on strict comparison.
|
|
8688
9265
|
*/
|
|
8689
|
-
|
|
9266
|
+
const strictDeepEqual = createCustomEqual({ strict: true });
|
|
8690
9267
|
/**
|
|
8691
9268
|
* Whether the items passed are deeply-equal in value, including circular references.
|
|
8692
9269
|
*/
|
|
8693
|
-
|
|
9270
|
+
const circularDeepEqual = createCustomEqual({ circular: true });
|
|
8694
9271
|
/**
|
|
8695
9272
|
* Whether the items passed are deeply-equal in value, including circular references,
|
|
8696
9273
|
* based on strict comparison.
|
|
8697
9274
|
*/
|
|
8698
|
-
|
|
9275
|
+
const strictCircularDeepEqual = createCustomEqual({
|
|
8699
9276
|
circular: true,
|
|
8700
9277
|
strict: true,
|
|
8701
9278
|
});
|
|
8702
9279
|
/**
|
|
8703
9280
|
* Whether the items passed are shallowly-equal in value.
|
|
8704
9281
|
*/
|
|
8705
|
-
|
|
8706
|
-
createInternalComparator:
|
|
9282
|
+
const shallowEqual = createCustomEqual({
|
|
9283
|
+
createInternalComparator: () => sameValueZeroEqual,
|
|
8707
9284
|
});
|
|
8708
9285
|
/**
|
|
8709
9286
|
* Whether the items passed are shallowly-equal in value based on strict comparison
|
|
8710
9287
|
*/
|
|
8711
|
-
|
|
9288
|
+
const strictShallowEqual = createCustomEqual({
|
|
8712
9289
|
strict: true,
|
|
8713
|
-
createInternalComparator:
|
|
9290
|
+
createInternalComparator: () => sameValueZeroEqual,
|
|
8714
9291
|
});
|
|
8715
9292
|
/**
|
|
8716
9293
|
* Whether the items passed are shallowly-equal in value, including circular references.
|
|
8717
9294
|
*/
|
|
8718
|
-
|
|
9295
|
+
const circularShallowEqual = createCustomEqual({
|
|
8719
9296
|
circular: true,
|
|
8720
|
-
createInternalComparator:
|
|
9297
|
+
createInternalComparator: () => sameValueZeroEqual,
|
|
8721
9298
|
});
|
|
8722
9299
|
/**
|
|
8723
9300
|
* Whether the items passed are shallowly-equal in value, including circular references,
|
|
8724
9301
|
* based on strict comparison.
|
|
8725
9302
|
*/
|
|
8726
|
-
|
|
9303
|
+
const strictCircularShallowEqual = createCustomEqual({
|
|
8727
9304
|
circular: true,
|
|
8728
|
-
createInternalComparator:
|
|
9305
|
+
createInternalComparator: () => sameValueZeroEqual,
|
|
8729
9306
|
strict: true,
|
|
8730
9307
|
});
|
|
8731
9308
|
/**
|
|
@@ -8736,15 +9313,14 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8736
9313
|
* support for legacy environments that do not support expected features like
|
|
8737
9314
|
* `RegExp.prototype.flags` out of the box.
|
|
8738
9315
|
*/
|
|
8739
|
-
function createCustomEqual(options) {
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
var equals = createCustomInternalComparator
|
|
9316
|
+
function createCustomEqual(options = {}) {
|
|
9317
|
+
const { circular = false, createInternalComparator: createCustomInternalComparator, createState, strict = false, } = options;
|
|
9318
|
+
const config = createEqualityComparatorConfig(options);
|
|
9319
|
+
const comparator = createEqualityComparator(config);
|
|
9320
|
+
const equals = createCustomInternalComparator
|
|
8745
9321
|
? createCustomInternalComparator(comparator)
|
|
8746
9322
|
: createInternalEqualityComparator(comparator);
|
|
8747
|
-
return createIsEqual({ circular
|
|
9323
|
+
return createIsEqual({ circular, comparator, createState, equals, strict });
|
|
8748
9324
|
}
|
|
8749
9325
|
|
|
8750
9326
|
exports.circularDeepEqual = circularDeepEqual;
|
|
@@ -8759,51 +9335,1875 @@ var umd = domContextHooks_module.createCommonjsModule(function (module, exports)
|
|
|
8759
9335
|
exports.strictShallowEqual = strictShallowEqual;
|
|
8760
9336
|
|
|
8761
9337
|
}));
|
|
9338
|
+
//# sourceMappingURL=index.js.map
|
|
9339
|
+
});
|
|
9340
|
+
|
|
9341
|
+
var __create = Object.create;
|
|
9342
|
+
var __defProp = Object.defineProperty;
|
|
9343
|
+
var __defProps = Object.defineProperties;
|
|
9344
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9345
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9346
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9347
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9348
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9349
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9350
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9351
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9352
|
+
var __spreadValues = (a, b) => {
|
|
9353
|
+
for (var prop in b || (b = {}))
|
|
9354
|
+
if (__hasOwnProp.call(b, prop))
|
|
9355
|
+
__defNormalProp(a, prop, b[prop]);
|
|
9356
|
+
if (__getOwnPropSymbols)
|
|
9357
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
9358
|
+
if (__propIsEnum.call(b, prop))
|
|
9359
|
+
__defNormalProp(a, prop, b[prop]);
|
|
9360
|
+
}
|
|
9361
|
+
return a;
|
|
9362
|
+
};
|
|
9363
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
9364
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9365
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9366
|
+
};
|
|
9367
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9368
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9369
|
+
for (let key of __getOwnPropNames(from))
|
|
9370
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9371
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9372
|
+
}
|
|
9373
|
+
return to;
|
|
9374
|
+
};
|
|
9375
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
9376
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
9377
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
9378
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
9379
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
9380
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
9381
|
+
mod
|
|
9382
|
+
));
|
|
9383
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9384
|
+
|
|
9385
|
+
// node_modules/ms/index.js
|
|
9386
|
+
var require_ms = __commonJS({
|
|
9387
|
+
"node_modules/ms/index.js"(exports, module) {
|
|
9388
|
+
var s = 1e3;
|
|
9389
|
+
var m = s * 60;
|
|
9390
|
+
var h = m * 60;
|
|
9391
|
+
var d = h * 24;
|
|
9392
|
+
var w = d * 7;
|
|
9393
|
+
var y = d * 365.25;
|
|
9394
|
+
module.exports = function(val, options) {
|
|
9395
|
+
options = options || {};
|
|
9396
|
+
var type = typeof val;
|
|
9397
|
+
if (type === "string" && val.length > 0) {
|
|
9398
|
+
return parse3(val);
|
|
9399
|
+
} else if (type === "number" && isFinite(val)) {
|
|
9400
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
9401
|
+
}
|
|
9402
|
+
throw new Error(
|
|
9403
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
9404
|
+
);
|
|
9405
|
+
};
|
|
9406
|
+
function parse3(str) {
|
|
9407
|
+
str = String(str);
|
|
9408
|
+
if (str.length > 100) {
|
|
9409
|
+
return;
|
|
9410
|
+
}
|
|
9411
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
9412
|
+
str
|
|
9413
|
+
);
|
|
9414
|
+
if (!match) {
|
|
9415
|
+
return;
|
|
9416
|
+
}
|
|
9417
|
+
var n = parseFloat(match[1]);
|
|
9418
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
9419
|
+
switch (type) {
|
|
9420
|
+
case "years":
|
|
9421
|
+
case "year":
|
|
9422
|
+
case "yrs":
|
|
9423
|
+
case "yr":
|
|
9424
|
+
case "y":
|
|
9425
|
+
return n * y;
|
|
9426
|
+
case "weeks":
|
|
9427
|
+
case "week":
|
|
9428
|
+
case "w":
|
|
9429
|
+
return n * w;
|
|
9430
|
+
case "days":
|
|
9431
|
+
case "day":
|
|
9432
|
+
case "d":
|
|
9433
|
+
return n * d;
|
|
9434
|
+
case "hours":
|
|
9435
|
+
case "hour":
|
|
9436
|
+
case "hrs":
|
|
9437
|
+
case "hr":
|
|
9438
|
+
case "h":
|
|
9439
|
+
return n * h;
|
|
9440
|
+
case "minutes":
|
|
9441
|
+
case "minute":
|
|
9442
|
+
case "mins":
|
|
9443
|
+
case "min":
|
|
9444
|
+
case "m":
|
|
9445
|
+
return n * m;
|
|
9446
|
+
case "seconds":
|
|
9447
|
+
case "second":
|
|
9448
|
+
case "secs":
|
|
9449
|
+
case "sec":
|
|
9450
|
+
case "s":
|
|
9451
|
+
return n * s;
|
|
9452
|
+
case "milliseconds":
|
|
9453
|
+
case "millisecond":
|
|
9454
|
+
case "msecs":
|
|
9455
|
+
case "msec":
|
|
9456
|
+
case "ms":
|
|
9457
|
+
return n;
|
|
9458
|
+
default:
|
|
9459
|
+
return void 0;
|
|
9460
|
+
}
|
|
9461
|
+
}
|
|
9462
|
+
function fmtShort(ms) {
|
|
9463
|
+
var msAbs = Math.abs(ms);
|
|
9464
|
+
if (msAbs >= d) {
|
|
9465
|
+
return Math.round(ms / d) + "d";
|
|
9466
|
+
}
|
|
9467
|
+
if (msAbs >= h) {
|
|
9468
|
+
return Math.round(ms / h) + "h";
|
|
9469
|
+
}
|
|
9470
|
+
if (msAbs >= m) {
|
|
9471
|
+
return Math.round(ms / m) + "m";
|
|
9472
|
+
}
|
|
9473
|
+
if (msAbs >= s) {
|
|
9474
|
+
return Math.round(ms / s) + "s";
|
|
9475
|
+
}
|
|
9476
|
+
return ms + "ms";
|
|
9477
|
+
}
|
|
9478
|
+
function fmtLong(ms) {
|
|
9479
|
+
var msAbs = Math.abs(ms);
|
|
9480
|
+
if (msAbs >= d) {
|
|
9481
|
+
return plural(ms, msAbs, d, "day");
|
|
9482
|
+
}
|
|
9483
|
+
if (msAbs >= h) {
|
|
9484
|
+
return plural(ms, msAbs, h, "hour");
|
|
9485
|
+
}
|
|
9486
|
+
if (msAbs >= m) {
|
|
9487
|
+
return plural(ms, msAbs, m, "minute");
|
|
9488
|
+
}
|
|
9489
|
+
if (msAbs >= s) {
|
|
9490
|
+
return plural(ms, msAbs, s, "second");
|
|
9491
|
+
}
|
|
9492
|
+
return ms + " ms";
|
|
9493
|
+
}
|
|
9494
|
+
function plural(ms, msAbs, n, name) {
|
|
9495
|
+
var isPlural = msAbs >= n * 1.5;
|
|
9496
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
9497
|
+
}
|
|
9498
|
+
}
|
|
9499
|
+
});
|
|
9500
|
+
|
|
9501
|
+
// node_modules/debug/src/common.js
|
|
9502
|
+
var require_common = __commonJS({
|
|
9503
|
+
"node_modules/debug/src/common.js"(exports, module) {
|
|
9504
|
+
function setup(env) {
|
|
9505
|
+
createDebug.debug = createDebug;
|
|
9506
|
+
createDebug.default = createDebug;
|
|
9507
|
+
createDebug.coerce = coerce;
|
|
9508
|
+
createDebug.disable = disable;
|
|
9509
|
+
createDebug.enable = enable;
|
|
9510
|
+
createDebug.enabled = enabled;
|
|
9511
|
+
createDebug.humanize = require_ms();
|
|
9512
|
+
createDebug.destroy = destroy;
|
|
9513
|
+
Object.keys(env).forEach((key) => {
|
|
9514
|
+
createDebug[key] = env[key];
|
|
9515
|
+
});
|
|
9516
|
+
createDebug.names = [];
|
|
9517
|
+
createDebug.skips = [];
|
|
9518
|
+
createDebug.formatters = {};
|
|
9519
|
+
function selectColor(namespace) {
|
|
9520
|
+
let hash = 0;
|
|
9521
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
9522
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
9523
|
+
hash |= 0;
|
|
9524
|
+
}
|
|
9525
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
9526
|
+
}
|
|
9527
|
+
createDebug.selectColor = selectColor;
|
|
9528
|
+
function createDebug(namespace) {
|
|
9529
|
+
let prevTime;
|
|
9530
|
+
let enableOverride = null;
|
|
9531
|
+
let namespacesCache;
|
|
9532
|
+
let enabledCache;
|
|
9533
|
+
function debug3(...args) {
|
|
9534
|
+
if (!debug3.enabled) {
|
|
9535
|
+
return;
|
|
9536
|
+
}
|
|
9537
|
+
const self = debug3;
|
|
9538
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
9539
|
+
const ms = curr - (prevTime || curr);
|
|
9540
|
+
self.diff = ms;
|
|
9541
|
+
self.prev = prevTime;
|
|
9542
|
+
self.curr = curr;
|
|
9543
|
+
prevTime = curr;
|
|
9544
|
+
args[0] = createDebug.coerce(args[0]);
|
|
9545
|
+
if (typeof args[0] !== "string") {
|
|
9546
|
+
args.unshift("%O");
|
|
9547
|
+
}
|
|
9548
|
+
let index = 0;
|
|
9549
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
9550
|
+
if (match === "%%") {
|
|
9551
|
+
return "%";
|
|
9552
|
+
}
|
|
9553
|
+
index++;
|
|
9554
|
+
const formatter = createDebug.formatters[format];
|
|
9555
|
+
if (typeof formatter === "function") {
|
|
9556
|
+
const val = args[index];
|
|
9557
|
+
match = formatter.call(self, val);
|
|
9558
|
+
args.splice(index, 1);
|
|
9559
|
+
index--;
|
|
9560
|
+
}
|
|
9561
|
+
return match;
|
|
9562
|
+
});
|
|
9563
|
+
createDebug.formatArgs.call(self, args);
|
|
9564
|
+
const logFn = self.log || createDebug.log;
|
|
9565
|
+
logFn.apply(self, args);
|
|
9566
|
+
}
|
|
9567
|
+
debug3.namespace = namespace;
|
|
9568
|
+
debug3.useColors = createDebug.useColors();
|
|
9569
|
+
debug3.color = createDebug.selectColor(namespace);
|
|
9570
|
+
debug3.extend = extend;
|
|
9571
|
+
debug3.destroy = createDebug.destroy;
|
|
9572
|
+
Object.defineProperty(debug3, "enabled", {
|
|
9573
|
+
enumerable: true,
|
|
9574
|
+
configurable: false,
|
|
9575
|
+
get: () => {
|
|
9576
|
+
if (enableOverride !== null) {
|
|
9577
|
+
return enableOverride;
|
|
9578
|
+
}
|
|
9579
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
9580
|
+
namespacesCache = createDebug.namespaces;
|
|
9581
|
+
enabledCache = createDebug.enabled(namespace);
|
|
9582
|
+
}
|
|
9583
|
+
return enabledCache;
|
|
9584
|
+
},
|
|
9585
|
+
set: (v) => {
|
|
9586
|
+
enableOverride = v;
|
|
9587
|
+
}
|
|
9588
|
+
});
|
|
9589
|
+
if (typeof createDebug.init === "function") {
|
|
9590
|
+
createDebug.init(debug3);
|
|
9591
|
+
}
|
|
9592
|
+
return debug3;
|
|
9593
|
+
}
|
|
9594
|
+
function extend(namespace, delimiter) {
|
|
9595
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
9596
|
+
newDebug.log = this.log;
|
|
9597
|
+
return newDebug;
|
|
9598
|
+
}
|
|
9599
|
+
function enable(namespaces) {
|
|
9600
|
+
createDebug.save(namespaces);
|
|
9601
|
+
createDebug.namespaces = namespaces;
|
|
9602
|
+
createDebug.names = [];
|
|
9603
|
+
createDebug.skips = [];
|
|
9604
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
9605
|
+
for (const ns of split) {
|
|
9606
|
+
if (ns[0] === "-") {
|
|
9607
|
+
createDebug.skips.push(ns.slice(1));
|
|
9608
|
+
} else {
|
|
9609
|
+
createDebug.names.push(ns);
|
|
9610
|
+
}
|
|
9611
|
+
}
|
|
9612
|
+
}
|
|
9613
|
+
function matchesTemplate(search, template) {
|
|
9614
|
+
let searchIndex = 0;
|
|
9615
|
+
let templateIndex = 0;
|
|
9616
|
+
let starIndex = -1;
|
|
9617
|
+
let matchIndex = 0;
|
|
9618
|
+
while (searchIndex < search.length) {
|
|
9619
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
9620
|
+
if (template[templateIndex] === "*") {
|
|
9621
|
+
starIndex = templateIndex;
|
|
9622
|
+
matchIndex = searchIndex;
|
|
9623
|
+
templateIndex++;
|
|
9624
|
+
} else {
|
|
9625
|
+
searchIndex++;
|
|
9626
|
+
templateIndex++;
|
|
9627
|
+
}
|
|
9628
|
+
} else if (starIndex !== -1) {
|
|
9629
|
+
templateIndex = starIndex + 1;
|
|
9630
|
+
matchIndex++;
|
|
9631
|
+
searchIndex = matchIndex;
|
|
9632
|
+
} else {
|
|
9633
|
+
return false;
|
|
9634
|
+
}
|
|
9635
|
+
}
|
|
9636
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
9637
|
+
templateIndex++;
|
|
9638
|
+
}
|
|
9639
|
+
return templateIndex === template.length;
|
|
9640
|
+
}
|
|
9641
|
+
function disable() {
|
|
9642
|
+
const namespaces = [
|
|
9643
|
+
...createDebug.names,
|
|
9644
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
9645
|
+
].join(",");
|
|
9646
|
+
createDebug.enable("");
|
|
9647
|
+
return namespaces;
|
|
9648
|
+
}
|
|
9649
|
+
function enabled(name) {
|
|
9650
|
+
for (const skip of createDebug.skips) {
|
|
9651
|
+
if (matchesTemplate(name, skip)) {
|
|
9652
|
+
return false;
|
|
9653
|
+
}
|
|
9654
|
+
}
|
|
9655
|
+
for (const ns of createDebug.names) {
|
|
9656
|
+
if (matchesTemplate(name, ns)) {
|
|
9657
|
+
return true;
|
|
9658
|
+
}
|
|
9659
|
+
}
|
|
9660
|
+
return false;
|
|
9661
|
+
}
|
|
9662
|
+
function coerce(val) {
|
|
9663
|
+
if (val instanceof Error) {
|
|
9664
|
+
return val.stack || val.message;
|
|
9665
|
+
}
|
|
9666
|
+
return val;
|
|
9667
|
+
}
|
|
9668
|
+
function destroy() {
|
|
9669
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
9670
|
+
}
|
|
9671
|
+
createDebug.enable(createDebug.load());
|
|
9672
|
+
return createDebug;
|
|
9673
|
+
}
|
|
9674
|
+
module.exports = setup;
|
|
9675
|
+
}
|
|
9676
|
+
});
|
|
8762
9677
|
|
|
9678
|
+
// node_modules/debug/src/browser.js
|
|
9679
|
+
var require_browser = __commonJS({
|
|
9680
|
+
"node_modules/debug/src/browser.js"(exports, module) {
|
|
9681
|
+
exports.formatArgs = formatArgs;
|
|
9682
|
+
exports.save = save;
|
|
9683
|
+
exports.load = load;
|
|
9684
|
+
exports.useColors = useColors;
|
|
9685
|
+
exports.storage = localstorage();
|
|
9686
|
+
exports.destroy = /* @__PURE__ */ (() => {
|
|
9687
|
+
let warned = false;
|
|
9688
|
+
return () => {
|
|
9689
|
+
if (!warned) {
|
|
9690
|
+
warned = true;
|
|
9691
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
9692
|
+
}
|
|
9693
|
+
};
|
|
9694
|
+
})();
|
|
9695
|
+
exports.colors = [
|
|
9696
|
+
"#0000CC",
|
|
9697
|
+
"#0000FF",
|
|
9698
|
+
"#0033CC",
|
|
9699
|
+
"#0033FF",
|
|
9700
|
+
"#0066CC",
|
|
9701
|
+
"#0066FF",
|
|
9702
|
+
"#0099CC",
|
|
9703
|
+
"#0099FF",
|
|
9704
|
+
"#00CC00",
|
|
9705
|
+
"#00CC33",
|
|
9706
|
+
"#00CC66",
|
|
9707
|
+
"#00CC99",
|
|
9708
|
+
"#00CCCC",
|
|
9709
|
+
"#00CCFF",
|
|
9710
|
+
"#3300CC",
|
|
9711
|
+
"#3300FF",
|
|
9712
|
+
"#3333CC",
|
|
9713
|
+
"#3333FF",
|
|
9714
|
+
"#3366CC",
|
|
9715
|
+
"#3366FF",
|
|
9716
|
+
"#3399CC",
|
|
9717
|
+
"#3399FF",
|
|
9718
|
+
"#33CC00",
|
|
9719
|
+
"#33CC33",
|
|
9720
|
+
"#33CC66",
|
|
9721
|
+
"#33CC99",
|
|
9722
|
+
"#33CCCC",
|
|
9723
|
+
"#33CCFF",
|
|
9724
|
+
"#6600CC",
|
|
9725
|
+
"#6600FF",
|
|
9726
|
+
"#6633CC",
|
|
9727
|
+
"#6633FF",
|
|
9728
|
+
"#66CC00",
|
|
9729
|
+
"#66CC33",
|
|
9730
|
+
"#9900CC",
|
|
9731
|
+
"#9900FF",
|
|
9732
|
+
"#9933CC",
|
|
9733
|
+
"#9933FF",
|
|
9734
|
+
"#99CC00",
|
|
9735
|
+
"#99CC33",
|
|
9736
|
+
"#CC0000",
|
|
9737
|
+
"#CC0033",
|
|
9738
|
+
"#CC0066",
|
|
9739
|
+
"#CC0099",
|
|
9740
|
+
"#CC00CC",
|
|
9741
|
+
"#CC00FF",
|
|
9742
|
+
"#CC3300",
|
|
9743
|
+
"#CC3333",
|
|
9744
|
+
"#CC3366",
|
|
9745
|
+
"#CC3399",
|
|
9746
|
+
"#CC33CC",
|
|
9747
|
+
"#CC33FF",
|
|
9748
|
+
"#CC6600",
|
|
9749
|
+
"#CC6633",
|
|
9750
|
+
"#CC9900",
|
|
9751
|
+
"#CC9933",
|
|
9752
|
+
"#CCCC00",
|
|
9753
|
+
"#CCCC33",
|
|
9754
|
+
"#FF0000",
|
|
9755
|
+
"#FF0033",
|
|
9756
|
+
"#FF0066",
|
|
9757
|
+
"#FF0099",
|
|
9758
|
+
"#FF00CC",
|
|
9759
|
+
"#FF00FF",
|
|
9760
|
+
"#FF3300",
|
|
9761
|
+
"#FF3333",
|
|
9762
|
+
"#FF3366",
|
|
9763
|
+
"#FF3399",
|
|
9764
|
+
"#FF33CC",
|
|
9765
|
+
"#FF33FF",
|
|
9766
|
+
"#FF6600",
|
|
9767
|
+
"#FF6633",
|
|
9768
|
+
"#FF9900",
|
|
9769
|
+
"#FF9933",
|
|
9770
|
+
"#FFCC00",
|
|
9771
|
+
"#FFCC33"
|
|
9772
|
+
];
|
|
9773
|
+
function useColors() {
|
|
9774
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
9775
|
+
return true;
|
|
9776
|
+
}
|
|
9777
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
9778
|
+
return false;
|
|
9779
|
+
}
|
|
9780
|
+
let m;
|
|
9781
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
9782
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
9783
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
9784
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
9785
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
9786
|
+
}
|
|
9787
|
+
function formatArgs(args) {
|
|
9788
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
9789
|
+
if (!this.useColors) {
|
|
9790
|
+
return;
|
|
9791
|
+
}
|
|
9792
|
+
const c = "color: " + this.color;
|
|
9793
|
+
args.splice(1, 0, c, "color: inherit");
|
|
9794
|
+
let index = 0;
|
|
9795
|
+
let lastC = 0;
|
|
9796
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
9797
|
+
if (match === "%%") {
|
|
9798
|
+
return;
|
|
9799
|
+
}
|
|
9800
|
+
index++;
|
|
9801
|
+
if (match === "%c") {
|
|
9802
|
+
lastC = index;
|
|
9803
|
+
}
|
|
9804
|
+
});
|
|
9805
|
+
args.splice(lastC, 0, c);
|
|
9806
|
+
}
|
|
9807
|
+
exports.log = console.debug || console.log || (() => {
|
|
9808
|
+
});
|
|
9809
|
+
function save(namespaces) {
|
|
9810
|
+
try {
|
|
9811
|
+
if (namespaces) {
|
|
9812
|
+
exports.storage.setItem("debug", namespaces);
|
|
9813
|
+
} else {
|
|
9814
|
+
exports.storage.removeItem("debug");
|
|
9815
|
+
}
|
|
9816
|
+
} catch (error) {
|
|
9817
|
+
}
|
|
9818
|
+
}
|
|
9819
|
+
function load() {
|
|
9820
|
+
let r;
|
|
9821
|
+
try {
|
|
9822
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
9823
|
+
} catch (error) {
|
|
9824
|
+
}
|
|
9825
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
9826
|
+
r = process.env.DEBUG;
|
|
9827
|
+
}
|
|
9828
|
+
return r;
|
|
9829
|
+
}
|
|
9830
|
+
function localstorage() {
|
|
9831
|
+
try {
|
|
9832
|
+
return localStorage;
|
|
9833
|
+
} catch (error) {
|
|
9834
|
+
}
|
|
9835
|
+
}
|
|
9836
|
+
module.exports = require_common()(exports);
|
|
9837
|
+
var { formatters } = module.exports;
|
|
9838
|
+
formatters.j = function(v) {
|
|
9839
|
+
try {
|
|
9840
|
+
return JSON.stringify(v);
|
|
9841
|
+
} catch (error) {
|
|
9842
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
9843
|
+
}
|
|
9844
|
+
};
|
|
9845
|
+
}
|
|
8763
9846
|
});
|
|
8764
9847
|
|
|
8765
|
-
var N={current:void 0};function _(){if(void 0===N.current)throw new Error("no implementation of useHost provided");return N.current()}function U(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");N.current=e;}function L(){lazilyStartLocaleContext();var t=_();return domContextHooks_module.h(t,LOCALE_CONTEXT_NAME)}function H(){lazilyStartProgramContext();var e=_();return domContextHooks_module.h(e,PROGRAM_CONTEXT_NAME)}function G(){var e;return null==(e=J())?void 0:e.jwt}function J(){lazilyStartUserContext();var e=_(),n=domContextHooks_module.h(e,USER_CONTEXT_NAME),t=userIdentityFromJwt(null==n?void 0:n.jwt);if(isDemo()||!n||t)return n;setUserIdentity(void 0);}var Q=getTenantAlias,z=getAppDomain,B=getEngagementMedium;function K(){return (K=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);}return e}).apply(this,arguments)}function Z(e,n){return (Z=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function X(e,n){return n||(n=e.slice(0)),e.raw=n,e}function Y(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ee(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return "Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return (t=e[Symbol.iterator]()).next.bind(t)}var ne=function(){return (ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var a in n=arguments[t])Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);return e}).apply(this,arguments)},te=new Map,re=new Map,ae=!0,oe=!1;function ie(e){return e.replace(/[\s,]+/g," ").trim()}function se(e){var n,t,r,a=ie(e);if(!te.has(a)){var o=parse(e,{experimentalFragmentVariables:oe});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");te.set(a,function(e){var n=new Set(e.definitions);n.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&n.add(r);});});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}((n=o,t=new Set,r=[],n.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,a=ie((i=e.loc).source.body.substring(i.start,i.end)),o=re.get(n);o&&!o.has(a)?ae&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||re.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),ne(ne({},n),{definitions:r}))));}return te.get(a)}function ue(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var r=e[0];return n.forEach(function(n,t){r+=n&&"Document"===n.kind?n.loc.source.body:n,r+=e[t+1];}),se(r)}var ce,de=ue;(ce=ue||(ue={})).gql=de,ce.resetCaches=function(){te.clear(),re.clear();},ce.disableFragmentWarnings=function(){ae=!1;},ce.enableExperimentalFragmentVariables=function(){oe=!0;},ce.disableExperimentalFragmentVariables=function(){oe=!1;},ue.default=ue;var le=ue;function fe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var me=function(e){var n,t;function r(n,t){var r;(r=e.call(this,n,t)||this).subject=new Subject;var a=new Subject;return r.subject.pipe(bufferTime(200,void 0,10)).subscribe(function(e){try{if(!e.length)return Promise.resolve();for(var n,t=pe(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=ee(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(fe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){be(e,s);})},function(e){if(e instanceof types.ClientError){var n=function(){var n=e.response,t=n.data,r=n.errors;if(!t)return {v:Ie(s,e)};for(var a,o=Object.keys(t),i=[].concat(s),u=function(){var n=a.value,t=void 0;n.path.find(function(r,a,s){if(o.includes(r)){var u=he(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(o.indexOf(r),1),t=i.splice(c,1)[0];var d=ye(e.response.data,t);s[a]=ge(s[a],u);var l=t.query,f=t.variables,m=K({},e.response,{errors:[n],data:d,path:s}),v=new types.ClientError(m,{query:"string"!=typeof l?print(l):l,variables:f});return we(t,v),!0}return !1});},c=ee(r);!(a=c()).done;)u();be(t,i);}();if("object"==typeof n)return n.v}else Ie(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=fe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Ce(n,e);})},function(n){we(e,n);});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}),r}t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,Z(n,t);var a=r.prototype;return a.superRequest=function(n,t){return e.prototype.request.call(this,n,t)},a.request=function(e,n,t){var r=this;return new Promise(function(a,o){var i={query:e,variables:n,id:ve(),options:t,resolve:a,reject:o};r.subject.next(i);})},r}(dist$1.GraphQLClient),ve=function(){return nanoid().replace(/[-_]/g,"")},ge=function(e,n){return e.replace("_"+n,"")},he=function(e){var n=e.split("_");return n[n.length-1]},pe=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id,s=r.options;if(null==s||!s.batch)return t.push(r),e;try{var u="string"==typeof a?parse(a):a,c=u.definitions.find(function(e){return "FragmentDefinition"===e.kind}),d="string"==typeof a?a:print(a),l=/@/.test(d);if(c||l)return t.push(r),e;var f=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(u,[o],f,f),n.push(r),e}catch(n){return t.push(r),e}},M("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},ye=function(e,n){if(!e)return e;var t=Object.keys(e),r=n.id;return t.reduce(function(n,t){var a;return t.endsWith(r)&&(n=K({},n,((a={})[ge(t,r)]=e[t],a))),n},{})},Ce=function(e,n){(0, n.resolve)(e);},be=function(e,n){for(var t,r=ee(n);!(t=r()).done;){var a=t.value,o=ye(e,a);a.resolve(o);}},we=function(e,n){(0, e.reject)(n);},Ie=function(e,n){for(var t,r=ee(e);!(t=r()).done;)(0, t.value.reject)(n);},Pe="sq:graphql-client",Ee=src(function(e,n,t){return new me(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Fe(e,n){switch(n.type){case"loading":return {data:void 0,errors:void 0,loading:!0};case"data":return {data:n.payload,errors:void 0,loading:!1};case"errors":return {data:void 0,errors:n.payload,loading:!1}}}function Me(e,n,t){void 0===t&&(t={batch:!0});var r,a,o,i,s,u,c=(r=G(),a=z(),o=Q(),i=Ee(a,o,r),s=_(),null!=(u=domContextHooks_module.h(s,"sq:graphql-client",{attempts:0}))?u:i),d=domContextHooks_module.useReducer(Fe,n),l=d[1];return [d[0],useCallback(function(n,r){void 0===r&&(r=!1);try{if(!c){var a=new Error("No GraphQL client found");return l({type:"errors",payload:a}),Promise.resolve(a)}return Promise.resolve(function(a,o){try{var i=(r||l({type:"loading"}),Promise.resolve(c.request(e,n,t)).then(function(e){return l({type:"data",payload:e}),e}));}catch(e){return o(e)}return i&&i.then?i.then(void 0,o):i}(0,function(e){return l({type:"errors",payload:e}),e}))}catch(e){return Promise.reject(e)}},[c,e,l])]}var De,Se={loading:!1,data:void 0,errors:void 0};function $e(e){var n=Me(e,Se);return [n[1],n[0]]}var ke,Ae=le(De||(De=X(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function je(){var e=$e(Ae),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithEmailAndPassword){var n=e.authenticateManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:e.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.authenticateManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var qe,Re=le(ke||(ke=X(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Ve(){var e=$e(Re),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.registerManagedIdentityWithEmailAndPassword){var n=e.registerManagedIdentityWithEmailAndPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.registerManagedIdentityWithEmailAndPassword.email,emailVerified:e.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:e.registerManagedIdentityWithEmailAndPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var xe,We=le(qe||(qe=X(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function Oe(){var e=$e(We),n=e[0],t=e[1],r=t.loading,a=t.data,o=t.errors,i=domContextHooks_module.useState(null),s=i[1];return [function(e){try{return s(null),Promise.resolve(n(e)).then(function(e){var n,t,r,a;if(e instanceof Error)return e;var o=null==(n=e.submitForm)||null==(t=n.results)?void 0:t.find(function(e){var n;return "identity"===(null==e||null==(n=e.formHandler)?void 0:n.namespace)});if(o&&null!=(r=o.result)&&null!=(a=r.results)&&a.length){var i=o.result.results[0];if(i.success){var c=i.data.token,d=o$1(c).user;setUserIdentity({jwt:c,id:d.id,accountId:d.accountId,managedIdentity:{email:i.data.email,emailVerified:i.data.emailVerified,sessionData:i.data.sessionData}});}else s(i.message);}return e})}catch(e){return Promise.reject(e)}},{loading:r,data:a,errors:o,formError:i[0]}]}var Ne,_e=le(xe||(xe=X(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(_e),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Le,He=le(Ne||(Ne=X(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Te(){var e=$e(He),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.resetManagedIdentityPassword){var n=e.resetManagedIdentityPassword.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.resetManagedIdentityPassword.email,emailVerified:e.resetManagedIdentityPassword.emailVerified,sessionData:e.resetManagedIdentityPassword.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}var Ge=le(Le||(Le=X(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Je(){return $e(Ge)}function Qe(){var e=_();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function ze(e){var n=e.skip,t=void 0!==n&&n,r=e.update,a=e.variables;domContextHooks_module.useEffect(function(){var e=function(e){!t&&r(a,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=domContextHooks_module.useRef(e),t=domContextHooks_module.useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),domContextHooks_module.useMemo(function(){return n.current},[t.current])}([a,r,t]));}var Be,Ke={loading:!1,data:void 0,errors:void 0},Ze=Symbol();function Xe(e){var n=Me(e,Ke),t=n[0],r=n[1],a=domContextHooks_module.useRef(Ze);ze({skip:a.current===Ze,update:r,variables:a.current});var o=useCallback(function(e){return a.current=e,r(e)},[r]);return [r,K({},t,{refetch:o})]}var Ye,en=le(Be||(Be=X(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function nn(){var e=J(),n=Xe(en),t=n[0],r=n[1],a=r.refetch,o=function(n){n instanceof Error||!n.managedIdentitySession||setUserIdentity(K({},e,{managedIdentity:n.managedIdentitySession}));};return [function(){try{return Promise.resolve(t({})).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}},{loading:r.loading,data:r.data,errors:r.errors,refetch:function(){try{return Promise.resolve(a()).then(function(e){return o(e),e})}catch(e){return Promise.reject(e)}}}]}var tn,rn=le(Ye||(Ye=X(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function an(){var e=nn()[0],n=$e(rn),t=n[0],r=n[1];return [function(n){try{return Promise.resolve(t(n)).then(function(n){var t=function(){if(!(n instanceof Error)&&n.verifyManagedIdentityEmail.success)return Promise.resolve(e()).then(function(){})}();return t&&t.then?t.then(function(){return n}):n})}catch(n){return Promise.reject(n)}},{loading:r.loading,data:r.data,errors:r.errors}]}var on,sn=le(tn||(tn=X(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function un(){return $e(sn)}var cn,dn=le(on||(on=X(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function ln(){return $e(dn)}var fn,mn=le(cn||(cn=X(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function vn(){var e=H(),n=getEnvironment(),t=$e(mn),r=t[0],a=t[1];return [function(t){try{return Promise.resolve(r(t)).then(function(t){var r=function(){if(!(t instanceof Error)&&t.authenticateManagedIdentityWithInstantAccess)return Promise.resolve(function(e,n){try{return Promise.resolve(function(t,r){try{var a=Promise.resolve(fetch(getAppDomain()+"/api/v1/"+getTenantAlias()+"/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify({query:"\n query checkReferralFraudStatus($programId: ID) {\n viewer {\n ... on User {\n id\n instantAccessRewards(filter: { programId_eq: $programId }) {\n data {\n id\n pendingReasons\n cancelledReason\n }\n }\n }\n }\n }\n",variables:{programId:e}})})).then(function(e){if(!e.ok)throw new Error("Failed to fetch locale");return Promise.resolve(e.json()).then(function(e){var n;if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));var t=(null==(n=e.data.viewer.instantAccessRewards)?void 0:n.data)||[];return t.some(function(e){return "SUSPECTED_FRAUD"===e.cancelledReason})?"DENIED":t.some(function(e){var n;return null==(n=e.pendingReasons)?void 0:n.includes("SUSPECTED_FRAUD")})?"PENDING_REVIEW":"APPROVED"})});}catch(e){return r(e)}return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e);}))}catch(e){return Promise.reject(e)}}(e,t.authenticateManagedIdentityWithInstantAccess.token)).then(function(e){if("APPROVED"!==e)throw {name:"fraud_error",message:"Referral flagged as fraud."};var r=t.authenticateManagedIdentityWithInstantAccess.email;if(setUserIdentity({jwt:t.authenticateManagedIdentityWithInstantAccess.token,id:r,accountId:r}),"SquatchJS2"===n){var a=new CustomEvent("sq:user-registration",{bubbles:!0,detail:{userId:r,accountId:r}});document.dispatchEvent(a);}})}();return r&&r.then?r.then(function(e){return t}):t})}catch(e){return Promise.reject(e)}},{loading:a.loading,data:a.data,errors:a.errors}]}var gn=dist$1.gql(fn||(fn=X(["\n mutation authenticateManagedIdentityWithGoogle($idToken: String!) {\n authenticateManagedIdentityWithGoogle(\n authenticateManagedIdentityWithGoogleInput: { idToken: $idToken }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function hn(){var e=$e(gn),n=e[0],t=e[1];return [function(e){try{return Promise.resolve(n(e)).then(function(e){if(!(e instanceof Error)&&e.authenticateManagedIdentityWithGoogle){var n=e.authenticateManagedIdentityWithGoogle.token,t=o$1(n).user;setUserIdentity({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.authenticateManagedIdentityWithGoogle.email,emailVerified:e.authenticateManagedIdentityWithGoogle.emailVerified,sessionData:e.authenticateManagedIdentityWithGoogle.sessionData}});}return e})}catch(e){return Promise.reject(e)}},{loading:t.loading,data:t.data,errors:t.errors}]}function pn(e,n){var t=domContextHooks_module.useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function yn(){return domContextHooks_module.useReducer(function(e){return e+1},0)}function Cn(e){for(var n,t=ee(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&Cn(r);}return Object.freeze(e)}var bn={loading:!0,data:void 0,errors:void 0};function wn(e,n,t,r){var a=Me(e,bn,K({batch:!0},r||{})),o=a[0],i=a[1],s=yn(),u=s[1];return pn(function(){!t&&i(n);},[e,n,i,s[0],t]),ze({skip:t,update:i,variables:n}),Cn(K({},o,{refetch:u}))}function In(e){var n=_(),t=domContextHooks_module.y(n,Mn(e.namespace),e.initialValue),r=t[0],a=t[1];return domContextHooks_module.y(n,Dn(e.namespace),[r,a]),[r,a]}function Pn(e){var n=domContextHooks_module.d(Dn(e)),t=domContextHooks_module.d(Mn(e));return n?[t,n[1]]:[void 0,void 0]}function En(e){var n=domContextHooks_module.d(Dn(e));if(n)return n[1]}function Fn(e){return domContextHooks_module.d(Mn(e))}function Mn(e){return e+"-value"}function Dn(e){return e+"-state"}function Sn(e){var n=_(),t=wn(e.query,e.variables||{},e.skip,K({batch:!0},e.options||{})),r=domContextHooks_module.y(n,Mn(e.namespace),t),a=r[0],o=r[1];return domContextHooks_module.useEffect(function(){umd.deepEqual(t,a)||o(t);},[t,a]),t}function $n(e){return domContextHooks_module.d(Mn(e))||{data:null,loading:!0,refetch:function(){return console.warn("component still loading")}}}function kn(){var e=yn()[1];return domContextHooks_module.useEffect(function(){return history_default.listen(function(){e();})},[]),history_default.location}var An,jn=history_default;function qn(e){var n=domContextHooks_module.useState({limit:e.limit,offset:e.offset}),t=n[0],r=n[1],a=t.offset,o=t.limit,i=function(e,n){return e*n},s=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=s(a,e),o=i(e,n);r(K({},t,{limit:e,offset:o}));},offset:a,setCurrentPage:function(e){var n=i(e,o);r(function(e){return K({},e,{offset:n})});},calculatePagination:function(e,n){var t=s(a,o),r=function(e,n){return Math.ceil(e/n)||0}(n,o),i=0===e?"0":e>1?a+1+"-"+(a+e):""+(a+1);return {currentPage:t,pageCount:r,rangeOnPage:i,pageProgress:i+" of "+n}}}}function Rn(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=qn(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=wn(e,K({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),h=d((null==g||null==(o=g.data)?void 0:o.length)||0,(null==g?void 0:g.totalCount)||0);return {envelope:g,states:{errors:m,loading:f,limit:s,currentPage:h.currentPage,pageCount:h.pageCount,pageProgress:h.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var On=dist$1.gql(An||(An=X(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var _n=1e3,Un=60*_n,Ln=60*Un,Hn=24*Ln,Tn=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*Hn;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Ln;case"minutes":case"minute":case"mins":case"min":case"m":return t*Un;case"seconds":case"second":case"secs":case"sec":case"s":return t*_n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);return n>=Hn?Gn(e,n,Hn,"day"):n>=Ln?Gn(e,n,Ln,"hour"):n>=Un?Gn(e,n,Un,"minute"):n>=_n?Gn(e,n,_n,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=Hn?Math.round(e/Hn)+"d":n>=Ln?Math.round(e/Ln)+"h":n>=Un?Math.round(e/Un)+"m":n>=_n?Math.round(e/_n)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Gn(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var Jn,Qn,zn,Bn,Kn,Zn=(function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let r=0,a=0;n[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(a=r));}),n.splice(a,0,t);},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug");}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug");}catch(e){}return !e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.useColors=function(){return !("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage=function(){try{return localStorage}catch(e){}}(),n.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),e.exports=function(e){function n(e){let r,a=null;function o(...e){if(!o.enabled)return;const t=o,a=Number(new Date);t.diff=a-(r||a),t.prev=r,t.curr=a,r=a,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,a)=>{if("%%"===r)return "%";i++;const o=n.formatters[a];return "function"==typeof o&&(r=o.call(t,e[i]),e.splice(i,1),i--),r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e);}return o.namespace=e,o.useColors=n.useColors(),o.color=n.selectColor(e),o.extend=t,o.destroy=n.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===a?n.enabled(e):a,set:e=>{a=e;}}),"function"==typeof n.init&&n.init(o),o}function t(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(r),...n.skips.map(r).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length;for(t=0;t<a;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));},n.enabled=function(e){if("*"===e[e.length-1])return !0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return !1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return !0;return !1},n.humanize=Tn,n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");},Object.keys(e).forEach(t=>{n[t]=e[t];}),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return "[UnexpectedJSONParseError]: "+e.message}};}(Jn={exports:{}},Jn.exports),Jn.exports),Xn=Zn("sq:load-event"),Yn=dist$1.gql(Qn||(Qn=X(["\n mutation loadEvent($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var nt=Zn("sq:useForm"),tt=dist$1.gql(zn||(zn=X(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),rt=dist$1.gql(Bn||(Bn=X(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),at=dist$1.gql(Kn||(Kn=X(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
9848
|
+
// src/hooks/useHost.ts
|
|
9849
|
+
var ref = { current: void 0 };
|
|
9850
|
+
function useHost() {
|
|
9851
|
+
if (ref.current === void 0) {
|
|
9852
|
+
throw new Error("no implementation of useHost provided");
|
|
9853
|
+
}
|
|
9854
|
+
return ref.current();
|
|
9855
|
+
}
|
|
9856
|
+
function setImplementation(implementation) {
|
|
9857
|
+
if (!implementation) {
|
|
9858
|
+
throw new Error("Must supply an implementation");
|
|
9859
|
+
}
|
|
9860
|
+
if (typeof implementation !== "function") {
|
|
9861
|
+
throw new Error("implementation must be a function");
|
|
9862
|
+
}
|
|
9863
|
+
ref.current = implementation;
|
|
9864
|
+
}
|
|
9865
|
+
|
|
9866
|
+
// src/hooks/environment/useLocale.ts
|
|
9867
|
+
function useLocale() {
|
|
9868
|
+
lazilyStartLocaleContext();
|
|
9869
|
+
const host = useHost();
|
|
9870
|
+
return domContextHooks_module.h(host, LOCALE_CONTEXT_NAME);
|
|
9871
|
+
}
|
|
9872
|
+
function useProgramId() {
|
|
9873
|
+
lazilyStartProgramContext();
|
|
9874
|
+
const host = useHost();
|
|
9875
|
+
return domContextHooks_module.h(host, PROGRAM_CONTEXT_NAME);
|
|
9876
|
+
}
|
|
9877
|
+
function useToken() {
|
|
9878
|
+
var _a;
|
|
9879
|
+
return (_a = useUserIdentity()) == null ? void 0 : _a.jwt;
|
|
9880
|
+
}
|
|
9881
|
+
function useUserIdentity() {
|
|
9882
|
+
lazilyStartUserContext();
|
|
9883
|
+
const host = useHost();
|
|
9884
|
+
const identity = domContextHooks_module.h(host, USER_CONTEXT_NAME);
|
|
9885
|
+
const validIdentity = userIdentityFromJwt(identity == null ? void 0 : identity.jwt);
|
|
9886
|
+
if (!isDemo() && identity && !validIdentity) {
|
|
9887
|
+
setUserIdentity(void 0);
|
|
9888
|
+
return void 0;
|
|
9889
|
+
}
|
|
9890
|
+
return identity;
|
|
9891
|
+
}
|
|
9892
|
+
|
|
9893
|
+
// src/hooks/environment/index.ts
|
|
9894
|
+
var useTenantAlias = getTenantAlias;
|
|
9895
|
+
var useAppDomain = getAppDomain;
|
|
9896
|
+
var useEngagementMedium = getEngagementMedium;
|
|
9897
|
+
|
|
9898
|
+
// node_modules/tslib/tslib.es6.mjs
|
|
9899
|
+
var __assign = function() {
|
|
9900
|
+
__assign = Object.assign || function __assign2(t) {
|
|
9901
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9902
|
+
s = arguments[i];
|
|
9903
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9904
|
+
}
|
|
9905
|
+
return t;
|
|
9906
|
+
};
|
|
9907
|
+
return __assign.apply(this, arguments);
|
|
9908
|
+
};
|
|
9909
|
+
var docCache = /* @__PURE__ */ new Map();
|
|
9910
|
+
var fragmentSourceMap = /* @__PURE__ */ new Map();
|
|
9911
|
+
var printFragmentWarnings = true;
|
|
9912
|
+
var experimentalFragmentVariables = false;
|
|
9913
|
+
function normalize(string) {
|
|
9914
|
+
return string.replace(/[\s,]+/g, " ").trim();
|
|
9915
|
+
}
|
|
9916
|
+
function cacheKeyFromLoc(loc) {
|
|
9917
|
+
return normalize(loc.source.body.substring(loc.start, loc.end));
|
|
9918
|
+
}
|
|
9919
|
+
function processFragments(ast) {
|
|
9920
|
+
var seenKeys = /* @__PURE__ */ new Set();
|
|
9921
|
+
var definitions = [];
|
|
9922
|
+
ast.definitions.forEach(function(fragmentDefinition) {
|
|
9923
|
+
if (fragmentDefinition.kind === "FragmentDefinition") {
|
|
9924
|
+
var fragmentName = fragmentDefinition.name.value;
|
|
9925
|
+
var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);
|
|
9926
|
+
var sourceKeySet = fragmentSourceMap.get(fragmentName);
|
|
9927
|
+
if (sourceKeySet && !sourceKeySet.has(sourceKey)) {
|
|
9928
|
+
if (printFragmentWarnings) {
|
|
9929
|
+
console.warn("Warning: fragment with name " + fragmentName + " already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names");
|
|
9930
|
+
}
|
|
9931
|
+
} else if (!sourceKeySet) {
|
|
9932
|
+
fragmentSourceMap.set(fragmentName, sourceKeySet = /* @__PURE__ */ new Set());
|
|
9933
|
+
}
|
|
9934
|
+
sourceKeySet.add(sourceKey);
|
|
9935
|
+
if (!seenKeys.has(sourceKey)) {
|
|
9936
|
+
seenKeys.add(sourceKey);
|
|
9937
|
+
definitions.push(fragmentDefinition);
|
|
9938
|
+
}
|
|
9939
|
+
} else {
|
|
9940
|
+
definitions.push(fragmentDefinition);
|
|
9941
|
+
}
|
|
9942
|
+
});
|
|
9943
|
+
return __assign(__assign({}, ast), { definitions });
|
|
9944
|
+
}
|
|
9945
|
+
function stripLoc(doc) {
|
|
9946
|
+
var workSet = new Set(doc.definitions);
|
|
9947
|
+
workSet.forEach(function(node) {
|
|
9948
|
+
if (node.loc)
|
|
9949
|
+
delete node.loc;
|
|
9950
|
+
Object.keys(node).forEach(function(key) {
|
|
9951
|
+
var value = node[key];
|
|
9952
|
+
if (value && typeof value === "object") {
|
|
9953
|
+
workSet.add(value);
|
|
9954
|
+
}
|
|
9955
|
+
});
|
|
9956
|
+
});
|
|
9957
|
+
var loc = doc.loc;
|
|
9958
|
+
if (loc) {
|
|
9959
|
+
delete loc.startToken;
|
|
9960
|
+
delete loc.endToken;
|
|
9961
|
+
}
|
|
9962
|
+
return doc;
|
|
9963
|
+
}
|
|
9964
|
+
function parseDocument(source) {
|
|
9965
|
+
var cacheKey = normalize(source);
|
|
9966
|
+
if (!docCache.has(cacheKey)) {
|
|
9967
|
+
var parsed = parse(source, {
|
|
9968
|
+
experimentalFragmentVariables,
|
|
9969
|
+
allowLegacyFragmentVariables: experimentalFragmentVariables,
|
|
9970
|
+
experimentalFragmentArguments: experimentalFragmentVariables
|
|
9971
|
+
});
|
|
9972
|
+
if (!parsed || parsed.kind !== "Document") {
|
|
9973
|
+
throw new Error("Not a valid GraphQL document.");
|
|
9974
|
+
}
|
|
9975
|
+
docCache.set(cacheKey, stripLoc(processFragments(parsed)));
|
|
9976
|
+
}
|
|
9977
|
+
return docCache.get(cacheKey);
|
|
9978
|
+
}
|
|
9979
|
+
function gql(literals) {
|
|
9980
|
+
var args = [];
|
|
9981
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
9982
|
+
args[_i - 1] = arguments[_i];
|
|
9983
|
+
}
|
|
9984
|
+
if (typeof literals === "string") {
|
|
9985
|
+
literals = [literals];
|
|
9986
|
+
}
|
|
9987
|
+
var result = literals[0];
|
|
9988
|
+
args.forEach(function(arg, i) {
|
|
9989
|
+
if (arg && arg.kind === "Document") {
|
|
9990
|
+
result += arg.loc.source.body;
|
|
9991
|
+
} else {
|
|
9992
|
+
result += arg;
|
|
9993
|
+
}
|
|
9994
|
+
result += literals[i + 1];
|
|
9995
|
+
});
|
|
9996
|
+
return parseDocument(result);
|
|
9997
|
+
}
|
|
9998
|
+
function resetCaches() {
|
|
9999
|
+
docCache.clear();
|
|
10000
|
+
fragmentSourceMap.clear();
|
|
10001
|
+
}
|
|
10002
|
+
function disableFragmentWarnings() {
|
|
10003
|
+
printFragmentWarnings = false;
|
|
10004
|
+
}
|
|
10005
|
+
function enableExperimentalFragmentVariables() {
|
|
10006
|
+
experimentalFragmentVariables = true;
|
|
10007
|
+
}
|
|
10008
|
+
function disableExperimentalFragmentVariables() {
|
|
10009
|
+
experimentalFragmentVariables = false;
|
|
10010
|
+
}
|
|
10011
|
+
var extras = {
|
|
10012
|
+
gql,
|
|
10013
|
+
resetCaches,
|
|
10014
|
+
disableFragmentWarnings,
|
|
10015
|
+
enableExperimentalFragmentVariables,
|
|
10016
|
+
disableExperimentalFragmentVariables
|
|
10017
|
+
};
|
|
10018
|
+
(function(gql_1) {
|
|
10019
|
+
gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;
|
|
10020
|
+
})(gql || (gql = {}));
|
|
10021
|
+
gql["default"] = gql;
|
|
10022
|
+
var lib_default = gql;
|
|
10023
|
+
var MAX_REQUESTS = 10;
|
|
10024
|
+
var REQUEST_INTERVAL = 200;
|
|
10025
|
+
var BatchedGraphQLClient = class extends dist.GraphQLClient {
|
|
10026
|
+
constructor(url, opts) {
|
|
10027
|
+
super(url, opts);
|
|
10028
|
+
__publicField(this, "subject", new Subject());
|
|
10029
|
+
const unmergable = new Subject();
|
|
10030
|
+
const buffer = this.subject.pipe(
|
|
10031
|
+
bufferTime(REQUEST_INTERVAL, void 0, MAX_REQUESTS)
|
|
10032
|
+
);
|
|
10033
|
+
buffer.subscribe(async (queryAddedEvents) => {
|
|
10034
|
+
if (!queryAddedEvents.length) {
|
|
10035
|
+
return;
|
|
10036
|
+
}
|
|
10037
|
+
const {
|
|
10038
|
+
mergedQuery,
|
|
10039
|
+
mergedVariables,
|
|
10040
|
+
mergedQueryAddedEvents,
|
|
10041
|
+
unmergedQueryAddedEvents
|
|
10042
|
+
} = mergeQueryAddedEvents(queryAddedEvents);
|
|
10043
|
+
for (const unmergedQuery of unmergedQueryAddedEvents)
|
|
10044
|
+
unmergable.next(unmergedQuery);
|
|
10045
|
+
if (!mergedQueryAddedEvents.length) {
|
|
10046
|
+
return;
|
|
10047
|
+
}
|
|
10048
|
+
try {
|
|
10049
|
+
const mergedQueryResult = await this.superRequest(
|
|
10050
|
+
mergedQuery,
|
|
10051
|
+
mergedVariables
|
|
10052
|
+
);
|
|
10053
|
+
resolveMergedQueryResult(mergedQueryResult, mergedQueryAddedEvents);
|
|
10054
|
+
} catch (e) {
|
|
10055
|
+
if (e instanceof types.ClientError) {
|
|
10056
|
+
const { data, errors } = e.response;
|
|
10057
|
+
if (!data) {
|
|
10058
|
+
return rejectAllQueryAddedEventsWithError(
|
|
10059
|
+
mergedQueryAddedEvents,
|
|
10060
|
+
e
|
|
10061
|
+
);
|
|
10062
|
+
}
|
|
10063
|
+
const aliases = Object.keys(data);
|
|
10064
|
+
let eventsToResolve = [...mergedQueryAddedEvents];
|
|
10065
|
+
for (const error of errors) {
|
|
10066
|
+
let erroredEvent;
|
|
10067
|
+
error.path.find((key, index, path) => {
|
|
10068
|
+
if (aliases.includes(key)) {
|
|
10069
|
+
const erroredId = getIdFromAliasedField(key);
|
|
10070
|
+
const indexOfErroredEvent = eventsToResolve.findIndex(
|
|
10071
|
+
(event) => event.id === erroredId
|
|
10072
|
+
);
|
|
10073
|
+
if (indexOfErroredEvent === -1) return false;
|
|
10074
|
+
aliases.splice(aliases.indexOf(key), 1);
|
|
10075
|
+
erroredEvent = eventsToResolve.splice(
|
|
10076
|
+
indexOfErroredEvent,
|
|
10077
|
+
1
|
|
10078
|
+
)[0];
|
|
10079
|
+
const eventSpecificData = removeAliasesFromDataResult(
|
|
10080
|
+
e.response.data,
|
|
10081
|
+
erroredEvent
|
|
10082
|
+
);
|
|
10083
|
+
path[index] = removeAliasFromField(path[index], erroredId);
|
|
10084
|
+
const { query, variables } = erroredEvent;
|
|
10085
|
+
const errorResponse = __spreadProps(__spreadValues({}, e.response), {
|
|
10086
|
+
errors: [error],
|
|
10087
|
+
data: eventSpecificData,
|
|
10088
|
+
path
|
|
10089
|
+
});
|
|
10090
|
+
const newError = new types.ClientError(errorResponse, {
|
|
10091
|
+
query: typeof query !== "string" ? print(query) : query,
|
|
10092
|
+
variables
|
|
10093
|
+
});
|
|
10094
|
+
rejectQueryAddedEventWithError(erroredEvent, newError);
|
|
10095
|
+
return true;
|
|
10096
|
+
}
|
|
10097
|
+
return false;
|
|
10098
|
+
});
|
|
10099
|
+
}
|
|
10100
|
+
resolveMergedQueryResult(data, eventsToResolve);
|
|
10101
|
+
} else rejectAllQueryAddedEventsWithError(mergedQueryAddedEvents, e);
|
|
10102
|
+
}
|
|
10103
|
+
});
|
|
10104
|
+
unmergable.subscribe(async (event) => {
|
|
10105
|
+
try {
|
|
10106
|
+
const { query, variables } = event;
|
|
10107
|
+
const result = await this.superRequest(query, variables);
|
|
10108
|
+
resolveSingleQueryResult(result, event);
|
|
10109
|
+
} catch (e) {
|
|
10110
|
+
rejectQueryAddedEventWithError(event, e);
|
|
10111
|
+
}
|
|
10112
|
+
});
|
|
10113
|
+
}
|
|
10114
|
+
superRequest(query, variables) {
|
|
10115
|
+
return super.request(query, variables);
|
|
10116
|
+
}
|
|
10117
|
+
request(query, variables, options) {
|
|
10118
|
+
return new Promise((resolve, reject) => {
|
|
10119
|
+
const queryAddedEvent = {
|
|
10120
|
+
query,
|
|
10121
|
+
variables,
|
|
10122
|
+
id: generateQueryAddedEventId(),
|
|
10123
|
+
options,
|
|
10124
|
+
resolve,
|
|
10125
|
+
reject
|
|
10126
|
+
};
|
|
10127
|
+
this.subject.next(queryAddedEvent);
|
|
10128
|
+
});
|
|
10129
|
+
}
|
|
10130
|
+
};
|
|
10131
|
+
var generateQueryAddedEventId = () => nanoid().replace(/[-_]/g, "");
|
|
10132
|
+
var aliasFieldOrVariableFn = (name, id) => `${name}_${id}`;
|
|
10133
|
+
var removeAliasFromField = (field, id) => field.replace(`_${id}`, "");
|
|
10134
|
+
var getIdFromAliasedField = (field) => {
|
|
10135
|
+
const fieldArray = field.split("_");
|
|
10136
|
+
return fieldArray[fieldArray.length - 1];
|
|
10137
|
+
};
|
|
10138
|
+
var mergeQueryAddedEvents = (events) => {
|
|
10139
|
+
const mergedQueryAddedEvents = [];
|
|
10140
|
+
const unmergedQueryAddedEvents = [];
|
|
10141
|
+
const { document: document2, variables } = events.reduce(
|
|
10142
|
+
(acc, curr) => {
|
|
10143
|
+
const { query, variables: variables2, id, options } = curr;
|
|
10144
|
+
if (!(options == null ? void 0 : options.batch)) {
|
|
10145
|
+
unmergedQueryAddedEvents.push(curr);
|
|
10146
|
+
return acc;
|
|
10147
|
+
}
|
|
10148
|
+
try {
|
|
10149
|
+
const parsedQuery = typeof query === "string" ? parse(query) : query;
|
|
10150
|
+
const fragmentDefinition = parsedQuery.definitions.find(
|
|
10151
|
+
(node) => node.kind === "FragmentDefinition"
|
|
10152
|
+
);
|
|
10153
|
+
const queryStr = typeof query === "string" ? query : print(query);
|
|
10154
|
+
const containsDirective = /@/.test(queryStr);
|
|
10155
|
+
if (fragmentDefinition || containsDirective) {
|
|
10156
|
+
unmergedQueryAddedEvents.push(curr);
|
|
10157
|
+
return acc;
|
|
10158
|
+
}
|
|
10159
|
+
const renameFn = (name) => aliasFieldOrVariableFn(name, id);
|
|
10160
|
+
acc = acc.addN(parsedQuery, [variables2], renameFn, renameFn);
|
|
10161
|
+
mergedQueryAddedEvents.push(curr);
|
|
10162
|
+
return acc;
|
|
10163
|
+
} catch (e) {
|
|
10164
|
+
unmergedQueryAddedEvents.push(curr);
|
|
10165
|
+
return acc;
|
|
10166
|
+
}
|
|
10167
|
+
},
|
|
10168
|
+
combineQuery("BatchedQuery")
|
|
10169
|
+
);
|
|
10170
|
+
const mergedQuery = document2 && print(document2);
|
|
10171
|
+
const mergedVariables = variables;
|
|
10172
|
+
return {
|
|
10173
|
+
mergedQuery,
|
|
10174
|
+
mergedVariables,
|
|
10175
|
+
mergedQueryAddedEvents,
|
|
10176
|
+
unmergedQueryAddedEvents
|
|
10177
|
+
};
|
|
10178
|
+
};
|
|
10179
|
+
var removeAliasesFromDataResult = (queryResult, event) => {
|
|
10180
|
+
if (!queryResult) return queryResult;
|
|
10181
|
+
const aliases = Object.keys(queryResult);
|
|
10182
|
+
const { id } = event;
|
|
10183
|
+
return aliases.reduce((data, key) => {
|
|
10184
|
+
if (key.endsWith(id)) {
|
|
10185
|
+
data = __spreadProps(__spreadValues({}, data), {
|
|
10186
|
+
[removeAliasFromField(key, id)]: queryResult[key]
|
|
10187
|
+
});
|
|
10188
|
+
}
|
|
10189
|
+
return data;
|
|
10190
|
+
}, {});
|
|
10191
|
+
};
|
|
10192
|
+
var resolveSingleQueryResult = (queryResult, event) => {
|
|
10193
|
+
const { resolve } = event;
|
|
10194
|
+
resolve(queryResult);
|
|
10195
|
+
};
|
|
10196
|
+
var resolveMergedQueryResult = (mergedQueryResult, events) => {
|
|
10197
|
+
for (const event of events) {
|
|
10198
|
+
const data = removeAliasesFromDataResult(mergedQueryResult, event);
|
|
10199
|
+
event.resolve(data);
|
|
10200
|
+
}
|
|
10201
|
+
};
|
|
10202
|
+
var rejectQueryAddedEventWithError = (event, err) => {
|
|
10203
|
+
const { reject } = event;
|
|
10204
|
+
reject(err);
|
|
10205
|
+
};
|
|
10206
|
+
var rejectAllQueryAddedEventsWithError = (events, err) => {
|
|
10207
|
+
for (const event of events) {
|
|
10208
|
+
const { reject } = event;
|
|
10209
|
+
reject(err);
|
|
10210
|
+
}
|
|
10211
|
+
};
|
|
10212
|
+
|
|
10213
|
+
// src/hooks/graphql/useGraphQLClient.ts
|
|
10214
|
+
var GRAPHQL_CONTEXT = "sq:graphql-client";
|
|
10215
|
+
function createGraphQlClient(appDomain, tenantAlias, token) {
|
|
10216
|
+
const uri = appDomain + "/api/v1/" + tenantAlias + "/graphql";
|
|
10217
|
+
const headers = {
|
|
10218
|
+
Authorization: `Bearer ${token || ""}`
|
|
10219
|
+
};
|
|
10220
|
+
const newClient = new BatchedGraphQLClient(uri, {
|
|
10221
|
+
headers
|
|
10222
|
+
});
|
|
10223
|
+
return newClient;
|
|
10224
|
+
}
|
|
10225
|
+
var memoizedGraphQLClient = src(createGraphQlClient);
|
|
10226
|
+
function useGraphQLClient() {
|
|
10227
|
+
const token = useToken();
|
|
10228
|
+
const appDomain = useAppDomain();
|
|
10229
|
+
const tenantAlias = useTenantAlias();
|
|
10230
|
+
const localClient = memoizedGraphQLClient(
|
|
10231
|
+
appDomain,
|
|
10232
|
+
tenantAlias,
|
|
10233
|
+
token
|
|
10234
|
+
);
|
|
10235
|
+
const host = useHost();
|
|
10236
|
+
const clientFromContext = domContextHooks_module.h(
|
|
10237
|
+
host,
|
|
10238
|
+
GRAPHQL_CONTEXT,
|
|
10239
|
+
// Won't poll / re-attempt
|
|
10240
|
+
{ attempts: 0 }
|
|
10241
|
+
);
|
|
10242
|
+
return clientFromContext != null ? clientFromContext : localClient;
|
|
10243
|
+
}
|
|
10244
|
+
var useGraphQLClient_default = useGraphQLClient;
|
|
10245
|
+
|
|
10246
|
+
// src/hooks/graphql/useBaseQuery.ts
|
|
10247
|
+
function reducer(state, action) {
|
|
10248
|
+
switch (action.type) {
|
|
10249
|
+
case "loading":
|
|
10250
|
+
return { data: void 0, errors: void 0, loading: true };
|
|
10251
|
+
case "data":
|
|
10252
|
+
return { data: action.payload, errors: void 0, loading: false };
|
|
10253
|
+
case "errors":
|
|
10254
|
+
return { data: void 0, errors: action.payload, loading: false };
|
|
10255
|
+
}
|
|
10256
|
+
}
|
|
10257
|
+
function useBaseQuery(query, initialState, options = { batch: true }) {
|
|
10258
|
+
const client = useGraphQLClient_default();
|
|
10259
|
+
const [state, dispatch] = domContextHooks_module.useReducer(
|
|
10260
|
+
reducer,
|
|
10261
|
+
initialState
|
|
10262
|
+
);
|
|
10263
|
+
const update = useCallback(
|
|
10264
|
+
async function(variables, skipLoading = false) {
|
|
10265
|
+
if (!client) {
|
|
10266
|
+
const error = new Error("No GraphQL client found");
|
|
10267
|
+
dispatch({
|
|
10268
|
+
type: "errors",
|
|
10269
|
+
// @ts-expect-error -- Need to fix this
|
|
10270
|
+
payload: error
|
|
10271
|
+
});
|
|
10272
|
+
return error;
|
|
10273
|
+
}
|
|
10274
|
+
try {
|
|
10275
|
+
if (!skipLoading) dispatch({ type: "loading" });
|
|
10276
|
+
const res = await client.request(query, variables, options);
|
|
10277
|
+
dispatch({ type: "data", payload: res });
|
|
10278
|
+
return res;
|
|
10279
|
+
} catch (error) {
|
|
10280
|
+
dispatch({ type: "errors", payload: error });
|
|
10281
|
+
return error;
|
|
10282
|
+
}
|
|
10283
|
+
},
|
|
10284
|
+
[client, query, dispatch]
|
|
10285
|
+
);
|
|
10286
|
+
return [state, update];
|
|
10287
|
+
}
|
|
10288
|
+
|
|
10289
|
+
// src/hooks/graphql/useMutation.ts
|
|
10290
|
+
var initialMutationState = {
|
|
10291
|
+
loading: false,
|
|
10292
|
+
data: void 0,
|
|
10293
|
+
errors: void 0
|
|
10294
|
+
};
|
|
10295
|
+
function useMutation(query) {
|
|
10296
|
+
const [state, update] = useBaseQuery(
|
|
10297
|
+
query,
|
|
10298
|
+
initialMutationState
|
|
10299
|
+
);
|
|
10300
|
+
return [update, state];
|
|
10301
|
+
}
|
|
10302
|
+
|
|
10303
|
+
// src/hooks/managedIdentity/useAuthenticateWithEmailAndPasswordMutation.ts
|
|
10304
|
+
var AuthenticateWithEmailAndPasswordMutation = lib_default`
|
|
10305
|
+
mutation AuthenticateWithEmailAndPassword(
|
|
10306
|
+
$email: String!
|
|
10307
|
+
$password: String!
|
|
10308
|
+
) {
|
|
10309
|
+
authenticateManagedIdentityWithEmailAndPassword(
|
|
10310
|
+
authenticateManagedIdentityWithEmailAndPasswordInput: {
|
|
10311
|
+
email: $email
|
|
10312
|
+
password: $password
|
|
10313
|
+
}
|
|
10314
|
+
) {
|
|
10315
|
+
token
|
|
10316
|
+
email
|
|
10317
|
+
emailVerified
|
|
10318
|
+
sessionData
|
|
10319
|
+
}
|
|
10320
|
+
}
|
|
10321
|
+
`;
|
|
10322
|
+
function useAuthenticateWithEmailAndPasswordMutation() {
|
|
10323
|
+
const [request, { loading, data, errors }] = useMutation(
|
|
10324
|
+
AuthenticateWithEmailAndPasswordMutation
|
|
10325
|
+
);
|
|
10326
|
+
const requestAndSetUserIdentity = async (v) => {
|
|
10327
|
+
const result = await request(v);
|
|
10328
|
+
if (!(result instanceof Error) && result.authenticateManagedIdentityWithEmailAndPassword) {
|
|
10329
|
+
const jwt = result.authenticateManagedIdentityWithEmailAndPassword.token;
|
|
10330
|
+
const { user } = o(jwt);
|
|
10331
|
+
setUserIdentity({
|
|
10332
|
+
jwt,
|
|
10333
|
+
id: user.id,
|
|
10334
|
+
accountId: user.accountId,
|
|
10335
|
+
managedIdentity: {
|
|
10336
|
+
email: result.authenticateManagedIdentityWithEmailAndPassword.email,
|
|
10337
|
+
emailVerified: result.authenticateManagedIdentityWithEmailAndPassword.emailVerified,
|
|
10338
|
+
sessionData: result.authenticateManagedIdentityWithEmailAndPassword.sessionData
|
|
10339
|
+
}
|
|
10340
|
+
});
|
|
10341
|
+
}
|
|
10342
|
+
return result;
|
|
10343
|
+
};
|
|
10344
|
+
return [requestAndSetUserIdentity, { loading, data, errors }];
|
|
10345
|
+
}
|
|
10346
|
+
var RegisterWithEmailAndPasswordMutation = lib_default`
|
|
10347
|
+
mutation RegisterWithEmailAndPassword(
|
|
10348
|
+
$email: String!
|
|
10349
|
+
$password: String!
|
|
10350
|
+
$formData: RSJsonNode
|
|
10351
|
+
$redirectPath: String
|
|
10352
|
+
) {
|
|
10353
|
+
registerManagedIdentityWithEmailAndPassword(
|
|
10354
|
+
registerManagedIdentityWithEmailAndPasswordInput: {
|
|
10355
|
+
email: $email
|
|
10356
|
+
password: $password
|
|
10357
|
+
formData: $formData
|
|
10358
|
+
redirectPath: $redirectPath
|
|
10359
|
+
}
|
|
10360
|
+
) {
|
|
10361
|
+
token
|
|
10362
|
+
email
|
|
10363
|
+
emailVerified
|
|
10364
|
+
sessionData
|
|
10365
|
+
}
|
|
10366
|
+
}
|
|
10367
|
+
`;
|
|
10368
|
+
function useRegisterWithEmailAndPasswordMutation() {
|
|
10369
|
+
const [request, { loading, data, errors }] = useMutation(
|
|
10370
|
+
RegisterWithEmailAndPasswordMutation
|
|
10371
|
+
);
|
|
10372
|
+
const requestAndSetUserIdentity = async (v) => {
|
|
10373
|
+
const result = await request(v);
|
|
10374
|
+
if (!(result instanceof Error) && result.registerManagedIdentityWithEmailAndPassword) {
|
|
10375
|
+
const jwt = result.registerManagedIdentityWithEmailAndPassword.token;
|
|
10376
|
+
const { user } = o(jwt);
|
|
10377
|
+
setUserIdentity({
|
|
10378
|
+
jwt,
|
|
10379
|
+
id: user.id,
|
|
10380
|
+
accountId: user.accountId,
|
|
10381
|
+
managedIdentity: {
|
|
10382
|
+
email: result.registerManagedIdentityWithEmailAndPassword.email,
|
|
10383
|
+
emailVerified: result.registerManagedIdentityWithEmailAndPassword.emailVerified,
|
|
10384
|
+
sessionData: result.registerManagedIdentityWithEmailAndPassword.sessionData
|
|
10385
|
+
}
|
|
10386
|
+
});
|
|
10387
|
+
}
|
|
10388
|
+
return result;
|
|
10389
|
+
};
|
|
10390
|
+
return [requestAndSetUserIdentity, { loading, data, errors }];
|
|
10391
|
+
}
|
|
10392
|
+
var RegisterViaRegistrationFormMutation = lib_default`
|
|
10393
|
+
mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {
|
|
10394
|
+
submitForm(formSubmissionInput: { key: $key, formData: $formData }) {
|
|
10395
|
+
results {
|
|
10396
|
+
... on FormHandlerSubmissionResult {
|
|
10397
|
+
result
|
|
10398
|
+
formHandler {
|
|
10399
|
+
namespace
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10402
|
+
... on FormHandlerError {
|
|
10403
|
+
errorCode
|
|
10404
|
+
error
|
|
10405
|
+
errorType
|
|
10406
|
+
formHandler {
|
|
10407
|
+
name
|
|
10408
|
+
endpointUrl
|
|
10409
|
+
}
|
|
10410
|
+
}
|
|
10411
|
+
}
|
|
10412
|
+
}
|
|
10413
|
+
}
|
|
10414
|
+
`;
|
|
10415
|
+
function useRegisterViaRegistrationFormMutation() {
|
|
10416
|
+
const [request, { loading, data, errors }] = useMutation(
|
|
10417
|
+
RegisterViaRegistrationFormMutation
|
|
10418
|
+
);
|
|
10419
|
+
const [formError, setFormError] = domContextHooks_module.useState(null);
|
|
10420
|
+
const requestAndSetUserIdentityOrFormError = async (v) => {
|
|
10421
|
+
var _a, _b, _c, _d;
|
|
10422
|
+
setFormError(null);
|
|
10423
|
+
const result = await request(v);
|
|
10424
|
+
if (result instanceof Error) {
|
|
10425
|
+
return result;
|
|
10426
|
+
}
|
|
10427
|
+
const managedIdentityResponse = (_b = (_a = result.submitForm) == null ? void 0 : _a.results) == null ? void 0 : _b.find(
|
|
10428
|
+
(result2) => {
|
|
10429
|
+
var _a2;
|
|
10430
|
+
return ((_a2 = result2 == null ? void 0 : result2.formHandler) == null ? void 0 : _a2.namespace) === "identity";
|
|
10431
|
+
}
|
|
10432
|
+
);
|
|
10433
|
+
if (managedIdentityResponse && ((_d = (_c = managedIdentityResponse.result) == null ? void 0 : _c.results) == null ? void 0 : _d.length)) {
|
|
10434
|
+
const registrationResult = managedIdentityResponse.result.results[0];
|
|
10435
|
+
if (registrationResult.success) {
|
|
10436
|
+
const jwt = registrationResult.data.token;
|
|
10437
|
+
const { user } = o(jwt);
|
|
10438
|
+
setUserIdentity({
|
|
10439
|
+
jwt,
|
|
10440
|
+
id: user.id,
|
|
10441
|
+
accountId: user.accountId,
|
|
10442
|
+
managedIdentity: {
|
|
10443
|
+
email: registrationResult.data.email,
|
|
10444
|
+
emailVerified: registrationResult.data.emailVerified,
|
|
10445
|
+
sessionData: registrationResult.data.sessionData
|
|
10446
|
+
}
|
|
10447
|
+
});
|
|
10448
|
+
} else {
|
|
10449
|
+
setFormError(registrationResult.message);
|
|
10450
|
+
}
|
|
10451
|
+
}
|
|
10452
|
+
return result;
|
|
10453
|
+
};
|
|
10454
|
+
return [
|
|
10455
|
+
requestAndSetUserIdentityOrFormError,
|
|
10456
|
+
{ loading, data, errors, formError }
|
|
10457
|
+
];
|
|
10458
|
+
}
|
|
10459
|
+
|
|
10460
|
+
// src/hooks/managedIdentity/useChangePasswordMutation.ts
|
|
10461
|
+
var ChangePasswordMutation = lib_default`
|
|
10462
|
+
mutation ChangePassword($password: String!) {
|
|
10463
|
+
changeManagedIdentityPassword(
|
|
10464
|
+
changeManagedIdentityPasswordInput: { password: $password }
|
|
10465
|
+
) {
|
|
10466
|
+
success
|
|
10467
|
+
}
|
|
10468
|
+
}
|
|
10469
|
+
`;
|
|
10470
|
+
function useChangePasswordMutation() {
|
|
10471
|
+
const [request, { loading, data, errors }] = useMutation(ChangePasswordMutation);
|
|
10472
|
+
return [request, { loading, data, errors }];
|
|
10473
|
+
}
|
|
10474
|
+
var ResetPasswordMutation = lib_default`
|
|
10475
|
+
mutation ResetPassword($oobCode: String!, $password: String!) {
|
|
10476
|
+
resetManagedIdentityPassword(
|
|
10477
|
+
resetManagedIdentityPasswordInput: {
|
|
10478
|
+
password: $password
|
|
10479
|
+
oobCode: $oobCode
|
|
10480
|
+
}
|
|
10481
|
+
) {
|
|
10482
|
+
token
|
|
10483
|
+
email
|
|
10484
|
+
emailVerified
|
|
10485
|
+
sessionData
|
|
10486
|
+
}
|
|
10487
|
+
}
|
|
10488
|
+
`;
|
|
10489
|
+
function useResetPasswordMutation() {
|
|
10490
|
+
const [request, { loading, data, errors }] = useMutation(
|
|
10491
|
+
ResetPasswordMutation
|
|
10492
|
+
);
|
|
10493
|
+
const requestAndSetUserIdentity = async (v) => {
|
|
10494
|
+
const result = await request(v);
|
|
10495
|
+
if (!(result instanceof Error) && result.resetManagedIdentityPassword) {
|
|
10496
|
+
const jwt = result.resetManagedIdentityPassword.token;
|
|
10497
|
+
const { user } = o(jwt);
|
|
10498
|
+
setUserIdentity({
|
|
10499
|
+
jwt,
|
|
10500
|
+
id: user.id,
|
|
10501
|
+
accountId: user.accountId,
|
|
10502
|
+
managedIdentity: {
|
|
10503
|
+
email: result.resetManagedIdentityPassword.email,
|
|
10504
|
+
emailVerified: result.resetManagedIdentityPassword.emailVerified,
|
|
10505
|
+
sessionData: result.resetManagedIdentityPassword.sessionData
|
|
10506
|
+
}
|
|
10507
|
+
});
|
|
10508
|
+
}
|
|
10509
|
+
return result;
|
|
10510
|
+
};
|
|
10511
|
+
return [requestAndSetUserIdentity, { loading, data, errors }];
|
|
10512
|
+
}
|
|
10513
|
+
|
|
10514
|
+
// src/hooks/managedIdentity/useVerifyPasswordResetCodeMutation.ts
|
|
10515
|
+
var VerifyPasswordResetCodeMutation = lib_default`
|
|
10516
|
+
mutation VerifyPasswordResetCode($oobCode: String!) {
|
|
10517
|
+
verifyManagedIdentityPasswordResetCode(
|
|
10518
|
+
verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }
|
|
10519
|
+
) {
|
|
10520
|
+
success
|
|
10521
|
+
}
|
|
10522
|
+
}
|
|
10523
|
+
`;
|
|
10524
|
+
function useVerifyPasswordResetCodeMutation() {
|
|
10525
|
+
return useMutation(
|
|
10526
|
+
VerifyPasswordResetCodeMutation
|
|
10527
|
+
);
|
|
10528
|
+
}
|
|
10529
|
+
function useDeepCompareMemoize(value) {
|
|
10530
|
+
const ref2 = domContextHooks_module.useRef(value);
|
|
10531
|
+
const signalRef = domContextHooks_module.useRef(0);
|
|
10532
|
+
if (!equal(value, ref2.current)) {
|
|
10533
|
+
ref2.current = value;
|
|
10534
|
+
signalRef.current += 1;
|
|
10535
|
+
}
|
|
10536
|
+
return domContextHooks_module.useMemo(() => ref2.current, [signalRef.current]);
|
|
10537
|
+
}
|
|
10538
|
+
function useDeepCompareEffect(callback, dependencies) {
|
|
10539
|
+
return domContextHooks_module.useEffect(callback, useDeepCompareMemoize(dependencies));
|
|
10540
|
+
}
|
|
10541
|
+
|
|
10542
|
+
// src/hooks/graphql/Refresh.ts
|
|
10543
|
+
var REFRESH_EVENT_NAME = "sq:refresh";
|
|
10544
|
+
function useRefreshDispatcher() {
|
|
10545
|
+
const host = useHost();
|
|
10546
|
+
const refresh = useCallback(() => {
|
|
10547
|
+
host.dispatchEvent(
|
|
10548
|
+
new CustomEvent(REFRESH_EVENT_NAME, {
|
|
10549
|
+
bubbles: true,
|
|
10550
|
+
composed: true,
|
|
10551
|
+
cancelable: true,
|
|
10552
|
+
detail: {
|
|
10553
|
+
// Could add some "scope" for more granular refresh
|
|
10554
|
+
}
|
|
10555
|
+
})
|
|
10556
|
+
);
|
|
10557
|
+
}, [host]);
|
|
10558
|
+
return { refresh };
|
|
10559
|
+
}
|
|
10560
|
+
function useRefreshListener({
|
|
10561
|
+
skip = false,
|
|
10562
|
+
update,
|
|
10563
|
+
variables
|
|
10564
|
+
}) {
|
|
10565
|
+
useDeepCompareEffect(() => {
|
|
10566
|
+
const listener = (e) => {
|
|
10567
|
+
!skip && update(variables, true);
|
|
10568
|
+
};
|
|
10569
|
+
document.addEventListener(REFRESH_EVENT_NAME, listener);
|
|
10570
|
+
return () => document.removeEventListener(REFRESH_EVENT_NAME, listener);
|
|
10571
|
+
}, [variables, update, skip]);
|
|
10572
|
+
}
|
|
10573
|
+
|
|
10574
|
+
// src/hooks/graphql/useLazyQuery.ts
|
|
10575
|
+
var initialLazyQueryState = {
|
|
10576
|
+
loading: false,
|
|
10577
|
+
data: void 0,
|
|
10578
|
+
errors: void 0
|
|
10579
|
+
};
|
|
10580
|
+
var NOTLOADED = /* @__PURE__ */ Symbol();
|
|
10581
|
+
function useLazyQuery(query) {
|
|
10582
|
+
const [state, update] = useBaseQuery(
|
|
10583
|
+
query,
|
|
10584
|
+
initialLazyQueryState
|
|
10585
|
+
);
|
|
10586
|
+
const variablesRef = domContextHooks_module.useRef(NOTLOADED);
|
|
10587
|
+
const skip = variablesRef.current === NOTLOADED;
|
|
10588
|
+
useRefreshListener({
|
|
10589
|
+
skip,
|
|
10590
|
+
update,
|
|
10591
|
+
variables: variablesRef.current
|
|
10592
|
+
});
|
|
10593
|
+
const refetch = useCallback(
|
|
10594
|
+
(variables) => {
|
|
10595
|
+
variablesRef.current = variables;
|
|
10596
|
+
return update(variables);
|
|
10597
|
+
},
|
|
10598
|
+
[update]
|
|
10599
|
+
);
|
|
10600
|
+
return [
|
|
10601
|
+
update,
|
|
10602
|
+
__spreadProps(__spreadValues({}, state), {
|
|
10603
|
+
refetch
|
|
10604
|
+
})
|
|
10605
|
+
];
|
|
10606
|
+
}
|
|
10607
|
+
|
|
10608
|
+
// src/hooks/managedIdentity/useManagedIdentitySessionQuery.ts
|
|
10609
|
+
var ManagedIdentitySessionQuery = lib_default`
|
|
10610
|
+
query ManagedIdentitySession {
|
|
10611
|
+
managedIdentitySession {
|
|
10612
|
+
email
|
|
10613
|
+
emailVerified
|
|
10614
|
+
sessionData
|
|
10615
|
+
}
|
|
10616
|
+
}
|
|
10617
|
+
`;
|
|
10618
|
+
function useManagedIdentitySessionQuery() {
|
|
10619
|
+
const userIdentity = useUserIdentity();
|
|
10620
|
+
const [request, { loading, data, errors, refetch }] = useLazyQuery(ManagedIdentitySessionQuery);
|
|
10621
|
+
const updateUserIdentity = (result) => {
|
|
10622
|
+
if (!(result instanceof Error) && result.managedIdentitySession) {
|
|
10623
|
+
setUserIdentity(__spreadProps(__spreadValues({}, userIdentity), {
|
|
10624
|
+
managedIdentity: result.managedIdentitySession
|
|
10625
|
+
}));
|
|
10626
|
+
}
|
|
10627
|
+
};
|
|
10628
|
+
const requestAndSetUserIdentity = async () => {
|
|
10629
|
+
const result = await request({});
|
|
10630
|
+
updateUserIdentity(result);
|
|
10631
|
+
return result;
|
|
10632
|
+
};
|
|
10633
|
+
const refetchAndSetUserIdentity = async () => {
|
|
10634
|
+
const result = await refetch();
|
|
10635
|
+
updateUserIdentity(result);
|
|
10636
|
+
return result;
|
|
10637
|
+
};
|
|
10638
|
+
return [
|
|
10639
|
+
requestAndSetUserIdentity,
|
|
10640
|
+
{ loading, data, errors, refetch: refetchAndSetUserIdentity }
|
|
10641
|
+
];
|
|
10642
|
+
}
|
|
10643
|
+
|
|
10644
|
+
// src/hooks/managedIdentity/useVerifyEmailMutation.ts
|
|
10645
|
+
var VerifyEmailMutation = lib_default`
|
|
10646
|
+
mutation VerifyEmail($oobCode: String!) {
|
|
10647
|
+
verifyManagedIdentityEmail(
|
|
10648
|
+
verifyManagedIdentityEmailInput: { oobCode: $oobCode }
|
|
10649
|
+
) {
|
|
10650
|
+
success
|
|
10651
|
+
}
|
|
10652
|
+
}
|
|
10653
|
+
`;
|
|
10654
|
+
function useVerifyEmailMutation() {
|
|
10655
|
+
const [refreshManagedIdentitySession] = useManagedIdentitySessionQuery();
|
|
10656
|
+
const [request, { loading, data, errors }] = useMutation(VerifyEmailMutation);
|
|
10657
|
+
const requestAndRefreshManagedIdentitySession = async (e) => {
|
|
10658
|
+
const result = await request(e);
|
|
10659
|
+
if (!(result instanceof Error) && result.verifyManagedIdentityEmail.success) {
|
|
10660
|
+
await refreshManagedIdentitySession();
|
|
10661
|
+
}
|
|
10662
|
+
return result;
|
|
10663
|
+
};
|
|
10664
|
+
return [requestAndRefreshManagedIdentitySession, { loading, data, errors }];
|
|
10665
|
+
}
|
|
10666
|
+
|
|
10667
|
+
// src/hooks/managedIdentity/useRequestPasswordResetEmailMutation.ts
|
|
10668
|
+
var RequestPasswordResetEmailMutation = lib_default`
|
|
10669
|
+
mutation RequestPasswordResetEmail(
|
|
10670
|
+
$email: String!
|
|
10671
|
+
$urlParams: RSJsonNode
|
|
10672
|
+
$redirectPath: String
|
|
10673
|
+
) {
|
|
10674
|
+
requestManagedIdentityPasswordResetEmail(
|
|
10675
|
+
requestManagedIdentityPasswordResetEmailInput: {
|
|
10676
|
+
email: $email
|
|
10677
|
+
urlParams: $urlParams
|
|
10678
|
+
redirectPath: $redirectPath
|
|
10679
|
+
}
|
|
10680
|
+
) {
|
|
10681
|
+
success
|
|
10682
|
+
}
|
|
10683
|
+
}
|
|
10684
|
+
`;
|
|
10685
|
+
function useRequestPasswordResetEmailMutation() {
|
|
10686
|
+
return useMutation(
|
|
10687
|
+
RequestPasswordResetEmailMutation
|
|
10688
|
+
);
|
|
10689
|
+
}
|
|
10690
|
+
|
|
10691
|
+
// src/hooks/managedIdentity/useRequestVerificationEmailMutation.ts
|
|
10692
|
+
var RequestVerificationEmailMutation = lib_default`
|
|
10693
|
+
mutation RequestVerificationEmail(
|
|
10694
|
+
$email: String!
|
|
10695
|
+
$urlParams: RSJsonNode
|
|
10696
|
+
$redirectPath: String
|
|
10697
|
+
) {
|
|
10698
|
+
requestManagedIdentityVerificationEmail(
|
|
10699
|
+
requestManagedIdentityVerificationEmailInput: {
|
|
10700
|
+
email: $email
|
|
10701
|
+
urlParams: $urlParams
|
|
10702
|
+
redirectPath: $redirectPath
|
|
10703
|
+
}
|
|
10704
|
+
) {
|
|
10705
|
+
success
|
|
10706
|
+
}
|
|
10707
|
+
}
|
|
10708
|
+
`;
|
|
10709
|
+
function useRequestVerificationEmailMutation() {
|
|
10710
|
+
return useMutation(
|
|
10711
|
+
RequestVerificationEmailMutation
|
|
10712
|
+
);
|
|
10713
|
+
}
|
|
10714
|
+
var AuthenticateManagedIdentityWithInstantAccessMutation = lib_default`
|
|
10715
|
+
mutation authenticateManagedIdentityWithInstantAccess(
|
|
10716
|
+
$email: String!
|
|
10717
|
+
$firstName: String
|
|
10718
|
+
$lastName: String
|
|
10719
|
+
$locale: RSLocale
|
|
10720
|
+
$countryCode: RSCountryCode
|
|
10721
|
+
$cookies: String
|
|
10722
|
+
) {
|
|
10723
|
+
authenticateManagedIdentityWithInstantAccess(
|
|
10724
|
+
authenticateManagedIdentityWithInstantAccessInput: {
|
|
10725
|
+
email: $email
|
|
10726
|
+
firstName: $firstName
|
|
10727
|
+
lastName: $lastName
|
|
10728
|
+
locale: $locale
|
|
10729
|
+
countryCode: $countryCode
|
|
10730
|
+
cookies: $cookies
|
|
10731
|
+
}
|
|
10732
|
+
) {
|
|
10733
|
+
email
|
|
10734
|
+
emailVerified
|
|
10735
|
+
sessionData
|
|
10736
|
+
token
|
|
10737
|
+
}
|
|
10738
|
+
}
|
|
10739
|
+
`;
|
|
10740
|
+
var CheckReferralFraudStatusQuery = `
|
|
10741
|
+
query checkReferralFraudStatus($programId: ID) {
|
|
10742
|
+
viewer {
|
|
10743
|
+
... on User {
|
|
10744
|
+
id
|
|
10745
|
+
instantAccessRewards(filter: { programId_eq: $programId }) {
|
|
10746
|
+
data {
|
|
10747
|
+
id
|
|
10748
|
+
pendingReasons
|
|
10749
|
+
cancelledReason
|
|
10750
|
+
}
|
|
10751
|
+
}
|
|
10752
|
+
}
|
|
10753
|
+
}
|
|
10754
|
+
}
|
|
10755
|
+
`;
|
|
10756
|
+
async function fetchFraud(programId, jwt) {
|
|
10757
|
+
var _a;
|
|
10758
|
+
try {
|
|
10759
|
+
const result = await fetch(
|
|
10760
|
+
`${getAppDomain()}/api/v1/${getTenantAlias()}/graphql`,
|
|
10761
|
+
{
|
|
10762
|
+
method: "POST",
|
|
10763
|
+
headers: {
|
|
10764
|
+
"Content-Type": "application/json",
|
|
10765
|
+
Authorization: `Bearer ${jwt}`
|
|
10766
|
+
},
|
|
10767
|
+
body: JSON.stringify({
|
|
10768
|
+
query: CheckReferralFraudStatusQuery,
|
|
10769
|
+
variables: {
|
|
10770
|
+
programId
|
|
10771
|
+
}
|
|
10772
|
+
})
|
|
10773
|
+
}
|
|
10774
|
+
);
|
|
10775
|
+
if (!result.ok) {
|
|
10776
|
+
throw new Error("Failed to fetch locale");
|
|
10777
|
+
}
|
|
10778
|
+
const json = await result.json();
|
|
10779
|
+
if (json.errors) {
|
|
10780
|
+
throw new Error(JSON.stringify(json.errors, null, 2));
|
|
10781
|
+
}
|
|
10782
|
+
const results = ((_a = json.data.viewer.instantAccessRewards) == null ? void 0 : _a.data) || [];
|
|
10783
|
+
if (results.some((r) => r.cancelledReason === "SUSPECTED_FRAUD"))
|
|
10784
|
+
return "DENIED";
|
|
10785
|
+
else if (results.some((r) => {
|
|
10786
|
+
var _a2;
|
|
10787
|
+
return (_a2 = r.pendingReasons) == null ? void 0 : _a2.includes("SUSPECTED_FRAUD");
|
|
10788
|
+
}))
|
|
10789
|
+
return "PENDING_REVIEW";
|
|
10790
|
+
else return "APPROVED";
|
|
10791
|
+
} catch (e) {
|
|
10792
|
+
console.error(e);
|
|
10793
|
+
return void 0;
|
|
10794
|
+
}
|
|
10795
|
+
}
|
|
10796
|
+
function useAuthenticateManagedIdentityWithInstantAccess() {
|
|
10797
|
+
const programId = useProgramId();
|
|
10798
|
+
const env = getEnvironment();
|
|
10799
|
+
const [request, { loading, data, errors }] = useMutation(
|
|
10800
|
+
AuthenticateManagedIdentityWithInstantAccessMutation
|
|
10801
|
+
);
|
|
10802
|
+
const requestAndSetUserIdentity = async (variables) => {
|
|
10803
|
+
const result = await request(variables);
|
|
10804
|
+
if (!(result instanceof Error) && result.authenticateManagedIdentityWithInstantAccess) {
|
|
10805
|
+
const fraudStatus = await fetchFraud(
|
|
10806
|
+
programId,
|
|
10807
|
+
result.authenticateManagedIdentityWithInstantAccess.token
|
|
10808
|
+
);
|
|
10809
|
+
if (fraudStatus === "APPROVED") {
|
|
10810
|
+
const jwt = result.authenticateManagedIdentityWithInstantAccess.token;
|
|
10811
|
+
const email = result.authenticateManagedIdentityWithInstantAccess.email;
|
|
10812
|
+
setUserIdentity({
|
|
10813
|
+
jwt,
|
|
10814
|
+
id: email,
|
|
10815
|
+
accountId: email
|
|
10816
|
+
});
|
|
10817
|
+
if (env === "SquatchJS2") {
|
|
10818
|
+
const event = new CustomEvent("sq:user-registration", {
|
|
10819
|
+
bubbles: true,
|
|
10820
|
+
detail: {
|
|
10821
|
+
userId: email,
|
|
10822
|
+
accountId: email
|
|
10823
|
+
}
|
|
10824
|
+
});
|
|
10825
|
+
document.dispatchEvent(event);
|
|
10826
|
+
}
|
|
10827
|
+
} else {
|
|
10828
|
+
throw {
|
|
10829
|
+
name: "fraud_error",
|
|
10830
|
+
message: "Referral flagged as fraud."
|
|
10831
|
+
};
|
|
10832
|
+
}
|
|
10833
|
+
}
|
|
10834
|
+
return result;
|
|
10835
|
+
};
|
|
10836
|
+
return [requestAndSetUserIdentity, { loading, data, errors }];
|
|
10837
|
+
}
|
|
10838
|
+
var AuthenticateWithGoogleMutation = dist.gql`
|
|
10839
|
+
mutation authenticateManagedIdentityWithGoogle($idToken: String!) {
|
|
10840
|
+
authenticateManagedIdentityWithGoogle(
|
|
10841
|
+
authenticateManagedIdentityWithGoogleInput: { idToken: $idToken }
|
|
10842
|
+
) {
|
|
10843
|
+
token
|
|
10844
|
+
email
|
|
10845
|
+
emailVerified
|
|
10846
|
+
sessionData
|
|
10847
|
+
}
|
|
10848
|
+
}
|
|
10849
|
+
`;
|
|
10850
|
+
function useAuthenticateWithGoogle() {
|
|
10851
|
+
const [request, { loading, data, errors }] = useMutation(AuthenticateWithGoogleMutation);
|
|
10852
|
+
const updateUserIdentity = async (v) => {
|
|
10853
|
+
const result = await request(v);
|
|
10854
|
+
if (!(result instanceof Error) && result.authenticateManagedIdentityWithGoogle) {
|
|
10855
|
+
const jwt = result.authenticateManagedIdentityWithGoogle.token;
|
|
10856
|
+
const { user } = o(jwt);
|
|
10857
|
+
setUserIdentity({
|
|
10858
|
+
jwt,
|
|
10859
|
+
id: user.id,
|
|
10860
|
+
accountId: user.accountId,
|
|
10861
|
+
managedIdentity: {
|
|
10862
|
+
email: result.authenticateManagedIdentityWithGoogle.email,
|
|
10863
|
+
emailVerified: result.authenticateManagedIdentityWithGoogle.emailVerified,
|
|
10864
|
+
sessionData: result.authenticateManagedIdentityWithGoogle.sessionData
|
|
10865
|
+
}
|
|
10866
|
+
});
|
|
10867
|
+
}
|
|
10868
|
+
return result;
|
|
10869
|
+
};
|
|
10870
|
+
return [updateUserIdentity, { loading, data, errors }];
|
|
10871
|
+
}
|
|
10872
|
+
function useDeepMemo(memoFn, key) {
|
|
10873
|
+
const ref2 = domContextHooks_module.useRef();
|
|
10874
|
+
if (!ref2.current || !equal(key, ref2.current.key)) {
|
|
10875
|
+
ref2.current = { key, value: memoFn() };
|
|
10876
|
+
}
|
|
10877
|
+
return ref2.current.value;
|
|
10878
|
+
}
|
|
10879
|
+
function useTick() {
|
|
10880
|
+
return domContextHooks_module.useReducer((x) => x + 1, 0);
|
|
10881
|
+
}
|
|
10882
|
+
|
|
10883
|
+
// src/hooks/graphql/useQuery.ts
|
|
10884
|
+
function deepFreeze(object) {
|
|
10885
|
+
const propNames = Object.getOwnPropertyNames(object);
|
|
10886
|
+
for (const name of propNames) {
|
|
10887
|
+
const value = object[name];
|
|
10888
|
+
if (value && typeof value === "object") {
|
|
10889
|
+
deepFreeze(value);
|
|
10890
|
+
}
|
|
10891
|
+
}
|
|
10892
|
+
return Object.freeze(object);
|
|
10893
|
+
}
|
|
10894
|
+
var initialQueryState = {
|
|
10895
|
+
loading: true,
|
|
10896
|
+
data: void 0,
|
|
10897
|
+
errors: void 0
|
|
10898
|
+
};
|
|
10899
|
+
function useQuery(query, variables, skip, options) {
|
|
10900
|
+
const [state, update] = useBaseQuery(
|
|
10901
|
+
query,
|
|
10902
|
+
initialQueryState,
|
|
10903
|
+
__spreadValues({
|
|
10904
|
+
batch: true
|
|
10905
|
+
}, options || {})
|
|
10906
|
+
);
|
|
10907
|
+
const [tick, forceUpdate] = useTick();
|
|
10908
|
+
useDeepMemo(() => {
|
|
10909
|
+
!skip && update(variables);
|
|
10910
|
+
}, [query, variables, update, tick, skip]);
|
|
10911
|
+
useRefreshListener({ skip, update, variables });
|
|
10912
|
+
return deepFreeze(__spreadProps(__spreadValues({}, state), {
|
|
10913
|
+
// can override props when refetching for new pagination, offset, etc
|
|
10914
|
+
refetch: forceUpdate
|
|
10915
|
+
}));
|
|
10916
|
+
}
|
|
10917
|
+
function useParentState(props) {
|
|
10918
|
+
const host = useHost();
|
|
10919
|
+
const [value, setValue] = domContextHooks_module.y(
|
|
10920
|
+
host,
|
|
10921
|
+
getContextValueName(props.namespace),
|
|
10922
|
+
props.initialValue
|
|
10923
|
+
);
|
|
10924
|
+
domContextHooks_module.y(host, getContextName(props.namespace), [
|
|
10925
|
+
value,
|
|
10926
|
+
setValue
|
|
10927
|
+
]);
|
|
10928
|
+
return [value, setValue];
|
|
10929
|
+
}
|
|
10930
|
+
function useParent(namespace) {
|
|
10931
|
+
const parent = domContextHooks_module.d(
|
|
10932
|
+
getContextName(namespace)
|
|
10933
|
+
);
|
|
10934
|
+
const parentValue = domContextHooks_module.d(
|
|
10935
|
+
getContextValueName(namespace)
|
|
10936
|
+
);
|
|
10937
|
+
if (!parent) return [void 0, void 0];
|
|
10938
|
+
return [parentValue, parent[1]];
|
|
10939
|
+
}
|
|
10940
|
+
function useSetParent(namespace) {
|
|
10941
|
+
const parent = domContextHooks_module.d(
|
|
10942
|
+
getContextName(namespace)
|
|
10943
|
+
);
|
|
10944
|
+
if (!parent) return void 0;
|
|
10945
|
+
return parent[1];
|
|
10946
|
+
}
|
|
10947
|
+
function useParentValue(namespace) {
|
|
10948
|
+
const parentValue = domContextHooks_module.d(
|
|
10949
|
+
getContextValueName(namespace)
|
|
10950
|
+
);
|
|
10951
|
+
return parentValue;
|
|
10952
|
+
}
|
|
10953
|
+
function getContextValueName(namespace) {
|
|
10954
|
+
return namespace + "-value";
|
|
10955
|
+
}
|
|
10956
|
+
function getContextName(namespace) {
|
|
10957
|
+
return namespace + "-state";
|
|
10958
|
+
}
|
|
10959
|
+
|
|
10960
|
+
// src/hooks/graphql/useParentQuery.ts
|
|
10961
|
+
function useParentQuery(props) {
|
|
10962
|
+
const host = useHost();
|
|
10963
|
+
const query = useQuery(props.query, props.variables || {}, props.skip, __spreadValues({
|
|
10964
|
+
batch: true
|
|
10965
|
+
}, props.options || {}));
|
|
10966
|
+
const [value, setValue] = domContextHooks_module.y(
|
|
10967
|
+
host,
|
|
10968
|
+
getContextValueName(props.namespace),
|
|
10969
|
+
query
|
|
10970
|
+
);
|
|
10971
|
+
domContextHooks_module.useEffect(() => {
|
|
10972
|
+
if (umd.deepEqual(query, value)) return;
|
|
10973
|
+
setValue(query);
|
|
10974
|
+
}, [query, value]);
|
|
10975
|
+
return query;
|
|
10976
|
+
}
|
|
10977
|
+
function useParentQueryValue(namespace) {
|
|
10978
|
+
const parentValue = domContextHooks_module.d(
|
|
10979
|
+
getContextValueName(namespace)
|
|
10980
|
+
);
|
|
10981
|
+
if (!parentValue)
|
|
10982
|
+
return {
|
|
10983
|
+
data: null,
|
|
10984
|
+
loading: true,
|
|
10985
|
+
refetch: () => console.warn("component still loading")
|
|
10986
|
+
};
|
|
10987
|
+
return parentValue;
|
|
10988
|
+
}
|
|
10989
|
+
function useCurrentPage() {
|
|
10990
|
+
const [, tick] = useTick();
|
|
10991
|
+
domContextHooks_module.useEffect(() => {
|
|
10992
|
+
const cleanup = history_default.listen(() => {
|
|
10993
|
+
tick();
|
|
10994
|
+
});
|
|
10995
|
+
return cleanup;
|
|
10996
|
+
}, []);
|
|
10997
|
+
return history_default.location;
|
|
10998
|
+
}
|
|
10999
|
+
var navigation = history_default;
|
|
11000
|
+
function usePagination(pageVars) {
|
|
11001
|
+
const [pageState, setPageState] = domContextHooks_module.useState({
|
|
11002
|
+
limit: pageVars.limit,
|
|
11003
|
+
offset: pageVars.offset
|
|
11004
|
+
});
|
|
11005
|
+
const { offset, limit } = pageState;
|
|
11006
|
+
const calcOffset = (limit2, page) => limit2 * page;
|
|
11007
|
+
const calcPage = (offset2, limit2) => Math.ceil(offset2 / limit2) || 0;
|
|
11008
|
+
const calcPageCount = (totalCount, limit2) => Math.ceil(totalCount / limit2) || 0;
|
|
11009
|
+
const setLimit = (newLimit) => {
|
|
11010
|
+
const newPage = calcPage(offset, newLimit);
|
|
11011
|
+
const newOffset = calcOffset(newLimit, newPage);
|
|
11012
|
+
setPageState(__spreadProps(__spreadValues({}, pageState), {
|
|
11013
|
+
limit: newLimit,
|
|
11014
|
+
offset: newOffset
|
|
11015
|
+
}));
|
|
11016
|
+
};
|
|
11017
|
+
const setCurrentPage = (newPage) => {
|
|
11018
|
+
let newOffset = calcOffset(newPage, limit);
|
|
11019
|
+
setPageState((pageState2) => __spreadProps(__spreadValues({}, pageState2), {
|
|
11020
|
+
offset: newOffset
|
|
11021
|
+
}));
|
|
11022
|
+
};
|
|
11023
|
+
function calculatePagination(count, totalCount) {
|
|
11024
|
+
const currentPage = calcPage(offset, limit);
|
|
11025
|
+
const pageCount = calcPageCount(totalCount, limit);
|
|
11026
|
+
const rangeOnPage = count === 0 ? "0" : count > 1 ? `${offset + 1}-${offset + count}` : `${offset + 1}`;
|
|
11027
|
+
const pageProgress = `${rangeOnPage} of ${totalCount}`;
|
|
11028
|
+
return { currentPage, pageCount, rangeOnPage, pageProgress };
|
|
11029
|
+
}
|
|
11030
|
+
return {
|
|
11031
|
+
limit,
|
|
11032
|
+
setLimit,
|
|
11033
|
+
offset,
|
|
11034
|
+
setCurrentPage,
|
|
11035
|
+
calculatePagination
|
|
11036
|
+
};
|
|
11037
|
+
}
|
|
11038
|
+
|
|
11039
|
+
// src/hooks/pagination/usePaginatedQuery.ts
|
|
11040
|
+
function usePaginatedQuery(query, dataPath, pageVars, extraVars = {}, skip = false) {
|
|
11041
|
+
var _a;
|
|
11042
|
+
const {
|
|
11043
|
+
limit,
|
|
11044
|
+
offset,
|
|
11045
|
+
setLimit,
|
|
11046
|
+
setCurrentPage,
|
|
11047
|
+
calculatePagination
|
|
11048
|
+
} = usePagination(pageVars);
|
|
11049
|
+
const variables = __spreadValues({ limit, offset }, extraVars);
|
|
11050
|
+
const { loading, errors, data, refetch } = useQuery(query, variables, skip);
|
|
11051
|
+
const envelope = dataPath(data);
|
|
11052
|
+
const { currentPage, pageCount, pageProgress } = calculatePagination(
|
|
11053
|
+
((_a = envelope == null ? void 0 : envelope.data) == null ? void 0 : _a.length) || 0,
|
|
11054
|
+
(envelope == null ? void 0 : envelope.totalCount) || 0
|
|
11055
|
+
);
|
|
11056
|
+
return {
|
|
11057
|
+
envelope,
|
|
11058
|
+
states: {
|
|
11059
|
+
errors,
|
|
11060
|
+
loading,
|
|
11061
|
+
limit,
|
|
11062
|
+
currentPage,
|
|
11063
|
+
pageCount,
|
|
11064
|
+
pageProgress
|
|
11065
|
+
},
|
|
11066
|
+
callbacks: {
|
|
11067
|
+
refetch,
|
|
11068
|
+
setLimit,
|
|
11069
|
+
setCurrentPage
|
|
11070
|
+
}
|
|
11071
|
+
};
|
|
11072
|
+
}
|
|
11073
|
+
dist.gql`
|
|
11074
|
+
mutation ($eventMeta: UserAnalyticsEvent!) {
|
|
11075
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
11076
|
+
}
|
|
11077
|
+
`;
|
|
11078
|
+
|
|
11079
|
+
// src/hooks/useLoadEvent.ts
|
|
11080
|
+
var import_debug = __toESM(require_browser());
|
|
11081
|
+
var LOAD_EVENT_CONTEXT_NAME = "sq:load-event";
|
|
11082
|
+
(0, import_debug.default)(LOAD_EVENT_CONTEXT_NAME);
|
|
11083
|
+
dist.gql`
|
|
11084
|
+
mutation loadEvent($eventMeta: UserAnalyticsEvent!) {
|
|
11085
|
+
createUserAnalyticsEvent(eventMeta: $eventMeta)
|
|
11086
|
+
}
|
|
11087
|
+
`;
|
|
11088
|
+
|
|
11089
|
+
// src/hooks/useForm.ts
|
|
11090
|
+
var import_debug2 = __toESM(require_browser());
|
|
11091
|
+
(0, import_debug2.default)("sq:useForm");
|
|
11092
|
+
dist.gql`
|
|
11093
|
+
query ($key: String!) {
|
|
11094
|
+
form(key: $key) {
|
|
11095
|
+
schema
|
|
11096
|
+
initialData {
|
|
11097
|
+
initialData
|
|
11098
|
+
isEnabled
|
|
11099
|
+
isEnabledErrorMessage
|
|
11100
|
+
}
|
|
11101
|
+
}
|
|
11102
|
+
}
|
|
11103
|
+
`;
|
|
11104
|
+
dist.gql`
|
|
11105
|
+
mutation ($formSubmissionInput: FormSubmissionInput!) {
|
|
11106
|
+
submitForm(formSubmissionInput: $formSubmissionInput) {
|
|
11107
|
+
success
|
|
11108
|
+
results {
|
|
11109
|
+
... on FormHandlerSubmissionResult {
|
|
11110
|
+
formHandler {
|
|
11111
|
+
name
|
|
11112
|
+
endpointUrl
|
|
11113
|
+
integration {
|
|
11114
|
+
name
|
|
11115
|
+
}
|
|
11116
|
+
}
|
|
11117
|
+
result
|
|
11118
|
+
}
|
|
11119
|
+
... on FormHandlerError {
|
|
11120
|
+
formHandler {
|
|
11121
|
+
name
|
|
11122
|
+
endpointUrl
|
|
11123
|
+
integration {
|
|
11124
|
+
name
|
|
11125
|
+
}
|
|
11126
|
+
}
|
|
11127
|
+
errorType
|
|
11128
|
+
error
|
|
11129
|
+
errorCode
|
|
11130
|
+
}
|
|
11131
|
+
}
|
|
11132
|
+
}
|
|
11133
|
+
}
|
|
11134
|
+
`;
|
|
11135
|
+
dist.gql`
|
|
11136
|
+
query ($formValidationInput: FormValidationInput!) {
|
|
11137
|
+
validateForm(formValidationInput: $formValidationInput) {
|
|
11138
|
+
valid
|
|
11139
|
+
results {
|
|
11140
|
+
... on FormHandlerValidationResult {
|
|
11141
|
+
formHandler {
|
|
11142
|
+
name
|
|
11143
|
+
endpointUrl
|
|
11144
|
+
integration {
|
|
11145
|
+
name
|
|
11146
|
+
}
|
|
11147
|
+
}
|
|
11148
|
+
result
|
|
11149
|
+
}
|
|
11150
|
+
... on FormHandlerError {
|
|
11151
|
+
formHandler {
|
|
11152
|
+
name
|
|
11153
|
+
endpointUrl
|
|
11154
|
+
integration {
|
|
11155
|
+
name
|
|
11156
|
+
}
|
|
11157
|
+
}
|
|
11158
|
+
errorType
|
|
11159
|
+
error
|
|
11160
|
+
errorCode
|
|
11161
|
+
}
|
|
11162
|
+
}
|
|
11163
|
+
}
|
|
11164
|
+
}
|
|
11165
|
+
`;
|
|
11166
|
+
|
|
11167
|
+
exports.GRAPHQL_CONTEXT = GRAPHQL_CONTEXT;
|
|
11168
|
+
exports.dist = dist;
|
|
11169
|
+
exports.getContextValueName = getContextValueName;
|
|
8795
11170
|
exports.getEnvironmentSDK = getEnvironmentSDK;
|
|
8796
|
-
exports.hn = hn;
|
|
8797
11171
|
exports.isDemo = isDemo;
|
|
8798
|
-
exports.
|
|
8799
|
-
exports.
|
|
8800
|
-
exports.
|
|
8801
|
-
exports.ln = ln;
|
|
8802
|
-
exports.nn = nn;
|
|
11172
|
+
exports.memoizedGraphQLClient = memoizedGraphQLClient;
|
|
11173
|
+
exports.navigation = navigation;
|
|
11174
|
+
exports.setImplementation = setImplementation;
|
|
8803
11175
|
exports.setProgramId = setProgramId;
|
|
8804
11176
|
exports.setUserIdentity = setUserIdentity;
|
|
8805
|
-
exports.
|
|
11177
|
+
exports.useAuthenticateManagedIdentityWithInstantAccess = useAuthenticateManagedIdentityWithInstantAccess;
|
|
11178
|
+
exports.useAuthenticateWithEmailAndPasswordMutation = useAuthenticateWithEmailAndPasswordMutation;
|
|
11179
|
+
exports.useAuthenticateWithGoogle = useAuthenticateWithGoogle;
|
|
8806
11180
|
exports.useCallback = useCallback;
|
|
8807
|
-
exports.
|
|
8808
|
-
exports.
|
|
8809
|
-
exports.
|
|
11181
|
+
exports.useChangePasswordMutation = useChangePasswordMutation;
|
|
11182
|
+
exports.useCurrentPage = useCurrentPage;
|
|
11183
|
+
exports.useEngagementMedium = useEngagementMedium;
|
|
11184
|
+
exports.useHost = useHost;
|
|
11185
|
+
exports.useLazyQuery = useLazyQuery;
|
|
11186
|
+
exports.useLocale = useLocale;
|
|
11187
|
+
exports.useManagedIdentitySessionQuery = useManagedIdentitySessionQuery;
|
|
11188
|
+
exports.useMutation = useMutation;
|
|
11189
|
+
exports.usePaginatedQuery = usePaginatedQuery;
|
|
11190
|
+
exports.useParent = useParent;
|
|
11191
|
+
exports.useParentQuery = useParentQuery;
|
|
11192
|
+
exports.useParentQueryValue = useParentQueryValue;
|
|
11193
|
+
exports.useParentState = useParentState;
|
|
11194
|
+
exports.useParentValue = useParentValue;
|
|
11195
|
+
exports.useProgramId = useProgramId;
|
|
11196
|
+
exports.useQuery = useQuery;
|
|
11197
|
+
exports.useRefreshDispatcher = useRefreshDispatcher;
|
|
11198
|
+
exports.useRegisterViaRegistrationFormMutation = useRegisterViaRegistrationFormMutation;
|
|
11199
|
+
exports.useRegisterWithEmailAndPasswordMutation = useRegisterWithEmailAndPasswordMutation;
|
|
11200
|
+
exports.useRequestPasswordResetEmailMutation = useRequestPasswordResetEmailMutation;
|
|
11201
|
+
exports.useRequestVerificationEmailMutation = useRequestVerificationEmailMutation;
|
|
11202
|
+
exports.useResetPasswordMutation = useResetPasswordMutation;
|
|
11203
|
+
exports.useSetParent = useSetParent;
|
|
11204
|
+
exports.useTenantAlias = useTenantAlias;
|
|
11205
|
+
exports.useTick = useTick;
|
|
11206
|
+
exports.useToken = useToken;
|
|
11207
|
+
exports.useUserIdentity = useUserIdentity;
|
|
11208
|
+
exports.useVerifyEmailMutation = useVerifyEmailMutation;
|
|
11209
|
+
exports.useVerifyPasswordResetCodeMutation = useVerifyPasswordResetCodeMutation;
|