@univerjs/sheets-conditional-formatting 0.6.7 → 0.6.8

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.
Files changed (3) hide show
  1. package/lib/facade.js +1915 -0
  2. package/lib/index.js +1967 -0
  3. package/package.json +7 -7
package/lib/index.js ADDED
@@ -0,0 +1,1967 @@
1
+ var Z2 = Object.defineProperty;
2
+ var G2 = (s, r, t) => r in s ? Z2(s, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[r] = t;
3
+ var m = (s, r, t) => G2(s, typeof r != "symbol" ? r + "" : r, t);
4
+ import { Tools as $, CommandType as U, Inject as _, ICommandService as P, Disposable as _2, ObjectMatrix as O, RefAlias as H2, CellValueType as M, BooleanNumber as N2, LRUMap as U2, ColorKit as T2, dayjs as v, Range as N, Injector as M2, IUniverInstanceService as q, RTree as j2, IUndoRedoService as Q, sequenceExecute as V2, IResourceManagerService as X2, UniverInstanceType as m2, Rectangle as t2, Plugin as Y2, merge as K2, touchDependencies as J2, IConfigService as z2 } from "@univerjs/core";
5
+ import { isRangesEqual as W1 } from "@univerjs/core";
6
+ import { Subject as h2, BehaviorSubject as Q2 } from "rxjs";
7
+ import { distinctUntilChanged as e0, bufferTime as t0, filter as n0, map as r0 } from "rxjs/operators";
8
+ import { IActiveDirtyManagerService as s0, SetFormulaCalculationResultMutation as i0, SetOtherFormulaMutation as a0, RemoveOtherFormulaMutation as l0, BooleanValue as R2, ERROR_TYPE_SET as S2 } from "@univerjs/engine-formula";
9
+ import { isObject as o0, SpreadsheetExtensionRegistry as O2, SheetExtension as $2, FIX_ONE_PIXEL_BLUR_OFFSET as c0 } from "@univerjs/engine-render";
10
+ import { getSheetCommandTarget as e2, SheetsSelectionsService as u0, findAllRectangle as d0, createTopMatrixFromMatrix as h0, SheetInterceptorService as g0, RemoveSheetCommand as C0, ReorderRangeMutation as D0, MoveRangeMutation as f0, MoveColsMutation as m0, MoveRowsMutation as F0, InsertRowMutation as w0, RemoveRowMutation as v0, RemoveColMutation as E0, InsertColMutation as p0, SetRangeValuesMutation as A0 } from "@univerjs/sheets";
11
+ const P2 = "SHEET_CONDITIONAL_FORMATTING_PLUGIN";
12
+ var b = /* @__PURE__ */ ((s) => (s.beginsWith = "beginsWith", s.endsWith = "endsWith", s.containsText = "containsText", s.notContainsText = "notContainsText", s.equal = "equal", s.notEqual = "notEqual", s.containsBlanks = "containsBlanks", s.notContainsBlanks = "notContainsBlanks", s.containsErrors = "containsErrors", s.notContainsErrors = "notContainsErrors", s))(b || {}), L = /* @__PURE__ */ ((s) => (s.today = "today", s.yesterday = "yesterday", s.tomorrow = "tomorrow", s.last7Days = "last7Days", s.thisMonth = "thisMonth", s.lastMonth = "lastMonth", s.nextMonth = "nextMonth", s.thisWeek = "thisWeek", s.lastWeek = "lastWeek", s.nextWeek = "nextWeek", s))(L || {}), w = /* @__PURE__ */ ((s) => (s.greaterThan = "greaterThan", s.greaterThanOrEqual = "greaterThanOrEqual", s.lessThan = "lessThan", s.lessThanOrEqual = "lessThanOrEqual", s.notBetween = "notBetween", s.between = "between", s.equal = "equal", s.notEqual = "notEqual", s))(w || {}), S = /* @__PURE__ */ ((s) => (s.highlightCell = "highlightCell", s.dataBar = "dataBar", s.colorScale = "colorScale", s.iconSet = "iconSet", s))(S || {}), x = /* @__PURE__ */ ((s) => (s.uniqueValues = "uniqueValues", s.duplicateValues = "duplicateValues", s.rank = "rank", s.text = "text", s.timePeriod = "timePeriod", s.number = "number", s.average = "average", s.formula = "formula", s))(x || {}), R = /* @__PURE__ */ ((s) => (s.num = "num", s.min = "min", s.max = "max", s.percent = "percent", s.percentile = "percentile", s.formula = "formula", s))(R || {});
13
+ const L1 = "#fff", k1 = "#000000", B1 = () => ({
14
+ cfId: void 0,
15
+ ranges: [],
16
+ stopIfTrue: !1,
17
+ rule: {
18
+ type: "highlightCell",
19
+ subType: "text",
20
+ operator: "containsText"
21
+ /* containsText */
22
+ }
23
+ }), N1 = (s, r) => {
24
+ switch (s) {
25
+ case "text": {
26
+ if ([
27
+ "beginsWith",
28
+ "containsText",
29
+ "endsWith",
30
+ "equal",
31
+ "notContainsText",
32
+ "notEqual"
33
+ /* notEqual */
34
+ ].includes(r))
35
+ return "";
36
+ break;
37
+ }
38
+ case "number":
39
+ return [
40
+ "between",
41
+ "notBetween"
42
+ /* notBetween */
43
+ ].includes(r) ? [10, 100] : 10;
44
+ }
45
+ return "";
46
+ }, U1 = (s, r) => {
47
+ switch (s) {
48
+ case "formula":
49
+ return "=";
50
+ case "max":
51
+ case "min":
52
+ return "";
53
+ case "percent":
54
+ case "percentile":
55
+ case "num":
56
+ return r !== void 0 ? r : 10;
57
+ }
58
+ return "";
59
+ }, j = (s, r, t) => {
60
+ if (!r)
61
+ return null;
62
+ const e = r.findIndex((n) => t(n) === s.id);
63
+ if (e < 0)
64
+ return null;
65
+ switch (s.type) {
66
+ case "after":
67
+ return e + 1;
68
+ case "before":
69
+ return e - 1;
70
+ case "self":
71
+ return e;
72
+ }
73
+ }, x0 = (s, r, t, e) => {
74
+ if (!t)
75
+ return null;
76
+ const n = j(s, t, e);
77
+ let i = j(r, t, e);
78
+ if (n === null || i === null || n === i)
79
+ return;
80
+ const a = t.splice(n, 1)[0];
81
+ switch (n < i && (i = j(r, t, e)), r.type) {
82
+ case "before": {
83
+ t.splice(i + 1, 0, a);
84
+ break;
85
+ }
86
+ case "self":
87
+ case "after": {
88
+ t.splice(i, 0, a);
89
+ break;
90
+ }
91
+ }
92
+ }, W2 = (s, r, t, e) => {
93
+ if (s.type === "after" && ["after", "before"].includes(r.type))
94
+ return [s, r];
95
+ const n = { ...s }, i = { ...r };
96
+ if (n.type !== "after") {
97
+ const a = j(n, t, e);
98
+ if (a === null)
99
+ return null;
100
+ if (a - 1 < 0) {
101
+ const u = t[a + 1];
102
+ if (u)
103
+ n.id = e(u), n.type = "before";
104
+ else
105
+ return null;
106
+ } else {
107
+ const u = e(t[a - 1]);
108
+ n.id = u, n.type = "after";
109
+ }
110
+ }
111
+ if (!["after", "before"].includes(i.type)) {
112
+ const a = j(i, t, e);
113
+ if (a === null)
114
+ return null;
115
+ if (a === 0)
116
+ i.type = "before";
117
+ else if (a - 1 >= 0) {
118
+ const u = e(t[a - 1]);
119
+ i.id = u, i.type = "after";
120
+ } else if (a + 1 <= t.length - 1) {
121
+ const u = e(t[a + 1]);
122
+ i.id = u, i.type = "before";
123
+ } else
124
+ return null;
125
+ }
126
+ return n.id === i.id && n.type === i.type ? null : [n, i];
127
+ }, _0 = (s, r) => {
128
+ if (["after", "before"].includes(r.type)) {
129
+ if (s.type === "after")
130
+ return [r, s];
131
+ if (s.type === "before")
132
+ return [r, { ...s, type: "self" }];
133
+ }
134
+ return null;
135
+ }, T1 = (s, r) => s.id === r.id && s.type === r.type, M0 = () => `${$.generateRandomId(8)}`;
136
+ class y {
137
+ constructor() {
138
+ // Map<unitID ,<sheetId ,IConditionFormattingRule[]>>
139
+ m(this, "_model", /* @__PURE__ */ new Map());
140
+ m(this, "_ruleChange$", new h2());
141
+ m(this, "$ruleChange", this._ruleChange$.asObservable());
142
+ }
143
+ _ensureList(r, t) {
144
+ let e = this.getSubunitRules(r, t);
145
+ if (!e) {
146
+ e = [];
147
+ let n = this._model.get(r);
148
+ n || (n = /* @__PURE__ */ new Map(), this._model.set(r, n)), n.set(t, e);
149
+ }
150
+ return e;
151
+ }
152
+ getRule(r, t, e) {
153
+ const n = this.getSubunitRules(r, t);
154
+ return n ? n.find((i) => i.cfId === e) : null;
155
+ }
156
+ getUnitRules(r) {
157
+ return this._model.get(r) || null;
158
+ }
159
+ getSubunitRules(r, t) {
160
+ var n;
161
+ return ((n = this._model.get(r)) == null ? void 0 : n.get(t)) || null;
162
+ }
163
+ deleteRule(r, t, e) {
164
+ const n = this.getSubunitRules(r, t);
165
+ if (n) {
166
+ const i = n.findIndex((u) => u.cfId === e), a = n[i];
167
+ a && (n.splice(i, 1), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "delete" }));
168
+ }
169
+ }
170
+ setRule(r, t, e, n) {
171
+ const a = this._ensureList(r, t).find((u) => u.cfId === n);
172
+ if (a) {
173
+ const u = $.deepClone(a);
174
+ Object.assign(a, e), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "set", oldRule: u });
175
+ }
176
+ }
177
+ addRule(r, t, e) {
178
+ const n = this._ensureList(r, t);
179
+ n.find((a) => a.cfId === e.cfId) || n.unshift(e), this._ruleChange$.next({ rule: e, subUnitId: t, unitId: r, type: "add" });
180
+ }
181
+ /**
182
+ * example [1,2,3,4,5,6],if you move behind 5 to 2, then cfId=5,targetId=2.
183
+ * if targetId does not exist, it defaults to top
184
+ */
185
+ moveRulePriority(r, t, e, n) {
186
+ const i = this._ensureList(r, t), a = j(e, i, (o) => o.cfId), u = j(n, i, (o) => o.cfId);
187
+ if (u === null || a === null || u === a)
188
+ return;
189
+ const l = i[a];
190
+ l && (x0(e, n, i, (o) => o.cfId), this._ruleChange$.next({ rule: l, subUnitId: t, unitId: r, type: "sort" }));
191
+ }
192
+ createCfId(r, t) {
193
+ return M0();
194
+ }
195
+ deleteUnitId(r) {
196
+ this._model.delete(r);
197
+ }
198
+ }
199
+ const d2 = {
200
+ type: U.MUTATION,
201
+ id: "sheet.mutation.conditional-formatting-formula-mark-dirty",
202
+ handler() {
203
+ return !0;
204
+ }
205
+ };
206
+ var y0 = Object.getOwnPropertyDescriptor, I0 = (s, r, t, e) => {
207
+ for (var n = e > 1 ? void 0 : e ? y0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
208
+ (a = s[i]) && (n = a(n) || n);
209
+ return n;
210
+ }, E2 = (s, r) => (t, e) => r(t, e, s), B = /* @__PURE__ */ ((s) => (s[s.NOT_REGISTER = 1] = "NOT_REGISTER", s[s.SUCCESS = 2] = "SUCCESS", s[s.WAIT = 3] = "WAIT", s[s.ERROR = 4] = "ERROR", s))(B || {});
211
+ const R0 = (s) => {
212
+ const r = s && s[0] && s[0][0];
213
+ return (r == null ? void 0 : r.t) === M.BOOLEAN ? r.v === N2.TRUE || r.v === !0 : r ? r.v : !1;
214
+ };
215
+ let J = class extends _2 {
216
+ constructor(r, t, e) {
217
+ super();
218
+ // Cache Formula ID and formula mapping.
219
+ m(this, "_formulaMap", /* @__PURE__ */ new Map());
220
+ m(this, "_result$", new h2());
221
+ m(this, "result$", this._result$.asObservable());
222
+ this._commandService = r, this._activeDirtyManagerService = t, this._conditionalFormattingRuleModel = e, this._initFormulaCalculationResultChange(), this._initRuleChange();
223
+ }
224
+ _initRuleChange() {
225
+ const r = (t) => {
226
+ switch (t.type) {
227
+ case S.colorScale:
228
+ return t.config.some((e) => e.value.type === R.formula);
229
+ case S.dataBar:
230
+ return [t.config.max, t.config.min].some((e) => e.type === R.formula);
231
+ case S.iconSet:
232
+ return t.config.some((e) => e.value.type === R.formula);
233
+ }
234
+ };
235
+ this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((t) => {
236
+ const { unitId: e, subUnitId: n, rule: i, oldRule: a } = t;
237
+ t.type === "delete" && this._removeFormulaByCfId(e, n, i.cfId), t.type === "set" && (r(i.rule) || a && r(a.rule)) && this._removeFormulaByCfId(e, n, i.cfId);
238
+ }));
239
+ }
240
+ _initFormulaCalculationResultChange() {
241
+ this.disposeWithMe(this._commandService.onCommandExecuted((r) => {
242
+ if (r.id === i0.id) {
243
+ const t = r.params;
244
+ for (const e in t.unitOtherData)
245
+ for (const n in t.unitOtherData[e])
246
+ for (const i in t.unitOtherData[e][n]) {
247
+ const a = new O(t.unitOtherData[e][n][i]), u = this._ensureSubunitFormulaMap(e, n).getValue(i, ["formulaId"]);
248
+ if (!u)
249
+ continue;
250
+ const l = u.ranges;
251
+ if (!l)
252
+ continue;
253
+ const o = u.result, d = l[0].startRow, c = l[0].startColumn;
254
+ a.forValue((D, f, F) => {
255
+ o.setValue(d + D, c + f, R0(F));
256
+ }), u.status = 2;
257
+ const g = this._getAllFormulaResultByCfId(e, n, u.cfId).every(
258
+ (D) => D.status === 2
259
+ /* SUCCESS */
260
+ );
261
+ this._result$.next({ ...u, isAllFinished: g });
262
+ }
263
+ }
264
+ })), this._activeDirtyManagerService.register(d2.id, {
265
+ commandId: d2.id,
266
+ getDirtyData(r) {
267
+ return {
268
+ dirtyUnitOtherFormulaMap: r.params
269
+ };
270
+ }
271
+ });
272
+ }
273
+ _ensureSubunitFormulaMap(r, t) {
274
+ let e = this._formulaMap.get(r);
275
+ e || (e = /* @__PURE__ */ new Map(), this._formulaMap.set(r, e));
276
+ let n = e.get(t);
277
+ return n || (n = new H2([], ["formulaId", "id"]), e.set(t, n)), n;
278
+ }
279
+ getSubUnitFormulaMap(r, t) {
280
+ var e;
281
+ return (e = this._formulaMap.get(r)) == null ? void 0 : e.get(t);
282
+ }
283
+ registerFormulaWithRange(r, t, e, n, i = [{ startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }]) {
284
+ const a = this._ensureSubunitFormulaMap(r, t), u = this.createCFormulaId(e, n);
285
+ if (a.getValue(u, ["id"]))
286
+ return;
287
+ const l = this._createFormulaId(r, t);
288
+ a.addValue({
289
+ formulaText: n,
290
+ unitId: r,
291
+ subUnitId: t,
292
+ cfId: e,
293
+ id: u,
294
+ ranges: i,
295
+ formulaId: l,
296
+ status: 3,
297
+ result: new O()
298
+ });
299
+ const o = {
300
+ unitId: r,
301
+ subUnitId: t,
302
+ formulaMap: {
303
+ [l]: {
304
+ f: n,
305
+ ranges: i
306
+ }
307
+ }
308
+ };
309
+ this._commandService.executeCommand(a0.id, o, { onlyLocal: !0 }).then(() => {
310
+ this._commandService.executeCommand(d2.id, { [r]: { [t]: { [l]: !0 } } }, { onlyLocal: !0 });
311
+ });
312
+ }
313
+ _removeFormulaByCfId(r, t, e) {
314
+ const i = this.deleteCache(r, t, e).map((a) => a.formulaId);
315
+ this._commandService.executeCommand(l0.id, { unitId: r, subUnitId: t, formulaIdList: i }, { onlyLocal: !0 });
316
+ }
317
+ getFormulaResultWithCoords(r, t, e, n, i = 0, a = 0) {
318
+ const u = this.getSubUnitFormulaMap(r, t);
319
+ if (!u)
320
+ return {
321
+ status: 1
322
+ /* NOT_REGISTER */
323
+ };
324
+ const l = u.getValue(this.createCFormulaId(e, n), ["id"]);
325
+ return l ? l.status === 2 && l.result ? {
326
+ result: l.result.getValue(i, a),
327
+ status: 2
328
+ /* SUCCESS */
329
+ } : l.status === 3 ? {
330
+ status: 3
331
+ /* WAIT */
332
+ } : {
333
+ status: 4
334
+ /* ERROR */
335
+ } : {
336
+ status: 1
337
+ /* NOT_REGISTER */
338
+ };
339
+ }
340
+ getFormulaMatrix(r, t, e, n) {
341
+ const i = this.getSubUnitFormulaMap(r, t);
342
+ if (!i)
343
+ return {
344
+ status: 1
345
+ /* NOT_REGISTER */
346
+ };
347
+ const a = i.getValue(this.createCFormulaId(e, n), ["id"]);
348
+ if (!a)
349
+ return {
350
+ status: 1
351
+ /* NOT_REGISTER */
352
+ };
353
+ if (a.status === 2 && a.result)
354
+ return {
355
+ result: a.result,
356
+ status: 2
357
+ /* SUCCESS */
358
+ };
359
+ }
360
+ /**
361
+ * If `formulaText` is not provided, then all caches related to `cfId` will be deleted.
362
+ */
363
+ deleteCache(r, t, e, n) {
364
+ const i = this.getSubUnitFormulaMap(r, t);
365
+ if (!i)
366
+ return [];
367
+ if (n) {
368
+ const a = this.createCFormulaId(e, n);
369
+ return i.deleteValue(a, ["id"]), [];
370
+ } else {
371
+ const a = i.getValues().filter((u) => u.cfId === e);
372
+ return a.forEach((u) => {
373
+ i.deleteValue(u.formulaId, ["formulaId"]);
374
+ }), a;
375
+ }
376
+ }
377
+ _getAllFormulaResultByCfId(r, t, e) {
378
+ const n = this.getSubUnitFormulaMap(r, t);
379
+ return n ? n.getValues().filter((a) => a.cfId === e) : [];
380
+ }
381
+ /**
382
+ * The external environment is not aware of`formulaId`;it communicates internally with the formula engine.
383
+ */
384
+ _createFormulaId(r, t) {
385
+ return `sheet.cf_${r}_${t}_${$.generateRandomId(8)}`;
386
+ }
387
+ /**
388
+ * A conditional formatting may have multiple formulas;if the formulas are identical,then the results will be consistent.
389
+ */
390
+ createCFormulaId(r, t) {
391
+ return `${r}_${t}`;
392
+ }
393
+ };
394
+ J = I0([
395
+ E2(0, _(P)),
396
+ E2(1, _(s0)),
397
+ E2(2, _(y))
398
+ ], J);
399
+ var V = /* @__PURE__ */ ((s) => (s.preComputingStart = "preComputingStart", s.preComputing = "preComputing", s.preComputingEnd = "preComputingEnd", s.preComputingError = "preComputingError", s))(V || {});
400
+ class F2 {
401
+ constructor(r) {
402
+ /**
403
+ * 3nd-level cache
404
+ */
405
+ m(this, "_cache");
406
+ m(this, "_preComputingStatus$", new Q2(
407
+ "preComputingStart"
408
+ /* preComputingStart */
409
+ ));
410
+ m(this, "preComputingStatus$", this._preComputingStatus$.asObservable().pipe(e0()));
411
+ /**
412
+ * 2nd-level cache
413
+ */
414
+ m(this, "_preComputingCache");
415
+ m(this, "_rule");
416
+ this._context = r, this._cache = new U2(r.limit), this._rule = r.rule, this._preComputingCache = null, this._initClearCacheListener();
417
+ }
418
+ setCacheLength(r) {
419
+ this._cache.limit = r;
420
+ }
421
+ clearCache() {
422
+ this._cache.clear();
423
+ }
424
+ resetPreComputingCache() {
425
+ this._preComputingStatus$.next(
426
+ "preComputingStart"
427
+ /* preComputingStart */
428
+ ), this._preComputingCache = null;
429
+ }
430
+ updateRule(r) {
431
+ this._rule = r, this.resetPreComputingCache();
432
+ }
433
+ getCell(r, t) {
434
+ const e = this._createKey(r, t);
435
+ if (this._preComputingStatus$.getValue() === "preComputing")
436
+ return this._cache.get(e);
437
+ let n = this.getPreComputingResult(r, t);
438
+ if (n === null && (this._preComputingStatus$.next(
439
+ "preComputingStart"
440
+ /* preComputingStart */
441
+ ), this.preComputing(r, t, this._getContext()), n = this.getPreComputingResult(r, t), n === null))
442
+ return this._cache.get(e);
443
+ if (this._preComputingStatus$.next(
444
+ "preComputingEnd"
445
+ /* preComputingEnd */
446
+ ), this._cache.has(e))
447
+ return this._cache.get(e);
448
+ const i = this.getCellResult(r, t, n, this._getContext());
449
+ return i !== null && this._setCache(r, t, i), i;
450
+ }
451
+ setPreComputingCache(r) {
452
+ this._preComputingCache = r;
453
+ }
454
+ getPreComputingResult(r, t) {
455
+ return this._preComputingCache;
456
+ }
457
+ _createKey(r, t) {
458
+ return `${r}_${t}`;
459
+ }
460
+ _setCache(r, t, e) {
461
+ const n = this._createKey(r, t);
462
+ this._cache.set(n, e);
463
+ }
464
+ _getContext() {
465
+ return { ...this._context, rule: this._rule };
466
+ }
467
+ _initClearCacheListener() {
468
+ this.preComputingStatus$.subscribe((r) => {
469
+ r === "preComputingEnd" && this.clearCache();
470
+ });
471
+ }
472
+ }
473
+ function g2(s, r) {
474
+ return Math.abs(s - r) < Number.EPSILON;
475
+ }
476
+ const k = (s) => [void 0, null].includes(s), W = (s) => {
477
+ var e, n;
478
+ if (!s)
479
+ return null;
480
+ if (s.t === M.BOOLEAN)
481
+ return s.v === N2.TRUE ? R2.TRUE : R2.FALSE;
482
+ const r = s.v, t = (n = (e = s.p) == null ? void 0 : e.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "");
483
+ return k(r) ? k(t) ? null : t : r;
484
+ }, p2 = 86400;
485
+ function S0(s, r = !0) {
486
+ if (r && s >= 0) {
487
+ if (s === 0)
488
+ return [1900, 1, 0];
489
+ if (s === 60)
490
+ return [1900, 2, 29];
491
+ if (s < 60)
492
+ return [1900, s < 32 ? 1 : 2, (s - 1) % 31 + 1];
493
+ }
494
+ let t = s + 68569 + 2415019;
495
+ const e = Math.floor(4 * t / 146097);
496
+ t = t - Math.floor((146097 * e + 3) / 4);
497
+ const n = Math.floor(4e3 * (t + 1) / 1461001);
498
+ t = t - Math.floor(1461 * n / 4) + 31;
499
+ const i = Math.floor(80 * t / 2447), a = t - Math.floor(2447 * i / 80);
500
+ t = Math.floor(i / 11);
501
+ const u = i + 2 - 12 * t;
502
+ return [100 * (e - 49) + n + t | 0, u | 0, a | 0];
503
+ }
504
+ const b0 = (s) => {
505
+ let r = s | 0;
506
+ const t = p2 * (s - r);
507
+ let e = Math.floor(t);
508
+ t - e > 0.9999 && (e += 1, e === p2 && (e = 0, r += 1));
509
+ const n = e < 0 ? p2 + e : e, [i, a, u] = S0(s, !0), l = Math.floor(n / 60 / 60) % 60, o = Math.floor(n / 60) % 60, d = Math.floor(n) % 60;
510
+ return v(`${i}/${a}/${u} ${l}:${o}:${d}`).valueOf();
511
+ }, C2 = (s, r, t) => {
512
+ switch (s.type) {
513
+ case R.max: {
514
+ let e = 0;
515
+ return r.forValue((n, i, a) => {
516
+ a > e && (e = a);
517
+ }), {
518
+ status: B.SUCCESS,
519
+ result: e
520
+ };
521
+ }
522
+ case R.min: {
523
+ let e;
524
+ return r.forValue((n, i, a) => {
525
+ e === void 0 && (e = a), a < e && (e = a);
526
+ }), {
527
+ status: B.SUCCESS,
528
+ result: e
529
+ };
530
+ }
531
+ case R.percent: {
532
+ let e, n;
533
+ r.forValue((u, l, o) => {
534
+ (e === void 0 || n === void 0) && (e = o, n = o), o > e && (e = o), o < n && (n = o);
535
+ });
536
+ const i = (e || 0) - (n || 0), a = Math.max(Math.min(Number(s.value) || 0, 100), 0);
537
+ return {
538
+ status: B.SUCCESS,
539
+ result: i * (a / 100) + (n || 0)
540
+ };
541
+ }
542
+ case R.percentile: {
543
+ const e = r.toNativeArray().sort((o, d) => o - d), n = Math.max(Math.min(Number(s.value) || 0, 100), 0), i = (e.length - 1) * n / 100, a = Math.floor(i), u = i - a, l = e[a] + (e[Math.min(a + 1, e.length - 1)] - e[a]) * u;
544
+ return {
545
+ status: B.SUCCESS,
546
+ result: l
547
+ };
548
+ }
549
+ case R.formula: {
550
+ const { accessor: e, unitId: n, subUnitId: i, cfId: a } = t, u = String(s.value), l = e.get(J);
551
+ return l.registerFormulaWithRange(n, i, a, u), l.getFormulaResultWithCoords(n, i, a, u);
552
+ }
553
+ case R.num: {
554
+ const e = Number(s.value);
555
+ return {
556
+ status: B.SUCCESS,
557
+ result: Number.isNaN(e) ? 0 : e
558
+ };
559
+ }
560
+ }
561
+ }, V1 = (s, r, t, e) => {
562
+ const { accessor: n } = e, i = n.get(z), a = new O();
563
+ return t.ranges.forEach((u) => {
564
+ N.foreach(u, (l, o) => {
565
+ const d = i.getCellCfs(s, r, l, o);
566
+ if (d) {
567
+ const c = d.find((h) => h.cfId === t.cfId);
568
+ c != null && c.result && a.setValue(l, o, c.result);
569
+ }
570
+ });
571
+ }), a;
572
+ }, n2 = (s, r) => {
573
+ switch (s.operator) {
574
+ case w.between: {
575
+ if (typeof s.value != "object" || !s.value.length)
576
+ return;
577
+ const t = Math.min(...s.value), e = Math.max(...s.value);
578
+ return r >= t && r <= e;
579
+ }
580
+ case w.notBetween: {
581
+ if (typeof s.value != "object" || !s.value.length)
582
+ return;
583
+ const t = Math.min(...s.value), e = Math.max(...s.value);
584
+ return !(r >= t && r <= e);
585
+ }
586
+ case w.equal: {
587
+ const t = s.value || 0;
588
+ return g2(t, r);
589
+ }
590
+ case w.notEqual: {
591
+ const t = s.value || 0;
592
+ return !g2(t, r);
593
+ }
594
+ case w.greaterThan: {
595
+ const t = s.value || 0;
596
+ return r > t;
597
+ }
598
+ case w.greaterThanOrEqual: {
599
+ const t = s.value || 0;
600
+ return r >= t;
601
+ }
602
+ case w.lessThan: {
603
+ const t = s.value || 0;
604
+ return r < t;
605
+ }
606
+ case w.lessThanOrEqual: {
607
+ const t = s.value || 0;
608
+ return r <= t;
609
+ }
610
+ default:
611
+ return !1;
612
+ }
613
+ }, L0 = (s) => {
614
+ switch (s) {
615
+ case w.greaterThan:
616
+ return w.lessThanOrEqual;
617
+ case w.greaterThanOrEqual:
618
+ return w.lessThan;
619
+ case w.lessThan:
620
+ return w.greaterThanOrEqual;
621
+ case w.lessThanOrEqual:
622
+ return w.greaterThan;
623
+ }
624
+ return s;
625
+ }, k0 = (s, r) => {
626
+ const t = (i) => i.a !== void 0 ? i : { ...i, a: 1 }, e = s.findIndex((i) => i.value >= r), n = e - 1;
627
+ if (e === 0)
628
+ return s[0].color.toRgbString();
629
+ if (n >= 0) {
630
+ const i = s[n], a = s[e];
631
+ if (i.color.isValid && a.color.isValid) {
632
+ const u = t(i.color.toRgb()), l = t(a.color.toRgb()), o = a.value - i.value, d = (r - i.value) / o, c = ["r", "g", "b", "a"].reduce((g, D) => {
633
+ const f = u[D];
634
+ return g[D] = (l[D] - f) * d + f, g;
635
+ }, {});
636
+ return new T2(c).toRgbString();
637
+ }
638
+ } else
639
+ return s[s.length - 1].color.toRgbString();
640
+ }, y2 = (s, r, t) => s.map((e) => {
641
+ if (e.startColumn > t || e.startRow > r)
642
+ return null;
643
+ const n = { ...e };
644
+ return n.endRow = Math.min(n.endRow, r), n.endColumn = Math.min(n.endColumn, t), n;
645
+ }).filter((e) => !!e);
646
+ function O1(s) {
647
+ let r = 0;
648
+ return new O(s).forValue((t, e, n) => {
649
+ r = Math.max(Number.isNaN(r) ? 0 : r, Number(n));
650
+ }), r;
651
+ }
652
+ class B0 extends F2 {
653
+ preComputing(r, t, e) {
654
+ const n = e.rule, i = e.worksheet, a = new O();
655
+ !n.rule.config.every((d) => d.value.type === R.num) && y2(n.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((c) => {
656
+ N.foreach(c, (h, g) => {
657
+ const D = e.getCellValue(h, g), f = D && D.v;
658
+ if (!k(f) && (D == null ? void 0 : D.t) === M.NUMBER) {
659
+ const F = Number(f);
660
+ !Number.isNaN(F) && a.setValue(h, g, F);
661
+ }
662
+ });
663
+ });
664
+ const l = [...n.rule.config].sort((d, c) => d.index - c.index).map((d) => ({
665
+ value: C2(d.value, a, {
666
+ ...e,
667
+ cfId: n.cfId
668
+ }),
669
+ color: new T2(d.color)
670
+ }));
671
+ if (!l.some((d) => o0(d.value) ? d.value.status !== B.SUCCESS : !1)) {
672
+ const d = l.map((c) => c.color).reduce((c, h, g) => (c.result.push({ color: h, value: c.sortValue[g] }), c), {
673
+ result: [],
674
+ sortValue: l.map((c) => c.value.result).sort((c, h) => c - h)
675
+ }).result;
676
+ this.setPreComputingCache(d), this._preComputingStatus$.next(V.preComputingEnd);
677
+ return;
678
+ }
679
+ this._preComputingStatus$.next(V.preComputing);
680
+ }
681
+ getCellResult(r, t, e, n) {
682
+ if (!e)
683
+ return null;
684
+ const i = n.getCellValue(r, t);
685
+ if (i.t === M.NUMBER) {
686
+ const a = Number(i.v);
687
+ if (!Number.isNaN(a))
688
+ return k0(e, a);
689
+ }
690
+ }
691
+ }
692
+ const N0 = "sheet-conditional-rule-data-bar", b2 = "#ffbe38", L2 = "#abd91a", U0 = "#000", T0 = 34;
693
+ class V0 extends $2 {
694
+ constructor() {
695
+ super(...arguments);
696
+ m(this, "_paddingRightAndLeft", 2);
697
+ m(this, "_paddingTopAndBottom", 2);
698
+ m(this, "uKey", N0);
699
+ m(this, "Z_INDEX", T0);
700
+ m(this, "_radius", 1);
701
+ }
702
+ // eslint-disable-next-line max-lines-per-function
703
+ draw(t, e, n, i) {
704
+ const { worksheet: a } = n;
705
+ if (!a)
706
+ return !1;
707
+ t.save(), N.foreach(n.rowColumnSegment, (u, l) => {
708
+ if (!a.getRowVisible(u) || !a.getColVisible(l))
709
+ return;
710
+ const o = a.getCell(u, l);
711
+ if (o && o.dataBar) {
712
+ const { color: d, value: c, startPoint: h, isGradient: g } = o.dataBar, D = n.getCellWithCoordByIndex(u, l, !1);
713
+ let { isMerged: f, isMergedMainCell: F, mergeInfo: E, startY: I, endY: p, startX: A, endX: T } = D;
714
+ if (f || (F && (I = E.startY, p = E.endY, A = E.startX, T = E.endX), !this.isRenderDiffRangesByCell(E, i)))
715
+ return;
716
+ const a2 = T - A, v2 = p + c0 - I, l2 = a2 - this._paddingRightAndLeft * 2, I2 = v2 - this._paddingTopAndBottom * 2;
717
+ if (c > 0) {
718
+ const Y = Math.max(l2 * (1 - h / 100) * c / 100, 1), Z = A + this._paddingRightAndLeft + h / 100 * l2, G = I + this._paddingTopAndBottom;
719
+ if (g) {
720
+ const H = t.createLinearGradient(Z, G, Z + Y, G);
721
+ H.addColorStop(0, d), H.addColorStop(1, "rgb(255 255 255)"), t.fillStyle = H, t.strokeStyle = d, t.lineWidth = 1;
722
+ } else
723
+ t.fillStyle = d;
724
+ this._drawRectWithRoundedCorner(t, Z, G, Y, I2, !1, !0, !0, !1), g && t.stroke();
725
+ } else {
726
+ const Y = Math.max(l2 * h / 100 * Math.abs(c) / 100, 1), Z = A + this._paddingRightAndLeft + h / 100 * l2 - Y, G = I + this._paddingTopAndBottom;
727
+ if (g) {
728
+ const H = t.createLinearGradient(Z, G, Z + Y, G);
729
+ H.addColorStop(0, "rgb(255 255 255)"), H.addColorStop(1, d), t.fillStyle = H, t.strokeStyle = d, t.lineWidth = 1;
730
+ } else
731
+ t.fillStyle = d;
732
+ this._drawRectWithRoundedCorner(t, Z, G, Y, I2, !0, !1, !1, !0), g && t.stroke();
733
+ }
734
+ }
735
+ }), t.restore();
736
+ }
737
+ _drawRectWithRoundedCorner(t, e, n, i, a, u, l, o, d) {
738
+ const c = this._radius;
739
+ !a || !i || (t.beginPath(), t.moveTo(e + c, n), t.lineTo(e + i - c, n), l ? t.arcTo(e + i, n, e + i, n + c, c) : t.lineTo(e + i, n), t.lineTo(e + i, n + a - c), o ? t.arcTo(e + i, n + a, e + i - c, n + a, c) : t.lineTo(e + i, n + a), t.lineTo(e + c, n + a), d ? t.arcTo(e, n + a, e, n + a - c, c) : t.lineTo(e, n + a), t.lineTo(e, n + c), u ? t.arcTo(e, n, e + c, n, c) : t.lineTo(e, n), t.closePath(), t.fill());
740
+ }
741
+ }
742
+ O2.add(V0);
743
+ const o2 = (s) => Math.max(Math.min(100, s), 0), O0 = (s, r, t) => {
744
+ const e = t(s, r);
745
+ if (e && e.t === M.NUMBER) {
746
+ const n = Number(e.v);
747
+ return Number.isNaN(n) ? null : n;
748
+ }
749
+ return null;
750
+ };
751
+ class $0 extends F2 {
752
+ preComputing(r, t, e) {
753
+ const n = e.rule, i = n.rule, a = e.worksheet, u = new O();
754
+ ![n.rule.config.max, n.rule.config.min].every((g) => g.type === R.num) && y2(n.ranges, a.getMaxRows() - 1, a.getMaxColumns() - 1).forEach((D) => {
755
+ N.foreach(D, (f, F) => {
756
+ const E = e.getCellValue(f, F), I = E && E.v;
757
+ if (!k(I) && (E == null ? void 0 : E.t) === M.NUMBER) {
758
+ const p = Number(I);
759
+ !Number.isNaN(p) && u.setValue(f, F, p);
760
+ }
761
+ });
762
+ });
763
+ const o = C2(i.config.min, u, { ...e, cfId: n.cfId }), d = C2(i.config.max, u, { ...e, cfId: n.cfId });
764
+ let c = 0, h = 0;
765
+ if (o.status === B.SUCCESS) {
766
+ const g = Number(o.result);
767
+ c = Number.isNaN(g) ? 0 : g;
768
+ } else {
769
+ this._preComputingStatus$.next(V.preComputing);
770
+ return;
771
+ }
772
+ if (d.status === B.SUCCESS) {
773
+ const g = Number(d.result), D = Number.isNaN(g) ? 0 : g;
774
+ h = Math.max(D, c), c = Math.min(D, c);
775
+ let f = 50;
776
+ if (c < 0 && h <= 0)
777
+ f = 100;
778
+ else if (c < 0 && h > 0) {
779
+ const F = Math.abs(h) + Math.abs(c);
780
+ f = Math.abs(c) / F * 100;
781
+ } else c >= 0 && h > 0 && (f = 0);
782
+ this.setPreComputingCache({ min: c, max: h, startPoint: f }), this._preComputingStatus$.next(V.preComputingEnd);
783
+ return;
784
+ }
785
+ this._preComputingStatus$.next(V.preComputing);
786
+ }
787
+ // eslint-disable-next-line complexity
788
+ getCellResult(r, t, e, n) {
789
+ const { min: i, max: a, startPoint: u } = e, o = n.rule.rule, d = o.isShowValue, c = o.config.isGradient, h = O0(r, t, n.getCellValue);
790
+ if (!(h === null || h < i || i === a || a < i)) {
791
+ if (h === 0)
792
+ return { color: U0, startPoint: u, value: 0, isGradient: c, isShowValue: d };
793
+ if (i < 0 && a <= 0) {
794
+ const g = a - i, D = o2((a - h) / g * 100);
795
+ return D === 0 ? void 0 : { color: o.config.nativeColor || L2, startPoint: u, value: -D, isGradient: c, isShowValue: d };
796
+ } else if (i < 0 && a > 0)
797
+ if (h > 0) {
798
+ const g = o2(Math.min(h / a, 1) * 100);
799
+ return g === 0 ? void 0 : { color: o.config.positiveColor || b2, startPoint: u, value: g, isGradient: c, isShowValue: d };
800
+ } else {
801
+ const g = o2(Math.min(Math.abs(h) / Math.abs(i), 1) * 100);
802
+ return g === 0 ? void 0 : { color: o.config.nativeColor || L2, startPoint: u, value: -g, isGradient: c, isShowValue: d };
803
+ }
804
+ else if (i >= 0 && a > 0) {
805
+ const g = a - i, D = 0, f = o2((1 - (a - h) / g) * 100);
806
+ return f === 0 ? void 0 : { color: o.config.positiveColor || b2, startPoint: D, value: f, isGradient: c, isShowValue: d };
807
+ }
808
+ }
809
+ }
810
+ }
811
+ class P0 extends F2 {
812
+ // eslint-disable-next-line max-lines-per-function
813
+ preComputing(r, t, e) {
814
+ const n = e.rule.rule, i = e.rule.ranges, u = (() => {
815
+ switch (n.subType) {
816
+ case x.average: {
817
+ let l = 0, o = 0;
818
+ return i.forEach((d) => {
819
+ N.foreach(d, (c, h) => {
820
+ const g = e.getCellValue(c, h), D = W(g || void 0);
821
+ g && g.t === M.NUMBER && D !== void 0 && (l += Number(D) || 0, o++);
822
+ });
823
+ }), { value: l / o, type: n.subType };
824
+ }
825
+ case x.uniqueValues:
826
+ case x.duplicateValues: {
827
+ const l = /* @__PURE__ */ new Map();
828
+ return i.forEach((o) => {
829
+ N.foreach(o, (d, c) => {
830
+ const h = e.getCellValue(d, c), g = W(h || void 0);
831
+ if (g !== void 0) {
832
+ const D = l.get(g);
833
+ D ? l.set(g, D + 1) : l.set(g, 1);
834
+ }
835
+ });
836
+ }), { value: l, type: n.subType };
837
+ }
838
+ case x.rank: {
839
+ let l = [];
840
+ i.forEach((c) => {
841
+ N.foreach(c, (h, g) => {
842
+ const D = e.getCellValue(h, g), f = W(D || void 0);
843
+ D && D.t === M.NUMBER && f !== void 0 && l.push(Number(f) || 0);
844
+ });
845
+ }), l.sort((c, h) => h - c);
846
+ const o = e.rule.rule;
847
+ if (o.isPercent) {
848
+ o.isBottom && (l = l.toReversed());
849
+ const c = $.clamp(o.value, 0, 100) / 100, h = Math.floor(c * l.length), g = $.clamp(h - 1, 0, l.length - 1);
850
+ return { value: l[g], type: n.subType };
851
+ }
852
+ const d = Math.floor($.clamp(o.isBottom ? o.value - 1 : o.value, 0, l.length));
853
+ return o.isBottom ? { value: l[l.length - d - 1], type: n.subType } : { value: l[Math.max(d - 1, 0)], type: n.subType };
854
+ }
855
+ case x.formula: {
856
+ const l = n, o = e.accessor.get(J);
857
+ o.registerFormulaWithRange(e.unitId, e.subUnitId, e.rule.cfId, l.value, e.rule.ranges);
858
+ const d = o.getFormulaMatrix(e.unitId, e.subUnitId, e.rule.cfId, l.value);
859
+ return d && d.status === B.SUCCESS ? (this._preComputingStatus$.next(V.preComputingEnd), {
860
+ value: d.result,
861
+ type: n.subType
862
+ }) : (this._preComputingStatus$.next(V.preComputing), null);
863
+ }
864
+ case x.timePeriod:
865
+ switch (n.operator) {
866
+ case L.last7Days:
867
+ return {
868
+ value: {
869
+ start: v().subtract(7, "day").valueOf(),
870
+ end: v().valueOf()
871
+ },
872
+ type: n.subType
873
+ };
874
+ case L.lastMonth:
875
+ return {
876
+ value: {
877
+ start: v().startOf("month").subtract(1, "month").valueOf(),
878
+ end: v().endOf("month").subtract(1, "month").valueOf()
879
+ },
880
+ type: n.subType
881
+ };
882
+ case L.lastWeek:
883
+ return {
884
+ value: {
885
+ start: v().startOf("week").subtract(1, "week").valueOf(),
886
+ end: v().endOf("week").subtract(1, "week").valueOf()
887
+ },
888
+ type: n.subType
889
+ };
890
+ case L.nextMonth:
891
+ return {
892
+ value: {
893
+ start: v().startOf("month").add(1, "month").valueOf(),
894
+ end: v().endOf("month").add(1, "month").valueOf()
895
+ },
896
+ type: n.subType
897
+ };
898
+ case L.nextWeek:
899
+ return {
900
+ value: {
901
+ start: v().startOf("week").add(1, "week").valueOf(),
902
+ end: v().endOf("week").add(1, "week").valueOf()
903
+ },
904
+ type: n.subType
905
+ };
906
+ case L.thisMonth:
907
+ return {
908
+ value: {
909
+ start: v().startOf("month").valueOf(),
910
+ end: v().endOf("month").valueOf()
911
+ },
912
+ type: n.subType
913
+ };
914
+ case L.thisWeek:
915
+ return {
916
+ value: {
917
+ start: v().startOf("week").valueOf(),
918
+ end: v().endOf("week").valueOf()
919
+ },
920
+ type: n.subType
921
+ };
922
+ case L.today:
923
+ return {
924
+ value: {
925
+ start: v().startOf("day").valueOf(),
926
+ end: v().endOf("day").valueOf()
927
+ },
928
+ type: n.subType
929
+ };
930
+ case L.tomorrow:
931
+ return {
932
+ value: {
933
+ start: v().startOf("day").add(1, "day").valueOf(),
934
+ end: v().endOf("day").add(1, "day").valueOf()
935
+ },
936
+ type: n.subType
937
+ };
938
+ case L.yesterday:
939
+ return {
940
+ value: {
941
+ start: v().startOf("day").subtract(1, "day").valueOf(),
942
+ end: v().endOf("day").subtract(1, "day").valueOf()
943
+ },
944
+ type: n.subType
945
+ };
946
+ }
947
+ }
948
+ })();
949
+ this.setPreComputingCache(u);
950
+ }
951
+ // eslint-disable-next-line max-lines-per-function
952
+ getCellResult(r, t, e, n) {
953
+ const i = n.getCellValue(r, t), a = n.rule.rule;
954
+ return (() => {
955
+ switch (a.subType) {
956
+ case x.number: {
957
+ const o = i && Number(i.v), d = (i == null ? void 0 : i.t) === M.NUMBER, c = a;
958
+ return d ? k(o) || Number.isNaN(o) ? void 0 : n2({ operator: c.operator, value: c.value || 0 }, o || 0) : !![w.notEqual, w.notBetween].includes(c.operator);
959
+ }
960
+ case x.text: {
961
+ const o = a, d = W(i), c = d === null ? "" : String(d), h = o.value || "";
962
+ switch (o.operator) {
963
+ case b.beginsWith:
964
+ return c.startsWith(h);
965
+ case b.containsBlanks:
966
+ return /^\s*$/.test(c);
967
+ case b.notContainsBlanks:
968
+ return !/^\s*$/.test(c);
969
+ case b.containsErrors:
970
+ return S2.has(c);
971
+ case b.notContainsErrors:
972
+ return !S2.has(c);
973
+ case b.containsText:
974
+ return c.indexOf(h) > -1;
975
+ case b.notContainsText:
976
+ return c.indexOf(h) === -1;
977
+ case b.endsWith:
978
+ return c.endsWith(h);
979
+ case b.equal:
980
+ return c === h;
981
+ case b.notEqual:
982
+ return c !== h;
983
+ default:
984
+ return !1;
985
+ }
986
+ }
987
+ case x.timePeriod: {
988
+ const o = W(i);
989
+ if (k(o) || Number.isNaN(Number(o)) || (i == null ? void 0 : i.t) !== M.NUMBER || !e)
990
+ return;
991
+ const d = b0(Number(o)), { start: c, end: h } = e.value;
992
+ return d >= c && d <= h;
993
+ }
994
+ case x.average: {
995
+ const o = i && i.v, d = Number(o), c = (i == null ? void 0 : i.t) === M.NUMBER, h = a;
996
+ if (!c)
997
+ return w.notEqual === h.operator;
998
+ if (k(o) || Number.isNaN(d) || !e)
999
+ return !1;
1000
+ const g = e.value;
1001
+ switch (h.operator) {
1002
+ case w.greaterThan:
1003
+ return d > g;
1004
+ case w.greaterThanOrEqual:
1005
+ return d >= g;
1006
+ case w.lessThan:
1007
+ return d < g;
1008
+ case w.lessThanOrEqual:
1009
+ return d <= g;
1010
+ case w.equal:
1011
+ return g2(d, g);
1012
+ case w.notEqual:
1013
+ return !g2(d, g);
1014
+ default:
1015
+ return !1;
1016
+ }
1017
+ }
1018
+ case x.rank: {
1019
+ const o = W(i), d = Number(o);
1020
+ if (k(o) || Number.isNaN(d) || (i == null ? void 0 : i.t) !== M.NUMBER || !e)
1021
+ return !1;
1022
+ const c = e.value;
1023
+ return a.isBottom ? d <= c : d >= c;
1024
+ }
1025
+ case x.uniqueValues: {
1026
+ const o = W(i);
1027
+ return k(o) || !e ? !1 : e.value.get(o) === 1;
1028
+ }
1029
+ case x.duplicateValues: {
1030
+ const o = W(i);
1031
+ return k(o) || !e ? !1 : e.value.get(o) !== 1;
1032
+ }
1033
+ case x.formula: {
1034
+ const o = e == null ? void 0 : e.value;
1035
+ return o ? o.getValue(r, t) === !0 : !1;
1036
+ }
1037
+ }
1038
+ })() ? a.style : {};
1039
+ }
1040
+ }
1041
+ const W0 = (s, r, t) => {
1042
+ const e = t(s, r);
1043
+ if (e && e.t === M.NUMBER) {
1044
+ const n = Number(e.v);
1045
+ return Number.isNaN(n) ? null : n;
1046
+ }
1047
+ return null;
1048
+ };
1049
+ class q0 extends F2 {
1050
+ preComputing(r, t, e) {
1051
+ const n = e.rule.rule, i = e.worksheet, a = new O();
1052
+ !n.config.every((d) => d.value.type === R.num) && y2(e.rule.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((c) => {
1053
+ N.foreach(c, (h, g) => {
1054
+ const D = e.getCellValue(h, g), f = D && D.v;
1055
+ if (!k(f) && (D == null ? void 0 : D.t) === M.NUMBER) {
1056
+ const F = Number(f);
1057
+ !Number.isNaN(F) && a.setValue(h, g, F);
1058
+ }
1059
+ });
1060
+ });
1061
+ const l = n.config.map((d) => C2(d.value, a, { ...e, cfId: e.rule.cfId }));
1062
+ if (!l.some((d) => d.status !== B.SUCCESS)) {
1063
+ const d = l.map((c, h) => ({
1064
+ operator: n.config[h].operator,
1065
+ value: Number(c.result) || 0
1066
+ })).reduce((c, h, g, D) => {
1067
+ const f = n.config[g];
1068
+ if (!g || g === D.length - 1)
1069
+ c.push({ ...h, iconId: f.iconId, iconType: f.iconType });
1070
+ else {
1071
+ const F = D[g - 1];
1072
+ n2(F, h.value) || c.push({ ...h, iconId: f.iconId, iconType: f.iconType });
1073
+ }
1074
+ return c;
1075
+ }, []);
1076
+ this.setPreComputingCache(d), this._preComputingStatus$.next(V.preComputingEnd);
1077
+ return;
1078
+ }
1079
+ this._preComputingStatus$.next(V.preComputing);
1080
+ }
1081
+ getCellResult(r, t, e, n) {
1082
+ if (!e)
1083
+ return null;
1084
+ const i = W0(r, t, n.getCellValue);
1085
+ if (i === null)
1086
+ return;
1087
+ const a = n.rule.rule, u = a.isShowValue === void 0 ? !0 : !!a.isShowValue;
1088
+ for (let l = 0; l < e.length; l++) {
1089
+ const o = e[l], d = { ...o }, c = { ...o }, { iconId: h, iconType: g } = o;
1090
+ if (l === 0) {
1091
+ if (n2(o, i))
1092
+ return { iconId: h, iconType: g, isShowValue: u };
1093
+ } else {
1094
+ if (l === e.length - 1)
1095
+ return { iconId: h, iconType: g, isShowValue: u };
1096
+ {
1097
+ const D = e[l - 1];
1098
+ if (c.operator = L0(D.operator), c.value = D.value, n2(d, i) && n2(c, i))
1099
+ return { iconId: h, iconType: g, isShowValue: u };
1100
+ }
1101
+ }
1102
+ }
1103
+ }
1104
+ }
1105
+ var Z0 = Object.getOwnPropertyDescriptor, G0 = (s, r, t, e) => {
1106
+ for (var n = e > 1 ? void 0 : e ? Z0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1107
+ (a = s[i]) && (n = a(n) || n);
1108
+ return n;
1109
+ }, c2 = (s, r) => (t, e) => r(t, e, s);
1110
+ const A2 = 50 * 20 * 3 * 3;
1111
+ let z = class extends _2 {
1112
+ constructor(r, t, e, n) {
1113
+ super();
1114
+ // Map<unitID ,<sheetId ,ObjectMatrix>>
1115
+ m(this, "_calculateUnitManagers", /* @__PURE__ */ new Map());
1116
+ m(this, "_rTreeManager", new j2());
1117
+ /**
1118
+ * 1nd-level cache
1119
+ */
1120
+ m(this, "_cellCache", new U2(A2));
1121
+ m(this, "_markDirty$", new h2());
1122
+ /**
1123
+ * The rendering layer listens to this variable to determine whether a reRender is necessary.
1124
+ * @memberof ConditionalFormattingViewModel
1125
+ */
1126
+ m(this, "markDirty$", this._markDirty$.asObservable());
1127
+ /**
1128
+ `isNeedResetPreComputingCache` indicates whether it is necessary to remove the 2nd-level cache for each rule individually.
1129
+ Generally, when the logic of a rule calculation is modified, the cache for that rule needs to be removed.
1130
+ Changes in style/priority do not require the clearing of the 2nd-level cache.
1131
+ Rule changes/region changes require the removal of the 2nd-level cache.
1132
+ There is also a situation where preComputing is asynchronously calculated.
1133
+ After the calculation is finished, it is only for marking as dirty, and the 2nd-level cache need to be cleared.
1134
+ * @param {boolean} [isNeedResetPreComputingCache]
1135
+ */
1136
+ m(this, "_markRuleDirtyAtOnce", (r, t, e, n = !0) => {
1137
+ if (this._cellCache.clear(), n) {
1138
+ const a = this._ensureCalculateUnitManager(r, t).get(e);
1139
+ a && a.resetPreComputingCache();
1140
+ }
1141
+ this._markDirty$.next({
1142
+ unitId: r,
1143
+ subUnitId: t,
1144
+ cfId: e
1145
+ });
1146
+ });
1147
+ /**
1148
+ * For the same condition format being marked dirty multiple times at the same time,
1149
+ * it will cause the style cache to be cleared, thereby causing the screen to flicker.
1150
+ * Here,multiple dirties are merged into one..
1151
+ */
1152
+ m(this, "markRuleDirty", (() => {
1153
+ const r = new h2();
1154
+ return this.disposeWithMe(r.pipe(t0(100), n0((t) => !!t.length), r0((t) => {
1155
+ const e = /* @__PURE__ */ new Set(), n = [];
1156
+ return t.forEach((i) => {
1157
+ const a = `${i.unitId}_${i.subUnitId}_${i.cfId}`;
1158
+ if (e.has(a)) {
1159
+ if (i.isNeedResetPreComputingCache) {
1160
+ const u = n.find((l) => l.cfId === i.cfId);
1161
+ u.isNeedResetPreComputingCache = !0;
1162
+ }
1163
+ return;
1164
+ }
1165
+ e.add(a), n.push({ ...i });
1166
+ }), n;
1167
+ })).subscribe((t) => {
1168
+ t.forEach((e) => {
1169
+ this._markRuleDirtyAtOnce(e.unitId, e.subUnitId, e.cfId, e.isNeedResetPreComputingCache);
1170
+ });
1171
+ })), (t, e, n, i = !0) => {
1172
+ r.next({ unitId: t, subUnitId: e, cfId: n, isNeedResetPreComputingCache: i });
1173
+ };
1174
+ })());
1175
+ this._injector = r, this._conditionalFormattingRuleModel = t, this._conditionalFormattingFormulaService = e, this._univerInstanceService = n, this._initRuleListener(), this._handleCustomFormulasSeparately(), this._initCFFormulaListener();
1176
+ }
1177
+ _initCFFormulaListener() {
1178
+ this.disposeWithMe(
1179
+ this._conditionalFormattingFormulaService.result$.subscribe(({ unitId: r, subUnitId: t, cfId: e, isAllFinished: n }) => {
1180
+ n && this._markRuleDirtyAtOnce(r, t, e, n);
1181
+ })
1182
+ );
1183
+ }
1184
+ getCellCfs(r, t, e, n) {
1185
+ const i = this._createCacheKey(r, t, e, n);
1186
+ if (this._cellCache.has(i))
1187
+ return this._cellCache.get(i);
1188
+ const a = this._getCellCfs(r, t, e, n);
1189
+ return a.length && this._cellCache.set(i, a), a;
1190
+ }
1191
+ _getCellCfs(r, t, e, n) {
1192
+ var d;
1193
+ const i = (d = this._conditionalFormattingRuleModel.getSubunitRules(r, t)) != null ? d : [], a = this._ensureCalculateUnitManager(r, t), u = this._rTreeManager.bulkSearch([{ unitId: r, sheetId: t, range: { startColumn: n, endColumn: n, startRow: e, endRow: e } }]), l = i.filter((c) => u.has(c.cfId));
1194
+ return l.length ? l.map((c) => {
1195
+ const h = a.get(c.cfId);
1196
+ return h ? {
1197
+ cfId: c.cfId,
1198
+ result: h.getCell(e, n)
1199
+ } : null;
1200
+ }).filter((c) => !!c).map((c, h) => ({ ...c, priority: h })) : [];
1201
+ }
1202
+ _handleCustomFormulasSeparately() {
1203
+ this.disposeWithMe(
1204
+ this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
1205
+ if (r.type === "set") {
1206
+ const { unitId: t, subUnitId: e } = r, n = r.oldRule;
1207
+ n.rule.type === S.highlightCell && n.rule.subType === x.formula && this._conditionalFormattingFormulaService.deleteCache(t, e, n.cfId);
1208
+ }
1209
+ })
1210
+ );
1211
+ }
1212
+ _initRuleListener() {
1213
+ this.disposeWithMe(
1214
+ this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
1215
+ const { unitId: t, subUnitId: e, rule: n } = r, { cfId: i, ranges: a } = n, u = this._ensureCalculateUnitManager(t, e);
1216
+ switch (this.markRuleDirty(t, e, i), r.type) {
1217
+ case "add": {
1218
+ this._rTreeManager.bulkInsert(a.map((o) => ({ unitId: t, sheetId: e, id: i, range: o })));
1219
+ const l = this._createRuleCalculateUnitInstance(t, e, n);
1220
+ if (!l)
1221
+ return;
1222
+ u.set(n.cfId, l);
1223
+ break;
1224
+ }
1225
+ case "delete": {
1226
+ this._rTreeManager.bulkRemove(a.map((l) => ({ unitId: t, sheetId: e, id: i, range: l }))), u.delete(n.cfId);
1227
+ break;
1228
+ }
1229
+ case "set": {
1230
+ const l = r.oldRule;
1231
+ if (this._rTreeManager.bulkRemove(l.ranges.map((o) => ({ unitId: t, sheetId: e, id: l.cfId, range: o }))), this._rTreeManager.bulkInsert(a.map((o) => ({ unitId: t, sheetId: e, id: i, range: o }))), l.rule.type !== n.rule.type) {
1232
+ const o = this._createRuleCalculateUnitInstance(t, e, n);
1233
+ if (!o)
1234
+ return;
1235
+ u.delete(l.cfId), u.set(n.cfId, o);
1236
+ } else {
1237
+ const o = u.get(l.cfId);
1238
+ if (!o)
1239
+ return;
1240
+ o.updateRule(n);
1241
+ }
1242
+ }
1243
+ }
1244
+ })
1245
+ );
1246
+ }
1247
+ _ensureCalculateUnitManager(r, t) {
1248
+ let e = this._calculateUnitManagers.get(r);
1249
+ e || (e = /* @__PURE__ */ new Map(), this._calculateUnitManagers.set(r, e));
1250
+ let n = e.get(t);
1251
+ return n || (n = /* @__PURE__ */ new Map(), e.set(t, n)), n;
1252
+ }
1253
+ _createRuleCalculateUnitInstance(r, t, e) {
1254
+ const n = this._univerInstanceService.getUnit(r), i = n == null ? void 0 : n.getSheetBySheetId(t);
1255
+ if (!n || !i)
1256
+ return;
1257
+ const a = {
1258
+ workbook: n,
1259
+ worksheet: i,
1260
+ unitId: r,
1261
+ subUnitId: t,
1262
+ accessor: this._injector,
1263
+ rule: e,
1264
+ limit: A2,
1265
+ getCellValue: (u, l) => i.getCellRaw(u, l) || {}
1266
+ };
1267
+ switch (e.rule.type) {
1268
+ case S.colorScale:
1269
+ return new B0(a);
1270
+ case S.dataBar:
1271
+ return new $0(a);
1272
+ case S.highlightCell:
1273
+ return new P0(a);
1274
+ case S.iconSet:
1275
+ return new q0(a);
1276
+ }
1277
+ }
1278
+ _createCacheKey(r, t, e, n) {
1279
+ return `${r}_${t}_${e}_${n}`;
1280
+ }
1281
+ setCacheLength(r = A2) {
1282
+ this._cellCache.limit !== r && (this._cellCache.limit = r, this._calculateUnitManagers.forEach((t) => {
1283
+ t.forEach((e) => {
1284
+ e.forEach((n) => {
1285
+ n.setCacheLength(r);
1286
+ });
1287
+ });
1288
+ }));
1289
+ }
1290
+ };
1291
+ z = G0([
1292
+ c2(0, _(M2)),
1293
+ c2(1, _(y)),
1294
+ c2(2, _(J)),
1295
+ c2(3, q)
1296
+ ], z);
1297
+ const H0 = { mistake: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%227.03704%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.87359%206.87332C6.6146%207.13231%206.6146%207.55221%206.87359%207.8112L9.062%209.99961L6.87356%2012.188C6.61457%2012.447%206.61457%2012.8669%206.87356%2013.1259C7.13255%2013.3849%207.55245%2013.3849%207.81144%2013.1259L9.99987%2010.9375L12.1882%2013.1258C12.4472%2013.3848%2012.8671%2013.3848%2013.1261%2013.1258C13.3851%2012.8669%2013.3851%2012.447%2013.1261%2012.188L10.9378%209.99961L13.1261%207.81127C13.3851%207.55228%2013.3851%207.13238%2013.1261%206.87339C12.8671%206.61441%2012.4472%206.61441%2012.1882%206.87339L9.99987%209.06173L7.81147%206.87332C7.55248%206.61433%207.13257%206.61433%206.87359%206.87332Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A", warn: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%227.03704%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M9.16817%206.67735C9.16646%206.61745%209.1656%206.5875%209.16653%206.56236C9.18103%206.16817%209.49136%205.84883%209.88497%205.82306C9.91008%205.82141%209.94004%205.82141%209.99996%205.82141V5.82141C10.0599%205.82141%2010.0899%205.82141%2010.115%205.82306C10.5086%205.84883%2010.8189%206.16817%2010.8334%206.56236C10.8343%206.5875%2010.8335%206.61745%2010.8318%206.67735L10.7043%2011.131C10.6934%2011.5121%2010.3812%2011.8154%209.99995%2011.8154V11.8154C9.61866%2011.8154%209.30655%2011.5121%209.29564%2011.131L9.16817%206.67735Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3Crect%20x%3D%229.31488%22%20y%3D%2212.8086%22%20width%3D%221.37006%22%20height%3D%221.37006%22%20rx%3D%220.685032%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A", correct: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M17.037%2010C17.037%2013.8865%2013.8864%2017.0371%209.99999%2017.0371C6.11354%2017.0371%202.96295%2013.8865%202.96295%2010C2.96295%206.1136%206.11354%202.96301%209.99999%202.96301C13.8864%202.96301%2017.037%206.1136%2017.037%2010Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M13.9239%207.17477C13.6638%206.91472%2013.2422%206.91472%2012.9821%207.17477L8.74433%2011.4126L7.01786%209.6861C6.75781%209.42606%206.33619%209.42606%206.07614%209.6861C5.81609%209.94615%205.81609%2010.3678%206.07614%2010.6278L8.27349%2012.8252C8.53354%2013.0852%208.95516%2013.0852%209.21521%2012.8252L9.2195%2012.8209L13.9239%208.1165C14.1839%207.85645%2014.1839%207.43482%2013.9239%207.17477Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, j0 = { starEmpty: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A", starIncomplete: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_177)%22%3E%0A%3Cmask%20id%3D%22mask0_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2210%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20x%3D%2210.3704%22%20y%3D%220.37037%22%20width%3D%229.25926%22%20height%3D%2219.2593%22%20fill%3D%22%23C4C4C4%22%20stroke%3D%22%23F7D564%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask0_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3Cmask%20id%3D%22mask1_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20width%3D%2210%22%20height%3D%2220%22%20fill%3D%22%23C4C4C4%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask1_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_177%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", starFull: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, X0 = { progress0: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress25: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M16.2963%209.99991C16.2963%209.17307%2016.1335%208.35432%2015.8171%207.59042C15.5006%206.82652%2015.0369%206.13242%2014.4522%205.54776C13.8675%204.96309%2013.1734%204.49931%2012.4095%204.18289C11.6456%203.86647%2010.8269%203.70361%2010%203.70361L10%209.99991H16.2963Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress50: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M10%2016.2962C11.6699%2016.2962%2013.2714%2015.6328%2014.4522%2014.4521C15.633%2013.2713%2016.2963%2011.6698%2016.2963%209.99991C16.2963%208.33003%2015.633%206.72854%2014.4522%205.54776C13.2714%204.36697%2011.6699%203.70361%2010%203.70361L10%209.99991L10%2016.2962Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress75: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Cpath%20d%3D%22M3.70374%209.99991C3.70374%2011.2452%204.07301%2012.4625%204.76485%2013.4979C5.4567%2014.5334%206.44005%2015.3404%207.59054%2015.8169C8.74104%2016.2935%2010.007%2016.4182%2011.2284%2016.1752C12.4497%2015.9323%2013.5716%2015.3326%2014.4522%2014.4521C15.3327%2013.5715%2015.9324%2012.4496%2016.1753%2011.2283C16.4183%2010.0069%2016.2936%208.74092%2015.8171%207.59042C15.3405%206.43992%2014.5335%205.45658%2013.4981%204.76473C12.4626%204.07288%2011.2453%203.70361%2010%203.70361L10%209.99991L3.70374%209.99991Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A", progress100: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99993%22%20r%3D%226.66667%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%229.99991%22%20r%3D%226.2963%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, Y0 = { signal0: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal25: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal50: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal75: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93921%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70435%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A", signal100: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%2214.4764%22%20y%3D%222.98926%22%20width%3D%222.3%22%20height%3D%2214.0597%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2210.7255%22%20y%3D%225.93933%22%20width%3D%222.3%22%20height%3D%2211.1096%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%226.97455%22%20y%3D%229.70447%22%20width%3D%222.3%22%20height%3D%227.3443%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%223.22363%22%20y%3D%2213.3302%22%20width%3D%222.3%22%20height%3D%223.71851%22%20rx%3D%220.5%22%20fill%3D%22%230493EE%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, K0 = { guffaw: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M16.887%2010C16.887%2013.8037%2013.8036%2016.8871%209.99999%2016.8871C6.19638%2016.8871%203.11295%2013.8037%203.11295%2010C3.11295%206.19644%206.19638%203.11301%209.99999%203.11301C13.8036%203.11301%2016.887%206.19644%2016.887%2010Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M12.5355%2013.5821C13.0482%2013.1841%2013.3951%2012.6107%2013.5405%2012.0327C13.5934%2011.8226%2013.5051%2011.6349%2013.3518%2011.5331C13.2036%2011.4346%2013.0031%2011.4203%2012.8265%2011.5131C11.0615%2012.4407%208.94609%2012.4427%207.1828%2011.513C7.00629%2011.4199%206.80602%2011.4343%206.65798%2011.5329C6.50518%2011.6346%206.41701%2011.8217%206.46844%2012.0312C6.61029%2012.609%206.95079%2013.1833%207.46449%2013.5821C8.14361%2014.1093%209.05608%2014.3999%2010%2014.3999C10.9439%2014.3999%2011.8564%2014.1093%2012.5355%2013.5821Z%22%20fill%3D%22white%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.4%22%2F%3E%0A%3C%2Fsvg%3E%0A", smile: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2011.8518C7.03705%2011.8518%207.77779%2013.7037%2010%2013.7037C12.2222%2013.7037%2012.963%2011.8518%2012.963%2011.8518%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", noninductive: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.9259%22%20width%3D%221.48148%22%20height%3D%221.11111%22%20rx%3D%220.555556%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.9259%22%20width%3D%221.48148%22%20height%3D%221.11111%22%20rx%3D%220.555556%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2012.5927C7.03705%2012.5927%208.14816%2012.5927%2010.3704%2012.5927C12.5926%2012.5927%2012.963%2012.5927%2012.963%2012.5927%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", dissatisfied: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.03705%2013.7037C7.03705%2013.7037%207.77779%2011.8519%2010%2011.8519C12.2222%2011.8519%2012.963%2013.7037%2012.963%2013.7037%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.962963%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A", impatient: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%229.99999%22%20cy%3D%2210%22%20r%3D%226.88704%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.3%22%2F%3E%0A%3Crect%20x%3D%227.40741%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%2211.1111%22%20y%3D%227.40735%22%20width%3D%221.48148%22%20height%3D%221.48148%22%20rx%3D%220.740741%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M7.47573%2011.731C6.96306%2012.129%206.61613%2012.7024%206.47071%2013.2804C6.41784%2013.4905%206.50617%2013.6782%206.65942%2013.78C6.80761%2013.8785%207.00813%2013.8928%207.18477%2013.8C8.9498%2012.8724%2011.0652%2012.8704%2012.8285%2013.8002C13.005%2013.8932%2013.2052%2013.8788%2013.3533%2013.7802C13.5061%2013.6785%2013.5942%2013.4914%2013.5428%2013.2819C13.401%2012.7041%2013.0605%2012.1298%2012.5468%2011.731C11.8676%2011.2038%2010.9552%2010.9132%2010.0112%2010.9132C9.06732%2010.9132%208.15485%2011.2038%207.47573%2011.731Z%22%20fill%3D%22white%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%220.4%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, J0 = /* @__PURE__ */ JSON.parse('{"down-red":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A","right-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","up-green":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndDown-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndUp-gold":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A","down-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","right-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","up-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndDown-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A","rightAndUp-gray":"data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A"}'), z0 = { cross: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.70374%22%20y%3D%228.14795%22%20width%3D%2212.5926%22%20height%3D%223.7037%22%20rx%3D%220.740741%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", up: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M9.44533%205.81157C9.74012%205.47858%2010.2598%205.47858%2010.5546%205.81157L16.2868%2012.2867C16.71%2012.7647%2016.3706%2013.5184%2015.7322%2013.5184H4.26776C3.62933%2013.5184%203.28995%2012.7647%203.71313%2012.2867L9.44533%205.81157Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", down: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.5547%2014.1884C10.2599%2014.5214%209.74019%2014.5214%209.4454%2014.1884L3.71321%207.71335C3.29002%207.23532%203.6294%206.48161%204.26784%206.48161L15.7322%206.48161C16.3707%206.48161%2016.7101%207.23532%2016.2869%207.71335L10.5547%2014.1884Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "rhomboid-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M2.1415%2011.1984C1.8412%2010.9074%201.8412%2010.4256%202.1415%2010.1346L9.48467%203.01785C9.77196%202.73942%2010.2284%202.73942%2010.5157%203.01786L17.8586%2010.1346C18.1589%2010.4256%2018.1589%2010.9074%2017.8586%2011.1984L10.5157%2018.3151C10.2284%2018.5936%209.77196%2018.5936%209.48467%2018.3152L2.1415%2011.1984Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-greed": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-pink": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23FB9D9D%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-gray": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A", "roundness-black": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210.6664%22%20r%3D%227.03704%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A", "triangle-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_237)%22%3E%0A%3Cpath%20d%3D%22M9.32308%204.41301C9.58368%203.82623%2010.4164%203.82623%2010.677%204.413L15.9526%2016.2917C16.1701%2016.7815%2015.8115%2017.3331%2015.2756%2017.3331H4.72454C4.18858%2017.3331%203.83002%2016.7815%204.04756%2016.2917L9.32308%204.41301Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_237%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%20transform%3D%22translate(0%200.666504)%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", "indicate-greed": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "indicate-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "indicate-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222.76941%22%20y%3D%222.76941%22%20width%3D%2214.4612%22%20height%3D%2214.4612%22%20rx%3D%223%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%224.5%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, Q0 = { mistake2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.12194%206.33702C4.1805%206.47839%204.30722%206.6051%204.56066%206.85854L8.36822%2010.6661L4.56062%2014.4737C4.30718%2014.7272%204.18046%2014.8539%204.12191%2014.9952C4.04384%2015.1837%204.04384%2015.3955%204.12191%2015.584C4.18046%2015.7253%204.30718%2015.8521%204.56062%2016.1055C4.81406%2016.3589%204.94078%2016.4857%205.08214%2016.5442C5.27062%2016.6223%205.4824%2016.6223%205.67089%2016.5442C5.81225%2016.4857%205.93897%2016.3589%206.19241%2016.1055L10%2012.2979L13.8074%2016.1053C14.0609%2016.3588%2014.1876%2016.4855%2014.329%2016.544C14.5174%2016.6221%2014.7292%2016.6221%2014.9177%2016.544C15.0591%2016.4855%2015.1858%2016.3588%2015.4392%2016.1053L15.4392%2016.1053C15.6927%2015.8519%2015.8194%2015.7252%2015.8779%2015.5838C15.956%2015.3953%2015.956%2015.1835%2015.8779%2014.9951C15.8194%2014.8537%2015.6927%2014.727%2015.4392%2014.4735L15.4392%2014.4735L11.6318%2010.6661L15.4392%206.85872C15.6926%206.60528%2015.8193%206.47856%2015.8779%206.3372C15.956%206.14871%2015.956%205.93694%2015.8779%205.74845C15.8193%205.60709%2015.6926%205.48037%2015.4392%205.22693C15.1857%204.97349%2015.059%204.84677%2014.9177%204.78822C14.7292%204.71015%2014.5174%204.71015%2014.3289%204.78822C14.1876%204.84677%2014.0608%204.97349%2013.8074%205.22693L10%209.03433L6.19244%205.22676C5.939%204.97332%205.81228%204.8466%205.67092%204.78805C5.48244%204.70997%205.27066%204.70997%205.08218%204.78805C4.94082%204.8466%204.8141%204.97332%204.56066%205.22676L4.56066%205.22676C4.30722%205.4802%204.1805%205.60692%204.12194%205.74828C4.04387%205.93676%204.04387%206.14854%204.12194%206.33702Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A", warn2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8.49778%205.00963C8.48513%204.56774%208.47881%204.3468%208.56086%204.17746C8.63301%204.02856%208.75124%203.90689%208.89802%203.83052C9.06494%203.74365%209.28597%203.74365%209.72805%203.74365H10.272C10.714%203.74365%2010.9351%203.74365%2011.102%203.83052C11.2488%203.9069%2011.367%204.02856%2011.4392%204.17746C11.5212%204.3468%2011.5149%204.56775%2011.5022%205.00964L11.2644%2013.3173C11.2524%2013.737%2011.2464%2013.9468%2011.1609%2014.1065C11.0857%2014.2471%2010.9687%2014.3609%2010.826%2014.432C10.6639%2014.5129%2010.454%2014.5129%2010.0342%2014.5129H9.96582C9.54601%2014.5129%209.33611%2014.5129%209.17397%2014.432C9.0313%2014.3609%208.91426%2014.2471%208.83904%2014.1065C8.75357%2013.9468%208.74756%2013.737%208.73555%2013.3173L8.49778%205.00963Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Crect%20x%3D%228.76917%22%20y%3D%2215.2817%22%20width%3D%222.46154%22%20height%3D%222.46154%22%20rx%3D%220.769231%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", correct2: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_248)%22%3E%0A%3Cpath%20d%3D%22M15.689%205.69723C15.5476%205.75578%2015.4209%205.8825%2015.1675%206.13594L7.82436%2013.4791L4.83279%2010.4875C4.57935%2010.2341%204.45263%2010.1073%204.31127%2010.0488C4.12278%209.97071%203.91101%209.97071%203.72252%2010.0488C3.58116%2010.1073%203.45444%2010.2341%203.201%2010.4875C2.94756%2010.7409%202.82084%2010.8676%202.76229%2011.009C2.68422%2011.1975%202.68422%2011.4093%202.76229%2011.5978C2.82084%2011.7391%202.94756%2011.8658%203.201%2012.1193L7.0085%2015.9268C7.26194%2016.1802%207.38866%2016.3069%207.53002%2016.3655C7.7185%2016.4436%207.93028%2016.4436%208.11876%2016.3655C8.26013%2016.3069%208.38685%2016.1802%208.64028%2015.9268C8.66387%2015.9032%208.68636%2015.8807%208.7078%2015.8592L16.7993%207.76772C17.0527%207.51428%2017.1794%207.38756%2017.238%207.2462C17.3161%207.05772%2017.3161%206.84594%2017.238%206.65746C17.1794%206.5161%2017.0527%206.38938%2016.7993%206.13594C16.5458%205.8825%2016.4191%205.75578%2016.2777%205.69723C16.0893%205.61915%2015.8775%205.61915%2015.689%205.69723Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_248%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%20transform%3D%22translate(0%200.666504)%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A" }, e1 = { "flag-green": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A", "flag-gold": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A", "flag-red": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.4274%204.74935C14.0982%205.1012%2013.1363%205.13675%2012.3604%205.03379C11.5776%204.93009%2010.9487%204.68342%2010.2456%204.40416L10.2246%204.39527C9.53411%204.1212%208.76945%203.8175%207.81312%203.69157C6.84279%203.56268%205.71016%203.61898%204.24802%204.0049C4.09343%204.04217%203.95538%204.13393%203.85649%204.26515C3.7576%204.39636%203.70374%204.55925%203.70374%204.72712V17.3197C3.70374%2017.5162%203.79534%2017.7046%203.92654%2017.8435C4.05773%2017.9824%204.25893%2018.0605%204.44448%2018.0605C4.63002%2018.0605%204.84911%2017.9824%204.98031%2017.8435C5.11151%2017.7046%205.18522%2017.5162%205.18522%2017.3197V14.9123V12.5049C6.24649%2012.2738%206.97081%2012.2605%207.63962%2012.3486C8.42246%2012.4523%209.05139%2012.699%209.75448%2012.9782L9.77546%2012.9871C10.466%2013.2612%2011.2306%2013.5649%2012.1869%2013.6908C13.1601%2013.8197%2014.2976%2013.7627%2015.7667%2013.3738C15.8866%2013.3421%2016.0727%2013.2135%2016.1483%2013.111C16.2238%2013.0084%2016.2963%2012.8204%2016.2963%2012.6553V5.46787C16.2963%205.35535%2016.2721%205.24432%2016.2255%205.1432C16.1788%205.04208%2016.1111%204.95353%2016.0274%204.88428C15.9436%204.81502%2015.846%204.76688%2015.7421%204.7435C15.6382%204.72012%2015.494%204.73173%2015.4274%204.74935Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, t1 = { "cell-0": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-25": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%224.00098%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-50": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-75": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211%22%20y%3D%2211.001%22%20width%3D%225%22%20height%3D%225%22%20rx%3D%221%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A", "cell-100": "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%2211.251%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%224.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3Crect%20x%3D%2211.25%22%20y%3D%224.25098%22%20width%3D%224.5%22%20height%3D%224.5%22%20rx%3D%220.75%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.5%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, C = {
1298
+ feedback: H0,
1299
+ star: j0,
1300
+ progress: X0,
1301
+ signal: Y0,
1302
+ feeling: K0,
1303
+ arrow: J0,
1304
+ shape: z0,
1305
+ feedback2: Q0,
1306
+ flag: e1,
1307
+ cell: t1
1308
+ }, n1 = [
1309
+ {
1310
+ title: "sheet.cf.iconSet.direction",
1311
+ group: [
1312
+ { name: "3Arrows", list: [C.arrow["up-green"], C.arrow["right-gold"], C.arrow["down-red"]] },
1313
+ { name: "3ArrowsGray", list: [C.arrow["up-gray"], C.arrow["right-gray"], C.arrow["down-gray"]] },
1314
+ { name: "4Arrows", list: [C.arrow["up-green"], C.arrow["rightAndUp-gold"], C.arrow["rightAndDown-gold"], C.arrow["down-red"]] },
1315
+ { name: "4ArrowsGray", list: [C.arrow["up-gray"], C.arrow["rightAndUp-gray"], C.arrow["rightAndDown-gray"], C.arrow["down-gray"]] },
1316
+ { name: "5Arrows", list: [C.arrow["up-green"], C.arrow["rightAndUp-gold"], C.arrow["right-gold"], C.arrow["rightAndDown-gold"], C.arrow["down-red"]] },
1317
+ { name: "5ArrowsGray", list: [C.arrow["up-gray"], C.arrow["rightAndUp-gray"], C.arrow["right-gray"], C.arrow["rightAndDown-gray"], C.arrow["down-gray"]] },
1318
+ { name: "3Triangles", list: [C.shape.up, C.shape.cross, C.shape.down] }
1319
+ ]
1320
+ },
1321
+ {
1322
+ title: "sheet.cf.iconSet.shape",
1323
+ group: [
1324
+ {
1325
+ name: "3TrafficLights1",
1326
+ list: [C.shape["roundness-greed"], C.shape["roundness-gold"], C.shape["roundness-red"]]
1327
+ },
1328
+ {
1329
+ name: "3Signs",
1330
+ list: [C.shape["roundness-greed"], C.shape["triangle-gold"], C.shape["rhomboid-red"]]
1331
+ },
1332
+ { name: "3TrafficLights2", list: [C.shape["indicate-greed"], C.shape["indicate-gold"], C.shape["indicate-red"]] },
1333
+ {
1334
+ name: "4RedToBlack",
1335
+ list: [C.shape["roundness-red"], C.shape["roundness-pink"], C.shape["roundness-gray"], C.shape["roundness-black"]]
1336
+ },
1337
+ {
1338
+ name: "4TrafficLights",
1339
+ list: [C.shape["roundness-greed"], C.shape["roundness-gold"], C.shape["roundness-red"], C.shape["roundness-black"]]
1340
+ }
1341
+ ]
1342
+ },
1343
+ {
1344
+ title: "sheet.cf.iconSet.mark",
1345
+ group: [
1346
+ {
1347
+ name: "3Symbols",
1348
+ list: [C.feedback.correct, C.feedback.warn, C.feedback.mistake]
1349
+ },
1350
+ {
1351
+ name: "3Symbols2",
1352
+ list: [C.feedback2.correct2, C.feedback2.warn2, C.feedback2.mistake2]
1353
+ },
1354
+ {
1355
+ name: "3Flags",
1356
+ list: [C.flag["flag-green"], C.flag["flag-gold"], C.flag["flag-red"]]
1357
+ }
1358
+ ]
1359
+ },
1360
+ {
1361
+ title: "sheet.cf.iconSet.rank",
1362
+ group: [
1363
+ {
1364
+ name: "4Rating",
1365
+ list: [C.signal.signal25, C.signal.signal50, C.signal.signal75, C.signal.signal100]
1366
+ },
1367
+ {
1368
+ name: "5Rating",
1369
+ list: [C.signal.signal0, C.signal.signal25, C.signal.signal50, C.signal.signal75, C.signal.signal100]
1370
+ },
1371
+ {
1372
+ name: "5Quarters",
1373
+ list: [C.progress.progress100, C.progress.progress75, C.progress.progress50, C.progress.progress25, C.progress.progress0]
1374
+ },
1375
+ {
1376
+ name: "_5Felling",
1377
+ list: [C.feeling.guffaw, C.feeling.smile, C.feeling.noninductive, C.feeling.dissatisfied, C.feeling.impatient]
1378
+ },
1379
+ {
1380
+ name: "5Boxes",
1381
+ list: [C.cell["cell-100"], C.cell["cell-75"], C.cell["cell-50"], C.cell["cell-25"], C.cell["cell-0"]]
1382
+ },
1383
+ {
1384
+ name: "3Stars",
1385
+ list: [C.star.starFull, C.star.starIncomplete, C.star.starEmpty]
1386
+ }
1387
+ ]
1388
+ }
1389
+ ], D2 = n1.reduce((s, r) => {
1390
+ const { group: t } = r;
1391
+ for (const e of t)
1392
+ s[e.name] = e.list;
1393
+ return s;
1394
+ }, {});
1395
+ for (const s in D2) {
1396
+ const r = D2[s];
1397
+ Object.freeze(r);
1398
+ }
1399
+ const r1 = "EMPTY_ICON_TYPE", s2 = {
1400
+ type: U.MUTATION,
1401
+ id: "sheet.mutation.move-conditional-rule",
1402
+ handler(s, r) {
1403
+ if (!r)
1404
+ return !1;
1405
+ const { unitId: t, subUnitId: e, start: n, end: i } = r;
1406
+ return s.get(y).moveRulePriority(t, e, n, i), !0;
1407
+ }
1408
+ }, s1 = (s) => {
1409
+ const { unitId: r, subUnitId: t } = s, e = _0(s.start, s.end);
1410
+ if (!e)
1411
+ return [];
1412
+ const [n, i] = e;
1413
+ return [
1414
+ { id: s2.id, params: { unitId: r, subUnitId: t, start: n, end: i } }
1415
+ ];
1416
+ }, w2 = (s, r) => {
1417
+ const t = s.get(y), { unitId: e, subUnitId: n, cfId: i } = r, a = [...t.getSubunitRules(e, n) || []], u = a.findIndex((o) => o.cfId === i), l = a[u - 1];
1418
+ if (u > -1) {
1419
+ const o = a[u], d = [{
1420
+ id: f2.id,
1421
+ params: { unitId: e, subUnitId: n, rule: $.deepClone(o) }
1422
+ }];
1423
+ if (a.splice(u, 1), u !== 0) {
1424
+ const c = a[0];
1425
+ if (c) {
1426
+ const h = W2({ id: c.cfId, type: "before" }, { id: l.cfId, type: "after" }, a, (F) => F.cfId);
1427
+ if (!h)
1428
+ return d;
1429
+ const [g, D] = h, f = {
1430
+ unitId: e,
1431
+ subUnitId: n,
1432
+ start: g,
1433
+ end: D
1434
+ };
1435
+ d.push({ id: s2.id, params: f });
1436
+ }
1437
+ }
1438
+ return d;
1439
+ }
1440
+ return [];
1441
+ }, X = {
1442
+ type: U.MUTATION,
1443
+ id: "sheet.mutation.delete-conditional-rule",
1444
+ handler(s, r) {
1445
+ if (!r)
1446
+ return !1;
1447
+ const { unitId: t, subUnitId: e, cfId: n } = r;
1448
+ return s.get(y).deleteRule(t, e, n), !0;
1449
+ }
1450
+ }, i1 = (s, r) => ({ id: X.id, params: { unitId: r.unitId, subUnitId: r.subUnitId, cfId: r.rule.cfId } }), f2 = {
1451
+ type: U.MUTATION,
1452
+ id: "sheet.mutation.add-conditional-rule",
1453
+ handler(s, r) {
1454
+ if (!r)
1455
+ return !1;
1456
+ const { unitId: t, subUnitId: e, rule: n } = r;
1457
+ return s.get(y).addRule(t, e, n), !0;
1458
+ }
1459
+ }, a1 = {
1460
+ type: U.COMMAND,
1461
+ id: "sheet.command.add-conditional-rule",
1462
+ handler(s, r) {
1463
+ if (!r)
1464
+ return !1;
1465
+ const { rule: t } = r, e = s.get(Q), n = s.get(P), i = s.get(y), a = s.get(q), u = e2(a, r);
1466
+ if (!u) return !1;
1467
+ const { unitId: l, subUnitId: o } = u, d = i.createCfId(l, o), c = { unitId: l, subUnitId: o, rule: { ...t, cfId: t.cfId || d } }, h = i1(s, c), g = n.syncExecuteCommand(f2.id, c);
1468
+ return g && e.pushUndoRedo({
1469
+ unitID: l,
1470
+ redoMutations: [{ id: f2.id, params: c }],
1471
+ undoMutations: [h]
1472
+ }), g;
1473
+ }
1474
+ }, i2 = {
1475
+ type: U.MUTATION,
1476
+ id: "sheet.mutation.set-conditional-rule",
1477
+ handler(s, r) {
1478
+ if (!r)
1479
+ return !1;
1480
+ const { unitId: t, subUnitId: e, rule: n } = r, i = r.cfId || r.rule.cfId;
1481
+ return s.get(y).setRule(t, e, n, i), !0;
1482
+ }
1483
+ }, q2 = (s, r) => {
1484
+ const t = s.get(y), { unitId: e, subUnitId: n } = r, i = r.cfId || r.rule.cfId, a = t.getRule(e, n, i);
1485
+ return a ? [{
1486
+ id: i2.id,
1487
+ params: {
1488
+ unitId: e,
1489
+ subUnitId: n,
1490
+ cfId: i,
1491
+ rule: $.deepClone(a)
1492
+ }
1493
+ }] : [];
1494
+ }, l1 = {
1495
+ type: U.COMMAND,
1496
+ id: "sheet.command.clear-range-conditional-rule",
1497
+ handler(s, r) {
1498
+ var f;
1499
+ if (!r)
1500
+ return !1;
1501
+ const t = s.get(y), e = s.get(q), n = s.get(P), i = s.get(Q), a = s.get(u0), u = e2(e, r);
1502
+ if (!u) return !1;
1503
+ const { unitId: l, subUnitId: o } = u, d = ((f = a.getCurrentSelections()) == null ? void 0 : f.map((F) => F.range)) || [], c = t.getSubunitRules(l, o);
1504
+ if (!(c != null && c.length) || !d.length)
1505
+ return !1;
1506
+ const h = [], g = [];
1507
+ c.forEach((F) => {
1508
+ const E = new O();
1509
+ F.ranges.forEach((p) => {
1510
+ N.foreach(p, (A, T) => {
1511
+ E.setValue(A, T, 1);
1512
+ });
1513
+ }), d.forEach((p) => {
1514
+ N.foreach(p, (A, T) => {
1515
+ E.realDeleteValue(A, T);
1516
+ });
1517
+ });
1518
+ const I = d0(h0(E));
1519
+ if (I.length) {
1520
+ const p = { ...F, ranges: I }, A = { unitId: l, subUnitId: o, rule: p }, T = q2(s, A);
1521
+ h.push({ id: i2.id, params: A }), g.push(...T);
1522
+ } else {
1523
+ const p = { unitId: l, subUnitId: o, cfId: F.cfId }, A = w2(s, p);
1524
+ h.push({ id: X.id, params: p }), g.push(...A);
1525
+ }
1526
+ });
1527
+ const D = V2(h, n).result;
1528
+ return D && i.pushUndoRedo({
1529
+ unitID: l,
1530
+ redoMutations: h,
1531
+ undoMutations: g
1532
+ }), D;
1533
+ }
1534
+ }, o1 = {
1535
+ type: U.COMMAND,
1536
+ id: "sheet.command.clear-worksheet-conditional-rule",
1537
+ handler(s, r) {
1538
+ const t = s.get(y), e = s.get(q), n = s.get(P), i = s.get(Q), a = e2(e, r);
1539
+ if (!a) return !1;
1540
+ const { unitId: u, subUnitId: l } = a, o = t.getSubunitRules(u, l);
1541
+ if (!(o != null && o.length))
1542
+ return !1;
1543
+ const d = o.map((D) => ({ cfId: D.cfId, unitId: u, subUnitId: l })), c = d.map((D) => ({ id: X.id, params: D })), h = d.map((D) => w2(s, D)[0]), g = V2(c, n).result;
1544
+ return g && i.pushUndoRedo({
1545
+ unitID: u,
1546
+ redoMutations: c,
1547
+ undoMutations: h
1548
+ }), g;
1549
+ }
1550
+ }, c1 = {
1551
+ type: U.COMMAND,
1552
+ id: "sheet.command.delete-conditional-rule",
1553
+ handler(s, r) {
1554
+ if (!r)
1555
+ return !1;
1556
+ const t = s.get(Q), e = s.get(P), n = s.get(q), i = e2(n, r);
1557
+ if (!i) return !1;
1558
+ const { unitId: a, subUnitId: u } = i, l = { unitId: a, subUnitId: u, cfId: r.cfId }, o = w2(s, l), d = e.syncExecuteCommand(X.id, l);
1559
+ return d && t.pushUndoRedo({ unitID: a, undoMutations: o, redoMutations: [{ id: X.id, params: l }] }), d;
1560
+ }
1561
+ }, u1 = {
1562
+ type: U.COMMAND,
1563
+ id: "sheet.command.move-conditional-rule",
1564
+ handler(s, r) {
1565
+ if (!r)
1566
+ return !1;
1567
+ const t = s.get(Q), e = s.get(P), n = s.get(q), i = s.get(y), a = e2(n, r);
1568
+ if (!a) return !1;
1569
+ const { unitId: u, subUnitId: l } = a, o = W2(r.start, r.end, i.getSubunitRules(u, l) || [], (f) => f.cfId);
1570
+ if (!o)
1571
+ return !1;
1572
+ const [d, c] = o, h = { unitId: u, subUnitId: l, start: d, end: c }, g = s1(h), D = e.syncExecuteCommand(s2.id, h);
1573
+ return D && t.pushUndoRedo({
1574
+ unitID: u,
1575
+ redoMutations: [{ id: s2.id, params: h }],
1576
+ undoMutations: g
1577
+ }), D;
1578
+ }
1579
+ }, d1 = {
1580
+ type: U.COMMAND,
1581
+ id: "sheet.command.set-conditional-rule",
1582
+ handler(s, r) {
1583
+ if (!r)
1584
+ return !1;
1585
+ const t = s.get(Q), e = s.get(P), n = s.get(q), i = e2(n, r);
1586
+ if (!i) return !1;
1587
+ const { unitId: a, subUnitId: u } = i, l = { unitId: a, subUnitId: u, rule: r.rule, cfId: r.cfId }, o = q2(s, l), d = e.syncExecuteCommand(i2.id, l);
1588
+ return d && t.pushUndoRedo({ unitID: a, undoMutations: o, redoMutations: [{ id: i2.id, params: l }] }), d;
1589
+ }
1590
+ }, h1 = "ssheets-conditional-formatting.config", k2 = {};
1591
+ var g1 = Object.getOwnPropertyDescriptor, C1 = (s, r, t, e) => {
1592
+ for (var n = e > 1 ? void 0 : e ? g1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1593
+ (a = s[i]) && (n = a(n) || n);
1594
+ return n;
1595
+ }, K = (s, r) => (t, e) => r(t, e, s);
1596
+ let r2 = class extends _2 {
1597
+ constructor(s, r, t, e, n, i) {
1598
+ super(), this._conditionalFormattingRuleModel = s, this._injector = r, this._univerInstanceService = t, this._resourceManagerService = e, this._sheetInterceptorService = n, this._commandService = i, this._initCellChange(), this._initSnapshot(), this._initSheetChange();
1599
+ }
1600
+ get _conditionalFormattingViewModelV2() {
1601
+ return this._injector.get(z);
1602
+ }
1603
+ composeStyle(s, r, t, e) {
1604
+ const n = this._conditionalFormattingViewModelV2.getCellCfs(s, r, t, e);
1605
+ if (n && (n != null && n.length)) {
1606
+ const i = n.map((l) => this._conditionalFormattingRuleModel.getRule(s, r, l.cfId)).filter((l) => !!l).reverse(), a = i.findIndex((l) => l == null ? void 0 : l.stopIfTrue);
1607
+ return a > -1 && i.splice(a + 1), i.reduce((l, o) => {
1608
+ var h;
1609
+ const d = o.rule.type, c = n.find((g) => g.cfId === o.cfId);
1610
+ if (d === S.highlightCell)
1611
+ c.result && $.deepMerge(l, { style: c.result });
1612
+ else if (d === S.colorScale) {
1613
+ const g = c == null ? void 0 : c.result;
1614
+ g && typeof g == "string" && (l.style = { ...(h = l.style) != null ? h : {}, bg: { rgb: g } });
1615
+ } else if (d === S.dataBar) {
1616
+ const g = c == null ? void 0 : c.result;
1617
+ g && (l.dataBar = g, l.isShowValue = g.isShowValue);
1618
+ } else if (d === S.iconSet) {
1619
+ const g = c == null ? void 0 : c.result;
1620
+ g && (l.iconSet = g, l.isShowValue = g.isShowValue);
1621
+ }
1622
+ return l;
1623
+ }, {});
1624
+ }
1625
+ return null;
1626
+ }
1627
+ _initSnapshot() {
1628
+ const s = (t) => {
1629
+ const e = this._conditionalFormattingRuleModel.getUnitRules(t), n = {};
1630
+ return e ? (e.forEach((i, a) => {
1631
+ n[a] = i;
1632
+ }), JSON.stringify(n)) : "";
1633
+ }, r = (t) => {
1634
+ if (!t)
1635
+ return {};
1636
+ try {
1637
+ return JSON.parse(t);
1638
+ } catch {
1639
+ return {};
1640
+ }
1641
+ };
1642
+ this.disposeWithMe(
1643
+ this._resourceManagerService.registerPluginResource({
1644
+ pluginName: P2,
1645
+ businesses: [m2.UNIVER_SHEET],
1646
+ toJson: (t) => s(t),
1647
+ parseJson: (t) => r(t),
1648
+ onUnLoad: (t) => {
1649
+ this._conditionalFormattingRuleModel.deleteUnitId(t);
1650
+ },
1651
+ onLoad: (t, e) => {
1652
+ Object.keys(e).forEach((n) => {
1653
+ [...e[n]].reverse().forEach((a) => {
1654
+ this._conditionalFormattingRuleModel.addRule(t, n, a);
1655
+ });
1656
+ });
1657
+ }
1658
+ })
1659
+ );
1660
+ }
1661
+ _initSheetChange() {
1662
+ this.disposeWithMe(
1663
+ this._sheetInterceptorService.interceptCommand({
1664
+ getMutations: (s) => {
1665
+ if (s.id === C0.id) {
1666
+ const r = s.params, t = r.unitId || D1(this._univerInstanceService), e = r.subUnitId || f1(this._univerInstanceService);
1667
+ if (!e)
1668
+ return { redos: [], undos: [] };
1669
+ const n = this._conditionalFormattingRuleModel.getSubunitRules(t, e);
1670
+ if (!n)
1671
+ return { redos: [], undos: [] };
1672
+ const i = [], a = [];
1673
+ return n.forEach((u) => {
1674
+ const l = {
1675
+ unitId: t,
1676
+ subUnitId: e,
1677
+ cfId: u.cfId
1678
+ };
1679
+ i.push({
1680
+ id: X.id,
1681
+ params: l
1682
+ }), a.push(...w2(this._injector, l));
1683
+ }), {
1684
+ redos: i,
1685
+ undos: a
1686
+ };
1687
+ }
1688
+ return { redos: [], undos: [] };
1689
+ }
1690
+ })
1691
+ );
1692
+ }
1693
+ // eslint-disable-next-line max-lines-per-function
1694
+ _initCellChange() {
1695
+ this.disposeWithMe(
1696
+ // eslint-disable-next-line max-lines-per-function
1697
+ this._commandService.onCommandExecuted((s) => {
1698
+ const r = (t, e, n) => {
1699
+ const i = /* @__PURE__ */ new Set();
1700
+ return n.forEach(([a, u]) => {
1701
+ const l = this._conditionalFormattingViewModelV2.getCellCfs(t, e, a, u);
1702
+ l == null || l.forEach((o) => i.add(o.cfId));
1703
+ }), [...i].map((a) => this._conditionalFormattingRuleModel.getRule(t, e, a)).filter((a) => !!a);
1704
+ };
1705
+ switch (s.id) {
1706
+ case A0.id: {
1707
+ const t = s.params, { subUnitId: e, unitId: n, cellValue: i } = t, a = [];
1708
+ new O(i).forValue((l, o, d) => {
1709
+ d && Object.keys(d).some((h) => ["p", "v"].includes(h)) && a.push([l, o]);
1710
+ }), r(n, e, a).forEach((l) => {
1711
+ this._conditionalFormattingViewModelV2.markRuleDirty(n, e, l.cfId);
1712
+ });
1713
+ break;
1714
+ }
1715
+ case p0.id:
1716
+ case E0.id: {
1717
+ const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n), a = { ...t, endColumn: Number.MAX_SAFE_INTEGER };
1718
+ i && i.filter((l) => l.ranges.some((o) => t2.intersects(o, a))).forEach((l) => {
1719
+ this._conditionalFormattingViewModelV2.markRuleDirty(e, n, l.cfId);
1720
+ });
1721
+ break;
1722
+ }
1723
+ case v0.id:
1724
+ case w0.id: {
1725
+ const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n), a = { ...t, endRow: Number.MAX_SAFE_INTEGER };
1726
+ i && i.filter((l) => l.ranges.some((o) => t2.intersects(o, a))).forEach((l) => {
1727
+ this._conditionalFormattingViewModelV2.markRuleDirty(e, n, l.cfId);
1728
+ });
1729
+ break;
1730
+ }
1731
+ case F0.id: {
1732
+ const { sourceRange: t, targetRange: e, unitId: n, subUnitId: i } = s.params, a = this._conditionalFormattingRuleModel.getSubunitRules(n, i), u = {
1733
+ startRow: Math.min(t.startRow, e.startRow),
1734
+ endRow: Number.MAX_SAFE_INTEGER,
1735
+ startColumn: 0,
1736
+ endColumn: Number.MAX_SAFE_INTEGER
1737
+ };
1738
+ a && a.filter((o) => o.ranges.some((d) => t2.intersects(d, u))).forEach((o) => {
1739
+ this._conditionalFormattingViewModelV2.markRuleDirty(n, i, o.cfId);
1740
+ });
1741
+ break;
1742
+ }
1743
+ case m0.id: {
1744
+ const { sourceRange: t, targetRange: e, unitId: n, subUnitId: i } = s.params, a = this._conditionalFormattingRuleModel.getSubunitRules(n, i), u = {
1745
+ startRow: 0,
1746
+ endRow: Number.MAX_SAFE_INTEGER,
1747
+ startColumn: Math.min(t.startColumn, e.startColumn),
1748
+ endColumn: Number.MAX_SAFE_INTEGER
1749
+ };
1750
+ a && a.filter((o) => o.ranges.some((d) => t2.intersects(d, u))).forEach((o) => {
1751
+ this._conditionalFormattingViewModelV2.markRuleDirty(n, i, o.cfId);
1752
+ });
1753
+ break;
1754
+ }
1755
+ case f0.id: {
1756
+ const { unitId: t, to: e, from: n } = s.params, i = (a) => {
1757
+ const u = [];
1758
+ new O(a.value).forValue((o, d) => {
1759
+ u.push([o, d]);
1760
+ }), r(t, a.subUnitId, u).forEach((o) => {
1761
+ this._conditionalFormattingViewModelV2.markRuleDirty(t, a.subUnitId, o.cfId);
1762
+ });
1763
+ };
1764
+ i(e), i(n);
1765
+ break;
1766
+ }
1767
+ case D0.id: {
1768
+ const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n);
1769
+ i && i.filter((u) => u.ranges.some((l) => t2.intersects(l, t))).forEach((u) => {
1770
+ this._conditionalFormattingViewModelV2.markRuleDirty(e, n, u.cfId);
1771
+ });
1772
+ break;
1773
+ }
1774
+ }
1775
+ })
1776
+ );
1777
+ }
1778
+ };
1779
+ r2 = C1([
1780
+ K(0, _(y)),
1781
+ K(1, _(M2)),
1782
+ K(2, _(q)),
1783
+ K(3, _(X2)),
1784
+ K(4, _(g0)),
1785
+ K(5, _(P))
1786
+ ], r2);
1787
+ const D1 = (s) => s.getCurrentUnitForType(m2.UNIVER_SHEET).getUnitId(), f1 = (s) => {
1788
+ var r;
1789
+ return (r = s.getCurrentUnitForType(m2.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : r.getSheetId();
1790
+ };
1791
+ var m1 = Object.getOwnPropertyDescriptor, F1 = (s, r, t, e) => {
1792
+ for (var n = e > 1 ? void 0 : e ? m1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1793
+ (a = s[i]) && (n = a(n) || n);
1794
+ return n;
1795
+ }, x2 = (s, r) => (t, e) => r(t, e, s), u2;
1796
+ let B2 = (u2 = class extends Y2 {
1797
+ constructor(s = k2, r, t, e) {
1798
+ super(), this._config = s, this._injector = r, this._commandService = t, this._configService = e;
1799
+ const { ...n } = K2(
1800
+ {},
1801
+ k2,
1802
+ this._config
1803
+ );
1804
+ this._configService.setConfig(h1, n), [
1805
+ [r2],
1806
+ [J],
1807
+ [y],
1808
+ [z]
1809
+ ].forEach((i) => {
1810
+ this._injector.add(i);
1811
+ }), [
1812
+ a1,
1813
+ l1,
1814
+ o1,
1815
+ c1,
1816
+ u1,
1817
+ d1,
1818
+ f2,
1819
+ X,
1820
+ i2,
1821
+ s2,
1822
+ d2
1823
+ ].forEach((i) => {
1824
+ this._commandService.registerCommand(i);
1825
+ });
1826
+ }
1827
+ onStarting() {
1828
+ this._injector.get(r2), J2(this._injector, [[r2], [z]]);
1829
+ }
1830
+ }, m(u2, "pluginName", P2), m(u2, "type", m2.UNIVER_SHEET), u2);
1831
+ B2 = F1([
1832
+ x2(1, _(M2)),
1833
+ x2(2, _(P)),
1834
+ x2(3, z2)
1835
+ ], B2);
1836
+ const w1 = "sheet-conditional-rule-icon", v1 = 35, E1 = 15, p1 = 2;
1837
+ class A1 extends $2 {
1838
+ constructor() {
1839
+ super();
1840
+ m(this, "_paddingRightAndLeft", p1);
1841
+ m(this, "_width", E1);
1842
+ m(this, "_imageMap", /* @__PURE__ */ new Map());
1843
+ m(this, "uKey", w1);
1844
+ m(this, "Z_INDEX", v1);
1845
+ m(this, "_radius", 1);
1846
+ this._init();
1847
+ }
1848
+ draw(t, e, n, i) {
1849
+ const { worksheet: a } = n;
1850
+ if (!a)
1851
+ return !1;
1852
+ t.save(), N.foreach(n.rowColumnSegment, (u, l) => {
1853
+ if (!a.getRowVisible(u) || !a.getColVisible(l))
1854
+ return;
1855
+ const o = a.getCell(u, l);
1856
+ if (o != null && o.iconSet) {
1857
+ const { iconType: d, iconId: c } = o.iconSet;
1858
+ if (d === r1)
1859
+ return;
1860
+ const h = this._imageMap.get(this._createKey(d, c));
1861
+ if (!h)
1862
+ return;
1863
+ const g = n.getCellWithCoordByIndex(u, l, !1);
1864
+ let { isMerged: D, isMergedMainCell: f, mergeInfo: F, startY: E, endY: I, startX: p, endX: A } = g;
1865
+ if (D || (f && (E = F.startY, I = F.endY, p = F.startX, A = F.endX), !this.isRenderDiffRangesByCell(F, i)))
1866
+ return;
1867
+ const T = A - p, a2 = I - E;
1868
+ if (this._width > a2 || this._width > T + this._paddingRightAndLeft * 2)
1869
+ return;
1870
+ const v2 = (a2 - this._width) / 2 + E;
1871
+ t.drawImage(h, p + this._paddingRightAndLeft, v2, this._width, this._width);
1872
+ }
1873
+ }), t.restore();
1874
+ }
1875
+ _init() {
1876
+ for (const t in D2)
1877
+ D2[t].forEach((n, i) => {
1878
+ const a = this._createKey(t, String(i)), u = new Image();
1879
+ u.onload = () => {
1880
+ this._imageMap.set(a, u);
1881
+ }, u.src = n;
1882
+ });
1883
+ }
1884
+ _createKey(t, e) {
1885
+ return `${t}_${e}`;
1886
+ }
1887
+ }
1888
+ O2.add(A1);
1889
+ function x1(s) {
1890
+ if (typeof s != "object" || s === null)
1891
+ return s;
1892
+ const r = {};
1893
+ for (const t in s)
1894
+ if (s.hasOwnProperty(t)) {
1895
+ const e = x1(s[t]);
1896
+ e !== void 0 && (r[t] = e);
1897
+ }
1898
+ return r;
1899
+ }
1900
+ export {
1901
+ a1 as AddCfCommand,
1902
+ f2 as AddConditionalRuleMutation,
1903
+ i1 as AddConditionalRuleMutationUndoFactory,
1904
+ w as CFNumberOperator,
1905
+ S as CFRuleType,
1906
+ x as CFSubRuleType,
1907
+ b as CFTextOperator,
1908
+ L as CFTimePeriodOperator,
1909
+ R as CFValueType,
1910
+ A2 as CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,
1911
+ l1 as ClearRangeCfCommand,
1912
+ o1 as ClearWorksheetCfCommand,
1913
+ d2 as ConditionalFormattingFormulaMarkDirty,
1914
+ J as ConditionalFormattingFormulaService,
1915
+ A1 as ConditionalFormattingIcon,
1916
+ y as ConditionalFormattingRuleModel,
1917
+ r2 as ConditionalFormattingService,
1918
+ z as ConditionalFormattingViewModel,
1919
+ L1 as DEFAULT_BG_COLOR,
1920
+ k1 as DEFAULT_FONT_COLOR,
1921
+ p1 as DEFAULT_PADDING,
1922
+ E1 as DEFAULT_WIDTH,
1923
+ V0 as DataBar,
1924
+ c1 as DeleteCfCommand,
1925
+ X as DeleteConditionalRuleMutation,
1926
+ w2 as DeleteConditionalRuleMutationUndoFactory,
1927
+ r1 as EMPTY_ICON_TYPE,
1928
+ B as FormulaResultStatus,
1929
+ w1 as IconUKey,
1930
+ u1 as MoveCfCommand,
1931
+ s2 as MoveConditionalRuleMutation,
1932
+ s1 as MoveConditionalRuleMutationUndoFactory,
1933
+ P2 as SHEET_CONDITIONAL_FORMATTING_PLUGIN,
1934
+ d1 as SetCfCommand,
1935
+ i2 as SetConditionalRuleMutation,
1936
+ B2 as UniverSheetsConditionalFormattingPlugin,
1937
+ _0 as anchorUndoFactory,
1938
+ n2 as compareWithNumber,
1939
+ M0 as createCfId,
1940
+ B1 as createDefaultRule,
1941
+ N1 as createDefaultValue,
1942
+ U1 as createDefaultValueByValueType,
1943
+ N0 as dataBarUKey,
1944
+ L2 as defaultDataBarNativeColor,
1945
+ b2 as defaultDataBarPositiveColor,
1946
+ U0 as defaultPlaceholderColor,
1947
+ y2 as filterRange,
1948
+ j as findIndexByAnchor,
1949
+ V1 as getCacheStyleMatrix,
1950
+ W as getCellValue,
1951
+ k0 as getColorScaleFromValue,
1952
+ O1 as getMaxInFormulaResult,
1953
+ L0 as getOppositeOperator,
1954
+ C2 as getValueByType,
1955
+ n1 as iconGroup,
1956
+ D2 as iconMap,
1957
+ T1 as isAnchorEqual,
1958
+ g2 as isFloatsEqual,
1959
+ k as isNullable,
1960
+ W1 as isRangesEqual,
1961
+ x0 as moveByAnchor,
1962
+ x1 as removeUndefinedAttr,
1963
+ b0 as serialTimeToTimestamp,
1964
+ q2 as setConditionalRuleMutationUndoFactory,
1965
+ S0 as toYMD_1900,
1966
+ W2 as transformSupportSymmetryAnchor
1967
+ };