@saasquatch/mint-components 1.6.0-0 → 1.6.0-3
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/{ShadowViewAddon-67ab6be4.js → ShadowViewAddon-0137b261.js} +2 -2
- package/dist/cjs/{global-aaa3f929.js → global-dadddab7.js} +1 -1
- package/dist/cjs/{index.module-b9e4136f.js → index.module-1c799b1f.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/{re-render-90da06a2.js → re-render-1f64b7e4.js} +3 -3
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat_35.cjs.entry.js +10 -10
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-navigation-sidebar-item-view-919190ec.js → sqm-navigation-sidebar-item-view-7b5192f8.js} +1 -1
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-password-field.cjs.entry.js +1 -1
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-83e44767.js → sqm-portal-email-verification-view-7aafc301.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +4 -3
- package/dist/cjs/{sqm-portal-footer-view-b2dc31a2.js → sqm-portal-footer-view-eca61afc.js} +1 -1
- package/dist/cjs/sqm-portal-footer.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +2 -1
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-profile-view-3b7650df.js → sqm-portal-profile-view-8aac8922.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +3 -3
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +7 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +5 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -8
- package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{useChildElements-315320bd.js → useChildElements-5500a263.js} +2 -2
- package/dist/cjs/{useReferralTable-32fed069.js → useReferralTable-9c4f5958.js} +3 -3
- package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +1 -0
- package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +1 -0
- package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +6 -0
- package/dist/esm/{ShadowViewAddon-2b1e68bd.js → ShadowViewAddon-4558079b.js} +2 -2
- package/dist/esm/{global-3b481fc7.js → global-78c0c467.js} +1 -1
- package/dist/esm/{index.module-23da8fa0.js → index.module-2b4f1755.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/{re-render-3368de52.js → re-render-5c1dfc11.js} +3 -3
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat_35.entry.js +10 -10
- package/dist/esm/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +2 -2
- package/dist/esm/{sqm-navigation-sidebar-item-view-fbbc41b5.js → sqm-navigation-sidebar-item-view-3485c8f6.js} +1 -1
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +1 -1
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-825ee492.js → sqm-portal-email-verification-view-b3110468.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +4 -3
- package/dist/esm/{sqm-portal-footer-view-fd0225f4.js → sqm-portal-footer-view-f342a626.js} +1 -1
- package/dist/esm/sqm-portal-footer.entry.js +3 -3
- package/dist/esm/sqm-portal-forgot-password.entry.js +2 -1
- package/dist/esm/sqm-portal-logout.entry.js +1 -1
- package/dist/esm/{sqm-portal-profile-view-61c2c482.js → sqm-portal-profile-view-0700f41d.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +3 -3
- package/dist/esm/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +7 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +5 -5
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +5 -5
- package/dist/esm/sqm-stencilbook.entry.js +8 -8
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{useChildElements-ad0746fa.js → useChildElements-3b3440e2.js} +2 -2
- package/dist/esm/{useReferralTable-8fe4bd12.js → useReferralTable-7cae0c08.js} +3 -3
- package/dist/esm-es5/{ShadowViewAddon-2b1e68bd.js → ShadowViewAddon-4558079b.js} +1 -1
- package/dist/esm-es5/{global-3b481fc7.js → global-78c0c467.js} +1 -1
- package/dist/esm-es5/{index.module-23da8fa0.js → index.module-2b4f1755.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-3368de52.js → re-render-5c1dfc11.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-fbbc41b5.js → sqm-navigation-sidebar-item-view-3485c8f6.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- 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-email-verification-view-825ee492.js → sqm-portal-email-verification-view-b3110468.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-footer-view-fd0225f4.js → sqm-portal-footer-view-f342a626.js} +1 -1
- package/dist/esm-es5/sqm-portal-footer.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-61c2c482.js → sqm-portal-profile-view-0700f41d.js} +1 -1
- 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-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.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-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/useChildElements-3b3440e2.js +1 -0
- package/dist/esm-es5/{useReferralTable-8fe4bd12.js → useReferralTable-7cae0c08.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/p-036f21e8.js +1 -0
- package/dist/mint-components/{p-bc72afd4.entry.js → p-1b75e2de.entry.js} +1 -1
- package/dist/mint-components/p-1f7979c8.js +1 -0
- package/dist/mint-components/p-24f8c2f6.entry.js +1 -0
- package/dist/mint-components/{p-6cb7ca36.js → p-290fb781.js} +1 -1
- package/dist/mint-components/{p-a7fe3715.system.js → p-29b9535d.system.js} +1 -1
- package/dist/mint-components/{p-c6c911a5.system.entry.js → p-2b03ad0f.system.entry.js} +1 -1
- package/dist/mint-components/{p-9a03d2d8.entry.js → p-2d8fe868.entry.js} +1 -1
- package/dist/mint-components/p-2f94fcc9.entry.js +1 -0
- package/dist/mint-components/{p-092c73b2.system.js → p-36e3a80f.system.js} +1 -1
- package/dist/mint-components/{p-c34200f5.entry.js → p-37f31887.entry.js} +1 -1
- package/dist/mint-components/p-3908f30f.entry.js +13 -0
- package/dist/mint-components/{p-e9a11c35.entry.js → p-429afd94.entry.js} +1 -1
- package/dist/mint-components/{p-79db0843.system.entry.js → p-4a5d60e4.system.entry.js} +1 -1
- package/dist/mint-components/{p-3d6b2357.system.js → p-4c574411.system.js} +1 -1
- package/dist/mint-components/{p-ab2f103f.system.entry.js → p-4cfdf659.system.entry.js} +1 -1
- package/dist/mint-components/{p-a2c865c1.system.entry.js → p-54c7b2d8.system.entry.js} +1 -1
- package/dist/mint-components/p-5530746b.entry.js +1 -0
- package/dist/mint-components/{p-bef21e92.system.js → p-5669b834.system.js} +1 -1
- package/dist/mint-components/{p-2620c909.system.entry.js → p-5fad64ff.system.entry.js} +1 -1
- package/dist/mint-components/{p-40104334.js → p-62145eed.js} +1 -1
- package/dist/mint-components/{p-41633759.entry.js → p-63b2d80f.entry.js} +1 -1
- package/dist/mint-components/{p-ce86e36f.system.entry.js → p-6882941e.system.entry.js} +1 -1
- package/dist/mint-components/{p-48476882.entry.js → p-69568af5.entry.js} +2 -2
- package/dist/mint-components/{p-1f1ea7b5.js → p-6a18a3b9.js} +1 -1
- package/dist/mint-components/{p-85087b21.js → p-6e2ca2a0.js} +1 -1
- package/dist/mint-components/p-719f652f.entry.js +1 -0
- package/dist/mint-components/{p-3dd20384.entry.js → p-72e2f41c.entry.js} +1 -1
- package/dist/mint-components/{p-c750d5c5.system.js → p-7feaa042.system.js} +1 -1
- package/dist/mint-components/{p-c9afecee.system.entry.js → p-81f4f037.system.entry.js} +1 -1
- package/dist/mint-components/p-850f2a6b.entry.js +1 -0
- package/dist/mint-components/{p-0568ccb2.system.entry.js → p-86fcb500.system.entry.js} +1 -1
- package/dist/mint-components/p-889dbba5.entry.js +1 -0
- package/dist/mint-components/{p-98164439.system.js → p-902c11bb.system.js} +1 -1
- package/dist/mint-components/{p-a96702e2.system.js → p-9744ae44.system.js} +1 -1
- package/dist/mint-components/p-9f672bee.js +1 -0
- package/dist/mint-components/p-a73784bb.entry.js +1 -0
- package/dist/mint-components/{p-7607d5b8.system.entry.js → p-ad18d528.system.entry.js} +1 -1
- package/dist/mint-components/p-adeacc26.entry.js +1 -0
- package/dist/mint-components/{p-692db6d6.entry.js → p-ae7b4ec1.entry.js} +2 -2
- package/dist/mint-components/p-aecf1b25.system.entry.js +1 -0
- package/dist/mint-components/{p-8a0aa2c2.system.js → p-b1db5e12.system.js} +1 -1
- package/dist/mint-components/{p-2d37c91f.js → p-be946087.js} +2 -2
- package/dist/mint-components/{p-2b7af7c4.system.entry.js → p-c3ac2563.system.entry.js} +1 -1
- package/dist/mint-components/{p-f4008f63.js → p-ccc2437d.js} +1 -1
- package/dist/mint-components/p-cfa61592.entry.js +1 -0
- package/dist/mint-components/{p-c9f239c4.system.entry.js → p-d0d34e3e.system.entry.js} +1 -1
- package/dist/mint-components/p-d3411faf.system.entry.js +1 -0
- package/dist/mint-components/{p-37f18cb2.js → p-d7c90aaf.js} +1 -1
- package/dist/mint-components/{p-6b5830c0.system.js → p-d7ce3b77.system.js} +1 -1
- package/dist/mint-components/{p-b0edbe25.system.entry.js → p-d9d9d571.system.entry.js} +1 -1
- package/dist/mint-components/{p-5eec9992.system.entry.js → p-dc25bb20.system.entry.js} +1 -1
- package/dist/mint-components/p-eb2a3eba.entry.js +9 -0
- package/dist/mint-components/{p-6badb7b8.system.entry.js → p-ec634002.system.entry.js} +1 -1
- package/dist/mint-components/{p-37232f63.system.js → p-ed22d613.system.js} +1 -1
- package/dist/mint-components/{p-db3637b4.system.entry.js → p-edc7f769.system.entry.js} +1 -1
- package/dist/mint-components/{p-69fbe6a4.entry.js → p-f13b29a6.entry.js} +1 -1
- package/dist/mint-components/{p-0732a954.system.js → p-f29d1061.system.js} +1 -1
- package/dist/mint-components/{p-cdf31925.system.entry.js → p-f38d11a5.system.entry.js} +1 -1
- package/dist/mint-components/{p-c922af25.system.entry.js → p-f44b04d0.system.entry.js} +1 -1
- package/dist/mint-components/{p-6ae460a6.system.entry.js → p-f9358dc5.system.entry.js} +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/useChildElements-ad0746fa.js +0 -1
- package/dist/mint-components/p-076a5ca5.entry.js +0 -1
- package/dist/mint-components/p-09d29174.entry.js +0 -1
- package/dist/mint-components/p-0b115074.system.entry.js +0 -1
- package/dist/mint-components/p-2617d103.system.entry.js +0 -1
- package/dist/mint-components/p-4502a264.entry.js +0 -1
- package/dist/mint-components/p-6237c202.entry.js +0 -1
- package/dist/mint-components/p-69ebe7e3.entry.js +0 -9
- package/dist/mint-components/p-6e33fcfe.entry.js +0 -1
- package/dist/mint-components/p-75b9bdf1.js +0 -1
- package/dist/mint-components/p-7669b806.entry.js +0 -13
- package/dist/mint-components/p-b46d6eb0.entry.js +0 -1
- package/dist/mint-components/p-bfcd61f9.entry.js +0 -1
- package/dist/mint-components/p-c564c4bf.entry.js +0 -1
- package/dist/mint-components/p-ea63fd6f.entry.js +0 -1
- package/dist/mint-components/p-f97cf424.js +0 -1
- package/dist/mint-components/p-fc789a00.js +0 -1
|
@@ -4,18 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
const global = require('./global-
|
|
7
|
+
const global = require('./global-dadddab7.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-1c799b1f.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-fe9d4112.js');
|
|
13
13
|
const JSS = require('./JSS-97fd087e.js');
|
|
14
14
|
const GenericTableView = require('./GenericTableView-9d93f114.js');
|
|
15
|
-
const reRender = require('./re-render-
|
|
16
|
-
const useChildElements = require('./useChildElements-
|
|
15
|
+
const reRender = require('./re-render-1f64b7e4.js');
|
|
16
|
+
const useChildElements = require('./useChildElements-5500a263.js');
|
|
17
17
|
const luxon = require('./luxon-59ca7d19.js');
|
|
18
|
-
const useReferralTable = require('./useReferralTable-
|
|
18
|
+
const useReferralTable = require('./useReferralTable-9c4f5958.js');
|
|
19
19
|
const utils = require('./utils-6847bc06.js');
|
|
20
20
|
|
|
21
21
|
const mockRewardData = (count = 4) => {
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
|
-
require('./global-
|
|
7
|
+
require('./global-dadddab7.js');
|
|
8
8
|
require('./use-callback-e754042f.js');
|
|
9
|
-
const index_module = require('./index.module-
|
|
9
|
+
const index_module = require('./index.module-1c799b1f.js');
|
|
10
10
|
require('./extends-08099afd.js');
|
|
11
11
|
require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-fe9d4112.js');
|
|
@@ -19,15 +19,15 @@ const sqmAssetCardView = require('./sqm-asset-card-view-3da8cac1.js');
|
|
|
19
19
|
const sqmHeroView = require('./sqm-hero-view-46223e34.js');
|
|
20
20
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
|
|
21
21
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-969adcdc.js');
|
|
22
|
-
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-
|
|
23
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
24
|
-
const sqmPortalFooterView = require('./sqm-portal-footer-view-
|
|
22
|
+
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-7b5192f8.js');
|
|
23
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-7aafc301.js');
|
|
24
|
+
const sqmPortalFooterView = require('./sqm-portal-footer-view-eca61afc.js');
|
|
25
25
|
const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-fed1f563.js');
|
|
26
26
|
const sqmPortalContainerView = require('./sqm-portal-container-view-840db620.js');
|
|
27
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
27
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-8aac8922.js');
|
|
28
28
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-f8dc0b79.js');
|
|
29
29
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-cc59877c.js');
|
|
30
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
30
|
+
const ShadowViewAddon = require('./ShadowViewAddon-0137b261.js');
|
|
31
31
|
const sqmPortalSectionView = require('./sqm-portal-section-view-854a3e9c.js');
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -4334,7 +4334,7 @@ const PortalEmailVerification = /*#__PURE__*/Object.freeze({
|
|
|
4334
4334
|
EmailVerificationSuccess: EmailVerificationSuccess
|
|
4335
4335
|
});
|
|
4336
4336
|
|
|
4337
|
-
const scenario$8 = "@author:derek\n@owner:ian\nFeature: Reset Password\n\n Background: A user in on the password reset page\n Given a user who has been redirected to the password reset page\n\n @motivating\n Scenario: Users can reset their password\n Given a user has a valid oob code as a url query parameter\n When they enter their password twice\n And they click \"Update\"\n Then their password is updated\n And a banner with a success message is displayed\n And they can log in with their new password\n\n @motivating\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their password reset code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users must enter the same password twice to successfully reset their password\n Given a user has been redirected to the password reset page\n And they have a valid oob code as a url query parameter\n When they enter two different passwords into the password reset form\n And they click \"Update\"\n Then their password is not be reset\n And an error banner stating the input passwords must match appears\n And their password is not be reset\n When they enter the same password twice\n And they click \"Update\"\n Then a banner appears with a success message\n And they can log in with their new password\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has entered their password twice\n When they click \"Update\"\n Then their password is updated\n And they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has entered their password twice\n When they click \"Update\"\n Then their password is updated\n And they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n When they click \"Update\"\n Then their password is updated\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n When they click \"Update\"\n Then their password is updated\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |";
|
|
4337
|
+
const scenario$8 = "@author:derek\n@owner:ian\nFeature: Reset Password\n\n Background: A user in on the password reset page\n Given a user who has been redirected to the password reset page\n\n @motivating\n Scenario: Users can reset their password\n Given a user has a valid oob code as a url query parameter\n When they enter their password twice\n And they click \"Update\"\n Then their password is updated\n And a banner with a success message is displayed\n And they can log in with their new password\n\n @motivating\n Scenario Outline: Users cannot reset their password with an invalid or missing oob code\n Given a user has a <oobCode> as a url query parameter\n And the component <mayHave> \"failed-page\" with <value>\n Then they see an error message saying that their password reset code is invalid/expired\n When they click \"Continue\"\n Then they are redirected to <redirectPath>\n Examples:\n | oobCode | mayHave | value | redirectPath |\n | invalid oob code | doesn't have | N/A | / |\n | non existant oob code | doesn't have | N/A | / |\n | invalid oob code | has | /login | /login |\n | non existant oob code | has | /login | /login |\n\n @motivating\n Scenario: Users must enter the same password twice to successfully reset their password\n Given a user has been redirected to the password reset page\n And they have a valid oob code as a url query parameter\n When they enter two different passwords into the password reset form\n And they click \"Update\"\n Then their password is not be reset\n And an error banner stating the input passwords must match appears\n And their password is not be reset\n When they enter the same password twice\n And they click \"Update\"\n Then a banner appears with a success message\n And they can log in with their new password\n\n @motivating\n Scenario: Users are notified if resetting their password fails\n Given a user has a valid oob code as a url query parameter\n When they enter their password twice\n And they click \"Update\"\n But the password reset fails\n Then the user's password does not reset\n And an error banner is shown\n\n @motivating\n Scenario: Users are redirected to \"/\" by default\n Given the component does not have prop \"nextPage\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has entered their password twice\n When they click \"Update\"\n Then their password is updated\n And they are redirected to \"/\"\n\n @motivating\n Scenario: Custom redirection can be configured\n Given the component has prop \"nextPage\" with value \"/activity\"\n And the users url does not contain a \"nextPage\" query parameter\n And a user has entered their password twice\n When they click \"Update\"\n Then their password is updated\n And they are redirected to \"/activity\"\n\n @motivating\n Scenario Outline: Users are redirected to the value of the nextPage url parameter as if it were a relative path\n Given the component is loaded at <currentUrl>\n When they click \"Update\"\n Then their password is updated\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://www.example.com?nextPage=./activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=/activity | https://www.example.com/activity |\n | https://www.example.com?nextPage=www.google.com | https://www.example.com/www.google.com |\n | https://www.example.com?nextPage=//foo.com | https://www.example.com/ |\n | https://www.example.com?nextPage=https://malicious.example.com | https://www.example.com/ |\n | http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 | http://www.example.com/activity |\n | https://www.example.com?nextPage=activity?foo=bar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash | https://www.example.com/activity?foo=bar |\n | https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash | https://www.example.com/activity?foo=bar#hash |\n | https://www.example.com:1337?nextPage=activity | https://www.example.com:1337/activity |\n | http://1.1.1.1:1111?nextPage=activity | http://1.1.1.1:1111/activity |\n\n @landmine\n Scenario Outline: Username and password are not persisted on redirects\n Given the component is loaded at <currentUrl>\n When they click \"Update\"\n Then their password is updated\n And they are redirected to <url>\n Examples:\n | currentUrl | url |\n | https://user:pass@www.example.com:444?nextPage=activity | https://www.example.com:444/activity |";
|
|
4338
4338
|
|
|
4339
4339
|
const PortalResetPassword_stories = {
|
|
4340
4340
|
title: "Components/Portal Reset Password",
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b0129cd6.js');
|
|
6
6
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
7
7
|
require('./use-callback-e754042f.js');
|
|
8
|
-
const index_module = require('./index.module-
|
|
8
|
+
const index_module = require('./index.module-1c799b1f.js');
|
|
9
9
|
require('./extends-08099afd.js');
|
|
10
|
-
const useChildElements = require('./useChildElements-
|
|
10
|
+
const useChildElements = require('./useChildElements-5500a263.js');
|
|
11
11
|
const utils = require('./utils-6847bc06.js');
|
|
12
12
|
|
|
13
13
|
const TabsView = ({ content, placement, }) => {
|
|
@@ -38,7 +38,7 @@ const TabsView = ({ content, placement, }) => {
|
|
|
38
38
|
const REVEAL_EVENT = "sq:reveal";
|
|
39
39
|
function useTabs() {
|
|
40
40
|
const rawTabs = useChildElements.useChildElements();
|
|
41
|
-
const host = index_module.
|
|
41
|
+
const host = index_module.P();
|
|
42
42
|
const tabs = stencilHooks_module.useMemo(() => rawTabs
|
|
43
43
|
.filter((tab) => tab.tagName === "SQM-TAB")
|
|
44
44
|
.map((tab, i) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
4
|
-
const index_module = require('./index.module-
|
|
4
|
+
const index_module = require('./index.module-1c799b1f.js');
|
|
5
5
|
|
|
6
6
|
function useChildElements() {
|
|
7
|
-
const host = index_module.
|
|
7
|
+
const host = index_module.P();
|
|
8
8
|
const initialState = host.children.length
|
|
9
9
|
? Array.from(host.children)
|
|
10
10
|
: [];
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-b0129cd6.js');
|
|
4
4
|
const stencilHooks_module = require('./stencil-hooks.module-87a1f4f7.js');
|
|
5
|
-
const index_module = require('./index.module-
|
|
6
|
-
const reRender = require('./re-render-
|
|
7
|
-
const useChildElements = require('./useChildElements-
|
|
5
|
+
const index_module = require('./index.module-1c799b1f.js');
|
|
6
|
+
const reRender = require('./re-render-1f64b7e4.js');
|
|
7
|
+
const useChildElements = require('./useChildElements-5500a263.js');
|
|
8
8
|
|
|
9
9
|
const debug = stencilHooks_module.browser("sq:useReferralTable");
|
|
10
10
|
const CSS_NAMESPACE = "sqm-referral-table";
|
package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js
CHANGED
|
@@ -13,6 +13,7 @@ export function usePortalEmailVerification(props) {
|
|
|
13
13
|
if (!email)
|
|
14
14
|
return;
|
|
15
15
|
setError("");
|
|
16
|
+
setSuccess(false);
|
|
16
17
|
const urlParams = nextPage ? { nextPage } : null;
|
|
17
18
|
const redirectPath = props.redirectPath;
|
|
18
19
|
const variables = { email, urlParams, redirectPath };
|
|
@@ -10,6 +10,7 @@ export function usePortalForgotPassword(props) {
|
|
|
10
10
|
const nextPage = urlParams.get("nextPage");
|
|
11
11
|
const submit = async (event) => {
|
|
12
12
|
setError("");
|
|
13
|
+
setSuccess(false);
|
|
13
14
|
let formData = event.detail.formData;
|
|
14
15
|
formData === null || formData === void 0 ? void 0 : formData.forEach((value, key) => {
|
|
15
16
|
jsonpointer.set(formData, key, value);
|
|
@@ -54,6 +54,12 @@ export function usePortalResetPassword(props) {
|
|
|
54
54
|
setError("Network request failed.");
|
|
55
55
|
}
|
|
56
56
|
}, [verifyPasswordResetCodeState === null || verifyPasswordResetCodeState === void 0 ? void 0 : verifyPasswordResetCodeState.errors]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
var _a;
|
|
59
|
+
if ((_a = resetPasswordState === null || resetPasswordState === void 0 ? void 0 : resetPasswordState.errors) === null || _a === void 0 ? void 0 : _a.message) {
|
|
60
|
+
setError("Network request failed.");
|
|
61
|
+
}
|
|
62
|
+
}, [resetPasswordState === null || resetPasswordState === void 0 ? void 0 : resetPasswordState.errors]);
|
|
57
63
|
return {
|
|
58
64
|
states: {
|
|
59
65
|
loading: resetPasswordState.loading,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, c as Host, d as getAssetPath, g as getElement } from './index-17b4da69.js';
|
|
2
2
|
import { k as useState, b as browser, j as useMemo } from './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
4
|
-
import { d as dist, A, a as ae, J, p as pn, $ as $e, H, O } from './index.module-
|
|
3
|
+
import { i as intl } from './global-78c0c467.js';
|
|
4
|
+
import { d as dist, A, a as ae, J, p as pn, $ as $e, H, O } from './index.module-2b4f1755.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
6
|
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-f60a614c.js';
|
|
7
7
|
import { c as createStyleSheet, j as jss, a as create } from './JSS-f00f9536.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getAugmentedNamespace, c as createCommonjsModule, a as commonjsGlobal, b as browser, l as l$1 } from './stencil-hooks.module-e39af977.js';
|
|
2
|
-
import { s as src, m as memoize, E } from './index.module-
|
|
2
|
+
import { s as src, m as memoize, E } from './index.module-2b4f1755.js';
|
|
3
3
|
|
|
4
4
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
5
5
|
__assign = Object.assign || function(t) {
|
|
@@ -8135,6 +8135,6 @@ function parsePath(path) {
|
|
|
8135
8135
|
return parsedPath;
|
|
8136
8136
|
}
|
|
8137
8137
|
|
|
8138
|
-
var q,P={current:void 0};function S(){if(void 0===P.current)throw new Error("no implementation of useHost provided");return P.current()}function E(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");P.current=e;}function M(){var e;window.squatchProgramId||(window.squatchProgramId=new c({element:document.documentElement,initialState:(null==(e=window.widgetIdent)?void 0:e.programId)||void 0,contextName:"sq:program-id"}).start());}function A(){M();var n=S();return h(n,"sq:program-id")}function D(e){M(),window.squatchProgramId.context=e;}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 j(e,n){return (j=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function $(e,n){return n||(n=e.slice(0)),e.raw=n,e}function x(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 R(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 x(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)?x(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 V=dist.gql(q||(q=$(["\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"])));function O(){!function(){var e,r=window.squatchLocale,a=ae();useEffect(function(){if(!a&&r)return r.context=void 0;s({});},[a]);var o,i=Ye(V),s=i[0],u=i[1].data,c$1=null==u||null==(e=u.viewer)?void 0:e.locale;r?c$1!==r.context&&(r.context=c$1):window.squatchLocale=new c({element:document.documentElement,initialState:c$1||(null==(o=window.widgetIdent)?void 0:o.locale)||void 0,contextName:"sq:locale"}).start();}();var r=S();return h(r,"sq:locale")}function N(e){var n=window.squatchLocale;n&&(n.context=e);}function H(){var e,n;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:window.widgetIdent&&"demo"!==(null==(e=window.widgetIdent)?void 0:e.env)?{type:"SquatchJS2",api:null==(n=window.frameElement)?void 0:n.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function L(){var e=H();return "None"===e.type||"SquatchAdmin"===e.type}function W(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return e.widgetIdent.tenantAlias;case"SquatchAdmin":case"None":return "demo";case"SquatchPortal":return e.env.tenantAlias}}function U(){var e,n=H();switch(n.type){case"SquatchAndroid":case"SquatchJS2":return n.widgetIdent.appDomain;case"SquatchPortal":return (null==(e=n.env)?void 0:e.appDomain)||"https://app.referralsaasquatch.com";case"SquatchAdmin":case"None":return "https://app.referralsaasquatch.com"}}function J(){var e=H();switch(e.type){case"SquatchJS2":return e.widgetIdent.engagementMedium||"EMBED";case"SquatchAndroid":case"SquatchPortal":case"SquatchAdmin":case"None":return "EMBED"}}var _=1e3,Q=60*_,T=60*Q,z=24*T,G=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*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*T;case"minutes":case"minute":case"mins":case"min":case"m":return t*Q;case"seconds":case"second":case"secs":case"sec":case"s":return t*_;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>=z?B(e,n,z,"day"):n>=T?B(e,n,T,"hour"):n>=Q?B(e,n,Q,"minute"):n>=_?B(e,n,_,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=z?Math.round(e/z)+"d":n>=T?Math.round(e/T)+"h":n>=Q?Math.round(e/Q)+"m":n>=_?Math.round(e/_)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function B(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var K,Z=(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=G,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}};}(K={exports:{}},K.exports),K.exports),X=Z("sq:user-identity");function Y(){window.squatchUserIdentity||(window.squatchUserIdentity=new c({element:document.documentElement,initialState:ne(),contextName:"sq:user-identity"}).start());}function ee(e){if(e)try{var n,t,r=o(e),a=r.exp;if(function(e){return e.sub&&/.*:.*@.*:users/.test(e.sub)}(r)){var o$1=r.sub.match(/(.*):(.*)@(.*):users/);t=atob(o$1[1]),n=atob(o$1[2]);}else (function(e){return e.user&&e.user.id&&e.user.accountId})(r)&&(t=r.user.accountId,n=r.user.id);if(!n||!t)return;if(a&&Date.now()>=1e3*a)return;return {id:n,accountId:t,jwt:e}}catch(e){return}}function ne(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return {id:e.widgetIdent.userId,accountId:e.widgetIdent.accountId,jwt:e.widgetIdent.token};case"SquatchPortal":var n=new URLSearchParams(document.location.search);if(n.has("jwt"))return ee(n.get("jwt"));var t=localStorage.getItem("sq:user-identity");if(!t)return;try{var r=JSON.parse(t),a=ee(r.jwt);return a?k({},r,a):void 0}catch(e){return}case"SquatchAdmin":case"None":return}}function te(e){Y();var n=window.squatchUserIdentity;equal(n.context,e)||(N(void 0),n.context=e),e&&"SquatchPortal"===H().type?localStorage.setItem("sq:user-identity",JSON.stringify(e)):e||(X("Deleting user from localStorage"),localStorage.removeItem("sq:user-identity"));}function re(){var e;return null==(e=ae())?void 0:e.jwt}function ae(){Y();var n=S(),t=h(n,"sq:user-identity"),r=ee(null==t?void 0:t.jwt);return t&&!r?(te(void 0),void N(void 0)):t}var oe=function(){return (oe=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)},ie=new Map,se=new Map,ue=!0,ce=!1;function de(e){return e.replace(/[\s,]+/g," ").trim()}function le(e){var n,t,r,a=de(e);if(!ie.has(a)){var o=parse(e,{experimentalFragmentVariables:ce});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ie.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=de((i=e.loc).source.body.substring(i.start,i.end)),o=se.get(n);o&&!o.has(a)?ue&&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||se.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),oe(oe({},n),{definitions:r}))));}return ie.get(a)}function fe(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];}),le(r)}var me,ve=fe;(me=fe||(fe={})).gql=ve,me.resetCaches=function(){ie.clear(),se.clear();},me.disableFragmentWarnings=function(){ue=!1;},me.enableExperimentalFragmentVariables=function(){ce=!0;},me.disableExperimentalFragmentVariables=function(){ce=!1;},fe.default=fe;var ge=fe;function pe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var he=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=Ce(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=R(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(pe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){qe(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:Se(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=be(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(a,1),t=i.splice(c,1)[0];var d=Ie(e.response.data,t);s[a]=we(s[a],u);var l=t.query,f=t.variables,v=k({},e.response,{errors:[n],data:d,path:s}),g=new types.ClientError(v,{query:"string"!=typeof l?print(l):l,variables:f});return Pe(t,g),!0}return !1});},c=R(r);!(a=c()).done;)u();qe(t,i);}();if("object"==typeof n)return n.v}else Se(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=pe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Fe(n,e);})},function(n){Pe(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,j(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){var t=this;return new Promise(function(r,a){var o={query:e,variables:n,id:ye(),resolve:r,reject:a};t.subject.next(o);})},r}(dist.GraphQLClient),ye=function(){return nanoid().replace(/[-_]/g,"")},we=function(e,n){return e.replace("_"+n,"")},be=function(e){var n=e.split("_");return n[n.length-1]},Ce=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id;try{var s="string"==typeof a?parse(a):a,u=s.definitions.find(function(e){return "FragmentDefinition"===e.kind}),c="string"==typeof a?a:print(a),d=/@/.test(c);if(u||d)return t.push(r),e;var l=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(s,[o],l,l),n.push(r),e}catch(n){return t.push(r),e}},w("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},Ie=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={})[we(t,r)]=e[t],a))),n},{})},Fe=function(e,n){(0, n.resolve)(e);},qe=function(e,n){for(var t,r=R(n);!(t=r()).done;){var a=t.value,o=Ie(e,a);a.resolve(o);}},Pe=function(e,n){(0, e.reject)(n);},Se=function(e,n){for(var t,r=R(e);!(t=r()).done;)(0, t.value.reject)(n);},Ee="sq:graphql-client",Me=src(function(e,n,t){return new he(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Ae(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 De(n,t){var o,i,s,u,c,d,l=(o=re(),i=U(),s=W(),u=Me(i,s,o),c=S(),null!=(d=h(c,"sq:graphql-client",{attempts:0}))?d:u),f=useReducer(Ae,t),m=f[1];return [f[0],useCallback(function(e,t){void 0===t&&(t=!1);try{if(!l)return m({type:"errors",payload:new Error("No GraphQL client found")}),Promise.resolve();var r=function(r,a){try{var o=(t||m({type:"loading"}),Promise.resolve(l.request(n,e)).then(function(e){m({type:"data",payload:e});}));}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){m({type:"errors",payload:e});});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[l,n,m])]}var ke,je={loading:!1,data:void 0,errors:void 0};function $e(e){var n=De(e,je);return [n[1],n[0]]}var xe,Re=ge(ke||(ke=$(["\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 Ve(){var e=$e(Re),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.authenticateManagedIdentityWithEmailAndPassword){var e=o$1.authenticateManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.authenticateManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Oe,Ne=ge(xe||(xe=$(["\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 He(){var e=$e(Ne),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.registerManagedIdentityWithEmailAndPassword){var e=o$1.registerManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.registerManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Le,We=ge(Oe||(Oe=$(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(We),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Je,_e=ge(Le||(Le=$(["\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 Qe(){var e=$e(_e),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.resetManagedIdentityPassword){var e=o$1.resetManagedIdentityPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.resetManagedIdentityPassword]),[n,{loading:a,data:o$1,errors:i}]}var Te=ge(Je||(Je=$(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function ze(){return $e(Te)}function Ge(){var e=S();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Be(e){var n=e.skip,r=void 0!==n&&n,a=e.update,s=e.variables;useEffect(function(){var e=function(e){!r&&a(s,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=useRef(e),t=useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),useMemo(function(){return n.current},[t.current])}([s,a,r]));}var Ke,Ze={loading:!1,data:void 0,errors:void 0},Xe=Symbol();function Ye(e){var n=De(e,Ze),t=n[0],r=n[1],a=useRef(Xe);return Be({skip:a.current===Xe,update:r,variables:a.current}),[r,k({},t,{refetch:function(e){a.current=e,r(e);}})]}var en,nn=ge(Ke||(Ke=$(["\n query ManagedIdentity {\n managedIdentity {\n email\n emailVerified\n sessionData\n }\n }\n"])));function tn(){var e=ae(),n=Ye(nn),r=n[0],o=n[1],i=o.loading,s=o.data,u=o.errors,c=o.refetch;return useEffect(function(){null!=s&&s.managedIdentity&&te(k({},e,{managedIdentity:s.managedIdentity}));},[null==s?void 0:s.managedIdentity]),[useCallback(function(){return r({})},[r]),{loading:i,data:s,errors:u,refetch:c}]}var rn,an=ge(en||(en=$(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function on(){var e,n=tn()[0],r=$e(an),a=r[0],o=r[1],i=o.loading,s=o.data,u=o.errors;return useEffect(function(){var e;null!=s&&null!=(e=s.verifyManagedIdentityEmail)&&e.success&&n();},[null==s||null==(e=s.verifyManagedIdentityEmail)?void 0:e.success]),[a,{loading:i,data:s,errors:u}]}var sn,un=ge(rn||(rn=$(["\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 cn(){return $e(un)}var dn=ge(sn||(sn=$(["\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)}function fn(e,n){var t=useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function mn(){return useReducer(function(e){return e+1},0)}function vn(e){for(var n,t=R(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&vn(r);}return Object.freeze(e)}var gn={loading:!0,data:void 0,errors:void 0};function pn(e,n,t){var r=De(e,gn),a=r[0],o=r[1],i=mn(),s=i[1];return fn(function(){!t&&o(n);},[e,n,o,i[0],t]),Be({skip:t,update:o,variables:n}),vn(k({},a,{refetch:s}))}function hn(){return window.squatchHistory=window.squatchHistory||function(){switch(H().type){case"SquatchPortal":return createBrowserHistory();default:return createMemoryHistory()}}(),window.squatchHistory}var yn,wn={createHref:function(){var e;return (e=hn()).createHref.apply(e,[].slice.call(arguments))},push:function(){var e;return (e=hn()).push.apply(e,[].slice.call(arguments))},replace:function(){var e;return (e=hn()).replace.apply(e,[].slice.call(arguments))},go:function(){var e;return (e=hn()).go.apply(e,[].slice.call(arguments))},back:function(){return hn().back()},forward:function(){var e;return (e=hn()).forward.apply(e,[].slice.call(arguments))}};function bn(){var e=mn()[1];return useEffect(function(){return hn().listen(function(){e();})},[]),hn().location}function Cn(e){var n=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},u=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=u(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=u(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 In(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=Cn(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=pn(e,k({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=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:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var Sn,En,Mn,An=dist.gql(yn||(yn=$(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var kn=Z("sq:useForm"),jn=dist.gql(Sn||(Sn=$(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),$n=dist.gql(En||(En=$(["\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"]))),xn=dist.gql(Mn||(Mn=$(["\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"])));
|
|
8138
|
+
var q,S={current:void 0};function P(){if(void 0===S.current)throw new Error("no implementation of useHost provided");return S.current()}function E(e){if(!e)throw new Error("Must supply an implementation");if("function"!=typeof e)throw new Error("implementation must be a function");S.current=e;}function M(){var e;window.squatchProgramId||(window.squatchProgramId=new c({element:document.documentElement,initialState:(null==(e=window.widgetIdent)?void 0:e.programId)||void 0,contextName:"sq:program-id"}).start());}function A(){M();var n=P();return h(n,"sq:program-id")}function D(e){M(),window.squatchProgramId.context=e;}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 j(e,n){return (j=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function $(e,n){return n||(n=e.slice(0)),e.raw=n,e}function x(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 R(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 x(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)?x(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 V=dist.gql(q||(q=$(["\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"])));function O(){!function(){var e,r=window.squatchLocale,a=ae();useEffect(function(){if(!a&&r)return r.context=void 0;s({});},[a]);var o,i=Ye(V),s=i[0],u=i[1].data,c$1=null==u||null==(e=u.viewer)?void 0:e.locale;r?c$1!==r.context&&(r.context=c$1):window.squatchLocale=new c({element:document.documentElement,initialState:c$1||(null==(o=window.widgetIdent)?void 0:o.locale)||void 0,contextName:"sq:locale"}).start();}();var r=P();return h(r,"sq:locale")}function N(e){var n=window.squatchLocale;n&&(n.context=e);}function H(){var e,n;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:window.widgetIdent&&"demo"!==(null==(e=window.widgetIdent)?void 0:e.env)?{type:"SquatchJS2",api:null==(n=window.frameElement)?void 0:n.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function L(){var e=H();return "None"===e.type||"SquatchAdmin"===e.type}function W(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return e.widgetIdent.tenantAlias;case"SquatchAdmin":case"None":return "demo";case"SquatchPortal":return e.env.tenantAlias}}function U(){var e,n=H();switch(n.type){case"SquatchAndroid":case"SquatchJS2":return n.widgetIdent.appDomain;case"SquatchPortal":return (null==(e=n.env)?void 0:e.appDomain)||"https://app.referralsaasquatch.com";case"SquatchAdmin":case"None":return "https://app.referralsaasquatch.com"}}function J(){var e=H();switch(e.type){case"SquatchJS2":return e.widgetIdent.engagementMedium||"EMBED";case"SquatchAndroid":case"SquatchPortal":case"SquatchAdmin":case"None":return "EMBED"}}var _=1e3,Q=60*_,T=60*Q,z=24*T,G=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*z;case"hours":case"hour":case"hrs":case"hr":case"h":return t*T;case"minutes":case"minute":case"mins":case"min":case"m":return t*Q;case"seconds":case"second":case"secs":case"sec":case"s":return t*_;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>=z?B(e,n,z,"day"):n>=T?B(e,n,T,"hour"):n>=Q?B(e,n,Q,"minute"):n>=_?B(e,n,_,"second"):e+" ms"}(e):function(e){var n=Math.abs(e);return n>=z?Math.round(e/z)+"d":n>=T?Math.round(e/T)+"h":n>=Q?Math.round(e/Q)+"m":n>=_?Math.round(e/_)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function B(e,n,t,r){var a=n>=1.5*t;return Math.round(e/t)+" "+r+(a?"s":"")}var K,Z=(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=G,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}};}(K={exports:{}},K.exports),K.exports),X=Z("sq:user-identity");function Y(){window.squatchUserIdentity||(window.squatchUserIdentity=new c({element:document.documentElement,initialState:ne(),contextName:"sq:user-identity"}).start());}function ee(e){if(e)try{var n,t,r=o(e),a=r.exp;if(function(e){return e.sub&&/.*:.*@.*:users/.test(e.sub)}(r)){var o$1=r.sub.match(/(.*):(.*)@(.*):users/);t=atob(o$1[1]),n=atob(o$1[2]);}else (function(e){return e.user&&e.user.id&&e.user.accountId})(r)&&(t=r.user.accountId,n=r.user.id);if(!n||!t)return;if(a&&Date.now()>=1e3*a)return;return {id:n,accountId:t,jwt:e}}catch(e){return}}function ne(){var e=H();switch(e.type){case"SquatchAndroid":case"SquatchJS2":return {id:e.widgetIdent.userId,accountId:e.widgetIdent.accountId,jwt:e.widgetIdent.token};case"SquatchPortal":var n=new URLSearchParams(document.location.search);if(n.has("jwt"))return ee(n.get("jwt"));var t=localStorage.getItem("sq:user-identity");if(!t)return;try{var r=JSON.parse(t),a=ee(r.jwt);return a?k({},r,a):void 0}catch(e){return}case"SquatchAdmin":case"None":return}}function te(e){Y();var n=window.squatchUserIdentity;equal(n.context,e)||(N(void 0),n.context=e),e&&"SquatchPortal"===H().type?localStorage.setItem("sq:user-identity",JSON.stringify(e)):e||(X("Deleting user from localStorage"),localStorage.removeItem("sq:user-identity"));}function re(){var e;return null==(e=ae())?void 0:e.jwt}function ae(){Y();var n=P(),t=h(n,"sq:user-identity"),r=ee(null==t?void 0:t.jwt);return t&&!r?(te(void 0),void N(void 0)):t}var oe=function(){return (oe=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)},ie=new Map,se=new Map,ue=!0,ce=!1;function de(e){return e.replace(/[\s,]+/g," ").trim()}function le(e){var n,t,r,a=de(e);if(!ie.has(a)){var o=parse(e,{experimentalFragmentVariables:ce});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ie.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=de((i=e.loc).source.body.substring(i.start,i.end)),o=se.get(n);o&&!o.has(a)?ue&&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||se.set(n,o=new Set),o.add(a),t.has(a)||(t.add(a),r.push(e));}else r.push(e);var i;}),oe(oe({},n),{definitions:r}))));}return ie.get(a)}function fe(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];}),le(r)}var me,ve=fe;(me=fe||(fe={})).gql=ve,me.resetCaches=function(){ie.clear(),se.clear();},me.disableFragmentWarnings=function(){ue=!1;},me.enableExperimentalFragmentVariables=function(){ce=!0;},me.disableExperimentalFragmentVariables=function(){ce=!1;},fe.default=fe;var ge=fe;function pe(e,n){try{var t=e();}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var he=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=Ce(e),o=t.mergedQuery,i=t.mergedVariables,s=t.mergedQueryAddedEvents,u=R(t.unmergedQueryAddedEvents);!(n=u()).done;)a.next(n.value);return s.length?Promise.resolve(pe(function(){return Promise.resolve(r.superRequest(o,i)).then(function(e){qe(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:Pe(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=be(r),c=i.findIndex(function(e){return e.id===u});if(-1===c)return !1;o.splice(a,1),t=i.splice(c,1)[0];var d=Ie(e.response.data,t);s[a]=we(s[a],u);var l=t.query,f=t.variables,v=k({},e.response,{errors:[n],data:d,path:s}),g=new types.ClientError(v,{query:"string"!=typeof l?print(l):l,variables:f});return Se(t,g),!0}return !1});},c=R(r);!(a=c()).done;)u();qe(t,i);}();if("object"==typeof n)return n.v}else Pe(s,e);})):Promise.resolve()}catch(e){return Promise.reject(e)}}),a.subscribe(function(e){try{var n=pe(function(){return Promise.resolve(r.superRequest(e.query,e.variables)).then(function(n){Fe(n,e);})},function(n){Se(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,j(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){var t=this;return new Promise(function(r,a){var o={query:e,variables:n,id:ye(),resolve:r,reject:a};t.subject.next(o);})},r}(dist.GraphQLClient),ye=function(){return nanoid().replace(/[-_]/g,"")},we=function(e,n){return e.replace("_"+n,"")},be=function(e){var n=e.split("_");return n[n.length-1]},Ce=function(e){var n=[],t=[],r=e.reduce(function(e,r){var a=r.query,o=r.variables,i=r.id;try{var s="string"==typeof a?parse(a):a,u=s.definitions.find(function(e){return "FragmentDefinition"===e.kind}),c="string"==typeof a?a:print(a),d=/@/.test(c);if(u||d)return t.push(r),e;var l=function(e){return function(e,n){return e+"_"+n}(e,i)};return e=e.addN(s,[o],l,l),n.push(r),e}catch(n){return t.push(r),e}},w("BatchedQuery")),a=r.document,o=r.variables;return {mergedQuery:a&&print(a),mergedVariables:o,mergedQueryAddedEvents:n,unmergedQueryAddedEvents:t}},Ie=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={})[we(t,r)]=e[t],a))),n},{})},Fe=function(e,n){(0, n.resolve)(e);},qe=function(e,n){for(var t,r=R(n);!(t=r()).done;){var a=t.value,o=Ie(e,a);a.resolve(o);}},Se=function(e,n){(0, e.reject)(n);},Pe=function(e,n){for(var t,r=R(e);!(t=r()).done;)(0, t.value.reject)(n);},Ee="sq:graphql-client",Me=src(function(e,n,t){return new he(e+"/api/v1/"+n+"/graphql",{headers:{Authorization:"Bearer "+(t||"")}})});function Ae(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 De(n,t){var o,i,s,u,c,d,l=(o=re(),i=U(),s=W(),u=Me(i,s,o),c=P(),null!=(d=h(c,"sq:graphql-client",{attempts:0}))?d:u),f=useReducer(Ae,t),m=f[1];return [f[0],useCallback(function(e,t){void 0===t&&(t=!1);try{if(!l)return m({type:"errors",payload:new Error("No GraphQL client found")}),Promise.resolve();var r=function(r,a){try{var o=(t||m({type:"loading"}),Promise.resolve(l.request(n,e)).then(function(e){m({type:"data",payload:e});}));}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){m({type:"errors",payload:e});});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[l,n,m])]}var ke,je={loading:!1,data:void 0,errors:void 0};function $e(e){var n=De(e,je);return [n[1],n[0]]}var xe,Re=ge(ke||(ke=$(["\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 Ve(){var e=$e(Re),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.authenticateManagedIdentityWithEmailAndPassword){var e=o$1.authenticateManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.authenticateManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Oe,Ne=ge(xe||(xe=$(["\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 He(){var e=$e(Ne),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.registerManagedIdentityWithEmailAndPassword){var e=o$1.registerManagedIdentityWithEmailAndPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.registerManagedIdentityWithEmailAndPassword]),[n,{loading:a,data:o$1,errors:i}]}var Le,We=ge(Oe||(Oe=$(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Ue(){var e=$e(We),n=e[1];return [e[0],{loading:n.loading,data:n.data,errors:n.errors}]}var Je,_e=ge(Le||(Le=$(["\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 Qe(){var e=$e(_e),n=e[0],r=e[1],a=r.loading,o$1=r.data,i=r.errors;return useEffect(function(){if(null!=o$1&&o$1.resetManagedIdentityPassword){var e=o$1.resetManagedIdentityPassword,n=e.token,t=o(n).user;te({jwt:n,id:t.id,accountId:t.accountId,managedIdentity:{email:e.email,emailVerified:e.emailVerified,sessionData:e.sessionData}});}},[null==o$1?void 0:o$1.resetManagedIdentityPassword]),[n,{loading:a,data:o$1,errors:i}]}var Te=ge(Je||(Je=$(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function ze(){return $e(Te)}function Ge(){var e=P();return {refresh:useCallback(function(){e.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}));},[e])}}function Be(e){var n=e.skip,r=void 0!==n&&n,a=e.update,s=e.variables;useEffect(function(){var e=function(e){!r&&a(s,!0);};return document.addEventListener("sq:refresh",e),function(){return document.removeEventListener("sq:refresh",e)}},function(e){var n=useRef(e),t=useRef(0);return equal(e,n.current)||(n.current=e,t.current+=1),useMemo(function(){return n.current},[t.current])}([s,a,r]));}var Ke,Ze={loading:!1,data:void 0,errors:void 0},Xe=Symbol();function Ye(e){var n=De(e,Ze),t=n[0],r=n[1],a=useRef(Xe);return Be({skip:a.current===Xe,update:r,variables:a.current}),[r,k({},t,{refetch:function(e){a.current=e,r(e);}})]}var en,nn=ge(Ke||(Ke=$(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function tn(){var e=ae(),n=Ye(nn),r=n[0],o=n[1],i=o.loading,s=o.data,u=o.errors,c=o.refetch;return useEffect(function(){null!=s&&s.managedIdentitySession&&te(k({},e,{managedIdentity:s.managedIdentitySession}));},[null==s?void 0:s.managedIdentitySession]),[useCallback(function(){return r({})},[r]),{loading:i,data:s,errors:u,refetch:c}]}var rn,an=ge(en||(en=$(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function on(){var e,n=tn()[0],r=$e(an),a=r[0],o=r[1],i=o.loading,s=o.data,u=o.errors;return useEffect(function(){var e;null!=s&&null!=(e=s.verifyManagedIdentityEmail)&&e.success&&n();},[null==s||null==(e=s.verifyManagedIdentityEmail)?void 0:e.success]),[a,{loading:i,data:s,errors:u}]}var sn,un=ge(rn||(rn=$(["\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 cn(){return $e(un)}var dn=ge(sn||(sn=$(["\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)}function fn(e,n){var t=useRef();return t.current&&equal(n,t.current.key)||(t.current={key:n,value:e()}),t.current.value}function mn(){return useReducer(function(e){return e+1},0)}function vn(e){for(var n,t=R(Object.getOwnPropertyNames(e));!(n=t()).done;){var r=e[n.value];r&&"object"==typeof r&&vn(r);}return Object.freeze(e)}var gn={loading:!0,data:void 0,errors:void 0};function pn(e,n,t){var r=De(e,gn),a=r[0],o=r[1],i=mn(),s=i[1];return fn(function(){!t&&o(n);},[e,n,o,i[0],t]),Be({skip:t,update:o,variables:n}),vn(k({},a,{refetch:s}))}function hn(){return window.squatchHistory=window.squatchHistory||function(){switch(H().type){case"SquatchPortal":return createBrowserHistory();default:return createMemoryHistory()}}(),window.squatchHistory}var yn,wn={createHref:function(){var e;return (e=hn()).createHref.apply(e,[].slice.call(arguments))},push:function(){var e;return (e=hn()).push.apply(e,[].slice.call(arguments))},replace:function(){var e;return (e=hn()).replace.apply(e,[].slice.call(arguments))},go:function(){var e;return (e=hn()).go.apply(e,[].slice.call(arguments))},back:function(){return hn().back()},forward:function(){var e;return (e=hn()).forward.apply(e,[].slice.call(arguments))}};function bn(){var e=mn()[1];return useEffect(function(){return hn().listen(function(){e();})},[]),hn().location}function Cn(e){var n=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},u=function(e,n){return Math.ceil(e/n)||0};return {limit:o,setLimit:function(e){var n=u(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=u(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 In(e,n,t,r,a){var o;void 0===r&&(r={}),void 0===a&&(a=!1);var i=Cn(t),s=i.limit,u=i.setLimit,c=i.setCurrentPage,d=i.calculatePagination,l=pn(e,k({limit:s,offset:i.offset},r),a),f=l.loading,m=l.errors,v=l.refetch,g=n(l.data),p=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:p.currentPage,pageCount:p.pageCount,pageProgress:p.pageProgress},callbacks:{refetch:v,setLimit:u,setCurrentPage:c}}}var Pn,En,Mn,An=dist.gql(yn||(yn=$(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var kn=Z("sq:useForm"),jn=dist.gql(Pn||(Pn=$(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),$n=dist.gql(En||(En=$(["\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"]))),xn=dist.gql(Mn||(Mn=$(["\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"])));
|
|
8139
8139
|
|
|
8140
|
-
export { $e as $, A, D, E, Ge as G, H, In as I, J, L, Me as M, O, Qe as Q,
|
|
8140
|
+
export { $e as $, A, D, E, Ge as G, H, In as I, J, L, Me as M, O, P, Qe as Q, Ue as U, Ve as V, W, Ye as Y, ae as a, mn as b, Ee as c, dist as d, bn as e, cn as f, He as g, ln as l, memoize$1 as m, on as o, pn as p, re as r, src as s, te as t, wn as w, ze as z };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './index-17b4da69.js';
|
|
2
2
|
import './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-78c0c467.js';
|
|
4
4
|
import './use-callback-697e2ff0.js';
|
|
5
|
-
import './index.module-
|
|
5
|
+
import './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as promiseResolve, H, b as bootstrapLazy } from './index-17b4da69.js';
|
|
2
2
|
import './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-78c0c467.js';
|
|
4
4
|
import './use-callback-697e2ff0.js';
|
|
5
|
-
import './index.module-
|
|
5
|
+
import './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { e as useEffect } from './stencil-hooks.module-e39af977.js';
|
|
2
|
-
import {
|
|
2
|
+
import { P, b as mn } from './index.module-2b4f1755.js';
|
|
3
3
|
|
|
4
4
|
const RENDER_EVENT = "sqm:request-rerender";
|
|
5
5
|
/**
|
|
@@ -10,7 +10,7 @@ const RENDER_EVENT = "sqm:request-rerender";
|
|
|
10
10
|
* @param deps an array of dependencies used for useEffect
|
|
11
11
|
*/
|
|
12
12
|
function useRequestRerender(deps) {
|
|
13
|
-
const host =
|
|
13
|
+
const host = P();
|
|
14
14
|
useEffect(() => {
|
|
15
15
|
host.dispatchEvent(new CustomEvent(RENDER_EVENT, {
|
|
16
16
|
detail: true,
|
|
@@ -23,7 +23,7 @@ function useRequestRerender(deps) {
|
|
|
23
23
|
* Re-renders a parent component when child components make the request
|
|
24
24
|
*/
|
|
25
25
|
function useRerenderListener() {
|
|
26
|
-
const host =
|
|
26
|
+
const host = P();
|
|
27
27
|
const [tick, rerender] = mn();
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
const listener = (e) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
3
|
import './use-callback-697e2ff0.js';
|
|
4
|
-
import { L } from './index.module-
|
|
4
|
+
import { L } from './index.module-2b4f1755.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import './JSS-f00f9536.js';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { m as h, e as useEffect, k as useState, y, o as d, i as useRef, b as browser, u as useReducer } from './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-78c0c467.js';
|
|
4
4
|
import { u as useCallback } from './use-callback-697e2ff0.js';
|
|
5
|
-
import { L,
|
|
5
|
+
import { L, P, d as dist, a as ae, p as pn, $ as $e, A, O, b as mn, w as wn, U as Ue, V as Ve, g as He, G as Ge, e as bn, J } from './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
8
8
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
9
9
|
import './mixins-f60a614c.js';
|
|
10
10
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
11
|
-
import { a as useRequestRerender } from './re-render-
|
|
12
|
-
import { u as useChildElements } from './useChildElements-
|
|
11
|
+
import { a as useRequestRerender } from './re-render-5c1dfc11.js';
|
|
12
|
+
import { u as useChildElements } from './useChildElements-3b3440e2.js';
|
|
13
13
|
import './luxon-578505e2.js';
|
|
14
14
|
import { g as getProps, a as getMissingProps, s as sanitizeUrlPath } from './utils-334c1e34.js';
|
|
15
15
|
import './sqm-text-span-view-0ba1484d.js';
|
|
16
16
|
import './sqm-portal-container-view-ca454627.js';
|
|
17
|
-
import { c as useDemoBigStat, K as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, I as InputFieldView, M as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, O as demoRewardExchange, i as RewardExchangeView, Q as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
17
|
+
import { c as useDemoBigStat, K as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, I as InputFieldView, M as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, O as demoRewardExchange, i as RewardExchangeView, Q as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-4558079b.js';
|
|
18
18
|
import './sqm-portal-section-view-6c249c74.js';
|
|
19
19
|
|
|
20
20
|
const BigStat = class {
|
|
@@ -31,7 +31,7 @@ const BigStat = class {
|
|
|
31
31
|
render() {
|
|
32
32
|
var _a;
|
|
33
33
|
const { props, label } = L() ? useDemoBigStat(this) : useBigStat(this);
|
|
34
|
-
const host =
|
|
34
|
+
const host = P();
|
|
35
35
|
const hasLabel = !!((_a = host.innerHTML) === null || _a === void 0 ? void 0 : _a.trim());
|
|
36
36
|
const labelSlot = h$1("slot", { name: "label" }, hasLabel ? h$1("slot", null) : label);
|
|
37
37
|
return h$1(BigStatView, Object.assign({}, props, { labelSlot: labelSlot }));
|
|
@@ -143,7 +143,7 @@ const styleString = sheet.toString();
|
|
|
143
143
|
function RequiredPropsError({ missingProps, heading = "There was a problem loading this section", subheading = "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.", description = "Error occured while loading <{tagName}>. Values for the following attributes are missing:", }, children) {
|
|
144
144
|
if (!missingProps)
|
|
145
145
|
return false;
|
|
146
|
-
const host =
|
|
146
|
+
const host = P();
|
|
147
147
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
148
148
|
return (h$1("sl-alert", { type: "danger", open: true },
|
|
149
149
|
h$1("style", { type: "text/css" }, styleString),
|
|
@@ -173,7 +173,7 @@ function RequiredPropsError({ missingProps, heading = "There was a problem loadi
|
|
|
173
173
|
|
|
174
174
|
const FORM_VALIDATION_CONTEXT = "sq:validation-state";
|
|
175
175
|
function useValidationState(formState) {
|
|
176
|
-
const host =
|
|
176
|
+
const host = P();
|
|
177
177
|
const [validationState, setValidationState] = y(host, FORM_VALIDATION_CONTEXT, formState);
|
|
178
178
|
return { validationState, setValidationState };
|
|
179
179
|
}
|
|
@@ -5713,7 +5713,7 @@ const debug = browser('sq:useProgramMenu');
|
|
|
5713
5713
|
const UPDATE_PROGRAM_EVENT = 'sq:update-program-id';
|
|
5714
5714
|
function useProgramMenu(props) {
|
|
5715
5715
|
const programId = A();
|
|
5716
|
-
const host =
|
|
5716
|
+
const host = P();
|
|
5717
5717
|
debug({ programId, props });
|
|
5718
5718
|
const ref = useRef();
|
|
5719
5719
|
const [, rerender] = mn();
|
|
@@ -6883,7 +6883,7 @@ function matchPath(pattern, page) {
|
|
|
6883
6883
|
}
|
|
6884
6884
|
function useRouter() {
|
|
6885
6885
|
const location = bn();
|
|
6886
|
-
const host =
|
|
6886
|
+
const host = P();
|
|
6887
6887
|
const [slot, setSlot] = useState(undefined);
|
|
6888
6888
|
const [container, setContainer] = useState(undefined);
|
|
6889
6889
|
const page = location.pathname;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
2
|
import { n as m, e as useEffect, m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
3
|
import './use-callback-697e2ff0.js';
|
|
4
|
-
import { r as re, W, M as Me, c as Ee } from './index.module-
|
|
4
|
+
import { r as re, W, M as Me, c as Ee } from './index.module-2b4f1755.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
|
|
7
7
|
async function useGraphQLClientProvider({ domain }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-78c0c467.js';
|
|
4
4
|
import './use-callback-697e2ff0.js';
|
|
5
|
-
import { d as dist, A, a as ae, p as pn, L } from './index.module-
|
|
5
|
+
import { d as dist, A, a as ae, p as pn, L } from './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-10657658.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
3
|
import './use-callback-697e2ff0.js';
|
|
4
|
-
import { e as bn, L } from './index.module-
|
|
4
|
+
import { e as bn, L } from './index.module-2b4f1755.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import './mixins-f60a614c.js';
|
|
8
8
|
import './JSS-f00f9536.js';
|
|
9
9
|
import { g as getProps } from './utils-334c1e34.js';
|
|
10
|
-
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-
|
|
10
|
+
import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-view-3485c8f6.js';
|
|
11
11
|
|
|
12
12
|
function useNavigationSidebarItem(props) {
|
|
13
13
|
const currentPage = bn();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { o as d, k as useState, m as h$1 } from './stencil-hooks.module-e39af977.js';
|
|
3
3
|
import './use-callback-697e2ff0.js';
|
|
4
|
-
import { L } from './index.module-
|
|
4
|
+
import { L } from './index.module-2b4f1755.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
7
7
|
import { E as ErrorStyles } from './mixins-f60a614c.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, c as Host, r as registerInstance } from './index-17b4da69.js';
|
|
2
2
|
import { m as h$1 } from './stencil-hooks.module-e39af977.js';
|
|
3
3
|
import './use-callback-697e2ff0.js';
|
|
4
|
-
import { J } from './index.module-
|
|
4
|
+
import { J } from './index.module-2b4f1755.js';
|
|
5
5
|
import './extends-c31f1eff.js';
|
|
6
6
|
import { g as getProps } from './utils-334c1e34.js';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-78c0c467.js';
|
|
3
3
|
import { A as AuthWrapper, a as AuthColumn } from './mixins-f60a614c.js';
|
|
4
4
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
5
5
|
import { T as TextSpanView } from './sqm-text-span-view-0ba1484d.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { k as useState, e as useEffect, m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-78c0c467.js';
|
|
4
4
|
import './use-callback-697e2ff0.js';
|
|
5
|
-
import { l as ln, a as ae, L } from './index.module-
|
|
5
|
+
import { l as ln, a as ae, L } from './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-f60a614c.js';
|
|
9
9
|
import './JSS-f00f9536.js';
|
|
10
10
|
import './sqm-text-span-view-0ba1484d.js';
|
|
11
|
-
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-
|
|
11
|
+
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-b3110468.js';
|
|
12
12
|
|
|
13
13
|
function usePortalEmailVerification(props) {
|
|
14
14
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -23,6 +23,7 @@ function usePortalEmailVerification(props) {
|
|
|
23
23
|
if (!email)
|
|
24
24
|
return;
|
|
25
25
|
setError("");
|
|
26
|
+
setSuccess(false);
|
|
26
27
|
const urlParams = nextPage ? { nextPage } : null;
|
|
27
28
|
const redirectPath = props.redirectPath;
|
|
28
29
|
const variables = { email, urlParams, redirectPath };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-17b4da69.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-78c0c467.js';
|
|
3
3
|
import { c as createStyleSheet } from './JSS-f00f9536.js';
|
|
4
4
|
|
|
5
5
|
function PoweredByImg({ color = "#A6A6A6", width = 190, height = 29, }) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1 } from './index-17b4da69.js';
|
|
2
2
|
import { m as h } from './stencil-hooks.module-e39af977.js';
|
|
3
|
-
import './global-
|
|
3
|
+
import './global-78c0c467.js';
|
|
4
4
|
import './use-callback-697e2ff0.js';
|
|
5
|
-
import './index.module-
|
|
5
|
+
import './index.module-2b4f1755.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import './JSS-f00f9536.js';
|
|
8
8
|
import { g as getProps } from './utils-334c1e34.js';
|
|
9
|
-
import { P as PortalFooterView } from './sqm-portal-footer-view-
|
|
9
|
+
import { P as PortalFooterView } from './sqm-portal-footer-view-f342a626.js';
|
|
10
10
|
|
|
11
11
|
const PortalFooter = class {
|
|
12
12
|
constructor(hostRef) {
|