PageSourceSearch

https://hunter.io/assets/Chatgpt-CAw0SRZ9.js

js hunter.io collected 2026-09-24 07:53:04 UTC 8,186 bytes, 261 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] = "e0db8e68-62ea-4e58-b794-36b0c176d08e", e._sentryDebugIdIdentifier = "sentry-dbid-e0db8e68-62ea-4e58-b794-36b0c176d08e");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { I as confetti_module_default, L as init_confetti_module } from "./controllers-jdPQjaCB.js";
11import { i as require_compiler_runtime, t as require_jsx_runtime } from "./jsx-runtime-CHSMGLHp.js";
12import { t as require_react } from "./react-CrLPhuc5.js";
13import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
14import { gt as useReducedMotion, ht as init_useReducedMotion } from "./turbo-mount-DM0tFk1M.js";
15import { a as init_dist, s as usePage } from "./dist-ZlUHm0R7.js";
16import { n as init_OnboardingLayout, t as OnboardingLayout } from "./OnboardingLayout-BnUCTf-h.js";
17import { n as init_HunterLogo, t as HunterLogo } from "./HunterLogo-DShWLR4k.js";
18import { n as init_i18n, r as t, t as escapeHtml } from "./i18n-D_KmXEqY.js";
19//#region app/frontend/pages/Onboarding/Chatgpt.tsx
20/**
21* /onboarding/chatgpt — the Inertia port of `onboarding/chatgpt/index.erb` (HUN-21673).
22*
23* The legacy page set `content_for :body_class, "oauth-authorization-page"` to borrow
24* the OAuth screen's overrides. The body-level part of that (the `.application-back`
25* margin reset, 5.4rem below 48em) is unreachable from React, so the controller sets
26* `@body_class` and the Inertia layout appends it. The grid/main geometry is also
27* carried by `OnboardingLayout`'s `oauth` variant, which stays correct on client-side
28* visits where a server-emitted body class would go stale.
29*/
30function Chatgpt() {
31	const $ = (0, import_compiler_runtime.c)(36);
32	const { rootPath, dashboardPath, connectorsUrl, checkmarkSrc, emailAddress, logoutPath } = usePage().props;
33	const canvasRef = (0, import_react.useRef)(null);
34	const played = (0, import_react.useRef)(false);
35	const reducedMotion = useReducedMotion();
36	let t0;
37	let t1;
38	if ($[0] !== reducedMotion) {
39		t0 = () => {
40			if (played.current) return;
41			played.current = true;
42			if (reducedMotion) return;
43			const canvas = canvasRef.current;
44			if (!canvas) return;
45			const shoot = confetti_module_default.create(canvas, { resize: true });
46			const endTime = Date.now() + CONFETTI_DURATION_SECONDS * 1e3;
47			const token = { canceled: false };
48			const loop = async () => {
49				while (Date.now() < endTime && !token.canceled) {
50					shoot({
51						particleCount: 6,
52						ticks: 160,
53						spread: 100,
54						origin: {
55							x: .5,
56							y: 0
57						}
58					});
59					await new Promise(_temp);
60				}
61			};
62			loop();
63			return () => {
64				token.canceled = true;
65				shoot.reset();
66			};
67		};
68		t1 = [reducedMotion];
69		$[0] = reducedMotion;
70		$[1] = t0;
71		$[2] = t1;
72	} else {
73		t0 = $[1];
74		t1 = $[2];
75	}
76	(0, import_react.useEffect)(t0, t1);
77	let t2;
78	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
79		t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HunterLogo, { className: "oauth-header__logo" });
80		$[3] = t2;
81	} else t2 = $[3];
82	let t3;
83	if ($[4] !== rootPath) {
84		t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
85			href: rootPath,
86			children: t2
87		});
88		$[4] = rootPath;
89		$[5] = t3;
90	} else t3 = $[5];
91	let t4;
92	if ($[6] !== emailAddress || $[7] !== logoutPath) {
93		t4 = t("devise.registrations.new.wrong_account_logout_html", {
94			email_address: escapeHtml(emailAddress),
95			path: escapeHtml(logoutPath)
96		});
97		$[6] = emailAddress;
98		$[7] = logoutPath;
99		$[8] = t4;
100	} else t4 = $[8];
101	let t5;
102	if ($[9] !== t4) {
103		t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
104			className: "oauth-header__user",
105			dangerouslySetInnerHTML: { __html: t4 }
106		});
107		$[9] = t4;
108		$[10] = t5;
109	} else t5 = $[10];
110	let t6;
111	if ($[11] !== t3 || $[12] !== t5) {
112		t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
113			className: "oauth-header",
114			children: [t3, t5]
115		});
116		$[11] = t3;
117		$[12] = t5;
118		$[13] = t6;
119	} else t6 = $[13];
120	let t7;
121	if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
122		t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("canvas", {
123			className: "signup-chatgpt-box__confettis",
124			ref: canvasRef
125		});
126		$[14] = t7;
127	} else t7 = $[14];
128	let t8;
129	if ($[15] !== checkmarkSrc) {
130		t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
131			src: checkmarkSrc,
132			alt: "",
133			className: "signup-chatgpt-box__checkmark",
134			width: 80,
135			height: 80
136		});
137		$[15] = checkmarkSrc;
138		$[16] = t8;
139	} else t8 = $[16];
140	let t9;
141	if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
142		t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: t("onboarding.chatgpt.index.title") });
143		$[17] = t9;
144	} else t9 = $[17];
145	let t10;
146	if ($[18] !== t8) {
147		t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
148			className: "signup-chatgpt-box__header",
149			children: [t8, t9]
150		});
151		$[18] = t8;
152		$[19] = t10;
153	} else t10 = $[19];
154	let t11;
155	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
156		t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
157			className: "signup-chatgpt-box__description",
158			children: t("onboarding.chatgpt.index.description")
159		});
160		$[20] = t11;
161	} else t11 = $[20];
162	let t12;
163	if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
164		t12 = t("onboarding.chatgpt.index.link_hunter_to_chatgpt");
165		$[21] = t12;
166	} else t12 = $[21];
167	let t13;
168	if ($[22] !== connectorsUrl) {
169		t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
170			variant: "primary",
171			asChild: true,
172			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
173				href: connectorsUrl,
174				target: "_blank",
175				rel: "noopener noreferrer",
176				children: t12
177			})
178		});
179		$[22] = connectorsUrl;
180		$[23] = t13;
181	} else t13 = $[23];
182	let t14;
183	if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
184		t14 = t("onboarding.chatgpt.index.open_hunter");
185		$[24] = t14;
186	} else t14 = $[24];
187	let t15;
188	if ($[25] !== dashboardPath) {
189		t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
190			asChild: true,
191			children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
192				href: dashboardPath,
193				"data-turbo": "false",
194				children: t14
195			})
196		});
197		$[25] = dashboardPath;
198		$[26] = t15;
199	} else t15 = $[26];
200	let t16;
201	if ($[27] !== t13 || $[28] !== t15) {
202		t16 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", {
203			role: "main",
204			children: [t11, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
205				className: "signup-chatgpt-box__actions",
206				children: [t13, t15]
207			})]
208		});
209		$[27] = t13;
210		$[28] = t15;
211		$[29] = t16;
212	} else t16 = $[29];
213	let t17;
214	if ($[30] !== t10 || $[31] !== t16) {
215		t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
216			className: "oauth-container",
217			children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
218				className: "signup-chatgpt-box",
219				children: [
220					t7,
221					t10,
222					t16
223				]
224			})
225		});
226		$[30] = t10;
227		$[31] = t16;
228		$[32] = t17;
229	} else t17 = $[32];
230	let t18;
231	if ($[33] !== t17 || $[34] !== t6) {
232		t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t6, t17] });
233		$[33] = t17;
234		$[34] = t6;
235		$[35] = t18;
236	} else t18 = $[35];
237	return t18;
238}
239function _temp(resolve) {
240	return requestAnimationFrame(resolve);
241}
242var import_compiler_runtime, import_react, import_jsx_runtime, CONFETTI_DURATION_SECONDS;
243function init_Chatgpt() {
244	return (init_Chatgpt = __esmMin((() => {
245		import_compiler_runtime = require_compiler_runtime();
246		import_react = require_react();
247		init_dist();
248		init_confetti_module();
249		init_OnboardingLayout();
250		init_HunterLogo();
251		init_i18n();
252		init_useReducedMotion();
253		init_button();
254		import_jsx_runtime = require_jsx_runtime();
255		CONFETTI_DURATION_SECONDS = 2;
256		Chatgpt.layout = (page) => (0, import_react.createElement)(OnboardingLayout, { variant: "oauth" }, page);
257	})))();
258}
259//#endregion
260init_Chatgpt();
261export { Chatgpt 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.