@worldcoin/idkit 2.4.2 → 4.0.0-dev.fe98789
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/README.md +42 -59
- package/dist/index.cjs +1764 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +57 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +1724 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -100
- package/LICENSE +0 -7
- package/build/chunk-PWFTYFSZ.js +0 -373
- package/build/config-SH5TbLYj.d.cts +0 -57
- package/build/config-SH5TbLYj.d.ts +0 -57
- package/build/index.cjs +0 -2697
- package/build/index.d.cts +0 -57
- package/build/index.d.ts +0 -57
- package/build/index.js +0 -2285
- package/build/internal.cjs +0 -413
- package/build/internal.d.cts +0 -68
- package/build/internal.d.ts +0 -68
- package/build/internal.js +0 -20
- package/src/index.ts +0 -28
package/build/index.cjs
DELETED
|
@@ -1,2697 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var src_exports = {};
|
|
32
|
-
__export(src_exports, {
|
|
33
|
-
IDKitWidget: () => IDKitWidget_default,
|
|
34
|
-
VerificationLevel: () => import_idkit_core7.VerificationLevel,
|
|
35
|
-
VerificationState: () => import_idkit_core7.VerificationState,
|
|
36
|
-
getCurrentLanguage: () => getCurrentLanguage,
|
|
37
|
-
getLocalizationConfig: () => getLocalizationConfig,
|
|
38
|
-
getSupportedLanguages: () => getSupportedLanguages,
|
|
39
|
-
setLocalizationConfig: () => setLocalizationConfig,
|
|
40
|
-
solidityEncode: () => import_hashing.solidityEncode,
|
|
41
|
-
useIDKit: () => useIDKit_default,
|
|
42
|
-
useSession: () => useSession,
|
|
43
|
-
verifyCloudProof: () => import_backend.verifyCloudProof
|
|
44
|
-
});
|
|
45
|
-
module.exports = __toCommonJS(src_exports);
|
|
46
|
-
|
|
47
|
-
// src/hooks/useIDKit.ts
|
|
48
|
-
var import_react = require("react");
|
|
49
|
-
|
|
50
|
-
// src/lang/translations/en.ts
|
|
51
|
-
var en = {
|
|
52
|
-
"All set!": "All set!",
|
|
53
|
-
"Your World ID is now connected": "Your World ID is now connected",
|
|
54
|
-
"Transmitting verification to host app. Please wait...": "Transmitting verification to host app. Please wait...",
|
|
55
|
-
"Something went wrong": "Something went wrong",
|
|
56
|
-
"Verification Declined": "Verification Declined",
|
|
57
|
-
"Request cancelled": "Request cancelled",
|
|
58
|
-
"Connection to your wallet failed. Please try again.": "Connection to your wallet failed. Please try again.",
|
|
59
|
-
"You've cancelled the request in World App.": "You've cancelled the request in World App.",
|
|
60
|
-
"You have already verified the maximum number of times for this action.": "You have already verified the maximum number of times for this action.",
|
|
61
|
-
"It seems you do not have the verification level required by this app.": "It seems you do not have the verification level required by this app.",
|
|
62
|
-
"Invalid network. If you are the app owner, visit docs.world.org/test for details.": "Invalid network. If you are the app owner, visit docs.world.org/test for details.",
|
|
63
|
-
"Your identity is still being registered. Please wait a few minutes and try again.": "Your identity is still being registered. Please wait a few minutes and try again.",
|
|
64
|
-
"We couldn't complete your request. Please try again.": "We couldn't complete your request. Please try again.",
|
|
65
|
-
"Try Again": "Try Again",
|
|
66
|
-
"Open World App": "Open World App",
|
|
67
|
-
"Hide QR Code": "Hide QR Code",
|
|
68
|
-
"Display QR Code": "Display QR Code",
|
|
69
|
-
"QR Code copied": "QR Code copied",
|
|
70
|
-
"Connect your World ID": "Connect your World ID",
|
|
71
|
-
"Use phone camera to scan the QR code": "Use phone camera to scan the QR code",
|
|
72
|
-
"Connecting...": "Connecting...",
|
|
73
|
-
"Please continue in app": "Please continue in app",
|
|
74
|
-
"You will be redirected to the app, please return to this page once you're done": "You will be redirected to the app, please return to this page once you're done",
|
|
75
|
-
"Action cannot be an empty string.": "Action cannot be an empty string.",
|
|
76
|
-
"Invalid IDKitStage :stage.": "Invalid IDKitStage :stage.",
|
|
77
|
-
"Terms & Privacy": "Terms & Privacy"
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// src/lang/translations/es.ts
|
|
81
|
-
var es = {
|
|
82
|
-
"All set!": "\xA1Todo listo!",
|
|
83
|
-
"Your World ID is now connected": "Tu World ID ahora est\xE1 conectado",
|
|
84
|
-
"Transmitting verification to host app. Please wait...": "Transmitiendo verificaci\xF3n a la aplicaci\xF3n host. Por favor espera...",
|
|
85
|
-
"Something went wrong": "Algo sali\xF3 mal",
|
|
86
|
-
"Verification Declined": "Verificaci\xF3n rechazada",
|
|
87
|
-
"Request cancelled": "Solicitud cancelada",
|
|
88
|
-
"Connection to your wallet failed. Please try again.": "La conexi\xF3n a tu billetera fall\xF3. Por favor intenta de nuevo.",
|
|
89
|
-
"You've cancelled the request in World App.": "Has cancelado la solicitud en World App.",
|
|
90
|
-
"You have already verified the maximum number of times for this action.": "Ya has verificado el n\xFAmero m\xE1ximo de veces para esta acci\xF3n.",
|
|
91
|
-
"It seems you do not have the verification level required by this app.": "Parece que no tienes el nivel de verificaci\xF3n requerido por esta aplicaci\xF3n.",
|
|
92
|
-
"Invalid network. If you are the app owner, visit docs.world.org/test for details.": "Red inv\xE1lida. Si eres el propietario de la aplicaci\xF3n, visita docs.world.org/test para m\xE1s detalles.",
|
|
93
|
-
"Your identity is still being registered. Please wait a few minutes and try again.": "Tu identidad a\xFAn se est\xE1 registrando. Por favor espera unos minutos e intenta de nuevo.",
|
|
94
|
-
"We couldn't complete your request. Please try again.": "No pudimos completar tu solicitud. Por favor intenta de nuevo.",
|
|
95
|
-
"Try Again": "Intentar de nuevo",
|
|
96
|
-
"Open World App": "Abrir World App",
|
|
97
|
-
"Hide QR Code": "Ocultar c\xF3digo QR",
|
|
98
|
-
"Display QR Code": "Mostrar c\xF3digo QR",
|
|
99
|
-
"QR Code copied": "C\xF3digo QR copiado",
|
|
100
|
-
"Connect your World ID": "Conecta tu World ID",
|
|
101
|
-
"Use phone camera to scan the QR code": "Usa la c\xE1mara del tel\xE9fono para escanear el c\xF3digo QR",
|
|
102
|
-
"Connecting...": "Conectando...",
|
|
103
|
-
"Please continue in app": "Por favor contin\xFAa en la aplicaci\xF3n",
|
|
104
|
-
"You will be redirected to the app, please return to this page once you're done": "Ser\xE1s redirigido a la aplicaci\xF3n, por favor regresa a esta p\xE1gina una vez que hayas terminado",
|
|
105
|
-
"Action cannot be an empty string.": "La acci\xF3n no puede ser una cadena vac\xEDa.",
|
|
106
|
-
"Invalid IDKitStage :stage.": "IDKitStage inv\xE1lido :stage.",
|
|
107
|
-
"Terms & Privacy": "T\xE9rminos y privacidad"
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// src/lang/translations/th.ts
|
|
111
|
-
var th = {
|
|
112
|
-
"All set!": "\u0E40\u0E23\u0E35\u0E22\u0E1A\u0E23\u0E49\u0E2D\u0E22!",
|
|
113
|
-
"Your World ID is now connected": "World ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E41\u0E25\u0E49\u0E27",
|
|
114
|
-
"Transmitting verification to host app. Please wait...": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E41\u0E2D\u0E1B\u0E42\u0E2E\u0E2A\u0E15\u0E4C \u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48...",
|
|
115
|
-
"Something went wrong": "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
116
|
-
"Verification Declined": "\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E16\u0E39\u0E01\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18",
|
|
117
|
-
"Request cancelled": "\u0E04\u0E33\u0E02\u0E2D\u0E16\u0E39\u0E01\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
118
|
-
"Connection to your wallet failed. Please try again.": "\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A\u0E01\u0E23\u0E30\u0E40\u0E1B\u0E4B\u0E32\u0E40\u0E07\u0E34\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
119
|
-
"You've cancelled the request in World App.": "\u0E04\u0E38\u0E13\u0E44\u0E14\u0E49\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E04\u0E33\u0E02\u0E2D\u0E43\u0E19 World App",
|
|
120
|
-
"You have already verified the maximum number of times for this action.": "\u0E04\u0E38\u0E13\u0E44\u0E14\u0E49\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E04\u0E23\u0E1A\u0E08\u0E33\u0E19\u0E27\u0E19\u0E04\u0E23\u0E31\u0E49\u0E07\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E41\u0E25\u0E49\u0E27",
|
|
121
|
-
"It seems you do not have the verification level required by this app.": "\u0E14\u0E39\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E27\u0E48\u0E32\u0E04\u0E38\u0E13\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E2D\u0E1B\u0E19\u0E35\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23",
|
|
122
|
-
"Invalid network. If you are the app owner, visit docs.world.org/test for details.": "\u0E40\u0E04\u0E23\u0E37\u0E2D\u0E02\u0E48\u0E32\u0E22\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 \u0E2B\u0E32\u0E01\u0E04\u0E38\u0E13\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E41\u0E2D\u0E1B \u0E42\u0E1B\u0E23\u0E14\u0E44\u0E1B\u0E17\u0E35\u0E48 docs.world.org/test \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14",
|
|
123
|
-
"Your identity is still being registered. Please wait a few minutes and try again.": "\u0E15\u0E31\u0E27\u0E15\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E25\u0E07\u0E17\u0E30\u0E40\u0E1A\u0E35\u0E22\u0E19 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E2D\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
124
|
-
"We couldn't complete your request. Please try again.": "\u0E40\u0E23\u0E32\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E15\u0E32\u0E21\u0E04\u0E33\u0E02\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E44\u0E14\u0E49 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
125
|
-
"Try Again": "\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
|
|
126
|
-
"Open World App": "\u0E40\u0E1B\u0E34\u0E14 World App",
|
|
127
|
-
"Hide QR Code": "\u0E0B\u0E48\u0E2D\u0E19 QR Code",
|
|
128
|
-
"Display QR Code": "\u0E41\u0E2A\u0E14\u0E07 QR Code",
|
|
129
|
-
"QR Code copied": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01 QR Code \u0E41\u0E25\u0E49\u0E27",
|
|
130
|
-
"Connect your World ID": "\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D World ID \u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",
|
|
131
|
-
"Use phone camera to scan the QR code": "\u0E43\u0E0A\u0E49\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E41\u0E01\u0E19 QR code",
|
|
132
|
-
"Connecting...": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D...",
|
|
133
|
-
"Please continue in app": "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E15\u0E48\u0E2D\u0E43\u0E19\u0E41\u0E2D\u0E1B",
|
|
134
|
-
"You will be redirected to the app, please return to this page once you're done": "\u0E04\u0E38\u0E13\u0E08\u0E30\u0E16\u0E39\u0E01\u0E19\u0E33\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E41\u0E2D\u0E1B \u0E01\u0E23\u0E38\u0E13\u0E32\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
|
|
135
|
-
"Action cannot be an empty string.": "\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E27\u0E48\u0E32\u0E07\u0E44\u0E14\u0E49",
|
|
136
|
-
"Invalid IDKitStage :stage.": "IDKitStage \u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 :stage.",
|
|
137
|
-
"Terms & Privacy": "\u0E02\u0E49\u0E2D\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E41\u0E25\u0E30\u0E04\u0E27\u0E32\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27"
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// src/lang/translations/index.ts
|
|
141
|
-
var translations = {
|
|
142
|
-
en,
|
|
143
|
-
es,
|
|
144
|
-
th
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
// src/lang/localization.ts
|
|
148
|
-
var currentConfig = {};
|
|
149
|
-
var setLocalizationConfig = (config) => {
|
|
150
|
-
currentConfig = config;
|
|
151
|
-
};
|
|
152
|
-
var getLocalizationConfig = () => currentConfig;
|
|
153
|
-
var detectBrowserLanguage = () => {
|
|
154
|
-
for (const lang of navigator.languages) {
|
|
155
|
-
const [language] = lang.split("-");
|
|
156
|
-
const normalizedLang = language.toLowerCase();
|
|
157
|
-
if (normalizedLang in translations) {
|
|
158
|
-
return normalizedLang;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return void 0;
|
|
162
|
-
};
|
|
163
|
-
var getCurrentLanguage = () => {
|
|
164
|
-
const config = getLocalizationConfig();
|
|
165
|
-
if (config.language && config.language in translations) {
|
|
166
|
-
return config.language;
|
|
167
|
-
}
|
|
168
|
-
const browserLang = detectBrowserLanguage();
|
|
169
|
-
if (browserLang) {
|
|
170
|
-
return browserLang;
|
|
171
|
-
}
|
|
172
|
-
return "en";
|
|
173
|
-
};
|
|
174
|
-
var getTranslations = () => {
|
|
175
|
-
const currentLang = getCurrentLanguage();
|
|
176
|
-
return translations[currentLang];
|
|
177
|
-
};
|
|
178
|
-
var getSupportedLanguages = () => {
|
|
179
|
-
return Object.keys(translations);
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
// src/lang/index.ts
|
|
183
|
-
var getLang = () => {
|
|
184
|
-
return getTranslations();
|
|
185
|
-
};
|
|
186
|
-
var replaceParams = (str, params) => {
|
|
187
|
-
if (!params) return str;
|
|
188
|
-
let result = str;
|
|
189
|
-
for (const [key, value] of Object.entries(params)) {
|
|
190
|
-
result = result.replace(`:${key}`, value);
|
|
191
|
-
}
|
|
192
|
-
return result;
|
|
193
|
-
};
|
|
194
|
-
function __(str, ...args) {
|
|
195
|
-
const [params] = args;
|
|
196
|
-
if (typeof navigator === "undefined" && typeof window === "undefined") {
|
|
197
|
-
return replaceParams(str, params);
|
|
198
|
-
}
|
|
199
|
-
const translated = getLang()?.[str] ?? str;
|
|
200
|
-
return replaceParams(translated, params);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// src/store/idkit.ts
|
|
204
|
-
var import_shallow = require("zustand/shallow");
|
|
205
|
-
var import_traditional = require("zustand/traditional");
|
|
206
|
-
var import_idkit_core = require("@worldcoin/idkit-core");
|
|
207
|
-
var SELF_HOSTED_APP_ID = "self_hosted";
|
|
208
|
-
var useIDKitStore = (0, import_traditional.createWithEqualityFn)()(
|
|
209
|
-
(set, get) => ({
|
|
210
|
-
app_id: "",
|
|
211
|
-
signal: "",
|
|
212
|
-
action: "",
|
|
213
|
-
action_description: "",
|
|
214
|
-
bridge_url: "",
|
|
215
|
-
verification_level: import_idkit_core.DEFAULT_VERIFICATION_LEVEL,
|
|
216
|
-
partner: false,
|
|
217
|
-
open: false,
|
|
218
|
-
result: null,
|
|
219
|
-
errorTitle: "",
|
|
220
|
-
errorDetail: "",
|
|
221
|
-
autoClose: true,
|
|
222
|
-
errorState: null,
|
|
223
|
-
processing: false,
|
|
224
|
-
errorCallbacks: {},
|
|
225
|
-
verifyCallbacks: {},
|
|
226
|
-
successCallbacks: {},
|
|
227
|
-
stage: "WORLD_ID" /* WORLD_ID */,
|
|
228
|
-
setStage: (stage) => set({ stage }),
|
|
229
|
-
setErrorState: (errorState) => set({ errorState }),
|
|
230
|
-
setProcessing: (processing) => set({ processing }),
|
|
231
|
-
retryFlow: () => {
|
|
232
|
-
set({ stage: "WORLD_ID" /* WORLD_ID */, errorState: null });
|
|
233
|
-
},
|
|
234
|
-
addErrorCallback: (cb, source) => {
|
|
235
|
-
set((state) => {
|
|
236
|
-
state.errorCallbacks[source] = cb;
|
|
237
|
-
return state;
|
|
238
|
-
});
|
|
239
|
-
},
|
|
240
|
-
addSuccessCallback: (cb, source) => {
|
|
241
|
-
set((state) => {
|
|
242
|
-
state.successCallbacks[source] = cb;
|
|
243
|
-
return state;
|
|
244
|
-
});
|
|
245
|
-
},
|
|
246
|
-
addVerificationCallback: (cb, source) => {
|
|
247
|
-
set((state) => {
|
|
248
|
-
state.verifyCallbacks[source] = cb;
|
|
249
|
-
return state;
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
setOptions: ({
|
|
253
|
-
handleVerify,
|
|
254
|
-
onSuccess,
|
|
255
|
-
signal,
|
|
256
|
-
action,
|
|
257
|
-
app_id,
|
|
258
|
-
partner,
|
|
259
|
-
onError,
|
|
260
|
-
verification_level,
|
|
261
|
-
action_description,
|
|
262
|
-
bridge_url,
|
|
263
|
-
autoClose,
|
|
264
|
-
advanced
|
|
265
|
-
}, source) => {
|
|
266
|
-
set({
|
|
267
|
-
signal,
|
|
268
|
-
action,
|
|
269
|
-
bridge_url,
|
|
270
|
-
action_description,
|
|
271
|
-
autoClose: autoClose ?? true,
|
|
272
|
-
app_id: advanced?.self_hosted ? SELF_HOSTED_APP_ID : app_id,
|
|
273
|
-
verification_level: verification_level ?? import_idkit_core.DEFAULT_VERIFICATION_LEVEL,
|
|
274
|
-
partner
|
|
275
|
-
});
|
|
276
|
-
get().addSuccessCallback(onSuccess, source);
|
|
277
|
-
if (onError) get().addErrorCallback(onError, source);
|
|
278
|
-
if (handleVerify) get().addVerificationCallback(handleVerify, source);
|
|
279
|
-
},
|
|
280
|
-
handleVerify: (result) => {
|
|
281
|
-
set({ stage: "HOST_APP_VERIFICATION" /* HOST_APP_VERIFICATION */, processing: false });
|
|
282
|
-
Promise.all(Object.values(get().verifyCallbacks).map(async (cb) => cb?.(result))).then(
|
|
283
|
-
() => {
|
|
284
|
-
set({ stage: "SUCCESS" /* SUCCESS */, result });
|
|
285
|
-
if (get().autoClose) setTimeout(() => get().onOpenChange(false), 2500);
|
|
286
|
-
},
|
|
287
|
-
(response) => {
|
|
288
|
-
let errorMessage = void 0;
|
|
289
|
-
if (response && typeof response === "object" && response.message) {
|
|
290
|
-
errorMessage = response.message;
|
|
291
|
-
}
|
|
292
|
-
set({
|
|
293
|
-
stage: "ERROR" /* ERROR */,
|
|
294
|
-
errorState: {
|
|
295
|
-
code: import_idkit_core.AppErrorCodes.FailedByHostApp,
|
|
296
|
-
message: errorMessage ? __(errorMessage) : void 0
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
},
|
|
302
|
-
onOpenChange: (open) => {
|
|
303
|
-
if (open) {
|
|
304
|
-
return set({ open });
|
|
305
|
-
}
|
|
306
|
-
const errorState = get().errorState;
|
|
307
|
-
if (get().stage === "ERROR" /* ERROR */ && errorState) {
|
|
308
|
-
const callbacks = get().errorCallbacks;
|
|
309
|
-
requestAnimationFrame(() => Object.values(callbacks).forEach((cb) => void cb?.(errorState)));
|
|
310
|
-
}
|
|
311
|
-
const result = get().result;
|
|
312
|
-
if (get().stage == "SUCCESS" /* SUCCESS */ && result) {
|
|
313
|
-
const callbacks = get().successCallbacks;
|
|
314
|
-
requestAnimationFrame(() => Object.values(callbacks).forEach((cb) => void cb?.(result)));
|
|
315
|
-
}
|
|
316
|
-
set({
|
|
317
|
-
open,
|
|
318
|
-
result: null,
|
|
319
|
-
errorState: null,
|
|
320
|
-
processing: false,
|
|
321
|
-
stage: "WORLD_ID" /* WORLD_ID */
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
}),
|
|
325
|
-
import_shallow.shallow
|
|
326
|
-
);
|
|
327
|
-
var idkit_default = useIDKitStore;
|
|
328
|
-
|
|
329
|
-
// src/hooks/useIDKit.ts
|
|
330
|
-
var getStore = ({ open, onOpenChange, addSuccessCallback, addVerificationCallback }) => ({
|
|
331
|
-
open,
|
|
332
|
-
onOpenChange,
|
|
333
|
-
addSuccessCallback,
|
|
334
|
-
addVerificationCallback
|
|
335
|
-
});
|
|
336
|
-
var useIDKit = ({ handleVerify, onSuccess } = {}) => {
|
|
337
|
-
const { open, onOpenChange, addSuccessCallback, addVerificationCallback } = idkit_default(getStore);
|
|
338
|
-
(0, import_react.useEffect)(() => {
|
|
339
|
-
if (onSuccess) addSuccessCallback(onSuccess, "hook" /* HOOK */);
|
|
340
|
-
if (handleVerify) addVerificationCallback(handleVerify, "hook" /* HOOK */);
|
|
341
|
-
}, [handleVerify, onSuccess]);
|
|
342
|
-
return { open, setOpen: onOpenChange };
|
|
343
|
-
};
|
|
344
|
-
var useIDKit_default = useIDKit;
|
|
345
|
-
|
|
346
|
-
// src/components/IDKitWidget/index.tsx
|
|
347
|
-
var import_react10 = require("react");
|
|
348
|
-
|
|
349
|
-
// src/hooks/useMedia.ts
|
|
350
|
-
var import_react2 = require("react");
|
|
351
|
-
var useMedia = () => {
|
|
352
|
-
const getInitialState = () => {
|
|
353
|
-
if (typeof window !== "undefined") {
|
|
354
|
-
return window.matchMedia("(max-width: 1024px)").matches ? "mobile" : "desktop";
|
|
355
|
-
}
|
|
356
|
-
return "desktop";
|
|
357
|
-
};
|
|
358
|
-
const [media, setMedia] = (0, import_react2.useState)(getInitialState());
|
|
359
|
-
(0, import_react2.useEffect)(() => {
|
|
360
|
-
const mql = window.matchMedia("(max-width: 1024px)");
|
|
361
|
-
const handleChange = (mql2) => setMedia(mql2.matches ? "mobile" : "desktop");
|
|
362
|
-
handleChange(mql);
|
|
363
|
-
mql.addEventListener("change", handleChange);
|
|
364
|
-
return () => {
|
|
365
|
-
mql.removeEventListener("change", handleChange);
|
|
366
|
-
};
|
|
367
|
-
}, []);
|
|
368
|
-
return media;
|
|
369
|
-
};
|
|
370
|
-
var useMedia_default = useMedia;
|
|
371
|
-
|
|
372
|
-
// src/components/IDKitWidget/BaseWidget.tsx
|
|
373
|
-
var import_react_dom2 = require("react-dom");
|
|
374
|
-
|
|
375
|
-
// src/styles/styles.css
|
|
376
|
-
var styles_default = `/* Remote TWK Lausanne font definitions */
|
|
377
|
-
@font-face {
|
|
378
|
-
font-family: 'TWK Lausanne';
|
|
379
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-200.woff2') format('woff2');
|
|
380
|
-
font-weight: 200;
|
|
381
|
-
font-style: normal;
|
|
382
|
-
font-display: swap;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
@font-face {
|
|
386
|
-
font-family: 'TWK Lausanne';
|
|
387
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-300.woff2') format('woff2');
|
|
388
|
-
font-weight: 300;
|
|
389
|
-
font-style: normal;
|
|
390
|
-
font-display: swap;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
@font-face {
|
|
394
|
-
font-family: 'TWK Lausanne';
|
|
395
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-350.woff2') format('woff2');
|
|
396
|
-
font-weight: 350;
|
|
397
|
-
font-style: normal;
|
|
398
|
-
font-display: swap;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
@font-face {
|
|
402
|
-
font-family: 'TWK Lausanne';
|
|
403
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-400.woff2') format('woff2');
|
|
404
|
-
font-weight: 400;
|
|
405
|
-
font-style: normal;
|
|
406
|
-
font-display: swap;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
@font-face {
|
|
410
|
-
font-family: 'TWK Lausanne';
|
|
411
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-450.woff2') format('woff2');
|
|
412
|
-
font-weight: 450;
|
|
413
|
-
font-style: normal;
|
|
414
|
-
font-display: swap;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
@font-face {
|
|
418
|
-
font-family: 'TWK Lausanne';
|
|
419
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-500.woff2') format('woff2');
|
|
420
|
-
font-weight: 500;
|
|
421
|
-
font-style: normal;
|
|
422
|
-
font-display: swap;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
@font-face {
|
|
426
|
-
font-family: 'TWK Lausanne';
|
|
427
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-550.woff2') format('woff2');
|
|
428
|
-
font-weight: 550;
|
|
429
|
-
font-style: normal;
|
|
430
|
-
font-display: swap;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
@font-face {
|
|
434
|
-
font-family: 'TWK Lausanne';
|
|
435
|
-
src: url('https://world-id-assets.com/fonts/TWKLausanne-600.woff2') format('woff2');
|
|
436
|
-
font-weight: 600;
|
|
437
|
-
font-style: normal;
|
|
438
|
-
font-display: swap;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/* ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com */
|
|
442
|
-
|
|
443
|
-
/*
|
|
444
|
-
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
445
|
-
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
*,
|
|
449
|
-
::before,
|
|
450
|
-
::after {
|
|
451
|
-
box-sizing: border-box; /* 1 */
|
|
452
|
-
border-width: 0; /* 2 */
|
|
453
|
-
border-style: solid; /* 2 */
|
|
454
|
-
border-color: #e5e7eb; /* 2 */
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
::before,
|
|
458
|
-
::after {
|
|
459
|
-
--tw-content: '';
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/*
|
|
463
|
-
1. Use a consistent sensible line-height in all browsers.
|
|
464
|
-
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
465
|
-
3. Use a more readable tab size.
|
|
466
|
-
4. Use the user's configured \`sans\` font-family by default.
|
|
467
|
-
5. Use the user's configured \`sans\` font-feature-settings by default.
|
|
468
|
-
6. Use the user's configured \`sans\` font-variation-settings by default.
|
|
469
|
-
7. Disable tap highlights on iOS
|
|
470
|
-
*/
|
|
471
|
-
|
|
472
|
-
html,
|
|
473
|
-
:host {
|
|
474
|
-
line-height: 1.5; /* 1 */
|
|
475
|
-
-webkit-text-size-adjust: 100%; /* 2 */
|
|
476
|
-
-moz-tab-size: 4; /* 3 */
|
|
477
|
-
-o-tab-size: 4;
|
|
478
|
-
tab-size: 4; /* 3 */
|
|
479
|
-
font-family: TWK Lausanne, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
|
|
480
|
-
font-feature-settings: normal; /* 5 */
|
|
481
|
-
font-variation-settings: normal; /* 6 */
|
|
482
|
-
-webkit-tap-highlight-color: transparent; /* 7 */
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/*
|
|
486
|
-
1. Remove the margin in all browsers.
|
|
487
|
-
2. Inherit line-height from \`html\` so users can set them as a class directly on the \`html\` element.
|
|
488
|
-
*/
|
|
489
|
-
|
|
490
|
-
body {
|
|
491
|
-
margin: 0; /* 1 */
|
|
492
|
-
line-height: inherit; /* 2 */
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/*
|
|
496
|
-
1. Add the correct height in Firefox.
|
|
497
|
-
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
498
|
-
3. Ensure horizontal rules are visible by default.
|
|
499
|
-
*/
|
|
500
|
-
|
|
501
|
-
hr {
|
|
502
|
-
height: 0; /* 1 */
|
|
503
|
-
color: inherit; /* 2 */
|
|
504
|
-
border-top-width: 1px; /* 3 */
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/*
|
|
508
|
-
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
509
|
-
*/
|
|
510
|
-
|
|
511
|
-
abbr:where([title]) {
|
|
512
|
-
-webkit-text-decoration: underline dotted;
|
|
513
|
-
text-decoration: underline dotted;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/*
|
|
517
|
-
Remove the default font size and weight for headings.
|
|
518
|
-
*/
|
|
519
|
-
|
|
520
|
-
h1,
|
|
521
|
-
h2,
|
|
522
|
-
h3,
|
|
523
|
-
h4,
|
|
524
|
-
h5,
|
|
525
|
-
h6 {
|
|
526
|
-
font-size: inherit;
|
|
527
|
-
font-weight: inherit;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/*
|
|
531
|
-
Reset links to optimize for opt-in styling instead of opt-out.
|
|
532
|
-
*/
|
|
533
|
-
|
|
534
|
-
a {
|
|
535
|
-
color: inherit;
|
|
536
|
-
text-decoration: inherit;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/*
|
|
540
|
-
Add the correct font weight in Edge and Safari.
|
|
541
|
-
*/
|
|
542
|
-
|
|
543
|
-
b,
|
|
544
|
-
strong {
|
|
545
|
-
font-weight: bolder;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
/*
|
|
549
|
-
1. Use the user's configured \`mono\` font-family by default.
|
|
550
|
-
2. Use the user's configured \`mono\` font-feature-settings by default.
|
|
551
|
-
3. Use the user's configured \`mono\` font-variation-settings by default.
|
|
552
|
-
4. Correct the odd \`em\` font sizing in all browsers.
|
|
553
|
-
*/
|
|
554
|
-
|
|
555
|
-
code,
|
|
556
|
-
kbd,
|
|
557
|
-
samp,
|
|
558
|
-
pre {
|
|
559
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
|
|
560
|
-
font-feature-settings: normal; /* 2 */
|
|
561
|
-
font-variation-settings: normal; /* 3 */
|
|
562
|
-
font-size: 1em; /* 4 */
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
/*
|
|
566
|
-
Add the correct font size in all browsers.
|
|
567
|
-
*/
|
|
568
|
-
|
|
569
|
-
small {
|
|
570
|
-
font-size: 80%;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/*
|
|
574
|
-
Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
|
|
575
|
-
*/
|
|
576
|
-
|
|
577
|
-
sub,
|
|
578
|
-
sup {
|
|
579
|
-
font-size: 75%;
|
|
580
|
-
line-height: 0;
|
|
581
|
-
position: relative;
|
|
582
|
-
vertical-align: baseline;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
sub {
|
|
586
|
-
bottom: -0.25em;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
sup {
|
|
590
|
-
top: -0.5em;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
/*
|
|
594
|
-
1. 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)
|
|
595
|
-
2. 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)
|
|
596
|
-
3. Remove gaps between table borders by default.
|
|
597
|
-
*/
|
|
598
|
-
|
|
599
|
-
table {
|
|
600
|
-
text-indent: 0; /* 1 */
|
|
601
|
-
border-color: inherit; /* 2 */
|
|
602
|
-
border-collapse: collapse; /* 3 */
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
/*
|
|
606
|
-
1. Change the font styles in all browsers.
|
|
607
|
-
2. Remove the margin in Firefox and Safari.
|
|
608
|
-
3. Remove default padding in all browsers.
|
|
609
|
-
*/
|
|
610
|
-
|
|
611
|
-
button,
|
|
612
|
-
input,
|
|
613
|
-
optgroup,
|
|
614
|
-
select,
|
|
615
|
-
textarea {
|
|
616
|
-
font-family: inherit; /* 1 */
|
|
617
|
-
font-feature-settings: inherit; /* 1 */
|
|
618
|
-
font-variation-settings: inherit; /* 1 */
|
|
619
|
-
font-size: 100%; /* 1 */
|
|
620
|
-
font-weight: inherit; /* 1 */
|
|
621
|
-
line-height: inherit; /* 1 */
|
|
622
|
-
letter-spacing: inherit; /* 1 */
|
|
623
|
-
color: inherit; /* 1 */
|
|
624
|
-
margin: 0; /* 2 */
|
|
625
|
-
padding: 0; /* 3 */
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
/*
|
|
629
|
-
Remove the inheritance of text transform in Edge and Firefox.
|
|
630
|
-
*/
|
|
631
|
-
|
|
632
|
-
button,
|
|
633
|
-
select {
|
|
634
|
-
text-transform: none;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/*
|
|
638
|
-
1. Correct the inability to style clickable types in iOS and Safari.
|
|
639
|
-
2. Remove default button styles.
|
|
640
|
-
*/
|
|
641
|
-
|
|
642
|
-
button,
|
|
643
|
-
input:where([type='button']),
|
|
644
|
-
input:where([type='reset']),
|
|
645
|
-
input:where([type='submit']) {
|
|
646
|
-
-webkit-appearance: button; /* 1 */
|
|
647
|
-
background-color: transparent; /* 2 */
|
|
648
|
-
background-image: none; /* 2 */
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
/*
|
|
652
|
-
Use the modern Firefox focus style for all focusable elements.
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
|
-
:-moz-focusring {
|
|
656
|
-
outline: auto;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/*
|
|
660
|
-
Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
661
|
-
*/
|
|
662
|
-
|
|
663
|
-
:-moz-ui-invalid {
|
|
664
|
-
box-shadow: none;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
/*
|
|
668
|
-
Add the correct vertical alignment in Chrome and Firefox.
|
|
669
|
-
*/
|
|
670
|
-
|
|
671
|
-
progress {
|
|
672
|
-
vertical-align: baseline;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
/*
|
|
676
|
-
Correct the cursor style of increment and decrement buttons in Safari.
|
|
677
|
-
*/
|
|
678
|
-
|
|
679
|
-
::-webkit-inner-spin-button,
|
|
680
|
-
::-webkit-outer-spin-button {
|
|
681
|
-
height: auto;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/*
|
|
685
|
-
1. Correct the odd appearance in Chrome and Safari.
|
|
686
|
-
2. Correct the outline style in Safari.
|
|
687
|
-
*/
|
|
688
|
-
|
|
689
|
-
[type='search'] {
|
|
690
|
-
-webkit-appearance: textfield; /* 1 */
|
|
691
|
-
outline-offset: -2px; /* 2 */
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
/*
|
|
695
|
-
Remove the inner padding in Chrome and Safari on macOS.
|
|
696
|
-
*/
|
|
697
|
-
|
|
698
|
-
::-webkit-search-decoration {
|
|
699
|
-
-webkit-appearance: none;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/*
|
|
703
|
-
1. Correct the inability to style clickable types in iOS and Safari.
|
|
704
|
-
2. Change font properties to \`inherit\` in Safari.
|
|
705
|
-
*/
|
|
706
|
-
|
|
707
|
-
::-webkit-file-upload-button {
|
|
708
|
-
-webkit-appearance: button; /* 1 */
|
|
709
|
-
font: inherit; /* 2 */
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
/*
|
|
713
|
-
Add the correct display in Chrome and Safari.
|
|
714
|
-
*/
|
|
715
|
-
|
|
716
|
-
summary {
|
|
717
|
-
display: list-item;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
/*
|
|
721
|
-
Removes the default spacing and border for appropriate elements.
|
|
722
|
-
*/
|
|
723
|
-
|
|
724
|
-
blockquote,
|
|
725
|
-
dl,
|
|
726
|
-
dd,
|
|
727
|
-
h1,
|
|
728
|
-
h2,
|
|
729
|
-
h3,
|
|
730
|
-
h4,
|
|
731
|
-
h5,
|
|
732
|
-
h6,
|
|
733
|
-
hr,
|
|
734
|
-
figure,
|
|
735
|
-
p,
|
|
736
|
-
pre {
|
|
737
|
-
margin: 0;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
fieldset {
|
|
741
|
-
margin: 0;
|
|
742
|
-
padding: 0;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
legend {
|
|
746
|
-
padding: 0;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
ol,
|
|
750
|
-
ul,
|
|
751
|
-
menu {
|
|
752
|
-
list-style: none;
|
|
753
|
-
margin: 0;
|
|
754
|
-
padding: 0;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/*
|
|
758
|
-
Reset default styling for dialogs.
|
|
759
|
-
*/
|
|
760
|
-
|
|
761
|
-
dialog {
|
|
762
|
-
padding: 0;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/*
|
|
766
|
-
Prevent resizing textareas horizontally by default.
|
|
767
|
-
*/
|
|
768
|
-
|
|
769
|
-
textarea {
|
|
770
|
-
resize: vertical;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/*
|
|
774
|
-
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|
775
|
-
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
776
|
-
*/
|
|
777
|
-
|
|
778
|
-
input::-moz-placeholder, textarea::-moz-placeholder {
|
|
779
|
-
opacity: 1; /* 1 */
|
|
780
|
-
color: #9ca3af; /* 2 */
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
input::placeholder,
|
|
784
|
-
textarea::placeholder {
|
|
785
|
-
opacity: 1; /* 1 */
|
|
786
|
-
color: #9ca3af; /* 2 */
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/*
|
|
790
|
-
Set the default cursor for buttons.
|
|
791
|
-
*/
|
|
792
|
-
|
|
793
|
-
button,
|
|
794
|
-
[role="button"] {
|
|
795
|
-
cursor: pointer;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/*
|
|
799
|
-
Make sure disabled buttons don't get the pointer cursor.
|
|
800
|
-
*/
|
|
801
|
-
|
|
802
|
-
:disabled {
|
|
803
|
-
cursor: default;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
/*
|
|
807
|
-
1. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
808
|
-
2. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
|
809
|
-
This can trigger a poorly considered lint error in some tools but is included by design.
|
|
810
|
-
*/
|
|
811
|
-
|
|
812
|
-
img,
|
|
813
|
-
svg,
|
|
814
|
-
video,
|
|
815
|
-
canvas,
|
|
816
|
-
audio,
|
|
817
|
-
iframe,
|
|
818
|
-
embed,
|
|
819
|
-
object {
|
|
820
|
-
display: block; /* 1 */
|
|
821
|
-
vertical-align: middle; /* 2 */
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/*
|
|
825
|
-
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
826
|
-
*/
|
|
827
|
-
|
|
828
|
-
img,
|
|
829
|
-
video {
|
|
830
|
-
max-width: 100%;
|
|
831
|
-
height: auto;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
/* Make elements with the HTML hidden attribute stay hidden by default */
|
|
835
|
-
|
|
836
|
-
[hidden] {
|
|
837
|
-
display: none;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {
|
|
841
|
-
-webkit-appearance: none;
|
|
842
|
-
-moz-appearance: none;
|
|
843
|
-
appearance: none;
|
|
844
|
-
background-color: #fff;
|
|
845
|
-
border-color: #6b7280;
|
|
846
|
-
border-width: 1px;
|
|
847
|
-
border-radius: 0px;
|
|
848
|
-
padding-top: 0.5rem;
|
|
849
|
-
padding-right: 0.75rem;
|
|
850
|
-
padding-bottom: 0.5rem;
|
|
851
|
-
padding-left: 0.75rem;
|
|
852
|
-
font-size: 1rem;
|
|
853
|
-
line-height: 1.5rem;
|
|
854
|
-
--tw-shadow: 0 0 #0000;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {
|
|
858
|
-
outline: 2px solid transparent;
|
|
859
|
-
outline-offset: 2px;
|
|
860
|
-
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
861
|
-
--tw-ring-offset-width: 0px;
|
|
862
|
-
--tw-ring-offset-color: #fff;
|
|
863
|
-
--tw-ring-color: #2563eb;
|
|
864
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
865
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
866
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
867
|
-
border-color: #2563eb;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
input::-moz-placeholder, textarea::-moz-placeholder {
|
|
871
|
-
color: #6b7280;
|
|
872
|
-
opacity: 1;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
input::placeholder,textarea::placeholder {
|
|
876
|
-
color: #6b7280;
|
|
877
|
-
opacity: 1;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
::-webkit-datetime-edit-fields-wrapper {
|
|
881
|
-
padding: 0;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
::-webkit-date-and-time-value {
|
|
885
|
-
min-height: 1.5em;
|
|
886
|
-
text-align: inherit;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
::-webkit-datetime-edit {
|
|
890
|
-
display: inline-flex;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field {
|
|
894
|
-
padding-top: 0;
|
|
895
|
-
padding-bottom: 0;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
select {
|
|
899
|
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
900
|
-
background-position: right 0.5rem center;
|
|
901
|
-
background-repeat: no-repeat;
|
|
902
|
-
background-size: 1.5em 1.5em;
|
|
903
|
-
padding-right: 2.5rem;
|
|
904
|
-
-webkit-print-color-adjust: exact;
|
|
905
|
-
print-color-adjust: exact;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
[multiple],[size]:where(select:not([size="1"])) {
|
|
909
|
-
background-image: initial;
|
|
910
|
-
background-position: initial;
|
|
911
|
-
background-repeat: unset;
|
|
912
|
-
background-size: initial;
|
|
913
|
-
padding-right: 0.75rem;
|
|
914
|
-
-webkit-print-color-adjust: unset;
|
|
915
|
-
print-color-adjust: unset;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
[type='checkbox'],[type='radio'] {
|
|
919
|
-
-webkit-appearance: none;
|
|
920
|
-
-moz-appearance: none;
|
|
921
|
-
appearance: none;
|
|
922
|
-
padding: 0;
|
|
923
|
-
-webkit-print-color-adjust: exact;
|
|
924
|
-
print-color-adjust: exact;
|
|
925
|
-
display: inline-block;
|
|
926
|
-
vertical-align: middle;
|
|
927
|
-
background-origin: border-box;
|
|
928
|
-
-webkit-user-select: none;
|
|
929
|
-
-moz-user-select: none;
|
|
930
|
-
user-select: none;
|
|
931
|
-
flex-shrink: 0;
|
|
932
|
-
height: 1rem;
|
|
933
|
-
width: 1rem;
|
|
934
|
-
color: #2563eb;
|
|
935
|
-
background-color: #fff;
|
|
936
|
-
border-color: #6b7280;
|
|
937
|
-
border-width: 1px;
|
|
938
|
-
--tw-shadow: 0 0 #0000;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
[type='checkbox'] {
|
|
942
|
-
border-radius: 0px;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
[type='radio'] {
|
|
946
|
-
border-radius: 100%;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
[type='checkbox']:focus,[type='radio']:focus {
|
|
950
|
-
outline: 2px solid transparent;
|
|
951
|
-
outline-offset: 2px;
|
|
952
|
-
--tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
|
|
953
|
-
--tw-ring-offset-width: 2px;
|
|
954
|
-
--tw-ring-offset-color: #fff;
|
|
955
|
-
--tw-ring-color: #2563eb;
|
|
956
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
957
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
958
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
[type='checkbox']:checked,[type='radio']:checked {
|
|
962
|
-
border-color: transparent;
|
|
963
|
-
background-color: currentColor;
|
|
964
|
-
background-size: 100% 100%;
|
|
965
|
-
background-position: center;
|
|
966
|
-
background-repeat: no-repeat;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
[type='checkbox']:checked {
|
|
970
|
-
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
@media (forced-colors: active) {
|
|
974
|
-
[type='checkbox']:checked {
|
|
975
|
-
-webkit-appearance: auto;
|
|
976
|
-
-moz-appearance: auto;
|
|
977
|
-
appearance: auto;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
[type='radio']:checked {
|
|
982
|
-
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
@media (forced-colors: active) {
|
|
986
|
-
[type='radio']:checked {
|
|
987
|
-
-webkit-appearance: auto;
|
|
988
|
-
-moz-appearance: auto;
|
|
989
|
-
appearance: auto;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus {
|
|
994
|
-
border-color: transparent;
|
|
995
|
-
background-color: currentColor;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
[type='checkbox']:indeterminate {
|
|
999
|
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
|
|
1000
|
-
border-color: transparent;
|
|
1001
|
-
background-color: currentColor;
|
|
1002
|
-
background-size: 100% 100%;
|
|
1003
|
-
background-position: center;
|
|
1004
|
-
background-repeat: no-repeat;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
@media (forced-colors: active) {
|
|
1008
|
-
[type='checkbox']:indeterminate {
|
|
1009
|
-
-webkit-appearance: auto;
|
|
1010
|
-
-moz-appearance: auto;
|
|
1011
|
-
appearance: auto;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {
|
|
1016
|
-
border-color: transparent;
|
|
1017
|
-
background-color: currentColor;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
[type='file'] {
|
|
1021
|
-
background: unset;
|
|
1022
|
-
border-color: inherit;
|
|
1023
|
-
border-width: 0;
|
|
1024
|
-
border-radius: 0;
|
|
1025
|
-
padding: 0;
|
|
1026
|
-
font-size: unset;
|
|
1027
|
-
line-height: inherit;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
[type='file']:focus {
|
|
1031
|
-
outline: 1px solid ButtonText;
|
|
1032
|
-
outline: 1px auto -webkit-focus-ring-color;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
*, ::before, ::after {
|
|
1036
|
-
--tw-border-spacing-x: 0;
|
|
1037
|
-
--tw-border-spacing-y: 0;
|
|
1038
|
-
--tw-translate-x: 0;
|
|
1039
|
-
--tw-translate-y: 0;
|
|
1040
|
-
--tw-rotate: 0;
|
|
1041
|
-
--tw-skew-x: 0;
|
|
1042
|
-
--tw-skew-y: 0;
|
|
1043
|
-
--tw-scale-x: 1;
|
|
1044
|
-
--tw-scale-y: 1;
|
|
1045
|
-
--tw-pan-x: ;
|
|
1046
|
-
--tw-pan-y: ;
|
|
1047
|
-
--tw-pinch-zoom: ;
|
|
1048
|
-
--tw-scroll-snap-strictness: proximity;
|
|
1049
|
-
--tw-gradient-from-position: ;
|
|
1050
|
-
--tw-gradient-via-position: ;
|
|
1051
|
-
--tw-gradient-to-position: ;
|
|
1052
|
-
--tw-ordinal: ;
|
|
1053
|
-
--tw-slashed-zero: ;
|
|
1054
|
-
--tw-numeric-figure: ;
|
|
1055
|
-
--tw-numeric-spacing: ;
|
|
1056
|
-
--tw-numeric-fraction: ;
|
|
1057
|
-
--tw-ring-inset: ;
|
|
1058
|
-
--tw-ring-offset-width: 0px;
|
|
1059
|
-
--tw-ring-offset-color: #fff;
|
|
1060
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
1061
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1062
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
1063
|
-
--tw-shadow: 0 0 #0000;
|
|
1064
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
1065
|
-
--tw-blur: ;
|
|
1066
|
-
--tw-brightness: ;
|
|
1067
|
-
--tw-contrast: ;
|
|
1068
|
-
--tw-grayscale: ;
|
|
1069
|
-
--tw-hue-rotate: ;
|
|
1070
|
-
--tw-invert: ;
|
|
1071
|
-
--tw-saturate: ;
|
|
1072
|
-
--tw-sepia: ;
|
|
1073
|
-
--tw-drop-shadow: ;
|
|
1074
|
-
--tw-backdrop-blur: ;
|
|
1075
|
-
--tw-backdrop-brightness: ;
|
|
1076
|
-
--tw-backdrop-contrast: ;
|
|
1077
|
-
--tw-backdrop-grayscale: ;
|
|
1078
|
-
--tw-backdrop-hue-rotate: ;
|
|
1079
|
-
--tw-backdrop-invert: ;
|
|
1080
|
-
--tw-backdrop-opacity: ;
|
|
1081
|
-
--tw-backdrop-saturate: ;
|
|
1082
|
-
--tw-backdrop-sepia: ;
|
|
1083
|
-
--tw-contain-size: ;
|
|
1084
|
-
--tw-contain-layout: ;
|
|
1085
|
-
--tw-contain-paint: ;
|
|
1086
|
-
--tw-contain-style: ;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
::backdrop {
|
|
1090
|
-
--tw-border-spacing-x: 0;
|
|
1091
|
-
--tw-border-spacing-y: 0;
|
|
1092
|
-
--tw-translate-x: 0;
|
|
1093
|
-
--tw-translate-y: 0;
|
|
1094
|
-
--tw-rotate: 0;
|
|
1095
|
-
--tw-skew-x: 0;
|
|
1096
|
-
--tw-skew-y: 0;
|
|
1097
|
-
--tw-scale-x: 1;
|
|
1098
|
-
--tw-scale-y: 1;
|
|
1099
|
-
--tw-pan-x: ;
|
|
1100
|
-
--tw-pan-y: ;
|
|
1101
|
-
--tw-pinch-zoom: ;
|
|
1102
|
-
--tw-scroll-snap-strictness: proximity;
|
|
1103
|
-
--tw-gradient-from-position: ;
|
|
1104
|
-
--tw-gradient-via-position: ;
|
|
1105
|
-
--tw-gradient-to-position: ;
|
|
1106
|
-
--tw-ordinal: ;
|
|
1107
|
-
--tw-slashed-zero: ;
|
|
1108
|
-
--tw-numeric-figure: ;
|
|
1109
|
-
--tw-numeric-spacing: ;
|
|
1110
|
-
--tw-numeric-fraction: ;
|
|
1111
|
-
--tw-ring-inset: ;
|
|
1112
|
-
--tw-ring-offset-width: 0px;
|
|
1113
|
-
--tw-ring-offset-color: #fff;
|
|
1114
|
-
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
1115
|
-
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1116
|
-
--tw-ring-shadow: 0 0 #0000;
|
|
1117
|
-
--tw-shadow: 0 0 #0000;
|
|
1118
|
-
--tw-shadow-colored: 0 0 #0000;
|
|
1119
|
-
--tw-blur: ;
|
|
1120
|
-
--tw-brightness: ;
|
|
1121
|
-
--tw-contrast: ;
|
|
1122
|
-
--tw-grayscale: ;
|
|
1123
|
-
--tw-hue-rotate: ;
|
|
1124
|
-
--tw-invert: ;
|
|
1125
|
-
--tw-saturate: ;
|
|
1126
|
-
--tw-sepia: ;
|
|
1127
|
-
--tw-drop-shadow: ;
|
|
1128
|
-
--tw-backdrop-blur: ;
|
|
1129
|
-
--tw-backdrop-brightness: ;
|
|
1130
|
-
--tw-backdrop-contrast: ;
|
|
1131
|
-
--tw-backdrop-grayscale: ;
|
|
1132
|
-
--tw-backdrop-hue-rotate: ;
|
|
1133
|
-
--tw-backdrop-invert: ;
|
|
1134
|
-
--tw-backdrop-opacity: ;
|
|
1135
|
-
--tw-backdrop-saturate: ;
|
|
1136
|
-
--tw-backdrop-sepia: ;
|
|
1137
|
-
--tw-contain-size: ;
|
|
1138
|
-
--tw-contain-layout: ;
|
|
1139
|
-
--tw-contain-paint: ;
|
|
1140
|
-
--tw-contain-style: ;
|
|
1141
|
-
}
|
|
1142
|
-
.container {
|
|
1143
|
-
width: 100%;
|
|
1144
|
-
}
|
|
1145
|
-
@media (min-width: 414px) {
|
|
1146
|
-
.container {
|
|
1147
|
-
max-width: 414px;
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
@media (min-width: 640px) {
|
|
1151
|
-
.container {
|
|
1152
|
-
max-width: 640px;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
@media (min-width: 768px) {
|
|
1156
|
-
.container {
|
|
1157
|
-
max-width: 768px;
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
@media (min-width: 1024px) {
|
|
1161
|
-
.container {
|
|
1162
|
-
max-width: 1024px;
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
@media (min-width: 1280px) {
|
|
1166
|
-
.container {
|
|
1167
|
-
max-width: 1280px;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
@media (min-width: 1536px) {
|
|
1171
|
-
.container {
|
|
1172
|
-
max-width: 1536px;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
.visible {
|
|
1176
|
-
visibility: visible;
|
|
1177
|
-
}
|
|
1178
|
-
.fixed {
|
|
1179
|
-
position: fixed;
|
|
1180
|
-
}
|
|
1181
|
-
.absolute {
|
|
1182
|
-
position: absolute;
|
|
1183
|
-
}
|
|
1184
|
-
.relative {
|
|
1185
|
-
position: relative;
|
|
1186
|
-
}
|
|
1187
|
-
.inset-0 {
|
|
1188
|
-
inset: 0;
|
|
1189
|
-
}
|
|
1190
|
-
.z-50 {
|
|
1191
|
-
z-index: 50;
|
|
1192
|
-
}
|
|
1193
|
-
.z-\\[9999\\] {
|
|
1194
|
-
z-index: 9999;
|
|
1195
|
-
}
|
|
1196
|
-
.mx-6 {
|
|
1197
|
-
margin-left: 24px;
|
|
1198
|
-
margin-right: 24px;
|
|
1199
|
-
}
|
|
1200
|
-
.mx-auto {
|
|
1201
|
-
margin-left: auto;
|
|
1202
|
-
margin-right: auto;
|
|
1203
|
-
}
|
|
1204
|
-
.-mt-5 {
|
|
1205
|
-
margin-top: -20px;
|
|
1206
|
-
}
|
|
1207
|
-
.-mt-6 {
|
|
1208
|
-
margin-top: -24px;
|
|
1209
|
-
}
|
|
1210
|
-
.mb-10 {
|
|
1211
|
-
margin-bottom: 40px;
|
|
1212
|
-
}
|
|
1213
|
-
.mb-3 {
|
|
1214
|
-
margin-bottom: 12px;
|
|
1215
|
-
}
|
|
1216
|
-
.mb-4 {
|
|
1217
|
-
margin-bottom: 16px;
|
|
1218
|
-
}
|
|
1219
|
-
.mb-6 {
|
|
1220
|
-
margin-bottom: 24px;
|
|
1221
|
-
}
|
|
1222
|
-
.mt-2 {
|
|
1223
|
-
margin-top: 8px;
|
|
1224
|
-
}
|
|
1225
|
-
.mt-3 {
|
|
1226
|
-
margin-top: 12px;
|
|
1227
|
-
}
|
|
1228
|
-
.mt-4 {
|
|
1229
|
-
margin-top: 16px;
|
|
1230
|
-
}
|
|
1231
|
-
.inline {
|
|
1232
|
-
display: inline;
|
|
1233
|
-
}
|
|
1234
|
-
.flex {
|
|
1235
|
-
display: flex;
|
|
1236
|
-
}
|
|
1237
|
-
.inline-flex {
|
|
1238
|
-
display: inline-flex;
|
|
1239
|
-
}
|
|
1240
|
-
.hidden {
|
|
1241
|
-
display: none;
|
|
1242
|
-
}
|
|
1243
|
-
.size-14 {
|
|
1244
|
-
width: 56px;
|
|
1245
|
-
height: 56px;
|
|
1246
|
-
}
|
|
1247
|
-
.size-24 {
|
|
1248
|
-
width: 96px;
|
|
1249
|
-
height: 96px;
|
|
1250
|
-
}
|
|
1251
|
-
.size-4 {
|
|
1252
|
-
width: 16px;
|
|
1253
|
-
height: 16px;
|
|
1254
|
-
}
|
|
1255
|
-
.size-5 {
|
|
1256
|
-
width: 20px;
|
|
1257
|
-
height: 20px;
|
|
1258
|
-
}
|
|
1259
|
-
.size-6 {
|
|
1260
|
-
width: 24px;
|
|
1261
|
-
height: 24px;
|
|
1262
|
-
}
|
|
1263
|
-
.size-8 {
|
|
1264
|
-
width: 32px;
|
|
1265
|
-
height: 32px;
|
|
1266
|
-
}
|
|
1267
|
-
.size-\\[200px\\] {
|
|
1268
|
-
width: 200px;
|
|
1269
|
-
height: 200px;
|
|
1270
|
-
}
|
|
1271
|
-
.min-h-full {
|
|
1272
|
-
min-height: 100%;
|
|
1273
|
-
}
|
|
1274
|
-
.min-h-screen {
|
|
1275
|
-
min-height: 100vh;
|
|
1276
|
-
}
|
|
1277
|
-
.w-24 {
|
|
1278
|
-
width: 96px;
|
|
1279
|
-
}
|
|
1280
|
-
.w-full {
|
|
1281
|
-
width: 100%;
|
|
1282
|
-
}
|
|
1283
|
-
.max-w-\\[224px\\] {
|
|
1284
|
-
max-width: 224px;
|
|
1285
|
-
}
|
|
1286
|
-
.max-w-\\[260px\\] {
|
|
1287
|
-
max-width: 260px;
|
|
1288
|
-
}
|
|
1289
|
-
.flex-1 {
|
|
1290
|
-
flex: 1 1 0%;
|
|
1291
|
-
}
|
|
1292
|
-
@keyframes pulse {
|
|
1293
|
-
50% {
|
|
1294
|
-
opacity: .5;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
.animate-pulse {
|
|
1298
|
-
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
1299
|
-
}
|
|
1300
|
-
@keyframes spin {
|
|
1301
|
-
to {
|
|
1302
|
-
transform: rotate(360deg);
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
.animate-spin {
|
|
1306
|
-
animation: spin 1s linear infinite;
|
|
1307
|
-
}
|
|
1308
|
-
.cursor-pointer {
|
|
1309
|
-
cursor: pointer;
|
|
1310
|
-
}
|
|
1311
|
-
.flex-col {
|
|
1312
|
-
flex-direction: column;
|
|
1313
|
-
}
|
|
1314
|
-
.items-end {
|
|
1315
|
-
align-items: flex-end;
|
|
1316
|
-
}
|
|
1317
|
-
.items-center {
|
|
1318
|
-
align-items: center;
|
|
1319
|
-
}
|
|
1320
|
-
.justify-end {
|
|
1321
|
-
justify-content: flex-end;
|
|
1322
|
-
}
|
|
1323
|
-
.justify-center {
|
|
1324
|
-
justify-content: center;
|
|
1325
|
-
}
|
|
1326
|
-
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
|
1327
|
-
--tw-space-x-reverse: 0;
|
|
1328
|
-
margin-right: calc(8px * var(--tw-space-x-reverse));
|
|
1329
|
-
margin-left: calc(8px * calc(1 - var(--tw-space-x-reverse)));
|
|
1330
|
-
}
|
|
1331
|
-
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
1332
|
-
--tw-space-x-reverse: 0;
|
|
1333
|
-
margin-right: calc(16px * var(--tw-space-x-reverse));
|
|
1334
|
-
margin-left: calc(16px * calc(1 - var(--tw-space-x-reverse)));
|
|
1335
|
-
}
|
|
1336
|
-
.space-y-10 > :not([hidden]) ~ :not([hidden]) {
|
|
1337
|
-
--tw-space-y-reverse: 0;
|
|
1338
|
-
margin-top: calc(40px * calc(1 - var(--tw-space-y-reverse)));
|
|
1339
|
-
margin-bottom: calc(40px * var(--tw-space-y-reverse));
|
|
1340
|
-
}
|
|
1341
|
-
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
|
|
1342
|
-
--tw-space-y-reverse: 0;
|
|
1343
|
-
margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse)));
|
|
1344
|
-
margin-bottom: calc(16px * var(--tw-space-y-reverse));
|
|
1345
|
-
}
|
|
1346
|
-
.space-y-5 > :not([hidden]) ~ :not([hidden]) {
|
|
1347
|
-
--tw-space-y-reverse: 0;
|
|
1348
|
-
margin-top: calc(20px * calc(1 - var(--tw-space-y-reverse)));
|
|
1349
|
-
margin-bottom: calc(20px * var(--tw-space-y-reverse));
|
|
1350
|
-
}
|
|
1351
|
-
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
|
|
1352
|
-
--tw-space-y-reverse: 0;
|
|
1353
|
-
margin-top: calc(24px * calc(1 - var(--tw-space-y-reverse)));
|
|
1354
|
-
margin-bottom: calc(24px * var(--tw-space-y-reverse));
|
|
1355
|
-
}
|
|
1356
|
-
.space-y-8 > :not([hidden]) ~ :not([hidden]) {
|
|
1357
|
-
--tw-space-y-reverse: 0;
|
|
1358
|
-
margin-top: calc(32px * calc(1 - var(--tw-space-y-reverse)));
|
|
1359
|
-
margin-bottom: calc(32px * var(--tw-space-y-reverse));
|
|
1360
|
-
}
|
|
1361
|
-
.overflow-y-hidden {
|
|
1362
|
-
overflow-y: hidden;
|
|
1363
|
-
}
|
|
1364
|
-
.rounded-2xl {
|
|
1365
|
-
border-radius: 1rem;
|
|
1366
|
-
}
|
|
1367
|
-
.rounded-full {
|
|
1368
|
-
border-radius: 9999px;
|
|
1369
|
-
}
|
|
1370
|
-
.rounded-lg {
|
|
1371
|
-
border-radius: 0.5rem;
|
|
1372
|
-
}
|
|
1373
|
-
.border {
|
|
1374
|
-
border-width: 1px;
|
|
1375
|
-
}
|
|
1376
|
-
.border-\\[1\\.2px\\] {
|
|
1377
|
-
border-width: 1.2px;
|
|
1378
|
-
}
|
|
1379
|
-
.border-t {
|
|
1380
|
-
border-top-width: 1px;
|
|
1381
|
-
}
|
|
1382
|
-
.border-solid {
|
|
1383
|
-
border-style: solid;
|
|
1384
|
-
}
|
|
1385
|
-
.border-\\[\\#EBECEF\\] {
|
|
1386
|
-
--tw-border-opacity: 1;
|
|
1387
|
-
border-color: rgb(235 236 239 / var(--tw-border-opacity));
|
|
1388
|
-
}
|
|
1389
|
-
.border-ebecef {
|
|
1390
|
-
--tw-border-opacity: 1;
|
|
1391
|
-
border-color: rgb(235 236 239 / var(--tw-border-opacity));
|
|
1392
|
-
}
|
|
1393
|
-
.border-f1f5f8 {
|
|
1394
|
-
--tw-border-opacity: 1;
|
|
1395
|
-
border-color: rgb(241 245 248 / var(--tw-border-opacity));
|
|
1396
|
-
}
|
|
1397
|
-
.border-f5f5f7 {
|
|
1398
|
-
--tw-border-opacity: 1;
|
|
1399
|
-
border-color: rgb(245 245 247 / var(--tw-border-opacity));
|
|
1400
|
-
}
|
|
1401
|
-
.border-transparent {
|
|
1402
|
-
border-color: transparent;
|
|
1403
|
-
}
|
|
1404
|
-
.bg-0d151d {
|
|
1405
|
-
--tw-bg-opacity: 1;
|
|
1406
|
-
background-color: rgb(13 21 29 / var(--tw-bg-opacity));
|
|
1407
|
-
}
|
|
1408
|
-
.bg-black\\/50 {
|
|
1409
|
-
background-color: rgb(0 0 0 / 0.5);
|
|
1410
|
-
}
|
|
1411
|
-
.bg-transparent {
|
|
1412
|
-
background-color: transparent;
|
|
1413
|
-
}
|
|
1414
|
-
.bg-white {
|
|
1415
|
-
--tw-bg-opacity: 1;
|
|
1416
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1417
|
-
}
|
|
1418
|
-
.p-3 {
|
|
1419
|
-
padding: 12px;
|
|
1420
|
-
}
|
|
1421
|
-
.p-4 {
|
|
1422
|
-
padding: 16px;
|
|
1423
|
-
}
|
|
1424
|
-
.p-7 {
|
|
1425
|
-
padding: 28px;
|
|
1426
|
-
}
|
|
1427
|
-
.px-2 {
|
|
1428
|
-
padding-left: 8px;
|
|
1429
|
-
padding-right: 8px;
|
|
1430
|
-
}
|
|
1431
|
-
.px-8 {
|
|
1432
|
-
padding-left: 32px;
|
|
1433
|
-
padding-right: 32px;
|
|
1434
|
-
}
|
|
1435
|
-
.py-1 {
|
|
1436
|
-
padding-top: 4px;
|
|
1437
|
-
padding-bottom: 4px;
|
|
1438
|
-
}
|
|
1439
|
-
.py-3 {
|
|
1440
|
-
padding-top: 12px;
|
|
1441
|
-
padding-bottom: 12px;
|
|
1442
|
-
}
|
|
1443
|
-
.pt-6 {
|
|
1444
|
-
padding-top: 24px;
|
|
1445
|
-
}
|
|
1446
|
-
.text-center {
|
|
1447
|
-
text-align: center;
|
|
1448
|
-
}
|
|
1449
|
-
.font-sans {
|
|
1450
|
-
font-family: TWK Lausanne, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
1451
|
-
}
|
|
1452
|
-
.text-2xl {
|
|
1453
|
-
font-size: 24px;
|
|
1454
|
-
line-height: 32px;
|
|
1455
|
-
}
|
|
1456
|
-
.text-lg {
|
|
1457
|
-
font-size: 18px;
|
|
1458
|
-
line-height: 28px;
|
|
1459
|
-
}
|
|
1460
|
-
.text-sm {
|
|
1461
|
-
font-size: 14px;
|
|
1462
|
-
line-height: 20px;
|
|
1463
|
-
}
|
|
1464
|
-
.text-xs {
|
|
1465
|
-
font-size: 12px;
|
|
1466
|
-
line-height: 16px;
|
|
1467
|
-
}
|
|
1468
|
-
.font-light {
|
|
1469
|
-
font-weight: 300;
|
|
1470
|
-
}
|
|
1471
|
-
.font-medium {
|
|
1472
|
-
font-weight: 500;
|
|
1473
|
-
}
|
|
1474
|
-
.font-semibold {
|
|
1475
|
-
font-weight: 600;
|
|
1476
|
-
}
|
|
1477
|
-
.text-0d151d {
|
|
1478
|
-
--tw-text-opacity: 1;
|
|
1479
|
-
color: rgb(13 21 29 / var(--tw-text-opacity));
|
|
1480
|
-
}
|
|
1481
|
-
.text-29343f {
|
|
1482
|
-
--tw-text-opacity: 1;
|
|
1483
|
-
color: rgb(41 52 63 / var(--tw-text-opacity));
|
|
1484
|
-
}
|
|
1485
|
-
.text-3c424b {
|
|
1486
|
-
--tw-text-opacity: 1;
|
|
1487
|
-
color: rgb(60 66 75 / var(--tw-text-opacity));
|
|
1488
|
-
}
|
|
1489
|
-
.text-657080 {
|
|
1490
|
-
--tw-text-opacity: 1;
|
|
1491
|
-
color: rgb(101 112 128 / var(--tw-text-opacity));
|
|
1492
|
-
}
|
|
1493
|
-
.text-70868f {
|
|
1494
|
-
--tw-text-opacity: 1;
|
|
1495
|
-
color: rgb(112 134 143 / var(--tw-text-opacity));
|
|
1496
|
-
}
|
|
1497
|
-
.text-9ba3ae {
|
|
1498
|
-
--tw-text-opacity: 1;
|
|
1499
|
-
color: rgb(155 163 174 / var(--tw-text-opacity));
|
|
1500
|
-
}
|
|
1501
|
-
.text-9eafc0 {
|
|
1502
|
-
--tw-text-opacity: 1;
|
|
1503
|
-
color: rgb(158 175 192 / var(--tw-text-opacity));
|
|
1504
|
-
}
|
|
1505
|
-
.text-black {
|
|
1506
|
-
--tw-text-opacity: 1;
|
|
1507
|
-
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
1508
|
-
}
|
|
1509
|
-
.text-gray-900 {
|
|
1510
|
-
--tw-text-opacity: 1;
|
|
1511
|
-
color: rgb(17 24 39 / var(--tw-text-opacity));
|
|
1512
|
-
}
|
|
1513
|
-
.text-white {
|
|
1514
|
-
--tw-text-opacity: 1;
|
|
1515
|
-
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1516
|
-
}
|
|
1517
|
-
.opacity-40 {
|
|
1518
|
-
opacity: 0.4;
|
|
1519
|
-
}
|
|
1520
|
-
.shadow {
|
|
1521
|
-
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
1522
|
-
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
1523
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1524
|
-
}
|
|
1525
|
-
.shadow-sm {
|
|
1526
|
-
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
1527
|
-
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
|
|
1528
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1529
|
-
}
|
|
1530
|
-
.blur-lg {
|
|
1531
|
-
--tw-blur: blur(16px);
|
|
1532
|
-
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);
|
|
1533
|
-
}
|
|
1534
|
-
.filter {
|
|
1535
|
-
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);
|
|
1536
|
-
}
|
|
1537
|
-
.backdrop-blur-lg {
|
|
1538
|
-
--tw-backdrop-blur: blur(16px);
|
|
1539
|
-
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
1540
|
-
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
1541
|
-
}
|
|
1542
|
-
.transition {
|
|
1543
|
-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
|
|
1544
|
-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
1545
|
-
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
|
|
1546
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1547
|
-
transition-duration: 150ms;
|
|
1548
|
-
}
|
|
1549
|
-
.duration-300 {
|
|
1550
|
-
transition-duration: 300ms;
|
|
1551
|
-
}
|
|
1552
|
-
.duration-500 {
|
|
1553
|
-
transition-duration: 500ms;
|
|
1554
|
-
}
|
|
1555
|
-
.ease-in-out {
|
|
1556
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1557
|
-
}
|
|
1558
|
-
input[type='number']::-webkit-inner-spin-button,
|
|
1559
|
-
input[type='number']::-webkit-outer-spin-button {
|
|
1560
|
-
-webkit-appearance: none;
|
|
1561
|
-
appearance: none;
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
.hover\\:underline:hover {
|
|
1565
|
-
text-decoration-line: underline;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
.hover\\:shadow:hover {
|
|
1569
|
-
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
1570
|
-
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
1571
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
.focus\\:outline-none:focus {
|
|
1575
|
-
outline: 2px solid transparent;
|
|
1576
|
-
outline-offset: 2px;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.focus\\:ring-2:focus {
|
|
1580
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1581
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1582
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
.focus\\:ring-indigo-500:focus {
|
|
1586
|
-
--tw-ring-opacity: 1;
|
|
1587
|
-
--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
.focus\\:ring-offset-2:focus {
|
|
1591
|
-
--tw-ring-offset-width: 2px;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.focus-visible\\:ring:focus-visible {
|
|
1595
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1596
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1597
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
.focus-visible\\:ring-purple-500\\/75:focus-visible {
|
|
1601
|
-
--tw-ring-color: rgb(168 85 247 / 0.75);
|
|
1602
|
-
}
|
|
1603
|
-
|
|
1604
|
-
.disabled\\:cursor-not-allowed:disabled {
|
|
1605
|
-
cursor: not-allowed;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
.disabled\\:opacity-40:disabled {
|
|
1609
|
-
opacity: 0.4;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1613
|
-
@keyframes spin {
|
|
1614
|
-
to {
|
|
1615
|
-
transform: rotate(360deg);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
.motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\] {
|
|
1619
|
-
animation: spin 1.5s linear infinite;
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.dark\\:border-f1f5f8\\/10:is(.dark *) {
|
|
1624
|
-
border-color: rgb(241 245 248 / 0.1);
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
.dark\\:bg-0d151d:is(.dark *) {
|
|
1628
|
-
--tw-bg-opacity: 1;
|
|
1629
|
-
background-color: rgb(13 21 29 / var(--tw-bg-opacity));
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
.dark\\:bg-white:is(.dark *) {
|
|
1633
|
-
--tw-bg-opacity: 1;
|
|
1634
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
.dark\\:text-0d151d:is(.dark *) {
|
|
1638
|
-
--tw-text-opacity: 1;
|
|
1639
|
-
color: rgb(13 21 29 / var(--tw-text-opacity));
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
.dark\\:text-9eafc0:is(.dark *) {
|
|
1643
|
-
--tw-text-opacity: 1;
|
|
1644
|
-
color: rgb(158 175 192 / var(--tw-text-opacity));
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
.dark\\:text-white:is(.dark *) {
|
|
1648
|
-
--tw-text-opacity: 1;
|
|
1649
|
-
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
@media (min-width: 768px) {
|
|
1653
|
-
.md\\:mt-2 {
|
|
1654
|
-
margin-top: 8px;
|
|
1655
|
-
}
|
|
1656
|
-
.md\\:block {
|
|
1657
|
-
display: block;
|
|
1658
|
-
}
|
|
1659
|
-
.md\\:hidden {
|
|
1660
|
-
display: none;
|
|
1661
|
-
}
|
|
1662
|
-
.md\\:min-h-\\[35rem\\] {
|
|
1663
|
-
min-height: 35rem;
|
|
1664
|
-
}
|
|
1665
|
-
.md\\:max-w-md {
|
|
1666
|
-
max-width: 448px;
|
|
1667
|
-
}
|
|
1668
|
-
.md\\:items-center {
|
|
1669
|
-
align-items: center;
|
|
1670
|
-
}
|
|
1671
|
-
.md\\:overflow-y-auto {
|
|
1672
|
-
overflow-y: auto;
|
|
1673
|
-
}
|
|
1674
|
-
.md\\:rounded-\\[24px\\] {
|
|
1675
|
-
border-radius: 24px;
|
|
1676
|
-
}
|
|
1677
|
-
.md\\:rounded-b-2xl {
|
|
1678
|
-
border-bottom-right-radius: 1rem;
|
|
1679
|
-
border-bottom-left-radius: 1rem;
|
|
1680
|
-
}
|
|
1681
|
-
.md\\:p-4 {
|
|
1682
|
-
padding: 16px;
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
@media (min-width: 1280px) {
|
|
1687
|
-
.xl\\:block {
|
|
1688
|
-
display: block;
|
|
1689
|
-
}
|
|
1690
|
-
.xl\\:hidden {
|
|
1691
|
-
display: none;
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
`;
|
|
1695
|
-
|
|
1696
|
-
// src/components/Styles.tsx
|
|
1697
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1698
|
-
var Styles = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: styles_default });
|
|
1699
|
-
var Styles_default = Styles;
|
|
1700
|
-
|
|
1701
|
-
// src/components/IDKitWidget/ShadowHost.tsx
|
|
1702
|
-
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
1703
|
-
var import_react3 = require("react");
|
|
1704
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1705
|
-
var ShadowHost = ({ id, children, mode = "open", delegatesFocus = false }) => {
|
|
1706
|
-
const [shadowRoot, setShadowRoot] = (0, import_react3.useState)(null);
|
|
1707
|
-
const hostRef = (0, import_react3.useCallback)(
|
|
1708
|
-
(node) => {
|
|
1709
|
-
if (node) {
|
|
1710
|
-
const root = node.shadowRoot ?? node.attachShadow({ mode, delegatesFocus });
|
|
1711
|
-
setShadowRoot(root);
|
|
1712
|
-
}
|
|
1713
|
-
},
|
|
1714
|
-
[mode, delegatesFocus]
|
|
1715
|
-
);
|
|
1716
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref: hostRef, id, children: shadowRoot && import_react_dom.default.createPortal(children, shadowRoot) });
|
|
1717
|
-
};
|
|
1718
|
-
|
|
1719
|
-
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1720
|
-
var import_shallow3 = require("zustand/shallow");
|
|
1721
|
-
|
|
1722
|
-
// src/components/Icons/XMarkIcon.tsx
|
|
1723
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1724
|
-
var XMarkIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1725
|
-
"path",
|
|
1726
|
-
{
|
|
1727
|
-
strokeWidth: "1.5",
|
|
1728
|
-
stroke: "currentColor",
|
|
1729
|
-
strokeLinecap: "round",
|
|
1730
|
-
strokeLinejoin: "round",
|
|
1731
|
-
d: "m16.243 7.758-8.485 8.485m8.485 0L7.758 7.758"
|
|
1732
|
-
}
|
|
1733
|
-
) });
|
|
1734
|
-
var XMarkIcon_default = XMarkIcon;
|
|
1735
|
-
|
|
1736
|
-
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
1737
|
-
function r(e) {
|
|
1738
|
-
var t, f, n = "";
|
|
1739
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
1740
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
1741
|
-
var o = e.length;
|
|
1742
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
1743
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
1744
|
-
return n;
|
|
1745
|
-
}
|
|
1746
|
-
function clsx() {
|
|
1747
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
1748
|
-
return n;
|
|
1749
|
-
}
|
|
1750
|
-
var clsx_default = clsx;
|
|
1751
|
-
|
|
1752
|
-
// src/components/IDKitWidget/States/ErrorState.tsx
|
|
1753
|
-
var import_react4 = require("react");
|
|
1754
|
-
|
|
1755
|
-
// src/components/Icons/ErrorIcon.tsx
|
|
1756
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1757
|
-
var ErrorIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: "88", height: "88", viewBox: "0 0 88 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
1758
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { width: "88", height: "88", rx: "44", fill: "#9BA3AE" }),
|
|
1759
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { opacity: "0.2", width: "88", height: "88", rx: "44", fill: "url(#paint0_radial_117706_3198)" }),
|
|
1760
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x: "0.5", y: "0.5", width: "87", height: "87", rx: "43.5", stroke: "url(#paint1_linear_117706_3198)" }),
|
|
1761
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1762
|
-
"path",
|
|
1763
|
-
{
|
|
1764
|
-
d: "M33.0146 53.9853L43.4999 43.5M53.9851 33.0147L43.4999 43.5M43.4999 43.5L33.0146 33.0147M43.4999 43.5L53.9851 53.9853",
|
|
1765
|
-
stroke: "white",
|
|
1766
|
-
strokeWidth: "3"
|
|
1767
|
-
}
|
|
1768
|
-
),
|
|
1769
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("defs", { children: [
|
|
1770
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1771
|
-
"radialGradient",
|
|
1772
|
-
{
|
|
1773
|
-
id: "paint0_radial_117706_3198",
|
|
1774
|
-
cx: "0",
|
|
1775
|
-
cy: "0",
|
|
1776
|
-
r: "1",
|
|
1777
|
-
gradientUnits: "userSpaceOnUse",
|
|
1778
|
-
gradientTransform: "translate(20 -1.6729e-06) rotate(63.4349) scale(98.387 97.9627)",
|
|
1779
|
-
children: [
|
|
1780
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { stopColor: "white" }),
|
|
1781
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1782
|
-
]
|
|
1783
|
-
}
|
|
1784
|
-
),
|
|
1785
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1786
|
-
"linearGradient",
|
|
1787
|
-
{
|
|
1788
|
-
id: "paint1_linear_117706_3198",
|
|
1789
|
-
x1: "44",
|
|
1790
|
-
y1: "0",
|
|
1791
|
-
x2: "44",
|
|
1792
|
-
y2: "88",
|
|
1793
|
-
gradientUnits: "userSpaceOnUse",
|
|
1794
|
-
children: [
|
|
1795
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { stopColor: "white", stopOpacity: "0.3" }),
|
|
1796
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1797
|
-
]
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1800
|
-
] })
|
|
1801
|
-
] });
|
|
1802
|
-
var ErrorIcon_default = ErrorIcon;
|
|
1803
|
-
|
|
1804
|
-
// src/components/IDKitWidget/States/ErrorState.tsx
|
|
1805
|
-
var import_idkit_core2 = require("@worldcoin/idkit-core");
|
|
1806
|
-
|
|
1807
|
-
// src/components/Icons/WarningIcon.tsx
|
|
1808
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1809
|
-
var WarningIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "88", height: "88", viewBox: "0 0 88 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
1810
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { width: "88", height: "88", rx: "44", fill: "#FFAE00" }),
|
|
1811
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { opacity: "0.2", width: "88", height: "88", rx: "44", fill: "url(#paint0_radial_117706_3182)" }),
|
|
1812
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "0.5", y: "0.5", width: "87", height: "87", rx: "43.5", stroke: "url(#paint1_linear_117706_3182)" }),
|
|
1813
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1814
|
-
"path",
|
|
1815
|
-
{
|
|
1816
|
-
d: "M64.1707 59.5415H22.8298L43.4998 22.3354L64.1707 59.5415ZM42.1208 51.3003L42.1218 54.0503H44.8992L44.8982 51.3003H42.1208ZM42.1248 46.7085H44.8748V36.6255H42.1248V46.7085Z",
|
|
1817
|
-
fill: "white"
|
|
1818
|
-
}
|
|
1819
|
-
),
|
|
1820
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("defs", { children: [
|
|
1821
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1822
|
-
"radialGradient",
|
|
1823
|
-
{
|
|
1824
|
-
id: "paint0_radial_117706_3182",
|
|
1825
|
-
cx: "0",
|
|
1826
|
-
cy: "0",
|
|
1827
|
-
r: "1",
|
|
1828
|
-
gradientUnits: "userSpaceOnUse",
|
|
1829
|
-
gradientTransform: "translate(20 -1.6729e-06) rotate(63.4349) scale(98.387 97.9627)",
|
|
1830
|
-
children: [
|
|
1831
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("stop", { stopColor: "white" }),
|
|
1832
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1833
|
-
]
|
|
1834
|
-
}
|
|
1835
|
-
),
|
|
1836
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1837
|
-
"linearGradient",
|
|
1838
|
-
{
|
|
1839
|
-
id: "paint1_linear_117706_3182",
|
|
1840
|
-
x1: "44",
|
|
1841
|
-
y1: "0",
|
|
1842
|
-
x2: "44",
|
|
1843
|
-
y2: "88",
|
|
1844
|
-
gradientUnits: "userSpaceOnUse",
|
|
1845
|
-
children: [
|
|
1846
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("stop", { stopColor: "white", stopOpacity: "0.3" }),
|
|
1847
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1848
|
-
]
|
|
1849
|
-
}
|
|
1850
|
-
)
|
|
1851
|
-
] })
|
|
1852
|
-
] });
|
|
1853
|
-
var WarningIcon_default = WarningIcon;
|
|
1854
|
-
|
|
1855
|
-
// src/components/IDKitWidget/States/ErrorState.tsx
|
|
1856
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1857
|
-
var getParams = ({ retryFlow, errorState }) => ({ retryFlow, errorState });
|
|
1858
|
-
var getErrorTitle = (code) => {
|
|
1859
|
-
switch (code) {
|
|
1860
|
-
case import_idkit_core2.AppErrorCodes.GenericError:
|
|
1861
|
-
return __("Something went wrong");
|
|
1862
|
-
case import_idkit_core2.AppErrorCodes.FailedByHostApp:
|
|
1863
|
-
return __("Verification Declined");
|
|
1864
|
-
case import_idkit_core2.AppErrorCodes.VerificationRejected:
|
|
1865
|
-
return __("Request cancelled");
|
|
1866
|
-
default:
|
|
1867
|
-
return __("Something went wrong");
|
|
1868
|
-
}
|
|
1869
|
-
};
|
|
1870
|
-
var getErrorMessage = (code) => {
|
|
1871
|
-
switch (code) {
|
|
1872
|
-
case import_idkit_core2.AppErrorCodes.ConnectionFailed:
|
|
1873
|
-
return __("Connection to your wallet failed. Please try again.");
|
|
1874
|
-
case import_idkit_core2.AppErrorCodes.VerificationRejected:
|
|
1875
|
-
return __("You've cancelled the request in World App.");
|
|
1876
|
-
case import_idkit_core2.AppErrorCodes.MaxVerificationsReached:
|
|
1877
|
-
return __("You've already verified the maximum number of times for this action.");
|
|
1878
|
-
case import_idkit_core2.AppErrorCodes.CredentialUnavailable:
|
|
1879
|
-
return __("It seems you don't have the verification level required by this app.");
|
|
1880
|
-
case import_idkit_core2.AppErrorCodes.InvalidNetwork:
|
|
1881
|
-
return __("Invalid network. If you are the app owner, visit docs.world.org/test for details.");
|
|
1882
|
-
case import_idkit_core2.AppErrorCodes.InclusionProofPending:
|
|
1883
|
-
return __("Your identity is still being registered. Please wait a few minutes and try again.");
|
|
1884
|
-
case import_idkit_core2.AppErrorCodes.GenericError:
|
|
1885
|
-
default:
|
|
1886
|
-
return __("We couldn't complete your request. Please try again.");
|
|
1887
|
-
}
|
|
1888
|
-
};
|
|
1889
|
-
var ErrorState = (props) => {
|
|
1890
|
-
const { retryFlow, errorState } = idkit_default(getParams);
|
|
1891
|
-
const { show_modal } = props;
|
|
1892
|
-
(0, import_react4.useEffect)(() => {
|
|
1893
|
-
if (errorState) {
|
|
1894
|
-
console.error(`Error state: `, errorState);
|
|
1895
|
-
}
|
|
1896
|
-
}, [errorState]);
|
|
1897
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-8", children: [
|
|
1898
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: clsx_default("flex items-center justify-center", show_modal ? "-mt-5" : ""), children: errorState?.code == import_idkit_core2.AppErrorCodes.VerificationRejected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WarningIcon_default, { className: "w-24" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorIcon_default, { className: "w-24" }) }),
|
|
1899
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
1900
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: errorState?.code ? getErrorTitle(errorState.code) : getErrorTitle(import_idkit_core2.AppErrorCodes.GenericError) }),
|
|
1901
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-auto mt-2 max-w-[224px] text-center text-657080", children: errorState?.code ? getErrorMessage(errorState.code) : getErrorMessage(import_idkit_core2.AppErrorCodes.GenericError) })
|
|
1902
|
-
] }),
|
|
1903
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1904
|
-
"button",
|
|
1905
|
-
{
|
|
1906
|
-
type: "button",
|
|
1907
|
-
onClick: retryFlow,
|
|
1908
|
-
className: "inline-flex items-center rounded-full border-[1.2px] border-ebecef bg-transparent px-8 py-3 font-semibold text-gray-900 shadow-sm transition duration-300 hover:shadow focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1909
|
-
children: __("Try Again")
|
|
1910
|
-
}
|
|
1911
|
-
) })
|
|
1912
|
-
] });
|
|
1913
|
-
};
|
|
1914
|
-
var ErrorState_default = ErrorState;
|
|
1915
|
-
|
|
1916
|
-
// src/components/IDKitWidget/BaseWidget.tsx
|
|
1917
|
-
var Toast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
1918
|
-
|
|
1919
|
-
// src/components/Icons/CheckIcon.tsx
|
|
1920
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1921
|
-
var CheckIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: "88", height: "88", viewBox: "0 0 88 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
1922
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { width: "88", height: "88", rx: "44", fill: "#00C230" }),
|
|
1923
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { opacity: "0.2", width: "88", height: "88", rx: "44", fill: "url(#paint0_radial_117706_3174)" }),
|
|
1924
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "0.5", y: "0.5", width: "87", height: "87", rx: "43.5", stroke: "url(#paint1_linear_117706_3174)" }),
|
|
1925
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M29.5 45.5L37.5 53.5L57.5 33.5", stroke: "white", strokeWidth: "3" }),
|
|
1926
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("defs", { children: [
|
|
1927
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1928
|
-
"radialGradient",
|
|
1929
|
-
{
|
|
1930
|
-
id: "paint0_radial_117706_3174",
|
|
1931
|
-
cx: "0",
|
|
1932
|
-
cy: "0",
|
|
1933
|
-
r: "1",
|
|
1934
|
-
gradientUnits: "userSpaceOnUse",
|
|
1935
|
-
gradientTransform: "translate(20 -1.6729e-06) rotate(63.4349) scale(98.387 97.9627)",
|
|
1936
|
-
children: [
|
|
1937
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("stop", { stopColor: "white" }),
|
|
1938
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1939
|
-
]
|
|
1940
|
-
}
|
|
1941
|
-
),
|
|
1942
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1943
|
-
"linearGradient",
|
|
1944
|
-
{
|
|
1945
|
-
id: "paint1_linear_117706_3174",
|
|
1946
|
-
x1: "44",
|
|
1947
|
-
y1: "0",
|
|
1948
|
-
x2: "44",
|
|
1949
|
-
y2: "88",
|
|
1950
|
-
gradientUnits: "userSpaceOnUse",
|
|
1951
|
-
children: [
|
|
1952
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("stop", { stopColor: "white", stopOpacity: "0.3" }),
|
|
1953
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
|
|
1954
|
-
]
|
|
1955
|
-
}
|
|
1956
|
-
)
|
|
1957
|
-
] })
|
|
1958
|
-
] });
|
|
1959
|
-
var CheckIcon_default = CheckIcon;
|
|
1960
|
-
|
|
1961
|
-
// src/components/IDKitWidget/States/SuccessState.tsx
|
|
1962
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1963
|
-
var SuccessState = (props) => {
|
|
1964
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-6", children: [
|
|
1965
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: clsx_default("flex items-center justify-center", props.show_modal ? "-mt-5" : ""), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CheckIcon_default, { className: "w-24 text-white" }) }),
|
|
1966
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
1967
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: __("All set!") }),
|
|
1968
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "mx-auto mt-2 max-w-[260px] text-center text-lg text-657080", children: __("Your World ID is now connected") })
|
|
1969
|
-
] })
|
|
1970
|
-
] });
|
|
1971
|
-
};
|
|
1972
|
-
var SuccessState_default = SuccessState;
|
|
1973
|
-
|
|
1974
|
-
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
1975
|
-
var import_copy_to_clipboard = __toESM(require("copy-to-clipboard"), 1);
|
|
1976
|
-
|
|
1977
|
-
// src/components/QRCode.tsx
|
|
1978
|
-
var import_react5 = require("react");
|
|
1979
|
-
var import_qrcode = __toESM(require("qrcode/lib/core/qrcode.js"), 1);
|
|
1980
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1981
|
-
var generateMatrix = (data) => {
|
|
1982
|
-
const arr = import_qrcode.default.create(data, { errorCorrectionLevel: "M" }).modules.data;
|
|
1983
|
-
const sqrt = Math.sqrt(arr.length);
|
|
1984
|
-
return arr.reduce(
|
|
1985
|
-
(rows, key, index) => {
|
|
1986
|
-
if (index % sqrt === 0) rows.push([key]);
|
|
1987
|
-
else rows[rows.length - 1].push(key);
|
|
1988
|
-
return rows;
|
|
1989
|
-
},
|
|
1990
|
-
[]
|
|
1991
|
-
);
|
|
1992
|
-
};
|
|
1993
|
-
var Qrcode = ({ data, size = 300 }) => {
|
|
1994
|
-
const dots = (0, import_react5.useMemo)(() => {
|
|
1995
|
-
const dots2 = [];
|
|
1996
|
-
const matrix = generateMatrix(data);
|
|
1997
|
-
const cellSize = size / matrix.length;
|
|
1998
|
-
const qrList = [
|
|
1999
|
-
{ x: 0, y: 0 },
|
|
2000
|
-
{ x: 1, y: 0 },
|
|
2001
|
-
{ x: 0, y: 1 }
|
|
2002
|
-
];
|
|
2003
|
-
qrList.forEach(({ x, y }) => {
|
|
2004
|
-
const x1 = (matrix.length - 7) * cellSize * x;
|
|
2005
|
-
const y1 = (matrix.length - 7) * cellSize * y;
|
|
2006
|
-
for (let i = 0; i < 3; i++) {
|
|
2007
|
-
dots2.push(
|
|
2008
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2009
|
-
"rect",
|
|
2010
|
-
{
|
|
2011
|
-
fill: "currentColor",
|
|
2012
|
-
x: x1 + cellSize * i,
|
|
2013
|
-
y: y1 + cellSize * i,
|
|
2014
|
-
width: cellSize * (7 - i * 2),
|
|
2015
|
-
height: cellSize * (7 - i * 2),
|
|
2016
|
-
rx: (i - 2) * -5,
|
|
2017
|
-
ry: (i - 2) * -5,
|
|
2018
|
-
className: i % 3 === 0 ? "text-black" : i % 3 === 1 ? "text-white" : "text-black"
|
|
2019
|
-
},
|
|
2020
|
-
`${i}-${x}-${y}`
|
|
2021
|
-
)
|
|
2022
|
-
);
|
|
2023
|
-
}
|
|
2024
|
-
});
|
|
2025
|
-
matrix.forEach((row, i) => {
|
|
2026
|
-
row.forEach((_, j) => {
|
|
2027
|
-
if (!matrix[i][j]) return;
|
|
2028
|
-
if (i < 7 && j < 7 || i > matrix.length - 8 && j < 7 || i < 7 && j > matrix.length - 8) return;
|
|
2029
|
-
dots2.push(
|
|
2030
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2031
|
-
"circle",
|
|
2032
|
-
{
|
|
2033
|
-
fill: "currentColor",
|
|
2034
|
-
r: cellSize / 2.2,
|
|
2035
|
-
cx: i * cellSize + cellSize / 2,
|
|
2036
|
-
cy: j * cellSize + cellSize / 2,
|
|
2037
|
-
className: "text-black dark:text-white"
|
|
2038
|
-
},
|
|
2039
|
-
`circle-${i}-${j}`
|
|
2040
|
-
)
|
|
2041
|
-
);
|
|
2042
|
-
});
|
|
2043
|
-
});
|
|
2044
|
-
return dots2;
|
|
2045
|
-
}, [size, data]);
|
|
2046
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { height: size, width: size, "data-test-id": "qr-code", children: dots });
|
|
2047
|
-
};
|
|
2048
|
-
var QRCode_default = (0, import_react5.memo)(Qrcode);
|
|
2049
|
-
|
|
2050
|
-
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
2051
|
-
var import_react6 = require("react");
|
|
2052
|
-
var import_framer_motion = require("framer-motion");
|
|
2053
|
-
|
|
2054
|
-
// src/components/Icons/WorldcoinIcon.tsx
|
|
2055
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2056
|
-
var WorldcoinIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2057
|
-
"path",
|
|
2058
|
-
{
|
|
2059
|
-
d: "M30.7367 9.77239C29.9301 7.86586 28.7772 6.15721 27.3084 4.68831C25.8397 3.21941 24.1275 2.06636 22.225 1.2596C20.2502 0.422405 18.1574 0 15.9962 0C13.8388 0 11.7422 0.422405 9.76742 1.2596C7.86112 2.06636 6.15268 3.21941 4.68395 4.68831C3.21522 6.15721 2.06231 7.86966 1.25565 9.77239C0.422354 11.7436 0 13.8404 0 15.9981C0 18.1558 0.422354 20.2526 1.25945 22.2276C2.06611 24.1341 3.21903 25.8428 4.68775 27.3117C6.15648 28.7806 7.86873 29.9336 9.77122 30.7404C11.746 31.5738 13.8388 32 16 32C18.1574 32 20.254 31.5776 22.2288 30.7404C24.1351 29.9336 25.8435 28.7806 27.3122 27.3117C28.781 25.8428 29.9339 24.1303 30.7405 22.2276C31.5738 20.2526 32 18.1596 32 15.9981C31.9962 13.8404 31.57 11.7436 30.7367 9.77239ZM10.6844 14.4949C11.3503 11.9377 13.679 10.0464 16.4452 10.0464H27.552C28.2673 11.4278 28.7239 12.9309 28.9027 14.4949H10.6844ZM28.9027 17.5012C28.7239 19.0653 28.2635 20.5684 27.552 21.9498H16.4452C13.6828 21.9498 11.3541 20.0585 10.6844 17.5012H28.9027ZM6.81094 6.81175C9.26516 4.35724 12.526 3.0063 15.9962 3.0063C19.4663 3.0063 22.7272 4.35724 25.1815 6.81175C25.2576 6.88786 25.3298 6.96397 25.4021 7.04008H16.4452C14.0518 7.04008 11.8031 7.97241 10.1099 9.66583C8.77812 10.9977 7.91819 12.6759 7.60999 14.4988H3.09346C3.42449 11.5952 4.71439 8.90855 6.81094 6.81175ZM15.9962 28.9937C12.526 28.9937 9.26516 27.6428 6.81094 25.1883C4.71439 23.0915 3.42449 20.4048 3.09346 17.5051H7.60999C7.91439 19.3279 8.77812 21.0061 10.1099 22.338C11.8031 24.0314 14.0518 24.9637 16.4452 24.9637H25.4059C25.3337 25.0398 25.2576 25.1159 25.1853 25.1921C22.731 27.639 19.4663 28.9937 15.9962 28.9937Z",
|
|
2060
|
-
fill: "currentColor"
|
|
2061
|
-
}
|
|
2062
|
-
) });
|
|
2063
|
-
var WorldcoinIcon_default = WorldcoinIcon;
|
|
2064
|
-
|
|
2065
|
-
// src/components/Icons/QRPlaceholderIcon.tsx
|
|
2066
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2067
|
-
var QRPlaceholderIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 200 200", children: [
|
|
2068
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2069
|
-
"path",
|
|
2070
|
-
{
|
|
2071
|
-
fill: "#EBECEF",
|
|
2072
|
-
fillRule: "evenodd",
|
|
2073
|
-
d: "M12.1 0C5.417 0 0 5.417 0 12.1v18.505c0 6.682 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.418 12.1-12.1V12.1c0-6.683-5.418-12.1-12.1-12.1H12.1Zm18.505 11.388H12.1a.712.712 0 0 0-.712.712v18.505c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712V12.1a.712.712 0 0 0-.712-.712Z",
|
|
2074
|
-
clipRule: "evenodd"
|
|
2075
|
-
}
|
|
2076
|
-
),
|
|
2077
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2078
|
-
"path",
|
|
2079
|
-
{
|
|
2080
|
-
fill: "#EBECEF",
|
|
2081
|
-
d: "M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992 0 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"
|
|
2082
|
-
}
|
|
2083
|
-
),
|
|
2084
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2085
|
-
"path",
|
|
2086
|
-
{
|
|
2087
|
-
fill: "#EBECEF",
|
|
2088
|
-
fillRule: "evenodd",
|
|
2089
|
-
d: "M157.295 12.1c0-6.683 5.418-12.1 12.1-12.1H187.9c6.683 0 12.1 5.417 12.1 12.1v18.505c0 6.682-5.417 12.1-12.1 12.1h-18.505c-6.682 0-12.1-5.418-12.1-12.1V12.1Zm12.1-.712H187.9c.393 0 .712.319.712.712v18.505a.712.712 0 0 1-.712.712h-18.505a.712.712 0 0 1-.712-.712V12.1c0-.393.319-.712.712-.712ZM12.1 157.295c-6.683 0-12.1 5.418-12.1 12.1V187.9c0 6.683 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.417 12.1-12.1v-18.505c0-6.682-5.418-12.1-12.1-12.1H12.1Zm19.217 12.1a.712.712 0 0 0-.712-.712H12.1a.712.712 0 0 0-.712.712V187.9c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712v-18.505Z",
|
|
2090
|
-
clipRule: "evenodd"
|
|
2091
|
-
}
|
|
2092
|
-
),
|
|
2093
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2094
|
-
"path",
|
|
2095
|
-
{
|
|
2096
|
-
fill: "#EBECEF",
|
|
2097
|
-
d: "M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Zm102.135-40.926a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253ZM67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Zm78.291-120.285a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252ZM95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"
|
|
2098
|
-
}
|
|
2099
|
-
),
|
|
2100
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2101
|
-
"path",
|
|
2102
|
-
{
|
|
2103
|
-
fill: "url(#a)",
|
|
2104
|
-
fillRule: "evenodd",
|
|
2105
|
-
d: "M12.1 0C5.417 0 0 5.417 0 12.1v18.505c0 6.682 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.418 12.1-12.1V12.1c0-6.683-5.418-12.1-12.1-12.1H12.1Zm18.505 11.388H12.1a.712.712 0 0 0-.712.712v18.505c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712V12.1a.712.712 0 0 0-.712-.712Z",
|
|
2106
|
-
clipRule: "evenodd"
|
|
2107
|
-
}
|
|
2108
|
-
),
|
|
2109
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2110
|
-
"path",
|
|
2111
|
-
{
|
|
2112
|
-
fill: "url(#a)",
|
|
2113
|
-
d: "M197.026 200c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-17.616c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.545.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808h-11.897v-11.744h-11.896v-23.487h11.896v8.808c0 .778.314 1.525.872 2.076.557.55 1.314.86 2.102.86h5.949c.788 0 1.545-.31 2.103-.86a2.922 2.922 0 0 0 .871-2.076v-8.808h8.922c.789 0 1.545-.309 2.103-.86a2.916 2.916 0 0 0 .871-2.076v-5.872c0-.779-.313-1.525-.871-2.076a2.992 2.992 0 0 0-2.103-.86h-29.741c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v8.808h-23.792v-11.744h8.922c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-5.872c0-.778-.313-1.525-.871-2.076a2.996 2.996 0 0 0-2.103-.86h-5.948c-.789 0-1.546.31-2.103.86a2.918 2.918 0 0 0-.871 2.076v8.808H119.7c-.789 0-1.545.309-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.525.871 2.076.558.551 1.314.86 2.103.86h20.819v8.808c0 .778.313 1.525.871 2.076.557.55 1.314.86 2.103.86h8.922v8.808c0 .778.313 1.525.871 2.076.558.55 1.314.859 2.103.859h8.922v11.744h-20.818c-.789 0-1.546.31-2.103.86a2.916 2.916 0 0 0-.871 2.076v5.872c0 .779.313 1.526.871 2.076a2.99 2.99 0 0 0 2.103.86h17.844c.789 0 1.545-.309 2.103-.86.558-.55.871-1.297.871-2.076v-8.808h11.896v8.808c0 .779.314 1.526.872 2.076a2.99 2.99 0 0 0 2.102.86h17.845Z"
|
|
2114
|
-
}
|
|
2115
|
-
),
|
|
2116
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2117
|
-
"path",
|
|
2118
|
-
{
|
|
2119
|
-
fill: "url(#a)",
|
|
2120
|
-
fillRule: "evenodd",
|
|
2121
|
-
d: "M157.295 12.1c0-6.683 5.418-12.1 12.1-12.1H187.9c6.683 0 12.1 5.417 12.1 12.1v18.505c0 6.682-5.417 12.1-12.1 12.1h-18.505c-6.682 0-12.1-5.418-12.1-12.1V12.1Zm12.1-.712H187.9c.393 0 .712.319.712.712v18.505a.712.712 0 0 1-.712.712h-18.505a.712.712 0 0 1-.712-.712V12.1c0-.393.319-.712.712-.712Z",
|
|
2122
|
-
clipRule: "evenodd"
|
|
2123
|
-
}
|
|
2124
|
-
),
|
|
2125
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2126
|
-
"path",
|
|
2127
|
-
{
|
|
2128
|
-
fill: "url(#a)",
|
|
2129
|
-
fillRule: "evenodd",
|
|
2130
|
-
d: "M12.1 157.295c-6.683 0-12.1 5.418-12.1 12.1V187.9c0 6.683 5.417 12.1 12.1 12.1h18.505c6.682 0 12.1-5.417 12.1-12.1v-18.505c0-6.682-5.418-12.1-12.1-12.1H12.1Zm19.217 12.1a.712.712 0 0 0-.712-.712H12.1a.712.712 0 0 0-.712.712V187.9c0 .393.319.712.712.712h18.505a.712.712 0 0 0 .712-.712v-18.505Z",
|
|
2131
|
-
clipRule: "evenodd"
|
|
2132
|
-
}
|
|
2133
|
-
),
|
|
2134
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2135
|
-
"path",
|
|
2136
|
-
{
|
|
2137
|
-
fill: "url(#a)",
|
|
2138
|
-
d: "M6.05 89.68A6.05 6.05 0 0 0 0 95.73v9.252a6.05 6.05 0 0 0 6.05 6.05h9.253a6.05 6.05 0 0 0 6.05-6.05V95.73c0-.678-.112-1.33-.318-1.94.445.105.908.16 1.385.16h27.758a6.05 6.05 0 0 0 6.05-6.05v-9.252a6.05 6.05 0 0 0-6.05-6.05H22.42a6.05 6.05 0 0 0-6.05 6.05V87.9c0 .678.112 1.33.317 1.939a6.065 6.065 0 0 0-1.385-.16H6.05Z"
|
|
2139
|
-
}
|
|
2140
|
-
),
|
|
2141
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2142
|
-
"path",
|
|
2143
|
-
{
|
|
2144
|
-
fill: "url(#a)",
|
|
2145
|
-
d: "M108.185 48.754a6.05 6.05 0 0 1 6.05-6.05h9.253a6.05 6.05 0 0 1 6.049 6.05v9.253a6.05 6.05 0 0 1-6.049 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.253Z"
|
|
2146
|
-
}
|
|
2147
|
-
),
|
|
2148
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2149
|
-
"path",
|
|
2150
|
-
{
|
|
2151
|
-
fill: "url(#a)",
|
|
2152
|
-
d: "M67.616 184.698a6.05 6.05 0 0 1 6.05-6.05h9.252c.678 0 1.33.111 1.939.317a6.064 6.064 0 0 1-.16-1.385v-9.253a6.05 6.05 0 0 1 6.05-6.049H100a6.05 6.05 0 0 1 6.05 6.049v9.253a6.05 6.05 0 0 1-6.05 6.05h-9.253c-.678 0-1.33-.112-1.938-.317.104.444.159.908.159 1.385v9.252a6.05 6.05 0 0 1-6.05 6.05h-9.253a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"
|
|
2153
|
-
}
|
|
2154
|
-
),
|
|
2155
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2156
|
-
"path",
|
|
2157
|
-
{
|
|
2158
|
-
fill: "url(#a)",
|
|
2159
|
-
d: "M145.907 64.413a6.05 6.05 0 0 1 6.05-6.05h41.993a6.05 6.05 0 0 1 6.05 6.05v9.252a6.05 6.05 0 0 1-6.05 6.05h-41.993a6.05 6.05 0 0 1-6.05-6.05v-9.252Z"
|
|
2160
|
-
}
|
|
2161
|
-
),
|
|
2162
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2163
|
-
"path",
|
|
2164
|
-
{
|
|
2165
|
-
fill: "url(#a)",
|
|
2166
|
-
d: "M95.018 0a6.05 6.05 0 0 0-6.05 6.05v17.082a6.05 6.05 0 0 0 6.05 6.05h9.252a6.05 6.05 0 0 0 6.05-6.05V6.05A6.05 6.05 0 0 0 104.27 0h-9.252Z"
|
|
2167
|
-
}
|
|
2168
|
-
),
|
|
2169
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("linearGradient", { id: "a", x1: "0", x2: "200", y1: "0", y2: "200", gradientUnits: "userSpaceOnUse", children: [
|
|
2170
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("stop", { offset: ".37", stopColor: "#fff", stopOpacity: "0" }),
|
|
2171
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("stop", { offset: ".5", stopColor: "#fff", stopOpacity: ".85" }),
|
|
2172
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("stop", { offset: ".63", stopColor: "#fff", stopOpacity: "0" })
|
|
2173
|
-
] }) })
|
|
2174
|
-
] });
|
|
2175
|
-
var QRPlaceholderIcon_default = QRPlaceholderIcon;
|
|
2176
|
-
|
|
2177
|
-
// src/components/IDKitWidget/States/WorldID/QRState.tsx
|
|
2178
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2179
|
-
var QRState = ({ qrData, showQR, setShowQR }) => {
|
|
2180
|
-
const [copiedLink, setCopiedLink] = (0, import_react6.useState)(false);
|
|
2181
|
-
const copyLink = (0, import_react6.useCallback)(() => {
|
|
2182
|
-
(0, import_copy_to_clipboard.default)(qrData ?? "");
|
|
2183
|
-
setCopiedLink(true);
|
|
2184
|
-
setTimeout(() => setCopiedLink(false), 2e3);
|
|
2185
|
-
}, [qrData]);
|
|
2186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
2187
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2188
|
-
"a",
|
|
2189
|
-
{
|
|
2190
|
-
href: qrData ?? void 0,
|
|
2191
|
-
className: "flex w-full items-center space-x-2 rounded-2xl border border-transparent bg-0d151d p-4 font-medium text-white shadow-sm dark:bg-white dark:text-0d151d",
|
|
2192
|
-
children: [
|
|
2193
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorldcoinIcon_default, { className: "size-5" }),
|
|
2194
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex-1 text-center", children: __("Open World App") })
|
|
2195
|
-
]
|
|
2196
|
-
}
|
|
2197
|
-
) }),
|
|
2198
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: clsx_default("hidden md:block xl:hidden", { "mb-10 space-y-4": !showQR }), children: [
|
|
2199
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2200
|
-
"a",
|
|
2201
|
-
{
|
|
2202
|
-
href: qrData ?? void 0,
|
|
2203
|
-
className: clsx_default(
|
|
2204
|
-
"flex w-full items-center space-x-2 rounded-2xl border border-transparent p-4 font-medium shadow-sm",
|
|
2205
|
-
"bg-0d151d text-white dark:bg-white dark:text-0d151d",
|
|
2206
|
-
{ hidden: showQR }
|
|
2207
|
-
),
|
|
2208
|
-
children: [
|
|
2209
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WorldcoinIcon_default, { className: "size-5" }),
|
|
2210
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex-1 text-center", children: __("Open World App") })
|
|
2211
|
-
]
|
|
2212
|
-
}
|
|
2213
|
-
),
|
|
2214
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: clsx_default("mb-3 space-y-4", { hidden: showQR }), children: [
|
|
2215
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
2216
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("hr", { className: "flex-1" }),
|
|
2217
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-xs font-medium text-9ba3ae", children: "or" }),
|
|
2218
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("hr", { className: "flex-1" })
|
|
2219
|
-
] }),
|
|
2220
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2221
|
-
import_framer_motion.motion.button,
|
|
2222
|
-
{
|
|
2223
|
-
className: "w-full rounded-2xl border border-ebecef p-4 text-lg font-medium text-3c424b",
|
|
2224
|
-
onClick: () => setShowQR((state) => !state),
|
|
2225
|
-
children: __("Display QR Code")
|
|
2226
|
-
}
|
|
2227
|
-
)
|
|
2228
|
-
] })
|
|
2229
|
-
] }),
|
|
2230
|
-
showQR && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "hidden md:block xl:hidden", children: [
|
|
2231
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2232
|
-
import_framer_motion.motion.button,
|
|
2233
|
-
{
|
|
2234
|
-
className: "w-full rounded-2xl border border-ebecef p-4 text-lg font-medium text-3c424b",
|
|
2235
|
-
onClick: () => setShowQR(false),
|
|
2236
|
-
children: __("Hide QR Code")
|
|
2237
|
-
}
|
|
2238
|
-
) }),
|
|
2239
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative inline-flex items-center justify-center rounded-2xl border border-f1f5f8 p-3 dark:border-f1f5f8/10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "text-29343f dark:text-white", children: qrData ? (
|
|
2240
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2241
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { onClick: copyLink, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(QRCode_default, { data: qrData, size: 200 }) })
|
|
2242
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex size-[200px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(QRPlaceholderIcon_default, { className: "size-[200px] animate-pulse" }) }) }) }),
|
|
2243
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_framer_motion.AnimatePresence, { children: copiedLink && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2244
|
-
import_framer_motion.motion.div,
|
|
2245
|
-
{
|
|
2246
|
-
className: "text-center text-sm text-9eafc0",
|
|
2247
|
-
initial: "hidden",
|
|
2248
|
-
animate: "visible",
|
|
2249
|
-
exit: "exit",
|
|
2250
|
-
variants: {
|
|
2251
|
-
hidden: { opacity: 0, height: 0, marginTop: 0 },
|
|
2252
|
-
visible: {
|
|
2253
|
-
opacity: 1,
|
|
2254
|
-
height: "auto",
|
|
2255
|
-
marginTop: 8,
|
|
2256
|
-
transition: {
|
|
2257
|
-
duration: 0.25,
|
|
2258
|
-
opacity: { delay: 0.05, duration: 0.2 },
|
|
2259
|
-
ease: "easeInOut"
|
|
2260
|
-
}
|
|
2261
|
-
},
|
|
2262
|
-
exit: {
|
|
2263
|
-
opacity: 0,
|
|
2264
|
-
height: 0,
|
|
2265
|
-
marginTop: 0,
|
|
2266
|
-
transition: {
|
|
2267
|
-
duration: 0.4,
|
|
2268
|
-
delay: 0.1,
|
|
2269
|
-
opacity: { duration: 0.25, delay: 0 },
|
|
2270
|
-
ease: "easeInOut"
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2273
|
-
},
|
|
2274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "rounded-lg border border-f1f5f8 px-2 py-1 text-sm", children: __("QR Code copied") })
|
|
2275
|
-
},
|
|
2276
|
-
"copied"
|
|
2277
|
-
) })
|
|
2278
|
-
] }),
|
|
2279
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "hidden xl:block", children: [
|
|
2280
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_framer_motion.AnimatePresence, { children: copiedLink && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2281
|
-
import_framer_motion.motion.div,
|
|
2282
|
-
{
|
|
2283
|
-
className: "text-sm text-9eafc0",
|
|
2284
|
-
initial: "hidden",
|
|
2285
|
-
animate: "visible",
|
|
2286
|
-
exit: "exit",
|
|
2287
|
-
variants: {
|
|
2288
|
-
hidden: { opacity: 0, height: 0, marginTop: 0, y: 0 },
|
|
2289
|
-
visible: {
|
|
2290
|
-
opacity: 1,
|
|
2291
|
-
height: "auto",
|
|
2292
|
-
marginTop: 8,
|
|
2293
|
-
y: -20,
|
|
2294
|
-
transition: {
|
|
2295
|
-
duration: 0.25,
|
|
2296
|
-
opacity: { delay: 0.05, duration: 0.2 },
|
|
2297
|
-
ease: "easeInOut"
|
|
2298
|
-
}
|
|
2299
|
-
},
|
|
2300
|
-
exit: {
|
|
2301
|
-
opacity: 0,
|
|
2302
|
-
height: 0,
|
|
2303
|
-
marginTop: 0,
|
|
2304
|
-
y: 0,
|
|
2305
|
-
transition: {
|
|
2306
|
-
duration: 0.4,
|
|
2307
|
-
delay: 0.1,
|
|
2308
|
-
opacity: { duration: 0.25, delay: 0 },
|
|
2309
|
-
ease: "easeInOut"
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
},
|
|
2313
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "rounded-lg border border-f1f5f8 px-2 py-1 text-sm", children: __("QR Code copied") })
|
|
2314
|
-
},
|
|
2315
|
-
"copied"
|
|
2316
|
-
) }),
|
|
2317
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative inline-flex items-center justify-center rounded-2xl border border-f1f5f8 p-3 dark:border-f1f5f8/10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "text-29343f dark:text-white", children: qrData ? (
|
|
2318
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2319
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { onClick: copyLink, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(QRCode_default, { data: qrData, size: 200 }) })
|
|
2320
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex size-[200px] items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(QRPlaceholderIcon_default, { className: "size-[200px] animate-pulse" }) }) }) })
|
|
2321
|
-
] })
|
|
2322
|
-
] });
|
|
2323
|
-
};
|
|
2324
|
-
var QRState_default = QRState;
|
|
2325
|
-
|
|
2326
|
-
// src/components/IDKitWidget/States/WorldIDState.tsx
|
|
2327
|
-
var import_shallow2 = require("zustand/shallow");
|
|
2328
|
-
var import_react8 = require("react");
|
|
2329
|
-
|
|
2330
|
-
// src/services/wld-bridge.ts
|
|
2331
|
-
var import_react7 = require("react");
|
|
2332
|
-
var import_idkit_core3 = require("@worldcoin/idkit-core");
|
|
2333
|
-
var useWorldBridge = (app_id, action, signal, bridge_url, verification_level, action_description, partner) => {
|
|
2334
|
-
const ref_verification_level = (0, import_react7.useRef)(verification_level);
|
|
2335
|
-
const { reset, result, connectorURI, createClient, pollForUpdates, verificationState, errorCode } = (0, import_idkit_core3.useWorldBridgeStore)();
|
|
2336
|
-
(0, import_react7.useEffect)(() => {
|
|
2337
|
-
if (!connectorURI) {
|
|
2338
|
-
void createClient({
|
|
2339
|
-
app_id,
|
|
2340
|
-
action,
|
|
2341
|
-
signal,
|
|
2342
|
-
bridge_url,
|
|
2343
|
-
action_description,
|
|
2344
|
-
verification_level: ref_verification_level.current,
|
|
2345
|
-
partner
|
|
2346
|
-
});
|
|
2347
|
-
}
|
|
2348
|
-
}, [
|
|
2349
|
-
app_id,
|
|
2350
|
-
action,
|
|
2351
|
-
signal,
|
|
2352
|
-
action_description,
|
|
2353
|
-
createClient,
|
|
2354
|
-
ref_verification_level,
|
|
2355
|
-
bridge_url,
|
|
2356
|
-
connectorURI,
|
|
2357
|
-
partner
|
|
2358
|
-
]);
|
|
2359
|
-
(0, import_react7.useEffect)(() => {
|
|
2360
|
-
if (!connectorURI || result || errorCode) return;
|
|
2361
|
-
const interval = setInterval(() => void pollForUpdates(), 3e3);
|
|
2362
|
-
return () => clearInterval(interval);
|
|
2363
|
-
}, [connectorURI, pollForUpdates, errorCode, result]);
|
|
2364
|
-
return { connectorURI, reset, result, verificationState, errorCode };
|
|
2365
|
-
};
|
|
2366
|
-
|
|
2367
|
-
// src/components/Icons/LoadingIcon.tsx
|
|
2368
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2369
|
-
var LoadingIcon = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2370
|
-
"svg",
|
|
2371
|
-
{
|
|
2372
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2373
|
-
fill: "none",
|
|
2374
|
-
viewBox: "0 0 24 24",
|
|
2375
|
-
className: `animate-spin motion-reduce:animate-[spin_1.5s_linear_infinite] ${className}`,
|
|
2376
|
-
...props,
|
|
2377
|
-
children: [
|
|
2378
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("circle", { cx: "12", cy: "12", r: "10.75", stroke: "#191C20", strokeOpacity: ".16", strokeWidth: "2.5" }),
|
|
2379
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2380
|
-
"path",
|
|
2381
|
-
{
|
|
2382
|
-
fill: "#191C20",
|
|
2383
|
-
d: "M17.28 2.633c.338-.6.127-1.368-.505-1.642A12 12 0 0 0 7.459.892c-.638.261-.864 1.024-.539 1.632.326.607 1.08.827 1.725.584a9.504 9.504 0 0 1 6.897.073c.64.257 1.399.053 1.737-.548Z"
|
|
2384
|
-
}
|
|
2385
|
-
)
|
|
2386
|
-
]
|
|
2387
|
-
}
|
|
2388
|
-
);
|
|
2389
|
-
var LoadingIcon_default = LoadingIcon;
|
|
2390
|
-
|
|
2391
|
-
// src/components/IDKitWidget/States/WorldIDState.tsx
|
|
2392
|
-
var import_idkit_core4 = require("@worldcoin/idkit-core");
|
|
2393
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2394
|
-
var getOptions = (store) => ({
|
|
2395
|
-
signal: store.signal,
|
|
2396
|
-
app_id: store.app_id,
|
|
2397
|
-
action: store.action,
|
|
2398
|
-
setStage: store.setStage,
|
|
2399
|
-
bridge_url: store.bridge_url,
|
|
2400
|
-
handleVerify: store.handleVerify,
|
|
2401
|
-
setErrorState: store.setErrorState,
|
|
2402
|
-
verification_level: store.verification_level,
|
|
2403
|
-
action_description: store.action_description,
|
|
2404
|
-
partner: store.partner
|
|
2405
|
-
});
|
|
2406
|
-
var WorldIDState = (props) => {
|
|
2407
|
-
const media = useMedia_default();
|
|
2408
|
-
const [showQR, setShowQR] = (0, import_react8.useState)(false);
|
|
2409
|
-
const {
|
|
2410
|
-
app_id,
|
|
2411
|
-
action,
|
|
2412
|
-
signal,
|
|
2413
|
-
setStage,
|
|
2414
|
-
handleVerify,
|
|
2415
|
-
bridge_url,
|
|
2416
|
-
action_description,
|
|
2417
|
-
verification_level,
|
|
2418
|
-
setErrorState,
|
|
2419
|
-
partner
|
|
2420
|
-
} = idkit_default(getOptions, import_shallow2.shallow);
|
|
2421
|
-
const { connectorURI, reset, errorCode, result, verificationState } = useWorldBridge(
|
|
2422
|
-
app_id,
|
|
2423
|
-
action,
|
|
2424
|
-
signal,
|
|
2425
|
-
bridge_url,
|
|
2426
|
-
verification_level,
|
|
2427
|
-
action_description,
|
|
2428
|
-
partner
|
|
2429
|
-
);
|
|
2430
|
-
(0, import_react8.useEffect)(() => reset, [reset]);
|
|
2431
|
-
(0, import_react8.useEffect)(() => {
|
|
2432
|
-
if (verificationState === import_idkit_core4.VerificationState.Failed) {
|
|
2433
|
-
setStage("ERROR" /* ERROR */);
|
|
2434
|
-
setErrorState({ code: errorCode ?? import_idkit_core4.AppErrorCodes.GenericError });
|
|
2435
|
-
}
|
|
2436
|
-
if (result) {
|
|
2437
|
-
if (verification_level === import_idkit_core4.VerificationLevel.Orb && result.verification_level === import_idkit_core4.VerificationLevel.Device) {
|
|
2438
|
-
console.error("Credential type received from wallet does not match configured credential_types.");
|
|
2439
|
-
setStage("ERROR" /* ERROR */);
|
|
2440
|
-
setErrorState({ code: import_idkit_core4.AppErrorCodes.CredentialUnavailable });
|
|
2441
|
-
return;
|
|
2442
|
-
}
|
|
2443
|
-
return handleVerify(result);
|
|
2444
|
-
}
|
|
2445
|
-
}, [result, handleVerify, verificationState, setStage, errorCode, setErrorState, verification_level]);
|
|
2446
|
-
const { show_modal } = props;
|
|
2447
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2448
|
-
"div",
|
|
2449
|
-
{
|
|
2450
|
-
className: clsx_default(
|
|
2451
|
-
"flex flex-col items-center text-center",
|
|
2452
|
-
show_modal ? showQR ? "-mt-6 space-y-5 " : "-mt-6 space-y-10 " : ""
|
|
2453
|
-
),
|
|
2454
|
-
children: [
|
|
2455
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: clsx_default(!show_modal ? "hidden" : ""), children: [
|
|
2456
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mb-4 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex size-14 items-center justify-center rounded-full border-[1.2px] border-solid border-[#EBECEF]", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WorldcoinIcon_default, { className: "size-8 text-0d151d dark:text-white" }) }) }),
|
|
2457
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-2xl font-semibold text-gray-900 dark:text-white", children: __("Connect your World ID") }),
|
|
2458
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: clsx_default("mt-3 text-657080 dark:text-9eafc0 md:mt-2", { hidden: media === "mobile" }), children: __("Use phone camera to scan the QR code") }),
|
|
2459
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: clsx_default("mt-3 text-657080 dark:text-9eafc0 md:mt-2", { hidden: media !== "mobile" }), children: __("You will be redirected to the app, please return to this page once you're done") })
|
|
2460
|
-
] }),
|
|
2461
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative w-full", children: [
|
|
2462
|
-
verificationState === import_idkit_core4.VerificationState.WaitingForApp && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center space-y-6", children: [
|
|
2463
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LoadingIcon_default, { className: "size-6" }),
|
|
2464
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
|
|
2465
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "font-medium text-657080", children: __("Connecting...") }),
|
|
2466
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm font-light text-657080", children: __("Please continue in app") })
|
|
2467
|
-
] })
|
|
2468
|
-
] }),
|
|
2469
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2470
|
-
"div",
|
|
2471
|
-
{
|
|
2472
|
-
className: clsx_default(
|
|
2473
|
-
"transition duration-500 ease-in-out",
|
|
2474
|
-
verificationState === import_idkit_core4.VerificationState.WaitingForApp && "opacity-40 blur-lg"
|
|
2475
|
-
),
|
|
2476
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mx-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(QRState_default, { showQR, setShowQR, qrData: connectorURI }) })
|
|
2477
|
-
}
|
|
2478
|
-
)
|
|
2479
|
-
] })
|
|
2480
|
-
]
|
|
2481
|
-
}
|
|
2482
|
-
);
|
|
2483
|
-
};
|
|
2484
|
-
var WorldIDState_default = WorldIDState;
|
|
2485
|
-
|
|
2486
|
-
// src/components/IDKitWidget/BaseWidget.tsx
|
|
2487
|
-
var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2488
|
-
var import_react9 = require("react");
|
|
2489
|
-
var import_framer_motion2 = require("framer-motion");
|
|
2490
|
-
|
|
2491
|
-
// src/components/IDKitWidget/States/HostAppVerificationState.tsx
|
|
2492
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2493
|
-
var HostAppVerificationState = () => {
|
|
2494
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-6", children: [
|
|
2495
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(LoadingIcon_default, { className: "size-24" }) }),
|
|
2496
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mt-4 text-70868f", children: __("Transmitting verification to host app. Please wait...") })
|
|
2497
|
-
] });
|
|
2498
|
-
};
|
|
2499
|
-
var HostAppVerificationState_default = HostAppVerificationState;
|
|
2500
|
-
|
|
2501
|
-
// src/components/IDKitWidget/BaseWidget.tsx
|
|
2502
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2503
|
-
var getParams2 = ({ open, processing, onOpenChange, stage, setStage, setOptions, setErrorState }) => ({
|
|
2504
|
-
stage,
|
|
2505
|
-
setStage,
|
|
2506
|
-
processing,
|
|
2507
|
-
setOptions,
|
|
2508
|
-
setErrorState,
|
|
2509
|
-
isOpen: open,
|
|
2510
|
-
onOpenChange
|
|
2511
|
-
});
|
|
2512
|
-
var IDKitWidget = ({
|
|
2513
|
-
children,
|
|
2514
|
-
show_modal = true,
|
|
2515
|
-
container_id,
|
|
2516
|
-
disable_default_modal_behavior = false,
|
|
2517
|
-
language,
|
|
2518
|
-
...config
|
|
2519
|
-
}) => {
|
|
2520
|
-
const media = useMedia_default();
|
|
2521
|
-
const { isOpen, onOpenChange, stage, setStage, setOptions, setErrorState } = idkit_default(getParams2, import_shallow3.shallow);
|
|
2522
|
-
(0, import_react9.useEffect)(() => {
|
|
2523
|
-
if (language) {
|
|
2524
|
-
setLocalizationConfig({ language });
|
|
2525
|
-
}
|
|
2526
|
-
}, [language]);
|
|
2527
|
-
(0, import_react9.useEffect)(() => {
|
|
2528
|
-
if (config.action === "") {
|
|
2529
|
-
throw new Error(__("Action cannot be an empty string."));
|
|
2530
|
-
}
|
|
2531
|
-
setOptions(config, "props" /* PROPS */);
|
|
2532
|
-
}, [config, setOptions]);
|
|
2533
|
-
const StageContent = (0, import_react9.useMemo)(() => {
|
|
2534
|
-
switch (stage) {
|
|
2535
|
-
case "WORLD_ID" /* WORLD_ID */:
|
|
2536
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(WorldIDState_default, { show_modal });
|
|
2537
|
-
case "SUCCESS" /* SUCCESS */:
|
|
2538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SuccessState_default, {});
|
|
2539
|
-
case "ERROR" /* ERROR */:
|
|
2540
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorState_default, {});
|
|
2541
|
-
case "HOST_APP_VERIFICATION" /* HOST_APP_VERIFICATION */:
|
|
2542
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(HostAppVerificationState_default, {});
|
|
2543
|
-
default:
|
|
2544
|
-
throw new Error(__("Invalid IDKitStage :stage.", { s: String(stage) }));
|
|
2545
|
-
}
|
|
2546
|
-
}, [stage, show_modal]);
|
|
2547
|
-
const widgetContent = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ShadowHost, { mode: "open", id: "idkit-widget", children: [
|
|
2548
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Styles_default, {}),
|
|
2549
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Toast.Provider, { children: [
|
|
2550
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Toast.Viewport, { className: "flex justify-center" }),
|
|
2551
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2552
|
-
"div",
|
|
2553
|
-
{
|
|
2554
|
-
id: "widget-content-inline",
|
|
2555
|
-
className: "relative flex flex-col bg-white p-4 focus:outline-none dark:bg-0d151d",
|
|
2556
|
-
children: StageContent
|
|
2557
|
-
}
|
|
2558
|
-
)
|
|
2559
|
-
] })
|
|
2560
|
-
] });
|
|
2561
|
-
if (!show_modal && container_id) {
|
|
2562
|
-
const containerElement = document.getElementById(container_id);
|
|
2563
|
-
if (containerElement) {
|
|
2564
|
-
return (0, import_react_dom2.createPortal)(widgetContent, containerElement);
|
|
2565
|
-
}
|
|
2566
|
-
console.warn(`Container element with id "${container_id}" not found. Rendering widget inline.`);
|
|
2567
|
-
}
|
|
2568
|
-
const avoidDefaultDomBehavior = (e) => {
|
|
2569
|
-
if (disable_default_modal_behavior) {
|
|
2570
|
-
e.preventDefault();
|
|
2571
|
-
}
|
|
2572
|
-
};
|
|
2573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Dialog.Root, { open: isOpen, onOpenChange, children: [
|
|
2574
|
-
children?.({ open: () => onOpenChange(true) }),
|
|
2575
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Portal, { forceMount: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_framer_motion2.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ShadowHost, { mode: "open", id: "idkit-widget", children: [
|
|
2576
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Styles_default, {}),
|
|
2577
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { id: "modal", className: "fixed z-[9999] font-sans", children: [
|
|
2578
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2579
|
-
import_framer_motion2.motion.div,
|
|
2580
|
-
{
|
|
2581
|
-
initial: { opacity: 0 },
|
|
2582
|
-
animate: { opacity: 1 },
|
|
2583
|
-
exit: { opacity: 0 },
|
|
2584
|
-
className: "fixed inset-0 bg-black/50 backdrop-blur-lg"
|
|
2585
|
-
}
|
|
2586
|
-
) }),
|
|
2587
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fixed inset-0 z-[9999] overflow-y-hidden md:overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex min-h-full items-end justify-center text-center md:items-center md:p-4", children: [
|
|
2588
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Title, {}),
|
|
2589
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2590
|
-
Dialog.Content,
|
|
2591
|
-
{
|
|
2592
|
-
asChild: true,
|
|
2593
|
-
onPointerDownOutside: avoidDefaultDomBehavior,
|
|
2594
|
-
onInteractOutside: avoidDefaultDomBehavior,
|
|
2595
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2596
|
-
import_framer_motion2.motion.div,
|
|
2597
|
-
{
|
|
2598
|
-
layout: media == "mobile" ? "position" : true,
|
|
2599
|
-
exit: media == "mobile" ? "initMob" : "init",
|
|
2600
|
-
initial: media == "mobile" ? "initMob" : "init",
|
|
2601
|
-
animate: media == "mobile" ? "animateMob" : "animate",
|
|
2602
|
-
variants: {
|
|
2603
|
-
init: { opacity: 0, scale: 0.9 },
|
|
2604
|
-
initMob: { translateY: "100%" },
|
|
2605
|
-
animate: { opacity: 1, scale: 1 },
|
|
2606
|
-
animateMob: { translateY: 0 }
|
|
2607
|
-
},
|
|
2608
|
-
transition: { layout: { duration: 0.15 } },
|
|
2609
|
-
className: "relative z-50 flex min-h-screen w-full flex-col bg-white pt-6 shadow focus:outline-none focus-visible:ring focus-visible:ring-purple-500/75 dark:bg-0d151d md:min-h-[35rem] md:max-w-md md:rounded-[24px]",
|
|
2610
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Toast.Provider, { children: [
|
|
2611
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Toast.Viewport, { className: "flex justify-center" }),
|
|
2612
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "mx-6 flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Close, { className: "flex size-8 items-center justify-center rounded-full border-[1.2px] border-solid border-[#EBECEF] text-black dark:text-white", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(XMarkIcon_default, { className: "size-4" }) }) }),
|
|
2613
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative mx-6 mb-6 flex flex-1 flex-col items-center justify-center", children: StageContent }),
|
|
2614
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center border-t border-f5f5f7 p-7 md:rounded-b-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2615
|
-
"a",
|
|
2616
|
-
{
|
|
2617
|
-
href: "https://developer.worldcoin.org/privacy-statement",
|
|
2618
|
-
target: "_blank",
|
|
2619
|
-
rel: "noreferrer",
|
|
2620
|
-
className: "text-sm text-657080 hover:underline",
|
|
2621
|
-
children: __("Terms & Privacy")
|
|
2622
|
-
}
|
|
2623
|
-
) })
|
|
2624
|
-
] })
|
|
2625
|
-
}
|
|
2626
|
-
)
|
|
2627
|
-
}
|
|
2628
|
-
)
|
|
2629
|
-
] }) })
|
|
2630
|
-
] })
|
|
2631
|
-
] }) }) }) })
|
|
2632
|
-
] });
|
|
2633
|
-
};
|
|
2634
|
-
var BaseWidget_default = IDKitWidget;
|
|
2635
|
-
|
|
2636
|
-
// src/components/IDKitWidget/index.tsx
|
|
2637
|
-
var IDKitWidget_default = (0, import_react10.memo)(BaseWidget_default);
|
|
2638
|
-
|
|
2639
|
-
// src/index.ts
|
|
2640
|
-
var import_hashing = require("@worldcoin/idkit-core/hashing");
|
|
2641
|
-
var import_backend = require("@worldcoin/idkit-core/backend");
|
|
2642
|
-
var import_idkit_core7 = require("@worldcoin/idkit-core");
|
|
2643
|
-
|
|
2644
|
-
// src/hooks/useSession.ts
|
|
2645
|
-
var import_react11 = require("react");
|
|
2646
|
-
var import_shallow4 = require("zustand/react/shallow");
|
|
2647
|
-
var import_idkit_core5 = require("@worldcoin/idkit-core");
|
|
2648
|
-
var import_idkit_core6 = require("@worldcoin/idkit-core");
|
|
2649
|
-
var TERMINAL_STATES = [import_idkit_core5.VerificationState.Confirmed, import_idkit_core5.VerificationState.Failed];
|
|
2650
|
-
function useSession(config) {
|
|
2651
|
-
const { reset, result, connectorURI, createClient, pollForUpdates, verificationState, errorCode } = (0, import_idkit_core6.useWorldBridgeStore)(
|
|
2652
|
-
(0, import_shallow4.useShallow)((state) => ({
|
|
2653
|
-
reset: state.reset,
|
|
2654
|
-
result: state.result,
|
|
2655
|
-
connectorURI: state.connectorURI,
|
|
2656
|
-
createClient: state.createClient,
|
|
2657
|
-
pollForUpdates: state.pollForUpdates,
|
|
2658
|
-
verificationState: state.verificationState,
|
|
2659
|
-
errorCode: state.errorCode
|
|
2660
|
-
}))
|
|
2661
|
-
);
|
|
2662
|
-
(0, import_react11.useEffect)(() => {
|
|
2663
|
-
if (verificationState === import_idkit_core5.VerificationState.PreparingClient && !connectorURI) {
|
|
2664
|
-
void createClient(config);
|
|
2665
|
-
}
|
|
2666
|
-
}, [verificationState, connectorURI, createClient, config]);
|
|
2667
|
-
(0, import_react11.useEffect)(() => {
|
|
2668
|
-
if (TERMINAL_STATES.includes(verificationState)) return;
|
|
2669
|
-
const interval = setInterval(() => {
|
|
2670
|
-
void pollForUpdates();
|
|
2671
|
-
}, 3e3);
|
|
2672
|
-
return () => {
|
|
2673
|
-
clearInterval(interval);
|
|
2674
|
-
};
|
|
2675
|
-
}, [verificationState, pollForUpdates]);
|
|
2676
|
-
return {
|
|
2677
|
-
status: verificationState,
|
|
2678
|
-
sessionURI: connectorURI,
|
|
2679
|
-
result,
|
|
2680
|
-
errorCode,
|
|
2681
|
-
reset
|
|
2682
|
-
};
|
|
2683
|
-
}
|
|
2684
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
2685
|
-
0 && (module.exports = {
|
|
2686
|
-
IDKitWidget,
|
|
2687
|
-
VerificationLevel,
|
|
2688
|
-
VerificationState,
|
|
2689
|
-
getCurrentLanguage,
|
|
2690
|
-
getLocalizationConfig,
|
|
2691
|
-
getSupportedLanguages,
|
|
2692
|
-
setLocalizationConfig,
|
|
2693
|
-
solidityEncode,
|
|
2694
|
-
useIDKit,
|
|
2695
|
-
useSession,
|
|
2696
|
-
verifyCloudProof
|
|
2697
|
-
});
|