@cabin-id/nextjs 1.0.0 → 1.0.2
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/api/endpoints/AbstractApi.js +38 -0
- package/dist/cjs/api/endpoints/AbstractApi.js.map +1 -0
- package/dist/cjs/api/endpoints/UserApi.js +40 -0
- package/dist/cjs/api/endpoints/UserApi.js.map +1 -0
- package/dist/cjs/api/endpoints/index.js +32 -0
- package/dist/cjs/api/endpoints/index.js.map +1 -0
- package/dist/cjs/api/factory.js +60 -0
- package/dist/cjs/api/factory.js.map +1 -0
- package/dist/cjs/api/request.js +97 -0
- package/dist/cjs/api/request.js.map +1 -0
- package/dist/cjs/component.client.js +32 -0
- package/dist/cjs/component.client.js.map +1 -0
- package/dist/cjs/component.server.js +32 -0
- package/dist/cjs/component.server.js.map +1 -0
- package/dist/cjs/components/SignInButton.js +67 -0
- package/dist/cjs/components/SignInButton.js.map +1 -0
- package/dist/cjs/components/index.js +29 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/constants.js +122 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/hooks/createContextAndHook.js +62 -0
- package/dist/cjs/hooks/createContextAndHook.js.map +1 -0
- package/dist/cjs/hooks/index.js +29 -0
- package/dist/cjs/hooks/index.js.map +1 -0
- package/dist/cjs/hooks/useSafeLayoutEffect.js +40 -0
- package/dist/cjs/hooks/useSafeLayoutEffect.js.map +1 -0
- package/dist/cjs/hooks/useUser.js +70 -0
- package/dist/cjs/hooks/useUser.js.map +1 -0
- package/dist/cjs/icons/logo.js +98 -0
- package/dist/cjs/icons/logo.js.map +1 -0
- package/dist/cjs/index.js +45 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +9 -0
- package/dist/cjs/provider/context.js +62 -0
- package/dist/cjs/provider/context.js.map +1 -0
- package/dist/cjs/provider/core.provider.js +49 -0
- package/dist/cjs/provider/core.provider.js.map +1 -0
- package/dist/cjs/provider/main.provider.js +45 -0
- package/dist/cjs/provider/main.provider.js.map +1 -0
- package/dist/cjs/server/auth.js +61 -0
- package/dist/cjs/server/auth.js.map +1 -0
- package/dist/cjs/server/client.js +35 -0
- package/dist/cjs/server/client.js.map +1 -0
- package/dist/cjs/server/createGetAuth.js +45 -0
- package/dist/cjs/server/createGetAuth.js.map +1 -0
- package/dist/cjs/server/createRedirect.js +90 -0
- package/dist/cjs/server/createRedirect.js.map +1 -0
- package/dist/cjs/server/errors.js +110 -0
- package/dist/cjs/server/errors.js.map +1 -0
- package/dist/cjs/server/getCurrentUser.js +36 -0
- package/dist/cjs/server/getCurrentUser.js.map +1 -0
- package/dist/cjs/server/index.js +32 -0
- package/dist/cjs/server/index.js.map +1 -0
- package/dist/cjs/server/middleware.js +193 -0
- package/dist/cjs/server/middleware.js.map +1 -0
- package/dist/cjs/server/protect.js +69 -0
- package/dist/cjs/server/protect.js.map +1 -0
- package/dist/cjs/server/routeMatcher.js +42 -0
- package/dist/cjs/server/routeMatcher.js.map +1 -0
- package/dist/cjs/server/serverRedirectWithAuth.js +39 -0
- package/dist/cjs/server/serverRedirectWithAuth.js.map +1 -0
- package/dist/cjs/server/type.js +17 -0
- package/dist/cjs/server/type.js.map +1 -0
- package/dist/cjs/server/utils.js +165 -0
- package/dist/cjs/server/utils.js.map +1 -0
- package/dist/cjs/styles/global.css +420 -0
- package/dist/cjs/styles/global.css.map +1 -0
- package/dist/cjs/tokens/authObjects.js +45 -0
- package/dist/cjs/tokens/authObjects.js.map +1 -0
- package/dist/cjs/tokens/authStatus.js +86 -0
- package/dist/cjs/tokens/authStatus.js.map +1 -0
- package/dist/cjs/tokens/authenticateContext.js +69 -0
- package/dist/cjs/tokens/authenticateContext.js.map +1 -0
- package/dist/cjs/tokens/cabinIdRequest.js +79 -0
- package/dist/cjs/tokens/cabinIdRequest.js.map +1 -0
- package/dist/cjs/tokens/cabinIdUrl.js +36 -0
- package/dist/cjs/tokens/cabinIdUrl.js.map +1 -0
- package/dist/cjs/tokens/request.js +58 -0
- package/dist/cjs/tokens/request.js.map +1 -0
- package/dist/cjs/types.js +17 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils/assertValidSecretKey.js +35 -0
- package/dist/cjs/utils/assertValidSecretKey.js.map +1 -0
- package/dist/cjs/utils/createCabinIdClient.js +38 -0
- package/dist/cjs/utils/createCabinIdClient.js.map +1 -0
- package/dist/cjs/utils/http.js +31 -0
- package/dist/cjs/utils/http.js.map +1 -0
- package/dist/cjs/utils/initial.js +45 -0
- package/dist/cjs/utils/initial.js.map +1 -0
- package/dist/cjs/utils/isomorphicAtob.js +36 -0
- package/dist/cjs/utils/isomorphicAtob.js.map +1 -0
- package/dist/cjs/utils/isomorphicBtoa.js +36 -0
- package/dist/cjs/utils/isomorphicBtoa.js.map +1 -0
- package/dist/cjs/utils/key.js +49 -0
- package/dist/cjs/utils/key.js.map +1 -0
- package/dist/cjs/utils/path.js +33 -0
- package/dist/cjs/utils/path.js.map +1 -0
- package/dist/cjs/utils/response.js +76 -0
- package/dist/cjs/utils/response.js.map +1 -0
- package/dist/cjs/utils.js +52 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/api/endpoints/AbstractApi.js +14 -0
- package/dist/esm/api/endpoints/AbstractApi.js.map +1 -0
- package/dist/esm/api/endpoints/UserApi.js +16 -0
- package/dist/esm/api/endpoints/UserApi.js.map +1 -0
- package/dist/esm/api/endpoints/index.js +7 -0
- package/dist/esm/api/endpoints/index.js.map +1 -0
- package/dist/esm/api/factory.js +35 -0
- package/dist/esm/api/factory.js.map +1 -0
- package/dist/esm/api/request.js +63 -0
- package/dist/esm/api/request.js.map +1 -0
- package/dist/esm/component.client.js +7 -0
- package/dist/esm/component.client.js.map +1 -0
- package/dist/esm/component.server.js +7 -0
- package/dist/esm/component.server.js.map +1 -0
- package/dist/esm/components/SignInButton.js +33 -0
- package/dist/esm/components/SignInButton.js.map +1 -0
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/constants.js +88 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/hooks/createContextAndHook.js +27 -0
- package/dist/esm/hooks/createContextAndHook.js.map +1 -0
- package/dist/esm/hooks/index.js +5 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/useSafeLayoutEffect.js +6 -0
- package/dist/esm/hooks/useSafeLayoutEffect.js.map +1 -0
- package/dist/esm/hooks/useUser.js +54 -0
- package/dist/esm/hooks/useUser.js.map +1 -0
- package/dist/esm/icons/logo.js +64 -0
- package/dist/esm/icons/logo.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +9 -0
- package/dist/esm/provider/context.js +24 -0
- package/dist/esm/provider/context.js.map +1 -0
- package/dist/esm/provider/core.provider.js +15 -0
- package/dist/esm/provider/core.provider.js.map +1 -0
- package/dist/esm/provider/main.provider.js +11 -0
- package/dist/esm/provider/main.provider.js.map +1 -0
- package/dist/esm/server/auth.js +37 -0
- package/dist/esm/server/auth.js.map +1 -0
- package/dist/esm/server/client.js +11 -0
- package/dist/esm/server/client.js.map +1 -0
- package/dist/esm/server/createGetAuth.js +23 -0
- package/dist/esm/server/createGetAuth.js.map +1 -0
- package/dist/esm/server/createRedirect.js +66 -0
- package/dist/esm/server/createRedirect.js.map +1 -0
- package/dist/esm/server/errors.js +78 -0
- package/dist/esm/server/errors.js.map +1 -0
- package/dist/esm/server/getCurrentUser.js +12 -0
- package/dist/esm/server/getCurrentUser.js.map +1 -0
- package/dist/esm/server/index.js +7 -0
- package/dist/esm/server/index.js.map +1 -0
- package/dist/esm/server/middleware.js +175 -0
- package/dist/esm/server/middleware.js.map +1 -0
- package/dist/esm/server/protect.js +45 -0
- package/dist/esm/server/protect.js.map +1 -0
- package/dist/esm/server/routeMatcher.js +18 -0
- package/dist/esm/server/routeMatcher.js.map +1 -0
- package/dist/esm/server/serverRedirectWithAuth.js +15 -0
- package/dist/esm/server/serverRedirectWithAuth.js.map +1 -0
- package/dist/esm/server/type.js +1 -0
- package/dist/esm/server/type.js.map +1 -0
- package/dist/esm/server/utils.js +132 -0
- package/dist/esm/server/utils.js.map +1 -0
- package/dist/esm/styles/global.css +420 -0
- package/dist/esm/styles/global.css.map +1 -0
- package/dist/esm/tokens/authObjects.js +20 -0
- package/dist/esm/tokens/authObjects.js.map +1 -0
- package/dist/esm/tokens/authStatus.js +59 -0
- package/dist/esm/tokens/authStatus.js.map +1 -0
- package/dist/esm/tokens/authenticateContext.js +45 -0
- package/dist/esm/tokens/authenticateContext.js.map +1 -0
- package/dist/esm/tokens/cabinIdRequest.js +55 -0
- package/dist/esm/tokens/cabinIdRequest.js.map +1 -0
- package/dist/esm/tokens/cabinIdUrl.js +12 -0
- package/dist/esm/tokens/cabinIdUrl.js.map +1 -0
- package/dist/esm/tokens/request.js +34 -0
- package/dist/esm/tokens/request.js.map +1 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils/assertValidSecretKey.js +11 -0
- package/dist/esm/utils/assertValidSecretKey.js.map +1 -0
- package/dist/esm/utils/createCabinIdClient.js +17 -0
- package/dist/esm/utils/createCabinIdClient.js.map +1 -0
- package/dist/esm/utils/http.js +7 -0
- package/dist/esm/utils/http.js.map +1 -0
- package/dist/esm/utils/initial.js +21 -0
- package/dist/esm/utils/initial.js.map +1 -0
- package/dist/esm/utils/isomorphicAtob.js +12 -0
- package/dist/esm/utils/isomorphicAtob.js.map +1 -0
- package/dist/esm/utils/isomorphicBtoa.js +12 -0
- package/dist/esm/utils/isomorphicBtoa.js.map +1 -0
- package/dist/esm/utils/key.js +24 -0
- package/dist/esm/utils/key.js.map +1 -0
- package/dist/esm/utils/path.js +9 -0
- package/dist/esm/utils/path.js.map +1 -0
- package/dist/esm/utils/response.js +49 -0
- package/dist/esm/utils/response.js.map +1 -0
- package/dist/esm/utils.js +27 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/types/api/endpoints/AbstractApi.d.ts +7 -0
- package/dist/types/api/endpoints/AbstractApi.d.ts.map +1 -0
- package/dist/types/api/endpoints/UserApi.d.ts +6 -0
- package/dist/types/api/endpoints/UserApi.d.ts.map +1 -0
- package/dist/types/api/endpoints/index.d.ts +3 -0
- package/dist/types/api/endpoints/index.d.ts.map +1 -0
- package/dist/types/api/factory.d.ts +35 -0
- package/dist/types/api/factory.d.ts.map +1 -0
- package/dist/types/api/request.d.ts +33 -0
- package/dist/types/api/request.d.ts.map +1 -0
- package/dist/types/component.client.d.ts +3 -0
- package/dist/types/component.client.d.ts.map +1 -0
- package/dist/types/component.server.d.ts +3 -0
- package/dist/types/component.server.d.ts.map +1 -0
- package/dist/types/components/SignInButton.d.ts +3 -0
- package/dist/types/components/SignInButton.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/constants.d.ts +69 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/hooks/createContextAndHook.d.ts +18 -0
- package/dist/types/hooks/createContextAndHook.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useSafeLayoutEffect.d.ts +3 -0
- package/dist/types/hooks/useSafeLayoutEffect.d.ts.map +1 -0
- package/dist/types/hooks/useUser.d.ts +36 -0
- package/dist/types/hooks/useUser.d.ts.map +1 -0
- package/dist/types/icons/logo.d.ts +3 -0
- package/dist/types/icons/logo.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/provider/context.d.ts +15 -0
- package/dist/types/provider/context.d.ts.map +1 -0
- package/dist/types/provider/core.provider.d.ts +6 -0
- package/dist/types/provider/core.provider.d.ts.map +1 -0
- package/dist/types/provider/main.provider.d.ts +5 -0
- package/dist/types/provider/main.provider.d.ts.map +1 -0
- package/dist/types/server/auth.d.ts +11 -0
- package/dist/types/server/auth.d.ts.map +1 -0
- package/dist/types/server/client.d.ts +3 -0
- package/dist/types/server/client.d.ts.map +1 -0
- package/dist/types/server/createGetAuth.d.ts +5 -0
- package/dist/types/server/createGetAuth.d.ts.map +1 -0
- package/dist/types/server/createRedirect.d.ts +21 -0
- package/dist/types/server/createRedirect.d.ts.map +1 -0
- package/dist/types/server/errors.d.ts +10 -0
- package/dist/types/server/errors.d.ts.map +1 -0
- package/dist/types/server/getCurrentUser.d.ts +3 -0
- package/dist/types/server/getCurrentUser.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +3 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/middleware.d.ts +33 -0
- package/dist/types/server/middleware.d.ts.map +1 -0
- package/dist/types/server/protect.d.ts +34 -0
- package/dist/types/server/protect.d.ts.map +1 -0
- package/dist/types/server/routeMatcher.d.ts +10 -0
- package/dist/types/server/routeMatcher.d.ts.map +1 -0
- package/dist/types/server/serverRedirectWithAuth.d.ts +3 -0
- package/dist/types/server/serverRedirectWithAuth.d.ts.map +1 -0
- package/dist/types/server/type.d.ts +14 -0
- package/dist/types/server/type.d.ts.map +1 -0
- package/dist/types/server/utils.d.ts +17 -0
- package/dist/types/server/utils.d.ts.map +1 -0
- package/dist/types/tokens/authObjects.d.ts +37 -0
- package/dist/types/tokens/authObjects.d.ts.map +1 -0
- package/dist/types/tokens/authStatus.d.ts +51 -0
- package/dist/types/tokens/authStatus.d.ts.map +1 -0
- package/dist/types/tokens/authenticateContext.d.ts +40 -0
- package/dist/types/tokens/authenticateContext.d.ts.map +1 -0
- package/dist/types/tokens/cabinIdRequest.d.ts +24 -0
- package/dist/types/tokens/cabinIdRequest.d.ts.map +1 -0
- package/dist/types/tokens/cabinIdUrl.d.ts +18 -0
- package/dist/types/tokens/cabinIdUrl.d.ts.map +1 -0
- package/dist/types/tokens/request.d.ts +4 -0
- package/dist/types/tokens/request.d.ts.map +1 -0
- package/dist/types/types.d.ts +34 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/assertValidSecretKey.d.ts +2 -0
- package/dist/types/utils/assertValidSecretKey.d.ts.map +1 -0
- package/dist/types/utils/createCabinIdClient.d.ts +5 -0
- package/dist/types/utils/createCabinIdClient.d.ts.map +1 -0
- package/dist/types/utils/http.d.ts +4 -0
- package/dist/types/utils/http.d.ts.map +1 -0
- package/dist/types/utils/initial.d.ts +5 -0
- package/dist/types/utils/initial.d.ts.map +1 -0
- package/dist/types/utils/isomorphicAtob.d.ts +6 -0
- package/dist/types/utils/isomorphicAtob.d.ts.map +1 -0
- package/dist/types/utils/isomorphicBtoa.d.ts +2 -0
- package/dist/types/utils/isomorphicBtoa.d.ts.map +1 -0
- package/dist/types/utils/key.d.ts +5 -0
- package/dist/types/utils/key.d.ts.map +1 -0
- package/dist/types/utils/path.d.ts +4 -0
- package/dist/types/utils/path.d.ts.map +1 -0
- package/dist/types/utils/response.d.ts +13 -0
- package/dist/types/utils/response.d.ts.map +1 -0
- package/dist/types/utils.d.ts +5 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
*,
|
|
2
|
+
::before,
|
|
3
|
+
::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border-width: 0;
|
|
6
|
+
border-style: solid;
|
|
7
|
+
border-color: #e5e7eb;
|
|
8
|
+
}
|
|
9
|
+
::before,
|
|
10
|
+
::after {
|
|
11
|
+
--tw-content: "";
|
|
12
|
+
}
|
|
13
|
+
html,
|
|
14
|
+
:host {
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
-webkit-text-size-adjust: 100%;
|
|
17
|
+
-moz-tab-size: 4;
|
|
18
|
+
-o-tab-size: 4;
|
|
19
|
+
tab-size: 4;
|
|
20
|
+
font-family:
|
|
21
|
+
ui-sans-serif,
|
|
22
|
+
system-ui,
|
|
23
|
+
sans-serif,
|
|
24
|
+
"Apple Color Emoji",
|
|
25
|
+
"Segoe UI Emoji",
|
|
26
|
+
"Segoe UI Symbol",
|
|
27
|
+
"Noto Color Emoji";
|
|
28
|
+
font-feature-settings: normal;
|
|
29
|
+
font-variation-settings: normal;
|
|
30
|
+
-webkit-tap-highlight-color: transparent;
|
|
31
|
+
}
|
|
32
|
+
body {
|
|
33
|
+
margin: 0;
|
|
34
|
+
line-height: inherit;
|
|
35
|
+
}
|
|
36
|
+
hr {
|
|
37
|
+
height: 0;
|
|
38
|
+
color: inherit;
|
|
39
|
+
border-top-width: 1px;
|
|
40
|
+
}
|
|
41
|
+
abbr:where([title]) {
|
|
42
|
+
-webkit-text-decoration: underline dotted;
|
|
43
|
+
text-decoration: underline dotted;
|
|
44
|
+
}
|
|
45
|
+
h1,
|
|
46
|
+
h2,
|
|
47
|
+
h3,
|
|
48
|
+
h4,
|
|
49
|
+
h5,
|
|
50
|
+
h6 {
|
|
51
|
+
font-size: inherit;
|
|
52
|
+
font-weight: inherit;
|
|
53
|
+
}
|
|
54
|
+
a {
|
|
55
|
+
color: inherit;
|
|
56
|
+
text-decoration: inherit;
|
|
57
|
+
}
|
|
58
|
+
b,
|
|
59
|
+
strong {
|
|
60
|
+
font-weight: bolder;
|
|
61
|
+
}
|
|
62
|
+
code,
|
|
63
|
+
kbd,
|
|
64
|
+
samp,
|
|
65
|
+
pre {
|
|
66
|
+
font-family:
|
|
67
|
+
ui-monospace,
|
|
68
|
+
SFMono-Regular,
|
|
69
|
+
Menlo,
|
|
70
|
+
Monaco,
|
|
71
|
+
Consolas,
|
|
72
|
+
"Liberation Mono",
|
|
73
|
+
"Courier New",
|
|
74
|
+
monospace;
|
|
75
|
+
font-feature-settings: normal;
|
|
76
|
+
font-variation-settings: normal;
|
|
77
|
+
font-size: 1em;
|
|
78
|
+
}
|
|
79
|
+
small {
|
|
80
|
+
font-size: 80%;
|
|
81
|
+
}
|
|
82
|
+
sub,
|
|
83
|
+
sup {
|
|
84
|
+
font-size: 75%;
|
|
85
|
+
line-height: 0;
|
|
86
|
+
position: relative;
|
|
87
|
+
vertical-align: baseline;
|
|
88
|
+
}
|
|
89
|
+
sub {
|
|
90
|
+
bottom: -0.25em;
|
|
91
|
+
}
|
|
92
|
+
sup {
|
|
93
|
+
top: -0.5em;
|
|
94
|
+
}
|
|
95
|
+
table {
|
|
96
|
+
text-indent: 0;
|
|
97
|
+
border-color: inherit;
|
|
98
|
+
border-collapse: collapse;
|
|
99
|
+
}
|
|
100
|
+
button,
|
|
101
|
+
input,
|
|
102
|
+
optgroup,
|
|
103
|
+
select,
|
|
104
|
+
textarea {
|
|
105
|
+
font-family: inherit;
|
|
106
|
+
font-feature-settings: inherit;
|
|
107
|
+
font-variation-settings: inherit;
|
|
108
|
+
font-size: 100%;
|
|
109
|
+
font-weight: inherit;
|
|
110
|
+
line-height: inherit;
|
|
111
|
+
letter-spacing: inherit;
|
|
112
|
+
color: inherit;
|
|
113
|
+
margin: 0;
|
|
114
|
+
padding: 0;
|
|
115
|
+
}
|
|
116
|
+
button,
|
|
117
|
+
select {
|
|
118
|
+
text-transform: none;
|
|
119
|
+
}
|
|
120
|
+
button,
|
|
121
|
+
input:where([type=button]),
|
|
122
|
+
input:where([type=reset]),
|
|
123
|
+
input:where([type=submit]) {
|
|
124
|
+
-webkit-appearance: button;
|
|
125
|
+
background-color: transparent;
|
|
126
|
+
background-image: none;
|
|
127
|
+
}
|
|
128
|
+
:-moz-focusring {
|
|
129
|
+
outline: auto;
|
|
130
|
+
}
|
|
131
|
+
:-moz-ui-invalid {
|
|
132
|
+
box-shadow: none;
|
|
133
|
+
}
|
|
134
|
+
progress {
|
|
135
|
+
vertical-align: baseline;
|
|
136
|
+
}
|
|
137
|
+
::-webkit-inner-spin-button,
|
|
138
|
+
::-webkit-outer-spin-button {
|
|
139
|
+
height: auto;
|
|
140
|
+
}
|
|
141
|
+
[type=search] {
|
|
142
|
+
-webkit-appearance: textfield;
|
|
143
|
+
outline-offset: -2px;
|
|
144
|
+
}
|
|
145
|
+
::-webkit-search-decoration {
|
|
146
|
+
-webkit-appearance: none;
|
|
147
|
+
}
|
|
148
|
+
::-webkit-file-upload-button {
|
|
149
|
+
-webkit-appearance: button;
|
|
150
|
+
font: inherit;
|
|
151
|
+
}
|
|
152
|
+
summary {
|
|
153
|
+
display: list-item;
|
|
154
|
+
}
|
|
155
|
+
blockquote,
|
|
156
|
+
dl,
|
|
157
|
+
dd,
|
|
158
|
+
h1,
|
|
159
|
+
h2,
|
|
160
|
+
h3,
|
|
161
|
+
h4,
|
|
162
|
+
h5,
|
|
163
|
+
h6,
|
|
164
|
+
hr,
|
|
165
|
+
figure,
|
|
166
|
+
p,
|
|
167
|
+
pre {
|
|
168
|
+
margin: 0;
|
|
169
|
+
}
|
|
170
|
+
fieldset {
|
|
171
|
+
margin: 0;
|
|
172
|
+
padding: 0;
|
|
173
|
+
}
|
|
174
|
+
legend {
|
|
175
|
+
padding: 0;
|
|
176
|
+
}
|
|
177
|
+
ol,
|
|
178
|
+
ul,
|
|
179
|
+
menu {
|
|
180
|
+
list-style: none;
|
|
181
|
+
margin: 0;
|
|
182
|
+
padding: 0;
|
|
183
|
+
}
|
|
184
|
+
dialog {
|
|
185
|
+
padding: 0;
|
|
186
|
+
}
|
|
187
|
+
textarea {
|
|
188
|
+
resize: vertical;
|
|
189
|
+
}
|
|
190
|
+
input::-moz-placeholder,
|
|
191
|
+
textarea::-moz-placeholder {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
color: #9ca3af;
|
|
194
|
+
}
|
|
195
|
+
input::placeholder,
|
|
196
|
+
textarea::placeholder {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
color: #9ca3af;
|
|
199
|
+
}
|
|
200
|
+
button,
|
|
201
|
+
[role=button] {
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
}
|
|
204
|
+
:disabled {
|
|
205
|
+
cursor: default;
|
|
206
|
+
}
|
|
207
|
+
img,
|
|
208
|
+
svg,
|
|
209
|
+
video,
|
|
210
|
+
canvas,
|
|
211
|
+
audio,
|
|
212
|
+
iframe,
|
|
213
|
+
embed,
|
|
214
|
+
object {
|
|
215
|
+
display: block;
|
|
216
|
+
vertical-align: middle;
|
|
217
|
+
}
|
|
218
|
+
img,
|
|
219
|
+
video {
|
|
220
|
+
max-width: 100%;
|
|
221
|
+
height: auto;
|
|
222
|
+
}
|
|
223
|
+
[hidden] {
|
|
224
|
+
display: none;
|
|
225
|
+
}
|
|
226
|
+
*,
|
|
227
|
+
::before,
|
|
228
|
+
::after {
|
|
229
|
+
--tw-border-spacing-x: 0;
|
|
230
|
+
--tw-border-spacing-y: 0;
|
|
231
|
+
--tw-translate-x: 0;
|
|
232
|
+
--tw-translate-y: 0;
|
|
233
|
+
--tw-rotate: 0;
|
|
234
|
+
--tw-skew-x: 0;
|
|
235
|
+
--tw-skew-y: 0;
|
|
236
|
+
--tw-scale-x: 1;
|
|
237
|
+
--tw-scale-y: 1;
|
|
238
|
+
--tw-pan-x: ;
|
|
239
|
+
--tw-pan-y: ;
|
|
240
|
+
--tw-pinch-zoom: ;
|
|
241
|
+
--tw-scroll-snap-strictness: proximity;
|
|
242
|
+
--tw-gradient-from-position: ;
|
|
243
|
+
--tw-gradient-via-position: ;
|
|
244
|
+
--tw-gradient-to-position: ;
|
|
245
|
+
--tw-ordinal: ;
|
|
246
|
+
--tw-slashed-zero: ;
|
|
247
|
+
--tw-numeric-figure: ;
|
|
248
|
+
--tw-numeric-spacing: ;
|
|
249
|
+
--tw-numeric-fraction: ;
|
|
250
|
+
--tw-ring-inset: ;
|
|
251
|
+
--tw-ring-offset-width: 0px;
|
|
252
|
+
--tw-ring-offset-color: #fff;
|
|
253
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
254
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
255
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
256
|
+
--tw-shadow: 0 0 #0000;
|
|
257
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
258
|
+
--tw-blur: ;
|
|
259
|
+
--tw-brightness: ;
|
|
260
|
+
--tw-contrast: ;
|
|
261
|
+
--tw-grayscale: ;
|
|
262
|
+
--tw-hue-rotate: ;
|
|
263
|
+
--tw-invert: ;
|
|
264
|
+
--tw-saturate: ;
|
|
265
|
+
--tw-sepia: ;
|
|
266
|
+
--tw-drop-shadow: ;
|
|
267
|
+
--tw-backdrop-blur: ;
|
|
268
|
+
--tw-backdrop-brightness: ;
|
|
269
|
+
--tw-backdrop-contrast: ;
|
|
270
|
+
--tw-backdrop-grayscale: ;
|
|
271
|
+
--tw-backdrop-hue-rotate: ;
|
|
272
|
+
--tw-backdrop-invert: ;
|
|
273
|
+
--tw-backdrop-opacity: ;
|
|
274
|
+
--tw-backdrop-saturate: ;
|
|
275
|
+
--tw-backdrop-sepia: ;
|
|
276
|
+
--tw-contain-size: ;
|
|
277
|
+
--tw-contain-layout: ;
|
|
278
|
+
--tw-contain-paint: ;
|
|
279
|
+
--tw-contain-style: ;
|
|
280
|
+
}
|
|
281
|
+
::backdrop {
|
|
282
|
+
--tw-border-spacing-x: 0;
|
|
283
|
+
--tw-border-spacing-y: 0;
|
|
284
|
+
--tw-translate-x: 0;
|
|
285
|
+
--tw-translate-y: 0;
|
|
286
|
+
--tw-rotate: 0;
|
|
287
|
+
--tw-skew-x: 0;
|
|
288
|
+
--tw-skew-y: 0;
|
|
289
|
+
--tw-scale-x: 1;
|
|
290
|
+
--tw-scale-y: 1;
|
|
291
|
+
--tw-pan-x: ;
|
|
292
|
+
--tw-pan-y: ;
|
|
293
|
+
--tw-pinch-zoom: ;
|
|
294
|
+
--tw-scroll-snap-strictness: proximity;
|
|
295
|
+
--tw-gradient-from-position: ;
|
|
296
|
+
--tw-gradient-via-position: ;
|
|
297
|
+
--tw-gradient-to-position: ;
|
|
298
|
+
--tw-ordinal: ;
|
|
299
|
+
--tw-slashed-zero: ;
|
|
300
|
+
--tw-numeric-figure: ;
|
|
301
|
+
--tw-numeric-spacing: ;
|
|
302
|
+
--tw-numeric-fraction: ;
|
|
303
|
+
--tw-ring-inset: ;
|
|
304
|
+
--tw-ring-offset-width: 0px;
|
|
305
|
+
--tw-ring-offset-color: #fff;
|
|
306
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
307
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
308
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
309
|
+
--tw-shadow: 0 0 #0000;
|
|
310
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
311
|
+
--tw-blur: ;
|
|
312
|
+
--tw-brightness: ;
|
|
313
|
+
--tw-contrast: ;
|
|
314
|
+
--tw-grayscale: ;
|
|
315
|
+
--tw-hue-rotate: ;
|
|
316
|
+
--tw-invert: ;
|
|
317
|
+
--tw-saturate: ;
|
|
318
|
+
--tw-sepia: ;
|
|
319
|
+
--tw-drop-shadow: ;
|
|
320
|
+
--tw-backdrop-blur: ;
|
|
321
|
+
--tw-backdrop-brightness: ;
|
|
322
|
+
--tw-backdrop-contrast: ;
|
|
323
|
+
--tw-backdrop-grayscale: ;
|
|
324
|
+
--tw-backdrop-hue-rotate: ;
|
|
325
|
+
--tw-backdrop-invert: ;
|
|
326
|
+
--tw-backdrop-opacity: ;
|
|
327
|
+
--tw-backdrop-saturate: ;
|
|
328
|
+
--tw-backdrop-sepia: ;
|
|
329
|
+
--tw-contain-size: ;
|
|
330
|
+
--tw-contain-layout: ;
|
|
331
|
+
--tw-contain-paint: ;
|
|
332
|
+
--tw-contain-style: ;
|
|
333
|
+
}
|
|
334
|
+
.container {
|
|
335
|
+
width: 100%;
|
|
336
|
+
}
|
|
337
|
+
@media (min-width: 640px) {
|
|
338
|
+
.container {
|
|
339
|
+
max-width: 640px;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
@media (min-width: 768px) {
|
|
343
|
+
.container {
|
|
344
|
+
max-width: 768px;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
@media (min-width: 1024px) {
|
|
348
|
+
.container {
|
|
349
|
+
max-width: 1024px;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
@media (min-width: 1280px) {
|
|
353
|
+
.container {
|
|
354
|
+
max-width: 1280px;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
@media (min-width: 1536px) {
|
|
358
|
+
.container {
|
|
359
|
+
max-width: 1536px;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
.fixed {
|
|
363
|
+
position: fixed;
|
|
364
|
+
}
|
|
365
|
+
.absolute {
|
|
366
|
+
position: absolute;
|
|
367
|
+
}
|
|
368
|
+
.flex {
|
|
369
|
+
display: flex;
|
|
370
|
+
}
|
|
371
|
+
.max-w-48 {
|
|
372
|
+
max-width: 12rem;
|
|
373
|
+
}
|
|
374
|
+
.flex-row {
|
|
375
|
+
flex-direction: row;
|
|
376
|
+
}
|
|
377
|
+
.items-center {
|
|
378
|
+
align-items: center;
|
|
379
|
+
}
|
|
380
|
+
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
|
381
|
+
--tw-space-x-reverse: 0;
|
|
382
|
+
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
383
|
+
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
384
|
+
}
|
|
385
|
+
.rounded-full {
|
|
386
|
+
border-radius: 9999px;
|
|
387
|
+
}
|
|
388
|
+
.bg-blue-600 {
|
|
389
|
+
--tw-bg-opacity: 1;
|
|
390
|
+
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
|
|
391
|
+
}
|
|
392
|
+
.py-2 {
|
|
393
|
+
padding-top: 0.5rem;
|
|
394
|
+
padding-bottom: 0.5rem;
|
|
395
|
+
}
|
|
396
|
+
.pl-2 {
|
|
397
|
+
padding-left: 0.5rem;
|
|
398
|
+
}
|
|
399
|
+
.pr-4 {
|
|
400
|
+
padding-right: 1rem;
|
|
401
|
+
}
|
|
402
|
+
.text-sm {
|
|
403
|
+
font-size: 0.875rem;
|
|
404
|
+
line-height: 1.25rem;
|
|
405
|
+
}
|
|
406
|
+
.text-white {
|
|
407
|
+
--tw-text-opacity: 1;
|
|
408
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
409
|
+
}
|
|
410
|
+
.filter {
|
|
411
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
412
|
+
}
|
|
413
|
+
.hover\:opacity-90:hover {
|
|
414
|
+
opacity: 0.9;
|
|
415
|
+
}
|
|
416
|
+
.active\:bg-blue-700:active {
|
|
417
|
+
--tw-bg-opacity: 1;
|
|
418
|
+
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
|
419
|
+
}
|
|
420
|
+
/*# sourceMappingURL=global.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["/*\n! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n"],"mappings":"AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;AAChB;AAEA;AACA;AACE,gBAAc;AAChB;AAYA;AACA;AACE,eAAa;AACb,4BAA0B;AAC1B,iBAAe;AACf,eAAa;AACV,YAAU;AACb;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,UAAU;AAAA,IAAE,mBAAmB;AAAA,IAAE,gBAAgB;AAAA,IAAE,iBAAiB;AAAA,IAAE;AAC7G,yBAAuB;AACvB,2BAAyB;AACzB,+BAA6B;AAC/B;AAOA;AACE,UAAQ;AACR,eAAa;AACf;AAQA;AACE,UAAQ;AACR,SAAO;AACP,oBAAkB;AACpB;AAMA,IAAI,OAAO,CAAC;AACV,2BAAyB,UAAU;AAC3B,mBAAiB,UAAU;AACrC;AAMA;AACA;AACA;AACA;AACA;AACA;AACE,aAAW;AACX,eAAa;AACf;AAMA;AACE,SAAO;AACP,mBAAiB;AACnB;AAMA;AACA;AACE,eAAa;AACf;AASA;AACA;AACA;AACA;AACE;AAAA,IAAa,YAAY;AAAA,IAAE,cAAc;AAAA,IAAE,KAAK;AAAA,IAAE,MAAM;AAAA,IAAE,QAAQ;AAAA,IAAE,iBAAiB;AAAA,IAAE,aAAa;AAAA,IAAE;AACtG,yBAAuB;AACvB,2BAAyB;AACzB,aAAW;AACb;AAMA;AACE,aAAW;AACb;AAMA;AACA;AACE,aAAW;AACX,eAAa;AACb,YAAU;AACV,kBAAgB;AAClB;AAEA;AACE,UAAQ;AACV;AAEA;AACE,OAAK;AACP;AAQA;AACE,eAAa;AACb,gBAAc;AACd,mBAAiB;AACnB;AAQA;AACA;AACA;AACA;AACA;AACE,eAAa;AACb,yBAAuB;AACvB,2BAAyB;AACzB,aAAW;AACX,eAAa;AACb,eAAa;AACb,kBAAgB;AAChB,SAAO;AACP,UAAQ;AACR,WAAS;AACX;AAMA;AACA;AACE,kBAAgB;AAClB;AAOA;AACA,KAAK,OAAO,CAAC;AACb,KAAK,OAAO,CAAC;AACb,KAAK,OAAO,CAAC;AACX,sBAAoB;AACpB,oBAAkB;AAClB,oBAAkB;AACpB;AAMA;AACE,WAAS;AACX;AAMA;AACE,cAAY;AACd;AAMA;AACE,kBAAgB;AAClB;AAMA;AACA;AACE,UAAQ;AACV;AAOA,CAAC;AACC,sBAAoB;AACpB,kBAAgB;AAClB;AAMA;AACE,sBAAoB;AACtB;AAOA;AACE,sBAAoB;AACpB,QAAM;AACR;AAMA;AACE,WAAS;AACX;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,UAAQ;AACV;AAEA;AACE,UAAQ;AACR,WAAS;AACX;AAEA;AACE,WAAS;AACX;AAEA;AACA;AACA;AACE,cAAY;AACZ,UAAQ;AACR,WAAS;AACX;AAKA;AACE,WAAS;AACX;AAMA;AACE,UAAQ;AACV;AAOA,KAAK;AAAoB,QAAQ;AAC/B,WAAS;AACT,SAAO;AACT;AAEA,KAAK;AACL,QAAQ;AACN,WAAS;AACT,SAAO;AACT;AAMA;AACA,CAAC;AACC,UAAQ;AACV;AAKA;AACE,UAAQ;AACV;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,WAAS;AACT,kBAAgB;AAClB;AAMA;AACA;AACE,aAAW;AACX,UAAQ;AACV;AAGA,CAAC;AACC,WAAS;AACX;AAEA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AACA,CAAC;AACC,SAAO;AACT;AACA,OAAO,CAAC,SAAS,EAAE;AAEjB,GALD;AAMG,eAAW;AACb;AACF;AACA,OAAO,CAAC,SAAS,EAAE;AAEjB,GAXD;AAYG,eAAW;AACb;AACF;AACA,OAAO,CAAC,SAAS,EAAE;AAEjB,GAjBD;AAkBG,eAAW;AACb;AACF;AACA,OAAO,CAAC,SAAS,EAAE;AAEjB,GAvBD;AAwBG,eAAW;AACb;AACF;AACA,OAAO,CAAC,SAAS,EAAE;AAEjB,GA7BD;AA8BG,eAAW;AACb;AACF;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAAC;AACC,WAAS;AACX;AACA,CAAC;AACC,aAAW;AACb;AACA,CAAC;AACC,kBAAgB;AAClB;AACA,CAAC;AACC,eAAa;AACf;AACA,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;AAClC,wBAAsB;AACtB,gBAAc,KAAK,OAAO,EAAE,IAAI;AAChC,eAAa,KAAK,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI;AAC1C;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI;AACxC;AACA,CAAC;AACC,eAAa;AACb,kBAAgB;AAClB;AACA,CAAC;AACC,gBAAc;AAChB;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAAC;AACC,qBAAmB;AACnB,SAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI;AAC/B;AACA,CAAC;AACC,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI;AACxC;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var authObjects_exports = {};
|
|
20
|
+
__export(authObjects_exports, {
|
|
21
|
+
signedInAuthObject: () => signedInAuthObject,
|
|
22
|
+
signedOutAuthObject: () => signedOutAuthObject
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(authObjects_exports);
|
|
25
|
+
function signedInAuthObject({
|
|
26
|
+
userId,
|
|
27
|
+
sessionToken
|
|
28
|
+
}) {
|
|
29
|
+
return {
|
|
30
|
+
userId,
|
|
31
|
+
sessionToken
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function signedOutAuthObject() {
|
|
35
|
+
return {
|
|
36
|
+
userId: null,
|
|
37
|
+
sessionToken: null
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
signedInAuthObject,
|
|
43
|
+
signedOutAuthObject
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=authObjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/tokens/authObjects.ts"],"sourcesContent":["import { CreateBackendApiOptions } from '../api/factory';\n\n/**\n * @internal\n */\nexport type SignedInAuthObjectOptions = CreateBackendApiOptions & {\n token: string;\n};\n\n/**\n * @internal\n */\nexport type SignedInAuthObject = {\n userId: string;\n sessionToken: string;\n};\n\n/**\n * @internal\n */\nexport type SignedOutAuthObject = {\n userId: null;\n sessionToken: null;\n};\n\n/**\n * @internal\n */\nexport type AuthObject = SignedInAuthObject | SignedOutAuthObject;\n\n/**\n * @internal\n */\nexport function signedInAuthObject({\n userId,\n sessionToken,\n}: {\n userId: string;\n sessionToken: string;\n}): SignedInAuthObject {\n return {\n userId,\n sessionToken,\n };\n}\n\n/**\n * @internal\n */\nexport function signedOutAuthObject(): SignedOutAuthObject {\n return {\n userId: null,\n sessionToken: null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AACF,GAGuB;AACrB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAKO,SAAS,sBAA2C;AACzD,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,cAAc;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var authStatus_exports = {};
|
|
20
|
+
__export(authStatus_exports, {
|
|
21
|
+
AuthErrorReason: () => AuthErrorReason,
|
|
22
|
+
AuthStatus: () => AuthStatus,
|
|
23
|
+
signedIn: () => signedIn,
|
|
24
|
+
signedOut: () => signedOut
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(authStatus_exports);
|
|
27
|
+
var import_authObjects = require("./authObjects");
|
|
28
|
+
const AuthStatus = {
|
|
29
|
+
SignedIn: "signed-in",
|
|
30
|
+
SignedOut: "signed-out",
|
|
31
|
+
Handshake: "handshake"
|
|
32
|
+
};
|
|
33
|
+
const AuthErrorReason = {
|
|
34
|
+
ClientUATWithoutSessionToken: "client-uat-but-no-session-token",
|
|
35
|
+
DevBrowserMissing: "dev-browser-missing",
|
|
36
|
+
DevBrowserSync: "dev-browser-sync",
|
|
37
|
+
PrimaryRespondsToSyncing: "primary-responds-to-syncing",
|
|
38
|
+
SatelliteCookieNeedsSyncing: "satellite-needs-syncing",
|
|
39
|
+
SessionTokenAndUATMissing: "session-token-and-uat-missing",
|
|
40
|
+
SessionTokenMissing: "session-token-missing",
|
|
41
|
+
SessionTokenOutdated: "session-token-outdated",
|
|
42
|
+
SessionTokenWithoutClientUAT: "session-token-but-no-client-uat",
|
|
43
|
+
UnexpectedError: "unexpected-error"
|
|
44
|
+
};
|
|
45
|
+
function signedIn(authenticateContext, headers = new Headers(), token) {
|
|
46
|
+
const authObject = (0, import_authObjects.signedInAuthObject)({
|
|
47
|
+
userId: authenticateContext.userId || "",
|
|
48
|
+
sessionToken: authenticateContext.sessionToken || ""
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
status: AuthStatus.SignedIn,
|
|
52
|
+
proxyUrl: authenticateContext.proxyUrl || "",
|
|
53
|
+
publishableKey: authenticateContext.publishableKey || "",
|
|
54
|
+
signInUrl: authenticateContext.signInUrl || "",
|
|
55
|
+
signUpUrl: authenticateContext.signUpUrl || "",
|
|
56
|
+
afterSignInUrl: authenticateContext.afterSignInUrl || "",
|
|
57
|
+
afterSignUpUrl: authenticateContext.afterSignUpUrl || "",
|
|
58
|
+
isSignedIn: true,
|
|
59
|
+
toAuth: () => authObject,
|
|
60
|
+
headers,
|
|
61
|
+
token
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function signedOut(authenticateContext, headers = new Headers()) {
|
|
65
|
+
return {
|
|
66
|
+
status: AuthStatus.SignedOut,
|
|
67
|
+
proxyUrl: authenticateContext.proxyUrl || "",
|
|
68
|
+
publishableKey: authenticateContext.publishableKey || "",
|
|
69
|
+
signInUrl: authenticateContext.signInUrl || "",
|
|
70
|
+
signUpUrl: authenticateContext.signUpUrl || "",
|
|
71
|
+
afterSignInUrl: authenticateContext.afterSignInUrl || "",
|
|
72
|
+
afterSignUpUrl: authenticateContext.afterSignUpUrl || "",
|
|
73
|
+
isSignedIn: false,
|
|
74
|
+
headers,
|
|
75
|
+
toAuth: () => (0, import_authObjects.signedOutAuthObject)(),
|
|
76
|
+
token: null
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
+
0 && (module.exports = {
|
|
81
|
+
AuthErrorReason,
|
|
82
|
+
AuthStatus,
|
|
83
|
+
signedIn,
|
|
84
|
+
signedOut
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=authStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/tokens/authStatus.ts"],"sourcesContent":["import type { SignedInAuthObject, SignedOutAuthObject } from './authObjects';\nimport { signedInAuthObject, signedOutAuthObject } from './authObjects';\nimport { AuthenticateContext } from './authenticateContext';\n\nexport const AuthStatus = {\n SignedIn: 'signed-in',\n SignedOut: 'signed-out',\n Handshake: 'handshake',\n} as const;\n\nexport type AuthStatus = (typeof AuthStatus)[keyof typeof AuthStatus];\n\nexport type SignedInState = {\n status: typeof AuthStatus.SignedIn;\n proxyUrl?: string;\n publishableKey: string;\n signInUrl: string;\n signUpUrl: string;\n afterSignInUrl: string;\n afterSignUpUrl: string;\n isSignedIn: true;\n toAuth: () => SignedInAuthObject;\n headers: Headers;\n token: string;\n};\n\nexport type SignedOutState = {\n status: typeof AuthStatus.SignedOut;\n proxyUrl?: string;\n publishableKey: string;\n signInUrl: string;\n signUpUrl: string;\n afterSignInUrl: string;\n afterSignUpUrl: string;\n isSignedIn: false;\n toAuth: () => SignedOutAuthObject;\n headers: Headers;\n token: null;\n};\n\nexport const AuthErrorReason = {\n ClientUATWithoutSessionToken: 'client-uat-but-no-session-token',\n DevBrowserMissing: 'dev-browser-missing',\n DevBrowserSync: 'dev-browser-sync',\n PrimaryRespondsToSyncing: 'primary-responds-to-syncing',\n SatelliteCookieNeedsSyncing: 'satellite-needs-syncing',\n SessionTokenAndUATMissing: 'session-token-and-uat-missing',\n SessionTokenMissing: 'session-token-missing',\n SessionTokenOutdated: 'session-token-outdated',\n SessionTokenWithoutClientUAT: 'session-token-but-no-client-uat',\n UnexpectedError: 'unexpected-error',\n} as const;\n\nexport type AuthErrorReason =\n (typeof AuthErrorReason)[keyof typeof AuthErrorReason];\n\nexport type RequestState = SignedInState | SignedOutState;\n\nexport function signedIn(\n authenticateContext: AuthenticateContext,\n headers: Headers = new Headers(),\n token: string\n): SignedInState {\n const authObject = signedInAuthObject({\n userId: authenticateContext.userId || '',\n sessionToken: authenticateContext.sessionToken || '',\n });\n return {\n status: AuthStatus.SignedIn,\n proxyUrl: authenticateContext.proxyUrl || '',\n publishableKey: authenticateContext.publishableKey || '',\n signInUrl: authenticateContext.signInUrl || '',\n signUpUrl: authenticateContext.signUpUrl || '',\n afterSignInUrl: authenticateContext.afterSignInUrl || '',\n afterSignUpUrl: authenticateContext.afterSignUpUrl || '',\n isSignedIn: true,\n toAuth: () => authObject,\n headers,\n token,\n };\n}\n\nexport function signedOut(\n authenticateContext: AuthenticateContext,\n headers: Headers = new Headers()\n): SignedOutState {\n return {\n status: AuthStatus.SignedOut,\n proxyUrl: authenticateContext.proxyUrl || '',\n publishableKey: authenticateContext.publishableKey || '',\n signInUrl: authenticateContext.signInUrl || '',\n signUpUrl: authenticateContext.signUpUrl || '',\n afterSignInUrl: authenticateContext.afterSignInUrl || '',\n afterSignUpUrl: authenticateContext.afterSignUpUrl || '',\n isSignedIn: false,\n headers,\n toAuth: () => signedOutAuthObject(),\n token: null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,yBAAwD;AAGjD,MAAM,aAAa;AAAA,EACxB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AACb;AAgCO,MAAM,kBAAkB;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,8BAA8B;AAAA,EAC9B,iBAAiB;AACnB;AAOO,SAAS,SACd,qBACA,UAAmB,IAAI,QAAQ,GAC/B,OACe;AACf,QAAM,iBAAa,uCAAmB;AAAA,IACpC,QAAQ,oBAAoB,UAAU;AAAA,IACtC,cAAc,oBAAoB,gBAAgB;AAAA,EACpD,CAAC;AACD,SAAO;AAAA,IACL,QAAQ,WAAW;AAAA,IACnB,UAAU,oBAAoB,YAAY;AAAA,IAC1C,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,WAAW,oBAAoB,aAAa;AAAA,IAC5C,WAAW,oBAAoB,aAAa;AAAA,IAC5C,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,YAAY;AAAA,IACZ,QAAQ,MAAM;AAAA,IACd;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,UACd,qBACA,UAAmB,IAAI,QAAQ,GACf;AAChB,SAAO;AAAA,IACL,QAAQ,WAAW;AAAA,IACnB,UAAU,oBAAoB,YAAY;AAAA,IAC1C,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,WAAW,oBAAoB,aAAa;AAAA,IAC5C,WAAW,oBAAoB,aAAa;AAAA,IAC5C,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,gBAAgB,oBAAoB,kBAAkB;AAAA,IACtD,YAAY;AAAA,IACZ;AAAA,IACA,QAAQ,UAAM,wCAAoB;AAAA,IAClC,OAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var authenticateContext_exports = {};
|
|
20
|
+
__export(authenticateContext_exports, {
|
|
21
|
+
createAuthenticateContext: () => createAuthenticateContext
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(authenticateContext_exports);
|
|
24
|
+
var import_constants = require("../constants");
|
|
25
|
+
class AuthenticateContext {
|
|
26
|
+
constructor(cabinIdRequest, options) {
|
|
27
|
+
this.cabinIdRequest = cabinIdRequest;
|
|
28
|
+
this.initHeaderValues();
|
|
29
|
+
this.initCookieValues();
|
|
30
|
+
Object.assign(this, options);
|
|
31
|
+
this.cabinIdUrl = this.cabinIdRequest.cabinIdUrl;
|
|
32
|
+
}
|
|
33
|
+
get userId() {
|
|
34
|
+
return this.userIdInCookie;
|
|
35
|
+
}
|
|
36
|
+
get sessionToken() {
|
|
37
|
+
return this.sessionTokenInCookie || this.sessionTokenInHeader;
|
|
38
|
+
}
|
|
39
|
+
initHeaderValues() {
|
|
40
|
+
const get = (name) => this.cabinIdRequest.headers.get(name) || void 0;
|
|
41
|
+
this.sessionTokenInHeader = this.stripAuthorizationHeader(
|
|
42
|
+
get(import_constants.constants.Headers.Authorization)
|
|
43
|
+
);
|
|
44
|
+
this.origin = get(import_constants.constants.Headers.Origin);
|
|
45
|
+
this.host = get(import_constants.constants.Headers.Host);
|
|
46
|
+
this.forwardedHost = get(import_constants.constants.Headers.ForwardedHost);
|
|
47
|
+
this.forwardedProto = get(import_constants.constants.Headers.CloudFrontForwardedProto) || get(import_constants.constants.Headers.ForwardedProto);
|
|
48
|
+
this.referrer = get(import_constants.constants.Headers.Referrer);
|
|
49
|
+
this.userAgent = get(import_constants.constants.Headers.UserAgent);
|
|
50
|
+
this.secFetchDest = get(import_constants.constants.Headers.SecFetchDest);
|
|
51
|
+
this.accept = get(import_constants.constants.Headers.Accept);
|
|
52
|
+
}
|
|
53
|
+
initCookieValues() {
|
|
54
|
+
const get = (name) => this.cabinIdRequest.cookies.get(name) || void 0;
|
|
55
|
+
this.sessionTokenInCookie = get(import_constants.constants.Cookies.Client);
|
|
56
|
+
this.userIdInCookie = get(import_constants.constants.Cookies.User);
|
|
57
|
+
}
|
|
58
|
+
stripAuthorizationHeader(authValue) {
|
|
59
|
+
return authValue == null ? void 0 : authValue.replace("Bearer ", "");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const createAuthenticateContext = (...args) => {
|
|
63
|
+
return new AuthenticateContext(...args);
|
|
64
|
+
};
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
createAuthenticateContext
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=authenticateContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/tokens/authenticateContext.ts"],"sourcesContent":["import { AuthenticateRequestOptions } from '../api/factory';\nimport { constants } from '../constants';\nimport { CabinIdRequest } from './cabinIdRequest';\n\ninterface AuthenticateContextInterface extends AuthenticateRequestOptions {\n // header-based values\n sessionTokenInHeader: string | undefined;\n origin: string | undefined;\n host: string | undefined;\n forwardedHost: string | undefined;\n forwardedProto: string | undefined;\n referrer: string | undefined;\n userAgent: string | undefined;\n secFetchDest: string | undefined;\n accept: string | undefined;\n // cookie-based values\n sessionTokenInCookie: string | undefined;\n userIdInCookie: string | undefined;\n clientUat: number;\n // handshake-related values\n devBrowserToken: string | undefined;\n handshakeToken: string | undefined;\n // url derived from headers\n cabinIdUrl: URL;\n // cookie or header session token\n sessionToken: string | undefined;\n}\n\ninterface AuthenticateContext extends AuthenticateContextInterface {}\n\n/**\n * All data required to authenticate a request.\n * This is the data we use to decide whether a request\n * is in a signed in or signed out state or if we need\n * to perform a handshake.\n */\nclass AuthenticateContext {\n public get userId(): string | undefined {\n return this.userIdInCookie;\n }\n\n public get sessionToken(): string | undefined {\n return this.sessionTokenInCookie || this.sessionTokenInHeader;\n }\n\n public constructor(\n private cabinIdRequest: CabinIdRequest,\n options: AuthenticateRequestOptions\n ) {\n this.initHeaderValues();\n this.initCookieValues();\n Object.assign(this, options);\n this.cabinIdUrl = this.cabinIdRequest.cabinIdUrl;\n }\n\n private initHeaderValues() {\n const get = (name: string) =>\n this.cabinIdRequest.headers.get(name) || undefined;\n this.sessionTokenInHeader = this.stripAuthorizationHeader(\n get(constants.Headers.Authorization)\n );\n this.origin = get(constants.Headers.Origin);\n this.host = get(constants.Headers.Host);\n this.forwardedHost = get(constants.Headers.ForwardedHost);\n this.forwardedProto =\n get(constants.Headers.CloudFrontForwardedProto) ||\n get(constants.Headers.ForwardedProto);\n this.referrer = get(constants.Headers.Referrer);\n this.userAgent = get(constants.Headers.UserAgent);\n this.secFetchDest = get(constants.Headers.SecFetchDest);\n this.accept = get(constants.Headers.Accept);\n }\n\n private initCookieValues() {\n const get = (name: string) =>\n this.cabinIdRequest.cookies.get(name) || undefined;\n this.sessionTokenInCookie = get(constants.Cookies.Client);\n this.userIdInCookie = get(constants.Cookies.User);\n }\n\n private stripAuthorizationHeader(\n authValue: string | undefined | null\n ): string | undefined {\n return authValue?.replace('Bearer ', '');\n }\n}\n\nexport type { AuthenticateContext };\n\nexport const createAuthenticateContext = (\n ...args: ConstructorParameters<typeof AuthenticateContext>\n): AuthenticateContext => {\n return new AuthenticateContext(...args);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA0B;AAmC1B,MAAM,oBAAoB;AAAA,EASjB,YACG,gBACR,SACA;AAFQ;AAGR,SAAK,iBAAiB;AACtB,SAAK,iBAAiB;AACtB,WAAO,OAAO,MAAM,OAAO;AAC3B,SAAK,aAAa,KAAK,eAAe;AAAA,EACxC;AAAA,EAhBA,IAAW,SAA6B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAW,eAAmC;AAC5C,WAAO,KAAK,wBAAwB,KAAK;AAAA,EAC3C;AAAA,EAYQ,mBAAmB;AACzB,UAAM,MAAM,CAAC,SACX,KAAK,eAAe,QAAQ,IAAI,IAAI,KAAK;AAC3C,SAAK,uBAAuB,KAAK;AAAA,MAC/B,IAAI,2BAAU,QAAQ,aAAa;AAAA,IACrC;AACA,SAAK,SAAS,IAAI,2BAAU,QAAQ,MAAM;AAC1C,SAAK,OAAO,IAAI,2BAAU,QAAQ,IAAI;AACtC,SAAK,gBAAgB,IAAI,2BAAU,QAAQ,aAAa;AACxD,SAAK,iBACH,IAAI,2BAAU,QAAQ,wBAAwB,KAC9C,IAAI,2BAAU,QAAQ,cAAc;AACtC,SAAK,WAAW,IAAI,2BAAU,QAAQ,QAAQ;AAC9C,SAAK,YAAY,IAAI,2BAAU,QAAQ,SAAS;AAChD,SAAK,eAAe,IAAI,2BAAU,QAAQ,YAAY;AACtD,SAAK,SAAS,IAAI,2BAAU,QAAQ,MAAM;AAAA,EAC5C;AAAA,EAEQ,mBAAmB;AACzB,UAAM,MAAM,CAAC,SACX,KAAK,eAAe,QAAQ,IAAI,IAAI,KAAK;AAC3C,SAAK,uBAAuB,IAAI,2BAAU,QAAQ,MAAM;AACxD,SAAK,iBAAiB,IAAI,2BAAU,QAAQ,IAAI;AAAA,EAClD;AAAA,EAEQ,yBACN,WACoB;AACpB,WAAO,uCAAW,QAAQ,WAAW;AAAA,EACvC;AACF;AAIO,MAAM,4BAA4B,IACpC,SACqB;AACxB,SAAO,IAAI,oBAAoB,GAAG,IAAI;AACxC;","names":[]}
|