@univerjs/sheets-conditional-formatting 0.17.0 → 0.18.0

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 (48) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/es/facade.js +1 -1909
  4. package/lib/es/index.js +1 -1999
  5. package/lib/facade.js +1 -1909
  6. package/lib/index.js +1 -1999
  7. package/lib/types/assets/icon-map.d.ts +79 -0
  8. package/lib/types/base/const.d.ts +16 -1
  9. package/lib/types/commands/commands/add-cf.command.d.ts +18 -3
  10. package/lib/types/commands/commands/clear-range-cf.command.d.ts +16 -1
  11. package/lib/types/commands/commands/clear-worksheet-cf.command.d.ts +16 -1
  12. package/lib/types/commands/commands/delete-cf.command.d.ts +16 -1
  13. package/lib/types/commands/commands/move-cf.command.d.ts +17 -2
  14. package/lib/types/commands/commands/set-cf.command.d.ts +17 -2
  15. package/lib/types/commands/mutations/add-conditional-rule.mutation.d.ts +18 -3
  16. package/lib/types/commands/mutations/delete-conditional-rule.mutation.d.ts +16 -1
  17. package/lib/types/commands/mutations/formula-mark-dirty.mutation.d.ts +16 -1
  18. package/lib/types/commands/mutations/move-conditional-rule.mutation.d.ts +17 -2
  19. package/lib/types/commands/mutations/set-conditional-rule.mutation.d.ts +17 -2
  20. package/lib/types/facade/f-conditional-formatting-builder.d.ts +18 -2
  21. package/lib/types/facade/f-enum.d.ts +15 -0
  22. package/lib/types/facade/f-range.d.ts +16 -1
  23. package/lib/types/facade/f-worksheet.d.ts +16 -1
  24. package/lib/types/models/calculate-unit-v2/__test__/test.util.d.ts +24 -8
  25. package/lib/types/models/calculate-unit-v2/base-calculate-unit.d.ts +18 -3
  26. package/lib/types/models/calculate-unit-v2/color-scale-calculate-unit.d.ts +17 -1
  27. package/lib/types/models/calculate-unit-v2/data-bar-calculate-unit.d.ts +17 -1
  28. package/lib/types/models/calculate-unit-v2/highlight-cell-calculate-unit.d.ts +19 -3
  29. package/lib/types/models/calculate-unit-v2/icon-set-calculate-unit.d.ts +19 -3
  30. package/lib/types/models/calculate-unit-v2/utils.d.ts +19 -3
  31. package/lib/types/models/conditional-formatting-rule-model.d.ts +21 -6
  32. package/lib/types/models/conditional-formatting-view-model.d.ts +16 -1
  33. package/lib/types/models/type.d.ts +18 -3
  34. package/lib/types/plugin.d.ts +16 -1
  35. package/lib/types/render/data-bar.render.d.ts +18 -2
  36. package/lib/types/render/icon.render.d.ts +18 -2
  37. package/lib/types/render/type.d.ts +17 -2
  38. package/lib/types/services/conditional-formatting-formula.service.d.ts +18 -2
  39. package/lib/types/services/conditional-formatting.service.d.ts +17 -2
  40. package/lib/umd/facade.js +1 -1
  41. package/lib/umd/index.js +1 -1
  42. package/package.json +10 -9
  43. package/lib/types/assets/icon-map.json.d.ts +0 -82
  44. package/lib/types/models/calculate-unit-v2/__test__/base-calculate.spec.d.ts +0 -16
  45. package/lib/types/models/calculate-unit-v2/__test__/calculate.color.spec.d.ts +0 -16
  46. package/lib/types/models/calculate-unit-v2/__test__/calculate.databar.spec.d.ts +0 -16
  47. package/lib/types/models/calculate-unit-v2/__test__/calculate.highlight.spec.d.ts +0 -16
  48. package/lib/types/utils/__test__/anchor.spec.d.ts +0 -16
