@cuemath/leap 3.3.20 → 3.3.21
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/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +23 -29
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js +71 -0
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/package.json +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { JOURNEY_ID_STUDENT as
|
|
5
|
-
import { IndicatorType as
|
|
6
|
-
import { useJourney as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
const o =
|
|
10
|
-
|
|
11
|
-
}, [o,
|
|
12
|
-
document.body.style.overflow = "unset",
|
|
13
|
-
}, [
|
|
14
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useCallback as e } from "react";
|
|
3
|
+
import y from "../../../ui/avatar/avatar.js";
|
|
4
|
+
import { JOURNEY_ID_STUDENT as h } from "../../journey-id/journey-id-student.js";
|
|
5
|
+
import { IndicatorType as C } from "../../use-journey/constants.js";
|
|
6
|
+
import { useJourney as T } from "../../use-journey/use-journey.js";
|
|
7
|
+
import J from "../use-home-page-journey/tooltip-item.js";
|
|
8
|
+
const B = () => {
|
|
9
|
+
const o = h.PUZZLE_DASHBOARD_JOURNEY, c = p([]), { setJourney: n, endJourney: s, nextCoachmark: i } = T(), a = e(() => {
|
|
10
|
+
i(o, !1, 0, !1);
|
|
11
|
+
}, [o, i]), l = e(() => {
|
|
12
|
+
document.body.style.overflow = "unset", s(o);
|
|
13
|
+
}, [s, o]);
|
|
14
|
+
return e(
|
|
15
|
+
(t, d) => {
|
|
15
16
|
if (!(t != null && t.current))
|
|
16
17
|
return;
|
|
17
|
-
const
|
|
18
|
+
const u = [
|
|
18
19
|
{
|
|
19
20
|
originalElementToHighlightRef: t,
|
|
20
|
-
elementToHighlight: /* @__PURE__ */
|
|
21
|
-
type:
|
|
21
|
+
elementToHighlight: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(y, { size: 55, avatar: d }) }),
|
|
22
|
+
type: C.TOOLTIP,
|
|
22
23
|
indicator: {
|
|
23
24
|
renderAs: "primary",
|
|
24
25
|
tooltipXCoOrdinates: 42,
|
|
@@ -29,8 +30,8 @@ const I = () => {
|
|
|
29
30
|
backgroundColor: "BLUE_4",
|
|
30
31
|
borderColor: "BLACK",
|
|
31
32
|
arrowColor: "BLACK",
|
|
32
|
-
tooltipItem: /* @__PURE__ */
|
|
33
|
-
|
|
33
|
+
tooltipItem: /* @__PURE__ */ r(
|
|
34
|
+
J,
|
|
34
35
|
{
|
|
35
36
|
text: "Click here to see all previously solved puzzles.",
|
|
36
37
|
buttonLabel: "Got it",
|
|
@@ -41,23 +42,16 @@ const I = () => {
|
|
|
41
42
|
isActive: !1
|
|
42
43
|
}
|
|
43
44
|
];
|
|
44
|
-
n(o,
|
|
45
|
+
n(o, u);
|
|
45
46
|
const m = setTimeout(() => {
|
|
46
47
|
clearTimeout(m), document.body.style.overflow = "hidden", a();
|
|
47
48
|
}, 500);
|
|
48
|
-
|
|
49
|
+
c.current.push(m);
|
|
49
50
|
},
|
|
50
51
|
[l, a, o, n]
|
|
51
52
|
);
|
|
52
|
-
return f(
|
|
53
|
-
() => ({
|
|
54
|
-
puzzleProfileRef: t,
|
|
55
|
-
startJourney: u
|
|
56
|
-
}),
|
|
57
|
-
[u]
|
|
58
|
-
);
|
|
59
53
|
};
|
|
60
54
|
export {
|
|
61
|
-
|
|
55
|
+
B as usePuzzleDashboardJourney
|
|
62
56
|
};
|
|
63
57
|
//# sourceMappingURL=use-puzzle-dashboard-journey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-puzzle-dashboard-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IAvatarLayer } from '../../../ui/avatar/avatar-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback,
|
|
1
|
+
{"version":3,"file":"use-puzzle-dashboard-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IAvatarLayer } from '../../../ui/avatar/avatar-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback, useRef, type RefObject } from 'react';\n\nimport Avatar from '../../../ui/avatar/avatar';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nconst usePuzzleDashboardJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.PUZZLE_DASHBOARD_JOURNEY;\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n (puzzleProfileRef: RefObject<HTMLDivElement>, avatar: IAvatarLayer[]) => {\n if (!puzzleProfileRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleProfileRef,\n elementToHighlight: (\n <div>\n <Avatar size={55} avatar={avatar} />\n </div>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: 42,\n tooltipYCoOrdinates: 36,\n arrowSize: 12,\n arrowYCoOrdinates: -36,\n position: 'right',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"Click here to see all previously solved puzzles.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, puzzleAttemptSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachMark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [handleEndJourney, handleNextCoachMark, journeyId, setJourney],\n );\n\n return startJourney;\n};\n\nexport { usePuzzleDashboardJourney };\n"],"names":["usePuzzleDashboardJourney","journeyId","JOURNEY_ID_STUDENT","timerRefs","useRef","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","puzzleProfileRef","avatar","puzzleAttemptSteps","jsx","Avatar","IndicatorType","TooltipItem","delayBeforeStart"],"mappings":";;;;;;;AAYA,MAAMA,IAA4B,MAAM;AACtC,QAAMC,IAAYC,EAAmB,0BAE/BC,IAAYC,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAC,GAAY,YAAAC,GAAY,eAAAC,MAAkBC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAH,EAAAN,GAAW,IAAO,GAAG,EAAK;AAAA,EAAA,GACvC,CAACA,GAAWM,CAAa,CAAC,GAEvBI,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BJ,EAAWL,CAAS;AAAA,EAAA,GACnB,CAACK,GAAYL,CAAS,CAAC;AAoDnB,SAlDcS;AAAA,IACnB,CAACE,GAA6CC,MAA2B;AACnE,UAAA,EAACD,KAAA,QAAAA,EAAkB;AACrB;AAGF,YAAME,IAAwC;AAAA,QAC5C;AAAA,UACE,+BAA+BF;AAAA,UAC/B,sCACG,OACC,EAAA,UAAA,gBAAAG,EAACC,KAAO,MAAM,IAAI,QAAAH,GAAgB,EACpC,CAAA;AAAA,UAEF,MAAMI,EAAc;AAAA,UACpB,WAAW;AAAA,YACT,UAAU;AAAA,YACV,qBAAqB;AAAA,YACrB,qBAAqB;AAAA,YACrB,WAAW;AAAA,YACX,mBAAmB;AAAA,YACnB,UAAU;AAAA,YACV,iBAAiB;AAAA,YACjB,aAAa;AAAA,YACb,YAAY;AAAA,YACZ,aACE,gBAAAF;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,aAAY;AAAA,gBACZ,eAAeP;AAAA,cAAA;AAAA,YACjB;AAAA,UAEJ;AAAA,UACA,UAAU;AAAA,QACZ;AAAA,MAAA;AAGF,MAAAN,EAAWJ,GAAWa,CAAkB;AAElC,YAAAK,IAAmB,WAAW,MAAM;AACxC,qBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXV;SACnB,GAAG;AAEI,MAAAN,EAAA,QAAQ,KAAKgB,CAAgB;AAAA,IACzC;AAAA,IACA,CAACR,GAAkBF,GAAqBR,GAAWI,CAAU;AAAA,EAAA;AAIjE;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
|
|
1
|
+
var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.PLA_SWITCH_USER_JOURNEY = "PLA_SWITCH_USER_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
|
|
2
2
|
export {
|
|
3
3
|
R as JOURNEY_ID_STUDENT
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,
|
|
1
|
+
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n PLA_SWITCH_USER_JOURNEY = 'PLA_SWITCH_USER_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCACnCA,EAAA,0BAA0B,2BAG1BA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BAC1BA,EAAA,2BAA2B,4BAjBjBA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as C, useCallback as n } from "react";
|
|
3
|
+
import { useTheme as I } from "styled-components";
|
|
4
|
+
import { ILLUSTRATIONS as w } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import { JOURNEY_ID_STUDENT as E } from "../../journey/journey-id/journey-id-student.js";
|
|
6
|
+
import { IndicatorType as S } from "../../journey/use-journey/constants.js";
|
|
7
|
+
import { useJourney as b } from "../../journey/use-journey/use-journey.js";
|
|
8
|
+
import g from "../../ui/avatar/avatar.js";
|
|
9
|
+
import O from "../../ui/buttons/button/button.js";
|
|
10
|
+
import _ from "../../ui/image/image.js";
|
|
11
|
+
import h from "../../ui/layout/flex-view.js";
|
|
12
|
+
import x from "../../ui/separator/separator.js";
|
|
13
|
+
import J from "../../ui/text/text.js";
|
|
14
|
+
import { EDeviceType as L } from "../../ui/theme/constants.js";
|
|
15
|
+
const X = () => {
|
|
16
|
+
const e = E.PLA_SWITCH_USER_JOURNEY, { device: T } = I(), t = T <= L.MOBILE, f = C([]), r = t ? 40 : 64, { setJourney: s, endJourney: m, nextCoachmark: l } = b(), c = n(() => {
|
|
17
|
+
l(e, !1, 0, !1);
|
|
18
|
+
}, [e, l]), d = n(() => {
|
|
19
|
+
document.body.style.overflow = "unset", m(e);
|
|
20
|
+
}, [m, e]);
|
|
21
|
+
return n(
|
|
22
|
+
(i, a) => {
|
|
23
|
+
if (!(i != null && i.current))
|
|
24
|
+
return;
|
|
25
|
+
const u = [
|
|
26
|
+
{
|
|
27
|
+
originalElementToHighlightRef: i,
|
|
28
|
+
elementToHighlight: /* @__PURE__ */ o("div", { children: a ? /* @__PURE__ */ o(g, { size: r, avatar: a }) : /* @__PURE__ */ o(_, { src: w.STUDENT_AVATAR, width: r, height: r }) }),
|
|
29
|
+
type: S.TOOLTIP,
|
|
30
|
+
indicator: {
|
|
31
|
+
renderAs: "primary",
|
|
32
|
+
tooltipXCoOrdinates: t ? 98 : 42,
|
|
33
|
+
tooltipYCoOrdinates: t ? 20 : 36,
|
|
34
|
+
arrowSize: 12,
|
|
35
|
+
arrowYCoOrdinates: -36,
|
|
36
|
+
arrowXCoOrdinates: -100,
|
|
37
|
+
position: t ? "bottom" : "right",
|
|
38
|
+
backgroundColor: "PURPLE_4",
|
|
39
|
+
borderColor: "WHITE_1",
|
|
40
|
+
arrowColor: "WHITE_1",
|
|
41
|
+
tooltipItem: /* @__PURE__ */ y(h, { children: [
|
|
42
|
+
/* @__PURE__ */ o(J, { $renderAs: "ab3-bold", $color: "BLACK_1", children: "Tap here to switch back to the parent view" }),
|
|
43
|
+
/* @__PURE__ */ o(x, { heightX: 0.75 }),
|
|
44
|
+
/* @__PURE__ */ o(h, { $alignItems: "flex-end", children: /* @__PURE__ */ o(
|
|
45
|
+
O,
|
|
46
|
+
{
|
|
47
|
+
label: "Got it",
|
|
48
|
+
size: "xsmall",
|
|
49
|
+
width: 96,
|
|
50
|
+
renderAs: "secondary",
|
|
51
|
+
onClick: d
|
|
52
|
+
}
|
|
53
|
+
) })
|
|
54
|
+
] })
|
|
55
|
+
},
|
|
56
|
+
isActive: !1
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
s(e, u);
|
|
60
|
+
const p = setTimeout(() => {
|
|
61
|
+
clearTimeout(p), document.body.style.overflow = "hidden", c();
|
|
62
|
+
}, 500);
|
|
63
|
+
f.current.push(p);
|
|
64
|
+
},
|
|
65
|
+
[r, d, c, t, e, s]
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
X as usePLASwitchUserJourney
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=use-switch-user-journey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-switch-user-journey.js","sources":["../../../../src/features/parent-dashboard/hooks/use-switch-user-journey.tsx"],"sourcesContent":["import type { ICoachmarkProps } from '../../journey/use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IAvatarLayer } from '../../ui/avatar/avatar-types';\n\nimport { useCallback, useRef, type RefObject } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { JOURNEY_ID_STUDENT } from '../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../journey/use-journey/constants';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Avatar from '../../ui/avatar/avatar';\nimport Button from '../../ui/buttons/button/button';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\n\nconst usePLASwitchUserJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.PLA_SWITCH_USER_JOURNEY;\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const avatarSize = isMobile ? 40 : 64;\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n (userAvatarRef: RefObject<HTMLDivElement>, avatar?: IAvatarLayer[] | null) => {\n if (!userAvatarRef?.current) {\n return;\n }\n\n const attemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: userAvatarRef,\n elementToHighlight: (\n <div>\n {avatar ? (\n <Avatar size={avatarSize} avatar={avatar} />\n ) : (\n <Image src={ILLUSTRATIONS.STUDENT_AVATAR} width={avatarSize} height={avatarSize} />\n )}\n </div>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: isMobile ? 98 : 42,\n tooltipYCoOrdinates: isMobile ? 20 : 36,\n arrowSize: 12,\n arrowYCoOrdinates: -36,\n arrowXCoOrdinates: -100,\n position: isMobile ? 'bottom' : 'right',\n backgroundColor: 'PURPLE_4',\n borderColor: 'WHITE_1',\n arrowColor: 'WHITE_1',\n tooltipItem: (\n <FlexView>\n <Text $renderAs=\"ab3-bold\" $color=\"BLACK_1\">\n Tap here to switch back to the parent view\n </Text>\n <Separator heightX={0.75} />\n <FlexView $alignItems=\"flex-end\">\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n width={96}\n renderAs=\"secondary\"\n onClick={handleEndJourney}\n />\n </FlexView>\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, attemptSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachMark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [avatarSize, handleEndJourney, handleNextCoachMark, isMobile, journeyId, setJourney],\n );\n\n return startJourney;\n};\n\nexport { usePLASwitchUserJourney };\n"],"names":["usePLASwitchUserJourney","journeyId","JOURNEY_ID_STUDENT","device","useTheme","isMobile","EDeviceType","timerRefs","useRef","avatarSize","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","userAvatarRef","avatar","attemptSteps","jsx","Avatar","Image","ILLUSTRATIONS","IndicatorType","FlexView","Text","Separator","Button","delayBeforeStart"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,IAA0B,MAAM;AACpC,QAAMC,IAAYC,EAAmB,yBAC/B,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QACjCC,IAAYC,EAAw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A;AAAA,kBACC,OAAM;AAAA,kBACN,MAAK;AAAA,kBACL,OAAO;AAAA,kBACP,UAAS;AAAA,kBACT,SAASZ;AAAA,gBAAA;AAAA,cAAA,GAEb;AAAA,YAAA,GACF;AAAA,UAEJ;AAAA,UACA,UAAU;AAAA,QACZ;AAAA,MAAA;AAGF,MAAAN,EAAWT,GAAWkB,CAAY;AAE5B,YAAAU,IAAmB,WAAW,MAAM;AACxC,qBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXf;SACnB,GAAG;AAEI,MAAAP,EAAA,QAAQ,KAAKsB,CAAgB;AAAA,IACzC;AAAA,IACA,CAACpB,GAAYO,GAAkBF,GAAqBT,GAAUJ,GAAWS,CAAU;AAAA,EAAA;AAIvF;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4700,6 +4700,7 @@ export declare enum JOURNEY_ID_STUDENT {
|
|
|
4700
4700
|
CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY",
|
|
4701
4701
|
CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY",
|
|
4702
4702
|
CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY",
|
|
4703
|
+
PLA_SWITCH_USER_JOURNEY = "PLA_SWITCH_USER_JOURNEY",
|
|
4703
4704
|
HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY",
|
|
4704
4705
|
CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY",
|
|
4705
4706
|
PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY",
|
|
@@ -6979,6 +6980,8 @@ export declare const useModalActions: IUseModalActions;
|
|
|
6979
6980
|
|
|
6980
6981
|
export declare const useModalParams: IUseModalParams;
|
|
6981
6982
|
|
|
6983
|
+
export declare const usePLASwitchUserJourney: () => (userAvatarRef: RefObject<HTMLDivElement>, avatar?: IAvatarLayer[] | null) => void;
|
|
6984
|
+
|
|
6982
6985
|
export declare const usePointerSync: ({ userType, targetUserId, }: IusePointerSyncProps) => IusePointerSyncMethods;
|
|
6983
6986
|
|
|
6984
6987
|
export declare const usePuzzleAttemptJourney: () => {
|
|
@@ -6986,10 +6989,7 @@ export declare const usePuzzleAttemptJourney: () => {
|
|
|
6986
6989
|
startJourney: () => void;
|
|
6987
6990
|
};
|
|
6988
6991
|
|
|
6989
|
-
export declare const usePuzzleDashboardJourney: () =>
|
|
6990
|
-
puzzleProfileRef: RefObject<HTMLDivElement>;
|
|
6991
|
-
startJourney: (avatar: IAvatarLayer[]) => void;
|
|
6992
|
-
};
|
|
6992
|
+
export declare const usePuzzleDashboardJourney: () => (puzzleProfileRef: RefObject<HTMLDivElement>, avatar: IAvatarLayer[]) => void;
|
|
6993
6993
|
|
|
6994
6994
|
export declare const usePuzzleIntroJourney: ({ onJourneyComplete }: IUsePuzzleIntroJourney) => {
|
|
6995
6995
|
puzzleIconRef: RefObject<HTMLDivElement>;
|
package/dist/index.js
CHANGED
|
@@ -347,9 +347,10 @@ import { default as Ex } from "./features/parent-dashboard/modals/help-and-suppo
|
|
|
347
347
|
import { default as Ax } from "./features/parent-dashboard/modals/student-login-info/student-login-info.js";
|
|
348
348
|
import { default as _x } from "./features/parent-dashboard/modals/tutor-change/tutor-change.js";
|
|
349
349
|
import { default as Lx } from "./features/parent-dashboard/parent-dashboard.js";
|
|
350
|
-
import {
|
|
351
|
-
import {
|
|
352
|
-
import {
|
|
350
|
+
import { usePLASwitchUserJourney as kx } from "./features/parent-dashboard/hooks/use-switch-user-journey.js";
|
|
351
|
+
import { invalidateParentHome as Rx } from "./features/parent-dashboard/api/parent-home.js";
|
|
352
|
+
import { ESummaryType as Ox } from "./features/parent-dashboard/parent-dashboard-types.js";
|
|
353
|
+
import { COUNTRY_CODE_MAP as Hx } from "./constants/country.js";
|
|
353
354
|
export {
|
|
354
355
|
xm as ACHIEVEMENT_ACTIONS,
|
|
355
356
|
gs as AUTH_TABS,
|
|
@@ -388,7 +389,7 @@ export {
|
|
|
388
389
|
Bl as CIRCLE_ACTION_IDS,
|
|
389
390
|
Ul as CIRCLE_ONBOARDING_ANALYTICS_STEPS,
|
|
390
391
|
pd as COMPLETED_SHEET_STATE,
|
|
391
|
-
|
|
392
|
+
Hx as COUNTRY_CODE_MAP,
|
|
392
393
|
y as CalendarIcon,
|
|
393
394
|
Da as Callout,
|
|
394
395
|
df as Carousel,
|
|
@@ -449,7 +450,7 @@ export {
|
|
|
449
450
|
mm as EPResourceAssign,
|
|
450
451
|
Hm as EPostGameStat,
|
|
451
452
|
Bu as ESessionStatus,
|
|
452
|
-
|
|
453
|
+
Ox as ESummaryType,
|
|
453
454
|
cu as EVENTS,
|
|
454
455
|
xe as Edit2Icon,
|
|
455
456
|
me as EditIcon,
|
|
@@ -686,7 +687,7 @@ export {
|
|
|
686
687
|
Zu as invalidateHomeworks,
|
|
687
688
|
hm as invalidateMilestoneResources,
|
|
688
689
|
cm as invalidateMilestonesData,
|
|
689
|
-
|
|
690
|
+
Rx as invalidateParentHome,
|
|
690
691
|
Tm as invalidatePastMilestoneCount,
|
|
691
692
|
Jm as invalidatePuzzleToAssign,
|
|
692
693
|
Am as invalidateTestHelpData,
|
|
@@ -717,6 +718,7 @@ export {
|
|
|
717
718
|
ap as useJourney,
|
|
718
719
|
Ta as useModalActions,
|
|
719
720
|
Ca as useModalParams,
|
|
721
|
+
kx as usePLASwitchUserJourney,
|
|
720
722
|
Rm as usePointerSync,
|
|
721
723
|
Mp as usePuzzleAttemptJourney,
|
|
722
724
|
Tp as usePuzzleDashboardJourney,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/decode-uri-component/index.js"],"sourcesContent":["const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n"],"names":["token","singleMatcher","multiMatcher","decodeComponents","components","split","left","right","decode","input","tokens","i","customDecodeURIComponent","replaceMap","match","result","entries","key","decodeUriComponent","encodedURI"],"mappings":"AAAA,MAAMA,IAAQ,gBACRC,IAAgB,IAAI,OAAO,MAAMD,IAAQ,cAAc,IAAI,GAC3DE,IAAe,IAAI,OAAO,MAAMF,IAAQ,MAAM,IAAI;AAExD,SAASG,EAAiBC,GAAYC,GAAO;AAC5C,MAAI;AAEH,WAAO,CAAC,mBAAmBD,EAAW,KAAK,EAAE,CAAC,CAAC;AAAA,EACjD,QAAS;AAAA,EAEP;AAED,MAAIA,EAAW,WAAW;AACzB,WAAOA;AAGR,EAAAC,IAAQA,KAAS;AAGjB,QAAMC,IAAOF,EAAW,MAAM,GAAGC,CAAK,GAChCE,IAAQH,EAAW,MAAMC,CAAK;AAE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AU;AAAA,EAC1C;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import b from "
|
|
1
|
+
import b from "../decode-uri-component/index.js";
|
|
2
2
|
import l from "../split-on-first/index.js";
|
|
3
3
|
import { includeKeys as N } from "../filter-obj/index.js";
|
|
4
4
|
const j = (r) => r == null, A = (r) => encodeURIComponent(r).replace(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), u = Symbol("encodeFragmentIdentifier");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
let t;
|
|
2
|
+
const e = new Uint8Array(16);
|
|
2
3
|
function o() {
|
|
3
|
-
if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)
|
|
4
|
+
if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
|
|
4
5
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
5
6
|
return t(e);
|
|
6
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\
|
|
1
|
+
{"version":3,"file":"rng.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA;AACJ,MAAMC,IAAQ,IAAI,WAAW,EAAE;AAChB,SAASC,IAAM;AAE5B,MAAI,CAACF,MAEHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAE3G,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, o = (t[e[i + 0]] + t[e[i + 1]] + t[e[i + 2]] + t[e[i + 3]] + "-" + t[e[i + 4]] + t[e[i + 5]] + "-" + t[e[i + 6]] + t[e[i + 7]] + "-" + t[e[i + 8]] + t[e[i + 9]] + "-" + t[e[i + 10]] + t[e[i + 11]] + t[e[i + 12]] + t[e[i + 13]] + t[e[i + 14]] + t[e[i + 15]]).toLowerCase();
|
|
7
|
-
if (!s(o))
|
|
8
|
-
throw TypeError("Stringified UUID is invalid");
|
|
9
|
-
return o;
|
|
1
|
+
const i = [];
|
|
2
|
+
for (let n = 0; n < 256; ++n)
|
|
3
|
+
i.push((n + 256).toString(16).slice(1));
|
|
4
|
+
function c(n, u = 0) {
|
|
5
|
+
return (i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]]).toLowerCase();
|
|
10
6
|
}
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
c as unsafeStringify
|
|
13
9
|
};
|
|
14
10
|
//# sourceMappingURL=stringify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\
|
|
1
|
+
{"version":3,"file":"stringify.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","unsafeStringify","arr","offset"],"mappings":"AAMA,MAAMA,IAAY,CAAA;AAElB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAG3C,SAASC,EAAgBC,GAAKC,IAAS,GAAG;AAG/C,UAAQJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,GAAG;AACvf;","x_google_ignoreList":[0]}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import e from "./native.js";
|
|
2
|
+
import i from "./rng.js";
|
|
3
|
+
import { unsafeStringify as d } from "./stringify.js";
|
|
4
|
+
function g(n, m, t) {
|
|
5
|
+
if (e.randomUUID && !m && !n)
|
|
6
|
+
return e.randomUUID();
|
|
4
7
|
n = n || {};
|
|
5
|
-
|
|
8
|
+
const r = n.random || (n.rng || i)();
|
|
6
9
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, m) {
|
|
7
|
-
|
|
8
|
-
for (
|
|
9
|
-
m[
|
|
10
|
+
t = t || 0;
|
|
11
|
+
for (let a = 0; a < 16; ++a)
|
|
12
|
+
m[t + a] = r[a];
|
|
10
13
|
return m;
|
|
11
14
|
}
|
|
12
|
-
return
|
|
15
|
+
return d(r);
|
|
13
16
|
}
|
|
14
17
|
export {
|
|
15
|
-
|
|
18
|
+
g as default
|
|
16
19
|
};
|
|
17
20
|
//# sourceMappingURL=v4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import rng from './rng.js';\nimport
|
|
1
|
+
{"version":3,"file":"v4.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","native","rnds","rng","i","unsafeStringify"],"mappings":";;;AAIA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,MAAIC,EAAO,cAAc,CAACF,KAAO,CAACD;AAChC,WAAOG,EAAO;AAGhB,EAAAH,IAAUA,KAAW;AACrB,QAAMI,IAAOJ,EAAQ,WAAWA,EAAQ,OAAOK;AAK/C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBH,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASI,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAL,EAAIC,IAASI,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOL;AAAA,EACR;AAED,SAAOM,EAAgBH,CAAI;AAC7B;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/query-string/node_modules/decode-uri-component/index.js"],"sourcesContent":["const token = '%[a-f0-9]{2}';\nconst singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nconst multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tconst left = components.slice(0, split);\n\tconst right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet tokens = input.match(singleMatcher) || [];\n\n\t\tfor (let i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\tlet match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n"],"names":["token","singleMatcher","multiMatcher","decodeComponents","components","split","left","right","decode","input","tokens","i","customDecodeURIComponent","replaceMap","match","result","entries","key","decodeUriComponent","encodedURI"],"mappings":"AAAA,MAAMA,IAAQ,gBACRC,IAAgB,IAAI,OAAO,MAAMD,IAAQ,cAAc,IAA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U,OAAO,KAAKH,CAAU;AAEtC,aAAWI,KAAOD;AAEjB,IAAAP,IAAQA,EAAM,QAAQ,IAAI,OAAOQ,GAAK,GAAG,GAAGJ,EAAWI,CAAG,CAAC;AAG5D,SAAOR;AACR;AAEe,SAASS,EAAmBC,GAAY;AACtD,MAAI,OAAOA,KAAe;AACzB,UAAM,IAAI,UAAU,wDAAwD,OAAOA,IAAa,GAAG;AAGpG,MAAI;AAEH,WAAO,mBAAmBA,CAAU;AAAA,EACtC,QAAS;AAEP,WAAOP,EAAyBO,CAAU;AAAA,EAC1C;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regex.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/regex.js"],"sourcesContent":["export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;"],"names":["REGEX"],"mappings":"AAAA,MAAAA,IAAe;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sources":["../../../../../node_modules/uuid/dist/esm-browser/validate.js"],"sourcesContent":["import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;"],"names":["validate","uuid","REGEX"],"mappings":";AAEA,SAASA,EAASC,GAAM;AACtB,SAAO,OAAOA,KAAS,YAAYC,EAAM,KAAKD,CAAI;AACpD;","x_google_ignoreList":[0]}
|
|
File without changes
|