stz-chart-maker 2.3.8 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js DELETED
@@ -1,4607 +0,0 @@
1
- 'use strict';
2
- const D = h;
3
- (function (f, n) {
4
- const c = h, V = f();
5
- while (!![]) {
6
- try {
7
- const R = parseInt(c(0x209)) / 0x1 * (parseInt(c(0x389)) / 0x2) + parseInt(c(0x1d8)) / 0x3 + parseInt(c(0x22c)) / 0x4 * (-parseInt(c(0x32e)) / 0x5) + -parseInt(c(0x30d)) / 0x6 + -parseInt(c(0x2cb)) / 0x7 * (parseInt(c(0x225)) / 0x8) + parseInt(c(0x392)) / 0x9 * (parseInt(c(0x1ed)) / 0xa) + -parseInt(c(0x262)) / 0xb * (parseInt(c(0x282)) / 0xc);
8
- if (R === n)
9
- break;
10
- else
11
- V['push'](V['shift']());
12
- } catch (N) {
13
- V['push'](V['shift']());
14
- }
15
- }
16
- }(k, 0x91b00));
17
- Object[D(0x395)](exports, '__esModule', { 'value': !![] });
18
- var chart_js = require(D(0x207));
19
- const LoggerConfig = {
20
- 'errorLogging': !![],
21
- 'silentMode': !![]
22
- };
23
- var Logger = Object['freeze']({
24
- '__proto__': null,
25
- 'LoggerConfig': LoggerConfig
26
- }), ErrorMsg;
27
- (function (f) {
28
- const l = h;
29
- f['CHART_TYPE_REQUIRED'] = 'Chart\x20type\x20is\x20required.', f['INVALID_CHART_TYPE'] = 'Invalid\x20chart\x20type.\x20Supported\x20types\x20are\x20bar,\x20line,\x20scatter,\x20bubble,\x20etc.', f['DATASET_REQUIRED'] = l(0x2ee), f['NOT_SUPPORTED_OPTION'] = 'It\x20does\x20not\x20support\x20that\x20option.', f['LABELS_REQUIRED'] = 'Labels\x20cannot\x20be\x20empty.', f[l(0x2f7)] = 'This\x20chart\x20type\x20does\x20not\x20support\x20labels.', f['OPTIONS_REQUIRED'] = 'Options\x20cannot\x20be\x20null\x20or\x20undefined.', f['NOT_REGISTERED_CHART_TYPE'] = l(0x2b2), f['PARAMETER_TYPE_MISMATCH'] = 'Parameter\x20type\x20mismatch.\x20Please\x20check\x20the\x20types\x20of\x20the\x20provided\x20parameters.', f[l(0x296)] = l(0x1dc), f['INVALID_DATA_STRUCTURE'] = 'Invalid\x20data\x20structure.\x20Please\x20check\x20the\x20dataset\x20or\x20labels\x20format.', f['AXIS_KEY_REQUIRED'] = 'xAxisKey\x20or\x20yAxisKey\x20is\x20required\x20for\x20parsing.', f['DATA_LENGTH_MISMATCH'] = 'Labels\x20length\x20does\x20not\x20match\x20datasets\x20data\x20length.', f['IMAGE_PROPERTY_MISSING'] = 'Image\x20property\x20is\x20missing\x20in\x20the\x20dataset.\x20Please\x20provide\x20a\x20valid\x20image\x20URL.', f[l(0x1bf)] = l(0x396), f['NOT_FOUND_DATASET'] = 'Dataset\x20not\x20found\x20for\x20the\x20given\x20identifier.', f[l(0x1b1)] = 'Plugin\x20not\x20found\x20in\x20options.plugins.', f['PLUGIN_ALREADY_EXISTS'] = 'Plugin\x20already\x20exists.\x20Use\x20setPlugin()\x20to\x20override.', f[l(0x3ae)] = l(0x32a), f['CHART_INSTANCE_NOT_FOUND'] = l(0x371), f['CHART_ALREADY_INITIALIZED'] = 'Chart\x20instance\x20is\x20already\x20initialized.', f[l(0x295)] = l(0x29b), f['INVALID_BAR_PERCENTAGE'] = 'Bar\x20percentage\x20must\x20be\x20between\x200\x20and\x201.', f['INVALID_CATEGORY_PERCENTAGE'] = 'Category\x20percentage\x20must\x20be\x20between\x200\x20and\x201.', f['UNKNOWN_ERROR'] = 'An\x20unknown\x20error\x20has\x20occurred.', f['GRADIENT_STEP_MINIMUM'] = 'Gradient\x20requires\x20at\x20least\x20two\x20steps.', f[l(0x1c0)] = 'The\x20number\x20of\x20colors\x20must\x20match\x20the\x20number\x20of\x20gradient\x20steps.', f[l(0x256)] = l(0x317), f['INVALID_TIME_SCALE'] = 'It\x27s\x20not\x20a\x20time\x20scale.';
30
- }(ErrorMsg || (ErrorMsg = {})));
31
- var ErrorCode;
32
- (function (f) {
33
- const Z = h;
34
- f[f['CHART_TYPE_REQUIRED'] = 0x4b0] = 'CHART_TYPE_REQUIRED', f[f['INVALID_CHART_TYPE'] = 0x4b1] = 'INVALID_CHART_TYPE', f[f['OPTIONS_REQUIRED'] = 0x4b2] = 'OPTIONS_REQUIRED', f[f[Z(0x2a0)] = 0x4b3] = 'NOT_REGISTERED_CHART_TYPE', f[f[Z(0x372)] = 0x4b4] = 'PARAMETER_TYPE_MISMATCH', f[f['DATASET_REQUIRED'] = 0x898] = 'DATASET_REQUIRED', f[f[Z(0x311)] = 0x8a3] = 'LABELS_REQUIRED', f[f['LABELS_NOT_SUPPORTED'] = 0x8a4] = 'LABELS_NOT_SUPPORTED', f[f['EMPTY_REQUIRED_PROPERTY'] = 0x8a5] = 'EMPTY_REQUIRED_PROPERTY', f[f[Z(0x1f9)] = 0x8a6] = 'INVALID_DATA_STRUCTURE', f[f[Z(0x1be)] = 0x8a7] = 'AXIS_KEY_REQUIRED', f[f['DATA_LENGTH_MISMATCH'] = 0x8a8] = Z(0x1e5), f[f['NOT_SUPPORTED_OPTION'] = 0x8a9] = 'NOT_SUPPORTED_OPTION', f[f['IMAGE_PROPERTY_MISSING'] = 0x8aa] = Z(0x340), f[f['DATASET_IDENTIFIER_NOT_FOUND'] = 0x8ab] = 'DATASET_IDENTIFIER_NOT_FOUND', f[f['NOT_FOUND_DATASET'] = 0x8ac] = 'NOT_FOUND_DATASET', f[f['PLUGIN_NOT_FOUND'] = 0xc94] = 'PLUGIN_NOT_FOUND', f[f['PLUGIN_ALREADY_EXISTS'] = 0xc95] = 'PLUGIN_ALREADY_EXISTS', f[f['PLUGIN_REMOVE_FAILED'] = 0xc96] = 'PLUGIN_REMOVE_FAILED', f[f['CHART_INSTANCE_NOT_FOUND'] = 0x1086] = Z(0x1fe), f[f[Z(0x247)] = 0x1087] = Z(0x247), f[f['INVALID_BAR_THICKNESS'] = 0x1478] = 'INVALID_BAR_THICKNESS', f[f[Z(0x1d1)] = 0x1479] = Z(0x1d1), f[f[Z(0x2aa)] = 0x147a] = Z(0x2aa), f[f['UNKNOWN_ERROR'] = 0x1481] = 'UNKNOWN_ERROR', f[f[Z(0x2e8)] = 0x1482] = 'GRADIENT_STEP_MINIMUM', f[f[Z(0x1c0)] = 0x1483] = 'GRADIENT_COLOR_STEP_MISMATCH', f[f[Z(0x256)] = 0x186a] = 'INVALID_AXIS_KEY', f[f[Z(0x32c)] = 0x186b] = Z(0x32c);
35
- }(ErrorCode || (ErrorCode = {})));
36
- const ErrorMessage = {
37
- [ErrorCode[D(0x1b8)]]: ErrorMsg['CHART_TYPE_REQUIRED'],
38
- [ErrorCode['INVALID_CHART_TYPE']]: ErrorMsg['INVALID_CHART_TYPE'],
39
- [ErrorCode['OPTIONS_REQUIRED']]: ErrorMsg[D(0x2e2)],
40
- [ErrorCode[D(0x2a0)]]: ErrorMsg['NOT_REGISTERED_CHART_TYPE'],
41
- [ErrorCode[D(0x372)]]: ErrorMsg[D(0x372)],
42
- [ErrorCode['DATASET_REQUIRED']]: ErrorMsg[D(0x210)],
43
- [ErrorCode[D(0x311)]]: ErrorMsg[D(0x311)],
44
- [ErrorCode['LABELS_NOT_SUPPORTED']]: ErrorMsg['LABELS_NOT_SUPPORTED'],
45
- [ErrorCode[D(0x296)]]: ErrorMsg['EMPTY_REQUIRED_PROPERTY'],
46
- [ErrorCode['INVALID_DATA_STRUCTURE']]: ErrorMsg['INVALID_DATA_STRUCTURE'],
47
- [ErrorCode['AXIS_KEY_REQUIRED']]: ErrorMsg['AXIS_KEY_REQUIRED'],
48
- [ErrorCode['DATA_LENGTH_MISMATCH']]: ErrorMsg['DATA_LENGTH_MISMATCH'],
49
- [ErrorCode['NOT_SUPPORTED_OPTION']]: ErrorMsg['NOT_SUPPORTED_OPTION'],
50
- [ErrorCode[D(0x1bf)]]: ErrorMsg['DATASET_IDENTIFIER_NOT_FOUND'],
51
- [ErrorCode['NOT_FOUND_DATASET']]: ErrorMsg[D(0x2c4)],
52
- [ErrorCode['PLUGIN_NOT_FOUND']]: ErrorMsg['PLUGIN_NOT_FOUND'],
53
- [ErrorCode['PLUGIN_ALREADY_EXISTS']]: ErrorMsg['PLUGIN_ALREADY_EXISTS'],
54
- [ErrorCode['PLUGIN_REMOVE_FAILED']]: ErrorMsg['PLUGIN_REMOVE_FAILED'],
55
- [ErrorCode[D(0x1fe)]]: ErrorMsg['CHART_INSTANCE_NOT_FOUND'],
56
- [ErrorCode['CHART_ALREADY_INITIALIZED']]: ErrorMsg[D(0x247)],
57
- [ErrorCode['INVALID_BAR_THICKNESS']]: ErrorMsg['INVALID_BAR_THICKNESS'],
58
- [ErrorCode['INVALID_BAR_PERCENTAGE']]: ErrorMsg['INVALID_BAR_PERCENTAGE'],
59
- [ErrorCode['INVALID_CATEGORY_PERCENTAGE']]: ErrorMsg[D(0x2aa)],
60
- [ErrorCode[D(0x33d)]]: ErrorMsg['UNKNOWN_ERROR'],
61
- [ErrorCode['IMAGE_PROPERTY_MISSING']]: ErrorMsg[D(0x340)],
62
- [ErrorCode['GRADIENT_STEP_MINIMUM']]: ErrorMsg['GRADIENT_STEP_MINIMUM'],
63
- [ErrorCode['GRADIENT_COLOR_STEP_MISMATCH']]: ErrorMsg['GRADIENT_COLOR_STEP_MISMATCH'],
64
- [ErrorCode['INVALID_AXIS_KEY']]: ErrorMsg['INVALID_AXIS_KEY'],
65
- [ErrorCode['INVALID_TIME_SCALE']]: ErrorMsg[D(0x32c)]
66
- };
67
- class CustomError extends Error {
68
- ['code'];
69
- [D(0x2b7)];
70
- constructor(f, n) {
71
- const o = h, V = n ? ErrorMessage[f] + '\x20-\x20' + n : ErrorMessage[f];
72
- super(V), this['code'] = f, this['detail'] = n, this['name'] = o(0x1d7);
73
- if (LoggerConfig[o(0x24c)]) {
74
- const R = 'color:\x20green;\x20font-weight:\x20bold;', N = 'color:\x20orange;';
75
- console[o(0x2dc)](o(0x305) + f + ']\x20%c' + V, R, N);
76
- }
77
- }
78
- static [D(0x2ef)](f, n) {
79
- const i = h, V = new CustomError(f, n);
80
- if (!LoggerConfig['silentMode'])
81
- throw V;
82
- else {
83
- if (LoggerConfig['errorLogging']) {
84
- const R = n ? ErrorMessage[f] + i(0x303) + n : ErrorMessage[f], N = 'color:\x20green;\x20font-weight:\x20bold;', t = 'color:\x20orange;';
85
- console[i(0x2dc)](i(0x305) + f + ']\x20%c' + R, N, t);
86
- }
87
- }
88
- return V;
89
- }
90
- }
91
- class ChartFactory {
92
- static ['registry'] = new Map();
93
- static [D(0x2cd)](f, n) {
94
- this['registry']['set'](f, n);
95
- }
96
- static [D(0x1af)](f, n, V, R, N) {
97
- const v = h, t = this['registry'][v(0x220)](f);
98
- if (!t)
99
- throw new CustomError(ErrorCode[v(0x2a0)], v(0x235) + f);
100
- return new t(f, n, V, R, N);
101
- }
102
- static ['has'](f) {
103
- const M = h;
104
- return this[M(0x390)]['has'](f);
105
- }
106
- static [D(0x3a6)]() {
107
- this['registry']['clear']();
108
- }
109
- }
110
- class StzUtils {
111
- static ['isNullOrUndefined'](f) {
112
- return f === null || f === undefined;
113
- }
114
- static [D(0x2a5)](f) {
115
- const q = h;
116
- return this[q(0x1db)](f) === 'Null';
117
- }
118
- static ['isUndefined'](f) {
119
- const z = h;
120
- return this[z(0x1db)](f) === 'Undefined';
121
- }
122
- static [D(0x374)](f) {
123
- const a = h;
124
- return this['getType'](f) === a(0x19d);
125
- }
126
- static ['isNumber'](f) {
127
- const b = h;
128
- return this['getType'](f) === b(0x1ad);
129
- }
130
- static ['isBoolean'](f) {
131
- const A = h;
132
- return this['getType'](f) === A(0x2f1);
133
- }
134
- static [D(0x319)](f) {
135
- return this['getType'](f) === 'Array';
136
- }
137
- static ['isObject'](f) {
138
- return this['getType'](f) === 'Object';
139
- }
140
- static ['isDate'](f) {
141
- const j = h;
142
- return this[j(0x1db)](f) === j(0x24e);
143
- }
144
- static ['isRegExp'](f) {
145
- return this['getType'](f) === 'RegExp';
146
- }
147
- static ['isFunction'](f) {
148
- const m = h;
149
- return this[m(0x1db)](f) === 'Function';
150
- }
151
- static [D(0x1d4)](f) {
152
- const S = h;
153
- if (!this['isString'](f))
154
- return ![];
155
- const n = /^(https?:\/\/)?([\w-]+(\.[\w-]+)+)(:\d+)?(\/[^\s]*)?$/i;
156
- try {
157
- const V = new URL(f['startsWith'](S(0x32b)) ? f : 'https://' + f);
158
- return n[S(0x231)](f) && !!V[S(0x230)];
159
- } catch {
160
- return ![];
161
- }
162
- }
163
- static ['isValidEmail'](f) {
164
- const s = h;
165
- if (!this[s(0x374)](f) || this['isBlank'](f))
166
- return ![];
167
- const n = new RegExp('^[^\x5cs@]+@[^\x5cs@]+\x5c.[^\x5cs@]+$');
168
- return n['test'](f['trim']());
169
- }
170
- static ['isValidPassword'](f) {
171
- if (!this['isString'](f))
172
- return ![];
173
- const n = new RegExp('^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[!@#$%^&*(),.?\x22:{}|<>])[a-zA-Z0-9!@#$%^&*(),.?\x22:{}|<>]{8,20}$');
174
- return n['test'](f);
175
- }
176
- static ['isStrongPasswordLevel'](f, n = D(0x292)) {
177
- const U = h;
178
- if (!this['isString'](f) || this[U(0x204)](f))
179
- return ![];
180
- const V = f['trim']();
181
- if (n === 'normal')
182
- return this[U(0x30f)](V);
183
- const R = new RegExp(U(0x25c));
184
- return R[U(0x231)](V);
185
- }
186
- static [D(0x1f2)](f) {
187
- const r = h;
188
- if (!this[r(0x307)](f))
189
- return ![];
190
- const n = f[r(0x356)]()[r(0x39b)]()['split']('@')[0x1], V = [
191
- '10minutemail.com',
192
- r(0x2d1),
193
- 'guerrillamail.com',
194
- r(0x240),
195
- 'mailinator.com',
196
- 'temp-mail.org',
197
- 'tempmail.com',
198
- 'trashmail.com',
199
- 'yopmail.com'
200
- ];
201
- return V[r(0x1ba)](R => n === R || n['endsWith']('.' + R));
202
- }
203
- static ['isValidUserId'](f, n = 0x4, V = 0x14) {
204
- if (!this['isString'](f))
205
- return ![];
206
- const R = f['trim']();
207
- if (R['length'] < n || R['length'] > V)
208
- return ![];
209
- const N = new RegExp('^[a-zA-Z0-9_]+$');
210
- return N['test'](R);
211
- }
212
- static ['isAllowedLoginId'](f) {
213
- const K = h;
214
- if (!this['isValidUserId'](f))
215
- return ![];
216
- const n = f['trim']()['toLowerCase'](), V = [
217
- 'admin',
218
- 'administrator',
219
- 'guest',
220
- 'manager',
221
- K(0x1f3),
222
- 'operator',
223
- K(0x264),
224
- K(0x1a5),
225
- 'support',
226
- 'system',
227
- 'test'
228
- ];
229
- if (V['some'](N => this['containsTrimLowercase'](n, N)))
230
- return ![];
231
- if (new RegExp('^[0-9]+$')['test'](n))
232
- return ![];
233
- if (new RegExp(K(0x306))['test'](n))
234
- return ![];
235
- const R = (N, t = 0x4) => {
236
- const B = h;
237
- if (N[B(0x201)] < t)
238
- return ![];
239
- for (let p = 0x0; p <= N['length'] - t; p++) {
240
- let F = !![], G = !![];
241
- for (let I = 0x1; I < t; I++) {
242
- const Y = N['charCodeAt'](p + I - 0x1), H = N[B(0x353)](p + I), g = H - Y;
243
- if (g !== 0x1)
244
- F = ![];
245
- if (g !== -0x1)
246
- G = ![];
247
- }
248
- if (F || G)
249
- return !![];
250
- }
251
- return ![];
252
- };
253
- if (R(n))
254
- return ![];
255
- return !![];
256
- }
257
- static ['isValidNickname'](f, n = 0x2, V = 0x14) {
258
- const L = h;
259
- if (!this['isString'](f))
260
- return ![];
261
- const R = f['trim']();
262
- if (R[L(0x201)] < n || R['length'] > V)
263
- return ![];
264
- const N = new RegExp(L(0x2dd));
265
- return N['test'](R);
266
- }
267
- static ['isValidPhoneNumber'](f) {
268
- if (!this['isString'](f))
269
- return ![];
270
- const n = f['replace'](/[\s-]/g, ''), V = new RegExp('^(01[016789]|02|0[3-9][0-9])[0-9]{7,8}$');
271
- return V['test'](n);
272
- }
273
- static ['isValidVerificationCode'](f, n = 0x6) {
274
- const X = h;
275
- if (!this[X(0x374)](f) || n <= 0x0)
276
- return ![];
277
- const V = new RegExp(X(0x347) + n + '}$');
278
- return V['test'](f[X(0x356)]());
279
- }
280
- static ['isPasswordConfirmed'](f, n) {
281
- if (!this['isString'](f) || !this['isString'](n))
282
- return ![];
283
- return f === n;
284
- }
285
- static [D(0x203)](f) {
286
- const k0 = h;
287
- if (!this[k0(0x374)](f))
288
- return '';
289
- return f['replace'](/\s+/g, '');
290
- }
291
- static ['isValidBirthDate'](f) {
292
- const k1 = h;
293
- if (!this[k1(0x374)](f))
294
- return ![];
295
- const n = f['replace'](/-/g, '')['trim'](), V = new RegExp('^(19|20)\x5cd{2}(0[1-9]|1[0-2])(0[1-9]|[12]\x5cd|3[01])$');
296
- if (!V['test'](n))
297
- return ![];
298
- const R = Number(n[k1(0x1d5)](0x0, 0x4)), N = Number(n[k1(0x1d5)](0x4, 0x6)), t = Number(n['slice'](0x6, 0x8)), p = new Date(R, N - 0x1, t);
299
- return p['getFullYear']() === R && p['getMonth']() === N - 0x1 && p['getDate']() === t;
300
- }
301
- static ['isValidBirtDate'](f) {
302
- return this['isValidBirthDate'](f);
303
- }
304
- static ['isAdult'](f, n = 0x13, V = new Date()) {
305
- const k2 = h;
306
- if (!this['isValidBirthDate'](f) || n < 0x0)
307
- return ![];
308
- const R = f[k2(0x1ce)](/-/g, '')['trim'](), N = Number(R['slice'](0x0, 0x4)), t = Number(R['slice'](0x4, 0x6)), p = Number(R['slice'](0x6, 0x8)), F = new Date(N, t - 0x1, p);
309
- let G = V['getFullYear']() - F['getFullYear']();
310
- const I = V['getMonth']() > F['getMonth']() || V[k2(0x24a)]() === F['getMonth']() && V['getDate']() >= F['getDate']();
311
- if (!I)
312
- G -= 0x1;
313
- return G >= n;
314
- }
315
- static ['isMinor'](f, n = 0x13, V = new Date()) {
316
- if (!this['isValidBirthDate'](f) || n < 0x0)
317
- return ![];
318
- return !this['isAdult'](f, n, V);
319
- }
320
- static ['str'](f) {
321
- const k3 = h;
322
- if (this['getType'](f) === k3(0x24b))
323
- return JSON['stringify'](f);
324
- if (this['getType'](f) === 'Number')
325
- return f['toString']();
326
- if (this['getType'](f) === 'String')
327
- return f;
328
- if (this[k3(0x27e)](f))
329
- return '';
330
- return String(f);
331
- }
332
- static ['convertNullToZero'](f) {
333
- if (this['isNullOrUndefined'](f))
334
- return 0x0;
335
- return f;
336
- }
337
- static ['coalesce'](f, n) {
338
- return this['isNullOrUndefined'](f) ? n : f;
339
- }
340
- static ['convertEmptyToTarget'](f, n) {
341
- const k4 = h;
342
- if (this[k4(0x2b5)](f))
343
- return n;
344
- return f;
345
- }
346
- static [D(0x278)](f, n = 0x0) {
347
- if (this['isNullOrUndefined'](f) || f === 'null' || f === '')
348
- return 0x0;
349
- if (this['isNumber'](f))
350
- return Math['floor'](f);
351
- if (this['isString'](f)) {
352
- const V = parseInt(f['trim'](), 0xa);
353
- return isNaN(V) ? n : V;
354
- }
355
- return n;
356
- }
357
- static ['toInt'](f, n = 0x0) {
358
- const k5 = h;
359
- if (this['isNullOrUndefined'](f))
360
- return n;
361
- if (this['isNumber'](f))
362
- return Math['floor'](f);
363
- if (this['isString'](f)) {
364
- const V = parseInt(f[k5(0x356)](), 0xa);
365
- return isNaN(V) ? n : V;
366
- }
367
- return n;
368
- }
369
- static [D(0x257)](f, n = 0x0) {
370
- const k6 = h;
371
- if (this[k6(0x27e)](f))
372
- return n;
373
- if (this[k6(0x1fa)](f))
374
- return f;
375
- if (this['isString'](f)) {
376
- const V = parseFloat(f['trim']());
377
- return isNaN(V) ? n : V;
378
- }
379
- return n;
380
- }
381
- static [D(0x1e6)](f) {
382
- const k7 = h;
383
- if (this['isNullOrUndefined'](f))
384
- return '';
385
- const n = String(f)['trim']();
386
- if (n === '' || n === '-' || n === '+')
387
- return n;
388
- const V = n['startsWith']('-') ? '-' : n['startsWith']('+') ? '+' : '', R = V ? n['slice'](0x1) : n, N = R['replace'](/,/g, '');
389
- if (!/^\d+(\.\d+)?$/['test'](N))
390
- return n;
391
- const [t, p] = N[k7(0x341)]('.'), F = t['replace'](/\B(?=(\d{3})+(?!\d))/g, ',');
392
- return p !== undefined ? '' + V + F + '.' + p : '' + V + F;
393
- }
394
- static ['toBoolean'](f) {
395
- const k8 = h, n = [
396
- 'true',
397
- 'yes',
398
- '1',
399
- 'on',
400
- 'Y'
401
- ];
402
- if (this[k8(0x255)](f))
403
- return f;
404
- if (this['isNullOrUndefined'](f))
405
- return ![];
406
- if (this['isString'](f)) {
407
- if (this[k8(0x204)](f))
408
- return ![];
409
- const V = f['toLowerCase']()[k8(0x356)]();
410
- return n['includes'](V);
411
- }
412
- if (this['isNumber'](f))
413
- return f !== 0x0;
414
- return Boolean(f);
415
- }
416
- static ['equalsTrimLowercase'](f, n) {
417
- const k9 = h;
418
- if (this['isNullOrUndefined'](f) || this['isNullOrUndefined'](n))
419
- return ![];
420
- return String(f)[k9(0x356)]()[k9(0x39b)]() === String(n)['trim']()['toLowerCase']();
421
- }
422
- static ['containsTrimLowercase'](f, n) {
423
- const kk = h;
424
- if (this[kk(0x204)](f) || this[kk(0x204)](n))
425
- return ![];
426
- const V = String(f)['trim']()['toLowerCase'](), R = String(n)[kk(0x356)]()['toLowerCase']();
427
- return V['includes'](R);
428
- }
429
- static ['isBlank'](f) {
430
- const kh = h;
431
- if (this[kh(0x27e)](f))
432
- return !![];
433
- if (!this[kh(0x374)](f))
434
- return ![];
435
- return f[kh(0x356)]() === '';
436
- }
437
- static [D(0x352)](f) {
438
- if (!this['isString'](f))
439
- return ![];
440
- return !this['isBlank'](f);
441
- }
442
- static ['truncate'](f, n, V = '...') {
443
- const kf = h;
444
- if (!this['isString'](f))
445
- return '';
446
- if (f['length'] <= n)
447
- return f;
448
- return f['substring'](0x0, n - V[kf(0x201)]) + V;
449
- }
450
- static ['capitalize'](f) {
451
- const kn = h;
452
- if (!this['isString'](f) || f['length'] === 0x0)
453
- return '';
454
- return f['charAt'](0x0)[kn(0x35b)]() + f['slice'](0x1)[kn(0x39b)]();
455
- }
456
- static ['toSnakeCase'](f) {
457
- const kV = h;
458
- if (!this['isString'](f))
459
- return '';
460
- return f['replace'](/[A-Z]/g, n => '_' + n[kV(0x39b)]())['replace'](/^_/, '');
461
- }
462
- static [D(0x1e2)](f) {
463
- const kR = h;
464
- if (!this['isString'](f))
465
- return '';
466
- return f[kR(0x1ce)](/_([a-z])/g, (n, V) => V[kR(0x35b)]());
467
- }
468
- static ['toKebabCase'](f) {
469
- const kN = h;
470
- if (!this['isString'](f))
471
- return '';
472
- return f['replace'](/([a-z])([A-Z])/g, '$1-$2')['replace'](/[\s_]+/g, '-')[kN(0x39b)]();
473
- }
474
- static ['mask'](f, n = 0x0, V, R = '*') {
475
- const kt = h;
476
- if (!this['isString'](f) || f['length'] === 0x0)
477
- return '';
478
- const N = V ?? f['length'], t = f[kt(0x359)](0x0, n), p = Math['max'](0x0, N - n), F = R[kt(0x289)](p), G = f['substring'](N);
479
- return t + F + G;
480
- }
481
- static ['maskEmail'](f, n = 0x2, V = '*') {
482
- const kp = h;
483
- if (!this[kp(0x374)](f) || !f['includes']('@'))
484
- return f;
485
- const [R, N] = f[kp(0x341)]('@');
486
- if (R['length'] <= n)
487
- return this[kp(0x1ec)](R, 0x1, undefined, V) + '@' + N;
488
- const t = this[kp(0x1ec)](R, n, undefined, V);
489
- return t + '@' + N;
490
- }
491
- static [D(0x2eb)](f, n = '*') {
492
- const kF = h;
493
- if (!this['isString'](f) || f[kF(0x201)] === 0x0)
494
- return '';
495
- return f[kF(0x1ce)](/\d/g, n);
496
- }
497
- static ['maskPassword'](f, n = '*') {
498
- const kG = h;
499
- if (!this[kG(0x374)](f) || f['length'] === 0x0)
500
- return '';
501
- return n['repeat'](f['length']);
502
- }
503
- static ['randomInt'](f, n) {
504
- return Math['floor'](Math['random']() * (n - f + 0x1)) + f;
505
- }
506
- static ['clamp'](f, n, V) {
507
- return Math['min'](Math['max'](f, n), V);
508
- }
509
- static ['chunk'](f, n) {
510
- if (!this['isArray'](f) || n <= 0x0)
511
- return [];
512
- const V = [];
513
- for (let R = 0x0; R < f['length']; R += n) {
514
- V['push'](f['slice'](R, R + n));
515
- }
516
- return V;
517
- }
518
- static [D(0x1df)](f) {
519
- const kI = h;
520
- if (!this[kI(0x319)](f))
521
- return [];
522
- return [...new Set(f)];
523
- }
524
- static ['shuffle'](f) {
525
- const kY = h;
526
- if (!this['isArray'](f))
527
- return [];
528
- const n = [...f];
529
- for (let V = n['length'] - 0x1; V > 0x0; V--) {
530
- const R = Math[kY(0x1cc)](Math['random']() * (V + 0x1));
531
- [n[V], n[R]] = [
532
- n[R],
533
- n[V]
534
- ];
535
- }
536
- return n;
537
- }
538
- static ['getType'](f) {
539
- const kH = h;
540
- return Object['prototype'][kH(0x1b6)]['call'](f)[kH(0x1d5)](0x8, -0x1);
541
- }
542
- static ['buildTree'](f, n, V, R = 'children') {
543
- const kg = h, N = [], t = {};
544
- return f[kg(0x330)](p => {
545
- t[p[n]] = {
546
- ...p,
547
- [R]: []
548
- };
549
- }), f['forEach'](p => {
550
- const kd = h;
551
- p[V] !== null && t[p[V]] ? t[p[V]][R][kd(0x35c)](t[p[n]]) : N[kd(0x35c)](t[p[n]]);
552
- }), N;
553
- }
554
- static ['isObj'](f) {
555
- const kO = h;
556
- return this[kO(0x1db)](f) === 'Object';
557
- }
558
- static [D(0x29d)](f) {
559
- return this['getType'](f) === 'Array';
560
- }
561
- static ['isNumeric'](f) {
562
- return !isNaN(parseFloat(f)) && isFinite(f);
563
- }
564
- static [D(0x31d)](f, n) {
565
- const kT = h, V = this['getType'](f);
566
- if (V === kT(0x197) || V !== 'Object' && V !== 'Array')
567
- return f;
568
- if (V === 'Array')
569
- return f['map'](N => this[kT(0x31d)](N, n));
570
- const R = {};
571
- for (const N in f) {
572
- if (n[kT(0x3a3)](N))
573
- continue;
574
- const t = f[N];
575
- R[N] = this[kT(0x31d)](t, n);
576
- }
577
- return R;
578
- }
579
- static ['pick'](f, n) {
580
- if (Object['prototype']['hasOwnProperty']['call'](f, n)) {
581
- const {
582
- [n]: V,
583
- ...R
584
- } = f;
585
- return R;
586
- } else
587
- throw new Error('Object\x20does\x20not\x20have\x20PROPERTY');
588
- }
589
- static ['isEmpty'](f) {
590
- const kw = h;
591
- if (this[kw(0x27e)](f))
592
- return !![];
593
- const n = this['getType'](f);
594
- if (n === 'String' && this['isBlank'](f))
595
- return !![];
596
- if (n === 'Array' && f['length'] === 0x0)
597
- return !![];
598
- if (n === 'Object' && Object['keys'](f)[kw(0x201)] === 0x0)
599
- return !![];
600
- return ![];
601
- }
602
- static ['cloneDeep'](f, n = new Map()) {
603
- const kW = h;
604
- if (this['isNullOrUndefined'](f) || typeof f !== 'object')
605
- return f;
606
- if (n['has'](f))
607
- return n['get'](f);
608
- const V = this['getType'](f);
609
- let R;
610
- if (V === kW(0x315)) {
611
- R = [], n['set'](f, R);
612
- for (const N of f) {
613
- R['push'](this[kW(0x223)](N, n));
614
- }
615
- } else {
616
- if (V === 'Object') {
617
- R = {}, n['set'](f, R);
618
- for (const t in f) {
619
- Object['prototype']['hasOwnProperty']['call'](f, t) && (R[t] = this['cloneDeep'](f[t], n));
620
- }
621
- } else
622
- return f;
623
- }
624
- return R;
625
- }
626
- static ['merge'](f, n) {
627
- const kC = h, V = new Set([
628
- '__proto__',
629
- 'constructor',
630
- 'prototype'
631
- ]), R = this['isObj'](f) ? f : {}, N = this['isObj'](n) ? n : {}, p = { ...R };
632
- for (const F of Reflect[kC(0x365)](N)) {
633
- if (typeof F === kC(0x2f6) && V[kC(0x366)](F))
634
- continue;
635
- let G;
636
- try {
637
- G = Reflect['get'](N, F);
638
- } catch {
639
- continue;
640
- }
641
- const I = Reflect['get'](R, F);
642
- if (G === undefined)
643
- continue;
644
- if (this[kC(0x29d)](G)) {
645
- p[F] = G[kC(0x1d5)]();
646
- continue;
647
- }
648
- if (this['isObj'](G) && this['isObj'](I)) {
649
- p[F] = this['merge'](I, G);
650
- continue;
651
- }
652
- p[F] = G;
653
- }
654
- return p;
655
- }
656
- static ['isEqual'](f, n) {
657
- const ke = h;
658
- if (f === n)
659
- return !![];
660
- if (typeof f !== typeof n)
661
- return ![];
662
- if (typeof f !== ke(0x34a) || f == null || n == null)
663
- return ![];
664
- const V = Object['keys'](f), R = Object['keys'](n);
665
- if (V['length'] !== R[ke(0x201)])
666
- return ![];
667
- for (const N of V) {
668
- if (!StzUtils['isEqual'](f[N], n[N]))
669
- return ![];
670
- }
671
- return !![];
672
- }
673
- static ['donwnloadTableByCSV'](f, n = D(0x283)) {
674
- const kQ = h;
675
- if (!f) {
676
- console[kQ(0x2dc)]('Table\x20element\x20not\x20found.');
677
- return;
678
- }
679
- const V = Array['from'](f['querySelectorAll']('tr')), R = V['map'](G => {
680
- const kE = h, I = Array['from'](G['querySelectorAll'](kE(0x248)));
681
- return I['map'](Y => '\x22' + Y[kE(0x378)] + '\x22')[kE(0x211)](',');
682
- })['join']('\x0a'), N = '\ufeff', t = new Blob([N + R], { 'type': kQ(0x38b) }), p = URL['createObjectURL'](t), F = document['createElement']('a');
683
- F['href'] = p, F['download'] = n, document['body'][kQ(0x25a)](F), F['click'](), document['body']['removeChild'](F), URL[kQ(0x339)](p);
684
- }
685
- static ['getColorType'](f) {
686
- const kP = h;
687
- if (this[kP(0x2b5)](f) || !this[kP(0x374)](f))
688
- return kP(0x26d);
689
- const n = f['trim']();
690
- if (n[kP(0x280)]('#'))
691
- return kP(0x39d);
692
- if (n[kP(0x280)]('rgba('))
693
- return 'rgba';
694
- if (n[kP(0x280)]('rgb('))
695
- return 'rgb';
696
- return 'unknown';
697
- }
698
- static [D(0x2b4)](f, n = 0.5) {
699
- const kJ = h;
700
- if (!f || !this['isString'](f))
701
- throw new Error('Invalid\x20hex\x20color');
702
- let V = f['trim']()['replace']('#', '');
703
- V['length'] === 0x3 && (V = V['split']('')['map'](F => F + F)['join'](''));
704
- if (V['length'] !== 0x6)
705
- throw new Error('Hex\x20color\x20must\x20be\x203\x20or\x206\x20characters');
706
- const R = Math['max'](0x0, Math[kJ(0x36d)](0x1, n)), N = parseInt(V['substring'](0x0, 0x2), 0x10), t = parseInt(V[kJ(0x359)](0x2, 0x4), 0x10), p = parseInt(V[kJ(0x359)](0x4, 0x6), 0x10);
707
- if (isNaN(N) || isNaN(t) || isNaN(p))
708
- throw new Error(kJ(0x286));
709
- return 'rgba(' + N + ',\x20' + t + ',\x20' + p + ',\x20' + R + ')';
710
- }
711
- static ['rgbaToHex'](f) {
712
- const ku = h;
713
- if (!f || !this['isString'](f))
714
- throw new Error('Invalid\x20rgba\x20color');
715
- const n = f['match'](/\d+/g);
716
- if (!n || n[ku(0x201)] < 0x3)
717
- throw new Error(ku(0x19b));
718
- const [V, R, N] = n[ku(0x1d5)](0x0, 0x3)[ku(0x2a1)](Number);
719
- if (V > 0xff || R > 0xff || N > 0xff || V < 0x0 || R < 0x0 || N < 0x0)
720
- throw new Error(ku(0x234));
721
- const t = p => p[ku(0x1b6)](0x10)['padStart'](0x2, '0')['toUpperCase']();
722
- return '#' + t(V) + t(R) + t(N);
723
- }
724
- static ['rgbAddOpacity'](f, n) {
725
- const kc = h;
726
- if (!f || !this['isString'](f))
727
- throw new Error(kc(0x22f));
728
- const V = f['match'](/\d+/g);
729
- if (!V || V['length'] < 0x3)
730
- throw new Error(kc(0x3b0));
731
- const [R, N, t] = V['slice'](0x0, 0x3)[kc(0x2a1)](Number);
732
- if (R > 0xff || N > 0xff || t > 0xff || R < 0x0 || N < 0x0 || t < 0x0)
733
- throw new Error(kc(0x234));
734
- const p = Math['max'](0x0, Math['min'](0x1, n));
735
- return 'rgba(' + R + ',\x20' + N + ',\x20' + t + ',\x20' + p + ')';
736
- }
737
- static [D(0x2be)](f) {
738
- const kD = h;
739
- if (!f || !this['isString'](f))
740
- throw new Error('Invalid\x20rgba\x20color');
741
- const n = f[kD(0x27a)](/\d+/g);
742
- if (!n || n['length'] < 0x3)
743
- throw new Error('Invalid\x20rgba\x20format');
744
- const [V, R, N] = n['slice'](0x0, 0x3)[kD(0x2a1)](Number);
745
- if (V > 0xff || R > 0xff || N > 0xff || V < 0x0 || R < 0x0 || N < 0x0)
746
- throw new Error('RGB\x20values\x20must\x20be\x20between\x200\x20and\x20255');
747
- return 'rgb(' + V + ',\x20' + R + ',\x20' + N + ')';
748
- }
749
- static [D(0x29a)](f) {
750
- const kl = h, n = this['hexToRgba'](f, 0x1);
751
- return this[kl(0x2be)](n);
752
- }
753
- static ['rgbToHex'](f) {
754
- return this['rgbaToHex'](f);
755
- }
756
- static [D(0x269)](f) {
757
- return f !== f['toLowerCase']();
758
- }
759
- static ['getLocalStorageByKey'](f) {
760
- const ky = h;
761
- if (this['getType'](window) === ky(0x205))
762
- return null;
763
- if (!window['localStorage'])
764
- return null;
765
- const n = window[ky(0x399)][ky(0x213)](f);
766
- if (n == null)
767
- return null;
768
- return this['str'](n);
769
- }
770
- static ['getLocalStorageJson'](f) {
771
- const kZ = h, n = this[kZ(0x332)](f);
772
- if (n == null)
773
- return null;
774
- try {
775
- return JSON[kZ(0x202)](n);
776
- } catch {
777
- return null;
778
- }
779
- }
780
- static [D(0x254)](f, n) {
781
- const ko = h;
782
- try {
783
- if (typeof window === 'undefined')
784
- return ![];
785
- const V = window['localStorage'];
786
- if (!V)
787
- return ![];
788
- if (n === undefined)
789
- return V['removeItem'](f), !![];
790
- const R = typeof n === 'string' ? n : JSON['stringify'](n);
791
- return V[ko(0x362)](f, R), !![];
792
- } catch (N) {
793
- return ![];
794
- }
795
- }
796
- static ['isFalsy'](f) {
797
- const ki = h;
798
- if (f === ![] || f === 0x0 || f === '' || f === null || f === undefined || this['isArray'](f) && f[ki(0x201)] === 0x0 || this[ki(0x35e)](f) && Object[ki(0x206)](f)['length'] === 0x0)
799
- return !![];
800
- return ![];
801
- }
802
- }
803
- let configLoaded = ![], manualConfig = null, activeConfig = null;
804
- function setChartConfig(f) {
805
- manualConfig = f, configLoaded = ![], ensureConfigLoaded();
806
- }
807
- function loadBrowserConfig() {
808
- const kv = h;
809
- try {
810
- const f = globalThis['__STZ_CONFIG__'];
811
- if (!f)
812
- return null;
813
- if (StzUtils['isObject'](f) && kv(0x1ea) in f)
814
- return f['default'] || null;
815
- return f;
816
- } catch {
817
- return null;
818
- }
819
- }
820
- function applyConfig(f) {
821
- const kM = h;
822
- (!StzUtils['isUndefined'](f[kM(0x24c)]) || !StzUtils['isUndefined'](f[kM(0x25e)])) && Promise['resolve']()['then'](function () {
823
- return Logger;
824
- })[kM(0x2f3)](({LoggerConfig: n}) => {
825
- !StzUtils['isUndefined'](f['errorLogging']) && (n['errorLogging'] = f['errorLogging']), !StzUtils['isUndefined'](f['silentMode']) && (n['silentMode'] = f['silentMode']);
826
- })['catch'](() => {
827
- });
828
- }
829
- function ensureConfigLoaded() {
830
- if (configLoaded)
831
- return;
832
- configLoaded = !![], activeConfig = null;
833
- if (manualConfig) {
834
- activeConfig = manualConfig, applyConfig(manualConfig);
835
- return;
836
- }
837
- const f = loadBrowserConfig();
838
- f && (activeConfig = f, applyConfig(f));
839
- }
840
- function getChartConfig() {
841
- return ensureConfigLoaded(), activeConfig || {};
842
- }
843
- class Chart {
844
- [D(0x343)];
845
- ['labels'];
846
- ['_datasets'];
847
- ['options'];
848
- ['plugins'];
849
- get ['datasets']() {
850
- return this['_datasets'];
851
- }
852
- set [D(0x20d)](f) {
853
- const kq = h;
854
- this[kq(0x263)] = f;
855
- }
856
- constructor(f, n, V, R, N) {
857
- const kz = h;
858
- this['type'] = f, this['labels'] = n, this[kz(0x263)] = V, this['options'] = R, this['plugins'] = N, this[kz(0x1dd)]();
859
- }
860
- static ['create'](f, n, V, R, N) {
861
- return ensureConfigLoaded(), ChartFactory['create'](f, n, V, R, N);
862
- }
863
- static ['register'](f, n) {
864
- ensureConfigLoaded(), ChartFactory['register'](f, n);
865
- }
866
- static ['has'](f) {
867
- return ChartFactory['has'](f);
868
- }
869
- ['cloneValue'](f) {
870
- return StzUtils['cloneDeep'](f);
871
- }
872
- ['clonePlugins'](f) {
873
- return StzUtils['isArray'](f) ? [...f] : f;
874
- }
875
- ['applyGlobalPluginConfig']() {
876
- const ka = h, f = getChartConfig();
877
- if (!f['legend'] && !f[ka(0x358)])
878
- return;
879
- const n = this[ka(0x2d6)] = StzUtils[ka(0x2d3)](this['options'], {}), V = n['plugins'] = StzUtils['coalesce'](n['plugins'], {});
880
- f['legend'] && (V[ka(0x388)] = StzUtils['merge'](StzUtils['cloneDeep'](f['legend']), StzUtils['cloneDeep'](V['legend'] || {}))), f['tooltip'] && (V['tooltip'] = StzUtils['merge'](StzUtils['cloneDeep'](f['tooltip']), StzUtils['cloneDeep'](V[ka(0x358)] || {})));
881
- }
882
- ['requireDatasets']() {
883
- const kb = h;
884
- if (!this['datasets'] || !StzUtils['isArray'](this['datasets']))
885
- throw CustomError[kb(0x2ef)](ErrorCode['DATASET_REQUIRED']);
886
- return this['datasets'];
887
- }
888
- ['resolveDatasetIndex'](f) {
889
- const kA = h, n = this['requireDatasets']();
890
- if (StzUtils[kA(0x1fa)](f)) {
891
- if (f < 0x0 || f >= n['length'])
892
- throw CustomError['shield'](ErrorCode['NOT_FOUND_DATASET'], kA(0x28e) + f + kA(0x1b5));
893
- return f;
894
- }
895
- const V = n[kA(0x33e)](R => R && (R[kA(0x2b3)] === f || R[kA(0x1b3)] === f));
896
- if (V === -0x1)
897
- throw CustomError['shield'](ErrorCode[kA(0x2c4)]);
898
- return V;
899
- }
900
- ['getDatasetByTarget'](f) {
901
- const kj = h;
902
- return this[kj(0x363)]()[this[kj(0x252)](f)];
903
- }
904
- ['getGroupedDatasetIndexes'](f) {
905
- const km = h, n = this['requireDatasets'](), V = n[f]?.[km(0x370)];
906
- if (V === undefined || V === null || V === '')
907
- return [f];
908
- return n['reduce']((R, N, t) => {
909
- const kS = h;
910
- return N?.[kS(0x370)] === V && R[kS(0x35c)](t), R;
911
- }, []);
912
- }
913
- ['setDatasetVisibilityState'](f, n) {
914
- const ks = h;
915
- f[ks(0x1c9)] = n, f[ks(0x2fc)] = !n;
916
- }
917
- [D(0x2ce)](f) {
918
- const kU = h;
919
- if (typeof f['_visible'] === 'boolean')
920
- return f[kU(0x1c9)];
921
- return !f['hidden'];
922
- }
923
- ['clone']() {
924
- const kr = h, f = Object['create'](Object['getPrototypeOf'](this));
925
- return Object['assign'](f, this), f['labels'] = this[kr(0x2f0)](this[kr(0x1f7)]), f['_datasets'] = this['cloneValue'](this['datasets']), f[kr(0x2d6)] = this[kr(0x2f0)](this[kr(0x2d6)]), f['plugins'] = this['clonePlugins'](this['plugins']), f;
926
- }
927
- ['copy']() {
928
- return this['clone']();
929
- }
930
- [D(0x326)](f, required) {
931
- const kK = h, n = StzUtils['isArray'](f) ? [...f] : [], V = new Set(n['map'](R => R?.['id'])[kK(0x2ad)](Boolean));
932
- return required['forEach'](R => {
933
- const kB = h, N = R?.['id'];
934
- if (!N || !V[kB(0x366)](N)) {
935
- n['push'](R);
936
- if (N)
937
- V[kB(0x260)](N);
938
- }
939
- }), n;
940
- }
941
- ['setPlugin'](f, n = !![]) {
942
- const kx = h;
943
- !this[kx(0x37c)] && (this['plugins'] = []);
944
- if (StzUtils['isArray'](f))
945
- return f['forEach'](V => this['setPlugin'](V, n)), this;
946
- if (f['id'] && n) {
947
- const V = this['plugins']['findIndex'](R => R['id'] === f['id']);
948
- if (V !== -0x1)
949
- return this['plugins'][V] = f, this;
950
- }
951
- return this['plugins']['push'](f), this;
952
- }
953
- [D(0x29f)](f) {
954
- const kL = h;
955
- return this[kL(0x2ed)](f);
956
- }
957
- ['removePlugin'](f) {
958
- const kX = h;
959
- if (!this['plugins'] || !StzUtils['isArray'](this[kX(0x37c)]))
960
- return this;
961
- return this['plugins'] = this[kX(0x37c)]['filter'](n => n['id'] !== f), this;
962
- }
963
- ['hasPlugin'](f) {
964
- if (!this['plugins'] || !StzUtils['isArray'](this['plugins']))
965
- return ![];
966
- return this['plugins']['some'](n => n['id'] === f);
967
- }
968
- ['onResize'](f) {
969
- const n = this['options'] = StzUtils['coalesce'](this['options'], {});
970
- return n['onResize'] = (V, R) => {
971
- f(V, R);
972
- }, this;
973
- }
974
- ['setTitle'](f) {
975
- const h0 = h, n = this[h0(0x2d6)] = StzUtils[h0(0x2d3)](this['options'], {}), V = n['plugins'] = StzUtils[h0(0x2d3)](n['plugins'], {});
976
- return V['title'] = {
977
- 'display': !![],
978
- ...f
979
- }, this;
980
- }
981
- ['setLegend'](f) {
982
- const n = this['options'] = StzUtils['coalesce'](this['options'], {}), V = n['plugins'] = StzUtils['coalesce'](n['plugins'], {}), R = StzUtils['merge']({ 'display': !![] }, StzUtils['cloneDeep'](V['legend'] || {}));
983
- return V['legend'] = StzUtils['merge'](R, this['cloneValue'](f)), this;
984
- }
985
- ['setTooltip'](f) {
986
- const h1 = h, n = this['options'] = StzUtils[h1(0x2d3)](this['options'], {}), V = n['plugins'] = StzUtils['coalesce'](n[h1(0x37c)], {}), R = StzUtils['merge']({ 'enabled': !![] }, StzUtils['cloneDeep'](V['tooltip'] || {}));
987
- return V['tooltip'] = StzUtils['merge'](R, this['cloneValue'](f)), this;
988
- }
989
- ['setSpinnerOverlay'](f) {
990
- const h2 = h, n = this['options'] = StzUtils[h2(0x2d3)](this['options'], {});
991
- return n[h2(0x23c)] = this['cloneValue'](f), this;
992
- }
993
- [D(0x1c6)](f) {
994
- const h3 = h, n = this['options'] = StzUtils[h3(0x2d3)](this['options'], {});
995
- return this['options'] = StzUtils['merge'](n, this[h3(0x2f0)](f)), this;
996
- }
997
- ['getChartData'](f) {
998
- const h4 = h;
999
- if (StzUtils['isEmpty'](f))
1000
- throw CustomError[h4(0x2ef)](ErrorCode['DATASET_IDENTIFIER_NOT_FOUND']);
1001
- return this['getDatasetByTarget'](f);
1002
- }
1003
- [D(0x1d3)](f, n) {
1004
- const h5 = h;
1005
- if (StzUtils[h5(0x2b5)](f))
1006
- throw CustomError['shield'](ErrorCode['DATASET_IDENTIFIER_NOT_FOUND']);
1007
- const V = this['requireDatasets'](), R = this[h5(0x252)](f), N = [...V];
1008
- N[R] = n, this['datasets'] = N;
1009
- }
1010
- ['setDatasetStyle'](f, n) {
1011
- const h6 = h, V = this[h6(0x363)](), R = this['resolveDatasetIndex'](f);
1012
- return V[R] = StzUtils['merge'](V[R], this[h6(0x2f0)](n)), this;
1013
- }
1014
- ['setAllDatasetStyle'](f) {
1015
- const n = this['requireDatasets'](), V = this['cloneValue'](f);
1016
- return this['datasets'] = n['map'](R => StzUtils['merge'](R, this['cloneValue'](V))), this;
1017
- }
1018
- ['removeDataset'](f) {
1019
- const n = this['requireDatasets'](), V = this['resolveDatasetIndex'](f);
1020
- return n['splice'](V, 0x1), this;
1021
- }
1022
- [D(0x1f4)](f, n) {
1023
- const h7 = h, V = this['getDatasetByTarget'](f);
1024
- if (!StzUtils[h7(0x319)](V[h7(0x232)]) || V['data']['length'] === 0x0)
1025
- return this;
1026
- if (StzUtils['isUndefined'](n))
1027
- return V[h7(0x232)][h7(0x36c)](), this;
1028
- if (StzUtils['isNumber'](n)) {
1029
- if (n < 0x0 || n >= V['data']['length'])
1030
- throw CustomError[h7(0x2ef)](ErrorCode['NOT_FOUND_DATASET'], h7(0x243) + n + '\x20is\x20out\x20of\x20bounds');
1031
- return V[h7(0x232)][h7(0x3b3)](n, 0x1), this;
1032
- }
1033
- const R = V[h7(0x232)]['findIndex'](N => StzUtils['isObject'](N) && N[h7(0x2b3)] === n);
1034
- if (R === -0x1)
1035
- throw CustomError[h7(0x2ef)](ErrorCode['NOT_FOUND_DATASET'], 'Data\x20identifier\x20' + n + '\x20not\x20found');
1036
- return V[h7(0x232)]['splice'](R, 0x1), this;
1037
- }
1038
- ['clearData'](f) {
1039
- const h8 = h, n = this[h8(0x363)]();
1040
- if (StzUtils['isUndefined'](f))
1041
- return n['forEach'](V => {
1042
- V['data'] = [];
1043
- }), this;
1044
- return this['getDatasetByTarget'](f)['data'] = [], this;
1045
- }
1046
- [D(0x34e)](f, n, V = !![]) {
1047
- const h9 = h, R = this[h9(0x363)](), N = this[h9(0x252)](f), t = R[N];
1048
- if (t[h9(0x1b4)] === 'disabled')
1049
- return this;
1050
- const p = V ? this['getGroupedDatasetIndexes'](N) : [N];
1051
- if (n && t['_toggleBehavior'] === 'radio' && p['length'] > 0x1)
1052
- return p['forEach'](F => {
1053
- this['setDatasetVisibilityState'](R[F], F === N);
1054
- }), this;
1055
- return p['forEach'](F => {
1056
- this['setDatasetVisibilityState'](R[F], n);
1057
- }), this;
1058
- }
1059
- [D(0x2fd)](f, n = !![]) {
1060
- const hk = h, V = this[hk(0x2b6)](f);
1061
- if (V['_toggleBehavior'] === 'disabled')
1062
- return this;
1063
- return this[hk(0x34e)](f, !this[hk(0x2ce)](V), n);
1064
- }
1065
- ['setDatasetGroup'](f, n) {
1066
- const hh = h;
1067
- return this[hh(0x2b6)](f)['_group'] = n, this;
1068
- }
1069
- [D(0x239)](f) {
1070
- const hf = h, n = this['options'] = StzUtils[hf(0x2d3)](this['options'], {}), V = n['scales'] = StzUtils['coalesce'](n['scales'], {});
1071
- V['x'] = {
1072
- ...V['x'],
1073
- 'type': 'realtime'
1074
- };
1075
- const R = n['plugins'] = StzUtils['coalesce'](n['plugins'], {});
1076
- R[hf(0x23d)] = f;
1077
- const N = !StzUtils['isNullOrUndefined'](n[hf(0x21f)]), t = this['datasets']['some'](G => !StzUtils[hf(0x27e)](G?.['parsing'])), p = this['datasets'][hf(0x1ba)](G => {
1078
- const hn = h, I = G?.['data'];
1079
- if (!StzUtils['isArray'](I))
1080
- return ![];
1081
- return I['some'](Y => !StzUtils['isNullOrUndefined'](Y) && !StzUtils[hn(0x1f8)](Y));
1082
- }), F = this;
1083
- return !N && !t && !p && StzUtils['isFunction'](F['setParsingKey']) && F['setParsingKey']('x', 'y'), this;
1084
- }
1085
- }
1086
- const DefaultZoomOptions = {
1087
- 'zoom': {
1088
- 'drag': {
1089
- 'enabled': !![],
1090
- 'borderColor': 'rgba(0,\x20123,\x20255,\x201)',
1091
- 'borderWidth': 0x1,
1092
- 'backgroundColor': D(0x277)
1093
- },
1094
- 'mode': 'xy',
1095
- 'overScaleMode': null
1096
- },
1097
- 'pan': { 'enabled': ![] }
1098
- }, DefaultDataLabelsOptions = {
1099
- 'formatter': function (f, n) {
1100
- return f;
1101
- },
1102
- 'display': function (f) {
1103
- return !![];
1104
- },
1105
- 'color': function (f) {
1106
- return '#000';
1107
- },
1108
- 'font': {
1109
- 'size': 0xd,
1110
- 'weight': 'bold'
1111
- },
1112
- 'anchor': 'end',
1113
- 'align': D(0x32d)
1114
- }, DefaultTimeScaleOptions = {
1115
- 'unit': D(0x275),
1116
- 'tooltipFormat': D(0x2c8),
1117
- 'displayFormats': { 'hour': D(0x1c3) }
1118
- };
1119
- class ChartInstance {
1120
- static ['map'] = new Map();
1121
- static ['register'](f, n) {
1122
- const hV = h;
1123
- this[hV(0x2a1)]['set'](f, n);
1124
- }
1125
- static ['get'](f) {
1126
- return this['map']['get'](f);
1127
- }
1128
- static ['getChart'](f) {
1129
- const n = this['get'](f);
1130
- if (StzUtils['isEmpty'](n))
1131
- throw new CustomError(ErrorCode['UNKNOWN_ERROR']);
1132
- return n;
1133
- }
1134
- static [D(0x216)](f) {
1135
- return this['map']['delete'](f);
1136
- }
1137
- static [D(0x366)](f) {
1138
- return this['map']['has'](f);
1139
- }
1140
- static ['clear']() {
1141
- this['map']['clear']();
1142
- }
1143
- static ['update'](f, n, V = 'default') {
1144
- const hR = h, R = this['get'](f);
1145
- if (StzUtils['isEmpty'](R))
1146
- this['register'](f, n), n[hR(0x380)](V);
1147
- else
1148
- throw new CustomError(ErrorCode['UNKNOWN_ERROR']);
1149
- }
1150
- static [D(0x1d2)](f) {
1151
- const hN = h, n = this[hN(0x220)](f);
1152
- if (StzUtils[hN(0x2b5)](n))
1153
- throw new CustomError(ErrorCode['UNKNOWN_ERROR']);
1154
- n['resize']();
1155
- }
1156
- }
1157
- function resolveChartTarget(f) {
1158
- return typeof f === 'string' ? ChartInstance['getChart'](f) : f;
1159
- }
1160
- function resolveTooltipPosition(f, n) {
1161
- const ht = h, V = n[0x0];
1162
- if (!V)
1163
- return {
1164
- 'x': (f['chartArea']['left'] + f[ht(0x28c)]['right']) / 0x2,
1165
- 'y': (f[ht(0x28c)]['top'] + f['chartArea'][ht(0x1ae)]) / 0x2
1166
- };
1167
- const R = f['getDatasetMeta'](V[ht(0x1ac)])[ht(0x232)][V['index']];
1168
- return {
1169
- 'x': R?.['x'] ?? (f[ht(0x28c)]['left'] + f['chartArea']['right']) / 0x2,
1170
- 'y': R?.['y'] ?? (f['chartArea'][ht(0x2cc)] + f['chartArea']['bottom']) / 0x2
1171
- };
1172
- }
1173
- const CHART_COLOR = [
1174
- '#FF3B30',
1175
- '#FF9500',
1176
- '#FFCC00',
1177
- '#34C759',
1178
- '#00C7BE',
1179
- D(0x2a4),
1180
- '#32ADE6',
1181
- D(0x349),
1182
- D(0x2e7),
1183
- '#AF52DE'
1184
- ];
1185
- function getChartInstance(f) {
1186
- return resolveChartTarget(f);
1187
- }
1188
- function resetChartZoom(f) {
1189
- const hp = h, n = resolveChartTarget(f);
1190
- n[hp(0x3a0)]?.();
1191
- }
1192
- function updateChart(f, n) {
1193
- resolveChartTarget(f)['update'](n);
1194
- }
1195
- function resizeChart(f) {
1196
- resolveChartTarget(f)['resize']();
1197
- }
1198
- function setChartActiveElements(f, n) {
1199
- resolveChartTarget(f)['setActiveElements'](n);
1200
- }
1201
- function clearChartActiveElements(f) {
1202
- resolveChartTarget(f)['setActiveElements']([]);
1203
- }
1204
- function setChartDatasetVisibility(f, n, V) {
1205
- const R = resolveChartTarget(f);
1206
- R['setDatasetVisibility'](n, V), R['update']();
1207
- }
1208
- function toggleChartDatasetVisibility(f, n) {
1209
- const hF = h, V = resolveChartTarget(f), R = !V[hF(0x246)](n);
1210
- return V['setDatasetVisibility'](n, R), V[hF(0x380)](), R;
1211
- }
1212
- function isChartDatasetVisible(f, n) {
1213
- return resolveChartTarget(f)['isDatasetVisible'](n);
1214
- }
1215
- function h(f, n) {
1216
- f = f - 0x197;
1217
- const V = k();
1218
- let R = V[f];
1219
- return R;
1220
- }
1221
- function showChartTooltip(f, n, V) {
1222
- const R = resolveChartTarget(f), N = R['tooltip'], t = V ?? resolveTooltipPosition(R, n);
1223
- R['setActiveElements'](n), N?.['setActiveElements']?.(n, t), R['update']();
1224
- }
1225
- function hideChartTooltip(f) {
1226
- const hG = h, n = resolveChartTarget(f), V = n[hG(0x358)];
1227
- n['setActiveElements']([]), V?.[hG(0x36a)]?.([], {
1228
- 'x': 0x0,
1229
- 'y': 0x0
1230
- }), n['update']();
1231
- }
1232
- function getChartDatasetMeta(f, n) {
1233
- const hI = h;
1234
- return resolveChartTarget(f)[hI(0x20c)](n);
1235
- }
1236
- function downloadChartAsImage(f, n = {}) {
1237
- downloadChartAsImageByInstance(resolveChartTarget(f), n);
1238
- }
1239
- function downloadChartAsImageByInstance(f, n = {}) {
1240
- const hY = h, {
1241
- format: format = 'png',
1242
- quality: quality = 0.95,
1243
- backgroundColor: V,
1244
- filename: R,
1245
- scale: scale = 0x1
1246
- } = n, N = f['canvas'];
1247
- if (!N)
1248
- throw new CustomError(ErrorCode[hY(0x33d)]);
1249
- let t;
1250
- if (scale !== 0x1 || V) {
1251
- const F = document['createElement'](hY(0x21e)), G = F['getContext']('2d');
1252
- if (!G)
1253
- throw new CustomError(ErrorCode[hY(0x33d)]);
1254
- F['width'] = N['width'] * scale, F['height'] = N['height'] * scale, V && (G['fillStyle'] = V, G['fillRect'](0x0, 0x0, F[hY(0x36e)], F['height'])), G['scale'](scale, scale), G['drawImage'](N, 0x0, 0x0), t = F['toDataURL']('image/' + format, quality);
1255
- } else
1256
- t = N['toDataURL']('image/' + format, quality);
1257
- const p = document['createElement']('a');
1258
- p['download'] = R || 'chart-' + Date[hY(0x2e0)]() + '.' + format, p['href'] = t, document['body']['appendChild'](p), p['click'](), document['body']['removeChild'](p);
1259
- }
1260
- function getChartAsBase64(f, n = {}) {
1261
- return getChartAsBase64ByInstance(resolveChartTarget(f), n);
1262
- }
1263
- function getChartAsBase64ByInstance(f, n = {}) {
1264
- const hH = h, {
1265
- format: format = 'png',
1266
- quality: quality = 0.95,
1267
- backgroundColor: V,
1268
- scale: scale = 0x1
1269
- } = n, R = f['canvas'];
1270
- if (!R)
1271
- throw new CustomError(ErrorCode[hH(0x33d)]);
1272
- if (scale !== 0x1 || V) {
1273
- const N = document['createElement']('canvas'), t = N['getContext']('2d');
1274
- if (!t)
1275
- throw new CustomError(ErrorCode['UNKNOWN_ERROR']);
1276
- return N['width'] = R['width'] * scale, N['height'] = R[hH(0x2ac)] * scale, V && (t['fillStyle'] = V, t['fillRect'](0x0, 0x0, N['width'], N['height'])), t['scale'](scale, scale), t['drawImage'](R, 0x0, 0x0), N['toDataURL'](hH(0x1f1) + format, quality);
1277
- }
1278
- return R['toDataURL']('image/' + format, quality);
1279
- }
1280
- function getChartAsBlob(f, n = {}) {
1281
- return getChartAsBlobByInstance(resolveChartTarget(f), n);
1282
- }
1283
- function k() {
1284
- const RP = [
1285
- '402436OOgYyU',
1286
- 'legend-box',
1287
- 'readValueByPath',
1288
- 'Invalid\x20rgb\x20color',
1289
- 'hostname',
1290
- 'test',
1291
- 'data',
1292
- 'mountChart',
1293
- 'RGB\x20values\x20must\x20be\x20between\x200\x20and\x20255',
1294
- 'type\x20=\x20',
1295
- '12px',
1296
- 'requestAnimationFrame',
1297
- '_data',
1298
- 'addStreaming',
1299
- 'extractParsedPointValue',
1300
- 'line',
1301
- 'spinnerOverlay',
1302
- 'streaming',
1303
- 'offset',
1304
- 'autoLimits',
1305
- 'maildrop.cc',
1306
- 'intersect',
1307
- 'moveTo',
1308
- 'Data\x20index\x20',
1309
- 'setDatasetVisibility',
1310
- '_noDataAct',
1311
- 'isDatasetVisible',
1312
- 'CHART_ALREADY_INITIALIZED',
1313
- 'th,\x20td',
1314
- '700',
1315
- 'getMonth',
1316
- 'Object',
1317
- 'errorLogging',
1318
- '600\x20',
1319
- 'Date',
1320
- 'doughnut',
1321
- '_pt_',
1322
- 'isScatter',
1323
- 'resolveDatasetIndex',
1324
- 'setCircumference',
1325
- 'setLocalStorageByKey',
1326
- 'isBoolean',
1327
- 'INVALID_AXIS_KEY',
1328
- 'toFloat',
1329
- 'clientX',
1330
- '_isGroupLabel',
1331
- 'appendChild',
1332
- '4px',
1333
- '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*(),.?\x22:{}|<>])[a-zA-Z0-9!@#$%^&*(),.?\x22:{}|<>]{10,20}$',
1334
- 'setLineDash',
1335
- 'silentMode',
1336
- '_aux',
1337
- 'add',
1338
- 'requireLabels',
1339
- '22PUKZGA',
1340
- '_datasets',
1341
- 'root',
1342
- 'fillStyle',
1343
- 'suggestedMin',
1344
- 'querySelector',
1345
- 'bubble',
1346
- 'hasUpperCase',
1347
- 'middle',
1348
- 'responsive',
1349
- 'circlePosition',
1350
- 'unknown',
1351
- 'ChartTypes',
1352
- '_originalGenerateLabels',
1353
- 'resolveMustHavePlugins',
1354
- 'getChartAsBlobByInstance',
1355
- 'Axis\x20\x22',
1356
- 'barScaleImgPlugin',
1357
- 'ChartFactory',
1358
- 'hour',
1359
- 'className',
1360
- 'rgba(0,\x20123,\x20255,\x200.1)',
1361
- 'zeroConvert',
1362
- 'isDragging',
1363
- 'match',
1364
- 'original',
1365
- 'order',
1366
- 'fillRect',
1367
- 'isNullOrUndefined',
1368
- 'configAop',
1369
- 'startsWith',
1370
- 'isChartDatasetVisible',
1371
- '1889652gTvdbw',
1372
- 'table.csv',
1373
- 'setCutout',
1374
- 'mouseleave',
1375
- 'Invalid\x20hex\x20color\x20format',
1376
- '_originalLegendOnClick',
1377
- 'drawImage',
1378
- 'repeat',
1379
- 'CartesianChartWrapper',
1380
- 'getData',
1381
- 'chartArea',
1382
- '_loadingScheduled',
1383
- 'Dataset\x20index\x20',
1384
- 'fill',
1385
- 'doughnut-center-text',
1386
- 'generateLabels',
1387
- 'normal',
1388
- 'DefaultDataLabelsOptions',
1389
- 'normalizeLimitValue',
1390
- 'INVALID_BAR_THICKNESS',
1391
- 'EMPTY_REQUIRED_PROPERTY',
1392
- 'setBackgroundColor',
1393
- 'setBorderRadius',
1394
- '_destroyed',
1395
- 'hexToRgb',
1396
- 'Bar\x20thickness\x20must\x20be\x20a\x20positive\x20number.',
1397
- 'cloneNode',
1398
- 'isArr',
1399
- 'backgroundColor',
1400
- 'makeConfig',
1401
- 'NOT_REGISTERED_CHART_TYPE',
1402
- 'map',
1403
- 'highlightThresholdPlugin',
1404
- 'callbacks',
1405
- '#30B0C7',
1406
- 'isNull',
1407
- 'black',
1408
- 'setStacked',
1409
- 'removeEventListener',
1410
- 'clonePlugins',
1411
- 'INVALID_CATEGORY_PERCENTAGE',
1412
- 'addColorStop',
1413
- 'height',
1414
- 'filter',
1415
- 'value',
1416
- 'roundRect',
1417
- 'setBubbleDataRadiusByName',
1418
- 'maxBarThickness',
1419
- 'This\x20chart\x20type\x20is\x20not\x20registered.\x20Please\x20call\x20ChartWrapper.register().',
1420
- '_uid',
1421
- 'hexToRgba',
1422
- 'isEmpty',
1423
- 'getDatasetByTarget',
1424
- 'detail',
1425
- 'setAllFill',
1426
- 'ctx',
1427
- 'set',
1428
- 'setBubbleDataRadius',
1429
- 'end',
1430
- 'mountChart\x20requires\x20a\x20stable\x20chart\x20id.\x20Call\x20build(\x22chart-id\x22)\x20first.',
1431
- 'rgbaToRgb',
1432
- 'setMaxBarThickness',
1433
- 'getTime',
1434
- 'strokeStyle',
1435
- 'LineChart',
1436
- 'imageCache',
1437
- 'NOT_FOUND_DATASET',
1438
- 'Dataset\x20at\x20index\x20',
1439
- 'textClassName',
1440
- 'ensureZoomResetPlugin',
1441
- 'yyyy-MM-dd\x20HH:mm',
1442
- '<div>',
1443
- 'mode',
1444
- '70QRVAXj',
1445
- 'top',
1446
- 'register',
1447
- 'getDatasetVisibilityState',
1448
- 'rgba(255,\x20255,\x20255,\x200.92)',
1449
- '50%',
1450
- 'dispostable.com',
1451
- 'chartId',
1452
- 'coalesce',
1453
- 'mousedown',
1454
- '_chartId',
1455
- 'options',
1456
- 'pointer',
1457
- 'rgb(26,110,255)',
1458
- 'addEventListener',
1459
- 'textAlign',
1460
- '#000',
1461
- 'error',
1462
- '^[a-zA-Z0-9가-힣_]+$',
1463
- 'item',
1464
- 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMyMmM1NWUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPgogIDxwYXRoIGQ9Ik04IDEybDIgMiA0LTQiLz4KPC9zdmc+',
1465
- 'now',
1466
- 'setBorderColor',
1467
- 'OPTIONS_REQUIRED',
1468
- 'isZoomedOrPanned',
1469
- 'padding',
1470
- 'scales',
1471
- 'borderRadius',
1472
- '#5856D6',
1473
- 'GRADIENT_STEP_MINIMUM',
1474
- 'raw',
1475
- 'setParsingKey',
1476
- 'maskPhoneNumber',
1477
- 'fillText',
1478
- 'build',
1479
- 'Datasets\x20cannot\x20be\x20empty.',
1480
- 'shield',
1481
- 'cloneValue',
1482
- 'Boolean',
1483
- 'PieChart',
1484
- 'then',
1485
- '_groupLabel',
1486
- 'T$settingBtnRect',
1487
- 'string',
1488
- 'LABELS_NOT_SUPPORTED',
1489
- 'Failed\x20to\x20load\x20image:\x20',
1490
- 'list-container',
1491
- 'origin',
1492
- 'zoomLimits',
1493
- 'hidden',
1494
- 'toggleDataset',
1495
- '_legendOrder',
1496
- 'pie',
1497
- 'isUndefined',
1498
- 'getPixelForValue',
1499
- 'getCenterPoint',
1500
- '\x20-\x20',
1501
- 'getDay',
1502
- '%c[',
1503
- '(.)\x5c1{3,}',
1504
- 'isValidEmail',
1505
- 'indexOf',
1506
- 'barThickness',
1507
- 'save',
1508
- 'legendHitBoxes',
1509
- 'dataset',
1510
- '5714136UpRErB',
1511
- 'decorateDataset',
1512
- 'isValidPassword',
1513
- 'category',
1514
- 'LABELS_REQUIRED',
1515
- ':\x20(',
1516
- 'firstChild',
1517
- 'enabled',
1518
- 'Array',
1519
- 'setAllCategoryPercentage',
1520
- 'Invalid\x20axis\x20key\x20provided.\x20Please\x20check\x20the\x20axis\x20configuration.',
1521
- 'treemap',
1522
- 'isArray',
1523
- 'right',
1524
- '_datasetIndex',
1525
- 'setSegmentOffset',
1526
- 'omit',
1527
- 'applyGlobalZoomConfig',
1528
- 'TreemapChartWrapper',
1529
- 'customLegend',
1530
- 'config',
1531
- 'setData',
1532
- 'setHalfPieRight',
1533
- 'T$isHover',
1534
- 'div',
1535
- 'mergePlugins',
1536
- 'font',
1537
- 'draw',
1538
- 'createElement',
1539
- 'Cannot\x20remove\x20a\x20non-existing\x20plugin.',
1540
- 'http',
1541
- 'INVALID_TIME_SCALE',
1542
- 'center',
1543
- '15qQsFpD',
1544
- 'setGradient',
1545
- 'forEach',
1546
- 'removeAllGradients',
1547
- 'getLocalStorageByKey',
1548
- 'drawLoadingPlaceholder',
1549
- 'image',
1550
- 'zoomRangeSlider',
1551
- 'borderColor',
1552
- 'rgba(',
1553
- 'scatter',
1554
- 'revokeObjectURL',
1555
- 'setGrid',
1556
- 'setZoom',
1557
- 'arc',
1558
- 'UNKNOWN_ERROR',
1559
- 'findIndex',
1560
- 'rgba(37,\x2099,\x20235,\x200.18)',
1561
- 'IMAGE_PROPERTY_MISSING',
1562
- 'split',
1563
- '\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22text-danger\x22>',
1564
- 'type',
1565
- 'random',
1566
- 'trade_price',
1567
- 'makeCenterHtml',
1568
- '^[0-9]{',
1569
- 'column',
1570
- '#007AFF',
1571
- 'object',
1572
- '_zoomResetBtnDom',
1573
- 'start',
1574
- 'BubbleChartWrapper',
1575
- 'setDatasetVisible',
1576
- 'borderWidth',
1577
- 'Dataset\x20',
1578
- 'time',
1579
- 'isNotBlank',
1580
- 'charCodeAt',
1581
- 'containerID',
1582
- 'getChartAsBase64',
1583
- 'trim',
1584
- 'setChartDatasetVisibility',
1585
- 'tooltip',
1586
- 'substring',
1587
- 'clearChartActiveElements',
1588
- 'toUpperCase',
1589
- 'push',
1590
- 'restore',
1591
- 'isObj',
1592
- 'spinnerColor',
1593
- 'button',
1594
- 'yAxisID',
1595
- 'setItem',
1596
- 'requireDatasets',
1597
- 'disabled',
1598
- 'ownKeys',
1599
- 'has',
1600
- 'setPointHoverRadius',
1601
- 'mustHavePlugins',
1602
- '\x22\x20already\x20exists',
1603
- 'setActiveElements',
1604
- '_tooltip',
1605
- 'pop',
1606
- 'min',
1607
- 'width',
1608
- 'sort',
1609
- '_group',
1610
- 'Chart\x20instance\x20is\x20not\x20initialized.',
1611
- 'PARAMETER_TYPE_MISMATCH',
1612
- 'stroke',
1613
- 'isString',
1614
- 'setAllBubbleRadius',
1615
- 'tree',
1616
- 'stacked',
1617
- 'textContent',
1618
- 'spinnerClassName',
1619
- '30px\x20Arial',
1620
- 'var',
1621
- 'plugins',
1622
- '_Default',
1623
- 'chart-legend-tooltip',
1624
- 'linear',
1625
- 'update',
1626
- '#4285f4',
1627
- 'assignedTasks',
1628
- '\x22\x20has\x20no\x20image\x20property',
1629
- 'setAllBorderColor',
1630
- 'changeSetting',
1631
- 'index',
1632
- 'style',
1633
- 'legend',
1634
- '1650wwoixl',
1635
- 'removeZoomResetPlugin',
1636
- 'text/csv;charset=utf-8;',
1637
- 'createDefaultTreemapOptions',
1638
- 'nearest',
1639
- 'relative',
1640
- 'isBar',
1641
- 'registry',
1642
- 'setRotation',
1643
- '1080Nmpjje',
1644
- 'radius',
1645
- ':\x20Invalid\x20date\x20format.\x20Expected\x20yyyy-mm-dd,\x20got:\x20',
1646
- 'defineProperty',
1647
- 'Dataset\x20identifier\x20not\x20found.',
1648
- '_groupDatasets',
1649
- 'rgba(66,\x20133,\x20244,\x200.2)',
1650
- 'localStorage',
1651
- 'zoom',
1652
- 'toLowerCase',
1653
- '),\x20크기:\x20',
1654
- 'hex',
1655
- 'none',
1656
- 'legend-item',
1657
- 'resetZoom',
1658
- 'createAssignedTasksPlugin',
1659
- 'Value:\x20',
1660
- 'includes',
1661
- 'categoryPercentage',
1662
- 'setPointRadius',
1663
- 'clear',
1664
- 'getChart',
1665
- 'rgba(0,0,0,0.7)',
1666
- '_tooltips',
1667
- '_initVisible',
1668
- 'setAllBorderWidth',
1669
- 'onload',
1670
- 'firstDataset',
1671
- 'PLUGIN_REMOVE_FAILED',
1672
- 'defaultDoughnutTooltipCallback',
1673
- 'Invalid\x20rgb\x20format',
1674
- 'lineTo',
1675
- 'sparkLineChart',
1676
- 'splice',
1677
- 'tension',
1678
- 'Null',
1679
- 'assign',
1680
- 'lineCap',
1681
- 'ticks',
1682
- 'Invalid\x20rgba\x20format',
1683
- 'Colors\x20array\x20length\x20(',
1684
- 'String',
1685
- 'isFinite',
1686
- 'mouseup',
1687
- 'lineWidth',
1688
- 'calculateGradientPositions',
1689
- '_settingMoveHandler',
1690
- 'classList',
1691
- 'setSpacing',
1692
- 'staff',
1693
- 'event',
1694
- 'spacing',
1695
- 'merge',
1696
- 'bar',
1697
- 'NOT_SUPPORTED_OPTION',
1698
- '#ffffff',
1699
- 'datasetIndex',
1700
- 'Number',
1701
- 'bottom',
1702
- 'create',
1703
- 'T$opts',
1704
- 'PLUGIN_NOT_FOUND',
1705
- '_mounted',
1706
- 'label',
1707
- '_toggleBehavior',
1708
- '\x20is\x20out\x20of\x20bounds',
1709
- 'toString',
1710
- 'getBoundingClientRect',
1711
- 'CHART_TYPE_REQUIRED',
1712
- 'toBlob',
1713
- 'some',
1714
- 'borderSkipped',
1715
- 'day',
1716
- 'rgba(0,150,255,0.8)',
1717
- 'AXIS_KEY_REQUIRED',
1718
- 'DATASET_IDENTIFIER_NOT_FOUND',
1719
- 'GRADIENT_COLOR_STEP_MISMATCH',
1720
- 'getElementById',
1721
- 'max',
1722
- 'HH:mm',
1723
- 'spinnerTrackColor',
1724
- 'setSegmentColors',
1725
- 'mergeOptions',
1726
- 'Gradient\x20steps\x20must\x20be\x20at\x20least\x202',
1727
- 'createDefaultBubbleOptions',
1728
- '_visible',
1729
- 'mousemove',
1730
- 'box',
1731
- 'floor',
1732
- 'DOUGHNUT',
1733
- 'replace',
1734
- 'yAxisKey',
1735
- 'setPlugin',
1736
- 'INVALID_BAR_PERCENTAGE',
1737
- 'resize',
1738
- 'setChartData',
1739
- 'isUrl',
1740
- 'slice',
1741
- 'text',
1742
- 'CustomError',
1743
- '413478zldBtq',
1744
- '</span><span\x20class=\x22text-white\x22>/</span>',
1745
- 'warn',
1746
- 'getType',
1747
- 'A\x20required\x20property\x20is\x20missing\x20in\x20the\x20dataset\x20or\x20options.',
1748
- 'applyGlobalPluginConfig',
1749
- 'setCategoryPercentage',
1750
- 'unique',
1751
- 'resetChartZoom',
1752
- '_ds_',
1753
- 'toCamelCase',
1754
- 'position',
1755
- 'defaultBubbleScales',
1756
- 'DATA_LENGTH_MISMATCH',
1757
- 'addComma',
1758
- 'spinner',
1759
- 'setBorderWidth',
1760
- 'left',
1761
- 'default',
1762
- '_loadingPending',
1763
- 'mask',
1764
- '94390YzxGMh',
1765
- 'updatePosition',
1766
- 'htmlLegend',
1767
- 'showChartTooltip',
1768
- 'image/',
1769
- 'isDisposableEmail',
1770
- 'master',
1771
- 'removeData',
1772
- '_centerTextDiv',
1773
- 'addData',
1774
- 'labels',
1775
- 'isObject',
1776
- 'INVALID_DATA_STRUCTURE',
1777
- 'isNumber',
1778
- 'display',
1779
- 'adapters',
1780
- 'legendItems',
1781
- 'CHART_INSTANCE_NOT_FOUND',
1782
- 'T$settingImg',
1783
- 'grid',
1784
- 'length',
1785
- 'parse',
1786
- 'removeWhitespace',
1787
- 'isBlank',
1788
- 'undefined',
1789
- 'keys',
1790
- 'chart.js',
1791
- 'normalize',
1792
- '1197qVeVjS',
1793
- '_noData',
1794
- '\x20support\x20yAxisId\x20option',
1795
- 'getDatasetMeta',
1796
- 'datasets',
1797
- 'normalizeZoomOptions',
1798
- 'toZoomScaleLimits',
1799
- 'DATASET_REQUIRED',
1800
- 'join',
1801
- 'parsed',
1802
- 'getItem',
1803
- 'setBubbleRadius',
1804
- 'Alpha\x20value\x20must\x20be\x20between\x200.0\x20and\x201.0',
1805
- 'unregister',
1806
- 'freeze',
1807
- 'iconSize',
1808
- 'N/A',
1809
- 'onClick',
1810
- 'maintainAspectRatio',
1811
- 'interaction',
1812
- 'sparkBarOptions',
1813
- 'canvas',
1814
- 'parsing',
1815
- 'get',
1816
- 'xAxisKey',
1817
- 'removePlugin',
1818
- 'cloneDeep',
1819
- 'horizontal',
1820
- '73736sNNfTf',
1821
- '_loadingActive',
1822
- 'setHoverRadius',
1823
- 'white',
1824
- 'beginPath',
1825
- 'resolveAutoZoomLimits',
1826
- '#e0e0e0'
1827
- ];
1828
- k = function () {
1829
- return RP;
1830
- };
1831
- return k();
1832
- }
1833
- function getChartAsBlobByInstance(f, n = {}) {
1834
- const {
1835
- format: format = 'png',
1836
- quality: quality = 0.95,
1837
- backgroundColor: V,
1838
- scale: scale = 0x1
1839
- } = n, R = f['canvas'];
1840
- if (!R)
1841
- return Promise['reject'](new CustomError(ErrorCode['UNKNOWN_ERROR']));
1842
- return new Promise((N, t) => {
1843
- const hg = h;
1844
- if (scale !== 0x1 || V) {
1845
- const p = document['createElement'](hg(0x21e)), F = p['getContext']('2d');
1846
- if (!F) {
1847
- t(new CustomError(ErrorCode['UNKNOWN_ERROR']));
1848
- return;
1849
- }
1850
- p[hg(0x36e)] = R[hg(0x36e)] * scale, p['height'] = R['height'] * scale, V && (F['fillStyle'] = V, F['fillRect'](0x0, 0x0, p[hg(0x36e)], p['height'])), F['scale'](scale, scale), F[hg(0x288)](R, 0x0, 0x0), p['toBlob'](G => {
1851
- G ? N(G) : t(new CustomError(ErrorCode['UNKNOWN_ERROR']));
1852
- }, 'image/' + format, quality);
1853
- } else
1854
- R[hg(0x1b9)](G => {
1855
- G ? N(G) : t(new CustomError(ErrorCode['UNKNOWN_ERROR']));
1856
- }, 'image/' + format, quality);
1857
- });
1858
- }
1859
- const DEFAULT_STATUS_ICONS = {
1860
- 0x1: D(0x2df),
1861
- 0x2: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmNTllMGIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPgogIDxwYXRoIGQ9Ik0xMiA2djZsNCAyIi8+Cjwvc3ZnPg==',
1862
- 0x3: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM5NGEzYjgiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPgogIDxsaW5lIHgxPSIxMiIgeTE9IjgiIHgyPSIxMiIgeTI9IjEyIi8+CiAgPGxpbmUgeDE9IjEyIiB5MT0iMTYiIHgyPSIxMi4wMSIgeTI9IjE2Ii8+Cjwvc3ZnPg=='
1863
- }, createTodayLinePlugin = (f = D(0x2d8), n = 'TODAY') => {
1864
- return {
1865
- 'id': 'todayLine',
1866
- 'afterDatasetsDraw'(V, R, N) {
1867
- const hd = h, {
1868
- ctx: t,
1869
- chartArea: {
1870
- top: p,
1871
- bottom: F,
1872
- left: G,
1873
- right: I
1874
- },
1875
- scales: {x: Y}
1876
- } = V;
1877
- t['save'](), Y[hd(0x301)](new Date()) >= G && Y['getPixelForValue'](new Date()) <= I && (t['beginPath'](), t['lineWidth'] = 0x3, t['strokeStyle'] = f, t[hd(0x25d)]([
1878
- 0x5,
1879
- 0x5
1880
- ]), t['moveTo'](Y['getPixelForValue'](new Date()), p), t[hd(0x3b1)](Y['getPixelForValue'](new Date()), F), t['stroke'](), t['setLineDash']([]), t['beginPath'](), t['lineWidth'] = 0x3, t['strokeStyle'] = f, t['fillStyle'] = f, t[hd(0x242)](Y[hd(0x301)](new Date()), p + 0x3), t['lineTo'](Y['getPixelForValue'](new Date()) - 0x6, p - 0x6), t['lineTo'](Y['getPixelForValue'](new Date()) + 0x6, p - 0x6), t['closePath'](), t['stroke'](), t['fill'](), t[hd(0x35d)](), t['font'] = 'bold\x2012px\x20sans-serif', t[hd(0x265)] = f, t['textAlign'] = hd(0x32d), t[hd(0x2ec)](n, Y[hd(0x301)](new Date()), F + 0xf), t[hd(0x35d)]());
1881
- }
1882
- };
1883
- }, createWeekendPlugin = (f = 'rgba(102,\x20102,\x20102,\x200.2)') => {
1884
- return {
1885
- 'id': 'weekendLine',
1886
- 'beforeDatasetsDraw'(n, V, R) {
1887
- const hO = h, {
1888
- ctx: N,
1889
- chartArea: {
1890
- top: t,
1891
- height: p
1892
- },
1893
- scales: {x: F}
1894
- } = n;
1895
- N[hO(0x30a)](), F['ticks'][hO(0x330)]((G, I) => {
1896
- const hT = h, Y = new Date(G['value'])[hT(0x304)]();
1897
- (Y === 0x0 || Y === 0x6) && (N[hT(0x265)] = f, N['fillRect'](F['getPixelForValue'](G['value']), t, F[hT(0x301)](new Date(G[hT(0x2ae)])['setHours'](0x18)) - F[hT(0x301)](G[hT(0x2ae)]), p));
1898
- }), N['restore']();
1899
- }
1900
- };
1901
- }, createStatusPlugin = (f, n = 'status') => {
1902
- const V = f || DEFAULT_STATUS_ICONS;
1903
- return {
1904
- 'id': 'status',
1905
- 'imageCache': {},
1906
- 'afterDatasetsDraw'(R, N, t) {
1907
- const {
1908
- ctx: p,
1909
- data: F,
1910
- chartArea: {right: G},
1911
- scales: {y: I}
1912
- } = R;
1913
- p['save'](), F['datasets']['forEach']((Y, H) => {
1914
- const hw = h;
1915
- if (!Y['data'] || !StzUtils['isArray'](Y[hw(0x232)]))
1916
- return;
1917
- Y[hw(0x232)][hw(0x330)]((g, d) => {
1918
- const hW = h, O = g[n], T = V[O];
1919
- if (!T)
1920
- return;
1921
- if (!this[hW(0x2c3)][O]) {
1922
- const W = new Image();
1923
- W['src'] = T, this['imageCache'][O] = W, W[hW(0x3ac)] = () => {
1924
- R['update']();
1925
- };
1926
- }
1927
- const w = this[hW(0x2c3)][O];
1928
- if (w['complete']) {
1929
- const C = 0x14;
1930
- p['drawImage'](w, G + 0x1e, I['getPixelForValue'](d) - C / 0x2, C, C);
1931
- }
1932
- });
1933
- }), p['restore']();
1934
- }
1935
- };
1936
- }, createAssignedTasksPlugin = (f = 'assignee', n = {}) => {
1937
- const hC = h, V = {
1938
- 'font': 'bold\x2012px\x20sans-serif',
1939
- 'color': hC(0x2a6),
1940
- 'x': 0xa,
1941
- 'textAlign': 'left',
1942
- 'textBaseline': 'middle',
1943
- ...n
1944
- };
1945
- return {
1946
- 'id': hC(0x382),
1947
- 'afterDatasetsDraw'(R, N, t) {
1948
- const he = h, {
1949
- ctx: p,
1950
- data: F,
1951
- scales: {y: G}
1952
- } = R;
1953
- p[he(0x30a)](), p['font'] = V[he(0x327)], p[he(0x265)] = V['color'], p['textBaseline'] = V['textBaseline'], p[he(0x2da)] = V[he(0x2da)], F['datasets']['forEach'](I => {
1954
- const hQ = h;
1955
- if (!I['data'] || !StzUtils['isArray'](I[hQ(0x232)]))
1956
- return;
1957
- I['data']['forEach']((Y, H) => {
1958
- const hE = h, g = Y[f];
1959
- !StzUtils['isNullOrUndefined'](g) && p['fillText'](g[hE(0x1b6)](), V['x'], G['getPixelForValue'](H));
1960
- });
1961
- }), p['restore']();
1962
- }
1963
- };
1964
- }, noDataPlugin = {
1965
- 'id': 'noDataPlugin',
1966
- 'beforeUpdate': function (f) {
1967
- },
1968
- 'afterDraw': function (f) {
1969
- const hP = h;
1970
- if (f['_loadingActive'])
1971
- return;
1972
- const n = f['config']['type'];
1973
- let V = ![];
1974
- if (n === 'treemap') {
1975
- const R = f['data']['datasets']?.[0x0]?.[hP(0x376)];
1976
- V = !StzUtils[hP(0x319)](R) || R['length'] === 0x0;
1977
- } else
1978
- V = !f[hP(0x232)][hP(0x20d)] || !StzUtils['isArray'](f[hP(0x232)]['datasets'][0x0]?.['data']) || f['data'][hP(0x20d)][0x0]['data']['length'] === 0x0;
1979
- f['_noDataAct'] = V;
1980
- if (V) {
1981
- const N = f['ctx'], t = f['width'], p = f['height'], {
1982
- text: text = 'No\x20Data',
1983
- color: F
1984
- } = f['options']?.[hP(0x20a)] || {};
1985
- N['save'](), N['textAlign'] = 'center', N['textBaseline'] = hP(0x26a), N[hP(0x327)] = hP(0x37a);
1986
- if (F)
1987
- N[hP(0x265)] = F;
1988
- N['fillText'](text, t / 0x2, p / 0x2), N['restore']();
1989
- }
1990
- },
1991
- 'beforeDestroy'(f) {
1992
- const hJ = h;
1993
- console['log']('차트\x20사라짐\x20,\x20' + f['canvas']['id']), delete f[hJ(0x245)], f[hJ(0x3aa)] = ![], f['_initVisibleComp'] && delete f['_initVisibleComp'];
1994
- }
1995
- }, zoomResetPlugin = {
1996
- 'id': 'zoomResetButton',
1997
- 'afterDraw'(f, n, V) {
1998
- const hu = h, R = f['canvas'], N = R['parentNode'];
1999
- if (f['_zoomResetBtnDom'])
2000
- return;
2001
- getComputedStyle(N)[hu(0x1e3)] === 'static' && (N['style'][hu(0x1e3)] = hu(0x38e));
2002
- const t = document['createElement'](hu(0x360));
2003
- t['innerText'] = 'Zoom\x20Reset', t['className'] = 'chart-zoom-reset-btn', Object['assign'](t[hu(0x387)], {
2004
- 'position': 'absolute',
2005
- 'zIndex': '10',
2006
- 'padding': '4px\x208px',
2007
- 'fontSize': '12px',
2008
- 'background': hu(0x3a8),
2009
- 'color': '#fff',
2010
- 'border': '1px\x20solid\x20#fff',
2011
- 'borderRadius': hu(0x25b),
2012
- 'cursor': 'pointer',
2013
- 'display': hu(0x39e)
2014
- }), t['onclick'] = () => {
2015
- const hc = h;
2016
- f['resetZoom'] && f[hc(0x3a0)](), t[hc(0x387)]['display'] = 'none';
2017
- }, N['appendChild'](t), f['_zoomResetBtnDom'] = t;
2018
- },
2019
- 'afterEvent'(f, n) {
2020
- const hD = h, V = f[hD(0x34b)];
2021
- if (!V)
2022
- return;
2023
- const R = f[hD(0x2e3)]?.();
2024
- if (!R) {
2025
- V['style'][hD(0x1fb)] = hD(0x39e);
2026
- return;
2027
- }
2028
- const {chartArea: N} = f, t = N[hD(0x31a)] - 0x5a, p = N['top'] + 0xa;
2029
- V['style']['left'] = t + 'px', V['style']['top'] = p + 'px', V['style'][hD(0x1fb)] = 'block';
2030
- }
2031
- }, loadingPlugin = {
2032
- 'id': 'loadingPlugin',
2033
- 'beforeInit'(f) {
2034
- const hl = h;
2035
- f['_loadingPending'] = !![], f['_loadingRenderedOnce'] = ![], f[hl(0x226)] = ![], f['_loadingScheduled'] = ![];
2036
- },
2037
- 'beforeDraw'(f) {
2038
- const hy = h;
2039
- f['_loadingActive'] = Boolean(f['_loadingPending'] && !f['_loadingRenderedOnce']);
2040
- if (!f['_loadingActive'])
2041
- return;
2042
- return this[hy(0x333)](f), f['_loadingRenderedOnce'] = !![], f['_loadingPending'] = ![], !f['_loadingScheduled'] && (f[hy(0x28d)] = !![], requestAnimationFrame(() => {
2043
- const hZ = h;
2044
- if (!f || f[hZ(0x299)] || !f['canvas']?.['isConnected'])
2045
- return;
2046
- f['_loadingActive'] = ![], f['_loadingScheduled'] = ![], f[hZ(0x328)]();
2047
- })), ![];
2048
- },
2049
- 'drawLoadingPlaceholder'(f) {
2050
- const ho = h, n = f[ho(0x2b9)], V = f['width'], R = f[ho(0x2ac)], N = V / 0x2, t = R / 0x2, p = Math[ho(0x36d)](V, R) * 0.12, F = Math[ho(0x1c2)](0x4, p * 0.16);
2051
- n['save'](), n['fillStyle'] = 'rgba(255,\x20255,\x20255,\x200.88)', n[ho(0x27d)](0x0, 0x0, V, R), n['beginPath'](), n[ho(0x1a0)] = F, n[ho(0x2c1)] = '#dbeafe', n['arc'](N, t, p, 0x0, Math['PI'] * 0x2), n[ho(0x373)](), n['beginPath'](), n['lineWidth'] = F, n[ho(0x199)] = 'round', n['strokeStyle'] = '#2563eb', n['arc'](N, t, p, -Math['PI'] / 0x2, Math['PI'] * 0.9), n[ho(0x373)](), n[ho(0x265)] = '#2563eb', n[ho(0x327)] = ho(0x24d) + Math['max'](0xc, Math[ho(0x1cc)](R * 0.045)) + 'px\x20Arial', n['textAlign'] = 'center', n['textBaseline'] = 'middle', n['fillText']('Loading...', N, t + p + Math[ho(0x1c2)](0x10, p * 0.6)), n['restore']();
2052
- },
2053
- 'afterDestroy'(f) {
2054
- const hi = h;
2055
- delete f[hi(0x1eb)], delete f['_loadingRenderedOnce'], delete f[hi(0x226)], delete f['_loadingScheduled'];
2056
- }
2057
- }, customLegend = {
2058
- 'id': 'htmlLegend',
2059
- '_Default': {
2060
- 'containerID': '',
2061
- 'className': {
2062
- 'list': D(0x2f9),
2063
- 'item': D(0x39f),
2064
- 'box': D(0x22d),
2065
- 'text': 'text-container'
2066
- },
2067
- 'styles': {
2068
- 'text': {
2069
- 'textDecoration': D(0x39e),
2070
- 'color': '#111827'
2071
- },
2072
- 'textHidden': {
2073
- 'textDecoration': 'line-through',
2074
- 'color': '#9ca3af'
2075
- },
2076
- 'box': (f, n) => ({
2077
- 'width': D(0x236),
2078
- 'height': '12px',
2079
- 'borderRadius': n === D(0x23b) ? D(0x2d0) : D(0x25b),
2080
- 'borderWidth': '2px',
2081
- 'backgroundColor': f['fillStyle'],
2082
- 'borderColor': f['strokeStyle']
2083
- })
2084
- },
2085
- 'getItemText': f => f['text'],
2086
- 'getDatasetType': (f, n) => {
2087
- const hv = h, V = f['config'][hv(0x232)]?.['datasets']?.[n['datasetIndex']];
2088
- if (V?.['type'])
2089
- return V[hv(0x343)];
2090
- const R = f['config'];
2091
- return 'type' in R ? R[hv(0x343)] : undefined;
2092
- }
2093
- },
2094
- '_fnc': (f, n, V) => {
2095
- const hM = h;
2096
- if (!n)
2097
- return;
2098
- const R = document['getElementById'](n);
2099
- let N = R?.[hM(0x267)]('div');
2100
- return !N && (N = document[hM(0x329)]('div'), N['className'] = V['className']['list'], R['appendChild'](N)), N;
2101
- },
2102
- 'afterUpdate'(f, n, V) {
2103
- const hq = h;
2104
- if (!V || !V[hq(0x354)])
2105
- return;
2106
- const R = JSON['parse'](JSON['stringify'](V)), N = StzUtils[hq(0x1a8)](this['_Default'], R), t = this['_fnc'](f, N['containerID'], N);
2107
- if (!t)
2108
- return console[hq(0x2dc)]('none\x20customLegend');
2109
- while (t?.[hq(0x313)]) {
2110
- t['firstChild']['remove']();
2111
- }
2112
- const p = f['options']['plugins'][hq(0x388)]['labels']['generateLabels'](f);
2113
- p['forEach'](F => {
2114
- const hz = h, G = document['createElement'](hz(0x325));
2115
- G[hz(0x276)] = N['className'][hz(0x2de)];
2116
- const I = document['createElement'](hz(0x325));
2117
- I[hz(0x276)] = N[hz(0x276)][hz(0x1cb)], I['style']['backgroundColor'] = F[hz(0x265)], I['style'][hz(0x336)] = F[hz(0x2c1)];
2118
- const Y = document[hz(0x329)](hz(0x325));
2119
- Y['className'] = N[hz(0x276)]['text'], Y['style']['color'] = F['fontColor'], G[hz(0x2d9)]('click', () => {
2120
- const ha = h, {type: g} = f['config'];
2121
- g === 'pie' || g === 'doughnut' ? f['toggleDataVisibility'](F[ha(0x386)]) : f['setDatasetVisibility'](F['datasetIndex'], !f['isDatasetVisible'](F['datasetIndex'])), f['update']();
2122
- });
2123
- const H = document['createTextNode'](F[hz(0x1d6)]);
2124
- Y['appendChild'](H), Y[hz(0x387)]['textDecoration'] = F['hidden'] ? 'line-through' : '', G['appendChild'](I), G[hz(0x25a)](Y), t?.[hz(0x25a)](G);
2125
- });
2126
- }
2127
- }, chartMountPlugin = {
2128
- 'id': 'chartMountedPlugin',
2129
- 'beforeInit'(f) {
2130
- const hb = h, n = f['options']?.['_chartId'];
2131
- n && f[hb(0x21e)]?.['id'] !== n && (f[hb(0x21e)]['id'] = n);
2132
- },
2133
- 'afterDraw'(f, n, V) {
2134
- const hj = h;
2135
- if (!f['_mountedCalled']) {
2136
- f['_mountedCalled'] = !![], requestAnimationFrame(() => {
2137
- const hA = h;
2138
- StzUtils['isFunction'](f['config']['options'][hA(0x1b2)]) && f['config']['options']['_mounted'](f);
2139
- });
2140
- const R = f[hj(0x2d6)][hj(0x2d5)];
2141
- R && !ChartInstance['has'](R) && (f[hj(0x21e)]?.['id'] !== R && (f[hj(0x21e)]['id'] = R), ChartInstance['register'](R, f));
2142
- }
2143
- },
2144
- 'afterDestroy'(f) {
2145
- const hm = h, n = f[hm(0x2d6)]['_chartId'];
2146
- n && ChartInstance['unregister'](n);
2147
- }
2148
- }, customDatasetPlugins = {
2149
- 'id': 'customDatasetPlugins',
2150
- '_tooltips': new WeakMap(),
2151
- '_resolveLegendDatasetIndex'(f) {
2152
- const hS = h;
2153
- return f?.[hS(0x31b)] ?? f?.[hS(0x1ac)];
2154
- },
2155
- 'afterInit'(f, n, V) {
2156
- const hs = h, R = f['config']['plugins']?.['some'](N => N && (N['id'] === hs(0x1ef) || N['id'] === hs(0x320)));
2157
- if (R)
2158
- return;
2159
- if (!f['options']?.[hs(0x37c)]?.[hs(0x388)]?.['display'])
2160
- return;
2161
- this['_setupLegendTooltip'](f);
2162
- },
2163
- 'beforeUpdate'(f, n, V) {
2164
- const hU = h, R = f[hU(0x321)][hU(0x37c)]?.['some'](t => t && (t['id'] === 'htmlLegend' || t['id'] === 'customLegend'));
2165
- if (R)
2166
- return;
2167
- if (!f[hU(0x2d6)]?.[hU(0x37c)]?.[hU(0x388)]?.['display'])
2168
- return;
2169
- !f['_originalGenerateLabels'] && (f[hU(0x26f)] = f['options']['plugins']['legend']['labels'][hU(0x291)]);
2170
- !f['_originalLegendOnClick'] && (f['_originalLegendOnClick'] = f['options']['plugins']['legend']['onClick']);
2171
- const N = this;
2172
- f['options'][hU(0x37c)][hU(0x388)][hU(0x21a)] = (t, p, F) => {
2173
- const hr = h, G = p['_dataset'], I = G?.['_toggleBehavior'] || hr(0x292);
2174
- if (I === hr(0x364))
2175
- return;
2176
- N['_handleLegendClick'](t, p, F, I);
2177
- }, f[hU(0x2d6)]['plugins']['legend'][hU(0x1f7)]['generateLabels'] = t => {
2178
- const hK = h, p = f['_originalGenerateLabels'](t), F = t[hK(0x232)]['datasets'], G = [], I = new Map(), Y = [];
2179
- return p['forEach']((H, g) => {
2180
- const hB = h, d = F[g];
2181
- if (!d)
2182
- return;
2183
- if (d[hB(0x25f)] === !![])
2184
- return;
2185
- if (d[hB(0x1c9)] === ![]) {
2186
- t[hB(0x244)](g, ![]);
2187
- return;
2188
- }
2189
- if (d['_groupLabel']) {
2190
- const O = d[hB(0x2f4)];
2191
- !I[hB(0x366)](O) && I['set'](O, {
2192
- 'groupLabel': O,
2193
- 'datasets': [],
2194
- '_legendOrder': d['_legendOrder'] || 0x0,
2195
- 'firstDataset': d,
2196
- 'firstIndex': g
2197
- }), I['get'](O)[hB(0x20d)]['push']({
2198
- 'label': H,
2199
- 'dataset': d,
2200
- 'index': g
2201
- });
2202
- } else
2203
- H['_legendOrder'] = d[hB(0x2fe)] || 0x0, H['_dataset'] = d, H[hB(0x31b)] = g, H[hB(0x36b)] = d['_tooltip'], Y[hB(0x35c)](H);
2204
- }), I[hK(0x330)](H => {
2205
- const hx = h, g = {
2206
- ...H[hx(0x20d)][0x0][hx(0x1b3)],
2207
- 'text': H['groupLabel'],
2208
- 'datasetIndex': H['firstIndex'],
2209
- '_legendOrder': H['_legendOrder'],
2210
- '_isGroupLabel': !![],
2211
- '_groupDatasets': H[hx(0x20d)],
2212
- '_dataset': H['firstDataset'],
2213
- '_tooltip': H[hx(0x3ad)]['_tooltip']
2214
- };
2215
- Y[hx(0x35c)](g);
2216
- }), Y[hK(0x36f)]((H, g) => {
2217
- const hL = h, d = H?.[hL(0x2fe)] || 0x0, O = g?.['_legendOrder'] || 0x0;
2218
- return d - O;
2219
- }), G[hK(0x35c)](...Y), N['_handleGroupVisibility'](t, F), G;
2220
- };
2221
- },
2222
- '_handleGroupVisibility'(f, n) {
2223
- const f0 = h, V = new Map();
2224
- n['forEach']((R, N) => {
2225
- const hX = h;
2226
- R['_group'] && (!V[hX(0x366)](R['_group']) && V[hX(0x2ba)](R['_group'], []), V['get'](R['_group'])['push']({
2227
- 'dataset': R,
2228
- 'index': N
2229
- }));
2230
- }), V[f0(0x330)]((R, N) => {
2231
- const f2 = h, t = R['sort']((G, I) => {
2232
- const f1 = h, Y = !StzUtils[f1(0x300)](G['dataset'][f1(0x27c)]) ? G[f1(0x30c)]['order'] : G['index'], H = !StzUtils[f1(0x300)](I['dataset'][f1(0x27c)]) ? I['dataset']['order'] : I['index'];
2233
- return Y - H;
2234
- }), p = t[0x0], F = f['isDatasetVisible'](p[f2(0x386)]);
2235
- t['forEach'](({index: G}) => {
2236
- const f3 = h;
2237
- f['isDatasetVisible'](G) !== F && f[f3(0x244)](G, F);
2238
- });
2239
- });
2240
- },
2241
- '_handleLegendClick'(f, n, V, R) {
2242
- const f4 = h, N = V['chart'];
2243
- if (R === 'radio') {
2244
- if (n[f4(0x259)])
2245
- N['data']['datasets']['forEach']((t, p) => {
2246
- const f5 = h;
2247
- N[f5(0x244)](p, ![]);
2248
- }), n[f4(0x397)][f4(0x330)](({index: t}) => {
2249
- N['setDatasetVisibility'](t, !![]);
2250
- });
2251
- else {
2252
- N['data'][f4(0x20d)]['forEach']((p, F) => {
2253
- N['setDatasetVisibility'](F, ![]);
2254
- });
2255
- const t = this['_resolveLegendDatasetIndex'](n);
2256
- !StzUtils['isUndefined'](t) && N['setDatasetVisibility'](t, !![]);
2257
- }
2258
- } else {
2259
- if (n['_isGroupLabel']) {
2260
- const p = n[f4(0x397)]['every'](({index: F}) => N['isDatasetVisible'](F));
2261
- n[f4(0x397)]['forEach'](({index: F}) => {
2262
- N['setDatasetVisibility'](F, !p);
2263
- });
2264
- } else {
2265
- const F = this['_resolveLegendDatasetIndex'](n);
2266
- if (StzUtils['isUndefined'](F))
2267
- return;
2268
- const G = N['isDatasetVisible'](F);
2269
- N[f4(0x244)](F, !G);
2270
- const I = N['data']['datasets'][F];
2271
- I[f4(0x370)] && N['data']['datasets'][f4(0x330)]((Y, H) => {
2272
- const f6 = h;
2273
- H !== F && Y[f6(0x370)] === I['_group'] && N['setDatasetVisibility'](H, !G);
2274
- });
2275
- }
2276
- }
2277
- N['update']();
2278
- },
2279
- '_setupLegendTooltip'(f) {
2280
- const f8 = h, n = f['canvas'], V = N => {
2281
- const f7 = h, t = f[f7(0x388)];
2282
- if (!t || !t[f7(0x1fd)]) {
2283
- this['_hideTooltip'](f);
2284
- return;
2285
- }
2286
- const p = n['getBoundingClientRect'](), F = N['clientX'] - p['left'], G = N['clientY'] - p['top'], I = this['_hitTestLegend'](f, F, G);
2287
- I && I['_tooltip'] ? this['_showTooltip'](f, N, I[f7(0x36b)], I) : this['_hideTooltip'](f);
2288
- }, R = () => {
2289
- this['_hideTooltip'](f);
2290
- };
2291
- n['addEventListener'](f8(0x1ca), V), n[f8(0x2d9)](f8(0x285), R), f['_legendTooltipHandlers'] = {
2292
- 'mousemove': V,
2293
- 'mouseleave': R
2294
- };
2295
- },
2296
- '_hitTestLegend'(f, n, V) {
2297
- const f9 = h, R = f[f9(0x388)];
2298
- if (!R || !R['legendItems'])
2299
- return null;
2300
- if (R['legendHitBoxes'])
2301
- for (let N = 0x0; N < R[f9(0x30b)]['length']; N++) {
2302
- const t = R[f9(0x30b)][N];
2303
- if (n >= t['left'] && n <= t[f9(0x1e9)] + t['width'] && V >= t['top'] && V <= t['top'] + t[f9(0x2ac)])
2304
- return R['legendItems'][N];
2305
- }
2306
- return null;
2307
- },
2308
- '_showTooltip'(f, n, V, R) {
2309
- const fk = h;
2310
- this['_hideTooltip'](f);
2311
- const N = document['createElement']('div');
2312
- N['className'] = fk(0x37e), N[fk(0x387)]['cssText'] = '\x0a\x09\x09\x09position:\x20absolute;\x0a\x09\x09\x09background:\x20rgba(0,\x200,\x200,\x200.8);\x0a\x09\x09\x09color:\x20white;\x0a\x09\x09\x09padding:\x206px\x2010px;\x0a\x09\x09\x09border-radius:\x204px;\x0a\x09\x09\x09font-size:\x2012px;\x0a\x09\x09\x09pointer-events:\x20none;\x0a\x09\x09\x09z-index:\x201000;\x0a\x09\x09\x09white-space:\x20nowrap;\x0a\x09\x09\x09box-shadow:\x200\x202px\x208px\x20rgba(0,0,0,0.2);\x0a\x09\x09';
2313
- const t = StzUtils['isFunction'](V) ? V(R) : V;
2314
- N['textContent'] = t, document['body']['appendChild'](N);
2315
- const p = N[fk(0x1b7)]();
2316
- let F = n['clientX'] + 0xa, G = n['clientY'] - p['height'] - 0xa;
2317
- F + p['width'] > window['innerWidth'] && (F = n[fk(0x258)] - p['width'] - 0xa), G < 0x0 && (G = n['clientY'] + 0xa), N['style']['left'] = F + 'px', N['style'][fk(0x2cc)] = G + 'px', this[fk(0x3a9)][fk(0x2ba)](f, N);
2318
- },
2319
- '_hideTooltip'(f) {
2320
- const fh = h, n = this['_tooltips'][fh(0x220)](f);
2321
- n && (n['remove'](), this['_tooltips']['delete'](f));
2322
- },
2323
- 'afterDestroy'(f) {
2324
- const ff = h;
2325
- f[ff(0x26f)] && (f['options']?.['plugins']?.['legend']?.['labels'] && (f[ff(0x2d6)][ff(0x37c)]['legend'][ff(0x1f7)]['generateLabels'] = f['_originalGenerateLabels']), delete f['_originalGenerateLabels']);
2326
- f[ff(0x287)] && (f['options']?.['plugins']?.['legend'] && (f['options']['plugins'][ff(0x388)][ff(0x21a)] = f['_originalLegendOnClick']), delete f['_originalLegendOnClick']);
2327
- if (f['_legendTooltipHandlers']) {
2328
- const n = f['canvas'];
2329
- n && (n[ff(0x2a8)]('mousemove', f['_legendTooltipHandlers']['mousemove']), n['removeEventListener']('mouseleave', f['_legendTooltipHandlers']['mouseleave'])), delete f['_legendTooltipHandlers'];
2330
- }
2331
- this['_hideTooltip'](f);
2332
- }
2333
- }, blinkPlugin = {
2334
- 'id': D(0x2a2),
2335
- 'afterDatasetDraw'(f, n) {
2336
- const fn = h, V = f['getDatasetMeta'](n[fn(0x386)]), R = f['data']['datasets'][n['index']];
2337
- f['ctx'], V['data']['forEach']((N, t) => {
2338
- R['data'][t];
2339
- });
2340
- }
2341
- }, makeCenterHtml = (f, n, V, R) => {
2342
- const fV = h, N = V ? '<span\x20class=\x22text-warning\x22>' + StzUtils['addComma'](V) + fV(0x1d9) : '';
2343
- return '\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22fs-6\x20text-white\x22>' + StzUtils['addComma'](f) + '%</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20' + (!StzUtils['isUndefined'](n) ? '\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22text-success\x22>' + StzUtils[fV(0x1e6)](n) + '</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22text-white\x22>/</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20' + N + fV(0x342) + StzUtils['addComma'](R ?? 0x0) + '</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>' : '') + '\x0a\x20\x20\x20\x20';
2344
- }, barScaleImgPlugin = {
2345
- 'id': 'scaleImg',
2346
- 'beforeDatasetsDraw'(f, n, V) {
2347
- const fR = h, {
2348
- ctx: R,
2349
- data: N,
2350
- scales: {
2351
- x: t,
2352
- y: p
2353
- }
2354
- } = f, F = 0x1e, G = f['options']['indexAxis'] === 'y';
2355
- R['save'](), N['datasets'][fR(0x330)]((I, Y) => {
2356
- const fN = h, H = new Image();
2357
- H['src'] = I['image'], G ? R['drawImage'](H, 0x0, p['getPixelForValue'](Y) - F / 0x2, F, F) : R[fN(0x288)](H, t[fN(0x301)](Y) - F / 0x2, t['top'], F, F);
2358
- }), R[fR(0x35d)]();
2359
- }
2360
- }, changeSetting = {
2361
- 'id': 'setting',
2362
- '_Default': {
2363
- 'img': '/img/setting.svg',
2364
- 'iconSize': {
2365
- 'w': 0x1e,
2366
- 'h': 0x1e
2367
- },
2368
- 'radiusExtra': 0x2,
2369
- 'offset': {
2370
- 'right': 0xa,
2371
- 'top': 0xa
2372
- },
2373
- 'colors': {
2374
- 'fill': 'rgba(0,123,255,0.5)',
2375
- 'fillHover': 'rgba(0,150,255,0.8)',
2376
- 'stroke': 'rgba(0,123,255,1)',
2377
- 'strokeHover': 'rgba(0,150,255,1)'
2378
- },
2379
- 'borderWidth': {
2380
- 'normal': 0x2,
2381
- 'hover': 0x3
2382
- },
2383
- 'cursor': D(0x2d7),
2384
- 'onClick': ({
2385
- chart: f,
2386
- event: n
2387
- }) => {
2388
- alert('클릭');
2389
- }
2390
- },
2391
- 'afterInit'(f, n, V) {
2392
- const ft = h, R = f['canvas'], N = StzUtils['merge'](this['_Default'], V);
2393
- f[ft(0x1b0)] = N;
2394
- if (!R)
2395
- return;
2396
- if (f['T$settingClickHandler'])
2397
- return;
2398
- const t = G => {
2399
- const fp = h, I = R['getBoundingClientRect'](), Y = R['width'] / I[fp(0x36e)], H = R[fp(0x2ac)] / I[fp(0x2ac)];
2400
- return {
2401
- 'x': (G[fp(0x258)] - I[fp(0x1e9)]) * Y,
2402
- 'y': (G['clientY'] - I['top']) * H
2403
- };
2404
- }, p = G => {
2405
- const fF = h, {
2406
- x: I,
2407
- y: Y
2408
- } = t(G), H = f[fF(0x2f5)];
2409
- if (!H)
2410
- return;
2411
- if (I >= H[fF(0x1e9)] && I <= H['right'] && Y >= H['top'] && Y <= H[fF(0x1ae)])
2412
- try {
2413
- (N['onClick'] || this[fF(0x37d)][fF(0x21a)])({
2414
- 'chart': f,
2415
- 'event': G
2416
- });
2417
- } catch (g) {
2418
- console['error']('error', g);
2419
- }
2420
- }, F = G => {
2421
- const fG = h, {
2422
- x: I,
2423
- y: Y
2424
- } = t(G), H = f['T$settingBtnCircle'];
2425
- if (!H)
2426
- return;
2427
- const g = I - H['cx'], d = Y - H['cy'], O = g * g + d * d <= H[fG(0x393)] * H['radius'];
2428
- f['T$isHover'] !== O && (f[fG(0x324)] = O, R['style']['cursor'] = O ? N['cursor'] || 'pointer' : fG(0x1ea), f['update']('none'));
2429
- };
2430
- R[ft(0x2d9)]('mousemove', F), R['addEventListener']('click', p), f['_settingClickHandler'] = p, f['_settingMoveHandler'] = F, f[ft(0x1ff)] = new Image(), f[ft(0x1ff)]['src'] = N['img'];
2431
- },
2432
- 'beforeDraw'(f) {
2433
- const fI = h, {
2434
- ctx: n,
2435
- chartArea: {right: V}
2436
- } = f;
2437
- n['save']();
2438
- const R = f['T$opts'] || this['_Default'], N = f[fI(0x1ff)], t = R[fI(0x218)]?.['w'] ?? 0x1e, p = R[fI(0x218)]?.['h'] ?? 0x1e, F = V - (t + (R['offset']?.[fI(0x31a)] ?? 0xa)), G = R[fI(0x23e)]?.['top'] ?? 0xa, I = Math[fI(0x1c2)](t, p) / 0x2 + (R['radiusExtra'] ?? 0x0), Y = F + t / 0x2, H = G + p / 0x2, g = !!f['T$isHover'];
2439
- n['lineWidth'] = g ? R['borderWidth']?.['hover'] ?? 0x3 : R['borderWidth']?.['normal'] ?? 0x2, n[fI(0x2c1)] = g ? R['colors']?.['strokeHover'] ?? 'rgba(0,150,255,1)' : R['colors']?.['stroke'] ?? 'rgba(0,123,255,1)', n['beginPath'](), n['arc'](Y, H, I, 0x0, Math['PI'] * 0x2), n[fI(0x373)](), n['closePath'](), n[fI(0x229)](), n['arc'](Y, H, I, 0x0, Math['PI'] * 0x2), n['fillStyle'] = g ? R['colors']?.['fillHover'] ?? fI(0x1bd) : R['colors']?.['fill'] ?? 'rgba(0,123,255,0.5)', n['fill'](), n['closePath'](), N && n[fI(0x288)](N, F, G, t, p), f['T$settingBtnCircle'] = {
2440
- 'cx': Y,
2441
- 'cy': H,
2442
- 'radius': I
2443
- }, f['T$settingBtnRect'] = {
2444
- 'top': G,
2445
- 'bottom': G + p,
2446
- 'left': F,
2447
- 'right': F + t
2448
- }, n['restore']();
2449
- },
2450
- 'afterDestroy'(f) {
2451
- const fY = h, n = f['canvas'];
2452
- n && f['T$settingClickHandler'] && n[fY(0x2a8)]('click', f['_settingClickHandler']), n && f[fY(0x1a2)] && n['removeEventListener'](fY(0x1ca), f['_settingMoveHandler']), f['T$settingClickHandler'] = null, f['T$settingBtnRect'] = null, f['T$settingImg'] = null;
2453
- }
2454
- }, zoomRangeSlider = {
2455
- 'id': 'zoomRangeSlider',
2456
- 'var': {
2457
- 'min': 0x0,
2458
- 'isDragging': ![],
2459
- 'circlePosition': null
2460
- },
2461
- 'afterDatasetDraw'(f, n, V) {
2462
- const fH = h, {
2463
- ctx: R,
2464
- chartArea: {
2465
- left: N,
2466
- right: t,
2467
- top: p,
2468
- bottom: F,
2469
- width: G,
2470
- height: I
2471
- }
2472
- } = f;
2473
- this['var'][fH(0x26c)] = this[fH(0x37b)]['circlePosition'] || N, R['beginPath'](), R['fillStyle'] = fH(0x22b), R[fH(0x2af)](N, F + 0x28, G, 0x6, 0x3), R[fH(0x28f)]();
2474
- const Y = this[fH(0x37b)]['circlePosition'] - N;
2475
- Y > 0x0 && (R['beginPath'](), R['fillStyle'] = '#4285f4', R['roundRect'](N, F + 0x28, Y, 0x6, 0x3), R['fill']()), R['beginPath'](), R['fillStyle'] = fH(0x1ab), R['arc'](this[fH(0x37b)]['circlePosition'], F + 0x28, 0x8, 0x0, Math['PI'] * 0x2), R['fill'](), R['beginPath'](), R[fH(0x2c1)] = '#4285f4', R['lineWidth'] = 0x2, R[fH(0x33c)](this['var']['circlePosition'], F + 0x28, 0x8, 0x0, Math['PI'] * 0x2), R['stroke'](), this[fH(0x37b)]['isDragging'] && (R[fH(0x229)](), R['fillStyle'] = 'rgba(66,\x20133,\x20244,\x200.2)', R['arc'](this[fH(0x37b)]['circlePosition'], F + 0x28, 0xc, 0x0, Math['PI'] * 0x2), R['fill']());
2476
- },
2477
- 'afterUpdate'(f, n, V) {
2478
- const fg = h;
2479
- f['options']['scales']['x']['min'] = this[fg(0x37b)][fg(0x36d)];
2480
- },
2481
- 'afterEvent'(f, n, V) {
2482
- const fO = h, {
2483
- ctx: R,
2484
- canvas: N,
2485
- chartArea: {
2486
- left: t,
2487
- top: p,
2488
- right: F,
2489
- width: G
2490
- }
2491
- } = f;
2492
- N['addEventListener']('mousedown', I => {
2493
- const fd = h;
2494
- this[fd(0x37b)]['isDragging'] = !![];
2495
- }), N['addEventListener'](fO(0x19f), I => {
2496
- const fT = h;
2497
- this['var'][fT(0x279)] = ![];
2498
- });
2499
- if (n['event'][fO(0x343)] === fO(0x1ca) && this['var'][fO(0x279)]) {
2500
- const I = n['event']['x'] / (G + t);
2501
- this['var']['min'] = I * f['config'][fO(0x232)]['labels']['length'] - 0x1, n['changed'] = !![], this[fO(0x37b)]['circlePosition'] = n[fO(0x1a6)]['x'] < t ? t : n['event']['x'] > F ? F : n['event']['x'], f['update']();
2502
- }
2503
- }
2504
- }, CreateZoomRangeSlider = (f = {}) => {
2505
- const fw = h, {
2506
- sliderTrackColor: sliderTrackColor = '#e0e0e0',
2507
- sliderActiveColor: sliderActiveColor = '#4285f4',
2508
- sliderHandleColor: sliderHandleColor = fw(0x1ab),
2509
- sliderHandleBorderColor: sliderHandleBorderColor = fw(0x381),
2510
- sliderHandleHoverColor: sliderHandleHoverColor = fw(0x398)
2511
- } = f;
2512
- return {
2513
- 'id': fw(0x335),
2514
- 'var': {
2515
- 'min': 0x0,
2516
- 'isDragging': ![],
2517
- 'circlePosition': null
2518
- },
2519
- 'afterDatasetDraw'(n, V, R) {
2520
- const fW = h, {
2521
- ctx: N,
2522
- chartArea: {
2523
- left: t,
2524
- right: p,
2525
- top: F,
2526
- bottom: G,
2527
- width: I,
2528
- height: Y
2529
- }
2530
- } = n;
2531
- this[fW(0x37b)]['circlePosition'] = this['var']['circlePosition'] || t, N['beginPath'](), N['fillStyle'] = sliderTrackColor, N[fW(0x2af)](t, G + 0x28, I, 0x6, 0x3), N['fill']();
2532
- const H = this['var']['circlePosition'] - t;
2533
- H > 0x0 && (N['beginPath'](), N['fillStyle'] = sliderActiveColor, N[fW(0x2af)](t, G + 0x28, H, 0x6, 0x3), N['fill']()), N[fW(0x229)](), N['fillStyle'] = sliderHandleColor, N['arc'](this[fW(0x37b)]['circlePosition'], G + 0x28, 0x8, 0x0, Math['PI'] * 0x2), N['fill'](), N['beginPath'](), N['strokeStyle'] = sliderHandleBorderColor, N['lineWidth'] = 0x2, N[fW(0x33c)](this[fW(0x37b)]['circlePosition'], G + 0x28, 0x8, 0x0, Math['PI'] * 0x2), N['stroke'](), this[fW(0x37b)]['isDragging'] && (N['beginPath'](), N[fW(0x265)] = sliderHandleHoverColor, N['arc'](this[fW(0x37b)]['circlePosition'], G + 0x28, 0xc, 0x0, Math['PI'] * 0x2), N[fW(0x28f)]());
2534
- },
2535
- 'afterUpdate'(n, V, R) {
2536
- const fC = h;
2537
- n['options']['scales']['x']['min'] = this['var'][fC(0x36d)];
2538
- },
2539
- 'afterEvent'(n, V, R) {
2540
- const fe = h, {
2541
- ctx: N,
2542
- canvas: t,
2543
- chartArea: {
2544
- left: p,
2545
- top: F,
2546
- right: G,
2547
- width: I
2548
- }
2549
- } = n;
2550
- t[fe(0x2d9)](fe(0x2d4), Y => {
2551
- const fQ = h;
2552
- this[fQ(0x37b)][fQ(0x279)] = !![];
2553
- }), t['addEventListener']('mouseup', Y => {
2554
- this['var']['isDragging'] = ![];
2555
- });
2556
- if (V['event']['type'] === fe(0x1ca) && this['var']['isDragging']) {
2557
- const Y = V['event']['x'] / (I + p);
2558
- this['var']['min'] = Y * n['config']['data']['labels'][fe(0x201)] - 0x1, V['changed'] = !![], this['var']['circlePosition'] = V['event']['x'] < p ? p : V['event']['x'] > G ? G : V[fe(0x1a6)]['x'], n['update']();
2559
- }
2560
- }
2561
- };
2562
- };
2563
- function doughnutCenterTextPlugin(f) {
2564
- const {
2565
- text: n,
2566
- color: color = '#000',
2567
- fontStyle: fontStyle = 'Arial',
2568
- fontSize: fontSize = '24px'
2569
- } = f, V = R => {
2570
- const fE = h, N = R['_noDataAct'];
2571
- if (typeof N === 'boolean')
2572
- return N;
2573
- const t = R['data'][fE(0x20d)]?.[0x0];
2574
- return !t || !StzUtils[fE(0x319)](t[fE(0x232)]) || t['data']['length'] === 0x0;
2575
- };
2576
- return {
2577
- 'id': 'doughnutCenterTextPlugin',
2578
- 'afterInit'(R) {
2579
- const fP = h, N = R[fP(0x21e)], t = N['parentNode'];
2580
- if (!t || !n)
2581
- return;
2582
- getComputedStyle(t)['position'] === 'static' && (t['style']['position'] = 'relative');
2583
- const p = document['createElement']('div');
2584
- p['className'] = fP(0x290), Object[fP(0x198)](p['style'], {
2585
- 'position': 'absolute',
2586
- 'pointerEvents': 'none',
2587
- 'color': color,
2588
- 'fontFamily': fontStyle,
2589
- 'fontSize': fontSize,
2590
- 'textAlign': 'center',
2591
- 'fontWeight': 'bold',
2592
- 'whiteSpace': 'nowrap'
2593
- }), StzUtils['isArray'](n) ? p['innerHTML'] = n['map'](F => fP(0x2c9) + F + '</div>')[fP(0x211)]('') : p['textContent'] = n, t['appendChild'](p), R['_centerTextDiv'] = p, this['updatePosition'](R);
2594
- },
2595
- 'afterUpdate'(R) {
2596
- const fJ = h;
2597
- this[fJ(0x1ee)](R);
2598
- },
2599
- 'updatePosition'(R) {
2600
- const fu = h, N = R[fu(0x1f5)];
2601
- if (!N)
2602
- return;
2603
- if (V(R)) {
2604
- N[fu(0x387)]['display'] = 'none';
2605
- return;
2606
- }
2607
- const t = R['chartArea'];
2608
- if (!t)
2609
- return;
2610
- const p = (t['left'] + t['right']) / 0x2, F = (t['top'] + t['bottom']) / 0x2;
2611
- N[fu(0x387)][fu(0x1e9)] = p + 'px', N['style'][fu(0x2cc)] = F + 'px', N['style']['transform'] = 'translate(-50%,\x20-50%)', N['style']['display'] = 'block';
2612
- },
2613
- 'destroy'(R) {
2614
- const N = R['_centerTextDiv'];
2615
- N && (N['remove'](), delete R['_centerTextDiv']);
2616
- }
2617
- };
2618
- }
2619
- function segmentImagePlugin(f) {
2620
- const fc = h, {
2621
- images: n,
2622
- width: width = 0x1e,
2623
- height: height = 0x1e,
2624
- backgroundColor: backgroundColor = fc(0x228),
2625
- borderRadius: borderRadius = width / 0x2
2626
- } = f, V = n['length'] > 0x0 && StzUtils[fc(0x1f8)](n[0x0]) && '_uid' in n[0x0], R = new Map(), N = V ? n['map'](p => p['image']) : n;
2627
- N[fc(0x2a1)](p => new Promise((F, G) => {
2628
- const fD = h;
2629
- if (!p) {
2630
- F();
2631
- return;
2632
- }
2633
- const I = new Image();
2634
- I[fD(0x3ac)] = () => {
2635
- const fl = h;
2636
- R[fl(0x2ba)](p, I), F();
2637
- }, I['onerror'] = () => {
2638
- const fy = h;
2639
- console['warn'](fy(0x2f8) + p), F();
2640
- }, I['src'] = p;
2641
- }));
2642
- const t = V ? new Map(n['map'](p => [
2643
- p[fc(0x2b3)],
2644
- p['image']
2645
- ])) : null;
2646
- return {
2647
- 'id': 'segmentImagePlugin',
2648
- 'afterDatasetDraw'(p, F) {
2649
- const fZ = h, G = p['ctx'], I = p['getDatasetMeta'](F['index']);
2650
- if (!I || !I['data'])
2651
- return;
2652
- const Y = p[fZ(0x232)]['datasets'][F['index']], H = Y['_uid'];
2653
- G['save'](), I['data']['forEach']((g, d) => {
2654
- const fo = h;
2655
- let O;
2656
- V && t ? O = t['get'](H) : O = n[d];
2657
- if (!O)
2658
- return;
2659
- const T = R['get'](O);
2660
- if (!T)
2661
- return;
2662
- const {
2663
- x: w,
2664
- y: W
2665
- } = g[fo(0x302)]();
2666
- backgroundColor && (G['beginPath'](), G[fo(0x33c)](w, W, borderRadius, 0x0, Math['PI'] * 0x2), G[fo(0x265)] = backgroundColor, G[fo(0x28f)]()), G[fo(0x30a)](), G['beginPath'](), G['arc'](w, W, borderRadius, 0x0, Math['PI'] * 0x2), G['closePath'](), G['clip'](), G['drawImage'](T, w - width / 0x2, W - height / 0x2, width, height), G['restore']();
2667
- }), G['restore']();
2668
- }
2669
- };
2670
- }
2671
- const DefaultResponsiveChartOptions = {
2672
- 'responsive': !![],
2673
- 'maintainAspectRatio': ![]
2674
- }, DefaultSparkPluginOptions = {
2675
- 'legend': { 'display': ![] },
2676
- 'tooltip': { 'enabled': ![] },
2677
- 'title': { 'display': ![] }
2678
- }, DefaultHiddenSparkScales = {
2679
- 'x': {
2680
- 'display': ![],
2681
- 'grid': { 'display': ![] },
2682
- 'border': { 'display': ![] }
2683
- },
2684
- 'y': {
2685
- 'display': ![],
2686
- 'grid': { 'display': ![] },
2687
- 'border': { 'display': ![] }
2688
- }
2689
- }, DefaultTopLegendOptions = {
2690
- 'display': !![],
2691
- 'position': 'top'
2692
- }, DefaultHiddenLegendTopOptions = {
2693
- 'display': ![],
2694
- 'position': D(0x2cc)
2695
- }, DefaultArcRadius = '90%', createDefaultCartesianScales = ({
2696
- xType: xType = D(0x310),
2697
- yType: yType = 'linear',
2698
- xTickAlign: xTickAlign = 'center',
2699
- yTickAlign: yTickAlign = D(0x2bc)
2700
- } = {}) => ({
2701
- 'x': {
2702
- 'type': xType,
2703
- 'display': !![],
2704
- 'ticks': {
2705
- 'display': !![],
2706
- 'color': '#000',
2707
- 'autoSkip': !![],
2708
- 'align': xTickAlign
2709
- },
2710
- 'grid': { 'display': !![] }
2711
- },
2712
- 'y': {
2713
- 'type': yType,
2714
- 'display': !![],
2715
- 'ticks': {
2716
- 'display': !![],
2717
- 'color': D(0x2db),
2718
- 'autoSkip': !![],
2719
- 'align': yTickAlign
2720
- },
2721
- 'grid': { 'display': !![] }
2722
- }
2723
- }), defaultBarTooltipCallback = f => {
2724
- const fi = h, n = f['dataset']['label'] || '', V = f[fi(0x212)]?.['y'] ?? f['raw'] ?? 'No\x20Data', R = StzUtils['isNumber'](V) ? StzUtils['addComma'](V) : V;
2725
- return n + ':\x20' + R;
2726
- }, defaultBarScales = createDefaultCartesianScales(), createDefaultBarOptions = (f = {}, n = defaultBarScales) => {
2727
- const fv = h, V = f['scales'] || {}, R = {
2728
- ...n,
2729
- ...V
2730
- };
2731
- return {
2732
- '_mounted': f[fv(0x1b2)] ?? (() => {
2733
- }),
2734
- 'indexAxis': f?.['indexAxis'] ?? 'x',
2735
- 'responsive': f['responsive'] ?? DefaultResponsiveChartOptions['responsive'],
2736
- 'maintainAspectRatio': f['maintainAspectRatio'] ?? DefaultResponsiveChartOptions[fv(0x21b)],
2737
- 'plugins': {
2738
- 'tooltip': {
2739
- 'enabled': f['plugins']?.['tooltip']?.['enabled'] ?? !![],
2740
- 'mode': f['plugins']?.[fv(0x358)]?.['mode'] ?? 'index',
2741
- 'intersect': f['plugins']?.[fv(0x358)]?.[fv(0x241)] ?? ![],
2742
- 'callbacks': {
2743
- 'label': defaultBarTooltipCallback,
2744
- ...f?.[fv(0x37c)]?.['tooltip']?.[fv(0x2a3)] ?? {}
2745
- }
2746
- },
2747
- ...f?.['plugins'] ?? {}
2748
- },
2749
- 'scales': R,
2750
- ...StzUtils['omit'](f, [
2751
- 'scales',
2752
- 'plugins',
2753
- 'indexAxis'
2754
- ])
2755
- };
2756
- }, sparkBarOptions = {
2757
- 'animation': ![],
2758
- 'plugins': DefaultSparkPluginOptions,
2759
- 'scales': DefaultHiddenSparkScales
2760
- }, defaultLineTooltipCallback = f => {
2761
- const fM = h, n = f['dataset'], V = f[fM(0x212)], R = f['raw'];
2762
- let N;
2763
- if (StzUtils['isObject'](V)) {
2764
- const F = V;
2765
- N = !StzUtils['isNullOrUndefined'](F['y']) ? F['y'] : F['x'];
2766
- } else {
2767
- if (StzUtils[fM(0x1f8)](R)) {
2768
- const G = R, I = n?.['parsing']?.[fM(0x1cf)];
2769
- !StzUtils[fM(0x27e)](I) && !StzUtils['isNullOrUndefined'](G[I]) ? N = G[I] : N = G['y'] ?? G['value'] ?? G['trade_price'] ?? G;
2770
- } else
2771
- N = R;
2772
- }
2773
- let t;
2774
- if (StzUtils['isNumber'](N))
2775
- t = N['toFixed'](0x2);
2776
- else {
2777
- if (StzUtils['isObject'](N)) {
2778
- const Y = N, H = Y['y'] ?? Y['value'] ?? Y[fM(0x345)];
2779
- t = StzUtils['isNumber'](H) ? H['toFixed'](0x2) : 'No\x20Data';
2780
- } else
2781
- !StzUtils['isNullOrUndefined'](N) ? t = String(N) : t = 'No\x20Data';
2782
- }
2783
- const p = n?.['label'] ?? '값';
2784
- return p + ':\x20' + t;
2785
- }, defaultLineScales = createDefaultCartesianScales(), createDefaultLineOptions = (f = {}, n = defaultLineScales) => {
2786
- const fq = h, V = f['scales'] || {};
2787
- return {
2788
- 'hover': undefined,
2789
- 'indexAxis': undefined,
2790
- '_mounted': f['_mounted'] ?? (() => {
2791
- }),
2792
- 'responsive': f['responsive'] ?? DefaultResponsiveChartOptions['responsive'],
2793
- 'maintainAspectRatio': f['maintainAspectRatio'] ?? DefaultResponsiveChartOptions['maintainAspectRatio'],
2794
- 'interaction': {
2795
- 'mode': f['interaction']?.[fq(0x2ca)] ?? 'index',
2796
- 'intersect': f['interaction']?.[fq(0x241)] ?? ![]
2797
- },
2798
- 'plugins': {
2799
- ...f['plugins'] || {},
2800
- 'tooltip': {
2801
- 'enabled': f['plugins']?.[fq(0x358)]?.[fq(0x314)] ?? !![],
2802
- 'mode': f['plugins']?.['tooltip']?.['mode'] ?? 'index',
2803
- 'intersect': f[fq(0x37c)]?.['tooltip']?.['intersect'] ?? ![],
2804
- ...f['plugins']?.['tooltip'],
2805
- 'callbacks': {
2806
- 'label': defaultLineTooltipCallback,
2807
- ...f?.['plugins']?.['tooltip']?.['callbacks']
2808
- }
2809
- }
2810
- },
2811
- 'elements': {
2812
- 'point': {
2813
- 'radius': f['elements']?.['point']?.['radius'] ?? 0x0,
2814
- 'hoverRadius': f['elements']?.['point']?.['hoverRadius'] ?? 0x0
2815
- },
2816
- 'line': { 'tension': f['elements']?.['line']?.[fq(0x3b4)] ?? 0.1 }
2817
- },
2818
- 'scales': StzUtils['merge'](n, V)
2819
- };
2820
- }, sparkLineOptions = {
2821
- 'animation': ![],
2822
- 'plugins': DefaultSparkPluginOptions,
2823
- 'elements': {
2824
- 'point': {
2825
- 'radius': 0x0,
2826
- 'hoverRadius': 0x0
2827
- },
2828
- 'line': {
2829
- 'tension': 0.3,
2830
- 'borderWidth': 0x1
2831
- }
2832
- },
2833
- 'scales': DefaultHiddenSparkScales
2834
- }, defaultBubbleTooltipCallback = f => {
2835
- const fz = h, n = f[fz(0x30c)], V = f['raw'], R = n?.[fz(0x1b3)] ?? '값', N = V?.['x'] ?? 'N/A', t = V?.['y'] ?? fz(0x219), p = V?.['r'] ?? fz(0x219);
2836
- return R + fz(0x312) + N + ',\x20' + t + fz(0x39c) + p;
2837
- }, defaultBubbleScales = createDefaultCartesianScales({
2838
- 'xType': D(0x37f),
2839
- 'yType': 'linear'
2840
- }), createDefaultBubbleOptions = (f = {}, n = defaultBubbleScales) => {
2841
- const fa = h, V = f[fa(0x2e5)] || {}, R = {
2842
- ...n,
2843
- ...V
2844
- };
2845
- return {
2846
- '_mounted': f['_mounted'] ?? (() => {
2847
- }),
2848
- 'responsive': f[fa(0x26b)] ?? DefaultResponsiveChartOptions['responsive'],
2849
- 'maintainAspectRatio': f['maintainAspectRatio'] ?? DefaultResponsiveChartOptions['maintainAspectRatio'],
2850
- 'interaction': {
2851
- 'mode': f['interaction']?.['mode'] ?? 'nearest',
2852
- 'intersect': f[fa(0x21c)]?.['intersect'] ?? !![]
2853
- },
2854
- 'plugins': {
2855
- 'tooltip': {
2856
- 'enabled': f[fa(0x37c)]?.['tooltip']?.['enabled'] ?? !![],
2857
- 'mode': f['plugins']?.['tooltip']?.['mode'] ?? fa(0x38d),
2858
- 'intersect': f['plugins']?.['tooltip']?.[fa(0x241)] ?? !![],
2859
- 'callbacks': {
2860
- 'label': defaultBubbleTooltipCallback,
2861
- ...f?.['plugins']?.[fa(0x358)]?.[fa(0x2a3)] ?? {}
2862
- }
2863
- },
2864
- ...f?.[fa(0x37c)] ?? {}
2865
- },
2866
- 'scales': R,
2867
- ...StzUtils['omit'](f, [
2868
- 'scales',
2869
- 'plugins'
2870
- ])
2871
- };
2872
- }, sparkBubbleOptions = {
2873
- 'animation': ![],
2874
- 'plugins': DefaultSparkPluginOptions,
2875
- 'scales': DefaultHiddenSparkScales
2876
- }, defaultDoughnutTooltipCallback = f => {
2877
- const fb = h;
2878
- f['dataset'][fb(0x1b3)] || '';
2879
- const n = f[fb(0x1b3)] || '', V = f['parsed'] ?? f['raw'] ?? 'No\x20Data', R = StzUtils['isNumber'](V) ? StzUtils[fb(0x1e6)](V) : V;
2880
- return n + ':\x20' + R;
2881
- }, createDefaultDoughnutOptions = (f = {}) => {
2882
- const fA = h;
2883
- return {
2884
- '_mounted': f[fA(0x1b2)] ?? (() => {
2885
- }),
2886
- 'responsive': f['responsive'] ?? DefaultResponsiveChartOptions['responsive'],
2887
- 'maintainAspectRatio': f[fA(0x21b)] ?? DefaultResponsiveChartOptions[fA(0x21b)],
2888
- 'cutout': f['cutout'] ?? fA(0x2d0),
2889
- 'radius': f['radius'] ?? DefaultArcRadius,
2890
- 'plugins': {
2891
- 'tooltip': {
2892
- 'enabled': f[fA(0x37c)]?.['tooltip']?.['enabled'] ?? !![],
2893
- 'callbacks': {
2894
- 'label': defaultDoughnutTooltipCallback,
2895
- ...f?.[fA(0x37c)]?.[fA(0x358)]?.[fA(0x2a3)] ?? {}
2896
- }
2897
- },
2898
- 'legend': {
2899
- 'display': f['plugins']?.['legend']?.['display'] ?? DefaultTopLegendOptions['display'],
2900
- 'position': f['plugins']?.[fA(0x388)]?.['position'] ?? DefaultTopLegendOptions[fA(0x1e3)]
2901
- },
2902
- ...f?.['plugins'] ?? {}
2903
- },
2904
- ...StzUtils[fA(0x31d)](f, [
2905
- fA(0x37c),
2906
- 'cutout',
2907
- 'radius'
2908
- ])
2909
- };
2910
- }, defaultPieTooltipCallback = f => {
2911
- const fj = h;
2912
- f[fj(0x30c)]['label'] || '';
2913
- const n = f['label'] || '', V = f[fj(0x212)] ?? f['raw'] ?? 'No\x20Data', R = StzUtils['isNumber'](V) ? StzUtils[fj(0x1e6)](V) : V;
2914
- return n + ':\x20' + R;
2915
- }, createDefaultPieOptions = (f = {}) => {
2916
- const fm = h;
2917
- return {
2918
- '_mounted': f['_mounted'] ?? (() => {
2919
- }),
2920
- 'responsive': f['responsive'] ?? DefaultResponsiveChartOptions['responsive'],
2921
- 'maintainAspectRatio': f['maintainAspectRatio'] ?? DefaultResponsiveChartOptions[fm(0x21b)],
2922
- 'cutout': 0x0,
2923
- 'radius': f['radius'] ?? DefaultArcRadius,
2924
- 'plugins': {
2925
- 'tooltip': {
2926
- 'enabled': f['plugins']?.[fm(0x358)]?.[fm(0x314)] ?? !![],
2927
- 'callbacks': {
2928
- 'label': defaultPieTooltipCallback,
2929
- ...f?.['plugins']?.[fm(0x358)]?.[fm(0x2a3)] ?? {}
2930
- }
2931
- },
2932
- 'legend': {
2933
- 'display': f['plugins']?.[fm(0x388)]?.['display'] ?? DefaultTopLegendOptions['display'],
2934
- 'position': f['plugins']?.[fm(0x388)]?.['position'] ?? DefaultTopLegendOptions['position']
2935
- },
2936
- ...f?.[fm(0x37c)] ?? {}
2937
- },
2938
- ...StzUtils['omit'](f, [
2939
- fm(0x37c),
2940
- 'cutout',
2941
- 'radius'
2942
- ])
2943
- };
2944
- }, defaultTreemapTooltipCallback = {
2945
- 'title'(f) {
2946
- const fS = h;
2947
- if (!f || f[fS(0x201)] === 0x0)
2948
- return '';
2949
- const n = f[0x0];
2950
- return n['raw'][fS(0x238)]?.['name'] || n['raw']['g'] || '';
2951
- },
2952
- 'label'(f) {
2953
- const fs = h, n = f['raw']['_data'];
2954
- if (!n)
2955
- return '';
2956
- const V = n['value'] || n['v'] || 0x0, R = StzUtils['isNumber'](V) ? StzUtils[fs(0x1e6)](V) : V;
2957
- return fs(0x3a2) + R;
2958
- }
2959
- }, createDefaultTreemapOptions = (f = {}) => {
2960
- const fU = h;
2961
- return {
2962
- '_mounted': f['_mounted'] ?? (() => {
2963
- }),
2964
- 'responsive': f['responsive'] ?? DefaultResponsiveChartOptions['responsive'],
2965
- 'maintainAspectRatio': f[fU(0x21b)] ?? DefaultResponsiveChartOptions[fU(0x21b)],
2966
- 'plugins': {
2967
- 'tooltip': {
2968
- 'enabled': f['plugins']?.[fU(0x358)]?.['enabled'] ?? !![],
2969
- 'callbacks': {
2970
- ...defaultTreemapTooltipCallback,
2971
- ...f?.['plugins']?.['tooltip']?.['callbacks'] ?? {}
2972
- }
2973
- },
2974
- 'legend': {
2975
- 'display': f['plugins']?.['legend']?.['display'] ?? DefaultHiddenLegendTopOptions[fU(0x1fb)],
2976
- 'position': f['plugins']?.['legend']?.[fU(0x1e3)] ?? DefaultHiddenLegendTopOptions['position']
2977
- },
2978
- ...f?.['plugins'] ?? {}
2979
- },
2980
- ...StzUtils['omit'](f, ['plugins'])
2981
- };
2982
- };
2983
- var LocalDefaults = Object['freeze']({
2984
- '__proto__': null,
2985
- 'CreateZoomRangeSlider': CreateZoomRangeSlider,
2986
- 'DefaultArcRadius': DefaultArcRadius,
2987
- 'DefaultDataLabelsOptions': DefaultDataLabelsOptions,
2988
- 'DefaultHiddenLegendTopOptions': DefaultHiddenLegendTopOptions,
2989
- 'DefaultHiddenSparkScales': DefaultHiddenSparkScales,
2990
- 'DefaultResponsiveChartOptions': DefaultResponsiveChartOptions,
2991
- 'DefaultSparkPluginOptions': DefaultSparkPluginOptions,
2992
- 'DefaultTimeScaleOptions': DefaultTimeScaleOptions,
2993
- 'DefaultTopLegendOptions': DefaultTopLegendOptions,
2994
- 'DefaultZoomOptions': DefaultZoomOptions,
2995
- 'barScaleImgPlugin': barScaleImgPlugin,
2996
- 'blinkPlugin': blinkPlugin,
2997
- 'changeSetting': changeSetting,
2998
- 'chartMountPlugin': chartMountPlugin,
2999
- 'createAssignedTasksPlugin': createAssignedTasksPlugin,
3000
- 'createDefaultBarOptions': createDefaultBarOptions,
3001
- 'createDefaultBubbleOptions': createDefaultBubbleOptions,
3002
- 'createDefaultCartesianScales': createDefaultCartesianScales,
3003
- 'createDefaultDoughnutOptions': createDefaultDoughnutOptions,
3004
- 'createDefaultLineOptions': createDefaultLineOptions,
3005
- 'createDefaultPieOptions': createDefaultPieOptions,
3006
- 'createDefaultTreemapOptions': createDefaultTreemapOptions,
3007
- 'createStatusPlugin': createStatusPlugin,
3008
- 'createTodayLinePlugin': createTodayLinePlugin,
3009
- 'createWeekendPlugin': createWeekendPlugin,
3010
- 'customDatasetPlugins': customDatasetPlugins,
3011
- 'customLegend': customLegend,
3012
- 'defaultBarScales': defaultBarScales,
3013
- 'defaultBarTooltipCallback': defaultBarTooltipCallback,
3014
- 'defaultBubbleScales': defaultBubbleScales,
3015
- 'defaultBubbleTooltipCallback': defaultBubbleTooltipCallback,
3016
- 'defaultDoughnutTooltipCallback': defaultDoughnutTooltipCallback,
3017
- 'defaultLineScales': defaultLineScales,
3018
- 'defaultLineTooltipCallback': defaultLineTooltipCallback,
3019
- 'defaultPieTooltipCallback': defaultPieTooltipCallback,
3020
- 'defaultTreemapTooltipCallback': defaultTreemapTooltipCallback,
3021
- 'doughnutCenterTextPlugin': doughnutCenterTextPlugin,
3022
- 'loadingPlugin': loadingPlugin,
3023
- 'makeCenterHtml': makeCenterHtml,
3024
- 'noDataPlugin': noDataPlugin,
3025
- 'segmentImagePlugin': segmentImagePlugin,
3026
- 'sparkBarOptions': sparkBarOptions,
3027
- 'sparkBubbleOptions': sparkBubbleOptions,
3028
- 'sparkLineOptions': sparkLineOptions,
3029
- 'zoomRangeSlider': zoomRangeSlider,
3030
- 'zoomResetPlugin': zoomResetPlugin
3031
- });
3032
- class CartesianChart extends Chart {
3033
- ['type'];
3034
- ['_chartId'];
3035
- constructor(f, n, V, R, N) {
3036
- const fr = h;
3037
- super(f, n, V, R, N), this['type'] = f, this[fr(0x31e)]();
3038
- }
3039
- get [D(0x2d2)]() {
3040
- const fK = h;
3041
- return !this['_chartId'] && (this['_chartId'] = this[fK(0x343)] + '_' + Math['random']()), this['_chartId'];
3042
- }
3043
- set [D(0x2d2)](f) {
3044
- const fB = h;
3045
- this[fB(0x2d5)] = f;
3046
- const n = this['options'] = StzUtils['coalesce'](this[fB(0x2d6)], {});
3047
- n['_chartId'] = f;
3048
- }
3049
- ['requireLabels']() {
3050
- return ![];
3051
- }
3052
- ['decorateDataset'](f, n) {
3053
- const fx = h, V = getChartConfig(), R = V?.['defaultColor'] && StzUtils['isArray'](V['defaultColor']) ? V['defaultColor'] : CHART_COLOR, N = R[n % R['length']];
3054
- f[fx(0x29e)] ??= N, f['borderColor'] ??= N, f[fx(0x361)] ??= 'y', f['_uid'] = this['chartId'] + fx(0x1e1) + n;
3055
- }
3056
- ['mustHavePlugins']() {
3057
- return [
3058
- chartMountPlugin,
3059
- customDatasetPlugins
3060
- ];
3061
- }
3062
- ['resolveMustHavePlugins'](f) {
3063
- const fL = h, n = f || this['options'], V = getChartConfig(), R = n?.['_loading'] ?? V['loading'] ?? ![], N = StzUtils[fL(0x374)](n?.['_noDataText']), t = [...this['mustHavePlugins']()];
3064
- return R && t['push'](loadingPlugin), N && t[fL(0x35c)](noDataPlugin), t;
3065
- }
3066
- ['isLine']() {
3067
- const fX = h;
3068
- return this['type'] === fX(0x23b);
3069
- }
3070
- [D(0x251)]() {
3071
- return this['type'] === 'scatter';
3072
- }
3073
- [D(0x38f)]() {
3074
- return this['type'] === 'bar';
3075
- }
3076
- ['applyGlobalZoomConfig']() {
3077
- const n0 = h, f = getChartConfig();
3078
- if (f[n0(0x39a)] === !![]) {
3079
- this['setZoom'](!![]);
3080
- return;
3081
- }
3082
- StzUtils['isObject'](f['zoom']) && this['setZoom'](!![], f['zoom']);
3083
- }
3084
- ['ensureZoomResetPlugin']() {
3085
- this['setPlugin'](zoomResetPlugin);
3086
- }
3087
- ['removeZoomResetPlugin']() {
3088
- const n1 = h;
3089
- this[n1(0x222)](zoomResetPlugin['id']);
3090
- }
3091
- ['normalizeZoomOptions'](f) {
3092
- const n2 = h, n = StzUtils['cloneDeep'](f || {}), V = n['autoLimits'], R = n['zoomLimits'];
3093
- delete n[n2(0x23f)], delete n[n2(0x2fb)];
3094
- let N = {};
3095
- return V && (N = StzUtils['merge'](N, this[n2(0x22a)](V))), R && (N = StzUtils['merge'](N, R)), Object['keys'](N)[n2(0x201)] > 0x0 && (n['limits'] = StzUtils['merge'](N, StzUtils['cloneDeep'](n['limits'] || {}))), n;
3096
- }
3097
- ['resolveAutoZoomLimits'](f) {
3098
- const n3 = h, n = StzUtils['isString'](f) ? {
3099
- 'x': f,
3100
- 'y': f
3101
- } : f, V = {};
3102
- return Object['entries'](n)[n3(0x330)](([R, N]) => {
3103
- const n4 = h;
3104
- if (!N)
3105
- return;
3106
- const t = N === 'original' ? {
3107
- 'min': n4(0x27b),
3108
- 'max': n4(0x27b)
3109
- } : this['resolveAxisZoomLimits'](R);
3110
- if (!t)
3111
- return;
3112
- V[R] = t;
3113
- }), V;
3114
- }
3115
- ['resolveAxisZoomLimits'](f) {
3116
- const n5 = h, n = this['resolveZoomAxis'](f);
3117
- if (!n)
3118
- return undefined;
3119
- const V = [], R = f === n ? this[n5(0x20d)] : this['datasets']['filter'](t => (t?.[n === 'x' ? 'xAxisID' : 'yAxisID'] || n) === f);
3120
- let N = ![];
3121
- return R['forEach'](t => {
3122
- const p = t?.['data'];
3123
- if (!StzUtils['isArray'](p))
3124
- return;
3125
- p['forEach'](F => {
3126
- const n6 = h;
3127
- if (StzUtils['isNullOrUndefined'](F))
3128
- return;
3129
- if (StzUtils[n6(0x1f8)](F)) {
3130
- const G = this['extractParsedPointValue'](F, t, n);
3131
- !StzUtils[n6(0x27e)](G) && V['push'](G);
3132
- return;
3133
- }
3134
- if (n === 'x')
3135
- N = !![];
3136
- else {
3137
- const I = this[n6(0x294)](F);
3138
- !StzUtils[n6(0x27e)](I) && V[n6(0x35c)](I);
3139
- }
3140
- });
3141
- }), n === 'x' && (N || V['length'] === 0x0) && V['push'](...this['resolveAxisLabelLimitValues'](f, R)), this[n5(0x20f)](V);
3142
- }
3143
- ['resolveZoomAxis'](f) {
3144
- const n7 = h, n = this['options']?.['scales']?.[f]?.['axis'];
3145
- if (n === 'x' || n === 'y')
3146
- return n;
3147
- if (f === 'x' || f['startsWith']('x'))
3148
- return 'x';
3149
- if (f === 'y' || f[n7(0x280)]('y'))
3150
- return 'y';
3151
- return undefined;
3152
- }
3153
- ['resolveAxisLabelLimitValues'](f, n) {
3154
- const n8 = h, V = Math['max'](this[n8(0x1f7)]?.[n8(0x201)] || 0x0, ...n['map'](F => (F?.[n8(0x232)] || [])['length'])), R = this['options']?.['scales'], N = R?.[f]?.[n8(0x343)] || R?.['x']?.[n8(0x343)], t = !N || N === 'category';
3155
- if (t)
3156
- return Array['from']({ 'length': V }, (F, G) => G);
3157
- const p = (this['labels'] || [])['map'](F => this['normalizeLimitValue'](F))['filter'](F => !StzUtils['isNullOrUndefined'](F));
3158
- return p['length'] > 0x0 ? p : Array['from']({ 'length': V }, (F, G) => G);
3159
- }
3160
- [D(0x23a)](f, n, V) {
3161
- const n9 = h;
3162
- if (!StzUtils['isObject'](f))
3163
- return this[n9(0x294)](f);
3164
- const R = this['resolveParsingKey'](n, V), N = this[n9(0x22e)](f, R);
3165
- return this[n9(0x294)](N);
3166
- }
3167
- ['resolveParsingKey'](f, n) {
3168
- const nk = h, V = f?.[nk(0x21f)], R = this['options']?.['parsing'], N = n === 'x' ? 'xAxisKey' : 'yAxisKey';
3169
- return V?.[N] || R?.[N] || n;
3170
- }
3171
- [D(0x22e)](f, n) {
3172
- const nh = h;
3173
- return n[nh(0x341)]('.')['reduce']((V, R) => {
3174
- if (!V || !StzUtils['isObject'](V))
3175
- return undefined;
3176
- return V[R];
3177
- }, f);
3178
- }
3179
- ['normalizeLimitValue'](f) {
3180
- const nf = h;
3181
- if (f instanceof Date)
3182
- return f[nf(0x2c0)]();
3183
- if (StzUtils[nf(0x1fa)](f) && Number[nf(0x19e)](f))
3184
- return f;
3185
- if (StzUtils['isString'](f)) {
3186
- const n = f['trim']();
3187
- if (!n)
3188
- return undefined;
3189
- const V = Number(n);
3190
- if (Number['isFinite'](V))
3191
- return V;
3192
- const R = Date[nf(0x202)](n);
3193
- if (Number[nf(0x19e)](R))
3194
- return R;
3195
- }
3196
- return undefined;
3197
- }
3198
- ['toZoomScaleLimits'](f) {
3199
- const nn = h, n = f[nn(0x2ad)](V => Number['isFinite'](V));
3200
- if (n[nn(0x201)] === 0x0)
3201
- return undefined;
3202
- return {
3203
- 'min': Math[nn(0x36d)](...n),
3204
- 'max': Math[nn(0x1c2)](...n)
3205
- };
3206
- }
3207
- ['normalize']() {
3208
- const nV = h;
3209
- this['requireLabels']() && (!this['labels'] || this['labels'][nV(0x201)] === 0x0) && CustomError['shield'](ErrorCode['LABELS_REQUIRED']);
3210
- }
3211
- ['configAop'](f) {
3212
- const n = {
3213
- 'get': (V, R, N) => {
3214
- const nR = h;
3215
- if (R === 'data') {
3216
- const t = V[nR(0x232)];
3217
- this['requireLabels']() && (!t?.['labels'] || t[nR(0x1f7)][nR(0x201)] === 0x0) && CustomError['shield'](ErrorCode['LABELS_REQUIRED']), t && StzUtils['isArray'](t[nR(0x20d)]) && t['datasets']['length'] > 0x0 && (t['datasets'] = t[nR(0x20d)]['map']((p, F) => {
3218
- if (!StzUtils['isObject'](p))
3219
- return p;
3220
- return this['decorateDataset'](p, F), p;
3221
- }));
3222
- }
3223
- if (R === 'plugins') {
3224
- const p = this['resolveMustHavePlugins'](V['options']);
3225
- V['plugins'] = this[nR(0x326)](StzUtils['isArray'](V[nR(0x37c)]) ? V['plugins'] : undefined, p);
3226
- }
3227
- return Reflect['get'](V, R, N);
3228
- }
3229
- };
3230
- return new Proxy(f, n);
3231
- }
3232
- ['build'](f) {
3233
- const nN = h;
3234
- this[nN(0x208)]();
3235
- const n = f || this['type'] + '_' + Math[nN(0x344)]();
3236
- this[nN(0x2d5)] = n;
3237
- const V = {
3238
- ...this['cloneValue'](this['options']),
3239
- '_chartId': n
3240
- }, R = {
3241
- '_chartId': n,
3242
- 'type': this[nN(0x343)],
3243
- 'data': {
3244
- 'labels': this['cloneValue'](this['labels']),
3245
- 'datasets': this['cloneValue'](this['datasets'])
3246
- },
3247
- 'options': V,
3248
- 'plugins': this['clonePlugins'](this['plugins'])
3249
- }, N = this['configAop'](R);
3250
- return void N['data'], void N[nN(0x37c)], {
3251
- '_chartId': N[nN(0x2d5)],
3252
- 'type': N[nN(0x343)],
3253
- 'datasetIdKey': nN(0x2b3),
3254
- 'data': N['data'],
3255
- 'options': N['options'],
3256
- 'plugins': N[nN(0x37c)]
3257
- };
3258
- }
3259
- [D(0x29f)](f = '') {
3260
- const nt = h;
3261
- this['normalize']();
3262
- if (f)
3263
- this['_chartId'] = f;
3264
- const n = this['chartId'], V = {
3265
- ...this['cloneValue'](this['options']),
3266
- '_chartId': f || this['type'] + '_' + Math['random']()
3267
- }, R = {
3268
- '_chartId': n,
3269
- 'type': this[nt(0x343)],
3270
- 'data': {
3271
- 'labels': this[nt(0x2f0)](this['labels']),
3272
- 'datasets': this[nt(0x2f0)](this['datasets'])
3273
- },
3274
- 'options': V,
3275
- 'plugins': this['clonePlugins'](this['plugins'])
3276
- }, N = this['configAop'](R);
3277
- return void N['data'], void N['plugins'], {
3278
- '_chartId': N['_chartId'],
3279
- 'type': N['type'],
3280
- 'data': N['data'],
3281
- 'options': N['options'],
3282
- 'plugins': N['plugins']
3283
- };
3284
- }
3285
- ['isCartesianChartType']() {
3286
- return [
3287
- 'line',
3288
- 'bar',
3289
- 'scatter',
3290
- 'bubble'
3291
- ]['includes'](this['type']);
3292
- }
3293
- ['setScales'](f) {
3294
- const np = h, n = this['options'] = StzUtils['coalesce'](this['options'], {});
3295
- return n[np(0x2e5)] = f, this;
3296
- }
3297
- ['setTimeScale'](f = 'x', n = {}) {
3298
- const nF = h, V = this[nF(0x2d6)] = StzUtils['coalesce'](this[nF(0x2d6)], {}), R = V[nF(0x2e5)] = StzUtils['coalesce'](V['scales'], {}), N = R[f] = StzUtils['coalesce'](R[f], {}), {
3299
- type: type = 'time',
3300
- unit: t,
3301
- displayFormats: p,
3302
- tooltipFormat: F,
3303
- parser: G,
3304
- min: I,
3305
- max: Y,
3306
- suggestedMin: H,
3307
- suggestedMax: g,
3308
- stepSize: d,
3309
- bounds: O,
3310
- offsetAfterAutoskip: T,
3311
- isoWeekday: w,
3312
- round: W,
3313
- minUnit: C,
3314
- adapters: e,
3315
- ticks: Q,
3316
- grid: E,
3317
- border: P,
3318
- parsing: J,
3319
- ...u
3320
- } = n;
3321
- N['type'] = type;
3322
- if (!StzUtils[nF(0x300)](I))
3323
- N[nF(0x36d)] = I;
3324
- if (!StzUtils['isUndefined'](Y))
3325
- N['max'] = Y;
3326
- if (!StzUtils[nF(0x300)](H))
3327
- N[nF(0x266)] = H;
3328
- if (!StzUtils['isUndefined'](g))
3329
- N['suggestedMax'] = g;
3330
- if (!StzUtils['isUndefined'](O))
3331
- N['bounds'] = O;
3332
- if (!StzUtils['isUndefined'](T))
3333
- N['offsetAfterAutoskip'] = T;
3334
- if (!StzUtils[nF(0x300)](d))
3335
- N['ticks'] = {
3336
- ...N['ticks'] || {},
3337
- 'stepSize': d
3338
- };
3339
- if (Q)
3340
- N[nF(0x19a)] = StzUtils['merge'](N['ticks'] || {}, Q);
3341
- if (E)
3342
- N['grid'] = StzUtils['merge'](N['grid'] || {}, E);
3343
- if (P)
3344
- N['border'] = StzUtils['merge'](N['border'] || {}, P);
3345
- if (e)
3346
- N['adapters'] = StzUtils['merge'](N[nF(0x1fc)] || {}, e);
3347
- return N[nF(0x351)] = StzUtils[nF(0x1a8)](N[nF(0x351)] || {}, {
3348
- 'unit': t ?? DefaultTimeScaleOptions['unit'],
3349
- 'tooltipFormat': F ?? DefaultTimeScaleOptions['tooltipFormat'],
3350
- 'displayFormats': StzUtils['merge'](DefaultTimeScaleOptions['displayFormats'], p || {}),
3351
- ...G ? { 'parser': G } : {},
3352
- ...!StzUtils['isUndefined'](w) ? { 'isoWeekday': w } : {},
3353
- ...!StzUtils['isUndefined'](W) ? { 'round': W } : {},
3354
- ...!StzUtils['isUndefined'](C) ? { 'minUnit': C } : {}
3355
- }), !StzUtils['isEmpty'](u) && StzUtils[nF(0x1a8)](N, u), J && (!StzUtils['isUndefined'](J[nF(0x221)]) || !StzUtils['isUndefined'](J[nF(0x1cf)])) && this[nF(0x2ea)](StzUtils['isUndefined'](J['xAxisKey']) ? ![] : J['xAxisKey'], StzUtils['isUndefined'](J[nF(0x1cf)]) ? ![] : J['yAxisKey']), this;
3356
- }
3357
- ['setAxisTitle'](f, n) {
3358
- const V = this['options'] = StzUtils['coalesce'](this['options'], {}), R = V['scales'] = StzUtils['coalesce'](V['scales'], {}), N = R[f] = StzUtils['coalesce'](R[f], {});
3359
- return N['title'] = n, this;
3360
- }
3361
- ['setGridOptions'](f, n) {
3362
- const nG = h, V = this[nG(0x2d6)] = StzUtils['coalesce'](this['options'], {}), R = V['scales'] = StzUtils['coalesce'](V['scales'], {}), N = R[f] = StzUtils['coalesce'](R[f], {});
3363
- return N[nG(0x200)] = {
3364
- ...N[nG(0x200)],
3365
- ...n
3366
- }, this;
3367
- }
3368
- ['setZoom'](f, n) {
3369
- const nI = h, V = this[nI(0x2d6)] = StzUtils[nI(0x2d3)](this['options'], {}), R = V['plugins'] = StzUtils['coalesce'](V['plugins'], {});
3370
- if (!f)
3371
- return nI(0x39a) in R && delete R[nI(0x39a)], this[nI(0x38a)](), this;
3372
- const N = this[nI(0x20e)](n), t = StzUtils[nI(0x1a8)](StzUtils['cloneDeep'](DefaultZoomOptions), N);
3373
- return R['zoom'] = StzUtils[nI(0x1a8)](R['zoom'] || {}, t), this[nI(0x2c7)](), this;
3374
- }
3375
- ['addZoom'](f = ![], n) {
3376
- const nY = h;
3377
- if (f || StzUtils['isUndefined'](n))
3378
- return this[nY(0x33b)](!![]);
3379
- return this['setZoom'](!![], n);
3380
- }
3381
- ['addDataLabels'](f = ![], n) {
3382
- const V = this['options'] = StzUtils['coalesce'](this['options'], {}), R = V['plugins'] = StzUtils['coalesce'](V['plugins'], {}), N = f ? StzUtils['cloneDeep'](DefaultDataLabelsOptions) : StzUtils['cloneDeep'](n);
3383
- return R['datalabels'] = N, this;
3384
- }
3385
- ['setYAxisForDataset'](f, n = 'y') {
3386
- const nH = h;
3387
- if (!this['datasets'] || !this[nH(0x20d)][f])
3388
- return this;
3389
- return this['isCartesianChartType']() && (this['datasets'][f][nH(0x361)] = n, n === 'y1' && this['ensureY1AxisExists']()), this;
3390
- }
3391
- ['ensureY1AxisExists']() {
3392
- const ng = h, f = this['options'] = StzUtils['coalesce'](this['options'], {}), n = f['scales'] = StzUtils['coalesce'](f['scales'], {});
3393
- !('y1' in n) && (n['y1'] = {
3394
- 'type': 'linear',
3395
- 'display': !![],
3396
- 'position': 'right',
3397
- 'grid': { 'drawOnChartArea': ![] },
3398
- 'ticks': {
3399
- 'color': '#000',
3400
- 'align': ng(0x34c)
3401
- }
3402
- });
3403
- }
3404
- ['setAxisRange'](f, n, V) {
3405
- const nd = h, R = this[nd(0x2d6)] = StzUtils[nd(0x2d3)](this[nd(0x2d6)], {}), N = R['scales'] = StzUtils['coalesce'](R[nd(0x2e5)], {}), t = N[f] = StzUtils['coalesce'](N[f], {});
3406
- return !StzUtils['isUndefined'](n) && (t['min'] = n), !StzUtils['isUndefined'](V) && (t['max'] = V), this;
3407
- }
3408
- ['setYAxisID'](f, n) {
3409
- const nO = h, V = [
3410
- 'bar',
3411
- nO(0x23b),
3412
- nO(0x338),
3413
- nO(0x268)
3414
- ];
3415
- return this['datasets'] && this['datasets'][f] && (V['includes'](this['type']) ? this['datasets'][f]['yAxisID'] = n : CustomError['shield'](ErrorCode['NOT_SUPPORTED_OPTION'], this[nO(0x343)] + nO(0x20b))), this;
3416
- }
3417
- ['setAxisPosition'](f, n) {
3418
- const nT = h, V = this[nT(0x2d6)] = StzUtils[nT(0x2d3)](this[nT(0x2d6)], {}), R = V[nT(0x2e5)] = StzUtils['coalesce'](V['scales'], {});
3419
- if (R[f]) {
3420
- const N = R[f];
3421
- 'position' in N ? N['position'] = n : CustomError[nT(0x2ef)](ErrorCode[nT(0x1aa)], R + '\x20not\x20support\x20scales\x20position\x20');
3422
- }
3423
- return this;
3424
- }
3425
- ['setAddImg'](f) {
3426
- const nw = h, n = this[nw(0x2d6)] = StzUtils['coalesce'](this['options'], {}), V = n[nw(0x2e5)] = StzUtils['coalesce'](n['scales'], {});
3427
- if (V[f])
3428
- return console['warn'](nw(0x272) + f + nw(0x369)), this;
3429
- (!this['datasets'] || this['datasets']['length'] === 0x0) && CustomError['shield'](ErrorCode[nw(0x210)]);
3430
- const R = this['datasets'];
3431
- for (let t = 0x0; t < R['length']; t++) {
3432
- const p = R[t];
3433
- !p && CustomError[nw(0x2ef)](ErrorCode['EMPTY_REQUIRED_PROPERTY'], nw(0x2c5) + t + '\x20is\x20null\x20or\x20undefined'), !p[nw(0x334)] && (!p['images'] || p['images']['length'] === 0x0) && CustomError[nw(0x2ef)](ErrorCode[nw(0x340)], 'Dataset\x20\x22' + (p['label'] || '#' + t) + nw(0x383));
3434
- }
3435
- const N = f['startsWith']('x');
3436
- if (N) {
3437
- const F = { 'id': f + 'ScalesImage-' + this['_chartId'] };
3438
- this['setPlugin'](F);
3439
- } else {
3440
- const G = { 'id': f + 'ScalesImage-' + this['_chartId'] };
3441
- this['setPlugin'](G);
3442
- }
3443
- return this;
3444
- }
3445
- ['addRangeSlider'](f) {
3446
- const n = CreateZoomRangeSlider(f);
3447
- return this['setPlugin'](n), this;
3448
- }
3449
- ['setPadding'](f) {
3450
- const nW = h, n = this[nW(0x2d6)] = StzUtils[nW(0x2d3)](this['options'], {}), V = n['layout'] = StzUtils[nW(0x2d3)](n['layout'], {});
3451
- return V[nW(0x2e4)] = f, this;
3452
- }
3453
- ['setBackgroundAlpha'](f) {
3454
- const nC = h;
3455
- (f < 0x0 || f > 0x1) && CustomError['shield'](ErrorCode[nC(0x33d)], nC(0x215));
3456
- if (!this[nC(0x20d)] || this['datasets']['length'] === 0x0)
3457
- return this;
3458
- return this[nC(0x20d)]['forEach'](n => {
3459
- const ne = h;
3460
- if (n) {
3461
- !n['backgroundColor'] && n[ne(0x336)] && (n['backgroundColor'] = n['borderColor']);
3462
- if (n[ne(0x29e)]) {
3463
- if (typeof n['backgroundColor'] === 'string')
3464
- n[ne(0x29e)] = this['addAlphaToColor'](n['backgroundColor'], f);
3465
- else
3466
- StzUtils['isArray'](n['backgroundColor']) && (n[ne(0x29e)] = n['backgroundColor']['map'](V => typeof V === 'string' ? this['addAlphaToColor'](V, f) : V));
3467
- }
3468
- }
3469
- }), this;
3470
- }
3471
- ['addAlphaToColor'](f, n) {
3472
- const nQ = h;
3473
- if (f['startsWith']('#')) {
3474
- const N = f[nQ(0x1d5)](0x1);
3475
- let t, p, F;
3476
- if (N['length'] === 0x3)
3477
- t = parseInt(N[0x0] + N[0x0], 0x10), p = parseInt(N[0x1] + N[0x1], 0x10), F = parseInt(N[0x2] + N[0x2], 0x10);
3478
- else {
3479
- if (N[nQ(0x201)] === 0x6)
3480
- t = parseInt(N[nQ(0x1d5)](0x0, 0x2), 0x10), p = parseInt(N['slice'](0x2, 0x4), 0x10), F = parseInt(N['slice'](0x4, 0x6), 0x10);
3481
- else
3482
- return f;
3483
- }
3484
- return nQ(0x337) + t + ',\x20' + p + ',\x20' + F + ',\x20' + n + ')';
3485
- }
3486
- const V = f['match'](/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
3487
- if (V) {
3488
- const [, G, I, Y] = V;
3489
- return nQ(0x337) + G + ',\x20' + I + ',\x20' + Y + ',\x20' + n + ')';
3490
- }
3491
- const R = f['match'](/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([0-9.]+)\)/);
3492
- if (R) {
3493
- const [, H, d, O] = R;
3494
- return nQ(0x337) + H + ',\x20' + d + ',\x20' + O + ',\x20' + n + ')';
3495
- }
3496
- return f;
3497
- }
3498
- ['setParsingKey'](f, n) {
3499
- const nE = h, V = this[nE(0x2d6)] = StzUtils[nE(0x2d3)](this['options'], {});
3500
- return V['parsing'] = !StzUtils['isFalsy'](f) || !StzUtils['isFalsy'](n) ? {
3501
- ...!StzUtils['isFalsy'](f) && { 'xAxisKey': f },
3502
- ...!StzUtils['isFalsy'](n) && { 'yAxisKey': n }
3503
- } : ![], this;
3504
- }
3505
- ['setDatasetParsing'](f, n, V) {
3506
- const nP = h;
3507
- if (this['datasets'] && this['datasets'][f]) {
3508
- const R = {};
3509
- if (!StzUtils['isFalsy'](n))
3510
- R[nP(0x221)] = n;
3511
- if (!StzUtils['isFalsy'](V))
3512
- R['yAxisKey'] = V;
3513
- this['datasets'][f]['parsing'] = R;
3514
- } else
3515
- CustomError['shield'](ErrorCode[nP(0x2c4)]);
3516
- return this;
3517
- }
3518
- ['setAllDatasetsParsing'](f, n) {
3519
- const nu = h;
3520
- if (this['datasets']) {
3521
- const V = {};
3522
- if (!StzUtils['isFalsy'](f))
3523
- V['xAxisKey'] = f;
3524
- if (!StzUtils['isFalsy'](n))
3525
- V['yAxisKey'] = n;
3526
- this['datasets']['forEach'](R => {
3527
- const nJ = h;
3528
- R[nJ(0x21f)] = V;
3529
- });
3530
- } else
3531
- CustomError[nu(0x2ef)](ErrorCode['DATASET_REQUIRED']);
3532
- return this;
3533
- }
3534
- ['customLegend'](f) {
3535
- const nc = h, n = this['options'] = StzUtils['coalesce'](this[nc(0x2d6)], {}), V = n['plugins'] = StzUtils['coalesce'](n['plugins'], {});
3536
- return V['htmlLegend'] = f, this['setPlugin'](customLegend), this;
3537
- }
3538
- ['getDataset'](f) {
3539
- const nD = h;
3540
- return (!this['datasets'] || !StzUtils[nD(0x319)](this['datasets'])) && CustomError['shield'](ErrorCode['DATASET_REQUIRED']), this[nD(0x20d)]['find'](n => n && n[nD(0x2b3)] === f);
3541
- }
3542
- ['setDataset'](f, n) {
3543
- const nl = h;
3544
- (!this['datasets'] || !StzUtils[nl(0x319)](this['datasets'])) && CustomError['shield'](ErrorCode['DATASET_REQUIRED']);
3545
- const V = this[nl(0x20d)]['findIndex'](R => R && R[nl(0x2b3)] === f);
3546
- return V === -0x1 && CustomError['shield'](ErrorCode['DATASET_IDENTIFIER_NOT_FOUND']), n['_uid'] = f, this[nl(0x20d)][V] = n, this;
3547
- }
3548
- [D(0x28b)](f) {
3549
- const ny = h;
3550
- return (!this[ny(0x20d)] || !StzUtils[ny(0x319)](this['datasets'])) && CustomError['shield'](ErrorCode['DATASET_REQUIRED']), StzUtils[ny(0x1fa)](f) ? ((f < 0x0 || f >= this['datasets']['length']) && CustomError[ny(0x2ef)](ErrorCode['NOT_FOUND_DATASET'], 'Dataset\x20index\x20' + f + ny(0x1b5)), this['datasets'][f]) : this['datasets']['find'](n => n && n['_uid'] === f);
3551
- }
3552
- [D(0x322)](f, n) {
3553
- const nZ = h;
3554
- (!this['datasets'] || !StzUtils['isArray'](this['datasets'])) && CustomError[nZ(0x2ef)](ErrorCode[nZ(0x210)]);
3555
- let V;
3556
- StzUtils['isNumber'](f) ? (V = f, (V < 0x0 || V >= this[nZ(0x20d)]['length']) && CustomError[nZ(0x2ef)](ErrorCode['NOT_FOUND_DATASET'], 'Dataset\x20index\x20' + V + '\x20is\x20out\x20of\x20bounds')) : (V = this[nZ(0x20d)]['findIndex'](N => N && N['_uid'] === f), V === -0x1 && CustomError['shield'](ErrorCode['DATASET_IDENTIFIER_NOT_FOUND']));
3557
- const R = this[nZ(0x20d)][V]['_uid'];
3558
- return n['_uid'] = R || this['chartId'] + '_ds_' + V, this['datasets'][V] = n, this;
3559
- }
3560
- ['addDataset'](f) {
3561
- const no = h;
3562
- !this[no(0x20d)] && (this['datasets'] = []);
3563
- const n = this['datasets']['length'], V = this[no(0x2d2)] + '_ds_' + n;
3564
- return f['_uid'] = V, this[no(0x30e)](f, n), this[no(0x20d)][no(0x35c)](f), V;
3565
- }
3566
- [D(0x33a)](f, n) {
3567
- const ni = h, V = this[ni(0x2d6)] = StzUtils[ni(0x2d3)](this['options'], {}), R = V['scales'] = StzUtils['coalesce'](V[ni(0x2e5)], {}), N = R[f] = StzUtils['coalesce'](R[f], {});
3568
- return N['grid'] = n, this;
3569
- }
3570
- [D(0x297)](f) {
3571
- const nv = h;
3572
- return this[nv(0x1d0)]({
3573
- 'id': 'customCanvasBackgroundColor',
3574
- 'beforeDraw': n => {
3575
- const nM = h, {ctx: V} = n;
3576
- V['save'](), V['globalCompositeOperation'] = 'destination-over', V[nM(0x265)] = f, V['fillRect'](0x0, 0x0, n['width'], n['height']), V['restore']();
3577
- }
3578
- }), this;
3579
- }
3580
- [D(0x1f6)](f, n) {
3581
- const nq = h;
3582
- let V, R;
3583
- StzUtils['isNumber'](f) ? (V = f, R = n) : ((!this['datasets'] || this['datasets']['length'] === 0x0) && CustomError[nq(0x2ef)](ErrorCode[nq(0x210)]), V = this['datasets']['length'] - 0x1, R = f);
3584
- (!this[nq(0x20d)] || this['datasets'][nq(0x201)] === 0x0) && CustomError['shield'](ErrorCode['DATASET_REQUIRED']);
3585
- (V < 0x0 || V >= this[nq(0x20d)][nq(0x201)]) && CustomError['shield'](ErrorCode['NOT_FOUND_DATASET'], nq(0x28e) + V + '\x20is\x20out\x20of\x20bounds');
3586
- const N = this['datasets'][V];
3587
- !N['data'] && (N['data'] = []);
3588
- if (StzUtils['isArray'](R)) {
3589
- const t = R['map']((p, F) => {
3590
- if (StzUtils['isObject'](p))
3591
- return {
3592
- ...p,
3593
- '_uid': p['_uid'] || this['chartId'] + '_ds_' + V + '_pt_' + (N['data']['length'] + F)
3594
- };
3595
- return p;
3596
- });
3597
- N['data'][nq(0x35c)](...t);
3598
- } else {
3599
- if (StzUtils[nq(0x1f8)](R)) {
3600
- const p = {
3601
- ...R,
3602
- '_uid': R['_uid'] || this['chartId'] + '_ds_' + V + nq(0x250) + N['data']['length']
3603
- };
3604
- N['data'][nq(0x35c)](p);
3605
- } else
3606
- N['data']['push'](R);
3607
- }
3608
- return this['isTemporalScale']() && N[nq(0x232)]['sort']((F, G) => {
3609
- const I = StzUtils['isArray'](F['x']) ? F['x'][0x0] : F['x'], Y = StzUtils['isArray'](G['x']) ? G['x'][0x0] : G['x'], H = I instanceof Date ? I : new Date(I), g = Y instanceof Date ? Y : new Date(Y);
3610
- return H['getTime']() - g['getTime']();
3611
- }), this;
3612
- }
3613
- ['isTemporalScale'](f = 'x') {
3614
- const nz = h, n = this[nz(0x2d6)]?.['scales']?.[f]?.['type'];
3615
- return n === 'time' || n === 'timeseries' || n === 'realtime';
3616
- }
3617
- }
3618
- class BarChart extends CartesianChart {
3619
- constructor(f, n, V, R, N) {
3620
- const t = {
3621
- ...defaultBarScales,
3622
- ...R?.['scales'] ?? {}
3623
- }, p = createDefaultBarOptions(R, t);
3624
- super(f, n, V, p, N);
3625
- }
3626
- [D(0x261)]() {
3627
- return ![];
3628
- }
3629
- [D(0x29f)](f) {
3630
- return super['makeConfig'](f);
3631
- }
3632
- ['setBarThickness'](f, n) {
3633
- const na = h;
3634
- return this['datasets'] && this['datasets'][f] && (this[na(0x20d)][f][na(0x309)] = n), this;
3635
- }
3636
- ['setAllBarThickness'](f) {
3637
- const nb = h;
3638
- return this[nb(0x20d)] && this['datasets']['forEach']((n, V) => {
3639
- this['setBarThickness'](V, f);
3640
- }), this;
3641
- }
3642
- [D(0x2bf)](f, n) {
3643
- const nA = h;
3644
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f][nA(0x2b1)] = n), this;
3645
- }
3646
- ['setAllMaxBarThickness'](f) {
3647
- const nj = h;
3648
- return this['datasets'] && this[nj(0x20d)][nj(0x330)]((n, V) => {
3649
- const nm = h;
3650
- this[nm(0x2bf)](V, f);
3651
- }), this;
3652
- }
3653
- ['setBarPercentage'](f, n) {
3654
- const nS = h;
3655
- return this[nS(0x20d)] && this['datasets'][f] && (this[nS(0x20d)][f]['barPercentage'] = n), this;
3656
- }
3657
- ['setAllBarPercentage'](f) {
3658
- const ns = h;
3659
- return this[ns(0x20d)] && this['datasets'][ns(0x330)]((n, V) => {
3660
- this['setBarPercentage'](V, f);
3661
- }), this;
3662
- }
3663
- ['setCategoryPercentage'](f, n) {
3664
- const nU = h;
3665
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f][nU(0x3a4)] = n), this;
3666
- }
3667
- [D(0x316)](f) {
3668
- const nr = h;
3669
- return this['datasets'] && this['datasets'][nr(0x330)]((n, V) => {
3670
- const nK = h;
3671
- this[nK(0x1de)](V, f);
3672
- }), this;
3673
- }
3674
- [D(0x1e8)](f, n) {
3675
- const nB = h;
3676
- return this['datasets'] && this[nB(0x20d)][f] && (this['datasets'][f]['borderWidth'] = n), this;
3677
- }
3678
- ['setAllBorderWidth'](f) {
3679
- const nx = h;
3680
- return this['datasets'] && this['datasets'][nx(0x330)](n => {
3681
- n['borderWidth'] = f;
3682
- }), this;
3683
- }
3684
- ['setBorderRadius'](f, n) {
3685
- const nL = h;
3686
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f][nL(0x2e6)] = n), this;
3687
- }
3688
- ['setAllBorderRadius'](f) {
3689
- const nX = h;
3690
- return this[nX(0x20d)] && this[nX(0x20d)][nX(0x330)]((n, V) => {
3691
- const V0 = h;
3692
- this[V0(0x298)](V, f);
3693
- }), this;
3694
- }
3695
- [D(0x2a7)](f) {
3696
- const V1 = h, n = this['options']?.[V1(0x2e5)];
3697
- if (!n)
3698
- return this;
3699
- return Object['entries'](n)['forEach'](([V, R]) => {
3700
- const V2 = h;
3701
- StzUtils['isObject'](R) && (R[V2(0x377)] = f);
3702
- }), this;
3703
- }
3704
- ['setBarImg'](f) {
3705
- const V3 = h;
3706
- if (StzUtils['isEmpty'](this['datasets']))
3707
- return this;
3708
- const n = this[V3(0x2d6)] = StzUtils['coalesce'](this[V3(0x2d6)], {}), V = n['scales'] = StzUtils[V3(0x2d3)](n['scales'], {});
3709
- if (StzUtils['isEmpty'](V[f]))
3710
- return this;
3711
- return this['plugins']?.['push'](barScaleImgPlugin), this;
3712
- }
3713
- ['sparkBarChart']() {
3714
- const V4 = h, f = this['options'] = StzUtils[V4(0x2d3)](this['options'], {}), n = StzUtils['merge'](f, sparkBarOptions);
3715
- return this['options'] = n, this;
3716
- }
3717
- ['ganttChart']() {
3718
- const V8 = h, f = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
3719
- return this['datasets'] && this['datasets']['forEach']((n, V) => {
3720
- const V5 = h;
3721
- n[V5(0x232)] && StzUtils['isArray'](n['data']) && n['data']['forEach']((R, N) => {
3722
- const V6 = h;
3723
- if (StzUtils[V6(0x319)](R))
3724
- R['forEach']((t, p) => {
3725
- const V7 = h;
3726
- if (typeof t === 'string' && !f['test'](t))
3727
- throw CustomError['shield'](ErrorCode['INVALID_DATA_STRUCTURE'], V7(0x350) + V + ',\x20point\x20' + N + '[' + p + ']:\x20Invalid\x20date\x20format.\x20Expected\x20yyyy-mm-dd,\x20got:\x20' + t);
3728
- });
3729
- else {
3730
- if (StzUtils['isObject'](R) && 'x' in R) {
3731
- if (typeof R['x'] === 'string' && !f['test'](R['x']))
3732
- throw CustomError['shield'](ErrorCode[V6(0x1f9)], 'Dataset\x20' + V + ',\x20point\x20' + N + V6(0x394) + R['x']);
3733
- }
3734
- }
3735
- }), n['borderWidth'] = 0x1, n[V5(0x1bb)] = ![];
3736
- }), !(this['options']['scales']['x']['type'] === V8(0x351)) && (this['options']['scales']['x'][V8(0x343)] = 'time'), this[V8(0x2d6)]['scales']['x'][V8(0x351)] = {
3737
- 'unit': V8(0x1bc),
3738
- 'displayFormats': { 'day': 'yyyy-MM-dd' }
3739
- }, this['options']['indexAxis'] = 'y', this;
3740
- }
3741
- }
3742
- class LineChart extends CartesianChart {
3743
- constructor(f, n, V, R) {
3744
- const V9 = h, N = {
3745
- ...defaultLineScales,
3746
- ...R?.[V9(0x2e5)] ?? {}
3747
- }, t = createDefaultLineOptions(R, N);
3748
- super(f, n, V, t);
3749
- }
3750
- ['requireLabels']() {
3751
- return this['options']?.['scales']?.['x']?.['type'] === 'category';
3752
- }
3753
- ['makeConfig'](f) {
3754
- const Vk = h;
3755
- return super[Vk(0x29f)](f);
3756
- }
3757
- ['setFill'](f, n, V) {
3758
- const Vh = h;
3759
- if (this['datasets'] && this['datasets'][f]) {
3760
- if (n) {
3761
- this['datasets'][f]['fill'] = Vh(0x2fa);
3762
- if (V)
3763
- this[Vh(0x20d)][f]['backgroundColor'] = V;
3764
- else
3765
- !this['datasets'][f]['backgroundColor'] && (this['datasets'][f][Vh(0x29e)] = 'rgba(75,\x20192,\x20192,\x200.2)');
3766
- } else
3767
- this['datasets'][f]['fill'] = ![];
3768
- }
3769
- return this;
3770
- }
3771
- [D(0x2b8)](f, n) {
3772
- return this['datasets'] && this['datasets']['forEach']((V, R) => {
3773
- this['setFill'](R, f, n);
3774
- }), this;
3775
- }
3776
- ['setTension'](f, n) {
3777
- const Vf = h;
3778
- return this['datasets'] && this['datasets'][f] && (this[Vf(0x20d)][f]['tension'] = n), this;
3779
- }
3780
- ['setAllTension'](f) {
3781
- const Vn = h;
3782
- return this[Vn(0x20d)] && this['datasets']['forEach']((n, V) => {
3783
- this['setTension'](V, f);
3784
- }), this;
3785
- }
3786
- [D(0x1e8)](f, n) {
3787
- const VV = h;
3788
- return this['datasets'] && this[VV(0x20d)][f] && (this['datasets'][f][VV(0x34f)] = n), this;
3789
- }
3790
- ['setAllBorderWidth'](f) {
3791
- const VR = h;
3792
- return this[VR(0x20d)] && this['datasets'][VR(0x330)]((n, V) => {
3793
- this['setBorderWidth'](V, f);
3794
- }), this;
3795
- }
3796
- [D(0x3a5)](f, n) {
3797
- const VN = h;
3798
- return this[VN(0x20d)] && this['datasets'][f] && (this[VN(0x20d)][f]['pointRadius'] = n), this;
3799
- }
3800
- ['setAllPointRadius'](f) {
3801
- const Vt = h;
3802
- return this['datasets'] && this[Vt(0x20d)][Vt(0x330)]((n, V) => {
3803
- const Vp = h;
3804
- this[Vp(0x3a5)](V, f);
3805
- }), this;
3806
- }
3807
- [D(0x367)](f, n) {
3808
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f]['pointHoverRadius'] = n), this;
3809
- }
3810
- ['setAllPointHoverRadius'](f) {
3811
- const VF = h;
3812
- return this[VF(0x20d)] && this[VF(0x20d)]['forEach']((n, V) => {
3813
- const VG = h;
3814
- this[VG(0x367)](V, f);
3815
- }), this;
3816
- }
3817
- ['setGradient'](f, n, V, R = 'vertical') {
3818
- const VI = h;
3819
- (!this[VI(0x20d)] || !this['datasets'][f]) && CustomError[VI(0x2ef)](ErrorCode[VI(0x1bf)]);
3820
- n < 0x2 && console['warn'](VI(0x1c7));
3821
- V['length'] !== n && console[VI(0x1da)](VI(0x19c) + V['length'] + ')\x20must\x20match\x20steps\x20(' + n + ')');
3822
- const N = () => {
3823
- const VY = h, t = ChartInstance['getChart'](this['chartId']), {
3824
- ctx: p,
3825
- chartArea: F
3826
- } = t;
3827
- if (!F)
3828
- return null;
3829
- let G = 0x0, I = F['top'], Y = 0x0, H = F['bottom'];
3830
- R === VY(0x224) && (G = F['left'], I = 0x0, Y = F[VY(0x31a)], H = 0x0);
3831
- const g = p['createLinearGradient'](G, I, Y, H), d = this[VY(0x1a1)](n);
3832
- return d['forEach']((O, T) => {
3833
- const VH = h;
3834
- T < V['length'] && g[VH(0x2ab)](O, V[T]);
3835
- }), g;
3836
- };
3837
- return this['datasets'][f][VI(0x336)] = N, this['datasets'][f]['fill'] !== ![] && (this[VI(0x20d)][f][VI(0x29e)] = N), this;
3838
- }
3839
- ['setAllGradient'](f, n, V = 'vertical') {
3840
- return this['datasets'] && this['datasets']['forEach']((R, N) => {
3841
- const Vg = h;
3842
- this[Vg(0x32f)](N, f, n, V);
3843
- }), this;
3844
- }
3845
- ['removeGradient'](f) {
3846
- const Vd = h;
3847
- return this['datasets'] && this[Vd(0x20d)][f] && (this['datasets'][f][Vd(0x336)] = '#36A2EB', this['datasets'][f]['backgroundColor'] = 'rgba(54,\x20162,\x20235,\x200.2)'), this;
3848
- }
3849
- [D(0x331)]() {
3850
- return this['datasets'] && this['datasets']['forEach']((f, n) => {
3851
- this['removeGradient'](n);
3852
- }), this;
3853
- }
3854
- ['calculateGradientPositions'](f) {
3855
- const VO = h;
3856
- if (f === 0x1)
3857
- return [0x0];
3858
- if (f === 0x2)
3859
- return [
3860
- 0x0,
3861
- 0x1
3862
- ];
3863
- const n = [];
3864
- for (let V = 0x0; V < f; V++) {
3865
- n[VO(0x35c)](V / (f - 0x1));
3866
- }
3867
- return n;
3868
- }
3869
- [D(0x3b2)]() {
3870
- const f = this['options'] = StzUtils['coalesce'](this['options'], {}), n = StzUtils['merge'](f, sparkLineOptions);
3871
- return this['options'] = n, this;
3872
- }
3873
- }
3874
- class BubbleChart extends CartesianChart {
3875
- constructor(f, n, V, R, N) {
3876
- const t = {
3877
- ...defaultBubbleScales,
3878
- ...R?.['scales'] ?? {}
3879
- }, p = createDefaultBubbleOptions(R, t);
3880
- super(f, n, V, p, N);
3881
- }
3882
- ['requireLabels']() {
3883
- return ![];
3884
- }
3885
- ['makeConfig'](f) {
3886
- const VT = h;
3887
- return super[VT(0x29f)](f);
3888
- }
3889
- ['setBubbleRadius'](f, n) {
3890
- const Vw = h;
3891
- return this['datasets'] && this['datasets'][f] && (this[Vw(0x20d)][f]['radius'] = n), this;
3892
- }
3893
- [D(0x375)](f) {
3894
- const VW = h;
3895
- return this[VW(0x20d)] && this['datasets']['forEach']((n, V) => {
3896
- const VC = h;
3897
- this[VC(0x214)](V, f);
3898
- }), this;
3899
- }
3900
- [D(0x2bb)](f, n, V) {
3901
- const Ve = h;
3902
- if (this[Ve(0x20d)] && this[Ve(0x20d)][f]) {
3903
- const R = this[Ve(0x20d)][f];
3904
- if (R[Ve(0x232)] && R['data'][n]) {
3905
- const N = R['data'][n];
3906
- StzUtils['isObject'](N) && 'r' in N && (N['r'] = V);
3907
- }
3908
- }
3909
- return this;
3910
- }
3911
- ['setAllBubbleDataRadius'](f, n) {
3912
- const VQ = h;
3913
- if (this[VQ(0x20d)] && this['datasets'][f]) {
3914
- const V = this['datasets'][f];
3915
- V[VQ(0x232)] && V['data']['forEach'](R => {
3916
- const VE = h;
3917
- StzUtils[VE(0x1f8)](R) && 'r' in R && (R['r'] = n);
3918
- });
3919
- }
3920
- return this;
3921
- }
3922
- [D(0x2b0)](f, n, V) {
3923
- const VP = h;
3924
- if (this['datasets'] && this[VP(0x20d)][f]) {
3925
- const R = this[VP(0x20d)][f];
3926
- R['data'] && R['data']['forEach'](N => {
3927
- StzUtils['isObject'](N) && N['name'] === n && 'r' in N && (N['r'] = V);
3928
- });
3929
- }
3930
- return this;
3931
- }
3932
- ['updateBubbleDataRadius'](f, n) {
3933
- const VJ = h;
3934
- if (this['datasets'] && this['datasets'][f]) {
3935
- const V = this['datasets'][f];
3936
- V[VJ(0x232)] && V[VJ(0x232)][VJ(0x330)]((R, N) => {
3937
- const Vu = h;
3938
- StzUtils[Vu(0x1f8)](R) && 'r' in R && (R['r'] = n(R, N));
3939
- });
3940
- }
3941
- return this;
3942
- }
3943
- ['setBubbleDataRadiusWhere'](f, n, V) {
3944
- const Vc = h;
3945
- if (this['datasets'] && this['datasets'][f]) {
3946
- const R = this[Vc(0x20d)][f];
3947
- R[Vc(0x232)] && R[Vc(0x232)]['forEach'](N => {
3948
- const VD = h;
3949
- StzUtils[VD(0x1f8)](N) && 'r' in N && n(N) && (N['r'] = V);
3950
- });
3951
- }
3952
- return this;
3953
- }
3954
- [D(0x227)](f, n) {
3955
- const Vl = h;
3956
- if (this[Vl(0x20d)] && this['datasets'][f])
3957
- this['datasets'][f]['hoverRadius'] = n;
3958
- else
3959
- throw new CustomError(ErrorCode['DATASET_REQUIRED']);
3960
- return this;
3961
- }
3962
- ['setAllHoverRadius'](f) {
3963
- return this['datasets'] && this['datasets']['forEach']((n, V) => {
3964
- const Vy = h;
3965
- this[Vy(0x227)](V, f);
3966
- }), this;
3967
- }
3968
- ['setBorderWidth'](f, n) {
3969
- const VZ = h;
3970
- return this['datasets'] && this['datasets'][f] && (this[VZ(0x20d)][f]['borderWidth'] = n), this;
3971
- }
3972
- ['setAllBorderWidth'](f) {
3973
- return this['datasets'] && this['datasets']['forEach'](n => {
3974
- n['borderWidth'] = f;
3975
- }), this;
3976
- }
3977
- ['sparkBubbleChart']() {
3978
- const f = this['options'] = StzUtils['coalesce'](this['options'], {}), n = StzUtils['merge'](f, sparkBubbleOptions);
3979
- return this['options'] = n, this;
3980
- }
3981
- ['setRotation'](f, n) {
3982
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f]['rotation'] = n), this;
3983
- }
3984
- ['setAllRotation'](f) {
3985
- return this['datasets'] && this['datasets']['forEach']((n, V) => {
3986
- const Vo = h;
3987
- this[Vo(0x391)](V, f);
3988
- }), this;
3989
- }
3990
- }
3991
- class ArcChart extends Chart {
3992
- ['type'];
3993
- [D(0x2d5)];
3994
- constructor(f, n, V, R, N) {
3995
- super(f, n, V, R, N), this['type'] = f;
3996
- }
3997
- get ['chartId']() {
3998
- const Vi = h;
3999
- return !this[Vi(0x2d5)] && (this['_chartId'] = this['type'] + '_' + Math['random']()), this['_chartId'];
4000
- }
4001
- set [D(0x2d2)](f) {
4002
- const Vv = h;
4003
- this['_chartId'] = f;
4004
- const n = this[Vv(0x2d6)] = StzUtils[Vv(0x2d3)](this['options'], {});
4005
- n['_chartId'] = f;
4006
- }
4007
- ['requireLabels']() {
4008
- return !![];
4009
- }
4010
- [D(0x30e)](f, n) {
4011
- const VM = h, V = CHART_COLOR;
4012
- !f['backgroundColor'] && (StzUtils['isArray'](f['data']) ? f['backgroundColor'] = f[VM(0x232)]['map']((R, N) => V[(n + N) % V['length']]) : f['backgroundColor'] = V[n % V['length']]), !f[VM(0x336)] && (f['borderColor'] = '#fff'), f['borderWidth'] ??= 0x2, f[VM(0x2b3)] = this[VM(0x2d2)] + VM(0x1e1) + n;
4013
- }
4014
- ['mustHavePlugins']() {
4015
- return [chartMountPlugin];
4016
- }
4017
- ['resolveMustHavePlugins'](f) {
4018
- const Vq = h, n = f || this['options'], V = getChartConfig(), R = n?.['_loading'] ?? V['loading'] ?? ![], N = [...this[Vq(0x368)]()];
4019
- return R && N['push'](loadingPlugin), StzUtils[Vq(0x374)](n?.['_noDataText']) && N['push'](noDataPlugin), N;
4020
- }
4021
- ['normalize']() {
4022
- const Vz = h;
4023
- if (this[Vz(0x261)]() && (!this['labels'] || this['labels']['length'] === 0x0))
4024
- throw new CustomError(ErrorCode['LABELS_REQUIRED']);
4025
- }
4026
- ['configAop'](f) {
4027
- const n = {
4028
- 'get': (V, R, N) => {
4029
- const Va = h;
4030
- if (R === Va(0x232)) {
4031
- const t = V[Va(0x232)];
4032
- if (this['requireLabels']() && (!t?.['labels'] || t['labels'][Va(0x201)] === 0x0))
4033
- throw new CustomError(ErrorCode[Va(0x311)]);
4034
- t && StzUtils['isArray'](t[Va(0x20d)]) && t['datasets'][Va(0x201)] > 0x0 && (t['datasets'] = t['datasets'][Va(0x2a1)]((p, F) => {
4035
- if (!StzUtils['isObject'](p))
4036
- return p;
4037
- return this['decorateDataset'](p, F), p;
4038
- }));
4039
- }
4040
- if (R === Va(0x37c)) {
4041
- const p = this[Va(0x270)](V['options']);
4042
- V[Va(0x37c)] = this['mergePlugins'](StzUtils[Va(0x319)](V[Va(0x37c)]) ? V['plugins'] : undefined, p);
4043
- }
4044
- return Reflect[Va(0x220)](V, R, N);
4045
- }
4046
- };
4047
- return new Proxy(f, n);
4048
- }
4049
- ['build'](f) {
4050
- const Vb = h;
4051
- this['normalize']();
4052
- const n = f || this[Vb(0x343)] + '_' + Math['random']();
4053
- this['_chartId'] = n;
4054
- const V = {
4055
- ...this['cloneValue'](this[Vb(0x2d6)]),
4056
- '_chartId': n
4057
- }, R = {
4058
- '_chartId': n,
4059
- 'type': this['type'],
4060
- 'data': {
4061
- 'labels': this['cloneValue'](this['labels']),
4062
- 'datasets': this[Vb(0x2f0)](this['datasets'])
4063
- },
4064
- 'options': V,
4065
- 'plugins': this[Vb(0x2a9)](this['plugins'])
4066
- }, N = this[Vb(0x27f)](R);
4067
- return void N['data'], void N['plugins'], {
4068
- '_chartId': N['_chartId'],
4069
- 'type': N[Vb(0x343)],
4070
- 'datasetIdKey': Vb(0x2b3),
4071
- 'data': N[Vb(0x232)],
4072
- 'options': N['options'],
4073
- 'plugins': N['plugins']
4074
- };
4075
- }
4076
- ['setRotation'](f) {
4077
- const VA = h, n = this[VA(0x2d6)] = StzUtils[VA(0x2d3)](this[VA(0x2d6)], {});
4078
- return n['rotation'] = f, this;
4079
- }
4080
- ['setCircumference'](f) {
4081
- const Vj = h, n = this[Vj(0x2d6)] = StzUtils['coalesce'](this['options'], {});
4082
- return n['circumference'] = f, this;
4083
- }
4084
- ['setCutout'](f) {
4085
- const Vm = h, n = this['options'] = StzUtils[Vm(0x2d3)](this['options'], {});
4086
- return n['cutout'] = f, this;
4087
- }
4088
- ['setRadius'](f) {
4089
- const n = this['options'] = StzUtils['coalesce'](this['options'], {});
4090
- return n['radius'] = f, this;
4091
- }
4092
- ['setBorderWidth'](f, n) {
4093
- const VS = h;
4094
- return this['datasets'] && this[VS(0x20d)][f] && (this['datasets'][f]['borderWidth'] = n), this;
4095
- }
4096
- ['setAllBorderWidth'](f) {
4097
- const Vs = h;
4098
- return this[Vs(0x20d)] && this[Vs(0x20d)]['forEach'](n => {
4099
- n['borderWidth'] = f;
4100
- }), this;
4101
- }
4102
- ['setBorderColor'](f, n) {
4103
- return this['datasets'] && this['datasets'][f] && (this['datasets'][f]['borderColor'] = n), this;
4104
- }
4105
- [D(0x384)](f) {
4106
- const VU = h;
4107
- return this['datasets'] && this[VU(0x20d)]['forEach'](n => {
4108
- n['borderColor'] = f;
4109
- }), this;
4110
- }
4111
- ['setSegmentImages'](f, n) {
4112
- const Vr = h, V = {
4113
- 'images': f,
4114
- 'width': n?.['width'] ?? 0x1e,
4115
- 'height': n?.['height'] ?? 0x1e,
4116
- 'backgroundColor': n?.['backgroundColor'] ?? 'white',
4117
- 'borderRadius': n?.[Vr(0x2e6)]
4118
- };
4119
- return !V['borderRadius'] && (V['borderRadius'] = V['width'] / 0x2), this['setPlugin'](segmentImagePlugin(V), !![]), this;
4120
- }
4121
- }
4122
- class DoughnutChart extends ArcChart {
4123
- constructor(f, n, V, R, N) {
4124
- const t = createDefaultDoughnutOptions(R);
4125
- super(f, n, V, t, N);
4126
- }
4127
- ['requireLabels']() {
4128
- return !![];
4129
- }
4130
- [D(0x29f)](f) {
4131
- return super['build'](f);
4132
- }
4133
- [D(0x284)](f) {
4134
- return super['setCutout'](f);
4135
- }
4136
- ['convertToPie']() {
4137
- return this['setCutout'](0x0);
4138
- }
4139
- ['setSegmentColors'](f) {
4140
- const VK = h;
4141
- return this[VK(0x20d)] && this['datasets'][0x0] && (this['datasets'][0x0]['backgroundColor'] = f), this;
4142
- }
4143
- [D(0x31c)](f, n) {
4144
- const VB = h;
4145
- return this['datasets'] && this['datasets'][0x0] && (!StzUtils['isArray'](this['datasets'][0x0][VB(0x23e)]) && (this['datasets'][0x0]['offset'] = new Array(this[VB(0x20d)][0x0]['data']?.['length'] || 0x0)['fill'](0x0)), this[VB(0x20d)][0x0][VB(0x23e)][f] = n), this;
4146
- }
4147
- ['setRotation'](f) {
4148
- const Vx = h;
4149
- return super[Vx(0x391)](f);
4150
- }
4151
- [D(0x253)](f) {
4152
- const VL = h;
4153
- return super[VL(0x253)](f);
4154
- }
4155
- ['setRadius'](f) {
4156
- return super['setRadius'](f);
4157
- }
4158
- ['setAllBorderWidth'](f) {
4159
- return super['setAllBorderWidth'](f);
4160
- }
4161
- ['setAllBorderColor'](f) {
4162
- return super['setAllBorderColor'](f);
4163
- }
4164
- ['setCenterText'](f) {
4165
- return this['setPlugin'](doughnutCenterTextPlugin(f)), this;
4166
- }
4167
- }
4168
- class PieChart extends ArcChart {
4169
- constructor(f, n, V, R, N) {
4170
- const t = createDefaultPieOptions(R);
4171
- super(f, n, V, t, N);
4172
- }
4173
- ['requireLabels']() {
4174
- return !![];
4175
- }
4176
- ['makeConfig'](f) {
4177
- const VX = h;
4178
- return super[VX(0x2ed)](f);
4179
- }
4180
- [D(0x1c5)](f) {
4181
- const R0 = h;
4182
- return this[R0(0x20d)] && this['datasets'][0x0] && (this[R0(0x20d)][0x0]['backgroundColor'] = f), this;
4183
- }
4184
- ['setSegmentOffset'](f, n) {
4185
- const R1 = h;
4186
- return this['datasets'] && this['datasets'][0x0] && (!StzUtils['isArray'](this[R1(0x20d)][0x0][R1(0x23e)]) && (this['datasets'][0x0][R1(0x23e)] = new Array(this['datasets'][0x0]['data']?.['length'] || 0x0)['fill'](0x0)), this['datasets'][0x0]['offset'][f] = n), this;
4187
- }
4188
- [D(0x391)](f) {
4189
- return super['setRotation'](f);
4190
- }
4191
- ['setCircumference'](f) {
4192
- return super['setCircumference'](f);
4193
- }
4194
- ['setRadius'](f) {
4195
- return super['setRadius'](f);
4196
- }
4197
- ['setAllBorderWidth'](f) {
4198
- const R2 = h;
4199
- return super[R2(0x3ab)](f);
4200
- }
4201
- ['setAllBorderColor'](f) {
4202
- return super['setAllBorderColor'](f);
4203
- }
4204
- ['setHalfPieTop']() {
4205
- const R3 = h;
4206
- return this[R3(0x391)](-0x5a), this['setCircumference'](0xb4), this;
4207
- }
4208
- ['setHalfPieBottom']() {
4209
- const R4 = h;
4210
- return this[R4(0x391)](0x5a), this['setCircumference'](0xb4), this;
4211
- }
4212
- ['setHalfPieLeft']() {
4213
- return this['setRotation'](0xb4), this['setCircumference'](0xb4), this;
4214
- }
4215
- [D(0x323)]() {
4216
- const R5 = h;
4217
- return this['setRotation'](0x0), this[R5(0x253)](0xb4), this;
4218
- }
4219
- ['highlightMaxSegment'](f = 0xa) {
4220
- const R6 = h;
4221
- if (this['datasets'] && this['datasets'][0x0] && this['datasets'][0x0]['data']) {
4222
- const n = this['datasets'][0x0]['data'], V = n[R6(0x308)](Math['max'](...n));
4223
- this['setSegmentOffset'](V, f);
4224
- }
4225
- return this;
4226
- }
4227
- ['highlightMinSegment'](f = 0xa) {
4228
- const R7 = h;
4229
- if (this['datasets'] && this['datasets'][0x0] && this['datasets'][0x0]['data']) {
4230
- const n = this['datasets'][0x0]['data'], V = n[R7(0x308)](Math['min'](...n));
4231
- this[R7(0x31c)](V, f);
4232
- }
4233
- return this;
4234
- }
4235
- ['setAllSegmentOffsets'](f) {
4236
- const R8 = h;
4237
- if (this[R8(0x20d)] && this['datasets'][0x0] && this['datasets'][0x0]['data']) {
4238
- const n = this['datasets'][0x0]['data']['length'];
4239
- if (StzUtils['isNumber'](f))
4240
- this['datasets'][0x0]['offset'] = new Array(n)['fill'](f);
4241
- else
4242
- StzUtils[R8(0x319)](f) && (this[R8(0x20d)][0x0]['offset'] = f[R8(0x1d5)](0x0, n));
4243
- }
4244
- return this;
4245
- }
4246
- ['setGradientColors'](f, n) {
4247
- const R9 = h;
4248
- if (this['datasets'] && this[R9(0x20d)][0x0] && this['datasets'][0x0][R9(0x232)]) {
4249
- const V = this[R9(0x20d)][0x0]['data']['length'], R = this['generateGradientColors'](f, n, V);
4250
- this['setSegmentColors'](R);
4251
- }
4252
- return this;
4253
- }
4254
- ['setSegmentColorWhere'](f, n) {
4255
- const Rk = h;
4256
- if (this[Rk(0x20d)] && this['datasets'][0x0] && this[Rk(0x20d)][0x0]['data']) {
4257
- const V = this['datasets'][0x0][Rk(0x232)], R = this['datasets'][0x0][Rk(0x29e)] || [];
4258
- V['forEach']((N, t) => {
4259
- f(N, t) && (R[t] = n);
4260
- }), this['datasets'][0x0]['backgroundColor'] = R;
4261
- }
4262
- return this;
4263
- }
4264
- [D(0x29a)](f) {
4265
- const n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i['exec'](f);
4266
- return n ? {
4267
- 'r': parseInt(n[0x1], 0x10),
4268
- 'g': parseInt(n[0x2], 0x10),
4269
- 'b': parseInt(n[0x3], 0x10)
4270
- } : null;
4271
- }
4272
- ['rgbToHex'](f, n, V) {
4273
- const Rh = h;
4274
- return '#' + [
4275
- f,
4276
- n,
4277
- V
4278
- ]['map'](R => Math['round'](R)['toString'](0x10)['padStart'](0x2, '0'))[Rh(0x211)]('');
4279
- }
4280
- ['generateGradientColors'](f, n, V) {
4281
- const Rf = h, R = this[Rf(0x29a)](f), N = this[Rf(0x29a)](n);
4282
- if (!R || !N)
4283
- return [];
4284
- const t = [];
4285
- for (let p = 0x0; p < V; p++) {
4286
- const F = p / (V - 0x1), G = R['r'] + (N['r'] - R['r']) * F, I = R['g'] + (N['g'] - R['g']) * F, Y = R['b'] + (N['b'] - R['b']) * F;
4287
- t['push'](this['rgbToHex'](G, I, Y));
4288
- }
4289
- return t;
4290
- }
4291
- }
4292
- class TreemapChart extends Chart {
4293
- ['_chartId'];
4294
- constructor(f, n, V, R, N) {
4295
- const t = createDefaultTreemapOptions(R);
4296
- super(f, undefined, V, t, N);
4297
- }
4298
- get ['chartId']() {
4299
- return !this['_chartId'] && (this['_chartId'] = 'treemap_' + Math['random']()), this['_chartId'];
4300
- }
4301
- set ['chartId'](f) {
4302
- this['_chartId'] = f, this['options'] && (this['options']['_chartId'] = f);
4303
- }
4304
- ['normalize']() {
4305
- }
4306
- ['mustHavePlugins']() {
4307
- return [chartMountPlugin];
4308
- }
4309
- [D(0x270)](f) {
4310
- const n = [...this['mustHavePlugins']()];
4311
- return StzUtils['isString'](f?.['_noDataText']) && n['push'](noDataPlugin), n;
4312
- }
4313
- [D(0x27f)](f) {
4314
- const n = {
4315
- 'get': (V, R, N) => {
4316
- const Rn = h;
4317
- if (R === 'data') {
4318
- const t = V['data'];
4319
- t?.['labels'] && StzUtils[Rn(0x319)](t['labels']) && t[Rn(0x1f7)][Rn(0x201)] > 0x0 && CustomError['shield'](ErrorCode['LABELS_NOT_SUPPORTED']);
4320
- }
4321
- return Reflect['get'](V, R, N);
4322
- }
4323
- };
4324
- return new Proxy(f, n);
4325
- }
4326
- [D(0x2ed)](f) {
4327
- const RV = h;
4328
- this['normalize']();
4329
- const n = f || 'treemap_' + Math['random']();
4330
- this[RV(0x2d5)] = n;
4331
- const V = this['cloneValue'](this[RV(0x2d6)]), R = {
4332
- '_chartId': n,
4333
- 'type': this[RV(0x343)],
4334
- 'data': { 'datasets': this['cloneValue'](this['datasets']) },
4335
- 'options': {
4336
- ...V,
4337
- '_chartId': n,
4338
- 'plugins': {
4339
- ...V?.['plugins'],
4340
- 'legend': {
4341
- ...V?.['plugins']?.[RV(0x388)] ?? {},
4342
- 'display': ![]
4343
- }
4344
- }
4345
- },
4346
- 'plugins': this[RV(0x326)](this[RV(0x2a9)](this['plugins']), this['resolveMustHavePlugins'](V))
4347
- };
4348
- return {
4349
- '_chartId': R[RV(0x2d5)],
4350
- 'type': R[RV(0x343)],
4351
- 'datasetIdKey': '_uid',
4352
- 'data': R['data'],
4353
- 'options': R[RV(0x2d6)],
4354
- 'plugins': R['plugins']
4355
- };
4356
- }
4357
- ['setTreeData'](f) {
4358
- const RR = h;
4359
- if (this['datasets'] && this[RR(0x20d)][0x0]) {
4360
- const n = this[RR(0x20d)][0x0];
4361
- n['tree'] = f;
4362
- }
4363
- return this;
4364
- }
4365
- ['setColorKey'](f) {
4366
- const RN = h;
4367
- if (this[RN(0x20d)] && this['datasets'][0x0]) {
4368
- const n = this[RN(0x20d)][0x0];
4369
- n['key'] = f;
4370
- }
4371
- return this;
4372
- }
4373
- ['setLabelKey'](f) {
4374
- const Rt = h;
4375
- if (this['datasets'] && this[Rt(0x20d)][0x0]) {
4376
- const n = this[Rt(0x20d)][0x0];
4377
- n[Rt(0x1f7)] = {
4378
- 'display': !![],
4379
- 'formatter': V => V[Rt(0x2e9)]['_data'][f]
4380
- };
4381
- }
4382
- return this;
4383
- }
4384
- ['setValueKey'](f) {
4385
- const Rp = h;
4386
- if (this['datasets'] && this['datasets'][0x0]) {
4387
- const n = this[Rp(0x20d)][0x0];
4388
- n['key'] = f;
4389
- }
4390
- return this;
4391
- }
4392
- [D(0x1a4)](f) {
4393
- const RF = h;
4394
- if (this['datasets'] && this[RF(0x20d)][0x0]) {
4395
- const n = this['datasets'][0x0];
4396
- n[RF(0x1a7)] = f;
4397
- }
4398
- return this;
4399
- }
4400
- ['setBorderWidth'](f) {
4401
- const RG = h;
4402
- if (this[RG(0x20d)] && this['datasets'][0x0]) {
4403
- const n = this['datasets'][0x0];
4404
- n[RG(0x34f)] = f;
4405
- }
4406
- return this;
4407
- }
4408
- [D(0x2e1)](f) {
4409
- const RI = h;
4410
- if (this[RI(0x20d)] && this['datasets'][0x0]) {
4411
- const n = this[RI(0x20d)][0x0];
4412
- n[RI(0x336)] = f;
4413
- }
4414
- return this;
4415
- }
4416
- }
4417
- exports[D(0x26e)] = void 0x0, function (ChartTypes) {
4418
- const RY = h;
4419
- ChartTypes['BAR'] = 'bar', ChartTypes['LINE'] = 'line', ChartTypes[RY(0x1cd)] = 'doughnut', ChartTypes['PIE'] = RY(0x2ff), ChartTypes['RADAR'] = 'radar', ChartTypes['BUBBLE'] = 'bubble', ChartTypes['SCATTER'] = 'scatter', ChartTypes['TREEMAP'] = RY(0x318);
4420
- }(exports['ChartTypes'] || (exports['ChartTypes'] = {}));
4421
- var Types = Object[D(0x217)]({ '__proto__': null });
4422
- const OVERLAY_ATTRIBUTE = 'data-stz-spinner-overlay-for';
4423
- function toSpinnerOverlayConfig(f) {
4424
- const RH = h;
4425
- if (f === ![] || f == null)
4426
- return undefined;
4427
- if (f === !![])
4428
- return { 'enabled': !![] };
4429
- if (f[RH(0x314)] === ![])
4430
- return undefined;
4431
- return {
4432
- 'enabled': !![],
4433
- ...f
4434
- };
4435
- }
4436
- function resolveSpinnerOverlay(f, n) {
4437
- const V = typeof f !== 'undefined';
4438
- return toSpinnerOverlayConfig(V ? f : n);
4439
- }
4440
- function wait(f) {
4441
- return new Promise(n => globalThis['setTimeout'](n, f));
4442
- }
4443
- function waitForNextPaint() {
4444
- return new Promise(f => {
4445
- const Rg = h, n = globalThis[Rg(0x237)] || (V => globalThis['setTimeout'](() => V(Date['now']()), 0x10));
4446
- n(() => n(() => f()));
4447
- });
4448
- }
4449
- function resolveChartId(f) {
4450
- const Rd = h, n = f['_chartId'] || f['options']?.['_chartId'];
4451
- if (!n)
4452
- throw new Error(Rd(0x2bd));
4453
- return n;
4454
- }
4455
- function resolveCanvas(f) {
4456
- const RO = h, n = document[RO(0x1c1)](f);
4457
- if (!(n instanceof HTMLCanvasElement))
4458
- throw new Error('mountChart\x20could\x20not\x20find\x20a\x20canvas\x20element\x20with\x20id\x20\x22' + f + '\x22.');
4459
- return n;
4460
- }
4461
- function applyStyle(f, n) {
4462
- const RT = h;
4463
- if (!n)
4464
- return;
4465
- Object['entries'](n)[RT(0x330)](([V, R]) => {
4466
- f['style']['setProperty'](V, String(R));
4467
- });
4468
- }
4469
- function createDefaultSpinner(f) {
4470
- const Rw = h, n = document['createElement']('div');
4471
- return f['spinnerClassName'] && (n['className'] = f['spinnerClassName']), Object['assign'](n['style'], {
4472
- 'width': '42px',
4473
- 'height': '42px',
4474
- 'borderRadius': '999px',
4475
- 'border': '4px\x20solid\x20' + (f[Rw(0x1c4)] || Rw(0x33f)),
4476
- 'borderTopColor': f[Rw(0x35f)] || '#2563eb',
4477
- 'animation': 'stz-spinner-overlay-spin\x200.8s\x20linear\x20infinite'
4478
- }), applyStyle(n, f['spinnerStyle']), n;
4479
- }
4480
- function createSpinnerElement(f, n, V) {
4481
- const RW = h;
4482
- if (!f)
4483
- return createDefaultSpinner(V);
4484
- const R = typeof f === 'function' ? f({ 'chartId': n }) : f;
4485
- if (typeof R === 'string') {
4486
- const t = document['createElement']('div');
4487
- return V['spinnerClassName'] && (t['className'] = V['spinnerClassName']), t['innerHTML'] = R, applyStyle(t, V['spinnerStyle']), t;
4488
- }
4489
- const N = R[RW(0x29c)](!![]);
4490
- return V[RW(0x379)] && N[RW(0x1a3)]['add'](...V['spinnerClassName']['split']('\x20')['filter'](Boolean)), applyStyle(N, V['spinnerStyle']), N;
4491
- }
4492
- function createSpinnerOverlay(f, n, V) {
4493
- const RC = h, R = f['querySelector']('[' + OVERLAY_ATTRIBUTE + '=\x22' + n + '\x22]');
4494
- R && R['remove']();
4495
- getComputedStyle(f)['position'] === 'static' && (f[RC(0x387)]['position'] = 'relative');
4496
- const N = document[RC(0x329)]('div');
4497
- N['setAttribute'](OVERLAY_ATTRIBUTE, n), N['className'] = V['className'] || '', Object['assign'](N['style'], {
4498
- 'position': 'absolute',
4499
- 'inset': '0',
4500
- 'display': 'flex',
4501
- 'alignItems': RC(0x32d),
4502
- 'justifyContent': 'center',
4503
- 'flexDirection': RC(0x348),
4504
- 'gap': '12px',
4505
- 'background': V['backgroundColor'] || RC(0x2cf),
4506
- 'color': V['textColor'] || '#1d4ed8',
4507
- 'zIndex': String(V['zIndex'] ?? 0xa),
4508
- 'pointerEvents': 'none'
4509
- }), applyStyle(N, V['overlayStyle']);
4510
- if (!document[RC(0x1c1)]('stz-spinner-overlay-style')) {
4511
- const p = document['createElement']('style');
4512
- p['id'] = 'stz-spinner-overlay-style', p[RC(0x378)] = '\x0a\x09\x09\x09@keyframes\x20stz-spinner-overlay-spin\x20{\x0a\x09\x09\x09\x09from\x20{\x20transform:\x20rotate(0deg);\x20}\x0a\x09\x09\x09\x09to\x20{\x20transform:\x20rotate(360deg);\x20}\x0a\x09\x09\x09}\x0a\x09\x09', document['head'][RC(0x25a)](p);
4513
- }
4514
- const t = createSpinnerElement(V[RC(0x1e7)], n, V);
4515
- N['appendChild'](t);
4516
- if (V['text'] !== ![]) {
4517
- const F = document[RC(0x329)](RC(0x325));
4518
- V['textClassName'] && (F['className'] = V[RC(0x2c6)]), F['textContent'] = V[RC(0x1d6)] || 'Loading...', Object[RC(0x198)](F['style'], {
4519
- 'fontSize': '14px',
4520
- 'fontWeight': RC(0x249),
4521
- 'letterSpacing': '0.01em'
4522
- }), applyStyle(F, V['textStyle']), N['appendChild'](F);
4523
- }
4524
- return f['appendChild'](N), N;
4525
- }
4526
- function removeSpinnerOverlay(f) {
4527
- document['querySelectorAll']('[' + OVERLAY_ATTRIBUTE + '=\x22' + f + '\x22]')['forEach'](n => n['remove']());
4528
- }
4529
- function mountChart(f) {
4530
- const Re = h, n = resolveChartId(f), V = resolveCanvas(n);
4531
- V['id'] = n;
4532
- const R = getChartConfig(), N = resolveSpinnerOverlay(f['options']?.[Re(0x23c)], R[Re(0x23c)]), t = Boolean(N?.['enabled']), p = V['parentElement'] || V, F = {
4533
- ...f,
4534
- 'options': {
4535
- ...f[Re(0x2d6)] || {},
4536
- '_chartId': n,
4537
- '_loading': t ? ![] : f['options']?.['_loading']
4538
- }
4539
- };
4540
- let G = ![], I, Y = 0x0;
4541
- const H = (async () => {
4542
- const RQ = h, existingChart = chart_js['Chart'][RQ(0x3a7)](V);
4543
- existingChart && existingChart['destroy']();
4544
- t && (createSpinnerOverlay(p, n, N), Y = performance['now'](), await waitForNextPaint(), N?.['delayMs'] && await wait(N['delayMs']));
4545
- if (G) {
4546
- removeSpinnerOverlay(n);
4547
- throw new Error('mountChart\x20for\x20\x22' + n + '\x22\x20was\x20cancelled\x20before\x20chart\x20creation.');
4548
- }
4549
- I = new chart_js['Chart'](V, F);
4550
- if (!t)
4551
- return I;
4552
- await waitForNextPaint();
4553
- const g = performance['now']() - Y, d = Math['max'](0x0, (N?.['minVisibleMs'] ?? 0x0) - g);
4554
- return d > 0x0 && await wait(d), removeSpinnerOverlay(n), I;
4555
- })()['catch'](g => {
4556
- removeSpinnerOverlay(n);
4557
- throw g;
4558
- });
4559
- return {
4560
- 'chartId': n,
4561
- 'destroy': () => {
4562
- G = !![], removeSpinnerOverlay(n);
4563
- const currentChart = I || chart_js['Chart']['getChart'](V);
4564
- currentChart?.['destroy']();
4565
- },
4566
- 'ready': H
4567
- };
4568
- }
4569
- function bootstrapBuiltInChartTypes() {
4570
- const RE = h;
4571
- ChartFactory['register'](RE(0x1a9), BarChart), ChartFactory['register']('line', LineChart), ChartFactory['register']('bubble', BubbleChart), ChartFactory['register'](RE(0x24f), DoughnutChart), ChartFactory['register']('pie', PieChart), ChartFactory[RE(0x2cd)]('treemap', TreemapChart);
4572
- }
4573
- bootstrapBuiltInChartTypes();
4574
- const ChartToolBox = {
4575
- 'setErrorLog'(f = !![]) {
4576
- LoggerConfig['errorLogging'] = f;
4577
- },
4578
- 'setErrorShield'(f = !![]) {
4579
- LoggerConfig['silentMode'] = f;
4580
- }
4581
- }, T$ = {
4582
- 'create': Chart['create']['bind'](Chart),
4583
- 'register': Chart['register']['bind'](Chart),
4584
- 'Chart': Chart,
4585
- 'CartesianChart': CartesianChart,
4586
- 'BarChart': BarChart,
4587
- 'LineChart': LineChart,
4588
- 'BubbleChart': BubbleChart,
4589
- 'ArcChart': ArcChart,
4590
- 'DoughnutChart': DoughnutChart,
4591
- 'PieChart': PieChart,
4592
- 'TreemapChart': TreemapChart,
4593
- 'ChartWrapper': Chart,
4594
- 'CartesianChartWrapper': CartesianChart,
4595
- 'BarChartWrapper': BarChart,
4596
- 'LineChartWrapper': LineChart,
4597
- 'BubbleChartWrapper': BubbleChart,
4598
- 'ArcChartWrapper': ArcChart,
4599
- 'DoughnutChartWrapper': DoughnutChart,
4600
- 'PieChartWrapper': PieChart,
4601
- 'TreemapChartWrapper': TreemapChart,
4602
- 'defaultTypes': Types,
4603
- 'defaultsOptions': LocalDefaults,
4604
- 'toolBox': ChartToolBox
4605
- };
4606
- exports['ArcChart'] = ArcChart, exports['ArcChartWrapper'] = ArcChart, exports['BarChart'] = BarChart, exports['BarChartWrapper'] = BarChart, exports['BubbleChart'] = BubbleChart, exports[D(0x34d)] = BubbleChart, exports['CartesianChart'] = CartesianChart, exports[D(0x28a)] = CartesianChart, exports['Chart'] = Chart, exports[D(0x274)] = ChartFactory, exports['ChartInstance'] = ChartInstance, exports['ChartToolBox'] = ChartToolBox, exports['ChartWrapper'] = Chart, exports['CreateZoomRangeSlider'] = CreateZoomRangeSlider, exports['DefaultArcRadius'] = DefaultArcRadius, exports[D(0x293)] = DefaultDataLabelsOptions, exports['DefaultHiddenLegendTopOptions'] = DefaultHiddenLegendTopOptions, exports['DefaultHiddenSparkScales'] = DefaultHiddenSparkScales, exports['DefaultResponsiveChartOptions'] = DefaultResponsiveChartOptions, exports['DefaultSparkPluginOptions'] = DefaultSparkPluginOptions, exports['DefaultTimeScaleOptions'] = DefaultTimeScaleOptions, exports['DefaultTopLegendOptions'] = DefaultTopLegendOptions, exports['DefaultZoomOptions'] = DefaultZoomOptions, exports['DoughnutChart'] = DoughnutChart, exports['DoughnutChartWrapper'] = DoughnutChart, exports[D(0x2c2)] = LineChart, exports['LineChartWrapper'] = LineChart, exports[D(0x2f2)] = PieChart, exports['PieChartWrapper'] = PieChart, exports['T$'] = T$, exports['TreemapChart'] = TreemapChart, exports[D(0x31f)] = TreemapChart, exports[D(0x273)] = barScaleImgPlugin, exports['blinkPlugin'] = blinkPlugin, exports[D(0x385)] = changeSetting, exports['chartMountPlugin'] = chartMountPlugin, exports[D(0x35a)] = clearChartActiveElements, exports[D(0x3a1)] = createAssignedTasksPlugin, exports['createDefaultBarOptions'] = createDefaultBarOptions, exports[D(0x1c8)] = createDefaultBubbleOptions, exports['createDefaultCartesianScales'] = createDefaultCartesianScales, exports['createDefaultDoughnutOptions'] = createDefaultDoughnutOptions, exports['createDefaultLineOptions'] = createDefaultLineOptions, exports['createDefaultPieOptions'] = createDefaultPieOptions, exports[D(0x38c)] = createDefaultTreemapOptions, exports['createStatusPlugin'] = createStatusPlugin, exports['createTodayLinePlugin'] = createTodayLinePlugin, exports['createWeekendPlugin'] = createWeekendPlugin, exports['customDatasetPlugins'] = customDatasetPlugins, exports['customLegend'] = customLegend, exports['default'] = T$, exports['defaultBarScales'] = defaultBarScales, exports['defaultBarTooltipCallback'] = defaultBarTooltipCallback, exports[D(0x1e4)] = defaultBubbleScales, exports['defaultBubbleTooltipCallback'] = defaultBubbleTooltipCallback, exports[D(0x3af)] = defaultDoughnutTooltipCallback, exports['defaultLineScales'] = defaultLineScales, exports['defaultLineTooltipCallback'] = defaultLineTooltipCallback, exports['defaultPieTooltipCallback'] = defaultPieTooltipCallback, exports['defaultTreemapTooltipCallback'] = defaultTreemapTooltipCallback, exports['doughnutCenterTextPlugin'] = doughnutCenterTextPlugin, exports['downloadChartAsImage'] = downloadChartAsImage, exports['downloadChartAsImageByInstance'] = downloadChartAsImageByInstance, exports[D(0x355)] = getChartAsBase64, exports['getChartAsBase64ByInstance'] = getChartAsBase64ByInstance, exports['getChartAsBlob'] = getChartAsBlob, exports[D(0x271)] = getChartAsBlobByInstance, exports['getChartDatasetMeta'] = getChartDatasetMeta, exports['getChartInstance'] = getChartInstance, exports['hideChartTooltip'] = hideChartTooltip, exports[D(0x281)] = isChartDatasetVisible, exports['loadingPlugin'] = loadingPlugin, exports[D(0x346)] = makeCenterHtml, exports[D(0x233)] = mountChart, exports['noDataPlugin'] = noDataPlugin, exports[D(0x1e0)] = resetChartZoom, exports['resizeChart'] = resizeChart, exports['segmentImagePlugin'] = segmentImagePlugin, exports['setChartActiveElements'] = setChartActiveElements, exports['setChartConfig'] = setChartConfig, exports[D(0x357)] = setChartDatasetVisibility, exports[D(0x1f0)] = showChartTooltip, exports[D(0x21d)] = sparkBarOptions, exports['sparkBubbleOptions'] = sparkBubbleOptions, exports['sparkLineOptions'] = sparkLineOptions, exports['toggleChartDatasetVisibility'] = toggleChartDatasetVisibility, exports['updateChart'] = updateChart, exports['zoomRangeSlider'] = zoomRangeSlider, exports['zoomResetPlugin'] = zoomResetPlugin;
4607
- //# sourceMappingURL=index.js.map