package/lib/es/index.js CHANGED
@@ -1,1999 +1 @@
1
- var j2 = Object.defineProperty;
2
- var K2 = (s, r, t) => r in s ? j2(s, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[r] = t;
3
- var m = (s, r, t) => K2(s, typeof r != "symbol" ? r + "" : r, t);
4
- import { generateRandomId as Y2, Tools as z, CommandType as $, IUndoRedoService as n2, ICommandService as q, IUniverInstanceService as Z, ObjectMatrix as O, Range as U, sequenceExecute as B2, Inject as b, Disposable as _2, RefAlias as X2, CellValueType as y, BooleanNumber as N2, LRUMap as T2, ColorKit as U2, dayjs as v, Injector as y2, RTree as J2, IResourceManagerService as z2, merge as V2, UniverInstanceType as O2, isInternalEditorID as Q2, Rectangle as r2, DependentOn as e0, IConfigService as t0, Plugin as n0, touchDependencies as r0 } from "@univerjs/core";
5
- import { isRangesEqual as Y1 } from "@univerjs/core";
6
- import { getSheetCommandTarget as k, SheetsSelectionsService as s0, findAllRectangle as i0, createTopMatrixFromMatrix as a0, SheetInterceptorService as l0, RemoveSheetCommand as o0, CopySheetCommand as u0, ReorderRangeMutation as c0, MoveRangeMutation as d0, MoveColsMutation as h0, MoveRowsMutation as g0, InsertRowMutation as C0, RemoveRowMutation as f0, RemoveColMutation as D0, InsertColMutation as m0, SetRangeValuesMutation as w0 } from "@univerjs/sheets";
7
- import { Subject as h2, BehaviorSubject as F0 } from "rxjs";
8
- import { RegisterOtherFormulaService as v0, FormulaResultStatus as p, OtherFormulaBizType as p0, ERROR_TYPE_SET as R2, BooleanValue as I2, UniverFormulaEnginePlugin as E0 } from "@univerjs/engine-formula";
9
- import { distinctUntilChanged as A0, bufferTime as x0, filter as _0, map as y0 } from "rxjs/operators";
10
- import { isObject as M0, SpreadsheetExtensionRegistry as $2, SheetExtension as P2, FIX_ONE_PIXEL_BLUR_OFFSET as R0 } from "@univerjs/engine-render";
11
- const W2 = "SHEET_CONDITIONAL_FORMATTING_PLUGIN";
12
- var N = /* @__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))(N || {}), T = /* @__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))(T || {}), F = /* @__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))(F || {}), M = /* @__PURE__ */ ((s) => (s.highlightCell = "highlightCell", s.dataBar = "dataBar", s.colorScale = "colorScale", s.iconSet = "iconSet", s))(M || {}), 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 || {}), L = /* @__PURE__ */ ((s) => (s.num = "num", s.min = "min", s.max = "max", s.percent = "percent", s.percentile = "percentile", s.formula = "formula", s))(L || {});
13
- const O1 = "#fff", $1 = "#000000", P1 = () => ({
14
- cfId: void 0,
15
- ranges: [],
16
- stopIfTrue: !1,
17
- rule: {
18
- type: "highlightCell",
19
- subType: "text",
20
- operator: "containsText"
21
- /* containsText */
22
- }
23
- }), W1 = (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
- }, q1 = (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
- }, Y = (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
- }, I0 = (s, r, t, e) => {
74
- if (!t)
75
- return null;
76
- const n = Y(s, t, e);
77
- let i = Y(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 = Y(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
- }, q2 = (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 = Y(n, t, e);
98
- if (a === null)
99
- return null;
100
- if (a - 1 < 0) {
101
- const c = t[a + 1];
102
- if (c)
103
- n.id = e(c), n.type = "before";
104
- else
105
- return null;
106
- } else {
107
- const c = e(t[a - 1]);
108
- n.id = c, n.type = "after";
109
- }
110
- }
111
- if (!["after", "before"].includes(i.type)) {
112
- const a = Y(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 c = e(t[a - 1]);
119
- i.id = c, i.type = "after";
120
- } else if (a + 1 <= t.length - 1) {
121
- const c = e(t[a + 1]);
122
- i.id = c, i.type = "before";
123
- } else
124
- return null;
125
- }
126
- return n.id === i.id && n.type === i.type ? null : [n, i];
127
- }, S0 = (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
- }, Z1 = (s, r) => s.id === r.id && s.type === r.type, b0 = () => `${Y2(8)}`;
136
- class R {
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
- getAll() {
164
- return this._model;
165
- }
166
- deleteRule(r, t, e) {
167
- const n = this.getSubunitRules(r, t);
168
- if (n) {
169
- const i = n.findIndex((c) => c.cfId === e), a = n[i];
170
- a && (n.splice(i, 1), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "delete" }));
171
- }
172
- }
173
- setRule(r, t, e, n) {
174
- const a = this._ensureList(r, t).find((c) => c.cfId === n);
175
- if (a) {
176
- const c = z.deepClone(a);
177
- Object.assign(a, e), this._ruleChange$.next({ rule: a, subUnitId: t, unitId: r, type: "set", oldRule: c });
178
- }
179
- }
180
- addRule(r, t, e) {
181
- const n = this._ensureList(r, t);
182
- n.find((a) => a.cfId === e.cfId) || n.unshift(e), this._ruleChange$.next({ rule: e, subUnitId: t, unitId: r, type: "add" });
183
- }
184
- /**
185
- * example [1,2,3,4,5,6],if you move behind 5 to 2, then cfId=5,targetId=2.
186
- * if targetId does not exist, it defaults to top
187
- */
188
- moveRulePriority(r, t, e, n) {
189
- const i = this._ensureList(r, t), a = Y(e, i, (l) => l.cfId), c = Y(n, i, (l) => l.cfId);
190
- if (c === null || a === null || c === a)
191
- return;
192
- const o = i[a];
193
- o && (I0(e, n, i, (l) => l.cfId), this._ruleChange$.next({ rule: o, subUnitId: t, unitId: r, type: "sort" }));
194
- }
195
- createCfId(r, t) {
196
- return b0();
197
- }
198
- deleteUnitId(r) {
199
- this._model.delete(r);
200
- }
201
- }
202
- const a2 = {
203
- type: $.MUTATION,
204
- id: "sheet.mutation.move-conditional-rule",
205
- handler(s, r) {
206
- if (!r)
207
- return !1;
208
- const { unitId: t, subUnitId: e, start: n, end: i } = r;
209
- return s.get(R).moveRulePriority(t, e, n, i), !0;
210
- }
211
- }, L0 = (s) => {
212
- const { unitId: r, subUnitId: t } = s, e = S0(s.start, s.end);
213
- if (!e)
214
- return [];
215
- const [n, i] = e;
216
- return [
217
- { id: a2.id, params: { unitId: r, subUnitId: t, start: n, end: i } }
218
- ];
219
- }, D2 = (s, r) => {
220
- const t = s.get(R), { unitId: e, subUnitId: n, cfId: i } = r, a = [...t.getSubunitRules(e, n) || []], c = a.findIndex((l) => l.cfId === i), o = a[c - 1];
221
- if (c > -1) {
222
- const l = a[c], d = [{
223
- id: l2.id,
224
- params: { unitId: e, subUnitId: n, rule: z.deepClone(l) }
225
- }];
226
- if (a.splice(c, 1), c !== 0) {
227
- const u = a[0];
228
- if (u) {
229
- const h = q2({ id: u.cfId, type: "before" }, { id: o.cfId, type: "after" }, a, (w) => w.cfId);
230
- if (!h)
231
- return d;
232
- const [g, f] = h, D = {
233
- unitId: e,
234
- subUnitId: n,
235
- start: g,
236
- end: f
237
- };
238
- d.push({ id: a2.id, params: D });
239
- }
240
- }
241
- return d;
242
- }
243
- return [];
244
- }, X = {
245
- type: $.MUTATION,
246
- id: "sheet.mutation.delete-conditional-rule",
247
- handler(s, r) {
248
- if (!r)
249
- return !1;
250
- const { unitId: t, subUnitId: e, cfId: n } = r;
251
- return s.get(R).deleteRule(t, e, n), !0;
252
- }
253
- }, Z2 = (s, r) => ({ id: X.id, params: { unitId: r.unitId, subUnitId: r.subUnitId, cfId: r.rule.cfId } }), l2 = {
254
- type: $.MUTATION,
255
- id: "sheet.mutation.add-conditional-rule",
256
- handler(s, r) {
257
- if (!r)
258
- return !1;
259
- const { unitId: t, subUnitId: e, rule: n } = r;
260
- return s.get(R).addRule(t, e, n), !0;
261
- }
262
- }, k0 = {
263
- type: $.COMMAND,
264
- id: "sheet.command.add-conditional-rule",
265
- handler(s, r) {
266
- if (!r)
267
- return !1;
268
- const { rule: t } = r, e = s.get(n2), n = s.get(q), i = s.get(R), a = s.get(Z), c = k(a, r);
269
- if (!c) return !1;
270
- const { unitId: o, subUnitId: l } = c, d = i.createCfId(o, l), u = { unitId: o, subUnitId: l, rule: { ...t, cfId: t.cfId || d } }, h = Z2(s, u), g = n.syncExecuteCommand(l2.id, u);
271
- return g && e.pushUndoRedo({
272
- unitID: o,
273
- redoMutations: [{ id: l2.id, params: u }],
274
- undoMutations: [h]
275
- }), g;
276
- }
277
- }, o2 = {
278
- type: $.MUTATION,
279
- id: "sheet.mutation.set-conditional-rule",
280
- handler(s, r) {
281
- if (!r)
282
- return !1;
283
- const { unitId: t, subUnitId: e, rule: n } = r, i = r.cfId || r.rule.cfId;
284
- return s.get(R).setRule(t, e, n, i), !0;
285
- }
286
- }, G2 = (s, r) => {
287
- const t = s.get(R), { unitId: e, subUnitId: n } = r, i = r.cfId || r.rule.cfId, a = t.getRule(e, n, i);
288
- return a ? [{
289
- id: o2.id,
290
- params: {
291
- unitId: e,
292
- subUnitId: n,
293
- cfId: i,
294
- rule: z.deepClone(a)
295
- }
296
- }] : [];
297
- }, B0 = {
298
- type: $.COMMAND,
299
- id: "sheet.command.clear-range-conditional-rule",
300
- handler(s, r) {
301
- var D;
302
- if (!r)
303
- return !1;
304
- const t = s.get(R), e = s.get(Z), n = s.get(q), i = s.get(n2), a = s.get(s0), c = k(e, r);
305
- if (!c) return !1;
306
- const { unitId: o, subUnitId: l } = c, d = ((D = a.getCurrentSelections()) == null ? void 0 : D.map((w) => w.range)) || [], u = t.getSubunitRules(o, l);
307
- if (!(u != null && u.length) || !d.length)
308
- return !1;
309
- const h = [], g = [];
310
- u.forEach((w) => {
311
- const E = new O();
312
- w.ranges.forEach((A) => {
313
- U.foreach(A, (S, B) => {
314
- E.setValue(S, B, 1);
315
- });
316
- }), d.forEach((A) => {
317
- U.foreach(A, (S, B) => {
318
- E.realDeleteValue(S, B);
319
- });
320
- });
321
- const I = i0(a0(E));
322
- if (I.length) {
323
- const A = { ...w, ranges: I }, S = { unitId: o, subUnitId: l, rule: A }, B = G2(s, S);
324
- h.push({ id: o2.id, params: S }), g.push(...B);
325
- } else {
326
- const A = { unitId: o, subUnitId: l, cfId: w.cfId }, S = D2(s, A);
327
- h.push({ id: X.id, params: A }), g.push(...S);
328
- }
329
- });
330
- const f = B2(h, n).result;
331
- return f && i.pushUndoRedo({
332
- unitID: o,
333
- redoMutations: h,
334
- undoMutations: g
335
- }), f;
336
- }
337
- }, N0 = {
338
- type: $.COMMAND,
339
- id: "sheet.command.clear-worksheet-conditional-rule",
340
- handler(s, r) {
341
- const t = s.get(R), e = s.get(Z), n = s.get(q), i = s.get(n2), a = k(e, r);
342
- if (!a) return !1;
343
- const { unitId: c, subUnitId: o } = a, l = t.getSubunitRules(c, o);
344
- if (!(l != null && l.length))
345
- return !1;
346
- const d = l.map((f) => ({ cfId: f.cfId, unitId: c, subUnitId: o })), u = d.map((f) => ({ id: X.id, params: f })), h = d.map((f) => D2(s, f)[0]), g = B2(u, n).result;
347
- return g && i.pushUndoRedo({
348
- unitID: c,
349
- redoMutations: u,
350
- undoMutations: h
351
- }), g;
352
- }
353
- }, T0 = {
354
- type: $.COMMAND,
355
- id: "sheet.command.delete-conditional-rule",
356
- handler(s, r) {
357
- if (!r)
358
- return !1;
359
- const t = s.get(n2), e = s.get(q), n = s.get(Z), i = k(n, r);
360
- if (!i) return !1;
361
- const { unitId: a, subUnitId: c } = i, o = { unitId: a, subUnitId: c, cfId: r.cfId }, l = D2(s, o), d = e.syncExecuteCommand(X.id, o);
362
- return d && t.pushUndoRedo({ unitID: a, undoMutations: l, redoMutations: [{ id: X.id, params: o }] }), d;
363
- }
364
- }, U0 = {
365
- type: $.COMMAND,
366
- id: "sheet.command.move-conditional-rule",
367
- handler(s, r) {
368
- if (!r)
369
- return !1;
370
- const t = s.get(n2), e = s.get(q), n = s.get(Z), i = s.get(R), a = k(n, r);
371
- if (!a) return !1;
372
- const { unitId: c, subUnitId: o } = a, l = q2(r.start, r.end, i.getSubunitRules(c, o) || [], (D) => D.cfId);
373
- if (!l)
374
- return !1;
375
- const [d, u] = l, h = { unitId: c, subUnitId: o, start: d, end: u }, g = L0(h), f = e.syncExecuteCommand(a2.id, h);
376
- return f && t.pushUndoRedo({
377
- unitID: c,
378
- redoMutations: [{ id: a2.id, params: h }],
379
- undoMutations: g
380
- }), f;
381
- }
382
- }, V0 = {
383
- type: $.COMMAND,
384
- id: "sheet.command.set-conditional-rule",
385
- handler(s, r) {
386
- if (!r)
387
- return !1;
388
- const t = s.get(n2), e = s.get(q), n = s.get(Z), i = k(n, r);
389
- if (!i) return !1;
390
- const { unitId: a, subUnitId: c } = i, o = { unitId: a, subUnitId: c, rule: r.rule, cfId: r.cfId }, l = G2(s, o), d = e.syncExecuteCommand(o2.id, o);
391
- return d && t.pushUndoRedo({ unitID: a, undoMutations: l, redoMutations: [{ id: o2.id, params: o }] }), d;
392
- }
393
- };
394
- var O0 = Object.getOwnPropertyDescriptor, $0 = (s, r, t, e) => {
395
- for (var n = e > 1 ? void 0 : e ? O0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
396
- (a = s[i]) && (n = a(n) || n);
397
- return n;
398
- }, S2 = (s, r) => (t, e) => r(t, e, s);
399
- let Q = class extends _2 {
400
- constructor(r, t) {
401
- super();
402
- // Cache Formula ID and formula mapping.
403
- m(this, "_formulaMap", /* @__PURE__ */ new Map());
404
- m(this, "_result$", new h2());
405
- m(this, "result$", this._result$.asObservable());
406
- this._registerOtherFormulaService = r, this._conditionalFormattingRuleModel = t, this._initFormulaResultChange(), this._initRuleChange();
407
- }
408
- _initRuleChange() {
409
- const r = (t) => {
410
- switch (t.type) {
411
- case M.colorScale:
412
- return t.config.some((e) => e.value.type === L.formula);
413
- case M.dataBar:
414
- return [t.config.max, t.config.min].some((e) => e.type === L.formula);
415
- case M.iconSet:
416
- return t.config.some((e) => e.value.type === L.formula);
417
- }
418
- };
419
- this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((t) => {
420
- const { unitId: e, subUnitId: n, rule: i, oldRule: a } = t;
421
- 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), t.type === "add" && this._registerRuleFormulas(e, n, i);
422
- }));
423
- }
424
- /**
425
- * Register formulas for a specific rule based on its type
426
- */
427
- _registerRuleFormulas(r, t, e) {
428
- switch (e.rule.type) {
429
- case M.highlightCell: {
430
- if (e.rule.subType === x.formula) {
431
- const n = e.rule.value;
432
- n && this.registerFormulaWithRange(
433
- r,
434
- t,
435
- e.cfId,
436
- n,
437
- e.ranges
438
- );
439
- }
440
- break;
441
- }
442
- }
443
- }
444
- _initFormulaResultChange() {
445
- this.disposeWithMe(this._registerOtherFormulaService.formulaResult$.subscribe((r) => {
446
- for (const t in r)
447
- for (const e in r[t]) {
448
- const n = r[t][e];
449
- for (const i of n) {
450
- const a = this._ensureSubunitFormulaMap(t, e).getValue(i.formulaId, ["formulaId"]);
451
- if (!a)
452
- continue;
453
- const o = this._getAllFormulaResultByCfId(t, e, a.cfId).every((l) => {
454
- const d = this._registerOtherFormulaService.getFormulaValueSync(t, e, l.formulaId);
455
- return (d == null ? void 0 : d.status) === p.SUCCESS;
456
- });
457
- this._result$.next({ ...a, isAllFinished: o });
458
- }
459
- }
460
- }));
461
- }
462
- _ensureSubunitFormulaMap(r, t) {
463
- let e = this._formulaMap.get(r);
464
- e || (e = /* @__PURE__ */ new Map(), this._formulaMap.set(r, e));
465
- let n = e.get(t);
466
- return n || (n = new X2([], ["formulaId", "id"]), e.set(t, n)), n;
467
- }
468
- getSubUnitFormulaMap(r, t) {
469
- var e;
470
- return (e = this._formulaMap.get(r)) == null ? void 0 : e.get(t);
471
- }
472
- registerFormulaWithRange(r, t, e, n, i = [{ startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }]) {
473
- const a = this._ensureSubunitFormulaMap(r, t), c = this.createCFormulaId(e, n);
474
- if (a.getValue(c, ["id"]))
475
- return;
476
- const o = this._registerOtherFormulaService.registerFormulaWithRange(r, t, n, i, void 0, p0.CONDITIONAL_FORMATTING, e);
477
- a.addValue({
478
- formulaText: n,
479
- unitId: r,
480
- subUnitId: t,
481
- cfId: e,
482
- id: c,
483
- formulaId: o
484
- });
485
- }
486
- _removeFormulaByCfId(r, t, e) {
487
- const i = this.deleteCache(r, t, e).map((a) => a.formulaId);
488
- this._registerOtherFormulaService.deleteFormula(r, t, i);
489
- }
490
- getFormulaResultWithCoords(r, t, e, n, i = 0, a = 0) {
491
- var d;
492
- const c = this.getSubUnitFormulaMap(r, t);
493
- if (!c)
494
- return { status: p.NOT_REGISTER };
495
- const o = c.getValue(this.createCFormulaId(e, n), ["id"]);
496
- if (!o)
497
- return { status: p.NOT_REGISTER };
498
- const l = this._registerOtherFormulaService.getFormulaValueSync(r, t, o.formulaId);
499
- if (!l)
500
- return { status: p.NOT_REGISTER };
501
- if (l.status === p.SUCCESS && l.result) {
502
- const u = (d = l.result[i]) == null ? void 0 : d[a];
503
- return { result: this._getCellValue(u), status: p.SUCCESS };
504
- }
505
- return { status: l.status };
506
- }
507
- getFormulaMatrix(r, t, e, n) {
508
- const i = this.getSubUnitFormulaMap(r, t);
509
- if (!i)
510
- return { status: p.NOT_REGISTER };
511
- const a = i.getValue(this.createCFormulaId(e, n), ["id"]);
512
- if (!a)
513
- return { status: p.NOT_REGISTER };
514
- const c = this._registerOtherFormulaService.getFormulaValueSync(r, t, a.formulaId);
515
- if (!c)
516
- return { status: p.NOT_REGISTER };
517
- if (c.status === p.SUCCESS && c.result) {
518
- const o = new O();
519
- return new O(c.result).forValue((d, u, h) => {
520
- o.setValue(d, u, this._getCellValue(h));
521
- }), { result: o, status: p.SUCCESS };
522
- }
523
- return { status: c.status };
524
- }
525
- _getCellValue(r) {
526
- if (!r || !r[0] || !r[0][0])
527
- return !1;
528
- const t = r[0][0];
529
- return (t == null ? void 0 : t.t) === y.BOOLEAN ? t.v === N2.TRUE || t.v === !0 : t == null ? void 0 : t.v;
530
- }
531
- /**
532
- * If `formulaText` is not provided, then all caches related to `cfId` will be deleted.
533
- */
534
- deleteCache(r, t, e, n) {
535
- const i = this.getSubUnitFormulaMap(r, t);
536
- if (!i)
537
- return [];
538
- if (n) {
539
- const a = this.createCFormulaId(e, n);
540
- return i.deleteValue(a, ["id"]), [];
541
- } else {
542
- const a = i.getValues().filter((c) => c.cfId === e);
543
- return a.forEach((c) => {
544
- i.deleteValue(c.formulaId, ["formulaId"]);
545
- }), a;
546
- }
547
- }
548
- _getAllFormulaResultByCfId(r, t, e) {
549
- const n = this.getSubUnitFormulaMap(r, t);
550
- return n ? n.getValues().filter((a) => a.cfId === e) : [];
551
- }
552
- /**
553
- * A conditional formatting may have multiple formulas;if the formulas are identical,then the results will be consistent.
554
- */
555
- createCFormulaId(r, t) {
556
- return `${r}_${t}`;
557
- }
558
- };
559
- Q = $0([
560
- S2(0, b(v0)),
561
- S2(1, b(R))
562
- ], Q);
563
- var V = /* @__PURE__ */ ((s) => (s.preComputingStart = "preComputingStart", s.preComputing = "preComputing", s.preComputingEnd = "preComputingEnd", s.preComputingError = "preComputingError", s))(V || {});
564
- class m2 {
565
- constructor(r) {
566
- /**
567
- * 3nd-level cache
568
- */
569
- m(this, "_cache");
570
- m(this, "_preComputingStatus$", new F0(
571
- "preComputingStart"
572
- /* preComputingStart */
573
- ));
574
- m(this, "preComputingStatus$", this._preComputingStatus$.asObservable().pipe(A0()));
575
- /**
576
- * 2nd-level cache
577
- */
578
- m(this, "_preComputingCache");
579
- m(this, "_rule");
580
- this._context = r, this._cache = new T2(r.limit), this._rule = r.rule, this._preComputingCache = null, this._initClearCacheListener();
581
- }
582
- setCacheLength(r) {
583
- this._cache.limit = r;
584
- }
585
- clearCache() {
586
- this._cache.clear();
587
- }
588
- resetPreComputingCache() {
589
- this._preComputingStatus$.next(
590
- "preComputingStart"
591
- /* preComputingStart */
592
- ), this._preComputingCache = null;
593
- }
594
- updateRule(r) {
595
- this._rule = r, this.resetPreComputingCache();
596
- }
597
- getCell(r, t) {
598
- const e = this._createKey(r, t);
599
- if (this._preComputingStatus$.getValue() === "preComputing")
600
- return this._cache.get(e);
601
- let n = this.getPreComputingResult(r, t);
602
- if (n === null && (this._preComputingStatus$.next(
603
- "preComputingStart"
604
- /* preComputingStart */
605
- ), this.preComputing(r, t, this._getContext()), n = this.getPreComputingResult(r, t), n === null))
606
- return this._cache.get(e);
607
- if (this._preComputingStatus$.next(
608
- "preComputingEnd"
609
- /* preComputingEnd */
610
- ), this._cache.has(e))
611
- return this._cache.get(e);
612
- const i = this.getCellResult(r, t, n, this._getContext());
613
- return i !== null && this._setCache(r, t, i), i;
614
- }
615
- setPreComputingCache(r) {
616
- this._preComputingCache = r;
617
- }
618
- getPreComputingResult(r, t) {
619
- return this._preComputingCache;
620
- }
621
- _createKey(r, t) {
622
- return `${r}_${t}`;
623
- }
624
- _setCache(r, t, e) {
625
- const n = this._createKey(r, t);
626
- this._cache.set(n, e);
627
- }
628
- _getContext() {
629
- return { ...this._context, rule: this._rule };
630
- }
631
- _initClearCacheListener() {
632
- this.preComputingStatus$.subscribe((r) => {
633
- r === "preComputingEnd" && this.clearCache();
634
- });
635
- }
636
- }
637
- class P0 extends m2 {
638
- preComputing(r, t, e) {
639
- const n = e.rule, i = e.worksheet, a = new O();
640
- !n.rule.config.every((d) => d.value.type === L.num) && w2(n.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((u) => {
641
- U.foreach(u, (h, g) => {
642
- const f = e.getCellValue(h, g), D = f && f.v;
643
- if (!_(D) && (f == null ? void 0 : f.t) === y.NUMBER) {
644
- const w = Number(D);
645
- !Number.isNaN(w) && a.setValue(h, g, w);
646
- }
647
- });
648
- });
649
- const o = [...n.rule.config].sort((d, u) => d.index - u.index).map((d) => ({
650
- value: C2(d.value, a, {
651
- ...e,
652
- cfId: n.cfId
653
- }),
654
- color: new U2(d.color)
655
- }));
656
- if (!o.some((d) => M0(d.value) ? d.value.status !== p.SUCCESS : !1)) {
657
- const d = o.map((u) => u.color).reduce((u, h, g) => (u.result.push({ color: h, value: u.sortValue[g] }), u), {
658
- result: [],
659
- sortValue: o.map((u) => u.value.result).sort((u, h) => u - h)
660
- }).result;
661
- this.setPreComputingCache(d), this._preComputingStatus$.next(V.preComputingEnd);
662
- return;
663
- }
664
- this._preComputingStatus$.next(V.preComputing);
665
- }
666
- getCellResult(r, t, e, n) {
667
- if (!e)
668
- return null;
669
- const i = n.getCellValue(r, t);
670
- if (i.t === y.NUMBER) {
671
- const a = Number(i.v);
672
- if (!Number.isNaN(a))
673
- return r1(e, a);
674
- }
675
- }
676
- }
677
- const W0 = "sheet-conditional-rule-data-bar", b2 = "#ffbe38", L2 = "#abd91a", q0 = "#000", Z0 = 34, G0 = (s) => {
678
- const { startRow: r, endRow: t, startColumn: e, endColumn: n } = s;
679
- return `${r}-${t}-${e}-${n}`;
680
- };
681
- class H0 extends P2 {
682
- constructor() {
683
- super(...arguments);
684
- m(this, "_paddingRightAndLeft", 2);
685
- m(this, "_paddingTopAndBottom", 2);
686
- m(this, "uKey", W0);
687
- m(this, "Z_INDEX", Z0);
688
- m(this, "_radius", 1);
689
- }
690
- // eslint-disable-next-line max-lines-per-function
691
- draw(t, e, n, i) {
692
- const { worksheet: a } = n;
693
- if (!a)
694
- return !1;
695
- const c = /* @__PURE__ */ new Set();
696
- t.save(), U.foreach(n.rowColumnSegment, (o, l) => {
697
- if (!a.getRowVisible(o) || !a.getColVisible(l))
698
- return;
699
- const d = n.getCellWithCoordByIndex(o, l, !1), { isMerged: u, isMergedMainCell: h, mergeInfo: g } = d;
700
- let f = a.getCell(o, l);
701
- if (u && (f = a.getCell(g.startRow, g.startColumn)), !(f != null && f.dataBar) || !this.isRenderDiffRangesByCell(g, i))
702
- return;
703
- if (u || h) {
704
- const P = G0(g);
705
- if (c.has(P))
706
- return;
707
- c.add(P);
708
- }
709
- const { color: D, value: w, startPoint: E, isGradient: I } = f.dataBar, { startX: A, endX: S, startY: B, endY: v2 } = u || h ? g : d, u2 = S - A, p2 = v2 + R0 - B, G = u2 - this._paddingRightAndLeft * 2, M2 = p2 - this._paddingTopAndBottom * 2;
710
- if (w > 0) {
711
- const P = Math.max(G * (1 - E / 100) * w / 100, 1), H = A + this._paddingRightAndLeft + E / 100 * G, j = B + this._paddingTopAndBottom;
712
- if (I) {
713
- const K = t.createLinearGradient(H, j, H + P, j);
714
- K.addColorStop(0, D), K.addColorStop(1, "rgb(255 255 255)"), t.fillStyle = K, t.strokeStyle = D, t.lineWidth = 1;
715
- } else
716
- t.fillStyle = D;
717
- this._drawRectWithRoundedCorner(t, H, j, P, M2, !1, !0, !0, !1), I && t.stroke();
718
- } else {
719
- const P = Math.max(G * E / 100 * Math.abs(w) / 100, 1), H = A + this._paddingRightAndLeft + E / 100 * G - P, j = B + this._paddingTopAndBottom;
720
- if (I) {
721
- const K = t.createLinearGradient(H, j, H + P, j);
722
- K.addColorStop(0, "rgb(255 255 255)"), K.addColorStop(1, D), t.fillStyle = K, t.strokeStyle = D, t.lineWidth = 1;
723
- } else
724
- t.fillStyle = D;
725
- this._drawRectWithRoundedCorner(t, H, j, P, M2, !0, !1, !1, !0), I && t.stroke();
726
- }
727
- }), t.restore();
728
- }
729
- _drawRectWithRoundedCorner(t, e, n, i, a, c, o, l, d) {
730
- const u = this._radius;
731
- !a || !i || (t.beginPath(), t.moveTo(e + u, n), t.lineTo(e + i - u, n), o ? t.arcTo(e + i, n, e + i, n + u, u) : t.lineTo(e + i, n), t.lineTo(e + i, n + a - u), l ? t.arcTo(e + i, n + a, e + i - u, n + a, u) : t.lineTo(e + i, n + a), t.lineTo(e + u, n + a), d ? t.arcTo(e, n + a, e, n + a - u, u) : t.lineTo(e, n + a), t.lineTo(e, n + u), c ? t.arcTo(e, n, e + u, n, u) : t.lineTo(e, n), t.closePath(), t.fill());
732
- }
733
- }
734
- $2.add(H0);
735
- const c2 = (s) => Math.max(Math.min(100, s), 0), j0 = (s, r, t) => {
736
- const e = t(s, r);
737
- if (e && e.t === y.NUMBER) {
738
- const n = Number(e.v);
739
- return Number.isNaN(n) ? null : n;
740
- }
741
- return null;
742
- };
743
- class K0 extends m2 {
744
- preComputing(r, t, e) {
745
- const n = e.rule, i = n.rule, a = e.worksheet, c = new O();
746
- ![n.rule.config.max, n.rule.config.min].every((g) => g.type === L.num) && w2(n.ranges, a.getMaxRows() - 1, a.getMaxColumns() - 1).forEach((f) => {
747
- U.foreach(f, (D, w) => {
748
- const E = e.getCellValue(D, w), I = E && E.v;
749
- if (!_(I) && (E == null ? void 0 : E.t) === y.NUMBER) {
750
- const A = Number(I);
751
- !Number.isNaN(A) && c.setValue(D, w, A);
752
- }
753
- });
754
- });
755
- const l = C2(i.config.min, c, { ...e, cfId: n.cfId }), d = C2(i.config.max, c, { ...e, cfId: n.cfId });
756
- let u = 0, h = 0;
757
- if (l.status === p.SUCCESS) {
758
- const g = Number(l.result);
759
- u = Number.isNaN(g) ? 0 : g;
760
- } else {
761
- this._preComputingStatus$.next(V.preComputing);
762
- return;
763
- }
764
- if (d.status === p.SUCCESS) {
765
- const g = Number(d.result), f = Number.isNaN(g) ? 0 : g;
766
- h = Math.max(f, u), u = Math.min(f, u);
767
- let D = 50;
768
- if (u < 0 && h <= 0)
769
- D = 100;
770
- else if (u < 0 && h > 0) {
771
- const w = Math.abs(h) + Math.abs(u);
772
- D = Math.abs(u) / w * 100;
773
- } else u >= 0 && h > 0 && (D = 0);
774
- this.setPreComputingCache({ min: u, max: h, startPoint: D }), this._preComputingStatus$.next(V.preComputingEnd);
775
- return;
776
- }
777
- this._preComputingStatus$.next(V.preComputing);
778
- }
779
- // eslint-disable-next-line complexity
780
- getCellResult(r, t, e, n) {
781
- const { min: i, max: a, startPoint: c } = e, l = n.rule.rule, d = l.isShowValue, u = l.config.isGradient, h = j0(r, t, n.getCellValue);
782
- if (!(h === null || h < i || i === a || a < i)) {
783
- if (h === 0)
784
- return { color: q0, startPoint: c, value: 0, isGradient: u, isShowValue: d };
785
- if (i < 0 && a <= 0) {
786
- const g = a - i, f = c2((a - h) / g * 100);
787
- return f === 0 ? void 0 : { color: l.config.nativeColor || L2, startPoint: c, value: -f, isGradient: u, isShowValue: d };
788
- } else if (i < 0 && a > 0)
789
- if (h > 0) {
790
- const g = c2(Math.min(h / a, 1) * 100);
791
- return g === 0 ? void 0 : { color: l.config.positiveColor || b2, startPoint: c, value: g, isGradient: u, isShowValue: d };
792
- } else {
793
- const g = c2(Math.min(Math.abs(h) / Math.abs(i), 1) * 100);
794
- return g === 0 ? void 0 : { color: l.config.nativeColor || L2, startPoint: c, value: -g, isGradient: u, isShowValue: d };
795
- }
796
- else if (i >= 0 && a > 0) {
797
- const g = a - i, f = 0, D = c2((1 - (a - h) / g) * 100);
798
- return D === 0 ? void 0 : { color: l.config.positiveColor || b2, startPoint: f, value: D, isGradient: u, isShowValue: d };
799
- }
800
- }
801
- }
802
- }
803
- class Y0 extends m2 {
804
- // eslint-disable-next-line max-lines-per-function
805
- preComputing(r, t, e) {
806
- const n = e.rule.rule, i = w2(e.rule.ranges, e.worksheet.getMaxRows() - 1, e.worksheet.getMaxColumns() - 1), c = (() => {
807
- switch (n.subType) {
808
- case x.average: {
809
- let o = 0, l = 0;
810
- return i.forEach((d) => {
811
- U.foreach(d, (u, h) => {
812
- const g = e.getCellValue(u, h), f = W(g);
813
- g && g.t === y.NUMBER && !_(f) && (o += Number(f) || 0, l++);
814
- });
815
- }), { value: o / l, type: n.subType };
816
- }
817
- case x.uniqueValues:
818
- case x.duplicateValues: {
819
- const o = /* @__PURE__ */ new Map();
820
- return i.forEach((l) => {
821
- U.foreach(l, (d, u) => {
822
- const h = e.getCellValue(d, u), g = W(h);
823
- if (!_(g)) {
824
- const f = o.get(g);
825
- f ? o.set(g, f + 1) : o.set(g, 1);
826
- }
827
- });
828
- }), { value: o, type: n.subType };
829
- }
830
- case x.rank: {
831
- let o = [];
832
- i.forEach((u) => {
833
- U.foreach(u, (h, g) => {
834
- const f = e.getCellValue(h, g), D = W(f);
835
- f && f.t === y.NUMBER && !_(D) && o.push(Number(D) || 0);
836
- });
837
- }), o.sort((u, h) => h - u);
838
- const l = e.rule.rule;
839
- if (l.isPercent) {
840
- l.isBottom && (o = o.toReversed());
841
- const u = z.clamp(l.value, 0, 100) / 100, h = Math.floor(u * o.length), g = z.clamp(h - 1, 0, o.length - 1);
842
- return { value: o[g], type: n.subType };
843
- }
844
- const d = Math.floor(z.clamp(l.isBottom ? l.value - 1 : l.value, 0, o.length));
845
- return l.isBottom ? { value: o[o.length - d - 1], type: n.subType } : { value: o[Math.max(d - 1, 0)], type: n.subType };
846
- }
847
- case x.formula: {
848
- const o = n, l = e.accessor.get(Q);
849
- l.registerFormulaWithRange(e.unitId, e.subUnitId, e.rule.cfId, o.value, e.rule.ranges);
850
- const d = l.getFormulaMatrix(e.unitId, e.subUnitId, e.rule.cfId, o.value);
851
- return d && d.status === p.SUCCESS ? (this._preComputingStatus$.next(V.preComputingEnd), {
852
- value: d.result,
853
- type: n.subType
854
- }) : (this._preComputingStatus$.next(V.preComputing), null);
855
- }
856
- case x.timePeriod:
857
- switch (n.operator) {
858
- case T.last7Days:
859
- return {
860
- value: {
861
- start: v().subtract(7, "day").valueOf(),
862
- end: v().valueOf()
863
- },
864
- type: n.subType
865
- };
866
- case T.lastMonth:
867
- return {
868
- value: {
869
- start: v().startOf("month").subtract(1, "month").valueOf(),
870
- end: v().endOf("month").subtract(1, "month").valueOf()
871
- },
872
- type: n.subType
873
- };
874
- case T.lastWeek:
875
- return {
876
- value: {
877
- start: v().startOf("week").subtract(1, "week").valueOf(),
878
- end: v().endOf("week").subtract(1, "week").valueOf()
879
- },
880
- type: n.subType
881
- };
882
- case T.nextMonth:
883
- return {
884
- value: {
885
- start: v().startOf("month").add(1, "month").valueOf(),
886
- end: v().endOf("month").add(1, "month").valueOf()
887
- },
888
- type: n.subType
889
- };
890
- case T.nextWeek:
891
- return {
892
- value: {
893
- start: v().startOf("week").add(1, "week").valueOf(),
894
- end: v().endOf("week").add(1, "week").valueOf()
895
- },
896
- type: n.subType
897
- };
898
- case T.thisMonth:
899
- return {
900
- value: {
901
- start: v().startOf("month").valueOf(),
902
- end: v().endOf("month").valueOf()
903
- },
904
- type: n.subType
905
- };
906
- case T.thisWeek:
907
- return {
908
- value: {
909
- start: v().startOf("week").valueOf(),
910
- end: v().endOf("week").valueOf()
911
- },
912
- type: n.subType
913
- };
914
- case T.today:
915
- return {
916
- value: {
917
- start: v().startOf("day").valueOf(),
918
- end: v().endOf("day").valueOf()
919
- },
920
- type: n.subType
921
- };
922
- case T.tomorrow:
923
- return {
924
- value: {
925
- start: v().startOf("day").add(1, "day").valueOf(),
926
- end: v().endOf("day").add(1, "day").valueOf()
927
- },
928
- type: n.subType
929
- };
930
- case T.yesterday:
931
- return {
932
- value: {
933
- start: v().startOf("day").subtract(1, "day").valueOf(),
934
- end: v().endOf("day").subtract(1, "day").valueOf()
935
- },
936
- type: n.subType
937
- };
938
- }
939
- }
940
- })();
941
- this.setPreComputingCache(c);
942
- }
943
- // eslint-disable-next-line max-lines-per-function
944
- getCellResult(r, t, e, n) {
945
- const i = n.getCellValue(r, t), a = n.rule.rule;
946
- return (() => {
947
- switch (a.subType) {
948
- case x.number: {
949
- const l = i && Number(i.v), d = (i == null ? void 0 : i.t) === y.NUMBER, u = a;
950
- return d ? _(l) || Number.isNaN(l) ? void 0 : s2({ operator: u.operator, value: u.value || 0 }, l || 0) : !![F.notEqual, F.notBetween].includes(u.operator);
951
- }
952
- case x.text: {
953
- const l = a, d = W(i), u = _(d) ? "" : String(d), h = l.value || "";
954
- switch (l.operator) {
955
- case N.beginsWith:
956
- return u.startsWith(h);
957
- case N.containsBlanks:
958
- return /^\s*$/.test(u);
959
- case N.notContainsBlanks:
960
- return !/^\s*$/.test(u);
961
- case N.containsErrors:
962
- return R2.has(u);
963
- case N.notContainsErrors:
964
- return !R2.has(u);
965
- case N.containsText:
966
- return u.indexOf(h) > -1;
967
- case N.notContainsText:
968
- return u.indexOf(h) === -1;
969
- case N.endsWith:
970
- return u.endsWith(h);
971
- case N.equal:
972
- return u === h;
973
- case N.notEqual:
974
- return u !== h;
975
- default:
976
- return !1;
977
- }
978
- }
979
- case x.timePeriod: {
980
- const l = W(i);
981
- if (_(l) || Number.isNaN(Number(l)) || (i == null ? void 0 : i.t) !== y.NUMBER || !e)
982
- return;
983
- const d = t1(Number(l)), { start: u, end: h } = e.value;
984
- return d >= u && d <= h;
985
- }
986
- case x.average: {
987
- const l = i && i.v, d = Number(l), u = (i == null ? void 0 : i.t) === y.NUMBER, h = a;
988
- if (!u)
989
- return F.notEqual === h.operator;
990
- if (_(l) || Number.isNaN(d) || !e)
991
- return !1;
992
- const g = e.value;
993
- switch (h.operator) {
994
- case F.greaterThan:
995
- return d > g;
996
- case F.greaterThanOrEqual:
997
- return d >= g;
998
- case F.lessThan:
999
- return d < g;
1000
- case F.lessThanOrEqual:
1001
- return d <= g;
1002
- case F.equal:
1003
- return g2(d, g);
1004
- case F.notEqual:
1005
- return !g2(d, g);
1006
- default:
1007
- return !1;
1008
- }
1009
- }
1010
- case x.rank: {
1011
- const l = W(i), d = Number(l);
1012
- if (_(l) || Number.isNaN(d) || (i == null ? void 0 : i.t) !== y.NUMBER || !e)
1013
- return !1;
1014
- const u = e.value;
1015
- return a.isBottom ? d <= u : d >= u;
1016
- }
1017
- case x.uniqueValues: {
1018
- const l = W(i);
1019
- return _(l) || !e ? !1 : e.value.get(l) === 1;
1020
- }
1021
- case x.duplicateValues: {
1022
- const l = W(i);
1023
- if (_(l) || !e)
1024
- return !1;
1025
- const d = e.value.get(l);
1026
- return d && d !== 1;
1027
- }
1028
- case x.formula: {
1029
- const l = e == null ? void 0 : e.value;
1030
- if (l) {
1031
- const d = n.rule.ranges[0], u = r - d.startRow, h = t - d.startColumn;
1032
- return l.getValue(u, h) === !0;
1033
- }
1034
- return !1;
1035
- }
1036
- }
1037
- })() ? a.style : {};
1038
- }
1039
- }
1040
- const X0 = (s, r, t) => {
1041
- const e = t(s, r);
1042
- if (e && e.t === y.NUMBER) {
1043
- const n = Number(e.v);
1044
- return Number.isNaN(n) ? null : n;
1045
- }
1046
- return null;
1047
- };
1048
- class J0 extends m2 {
1049
- preComputing(r, t, e) {
1050
- const n = e.rule.rule, i = e.worksheet, a = new O();
1051
- !n.config.every((d) => d.value.type === L.num) && w2(e.rule.ranges, i.getMaxRows() - 1, i.getMaxColumns() - 1).forEach((u) => {
1052
- U.foreach(u, (h, g) => {
1053
- const f = e.getCellValue(h, g), D = f && f.v;
1054
- if (!_(D) && (f == null ? void 0 : f.t) === y.NUMBER) {
1055
- const w = Number(D);
1056
- !Number.isNaN(w) && a.setValue(h, g, w);
1057
- }
1058
- });
1059
- });
1060
- const o = n.config.map((d) => C2(d.value, a, { ...e, cfId: e.rule.cfId }));
1061
- if (!o.some((d) => d.status !== p.SUCCESS)) {
1062
- const d = o.map((u, h) => ({
1063
- operator: n.config[h].operator,
1064
- value: Number(u.result) || 0
1065
- })).reduce((u, h, g, f) => {
1066
- const D = n.config[g];
1067
- if (!g || g === f.length - 1)
1068
- u.push({ ...h, iconId: D.iconId, iconType: D.iconType });
1069
- else {
1070
- const w = f[g - 1];
1071
- s2(w, h.value) || u.push({ ...h, iconId: D.iconId, iconType: D.iconType });
1072
- }
1073
- return u;
1074
- }, []);
1075
- this.setPreComputingCache(d), this._preComputingStatus$.next(V.preComputingEnd);
1076
- return;
1077
- }
1078
- this._preComputingStatus$.next(V.preComputing);
1079
- }
1080
- getCellResult(r, t, e, n) {
1081
- if (!e)
1082
- return null;
1083
- const i = X0(r, t, n.getCellValue);
1084
- if (i === null)
1085
- return;
1086
- const a = n.rule.rule, c = a.isShowValue === void 0 ? !0 : !!a.isShowValue;
1087
- for (let o = 0; o < e.length; o++) {
1088
- const l = e[o], d = { ...l }, u = { ...l }, { iconId: h, iconType: g } = l;
1089
- if (o === 0) {
1090
- if (s2(l, i))
1091
- return { iconId: h, iconType: g, isShowValue: c };
1092
- } else {
1093
- if (o === e.length - 1)
1094
- return { iconId: h, iconType: g, isShowValue: c };
1095
- {
1096
- const f = e[o - 1];
1097
- if (u.operator = n1(f.operator), u.value = f.value, s2(d, i) && s2(u, i))
1098
- return { iconId: h, iconType: g, isShowValue: c };
1099
- }
1100
- }
1101
- }
1102
- }
1103
- }
1104
- var z0 = Object.getOwnPropertyDescriptor, Q0 = (s, r, t, e) => {
1105
- for (var n = e > 1 ? void 0 : e ? z0(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1106
- (a = s[i]) && (n = a(n) || n);
1107
- return n;
1108
- }, d2 = (s, r) => (t, e) => r(t, e, s);
1109
- const E2 = 1e3 * 3 * 3;
1110
- let e2 = class extends _2 {
1111
- constructor(r, t, e, n) {
1112
- super();
1113
- // Map<unitID ,<sheetId ,ObjectMatrix>>
1114
- m(this, "_calculateUnitManagers", /* @__PURE__ */ new Map());
1115
- m(this, "_rTreeManager", new J2());
1116
- /**
1117
- * 1nd-level cache
1118
- */
1119
- m(this, "_cellCache", new T2(E2));
1120
- m(this, "_markDirty$", new h2());
1121
- /**
1122
- * The rendering layer listens to this variable to determine whether a reRender is necessary.
1123
- * @memberof ConditionalFormattingViewModel
1124
- */
1125
- m(this, "markDirty$", this._markDirty$.asObservable());
1126
- /**
1127
- `isNeedResetPreComputingCache` indicates whether it is necessary to remove the 2nd-level cache for each rule individually.
1128
- Generally, when the logic of a rule calculation is modified, the cache for that rule needs to be removed.
1129
- Changes in style/priority do not require the clearing of the 2nd-level cache.
1130
- Rule changes/region changes require the removal of the 2nd-level cache.
1131
- There is also a situation where preComputing is asynchronously calculated.
1132
- After the calculation is finished, it is only for marking as dirty, and the 2nd-level cache need to be cleared.
1133
- * @param {boolean} [isNeedResetPreComputingCache]
1134
- */
1135
- m(this, "_markRuleDirtyAtOnce", (r, t, e, n = !0) => {
1136
- if (this._cellCache.clear(), n) {
1137
- const a = this._ensureCalculateUnitManager(r, t).get(e);
1138
- a && a.resetPreComputingCache();
1139
- }
1140
- this._markDirty$.next({
1141
- unitId: r,
1142
- subUnitId: t,
1143
- cfId: e
1144
- });
1145
- });
1146
- /**
1147
- * For the same condition format being marked dirty multiple times at the same time,
1148
- * it will cause the style cache to be cleared, thereby causing the screen to flicker.
1149
- * Here,multiple dirties are merged into one..
1150
- */
1151
- m(this, "markRuleDirty", (() => {
1152
- const r = new h2();
1153
- return this.disposeWithMe(r.pipe(x0(100), _0((t) => !!t.length), y0((t) => {
1154
- const e = /* @__PURE__ */ new Set(), n = [];
1155
- return t.forEach((i) => {
1156
- const a = `${i.unitId}_${i.subUnitId}_${i.cfId}`;
1157
- if (e.has(a)) {
1158
- if (i.isNeedResetPreComputingCache) {
1159
- const c = n.find((o) => o.cfId === i.cfId);
1160
- c.isNeedResetPreComputingCache = !0;
1161
- }
1162
- return;
1163
- }
1164
- e.add(a), n.push({ ...i });
1165
- }), n;
1166
- })).subscribe((t) => {
1167
- t.forEach((e) => {
1168
- this._markRuleDirtyAtOnce(e.unitId, e.subUnitId, e.cfId, e.isNeedResetPreComputingCache);
1169
- });
1170
- })), (t, e, n, i = !0) => {
1171
- r.next({ unitId: t, subUnitId: e, cfId: n, isNeedResetPreComputingCache: i });
1172
- };
1173
- })());
1174
- this._injector = r, this._conditionalFormattingRuleModel = t, this._conditionalFormattingFormulaService = e, this._univerInstanceService = n, this._initRuleListener(), this._handleCustomFormulasSeparately(), this._initCFFormulaListener();
1175
- }
1176
- _initCFFormulaListener() {
1177
- this.disposeWithMe(
1178
- this._conditionalFormattingFormulaService.result$.subscribe(({ unitId: r, subUnitId: t, cfId: e, isAllFinished: n }) => {
1179
- n && this._markRuleDirtyAtOnce(r, t, e, n);
1180
- })
1181
- );
1182
- }
1183
- getCellCfs(r, t, e, n) {
1184
- const i = this._createCacheKey(r, t, e, n);
1185
- if (this._cellCache.has(i))
1186
- return this._cellCache.get(i);
1187
- const a = this._getCellCfs(r, t, e, n);
1188
- return a.length && this._cellCache.set(i, a), a;
1189
- }
1190
- _getCellCfs(r, t, e, n) {
1191
- var d;
1192
- const i = (d = this._conditionalFormattingRuleModel.getSubunitRules(r, t)) != null ? d : [], a = this._ensureCalculateUnitManager(r, t), c = this._rTreeManager.bulkSearch([{ unitId: r, sheetId: t, range: { startColumn: n, endColumn: n, startRow: e, endRow: e } }]), o = i.filter((u) => c.has(u.cfId));
1193
- return o.length ? o.map((u) => {
1194
- const h = a.get(u.cfId);
1195
- return h ? {
1196
- cfId: u.cfId,
1197
- result: h.getCell(e, n)
1198
- } : null;
1199
- }).filter((u) => !!u).map((u, h) => ({ ...u, priority: h })) : [];
1200
- }
1201
- dispose() {
1202
- this.clearCache(), super.dispose();
1203
- }
1204
- clearCache() {
1205
- this._calculateUnitManagers.clear(), this._cellCache.clear(), this._rTreeManager.clear();
1206
- }
1207
- _handleCustomFormulasSeparately() {
1208
- this.disposeWithMe(
1209
- this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
1210
- if (r.type === "set") {
1211
- const { unitId: t, subUnitId: e } = r, n = r.oldRule;
1212
- n.rule.type === M.highlightCell && n.rule.subType === x.formula && this._conditionalFormattingFormulaService.deleteCache(t, e, n.cfId);
1213
- }
1214
- })
1215
- );
1216
- }
1217
- _initRuleListener() {
1218
- this.disposeWithMe(
1219
- this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
1220
- const { unitId: t, subUnitId: e, rule: n } = r, { cfId: i, ranges: a } = n, c = this._ensureCalculateUnitManager(t, e);
1221
- switch (this.markRuleDirty(t, e, i), r.type) {
1222
- case "add": {
1223
- this._rTreeManager.bulkInsert(a.map((l) => ({ unitId: t, sheetId: e, id: i, range: l })));
1224
- const o = this._createRuleCalculateUnitInstance(t, e, n);
1225
- if (!o)
1226
- return;
1227
- c.set(n.cfId, o);
1228
- break;
1229
- }
1230
- case "delete": {
1231
- this._rTreeManager.bulkRemove(a.map((o) => ({ unitId: t, sheetId: e, id: i, range: o }))), c.delete(n.cfId);
1232
- break;
1233
- }
1234
- case "set": {
1235
- const o = r.oldRule;
1236
- if (this._rTreeManager.bulkRemove(o.ranges.map((l) => ({ unitId: t, sheetId: e, id: o.cfId, range: l }))), this._rTreeManager.bulkInsert(a.map((l) => ({ unitId: t, sheetId: e, id: i, range: l }))), o.rule.type !== n.rule.type) {
1237
- const l = this._createRuleCalculateUnitInstance(t, e, n);
1238
- if (!l)
1239
- return;
1240
- c.delete(o.cfId), c.set(n.cfId, l);
1241
- } else {
1242
- const l = c.get(o.cfId);
1243
- if (!l)
1244
- return;
1245
- l.updateRule(n);
1246
- }
1247
- }
1248
- }
1249
- })
1250
- );
1251
- }
1252
- _ensureCalculateUnitManager(r, t) {
1253
- let e = this._calculateUnitManagers.get(r);
1254
- e || (e = /* @__PURE__ */ new Map(), this._calculateUnitManagers.set(r, e));
1255
- let n = e.get(t);
1256
- return n || (n = /* @__PURE__ */ new Map(), e.set(t, n)), n;
1257
- }
1258
- _createRuleCalculateUnitInstance(r, t, e) {
1259
- const n = this._univerInstanceService.getUnit(r), i = n == null ? void 0 : n.getSheetBySheetId(t);
1260
- if (!n || !i)
1261
- return;
1262
- const a = {
1263
- workbook: n,
1264
- worksheet: i,
1265
- unitId: r,
1266
- subUnitId: t,
1267
- accessor: this._injector,
1268
- rule: e,
1269
- limit: E2,
1270
- getCellValue: (c, o) => i.getCellRaw(c, o) || {}
1271
- };
1272
- switch (e.rule.type) {
1273
- case M.colorScale:
1274
- return new P0(a);
1275
- case M.dataBar:
1276
- return new K0(a);
1277
- case M.highlightCell:
1278
- return new Y0(a);
1279
- case M.iconSet:
1280
- return new J0(a);
1281
- }
1282
- }
1283
- _createCacheKey(r, t, e, n) {
1284
- return `${r}_${t}_${e}_${n}`;
1285
- }
1286
- setCacheLength(r = E2) {
1287
- this._cellCache.limit !== r && (this._cellCache.limit = r, this._calculateUnitManagers.forEach((t) => {
1288
- t.forEach((e) => {
1289
- e.forEach((n) => {
1290
- n.setCacheLength(r);
1291
- });
1292
- });
1293
- }));
1294
- }
1295
- };
1296
- e2 = Q0([
1297
- d2(0, b(y2)),
1298
- d2(1, b(R)),
1299
- d2(2, b(Q)),
1300
- d2(3, Z)
1301
- ], e2);
1302
- function g2(s, r) {
1303
- return Math.abs(s - r) < Number.EPSILON;
1304
- }
1305
- const _ = (s) => s == null || typeof s == "string" && s.trim() === "", W = (s) => {
1306
- var e, n;
1307
- if (!s)
1308
- return null;
1309
- if (s.t === y.BOOLEAN)
1310
- return s.v === N2.TRUE ? I2.TRUE : I2.FALSE;
1311
- const r = s.v, t = (n = (e = s.p) == null ? void 0 : e.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "");
1312
- return _(r) ? _(t) ? null : t : r;
1313
- }, A2 = 86400;
1314
- function e1(s, r = !0) {
1315
- if (r && s >= 0) {
1316
- if (s === 0)
1317
- return [1900, 1, 0];
1318
- if (s === 60)
1319
- return [1900, 2, 29];
1320
- if (s < 60)
1321
- return [1900, s < 32 ? 1 : 2, (s - 1) % 31 + 1];
1322
- }
1323
- let t = s + 68569 + 2415019;
1324
- const e = Math.floor(4 * t / 146097);
1325
- t = t - Math.floor((146097 * e + 3) / 4);
1326
- const n = Math.floor(4e3 * (t + 1) / 1461001);
1327
- t = t - Math.floor(1461 * n / 4) + 31;
1328
- const i = Math.floor(80 * t / 2447), a = t - Math.floor(2447 * i / 80);
1329
- t = Math.floor(i / 11);
1330
- const c = i + 2 - 12 * t;
1331
- return [100 * (e - 49) + n + t | 0, c | 0, a | 0];
1332
- }
1333
- const t1 = (s) => {
1334
- let r = s | 0;
1335
- const t = A2 * (s - r);
1336
- let e = Math.floor(t);
1337
- t - e > 0.9999 && (e += 1, e === A2 && (e = 0, r += 1));
1338
- const n = e < 0 ? A2 + e : e, [i, a, c] = e1(s, !0), o = Math.floor(n / 60 / 60) % 60, l = Math.floor(n / 60) % 60, d = Math.floor(n) % 60;
1339
- return v(`${i}/${a}/${c} ${o}:${l}:${d}`).valueOf();
1340
- }, C2 = (s, r, t) => {
1341
- switch (s.type) {
1342
- case L.max: {
1343
- let e = 0;
1344
- return r.forValue((n, i, a) => {
1345
- a > e && (e = a);
1346
- }), {
1347
- status: p.SUCCESS,
1348
- result: e
1349
- };
1350
- }
1351
- case L.min: {
1352
- let e;
1353
- return r.forValue((n, i, a) => {
1354
- e === void 0 && (e = a), a < e && (e = a);
1355
- }), {
1356
- status: p.SUCCESS,
1357
- result: e
1358
- };
1359
- }
1360
- case L.percent: {
1361
- let e, n;
1362
- r.forValue((c, o, l) => {
1363
- (e === void 0 || n === void 0) && (e = l, n = l), l > e && (e = l), l < n && (n = l);
1364
- });
1365
- const i = (e || 0) - (n || 0), a = Math.max(Math.min(Number(s.value) || 0, 100), 0);
1366
- return {
1367
- status: p.SUCCESS,
1368
- result: i * (a / 100) + (n || 0)
1369
- };
1370
- }
1371
- case L.percentile: {
1372
- const e = r.toNativeArray().sort((l, d) => l - d), n = Math.max(Math.min(Number(s.value) || 0, 100), 0), i = (e.length - 1) * n / 100, a = Math.floor(i), c = i - a, o = e[a] + (e[Math.min(a + 1, e.length - 1)] - e[a]) * c;
1373
- return {
1374
- status: p.SUCCESS,
1375
- result: o
1376
- };
1377
- }
1378
- case L.formula: {
1379
- const { accessor: e, unitId: n, subUnitId: i, cfId: a } = t, c = String(s.value), o = e.get(Q);
1380
- return o.registerFormulaWithRange(n, i, a, c), o.getFormulaResultWithCoords(n, i, a, c);
1381
- }
1382
- case L.num:
1383
- default: {
1384
- const e = Number(s.value);
1385
- return {
1386
- status: p.SUCCESS,
1387
- result: Number.isNaN(e) ? 0 : e
1388
- };
1389
- }
1390
- }
1391
- }, G1 = (s, r, t, e) => {
1392
- const { accessor: n } = e, i = n.get(e2), a = new O();
1393
- return t.ranges.forEach((c) => {
1394
- U.foreach(c, (o, l) => {
1395
- const d = i.getCellCfs(s, r, o, l);
1396
- if (d) {
1397
- const u = d.find((h) => h.cfId === t.cfId);
1398
- u != null && u.result && a.setValue(o, l, u.result);
1399
- }
1400
- });
1401
- }), a;
1402
- }, s2 = (s, r) => {
1403
- switch (s.operator) {
1404
- case F.between: {
1405
- if (typeof s.value != "object" || !s.value.length)
1406
- return;
1407
- const t = Math.min(...s.value), e = Math.max(...s.value);
1408
- return r >= t && r <= e;
1409
- }
1410
- case F.notBetween: {
1411
- if (typeof s.value != "object" || !s.value.length)
1412
- return;
1413
- const t = Math.min(...s.value), e = Math.max(...s.value);
1414
- return !(r >= t && r <= e);
1415
- }
1416
- case F.equal: {
1417
- const t = s.value || 0;
1418
- return g2(t, r);
1419
- }
1420
- case F.notEqual: {
1421
- const t = s.value || 0;
1422
- return !g2(t, r);
1423
- }
1424
- case F.greaterThan: {
1425
- const t = s.value || 0;
1426
- return r > t;
1427
- }
1428
- case F.greaterThanOrEqual: {
1429
- const t = s.value || 0;
1430
- return r >= t;
1431
- }
1432
- case F.lessThan: {
1433
- const t = s.value || 0;
1434
- return r < t;
1435
- }
1436
- case F.lessThanOrEqual: {
1437
- const t = s.value || 0;
1438
- return r <= t;
1439
- }
1440
- default:
1441
- return !1;
1442
- }
1443
- }, n1 = (s) => {
1444
- switch (s) {
1445
- case F.greaterThan:
1446
- return F.lessThanOrEqual;
1447
- case F.greaterThanOrEqual:
1448
- return F.lessThan;
1449
- case F.lessThan:
1450
- return F.greaterThanOrEqual;
1451
- case F.lessThanOrEqual:
1452
- return F.greaterThan;
1453
- }
1454
- return s;
1455
- }, r1 = (s, r) => {
1456
- const t = (i) => i.a !== void 0 ? i : { ...i, a: 1 }, e = s.findIndex((i) => i.value >= r), n = e - 1;
1457
- if (e === 0)
1458
- return s[0].color.toRgbString();
1459
- if (n >= 0) {
1460
- const i = s[n], a = s[e];
1461
- if (i.color.isValid && a.color.isValid) {
1462
- const c = t(i.color.toRgb()), o = t(a.color.toRgb()), l = a.value - i.value, d = (r - i.value) / l, u = ["r", "g", "b", "a"].reduce((g, f) => {
1463
- const D = c[f];
1464
- return g[f] = (o[f] - D) * d + D, g;
1465
- }, {});
1466
- return new U2(u).toRgbString();
1467
- }
1468
- } else
1469
- return s[s.length - 1].color.toRgbString();
1470
- }, w2 = (s, r, t) => s.map((e) => {
1471
- if (e.startColumn > t || e.startRow > r)
1472
- return null;
1473
- const n = { ...e };
1474
- return n.endRow = Math.min(n.endRow, r), n.endColumn = Math.min(n.endColumn, t), n;
1475
- }).filter((e) => !!e);
1476
- function H1(s) {
1477
- let r = 0;
1478
- return new O(s).forValue((t, e, n) => {
1479
- r = Math.max(Number.isNaN(r) ? 0 : r, Number(n));
1480
- }), r;
1481
- }
1482
- const s1 = { 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" }, i1 = { 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%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%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%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" }, a1 = { 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" }, l1 = { 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" }, o1 = { 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" }, u1 = /* @__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"}'), c1 = { 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" }, d1 = { 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" }, h1 = { "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" }, g1 = { "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 = {
1483
- feedback: s1,
1484
- star: i1,
1485
- progress: a1,
1486
- signal: l1,
1487
- feeling: o1,
1488
- arrow: u1,
1489
- shape: c1,
1490
- feedback2: d1,
1491
- flag: h1,
1492
- cell: g1
1493
- }, C1 = [
1494
- {
1495
- title: "sheet.cf.iconSet.direction",
1496
- group: [
1497
- { name: "3Arrows", list: [C.arrow["up-green"], C.arrow["right-gold"], C.arrow["down-red"]] },
1498
- { name: "3ArrowsGray", list: [C.arrow["up-gray"], C.arrow["right-gray"], C.arrow["down-gray"]] },
1499
- { name: "4Arrows", list: [C.arrow["up-green"], C.arrow["rightAndUp-gold"], C.arrow["rightAndDown-gold"], C.arrow["down-red"]] },
1500
- { name: "4ArrowsGray", list: [C.arrow["up-gray"], C.arrow["rightAndUp-gray"], C.arrow["rightAndDown-gray"], C.arrow["down-gray"]] },
1501
- { name: "5Arrows", list: [C.arrow["up-green"], C.arrow["rightAndUp-gold"], C.arrow["right-gold"], C.arrow["rightAndDown-gold"], C.arrow["down-red"]] },
1502
- { name: "5ArrowsGray", list: [C.arrow["up-gray"], C.arrow["rightAndUp-gray"], C.arrow["right-gray"], C.arrow["rightAndDown-gray"], C.arrow["down-gray"]] },
1503
- { name: "3Triangles", list: [C.shape.up, C.shape.cross, C.shape.down] }
1504
- ]
1505
- },
1506
- {
1507
- title: "sheet.cf.iconSet.shape",
1508
- group: [
1509
- {
1510
- name: "3TrafficLights1",
1511
- list: [C.shape["roundness-greed"], C.shape["roundness-gold"], C.shape["roundness-red"]]
1512
- },
1513
- {
1514
- name: "3Signs",
1515
- list: [C.shape["roundness-greed"], C.shape["triangle-gold"], C.shape["rhomboid-red"]]
1516
- },
1517
- { name: "3TrafficLights2", list: [C.shape["indicate-greed"], C.shape["indicate-gold"], C.shape["indicate-red"]] },
1518
- {
1519
- name: "4RedToBlack",
1520
- list: [C.shape["roundness-red"], C.shape["roundness-pink"], C.shape["roundness-gray"], C.shape["roundness-black"]]
1521
- },
1522
- {
1523
- name: "4TrafficLights",
1524
- list: [C.shape["roundness-greed"], C.shape["roundness-gold"], C.shape["roundness-red"], C.shape["roundness-black"]]
1525
- }
1526
- ]
1527
- },
1528
- {
1529
- title: "sheet.cf.iconSet.mark",
1530
- group: [
1531
- {
1532
- name: "3Symbols",
1533
- list: [C.feedback.correct, C.feedback.warn, C.feedback.mistake]
1534
- },
1535
- {
1536
- name: "3Symbols2",
1537
- list: [C.feedback2.correct2, C.feedback2.warn2, C.feedback2.mistake2]
1538
- },
1539
- {
1540
- name: "3Flags",
1541
- list: [C.flag["flag-green"], C.flag["flag-gold"], C.flag["flag-red"]]
1542
- }
1543
- ]
1544
- },
1545
- {
1546
- title: "sheet.cf.iconSet.rank",
1547
- group: [
1548
- {
1549
- name: "4Rating",
1550
- list: [C.signal.signal25, C.signal.signal50, C.signal.signal75, C.signal.signal100]
1551
- },
1552
- {
1553
- name: "5Rating",
1554
- list: [C.signal.signal0, C.signal.signal25, C.signal.signal50, C.signal.signal75, C.signal.signal100]
1555
- },
1556
- {
1557
- name: "5Quarters",
1558
- list: [C.progress.progress100, C.progress.progress75, C.progress.progress50, C.progress.progress25, C.progress.progress0]
1559
- },
1560
- {
1561
- name: "_5Felling",
1562
- list: [C.feeling.guffaw, C.feeling.smile, C.feeling.noninductive, C.feeling.dissatisfied, C.feeling.impatient]
1563
- },
1564
- {
1565
- name: "5Boxes",
1566
- list: [C.cell["cell-100"], C.cell["cell-75"], C.cell["cell-50"], C.cell["cell-25"], C.cell["cell-0"]]
1567
- },
1568
- {
1569
- name: "3Stars",
1570
- list: [C.star.starFull, C.star.starIncomplete, C.star.starEmpty]
1571
- }
1572
- ]
1573
- }
1574
- ], f2 = C1.reduce((s, r) => {
1575
- const { group: t } = r;
1576
- for (const e of t)
1577
- s[e.name] = e.list;
1578
- return s;
1579
- }, {});
1580
- for (const s in f2) {
1581
- const r = f2[s];
1582
- Object.freeze(r);
1583
- }
1584
- const f1 = "EMPTY_ICON_TYPE", D1 = "@univerjs/sheets-conditional-formatting", m1 = "0.17.0", H2 = {
1585
- name: D1,
1586
- version: m1
1587
- }, w1 = "ssheets-conditional-formatting.config", k2 = {};
1588
- var F1 = Object.getOwnPropertyDescriptor, v1 = (s, r, t, e) => {
1589
- for (var n = e > 1 ? void 0 : e ? F1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1590
- (a = s[i]) && (n = a(n) || n);
1591
- return n;
1592
- }, J = (s, r) => (t, e) => r(t, e, s);
1593
- let i2 = class extends _2 {
1594
- constructor(s, r, t, e, n, i) {
1595
- 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();
1596
- }
1597
- get _conditionalFormattingViewModelV2() {
1598
- return this._injector.get(e2);
1599
- }
1600
- composeStyle(s, r, t, e) {
1601
- const n = this._conditionalFormattingViewModelV2.getCellCfs(s, r, t, e);
1602
- if (n && (n != null && n.length)) {
1603
- const i = n.map((o) => this._conditionalFormattingRuleModel.getRule(s, r, o.cfId)).filter((o) => !!o).reverse(), a = i.findIndex((o) => o == null ? void 0 : o.stopIfTrue);
1604
- return a > -1 && i.splice(a + 1), i.reduce((o, l) => {
1605
- var h;
1606
- const d = l.rule.type, u = n.find((g) => g.cfId === l.cfId);
1607
- if (d === M.highlightCell)
1608
- u.result && V2(o, { style: u.result });
1609
- else if (d === M.colorScale) {
1610
- const g = u == null ? void 0 : u.result;
1611
- g && typeof g == "string" && (o.style = { ...(h = o.style) != null ? h : {}, bg: { rgb: g } });
1612
- } else if (d === M.dataBar) {
1613
- const g = u == null ? void 0 : u.result;
1614
- g && (o.dataBar = g, o.isShowValue = g.isShowValue);
1615
- } else if (d === M.iconSet) {
1616
- const g = u == null ? void 0 : u.result;
1617
- g && (o.iconSet = g, o.isShowValue = g.isShowValue);
1618
- }
1619
- return o;
1620
- }, {});
1621
- }
1622
- return null;
1623
- }
1624
- _initSnapshot() {
1625
- const s = (t) => {
1626
- const e = this._conditionalFormattingRuleModel.getUnitRules(t), n = {};
1627
- return e ? (e.forEach((i, a) => {
1628
- n[a] = i;
1629
- }), JSON.stringify(n)) : "";
1630
- }, r = (t) => {
1631
- if (!t)
1632
- return {};
1633
- try {
1634
- return JSON.parse(t);
1635
- } catch {
1636
- return {};
1637
- }
1638
- };
1639
- this.disposeWithMe(
1640
- this._resourceManagerService.registerPluginResource({
1641
- pluginName: W2,
1642
- businesses: [O2.UNIVER_SHEET],
1643
- toJson: (t) => s(t),
1644
- parseJson: (t) => r(t),
1645
- onUnLoad: (t) => {
1646
- this._conditionalFormattingRuleModel.deleteUnitId(t), !Q2(t) && this._conditionalFormattingViewModelV2.clearCache();
1647
- },
1648
- onLoad: (t, e) => {
1649
- Object.keys(e).forEach((n) => {
1650
- [...e[n]].reverse().forEach((a) => {
1651
- this._conditionalFormattingRuleModel.addRule(t, n, a);
1652
- });
1653
- });
1654
- }
1655
- })
1656
- );
1657
- }
1658
- _initSheetChange() {
1659
- this.disposeWithMe(
1660
- this._sheetInterceptorService.interceptCommand({
1661
- getMutations: (s) => {
1662
- if (s.id === o0.id) {
1663
- const r = s.params, t = k(this._univerInstanceService, r);
1664
- if (!t)
1665
- return { redos: [], undos: [] };
1666
- const { unitId: e, subUnitId: n } = t, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n);
1667
- if (!i)
1668
- return { redos: [], undos: [] };
1669
- const a = [], c = [];
1670
- return i.forEach((o) => {
1671
- const l = {
1672
- unitId: e,
1673
- subUnitId: n,
1674
- cfId: o.cfId
1675
- };
1676
- a.push({
1677
- id: X.id,
1678
- params: l
1679
- }), c.push(...D2(this._injector, l));
1680
- }), {
1681
- redos: a,
1682
- undos: c
1683
- };
1684
- } else if (s.id === u0.id) {
1685
- const r = s.params, t = k(this._univerInstanceService, r);
1686
- if (!t)
1687
- return { redos: [], undos: [] };
1688
- const { unitId: e, subUnitId: n } = t, { targetSubUnitId: i } = r, a = this._conditionalFormattingRuleModel.getSubunitRules(e, n);
1689
- if (!a)
1690
- return { redos: [], undos: [] };
1691
- const c = [], o = [];
1692
- return a.forEach((l) => {
1693
- const d = {
1694
- unitId: e,
1695
- subUnitId: i,
1696
- rule: {
1697
- ...l,
1698
- cfId: this._conditionalFormattingRuleModel.createCfId(e, i)
1699
- }
1700
- };
1701
- c.push({ id: l2.id, params: d }), o.push(Z2(this._injector, d));
1702
- }), { redos: c, undos: o };
1703
- }
1704
- return { redos: [], undos: [] };
1705
- }
1706
- })
1707
- );
1708
- }
1709
- // eslint-disable-next-line max-lines-per-function
1710
- _initCellChange() {
1711
- this.disposeWithMe(
1712
- // eslint-disable-next-line max-lines-per-function
1713
- this._commandService.onCommandExecuted((s) => {
1714
- const r = (t, e, n) => {
1715
- const i = /* @__PURE__ */ new Set();
1716
- return n.forEach(([a, c]) => {
1717
- const o = this._conditionalFormattingViewModelV2.getCellCfs(t, e, a, c);
1718
- o == null || o.forEach((l) => i.add(l.cfId));
1719
- }), [...i].map((a) => this._conditionalFormattingRuleModel.getRule(t, e, a)).filter((a) => !!a);
1720
- };
1721
- switch (s.id) {
1722
- case w0.id: {
1723
- const t = s.params, { subUnitId: e, unitId: n, cellValue: i } = t, a = [];
1724
- new O(i).forValue((o, l, d) => {
1725
- d && Object.keys(d).some((h) => ["p", "v"].includes(h)) && a.push([o, l]);
1726
- }), r(n, e, a).forEach((o) => {
1727
- this._conditionalFormattingViewModelV2.markRuleDirty(n, e, o.cfId);
1728
- });
1729
- break;
1730
- }
1731
- case m0.id:
1732
- case D0.id: {
1733
- const t = s.params, e = k(this._univerInstanceService, t);
1734
- if (!e) return;
1735
- const { worksheet: n, unitId: i, subUnitId: a } = e, { range: c } = t, o = { ...c, endColumn: n.getColumnCount() - 1 }, l = this._conditionalFormattingRuleModel.getSubunitRules(i, a);
1736
- l && l.filter((u) => u.ranges.some((h) => r2.intersects(h, o))).forEach((u) => {
1737
- this._conditionalFormattingViewModelV2.markRuleDirty(i, a, u.cfId);
1738
- });
1739
- break;
1740
- }
1741
- case f0.id:
1742
- case C0.id: {
1743
- const t = s.params, e = k(this._univerInstanceService, t);
1744
- if (!e) return;
1745
- const { worksheet: n, unitId: i, subUnitId: a } = e, { range: c } = t, o = { ...c, endRow: n.getRowCount() - 1 }, l = this._conditionalFormattingRuleModel.getSubunitRules(i, a);
1746
- l && l.filter((u) => u.ranges.some((h) => r2.intersects(h, o))).forEach((u) => {
1747
- this._conditionalFormattingViewModelV2.markRuleDirty(i, a, u.cfId);
1748
- });
1749
- break;
1750
- }
1751
- case g0.id: {
1752
- const t = s.params, e = k(this._univerInstanceService, t);
1753
- if (!e) return;
1754
- const { worksheet: n, unitId: i, subUnitId: a } = e, { sourceRange: c, targetRange: o } = t, l = {
1755
- startRow: Math.min(c.startRow, o.startRow),
1756
- endRow: n.getRowCount() - 1,
1757
- startColumn: 0,
1758
- endColumn: n.getColumnCount() - 1
1759
- }, d = this._conditionalFormattingRuleModel.getSubunitRules(i, a);
1760
- d && d.filter((h) => h.ranges.some((g) => r2.intersects(g, l))).forEach((h) => {
1761
- this._conditionalFormattingViewModelV2.markRuleDirty(i, a, h.cfId);
1762
- });
1763
- break;
1764
- }
1765
- case h0.id: {
1766
- const t = s.params, e = k(this._univerInstanceService, t);
1767
- if (!e) return;
1768
- const { worksheet: n, unitId: i, subUnitId: a } = e, { sourceRange: c, targetRange: o } = t, l = {
1769
- startRow: 0,
1770
- endRow: n.getRowCount() - 1,
1771
- startColumn: Math.min(c.startColumn, o.startColumn),
1772
- endColumn: n.getColumnCount() - 1
1773
- }, d = this._conditionalFormattingRuleModel.getSubunitRules(i, a);
1774
- d && d.filter((h) => h.ranges.some((g) => r2.intersects(g, l))).forEach((h) => {
1775
- this._conditionalFormattingViewModelV2.markRuleDirty(i, a, h.cfId);
1776
- });
1777
- break;
1778
- }
1779
- case d0.id: {
1780
- const { unitId: t, to: e, from: n } = s.params, i = (a) => {
1781
- const c = [];
1782
- new O(a.value).forValue((l, d) => {
1783
- c.push([l, d]);
1784
- }), r(t, a.subUnitId, c).forEach((l) => {
1785
- this._conditionalFormattingViewModelV2.markRuleDirty(t, a.subUnitId, l.cfId);
1786
- });
1787
- };
1788
- i(e), i(n);
1789
- break;
1790
- }
1791
- case c0.id: {
1792
- const { range: t, unitId: e, subUnitId: n } = s.params, i = this._conditionalFormattingRuleModel.getSubunitRules(e, n);
1793
- i && i.filter((c) => c.ranges.some((o) => r2.intersects(o, t))).forEach((c) => {
1794
- this._conditionalFormattingViewModelV2.markRuleDirty(e, n, c.cfId);
1795
- });
1796
- break;
1797
- }
1798
- }
1799
- })
1800
- );
1801
- }
1802
- };
1803
- i2 = v1([
1804
- J(0, b(R)),
1805
- J(1, b(y2)),
1806
- J(2, b(Z)),
1807
- J(3, b(z2)),
1808
- J(4, b(l0)),
1809
- J(5, b(q))
1810
- ], i2);
1811
- var p1 = Object.defineProperty, E1 = Object.getOwnPropertyDescriptor, A1 = (s, r, t) => r in s ? p1(s, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[r] = t, x1 = (s, r, t, e) => {
1812
- for (var n = e > 1 ? void 0 : e ? E1(r, t) : r, i = s.length - 1, a; i >= 0; i--)
1813
- (a = s[i]) && (n = a(n) || n);
1814
- return n;
1815
- }, x2 = (s, r) => (t, e) => r(t, e, s), F2 = (s, r, t) => A1(s, typeof r != "symbol" ? r + "" : r, t);
1816
- let t2 = class extends n0 {
1817
- constructor(s = k2, r, t, e) {
1818
- super(), this._config = s, this._injector = r, this._commandService = t, this._configService = e;
1819
- const { ...n } = V2(
1820
- {},
1821
- k2,
1822
- this._config
1823
- );
1824
- this._configService.setConfig(w1, n), [
1825
- [i2],
1826
- [Q],
1827
- [R],
1828
- [e2]
1829
- ].forEach((i) => {
1830
- this._injector.add(i);
1831
- }), [
1832
- k0,
1833
- B0,
1834
- N0,
1835
- T0,
1836
- U0,
1837
- V0,
1838
- l2,
1839
- X,
1840
- o2,
1841
- a2
1842
- ].forEach((i) => {
1843
- this._commandService.registerCommand(i);
1844
- });
1845
- }
1846
- onStarting() {
1847
- this._injector.get(i2), r0(this._injector, [
1848
- [i2],
1849
- [e2]
1850
- ]);
1851
- }
1852
- };
1853
- F2(t2, "pluginName", W2);
1854
- F2(t2, "packageName", H2.name);
1855
- F2(t2, "version", H2.version);
1856
- F2(t2, "type", O2.UNIVER_SHEET);
1857
- t2 = x1([
1858
- e0(E0),
1859
- x2(1, b(y2)),
1860
- x2(2, b(q)),
1861
- x2(3, t0)
1862
- ], t2);
1863
- const _1 = "sheet-conditional-rule-icon", y1 = 35, M1 = 15, R1 = 2, I1 = (s) => {
1864
- const { startRow: r, endRow: t, startColumn: e, endColumn: n } = s;
1865
- return `${r}-${t}-${e}-${n}`;
1866
- };
1867
- class S1 extends P2 {
1868
- constructor() {
1869
- super();
1870
- m(this, "_paddingRightAndLeft", R1);
1871
- m(this, "_width", M1);
1872
- m(this, "_imageMap", /* @__PURE__ */ new Map());
1873
- m(this, "uKey", _1);
1874
- m(this, "Z_INDEX", y1);
1875
- m(this, "_radius", 1);
1876
- this._init();
1877
- }
1878
- draw(t, e, n, i) {
1879
- const { worksheet: a } = n;
1880
- if (!a)
1881
- return !1;
1882
- const c = /* @__PURE__ */ new Set();
1883
- t.save(), U.foreach(n.rowColumnSegment, (o, l) => {
1884
- if (!a.getRowVisible(o) || !a.getColVisible(l))
1885
- return;
1886
- const d = n.getCellWithCoordByIndex(o, l, !1), { isMerged: u, isMergedMainCell: h, mergeInfo: g } = d;
1887
- let f = a.getCell(o, l);
1888
- if (u && (f = a.getCell(g.startRow, g.startColumn)), !(f != null && f.iconSet))
1889
- return;
1890
- const { iconType: D, iconId: w } = f.iconSet;
1891
- if (D === f1)
1892
- return;
1893
- const E = this._imageMap.get(this._createKey(D, w));
1894
- if (!E || !this.isRenderDiffRangesByCell(g, i))
1895
- return;
1896
- if (u || h) {
1897
- const G = I1(g);
1898
- if (c.has(G))
1899
- return;
1900
- c.add(G);
1901
- }
1902
- const { startX: I, endX: A, startY: S, endY: B } = u || h ? g : d, v2 = A - I, u2 = B - S;
1903
- if (this._width > u2 || this._width > v2 + this._paddingRightAndLeft * 2)
1904
- return;
1905
- const p2 = (u2 - this._width) / 2 + S;
1906
- t.drawImage(E, I + this._paddingRightAndLeft, p2, this._width, this._width);
1907
- }), t.restore();
1908
- }
1909
- _init() {
1910
- for (const t in f2)
1911
- f2[t].forEach((n, i) => {
1912
- const a = this._createKey(t, String(i)), c = new Image();
1913
- c.onload = () => {
1914
- this._imageMap.set(a, c);
1915
- }, c.src = n;
1916
- });
1917
- }
1918
- _createKey(t, e) {
1919
- return `${t}_${e}`;
1920
- }
1921
- }
1922
- $2.add(S1);
1923
- function b1(s) {
1924
- if (typeof s != "object" || s === null)
1925
- return s;
1926
- const r = {};
1927
- for (const t in s)
1928
- if (s.hasOwnProperty(t)) {
1929
- const e = b1(s[t]);
1930
- e !== void 0 && (r[t] = e);
1931
- }
1932
- return r;
1933
- }
1934
- export {
1935
- k0 as AddCfCommand,
1936
- l2 as AddConditionalRuleMutation,
1937
- Z2 as AddConditionalRuleMutationUndoFactory,
1938
- F as CFNumberOperator,
1939
- M as CFRuleType,
1940
- x as CFSubRuleType,
1941
- N as CFTextOperator,
1942
- T as CFTimePeriodOperator,
1943
- L as CFValueType,
1944
- E2 as CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,
1945
- B0 as ClearRangeCfCommand,
1946
- N0 as ClearWorksheetCfCommand,
1947
- Q as ConditionalFormattingFormulaService,
1948
- S1 as ConditionalFormattingIcon,
1949
- R as ConditionalFormattingRuleModel,
1950
- i2 as ConditionalFormattingService,
1951
- e2 as ConditionalFormattingViewModel,
1952
- O1 as DEFAULT_BG_COLOR,
1953
- $1 as DEFAULT_FONT_COLOR,
1954
- R1 as DEFAULT_PADDING,
1955
- M1 as DEFAULT_WIDTH,
1956
- H0 as DataBar,
1957
- T0 as DeleteCfCommand,
1958
- X as DeleteConditionalRuleMutation,
1959
- D2 as DeleteConditionalRuleMutationUndoFactory,
1960
- f1 as EMPTY_ICON_TYPE,
1961
- _1 as IconUKey,
1962
- U0 as MoveCfCommand,
1963
- a2 as MoveConditionalRuleMutation,
1964
- L0 as MoveConditionalRuleMutationUndoFactory,
1965
- W2 as SHEET_CONDITIONAL_FORMATTING_PLUGIN,
1966
- V0 as SetCfCommand,
1967
- o2 as SetConditionalRuleMutation,
1968
- t2 as UniverSheetsConditionalFormattingPlugin,
1969
- S0 as anchorUndoFactory,
1970
- s2 as compareWithNumber,
1971
- b0 as createCfId,
1972
- P1 as createDefaultRule,
1973
- W1 as createDefaultValue,
1974
- q1 as createDefaultValueByValueType,
1975
- W0 as dataBarUKey,
1976
- L2 as defaultDataBarNativeColor,
1977
- b2 as defaultDataBarPositiveColor,
1978
- q0 as defaultPlaceholderColor,
1979
- w2 as filterRange,
1980
- Y as findIndexByAnchor,
1981
- G1 as getCacheStyleMatrix,
1982
- W as getCellValue,
1983
- r1 as getColorScaleFromValue,
1984
- H1 as getMaxInFormulaResult,
1985
- n1 as getOppositeOperator,
1986
- C2 as getValueByType,
1987
- C1 as iconGroup,
1988
- f2 as iconMap,
1989
- Z1 as isAnchorEqual,
1990
- g2 as isFloatsEqual,
1991
- _ as isNullable,
1992
- Y1 as isRangesEqual,
1993
- I0 as moveByAnchor,
1994
- b1 as removeUndefinedAttr,
1995
- t1 as serialTimeToTimestamp,
1996
- G2 as setConditionalRuleMutationUndoFactory,
1997
- e1 as toYMD_1900,
1998
- q2 as transformSupportSymmetryAnchor
1999
- };
1
+ import{BooleanNumber as e,CellValueType as t,ColorKit as n,CommandType as r,DependentOn as i,Disposable as a,ICommandService as o,IConfigService as s,IResourceManagerService as c,IUndoRedoService as l,IUniverInstanceService as u,Inject as d,Injector as f,LRUMap as p,ObjectMatrix as m,Plugin as h,RTree as g,Range as _,Rectangle as v,RefAlias as y,Tools as b,UniverInstanceType as x,dayjs as S,generateRandomId as ee,isInternalEditorID as te,isRangesEqual as ne,merge as re,sequenceExecute as ie,touchDependencies as ae}from"@univerjs/core";import{CopySheetCommand as oe,InsertColMutation as se,InsertRowMutation as ce,MoveColsMutation as le,MoveRangeMutation as ue,MoveRowsMutation as de,RemoveColMutation as fe,RemoveRowMutation as pe,RemoveSheetCommand as me,ReorderRangeMutation as he,SetRangeValuesMutation as ge,SheetInterceptorService as _e,SheetsSelectionsService as ve,createTopMatrixFromMatrix as ye,findAllRectangle as be,getSheetCommandTarget as C}from"@univerjs/sheets";import{BehaviorSubject as xe,Subject as Se}from"rxjs";import{BooleanValue as Ce,ERROR_TYPE_SET as we,FormulaResultStatus as w,OtherFormulaBizType as Te,RegisterOtherFormulaService as Ee,UniverFormulaEnginePlugin as De}from"@univerjs/engine-formula";import{bufferTime as Oe,distinctUntilChanged as ke,filter as Ae,map as je}from"rxjs/operators";import{FIX_ONE_PIXEL_BLUR_OFFSET as Me,SheetExtension as Ne,SpreadsheetExtensionRegistry as Pe,isObject as Fe}from"@univerjs/engine-render";const Ie=`SHEET_CONDITIONAL_FORMATTING_PLUGIN`;let T=function(e){return e.beginsWith=`beginsWith`,e.endsWith=`endsWith`,e.containsText=`containsText`,e.notContainsText=`notContainsText`,e.equal=`equal`,e.notEqual=`notEqual`,e.containsBlanks=`containsBlanks`,e.notContainsBlanks=`notContainsBlanks`,e.containsErrors=`containsErrors`,e.notContainsErrors=`notContainsErrors`,e}({}),E=function(e){return e.today=`today`,e.yesterday=`yesterday`,e.tomorrow=`tomorrow`,e.last7Days=`last7Days`,e.thisMonth=`thisMonth`,e.lastMonth=`lastMonth`,e.nextMonth=`nextMonth`,e.thisWeek=`thisWeek`,e.lastWeek=`lastWeek`,e.nextWeek=`nextWeek`,e}({}),D=function(e){return e.greaterThan=`greaterThan`,e.greaterThanOrEqual=`greaterThanOrEqual`,e.lessThan=`lessThan`,e.lessThanOrEqual=`lessThanOrEqual`,e.notBetween=`notBetween`,e.between=`between`,e.equal=`equal`,e.notEqual=`notEqual`,e}({}),O=function(e){return e.highlightCell=`highlightCell`,e.dataBar=`dataBar`,e.colorScale=`colorScale`,e.iconSet=`iconSet`,e}({}),k=function(e){return e.uniqueValues=`uniqueValues`,e.duplicateValues=`duplicateValues`,e.rank=`rank`,e.text=`text`,e.timePeriod=`timePeriod`,e.number=`number`,e.average=`average`,e.formula=`formula`,e}({}),A=function(e){return e.num=`num`,e.min=`min`,e.max=`max`,e.percent=`percent`,e.percentile=`percentile`,e.formula=`formula`,e}({});const Le=`#fff`,Re=`#000000`,ze=()=>({cfId:void 0,ranges:[],stopIfTrue:!1,rule:{type:O.highlightCell,subType:k.text,operator:T.containsText}}),Be=(e,t)=>{switch(e){case k.text:if([T.beginsWith,T.containsText,T.endsWith,T.equal,T.notContainsText,T.notEqual].includes(t))return``;break;case k.number:return[D.between,D.notBetween].includes(t)?[10,100]:10}return``},Ve=(e,t)=>{switch(e){case A.formula:return`=`;case A.max:case A.min:return``;case A.percent:case A.percentile:case A.num:return t===void 0?10:t}return``},j=(e,t,n)=>{if(!t)return null;let r=t.findIndex(t=>n(t)===e.id);if(r<0)return null;switch(e.type){case`after`:return r+1;case`before`:return r-1;case`self`:return r}},He=(e,t,n,r)=>{if(!n)return null;let i=j(e,n,r),a=j(t,n,r);if(i===null||a===null||i===a)return;let o=n.splice(i,1)[0];switch(i<a&&(a=j(t,n,r)),t.type){case`before`:n.splice(a+1,0,o);break;case`self`:case`after`:n.splice(a,0,o);break}},Ue=(e,t,n,r)=>{if(e.type===`after`&&[`after`,`before`].includes(t.type))return[e,t];let i={...e},a={...t};if(i.type!==`after`){let e=j(i,n,r);if(e===null)return null;if(e-1<0){let t=n[e+1];if(t)i.id=r(t),i.type=`before`;else return null}else i.id=r(n[e-1]),i.type=`after`}if(![`after`,`before`].includes(a.type)){let e=j(a,n,r);if(e===null)return null;if(e===0)a.type=`before`;else if(e-1>=0)a.id=r(n[e-1]),a.type=`after`;else if(e+1<=n.length-1)a.id=r(n[e+1]),a.type=`before`;else return null}return i.id===a.id&&i.type===a.type?null:[i,a]},We=(e,t)=>{if([`after`,`before`].includes(t.type)){if(e.type===`after`)return[t,e];if(e.type===`before`)return[t,{...e,type:`self`}]}return null},Ge=(e,t)=>e.id===t.id&&e.type===t.type,Ke=()=>`${ee(8)}`;function M(e){"@babel/helpers - typeof";return M=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},M(e)}function qe(e,t){if(M(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(M(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Je(e){var t=qe(e,`string`);return M(t)==`symbol`?t:t+``}function N(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=class{constructor(){N(this,`_model`,new Map),N(this,`_ruleChange$`,new Se),N(this,`$ruleChange`,this._ruleChange$.asObservable())}_ensureList(e,t){let n=this.getSubunitRules(e,t);if(!n){n=[];let r=this._model.get(e);r||(r=new Map,this._model.set(e,r)),r.set(t,n)}return n}getRule(e,t,n){let r=this.getSubunitRules(e,t);return r?r.find(e=>e.cfId===n):null}getUnitRules(e){return this._model.get(e)||null}getSubunitRules(e,t){var n;return((n=this._model.get(e))==null?void 0:n.get(t))||null}getAll(){return this._model}deleteRule(e,t,n){let r=this.getSubunitRules(e,t);if(r){let i=r.findIndex(e=>e.cfId===n),a=r[i];a&&(r.splice(i,1),this._ruleChange$.next({rule:a,subUnitId:t,unitId:e,type:`delete`}))}}setRule(e,t,n,r){let i=this._ensureList(e,t).find(e=>e.cfId===r);if(i){let r=b.deepClone(i);Object.assign(i,n),this._ruleChange$.next({rule:i,subUnitId:t,unitId:e,type:`set`,oldRule:r})}}addRule(e,t,n){let r=this._ensureList(e,t);r.find(e=>e.cfId===n.cfId)||r.unshift(n),this._ruleChange$.next({rule:n,subUnitId:t,unitId:e,type:`add`})}moveRulePriority(e,t,n,r){let i=this._ensureList(e,t),a=j(n,i,e=>e.cfId),o=j(r,i,e=>e.cfId);if(o===null||a===null||o===a)return;let s=i[a];s&&(He(n,r,i,e=>e.cfId),this._ruleChange$.next({rule:s,subUnitId:t,unitId:e,type:`sort`}))}createCfId(e,t){return Ke()}deleteUnitId(e){this._model.delete(e)}};const F={type:r.MUTATION,id:`sheet.mutation.move-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,start:i,end:a}=t;return e.get(P).moveRulePriority(n,r,i,a),!0}},Ye=e=>{let{unitId:t,subUnitId:n}=e,r=We(e.start,e.end);if(!r)return[];let[i,a]=r;return[{id:F.id,params:{unitId:t,subUnitId:n,start:i,end:a}}]},I=(e,t)=>{let n=e.get(P),{unitId:r,subUnitId:i,cfId:a}=t,o=[...n.getSubunitRules(r,i)||[]],s=o.findIndex(e=>e.cfId===a),c=o[s-1];if(s>-1){let e=o[s],t=[{id:R.id,params:{unitId:r,subUnitId:i,rule:b.deepClone(e)}}];if(o.splice(s,1),s!==0){let e=o[0];if(e){let n=Ue({id:e.cfId,type:`before`},{id:c.cfId,type:`after`},o,e=>e.cfId);if(!n)return t;let[a,s]=n,l={unitId:r,subUnitId:i,start:a,end:s};t.push({id:F.id,params:l})}}return t}return[]},L={type:r.MUTATION,id:`sheet.mutation.delete-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,cfId:i}=t;return e.get(P).deleteRule(n,r,i),!0}},Xe=(e,t)=>({id:L.id,params:{unitId:t.unitId,subUnitId:t.subUnitId,cfId:t.rule.cfId}}),R={type:r.MUTATION,id:`sheet.mutation.add-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t;return e.get(P).addRule(n,r,i),!0}},Ze={type:r.COMMAND,id:`sheet.command.add-conditional-rule`,handler(e,t){if(!t)return!1;let{rule:n}=t,r=e.get(l),i=e.get(o),a=e.get(P),s=C(e.get(u),t);if(!s)return!1;let{unitId:c,subUnitId:d}=s,f=a.createCfId(c,d),p={unitId:c,subUnitId:d,rule:{...n,cfId:n.cfId||f}},m=Xe(e,p),h=i.syncExecuteCommand(R.id,p);return h&&r.pushUndoRedo({unitID:c,redoMutations:[{id:R.id,params:p}],undoMutations:[m]}),h}},z={type:r.MUTATION,id:`sheet.mutation.set-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t,a=t.cfId||t.rule.cfId;return e.get(P).setRule(n,r,i,a),!0}},Qe=(e,t)=>{let n=e.get(P),{unitId:r,subUnitId:i}=t,a=t.cfId||t.rule.cfId,o=n.getRule(r,i,a);return o?[{id:z.id,params:{unitId:r,subUnitId:i,cfId:a,rule:b.deepClone(o)}}]:[]},$e={type:r.COMMAND,id:`sheet.command.clear-range-conditional-rule`,handler(e,t){var n;if(!t)return!1;let r=e.get(P),i=e.get(u),a=e.get(o),s=e.get(l),c=e.get(ve),d=C(i,t);if(!d)return!1;let{unitId:f,subUnitId:p}=d,h=((n=c.getCurrentSelections())==null?void 0:n.map(e=>e.range))||[],g=r.getSubunitRules(f,p);if(!(g!=null&&g.length)||!h.length)return!1;let v=[],y=[];g.forEach(t=>{let n=new m;t.ranges.forEach(e=>{_.foreach(e,(e,t)=>{n.setValue(e,t,1)})}),h.forEach(e=>{_.foreach(e,(e,t)=>{n.realDeleteValue(e,t)})});let r=be(ye(n));if(r.length){let n={unitId:f,subUnitId:p,rule:{...t,ranges:r}},i=Qe(e,n);v.push({id:z.id,params:n}),y.push(...i)}else{let n={unitId:f,subUnitId:p,cfId:t.cfId},r=I(e,n);v.push({id:L.id,params:n}),y.push(...r)}});let b=ie(v,a).result;return b&&s.pushUndoRedo({unitID:f,redoMutations:v,undoMutations:y}),b}},et={type:r.COMMAND,id:`sheet.command.clear-worksheet-conditional-rule`,handler(e,t){let n=e.get(P),r=e.get(u),i=e.get(o),a=e.get(l),s=C(r,t);if(!s)return!1;let{unitId:c,subUnitId:d}=s,f=n.getSubunitRules(c,d);if(!(f!=null&&f.length))return!1;let p=f.map(e=>({cfId:e.cfId,unitId:c,subUnitId:d})),m=p.map(e=>({id:L.id,params:e})),h=p.map(t=>I(e,t)[0]),g=ie(m,i).result;return g&&a.pushUndoRedo({unitID:c,redoMutations:m,undoMutations:h}),g}},tt={type:r.COMMAND,id:`sheet.command.delete-conditional-rule`,handler(e,t){if(!t)return!1;let n=e.get(l),r=e.get(o),i=C(e.get(u),t);if(!i)return!1;let{unitId:a,subUnitId:s}=i,c={unitId:a,subUnitId:s,cfId:t.cfId},d=I(e,c),f=r.syncExecuteCommand(L.id,c);return f&&n.pushUndoRedo({unitID:a,undoMutations:d,redoMutations:[{id:L.id,params:c}]}),f}},nt={type:r.COMMAND,id:`sheet.command.move-conditional-rule`,handler(e,t){if(!t)return!1;let n=e.get(l),r=e.get(o),i=e.get(u),a=e.get(P),s=C(i,t);if(!s)return!1;let{unitId:c,subUnitId:d}=s,f=Ue(t.start,t.end,a.getSubunitRules(c,d)||[],e=>e.cfId);if(!f)return!1;let[p,m]=f,h={unitId:c,subUnitId:d,start:p,end:m},g=Ye(h),_=r.syncExecuteCommand(F.id,h);return _&&n.pushUndoRedo({unitID:c,redoMutations:[{id:F.id,params:h}],undoMutations:g}),_}},rt={type:r.COMMAND,id:`sheet.command.set-conditional-rule`,handler(e,t){if(!t)return!1;let n=e.get(l),r=e.get(o),i=C(e.get(u),t);if(!i)return!1;let{unitId:a,subUnitId:s}=i,c={unitId:a,subUnitId:s,rule:t.rule,cfId:t.cfId},d=Qe(e,c),f=r.syncExecuteCommand(z.id,c);return f&&n.pushUndoRedo({unitID:a,undoMutations:d,redoMutations:[{id:z.id,params:c}]}),f}};function B(e,t){return function(n,r){t(n,r,e)}}function it(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let V=class extends a{constructor(e,t){super(),this._registerOtherFormulaService=e,this._conditionalFormattingRuleModel=t,N(this,`_formulaMap`,new Map),N(this,`_result$`,new Se),N(this,`result$`,this._result$.asObservable()),this._initFormulaResultChange(),this._initRuleChange()}_initRuleChange(){let e=e=>{switch(e.type){case O.colorScale:return e.config.some(e=>e.value.type===A.formula);case O.dataBar:return[e.config.max,e.config.min].some(e=>e.type===A.formula);case O.iconSet:return e.config.some(e=>e.value.type===A.formula)}};this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(t=>{let{unitId:n,subUnitId:r,rule:i,oldRule:a}=t;t.type===`delete`&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`set`&&(e(i.rule)||a&&e(a.rule))&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`add`&&this._registerRuleFormulas(n,r,i)}))}_registerRuleFormulas(e,t,n){switch(n.rule.type){case O.highlightCell:if(n.rule.subType===k.formula){let r=n.rule.value;r&&this.registerFormulaWithRange(e,t,n.cfId,r,n.ranges)}break}}_initFormulaResultChange(){this.disposeWithMe(this._registerOtherFormulaService.formulaResult$.subscribe(e=>{for(let t in e)for(let n in e[t]){let r=e[t][n];for(let e of r){let r=this._ensureSubunitFormulaMap(t,n).getValue(e.formulaId,[`formulaId`]);if(!r)continue;let i=this._getAllFormulaResultByCfId(t,n,r.cfId).every(e=>{let r=this._registerOtherFormulaService.getFormulaValueSync(t,n,e.formulaId);return(r==null?void 0:r.status)===w.SUCCESS});this._result$.next({...r,isAllFinished:i})}}}))}_ensureSubunitFormulaMap(e,t){let n=this._formulaMap.get(e);n||(n=new Map,this._formulaMap.set(e,n));let r=n.get(t);return r||(r=new y([],[`formulaId`,`id`]),n.set(t,r)),r}getSubUnitFormulaMap(e,t){var n;return(n=this._formulaMap.get(e))==null?void 0:n.get(t)}registerFormulaWithRange(e,t,n,r,i=[{startRow:0,endRow:0,startColumn:0,endColumn:0}]){let a=this._ensureSubunitFormulaMap(e,t),o=this.createCFormulaId(n,r);if(a.getValue(o,[`id`]))return;let s=this._registerOtherFormulaService.registerFormulaWithRange(e,t,r,i,void 0,Te.CONDITIONAL_FORMATTING,n);a.addValue({formulaText:r,unitId:e,subUnitId:t,cfId:n,id:o,formulaId:s})}_removeFormulaByCfId(e,t,n){let r=this.deleteCache(e,t,n).map(e=>e.formulaId);this._registerOtherFormulaService.deleteFormula(e,t,r)}getFormulaResultWithCoords(e,t,n,r,i=0,a=0){let o=this.getSubUnitFormulaMap(e,t);if(!o)return{status:w.NOT_REGISTER};let s=o.getValue(this.createCFormulaId(n,r),[`id`]);if(!s)return{status:w.NOT_REGISTER};let c=this._registerOtherFormulaService.getFormulaValueSync(e,t,s.formulaId);if(!c)return{status:w.NOT_REGISTER};if(c.status===w.SUCCESS&&c.result){var l;let e=(l=c.result[i])==null?void 0:l[a];return{result:this._getCellValue(e),status:w.SUCCESS}}return{status:c.status}}getFormulaMatrix(e,t,n,r){let i=this.getSubUnitFormulaMap(e,t);if(!i)return{status:w.NOT_REGISTER};let a=i.getValue(this.createCFormulaId(n,r),[`id`]);if(!a)return{status:w.NOT_REGISTER};let o=this._registerOtherFormulaService.getFormulaValueSync(e,t,a.formulaId);if(!o)return{status:w.NOT_REGISTER};if(o.status===w.SUCCESS&&o.result){let e=new m;return new m(o.result).forValue((t,n,r)=>{e.setValue(t,n,this._getCellValue(r))}),{result:e,status:w.SUCCESS}}return{status:o.status}}_getCellValue(n){if(!n||!n[0]||!n[0][0])return!1;let r=n[0][0];return(r==null?void 0:r.t)===t.BOOLEAN?r.v===e.TRUE||r.v===!0:r==null?void 0:r.v}deleteCache(e,t,n,r){let i=this.getSubUnitFormulaMap(e,t);if(!i)return[];if(r){let e=this.createCFormulaId(n,r);return i.deleteValue(e,[`id`]),[]}else{let e=i.getValues().filter(e=>e.cfId===n);return e.forEach(e=>{i.deleteValue(e.formulaId,[`formulaId`])}),e}}_getAllFormulaResultByCfId(e,t,n){let r=this.getSubUnitFormulaMap(e,t);return r?r.getValues().filter(e=>e.cfId===n):[]}createCFormulaId(e,t){return`${e}_${t}`}};V=it([B(0,d(Ee)),B(1,d(P))],V);let H=function(e){return e.preComputingStart=`preComputingStart`,e.preComputing=`preComputing`,e.preComputingEnd=`preComputingEnd`,e.preComputingError=`preComputingError`,e}({});var at=class{constructor(e){this._context=e,N(this,`_cache`,void 0),N(this,`_preComputingStatus$`,new xe(H.preComputingStart)),N(this,`preComputingStatus$`,this._preComputingStatus$.asObservable().pipe(ke())),N(this,`_preComputingCache`,void 0),N(this,`_rule`,void 0),this._cache=new p(e.limit),this._rule=e.rule,this._preComputingCache=null,this._initClearCacheListener()}setCacheLength(e){this._cache.limit=e}clearCache(){this._cache.clear()}resetPreComputingCache(){this._preComputingStatus$.next(H.preComputingStart),this._preComputingCache=null}updateRule(e){this._rule=e,this.resetPreComputingCache()}getCell(e,t){let n=this._createKey(e,t);if(this._preComputingStatus$.getValue()===H.preComputing)return this._cache.get(n);let r=this.getPreComputingResult(e,t);if(r===null&&(this._preComputingStatus$.next(H.preComputingStart),this.preComputing(e,t,this._getContext()),r=this.getPreComputingResult(e,t),r===null)||(this._preComputingStatus$.next(H.preComputingEnd),this._cache.has(n)))return this._cache.get(n);let i=this.getCellResult(e,t,r,this._getContext());return i!==null&&this._setCache(e,t,i),i}setPreComputingCache(e){this._preComputingCache=e}getPreComputingResult(e,t){return this._preComputingCache}_createKey(e,t){return`${e}_${t}`}_setCache(e,t,n){let r=this._createKey(e,t);this._cache.set(r,n)}_getContext(){return{...this._context,rule:this._rule}}_initClearCacheListener(){this.preComputingStatus$.subscribe(e=>{e===H.preComputingEnd&&this.clearCache()})}},ot=class extends at{preComputing(e,r,i){let a=i.rule,o=i.worksheet,s=new m;a.rule.config.every(e=>e.value.type===A.num)||Y(a.ranges,o.getMaxRows()-1,o.getMaxColumns()-1).forEach(e=>{_.foreach(e,(e,n)=>{let r=i.getCellValue(e,n),a=r&&r.v;if(!G(a)&&(r==null?void 0:r.t)===t.NUMBER){let t=Number(a);!Number.isNaN(t)&&s.setValue(e,n,t)}})});let c=[...a.rule.config].sort((e,t)=>e.index-t.index).map(e=>({value:q(e.value,s,{...i,cfId:a.cfId}),color:new n(e.color)}));if(!c.some(e=>Fe(e.value)?e.value.status!==w.SUCCESS:!1)){let e=c.map(e=>e.color).reduce((e,t,n)=>(e.result.push({color:t,value:e.sortValue[n]}),e),{result:[],sortValue:c.map(e=>e.value.result).sort((e,t)=>e-t)}).result;this.setPreComputingCache(e),this._preComputingStatus$.next(H.preComputingEnd);return}this._preComputingStatus$.next(H.preComputing)}getCellResult(e,n,r,i){if(!r)return null;let a=i.getCellValue(e,n);if(a.t===t.NUMBER){let e=Number(a.v);if(!Number.isNaN(e))return Tt(r,e)}}};const st=`sheet-conditional-rule-data-bar`,ct=`#ffbe38`,lt=`#abd91a`,ut=`#000`,dt=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var ft=class extends Ne{constructor(...e){super(...e),N(this,`_paddingRightAndLeft`,2),N(this,`_paddingTopAndBottom`,2),N(this,`uKey`,st),N(this,`Z_INDEX`,34),N(this,`_radius`,1)}draw(e,t,n,r){let{worksheet:i}=n;if(!i)return!1;let a=new Set;e.save(),_.foreach(n.rowColumnSegment,(t,o)=>{if(!i.getRowVisible(t)||!i.getColVisible(o))return;let s=n.getCellWithCoordByIndex(t,o,!1),{isMerged:c,isMergedMainCell:l,mergeInfo:u}=s,d=i.getCell(t,o);if(c&&(d=i.getCell(u.startRow,u.startColumn)),!(d!=null&&d.dataBar)||!this.isRenderDiffRangesByCell(u,r))return;if(c||l){let e=dt(u);if(a.has(e))return;a.add(e)}let{color:f,value:p,startPoint:m,isGradient:h}=d.dataBar,{startX:g,endX:_,startY:v,endY:y}=c||l?u:s,b=_-g,x=y+Me-v,S=b-this._paddingRightAndLeft*2,ee=x-this._paddingTopAndBottom*2;if(p>0){let t=Math.max(S*(1-m/100)*p/100,1),n=g+this._paddingRightAndLeft+m/100*S,r=v+this._paddingTopAndBottom;if(h){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,f),i.addColorStop(1,`rgb(255 255 255)`),e.fillStyle=i,e.strokeStyle=f,e.lineWidth=1}else e.fillStyle=f;this._drawRectWithRoundedCorner(e,n,r,t,ee,!1,!0,!0,!1),h&&e.stroke()}else{let t=Math.max(S*m/100*Math.abs(p)/100,1),n=g+this._paddingRightAndLeft+m/100*S-t,r=v+this._paddingTopAndBottom;if(h){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,`rgb(255 255 255)`),i.addColorStop(1,f),e.fillStyle=i,e.strokeStyle=f,e.lineWidth=1}else e.fillStyle=f;this._drawRectWithRoundedCorner(e,n,r,t,ee,!0,!1,!1,!0),h&&e.stroke()}}),e.restore()}_drawRectWithRoundedCorner(e,t,n,r,i,a,o,s,c){let l=this._radius;!i||!r||(e.beginPath(),e.moveTo(t+l,n),e.lineTo(t+r-l,n),o?e.arcTo(t+r,n,t+r,n+l,l):e.lineTo(t+r,n),e.lineTo(t+r,n+i-l),s?e.arcTo(t+r,n+i,t+r-l,n+i,l):e.lineTo(t+r,n+i),e.lineTo(t+l,n+i),c?e.arcTo(t,n+i,t,n+i-l,l):e.lineTo(t,n+i),e.lineTo(t,n+l),a?e.arcTo(t,n,t+l,n,l):e.lineTo(t,n),e.closePath(),e.fill())}};Pe.add(ft);const pt=e=>Math.max(Math.min(100,e),0),mt=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var ht=class extends at{preComputing(e,n,r){let i=r.rule,a=i.rule,o=r.worksheet,s=new m;[i.rule.config.max,i.rule.config.min].every(e=>e.type===A.num)||Y(i.ranges,o.getMaxRows()-1,o.getMaxColumns()-1).forEach(e=>{_.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!G(a)&&(i==null?void 0:i.t)===t.NUMBER){let t=Number(a);!Number.isNaN(t)&&s.setValue(e,n,t)}})});let c=q(a.config.min,s,{...r,cfId:i.cfId}),l=q(a.config.max,s,{...r,cfId:i.cfId}),u=0,d=0;if(c.status===w.SUCCESS){let e=Number(c.result);u=Number.isNaN(e)?0:e}else{this._preComputingStatus$.next(H.preComputing);return}if(l.status===w.SUCCESS){let e=Number(l.result),t=Number.isNaN(e)?0:e;d=Math.max(t,u),u=Math.min(t,u);let n=50;if(u<0&&d<=0)n=100;else if(u<0&&d>0){let e=Math.abs(d)+Math.abs(u);n=Math.abs(u)/e*100}else u>=0&&d>0&&(n=0);this.setPreComputingCache({min:u,max:d,startPoint:n}),this._preComputingStatus$.next(H.preComputingEnd);return}this._preComputingStatus$.next(H.preComputing)}getCellResult(e,t,n,r){let{min:i,max:a,startPoint:o}=n,s=r.rule.rule,c=s.isShowValue,l=s.config.isGradient,u=mt(e,t,r.getCellValue);if(!(u===null||u<i||i===a||a<i)){if(u===0)return{color:ut,startPoint:o,value:0,isGradient:l,isShowValue:c};if(i<0&&a<=0){let e=a-i,t=pt((a-u)/e*100);return t===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-t,isGradient:l,isShowValue:c}}else if(i<0&&a>0)if(u>0){let e=pt(Math.min(u/a,1)*100);return e===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:o,value:e,isGradient:l,isShowValue:c}}else{let e=pt(Math.min(Math.abs(u)/Math.abs(i),1)*100);return e===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-e,isGradient:l,isShowValue:c}}else if(i>=0&&a>0){let e=a-i,t=pt((1-(a-u)/e)*100);return t===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:0,value:t,isGradient:l,isShowValue:c}}}}},gt=class extends at{preComputing(e,n,r){let i=r.rule.rule,a=Y(r.rule.ranges,r.worksheet.getMaxRows()-1,r.worksheet.getMaxColumns()-1),o=(()=>{switch(i.subType){case k.average:{let e=0,n=0;return a.forEach(i=>{_.foreach(i,(i,a)=>{let o=r.getCellValue(i,a),s=K(o);o&&o.t===t.NUMBER&&!G(s)&&(e+=Number(s)||0,n++)})}),{value:e/n,type:i.subType}}case k.uniqueValues:case k.duplicateValues:{let e=new Map;return a.forEach(t=>{_.foreach(t,(t,n)=>{let i=K(r.getCellValue(t,n));if(!G(i)){let t=e.get(i);t?e.set(i,t+1):e.set(i,1)}})}),{value:e,type:i.subType}}case k.rank:{let e=[];a.forEach(n=>{_.foreach(n,(n,i)=>{let a=r.getCellValue(n,i),o=K(a);a&&a.t===t.NUMBER&&!G(o)&&e.push(Number(o)||0)})}),e.sort((e,t)=>t-e);let n=r.rule.rule;if(n.isPercent){n.isBottom&&(e=e.toReversed());let t=b.clamp(n.value,0,100)/100,r=Math.floor(t*e.length),a=b.clamp(r-1,0,e.length-1);return{value:e[a],type:i.subType}}let o=Math.floor(b.clamp(n.isBottom?n.value-1:n.value,0,e.length));return n.isBottom?{value:e[e.length-o-1],type:i.subType}:{value:e[Math.max(o-1,0)],type:i.subType}}case k.formula:{let e=i,t=r.accessor.get(V);t.registerFormulaWithRange(r.unitId,r.subUnitId,r.rule.cfId,e.value,r.rule.ranges);let n=t.getFormulaMatrix(r.unitId,r.subUnitId,r.rule.cfId,e.value);return n&&n.status===w.SUCCESS?(this._preComputingStatus$.next(H.preComputingEnd),{value:n.result,type:i.subType}):(this._preComputingStatus$.next(H.preComputing),null)}case k.timePeriod:switch(i.operator){case E.last7Days:return{value:{start:S().subtract(7,`day`).valueOf(),end:S().valueOf()},type:i.subType};case E.lastMonth:return{value:{start:S().startOf(`month`).subtract(1,`month`).valueOf(),end:S().endOf(`month`).subtract(1,`month`).valueOf()},type:i.subType};case E.lastWeek:return{value:{start:S().startOf(`week`).subtract(1,`week`).valueOf(),end:S().endOf(`week`).subtract(1,`week`).valueOf()},type:i.subType};case E.nextMonth:return{value:{start:S().startOf(`month`).add(1,`month`).valueOf(),end:S().endOf(`month`).add(1,`month`).valueOf()},type:i.subType};case E.nextWeek:return{value:{start:S().startOf(`week`).add(1,`week`).valueOf(),end:S().endOf(`week`).add(1,`week`).valueOf()},type:i.subType};case E.thisMonth:return{value:{start:S().startOf(`month`).valueOf(),end:S().endOf(`month`).valueOf()},type:i.subType};case E.thisWeek:return{value:{start:S().startOf(`week`).valueOf(),end:S().endOf(`week`).valueOf()},type:i.subType};case E.today:return{value:{start:S().startOf(`day`).valueOf(),end:S().endOf(`day`).valueOf()},type:i.subType};case E.tomorrow:return{value:{start:S().startOf(`day`).add(1,`day`).valueOf(),end:S().endOf(`day`).add(1,`day`).valueOf()},type:i.subType};case E.yesterday:return{value:{start:S().startOf(`day`).subtract(1,`day`).valueOf(),end:S().endOf(`day`).subtract(1,`day`).valueOf()},type:i.subType}}}})();this.setPreComputingCache(o)}getCellResult(e,n,r,i){let a=i.getCellValue(e,n),o=i.rule.rule;return(()=>{switch(o.subType){case k.number:{let e=a&&Number(a.v),n=(a==null?void 0:a.t)===t.NUMBER,r=o;return n?G(e)||Number.isNaN(e)?void 0:J({operator:r.operator,value:r.value||0},e||0):!![D.notEqual,D.notBetween].includes(r.operator)}case k.text:{let e=o,t=K(a),n=G(t)?``:String(t),r=e.value||``;switch(e.operator){case T.beginsWith:return n.startsWith(r);case T.containsBlanks:return/^\s*$/.test(n);case T.notContainsBlanks:return!/^\s*$/.test(n);case T.containsErrors:return we.has(n);case T.notContainsErrors:return!we.has(n);case T.containsText:return n.indexOf(r)>-1;case T.notContainsText:return n.indexOf(r)===-1;case T.endsWith:return n.endsWith(r);case T.equal:return n===r;case T.notEqual:return n!==r;default:return!1}}case k.timePeriod:{let e=K(a);if(G(e)||Number.isNaN(Number(e))||(a==null?void 0:a.t)!==t.NUMBER||!r)return;let n=St(Number(e)),{start:i,end:o}=r.value;return n>=i&&n<=o}case k.average:{let e=a&&a.v,n=Number(e),i=(a==null?void 0:a.t)===t.NUMBER,s=o;if(!i)return D.notEqual===s.operator;if(G(e)||Number.isNaN(n)||!r)return!1;let c=r.value;switch(s.operator){case D.greaterThan:return n>c;case D.greaterThanOrEqual:return n>=c;case D.lessThan:return n<c;case D.lessThanOrEqual:return n<=c;case D.equal:return W(n,c);case D.notEqual:return!W(n,c);default:return!1}}case k.rank:{let e=K(a),n=Number(e);if(G(e)||Number.isNaN(n)||(a==null?void 0:a.t)!==t.NUMBER||!r)return!1;let i=r.value;return o.isBottom?n<=i:n>=i}case k.uniqueValues:{let e=K(a);return G(e)||!r?!1:r.value.get(e)===1}case k.duplicateValues:{let e=K(a);if(G(e)||!r)return!1;let t=r.value.get(e);return t&&t!==1}case k.formula:{let t=r==null?void 0:r.value;if(t){let r=i.rule.ranges[0],a=e-r.startRow,o=n-r.startColumn;return t.getValue(a,o)===!0}return!1}}})()?o.style:{}}};const _t=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var vt=class extends at{preComputing(e,n,r){let i=r.rule.rule,a=r.worksheet,o=new m;i.config.every(e=>e.value.type===A.num)||Y(r.rule.ranges,a.getMaxRows()-1,a.getMaxColumns()-1).forEach(e=>{_.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!G(a)&&(i==null?void 0:i.t)===t.NUMBER){let t=Number(a);!Number.isNaN(t)&&o.setValue(e,n,t)}})});let s=i.config.map(e=>q(e.value,o,{...r,cfId:r.rule.cfId}));if(!s.some(e=>e.status!==w.SUCCESS)){let e=s.map((e,t)=>({operator:i.config[t].operator,value:Number(e.result)||0})).reduce((e,t,n,r)=>{let a=i.config[n];if(!n||n===r.length-1)e.push({...t,iconId:a.iconId,iconType:a.iconType});else{let i=r[n-1];J(i,t.value)||e.push({...t,iconId:a.iconId,iconType:a.iconType})}return e},[]);this.setPreComputingCache(e),this._preComputingStatus$.next(H.preComputingEnd);return}this._preComputingStatus$.next(H.preComputing)}getCellResult(e,t,n,r){if(!n)return null;let i=_t(e,t,r.getCellValue);if(i===null)return;let a=r.rule.rule,o=a.isShowValue===void 0?!0:!!a.isShowValue;for(let e=0;e<n.length;e++){let t=n[e],r={...t},a={...t},{iconId:s,iconType:c}=t;if(e===0){if(J(t,i))return{iconId:s,iconType:c,isShowValue:o}}else if(e===n.length-1)return{iconId:s,iconType:c,isShowValue:o};else{let t=n[e-1];if(a.operator=wt(t.operator),a.value=t.value,J(r,i)&&J(a,i))return{iconId:s,iconType:c,isShowValue:o}}}}};const yt=1e3*3*3;let U=class extends a{constructor(e,t,n,r){super(),this._injector=e,this._conditionalFormattingRuleModel=t,this._conditionalFormattingFormulaService=n,this._univerInstanceService=r,N(this,`_calculateUnitManagers`,new Map),N(this,`_rTreeManager`,new g),N(this,`_cellCache`,new p(yt)),N(this,`_markDirty$`,new Se),N(this,`markDirty$`,this._markDirty$.asObservable()),N(this,`_markRuleDirtyAtOnce`,(e,t,n,r=!0)=>{if(this._cellCache.clear(),r){let r=this._ensureCalculateUnitManager(e,t).get(n);r&&r.resetPreComputingCache()}this._markDirty$.next({unitId:e,subUnitId:t,cfId:n})}),N(this,`markRuleDirty`,(()=>{let e=new Se;return this.disposeWithMe(e.pipe(Oe(100),Ae(e=>!!e.length),je(e=>{let t=new Set,n=[];return e.forEach(e=>{let r=`${e.unitId}_${e.subUnitId}_${e.cfId}`;if(t.has(r)){if(e.isNeedResetPreComputingCache){let t=n.find(t=>t.cfId===e.cfId);t.isNeedResetPreComputingCache=!0}return}t.add(r),n.push({...e})}),n})).subscribe(e=>{e.forEach(e=>{this._markRuleDirtyAtOnce(e.unitId,e.subUnitId,e.cfId,e.isNeedResetPreComputingCache)})})),(t,n,r,i=!0)=>{e.next({unitId:t,subUnitId:n,cfId:r,isNeedResetPreComputingCache:i})}})()),this._initRuleListener(),this._handleCustomFormulasSeparately(),this._initCFFormulaListener()}_initCFFormulaListener(){this.disposeWithMe(this._conditionalFormattingFormulaService.result$.subscribe(({unitId:e,subUnitId:t,cfId:n,isAllFinished:r})=>{r&&this._markRuleDirtyAtOnce(e,t,n,r)}))}getCellCfs(e,t,n,r){let i=this._createCacheKey(e,t,n,r);if(this._cellCache.has(i))return this._cellCache.get(i);let a=this._getCellCfs(e,t,n,r);return a.length&&this._cellCache.set(i,a),a}_getCellCfs(e,t,n,r){var i;let a=(i=this._conditionalFormattingRuleModel.getSubunitRules(e,t))==null?[]:i,o=this._ensureCalculateUnitManager(e,t),s=this._rTreeManager.bulkSearch([{unitId:e,sheetId:t,range:{startColumn:r,endColumn:r,startRow:n,endRow:n}}]),c=a.filter(e=>s.has(e.cfId));return c.length?c.map(e=>{let t=o.get(e.cfId);return t?{cfId:e.cfId,result:t.getCell(n,r)}:null}).filter(e=>!!e).map((e,t)=>({...e,priority:t})):[]}dispose(){this.clearCache(),super.dispose()}clearCache(){this._calculateUnitManagers.clear(),this._cellCache.clear(),this._rTreeManager.clear()}_handleCustomFormulasSeparately(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{if(e.type===`set`){let{unitId:t,subUnitId:n}=e,r=e.oldRule;r.rule.type===O.highlightCell&&r.rule.subType===k.formula&&this._conditionalFormattingFormulaService.deleteCache(t,n,r.cfId)}}))}_initRuleListener(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{let{unitId:t,subUnitId:n,rule:r}=e,{cfId:i,ranges:a}=r,o=this._ensureCalculateUnitManager(t,n);switch(this.markRuleDirty(t,n,i),e.type){case`add`:{this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e})));let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.set(r.cfId,e);break}case`delete`:this._rTreeManager.bulkRemove(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),o.delete(r.cfId);break;case`set`:{let s=e.oldRule;if(this._rTreeManager.bulkRemove(s.ranges.map(e=>({unitId:t,sheetId:n,id:s.cfId,range:e}))),this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),s.rule.type!==r.rule.type){let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.delete(s.cfId),o.set(r.cfId,e)}else{let e=o.get(s.cfId);if(!e)return;e.updateRule(r)}}}}))}_ensureCalculateUnitManager(e,t){let n=this._calculateUnitManagers.get(e);n||(n=new Map,this._calculateUnitManagers.set(e,n));let r=n.get(t);return r||(r=new Map,n.set(t,r)),r}_createRuleCalculateUnitInstance(e,t,n){let r=this._univerInstanceService.getUnit(e),i=r==null?void 0:r.getSheetBySheetId(t);if(!r||!i)return;let a={workbook:r,worksheet:i,unitId:e,subUnitId:t,accessor:this._injector,rule:n,limit:yt,getCellValue:(e,t)=>i.getCellRaw(e,t)||{}};switch(n.rule.type){case O.colorScale:return new ot(a);case O.dataBar:return new ht(a);case O.highlightCell:return new gt(a);case O.iconSet:return new vt(a)}}_createCacheKey(e,t,n,r){return`${e}_${t}_${n}_${r}`}setCacheLength(e=yt){this._cellCache.limit!==e&&(this._cellCache.limit=e,this._calculateUnitManagers.forEach(t=>{t.forEach(t=>{t.forEach(t=>{t.setCacheLength(e)})})}))}};U=it([B(0,d(f)),B(1,d(P)),B(2,d(V)),B(3,u)],U);function W(e,t){return Math.abs(e-t)<2**-52}const G=e=>e==null||typeof e==`string`&&e.trim()===``,K=n=>{var r;if(!n)return null;if(n.t===t.BOOLEAN)return n.v===e.TRUE?Ce.TRUE:Ce.FALSE;let i=n.v,a=(r=n.p)==null||(r=r.body)==null?void 0:r.dataStream.replace(/\r\n$/,``);return G(i)?G(a)?null:a:i},bt=86400;function xt(e,t=!0){if(t&&e>=0){if(e===0)return[1900,1,0];if(e===60)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let n=e+68569+2415019,r=Math.floor(4*n/146097);n-=Math.floor((146097*r+3)/4);let i=Math.floor(4e3*(n+1)/1461001);n=n-Math.floor(1461*i/4)+31;let a=Math.floor(80*n/2447),o=n-Math.floor(2447*a/80);n=Math.floor(a/11);let s=a+2-12*n;return[100*(r-49)+i+n|0,s|0,o|0]}const St=e=>{let t=e|0,n=bt*(e-t),r=Math.floor(n);n-r>.9999&&(r+=1,r===bt&&(r=0,t+=1));let i=r<0?bt+r:r,[a,o,s]=xt(e,!0);return S(`${a}/${o}/${s} ${Math.floor(i/60/60)%60}:${Math.floor(i/60)%60}:${Math.floor(i)%60}`).valueOf()},q=(e,t,n)=>{switch(e.type){case A.max:{let e=0;return t.forValue((t,n,r)=>{r>e&&(e=r)}),{status:w.SUCCESS,result:e}}case A.min:{let e;return t.forValue((t,n,r)=>{e===void 0&&(e=r),r<e&&(e=r)}),{status:w.SUCCESS,result:e}}case A.percent:{let n,r;t.forValue((e,t,i)=>{(n===void 0||r===void 0)&&(n=i,r=i),i>n&&(n=i),i<r&&(r=i)});let i=(n||0)-(r||0),a=Math.max(Math.min(Number(e.value)||0,100),0);return{status:w.SUCCESS,result:a/100*i+(r||0)}}case A.percentile:{let n=t.toNativeArray().sort((e,t)=>e-t),r=Math.max(Math.min(Number(e.value)||0,100),0),i=(n.length-1)*r/100,a=Math.floor(i),o=i-a,s=n[a]+(n[Math.min(a+1,n.length-1)]-n[a])*o;return{status:w.SUCCESS,result:s}}case A.formula:{let{accessor:t,unitId:r,subUnitId:i,cfId:a}=n,o=String(e.value),s=t.get(V);return s.registerFormulaWithRange(r,i,a,o),s.getFormulaResultWithCoords(r,i,a,o)}case A.num:default:{let t=Number(e.value);return{status:w.SUCCESS,result:Number.isNaN(t)?0:t}}}},Ct=(e,t,n,r)=>{let{accessor:i}=r,a=i.get(U),o=new m;return n.ranges.forEach(r=>{_.foreach(r,(r,i)=>{let s=a.getCellCfs(e,t,r,i);if(s){let e=s.find(e=>e.cfId===n.cfId);e!=null&&e.result&&o.setValue(r,i,e.result)}})}),o},J=(e,t)=>{switch(e.operator){case D.between:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return t>=n&&t<=r}case D.notBetween:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return!(t>=n&&t<=r)}case D.equal:return W(e.value||0,t);case D.notEqual:return!W(e.value||0,t);case D.greaterThan:return t>(e.value||0);case D.greaterThanOrEqual:return t>=(e.value||0);case D.lessThan:return t<(e.value||0);case D.lessThanOrEqual:return t<=(e.value||0);default:return!1}},wt=e=>{switch(e){case D.greaterThan:return D.lessThanOrEqual;case D.greaterThanOrEqual:return D.lessThan;case D.lessThan:return D.greaterThanOrEqual;case D.lessThanOrEqual:return D.greaterThan}return e},Tt=(e,t)=>{let r=e=>e.a===void 0?{...e,a:1}:e,i=e.findIndex(e=>e.value>=t),a=i-1;if(i===0)return e[0].color.toRgbString();if(a>=0){let o=e[a],s=e[i];if(o.color.isValid&&s.color.isValid){let e=r(o.color.toRgb()),i=r(s.color.toRgb()),a=s.value-o.value,c=(t-o.value)/a;return new n([`r`,`g`,`b`,`a`].reduce((t,n)=>{let r=e[n];return t[n]=(i[n]-r)*c+r,t},{})).toRgbString()}}else return e[e.length-1].color.toRgbString()},Y=(e,t,n)=>e.map(e=>{if(e.startColumn>n||e.startRow>t)return null;let r={...e};return r.endRow=Math.min(r.endRow,t),r.endColumn=Math.min(r.endColumn,n),r}).filter(e=>!!e);function Et(e){let t=0;return new m(e).forValue((e,n,r)=>{t=Math.max(Number.isNaN(t)?0:t,Number(r))}),t}const X={feedback:{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`},star:{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%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%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%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`},progress:{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`},signal:{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`},feeling:{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`},arrow:{"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`},shape:{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`,"rhomboid-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%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%23FFBD37%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`},feedback2:{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`},flag:{"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`},cell:{"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`}},Dt=[{title:`sheet.cf.iconSet.direction`,group:[{name:`3Arrows`,list:[X.arrow[`up-green`],X.arrow[`right-gold`],X.arrow[`down-red`]]},{name:`3ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`right-gray`],X.arrow[`down-gray`]]},{name:`4Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`4ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`5Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`right-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`5ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`right-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`3Triangles`,list:[X.shape.up,X.shape.cross,X.shape.down]}]},{title:`sheet.cf.iconSet.shape`,group:[{name:`3TrafficLights1`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`]]},{name:`3Signs`,list:[X.shape[`roundness-greed`],X.shape[`triangle-gold`],X.shape[`rhomboid-red`]]},{name:`3TrafficLights2`,list:[X.shape[`indicate-greed`],X.shape[`indicate-gold`],X.shape[`indicate-red`]]},{name:`4RedToBlack`,list:[X.shape[`roundness-red`],X.shape[`roundness-pink`],X.shape[`roundness-gray`],X.shape[`roundness-black`]]},{name:`4TrafficLights`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`],X.shape[`roundness-black`]]}]},{title:`sheet.cf.iconSet.mark`,group:[{name:`3Symbols`,list:[X.feedback.correct,X.feedback.warn,X.feedback.mistake]},{name:`3Symbols2`,list:[X.feedback2.correct2,X.feedback2.warn2,X.feedback2.mistake2]},{name:`3Flags`,list:[X.flag[`flag-green`],X.flag[`flag-gold`],X.flag[`flag-red`]]}]},{title:`sheet.cf.iconSet.rank`,group:[{name:`4Rating`,list:[X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Rating`,list:[X.signal.signal0,X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Quarters`,list:[X.progress.progress100,X.progress.progress75,X.progress.progress50,X.progress.progress25,X.progress.progress0]},{name:`_5Felling`,list:[X.feeling.guffaw,X.feeling.smile,X.feeling.noninductive,X.feeling.dissatisfied,X.feeling.impatient]},{name:`5Boxes`,list:[X.cell[`cell-100`],X.cell[`cell-75`],X.cell[`cell-50`],X.cell[`cell-25`],X.cell[`cell-0`]]},{name:`3Stars`,list:[X.star.starFull,X.star.starIncomplete,X.star.starEmpty]}]}],Z=Dt.reduce((e,t)=>{let{group:n}=t;for(let t of n)e[t.name]=t.list;return e},{});for(let e in Z){let t=Z[e];Object.freeze(t)}const Ot=`EMPTY_ICON_TYPE`;var kt=`@univerjs/sheets-conditional-formatting`,At=`0.18.0`;const jt=`ssheets-conditional-formatting.config`;Symbol(jt);const Mt={};let Q=class extends a{get _conditionalFormattingViewModelV2(){return this._injector.get(U)}constructor(e,t,n,r,i,a){super(),this._conditionalFormattingRuleModel=e,this._injector=t,this._univerInstanceService=n,this._resourceManagerService=r,this._sheetInterceptorService=i,this._commandService=a,this._initCellChange(),this._initSnapshot(),this._initSheetChange()}composeStyle(e,t,n,r){let i=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,r);if(!(i!=null&&i.length))return null;let a=[],o=-1;for(let n of i){let r=this._conditionalFormattingRuleModel.getRule(e,t,n.cfId);r&&(a.push({rule:r,cacheItem:n}),o===-1&&r.stopIfTrue&&(o=a.length-1))}if(!a.length)return null;let s=o>-1?a.slice(0,o+1):a,c={};for(let e=s.length-1;e>=0;e--){let{rule:t,cacheItem:n}=s[e],r=t.rule.type;if(r===O.highlightCell)n.result&&re(c,{style:n.result});else if(r===O.colorScale){let e=n.result;e&&typeof e==`string`&&(c.style={...c.style||{},bg:{rgb:e}})}else if(r===O.dataBar){let e=n.result;e&&(c.dataBar=e,c.isShowValue=e.isShowValue)}else if(r===O.iconSet){let e=n.result;e&&(c.iconSet=e,c.isShowValue=e.isShowValue)}}return c}_initSnapshot(){let e=e=>{let t=this._conditionalFormattingRuleModel.getUnitRules(e),n={};return t?(t.forEach((e,t)=>{n[t]=e}),JSON.stringify(n)):``},t=e=>{if(!e)return{};try{return JSON.parse(e)}catch{return{}}};this.disposeWithMe(this._resourceManagerService.registerPluginResource({pluginName:Ie,businesses:[x.UNIVER_SHEET],toJson:t=>e(t),parseJson:e=>t(e),onUnLoad:e=>{this._conditionalFormattingRuleModel.deleteUnitId(e),!te(e)&&this._conditionalFormattingViewModelV2.clearCache()},onLoad:(e,t)=>{Object.keys(t).forEach(n=>{[...t[n]].reverse().forEach(t=>{this._conditionalFormattingRuleModel.addRule(e,n,t)})})}}))}_initSheetChange(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:e=>{if(e.id===me.id){let t=e.params,n=C(this._univerInstanceService,t);if(!n)return{redos:[],undos:[]};let{unitId:r,subUnitId:i}=n,a=this._conditionalFormattingRuleModel.getSubunitRules(r,i);if(!a)return{redos:[],undos:[]};let o=[],s=[];return a.forEach(e=>{let t={unitId:r,subUnitId:i,cfId:e.cfId};o.push({id:L.id,params:t}),s.push(...I(this._injector,t))}),{redos:o,undos:s}}else if(e.id===oe.id){let t=e.params,n=C(this._univerInstanceService,t);if(!n)return{redos:[],undos:[]};let{unitId:r,subUnitId:i}=n,{targetSubUnitId:a}=t,o=this._conditionalFormattingRuleModel.getSubunitRules(r,i);if(!o)return{redos:[],undos:[]};let s=[],c=[];return o.forEach(e=>{let t={unitId:r,subUnitId:a,rule:{...e,cfId:this._conditionalFormattingRuleModel.createCfId(r,a)}};s.push({id:R.id,params:t}),c.push(Xe(this._injector,t))}),{redos:s,undos:c}}return{redos:[],undos:[]}}}))}_initCellChange(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{let t=(e,t,n)=>{let r=new Set;return n.forEach(([n,i])=>{let a=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,i);a==null||a.forEach(e=>r.add(e.cfId))}),[...r].map(n=>this._conditionalFormattingRuleModel.getRule(e,t,n)).filter(e=>!!e)};switch(e.id){case ge.id:{let{subUnitId:n,unitId:r,cellValue:i}=e.params,a=[];new m(i).forValue((e,t,n)=>{n&&Object.keys(n).some(e=>[`p`,`v`].includes(e))&&a.push([e,t])}),t(r,n,a).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(r,n,e.cfId)});break}case se.id:case fe.id:{let t=e.params,n=C(this._univerInstanceService,t);if(!n)return;let{worksheet:r,unitId:i,subUnitId:a}=n,{range:o}=t,s={...o,endColumn:r.getColumnCount()-1},c=this._conditionalFormattingRuleModel.getSubunitRules(i,a);c&&c.filter(e=>e.ranges.some(e=>v.intersects(e,s))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,a,e.cfId)});break}case pe.id:case ce.id:{let t=e.params,n=C(this._univerInstanceService,t);if(!n)return;let{worksheet:r,unitId:i,subUnitId:a}=n,{range:o}=t,s={...o,endRow:r.getRowCount()-1},c=this._conditionalFormattingRuleModel.getSubunitRules(i,a);c&&c.filter(e=>e.ranges.some(e=>v.intersects(e,s))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,a,e.cfId)});break}case de.id:{let t=e.params,n=C(this._univerInstanceService,t);if(!n)return;let{worksheet:r,unitId:i,subUnitId:a}=n,{sourceRange:o,targetRange:s}=t,c={startRow:Math.min(o.startRow,s.startRow),endRow:r.getRowCount()-1,startColumn:0,endColumn:r.getColumnCount()-1},l=this._conditionalFormattingRuleModel.getSubunitRules(i,a);l&&l.filter(e=>e.ranges.some(e=>v.intersects(e,c))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,a,e.cfId)});break}case le.id:{let t=e.params,n=C(this._univerInstanceService,t);if(!n)return;let{worksheet:r,unitId:i,subUnitId:a}=n,{sourceRange:o,targetRange:s}=t,c={startRow:0,endRow:r.getRowCount()-1,startColumn:Math.min(o.startColumn,s.startColumn),endColumn:r.getColumnCount()-1},l=this._conditionalFormattingRuleModel.getSubunitRules(i,a);l&&l.filter(e=>e.ranges.some(e=>v.intersects(e,c))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,a,e.cfId)});break}case ue.id:{let{unitId:n,to:r,from:i}=e.params,a=e=>{let r=[];new m(e.value).forValue((e,t)=>{r.push([e,t])}),t(n,e.subUnitId,r).forEach(t=>{this._conditionalFormattingViewModelV2.markRuleDirty(n,e.subUnitId,t.cfId)})};a(r),a(i);break}case he.id:{let{range:t,unitId:n,subUnitId:r}=e.params,i=this._conditionalFormattingRuleModel.getSubunitRules(n,r);i&&i.filter(e=>e.ranges.some(e=>v.intersects(e,t))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(n,r,e.cfId)});break}}}))}};Q=it([B(0,d(P)),B(1,d(f)),B(2,d(u)),B(3,d(c)),B(4,d(_e)),B(5,d(o))],Q);let $=class extends h{constructor(e=Mt,t,n,r){super(),this._config=e,this._injector=t,this._commandService=n,this._configService=r;let{...i}=re({},Mt,this._config);this._configService.setConfig(jt,i),[[Q],[V],[P],[U]].forEach(e=>{this._injector.add(e)}),[Ze,$e,et,tt,nt,rt,R,L,z,F].forEach(e=>{this._commandService.registerCommand(e)})}onStarting(){this._injector.get(Q),ae(this._injector,[[Q],[U]])}};N($,`pluginName`,Ie),N($,`packageName`,kt),N($,`version`,At),N($,`type`,x.UNIVER_SHEET),$=it([i(De),B(1,d(f)),B(2,d(o)),B(3,s)],$);const Nt=`sheet-conditional-rule-icon`,Pt=15,Ft=2,It=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var Lt=class extends Ne{constructor(){super(),N(this,`_paddingRightAndLeft`,2),N(this,`_width`,15),N(this,`_imageMap`,new Map),N(this,`uKey`,Nt),N(this,`Z_INDEX`,35),N(this,`_radius`,1),this._init()}draw(e,t,n,r){let{worksheet:i}=n;if(!i)return!1;let a=new Set;e.save(),_.foreach(n.rowColumnSegment,(t,o)=>{if(!i.getRowVisible(t)||!i.getColVisible(o))return;let s=n.getCellWithCoordByIndex(t,o,!1),{isMerged:c,isMergedMainCell:l,mergeInfo:u}=s,d=i.getCell(t,o);if(c&&(d=i.getCell(u.startRow,u.startColumn)),!(d!=null&&d.iconSet))return;let{iconType:f,iconId:p}=d.iconSet;if(f===`EMPTY_ICON_TYPE`)return;let m=this._imageMap.get(this._createKey(f,p));if(!m||!this.isRenderDiffRangesByCell(u,r))return;if(c||l){let e=It(u);if(a.has(e))return;a.add(e)}let{startX:h,endX:g,startY:_,endY:v}=c||l?u:s,y=g-h,b=v-_;if(this._width>b||this._width>y+this._paddingRightAndLeft*2)return;let x=(b-this._width)/2+_;e.drawImage(m,h+this._paddingRightAndLeft,x,this._width,this._width)}),e.restore()}_init(){for(let e in Z)Z[e].forEach((t,n)=>{let r=this._createKey(e,String(n)),i=new Image;i.onload=()=>{this._imageMap.set(r,i)},i.src=t})}_createKey(e,t){return`${e}_${t}`}};Pe.add(Lt);function Rt(e){if(typeof e!=`object`||!e)return e;let t={};for(let n in e)if(e.hasOwnProperty(n)){let r=Rt(e[n]);r!==void 0&&(t[n]=r)}return t}export{Ze as AddCfCommand,R as AddConditionalRuleMutation,Xe as AddConditionalRuleMutationUndoFactory,D as CFNumberOperator,O as CFRuleType,k as CFSubRuleType,T as CFTextOperator,E as CFTimePeriodOperator,A as CFValueType,yt as CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,$e as ClearRangeCfCommand,et as ClearWorksheetCfCommand,V as ConditionalFormattingFormulaService,Lt as ConditionalFormattingIcon,P as ConditionalFormattingRuleModel,Q as ConditionalFormattingService,U as ConditionalFormattingViewModel,Le as DEFAULT_BG_COLOR,Re as DEFAULT_FONT_COLOR,Ft as DEFAULT_PADDING,Pt as DEFAULT_WIDTH,ft as DataBar,tt as DeleteCfCommand,L as DeleteConditionalRuleMutation,I as DeleteConditionalRuleMutationUndoFactory,Ot as EMPTY_ICON_TYPE,Nt as IconUKey,nt as MoveCfCommand,F as MoveConditionalRuleMutation,Ye as MoveConditionalRuleMutationUndoFactory,Ie as SHEET_CONDITIONAL_FORMATTING_PLUGIN,rt as SetCfCommand,z as SetConditionalRuleMutation,$ as UniverSheetsConditionalFormattingPlugin,We as anchorUndoFactory,J as compareWithNumber,Ke as createCfId,ze as createDefaultRule,Be as createDefaultValue,Ve as createDefaultValueByValueType,st as dataBarUKey,lt as defaultDataBarNativeColor,ct as defaultDataBarPositiveColor,ut as defaultPlaceholderColor,Y as filterRange,j as findIndexByAnchor,Ct as getCacheStyleMatrix,K as getCellValue,Tt as getColorScaleFromValue,Et as getMaxInFormulaResult,wt as getOppositeOperator,q as getValueByType,Dt as iconGroup,Z as iconMap,Ge as isAnchorEqual,W as isFloatsEqual,G as isNullable,ne as isRangesEqual,He as moveByAnchor,Rt as removeUndefinedAttr,St as serialTimeToTimestamp,Qe as setConditionalRuleMutationUndoFactory,xt as toYMD_1900,Ue as transformSupportSymmetryAnchor};