PageSourceSearch

https://hunter.io/assets/Api-CdVF3Ulm.js

js hunter.io collected 2026-09-24 07:53:02 UTC 8,869 bytes, 280 lines download raw bytes

1(function() {
2	try {
3		var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
4		e.SENTRY_RELEASE = { id: "b96dc26" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c1dbf060-f2fa-4101-81d1-6cb2523cea2c", e._sentryDebugIdIdentifier = "sentry-dbid-c1dbf060-f2fa-4101-81d1-6cb2523cea2c");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { As as Input, Xt as init_label, Yt as Label, it as AlertContent, js as init_input, lt as init_alert, nt as Alert, st as AlertIcon } from "./controllers-jdPQjaCB.js";
11import { i as require_compiler_runtime, o as copyToClipboard, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
12import { t as require_react } from "./react-CrLPhuc5.js";
13import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
14import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
15import { n as init_hint, t as Hint } from "./hint-D06PdzJb.js";
16import { a as init_dist, s as usePage } from "./dist-ZlUHm0R7.js";
17import { n as init_OnboardingLayout, t as OnboardingLayout } from "./OnboardingLayout-BnUCTf-h.js";
18import { i as init_AccountSetup, n as init_OnboardingHeader, r as AccountSetupHeading, t as OnboardingHeader } from "./OnboardingHeader-C7IoGNdr.js";
19import { n as init_i18n, r as t } from "./i18n-D_KmXEqY.js";
20//#region app/frontend/pages/Onboarding/Api.tsx
21/**
22* /onboarding/api — the Inertia port of `Onboarding::Intents::ApiComponent`.
23*
24* The legacy page rendered the token twice — a masked input and a hidden real one, both
25* with `id="api_intent_key"` — and jQuery `.toggle()`d between them. Duplicate ids make
26* the `<label for>` ambiguous and give assistive tech two controls where there is one, so
27* this renders a single input whose value swaps on state (KTD9). The reveal and copy
28* controls are icon-only, hence the explicit `aria-label`s.
29*/
30function Api() {
31	const $ = (0, import_compiler_runtime.c)(43);
32	const { apiKey, maskedApiKey, showFreePlanNote, showDataPlatformCta, documentationPath, pricingPath, emailAddress, logoutPath } = usePage().props;
33	const [revealed, setRevealed] = (0, import_react.useState)(false);
34	let t0;
35	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
36		t0 = t("devise.registrations.new.api_intent.api_key.copy");
37		$[0] = t0;
38	} else t0 = $[0];
39	const copyLabel = t0;
40	let t1;
41	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
42		t1 = t("devise.registrations.new.api_intent.api_key.reveal");
43		$[1] = t1;
44	} else t1 = $[1];
45	const revealLabel = t1;
46	let t2;
47	if ($[2] !== emailAddress || $[3] !== logoutPath) {
48		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OnboardingHeader, {
49			emailAddress,
50			logoutPath
51		});
52		$[2] = emailAddress;
53		$[3] = logoutPath;
54		$[4] = t2;
55	} else t2 = $[4];
56	let t3;
57	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
58		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountSetupHeading, {
59			title: t("devise.registrations.new.api_intent.title"),
60			description: t("devise.registrations.new.api_intent.description")
61		});
62		$[5] = t3;
63	} else t3 = $[5];
64	let t4;
65	if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
66		t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Label, {
67			htmlFor: "api_intent_key",
68			children: t("devise.registrations.new.api_intent.api_key.label")
69		});
70		$[6] = t4;
71	} else t4 = $[6];
72	const t5 = revealed ? apiKey : maskedApiKey;
73	let t6;
74	if ($[7] !== t5) {
75		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Input, {
76			id: "api_intent_key",
77			type: "text",
78			readOnly: true,
79			fullWidth: true,
80			value: t5
81		});
82		$[7] = t5;
83		$[8] = t6;
84	} else t6 = $[8];
85	let t7;
86	if ($[9] !== apiKey) {
87		t7 = () => copyToClipboard(apiKey);
88		$[9] = apiKey;
89		$[10] = t7;
90	} else t7 = $[10];
91	let t8;
92	if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
93		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { icon: "copy" });
94		$[11] = t8;
95	} else t8 = $[11];
96	let t9;
97	if ($[12] !== t7) {
98		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
99			type: "button",
100			iconOnly: true,
101			size: "xs",
102			title: copyLabel,
103			"aria-label": copyLabel,
104			onClick: t7,
105			children: t8
106		});
107		$[12] = t7;
108		$[13] = t9;
109	} else t9 = $[13];
110	let t10;
111	let t11;
112	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
113		t10 = () => setRevealed(_temp);
114		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { icon: "eye" });
115		$[14] = t10;
116		$[15] = t11;
117	} else {
118		t10 = $[14];
119		t11 = $[15];
120	}
121	let t12;
122	if ($[16] !== revealed) {
123		t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
124			type: "button",
125			iconOnly: true,
126			size: "xs",
127			title: revealLabel,
128			"aria-label": revealLabel,
129			"aria-pressed": revealed,
130			onClick: t10,
131			children: t11
132		});
133		$[16] = revealed;
134		$[17] = t12;
135	} else t12 = $[17];
136	let t13;
137	if ($[18] !== t12 || $[19] !== t9) {
138		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
139			className: "h-field__append",
140			children: [t9, t12]
141		});
142		$[18] = t12;
143		$[19] = t9;
144		$[20] = t13;
145	} else t13 = $[20];
146	let t14;
147	if ($[21] !== t13 || $[22] !== t6) {
148		t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
149			className: "h-field",
150			children: [t6, t13]
151		});
152		$[21] = t13;
153		$[22] = t6;
154		$[23] = t14;
155	} else t14 = $[23];
156	let t15;
157	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
158		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hint, {
159			className: "mt-1",
160			children: t("devise.registrations.new.api_intent.api_key.hint")
161		});
162		$[24] = t15;
163	} else t15 = $[24];
164	let t16;
165	if ($[25] !== showFreePlanNote) {
166		t16 = showFreePlanNote && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Alert, {
167			variant: "info",
168			size: "small",
169			className: "align-items-center mt-2 mb-3",
170			children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
171				icon: "info-circle",
172				className: "h-alert__icon"
173			}) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertContent, {
174				className: "text-xs",
175				children: t("devise.registrations.new.api_intent.free_plan_note")
176			})]
177		});
178		$[25] = showFreePlanNote;
179		$[26] = t16;
180	} else t16 = $[26];
181	let t17;
182	if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
183		t17 = t("devise.registrations.new.api_intent.cta.documentation");
184		$[27] = t17;
185	} else t17 = $[27];
186	let t18;
187	if ($[28] !== documentationPath) {
188		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
189			asChild: true,
190			variant: "primary",
191			fullWidth: true,
192			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
193				href: documentationPath,
194				"data-turbo": "false",
195				children: t17
196			})
197		});
198		$[28] = documentationPath;
199		$[29] = t18;
200	} else t18 = $[29];
201	let t19;
202	if ($[30] !== pricingPath || $[31] !== showDataPlatformCta) {
203		t19 = showDataPlatformCta && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
204			asChild: true,
205			variant: "secondary",
206			fullWidth: true,
207			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
208				href: pricingPath,
209				"data-turbo": "false",
210				children: t("devise.registrations.new.api_intent.cta.pricing")
211			})
212		});
213		$[30] = pricingPath;
214		$[31] = showDataPlatformCta;
215		$[32] = t19;
216	} else t19 = $[32];
217	let t20;
218	if ($[33] !== t18 || $[34] !== t19) {
219		t20 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
220			className: "account-setup__actions",
221			children: [t18, t19]
222		});
223		$[33] = t18;
224		$[34] = t19;
225		$[35] = t20;
226	} else t20 = $[35];
227	let t21;
228	if ($[36] !== t14 || $[37] !== t16 || $[38] !== t20) {
229		t21 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
230			className: "account-setup",
231			children: [
232				t3,
233				t4,
234				t14,
235				t15,
236				t16,
237				t20
238			]
239		});
240		$[36] = t14;
241		$[37] = t16;
242		$[38] = t20;
243		$[39] = t21;
244	} else t21 = $[39];
245	let t22;
246	if ($[40] !== t2 || $[41] !== t21) {
247		t22 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, t21] });
248		$[40] = t2;
249		$[41] = t21;
250		$[42] = t22;
251	} else t22 = $[42];
252	return t22;
253}
254function _temp(previous) {
255	return !previous;
256}
257var import_compiler_runtime, import_react, import_jsx_runtime;
258function init_Api() {
259	return (init_Api = __esmMin((() => {
260		import_compiler_runtime = require_compiler_runtime();
261		import_react = require_react();
262		init_dist();
263		init_utils();
264		init_OnboardingLayout();
265		init_AccountSetup();
266		init_OnboardingHeader();
267		init_i18n();
268		init_alert();
269		init_button();
270		init_hint();
271		init_icon();
272		init_input();
273		init_label();
274		import_jsx_runtime = require_jsx_runtime();
275		Api.layout = (page) => (0, import_react.createElement)(OnboardingLayout, null, page);
276	})))();
277}
278//#endregion
279init_Api();
280export { Api as default };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.