@univerjs/sheets-conditional-formatting 0.5.4 → 0.5.5-experimental.20250122-3362a4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +290 -271
- package/lib/es/index.js +1217 -1199
- package/lib/types/facade/conditional-formatting-builder.d.ts +9 -0
- package/lib/types/facade/f-range.d.ts +2 -3
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -6
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
5
|
+
import { Tools, CommandType, Inject, ICommandService, Disposable, ObjectMatrix, RefAlias, CellValueType, BooleanNumber, LRUMap, dayjs, Range, ColorKit, Injector, RTree, IUniverInstanceService, IResourceManagerService, UniverInstanceType, Rectangle, Plugin, merge, touchDependencies, IConfigService } from "@univerjs/core";
|
|
6
|
+
import { isRangesEqual } from "@univerjs/core";
|
|
7
|
+
import { Subject, BehaviorSubject } from "rxjs";
|
|
8
|
+
import { distinctUntilChanged, bufferTime, filter, map } from "rxjs/operators";
|
|
9
|
+
import { IActiveDirtyManagerService, SetFormulaCalculationResultMutation, SetOtherFormulaMutation, RemoveOtherFormulaMutation, BooleanValue, ERROR_TYPE_SET } from "@univerjs/engine-formula";
|
|
10
|
+
import { isObject, SpreadsheetExtensionRegistry, SheetExtension, FIX_ONE_PIXEL_BLUR_OFFSET } from "@univerjs/engine-render";
|
|
11
|
+
import { SheetInterceptorService, RemoveSheetCommand, ReorderRangeMutation, MoveRangeMutation, MoveColsMutation, MoveRowsMutation, InsertRowMutation, RemoveRowMutation, RemoveColMutation, InsertColMutation, SetRangeValuesMutation } from "@univerjs/sheets";
|
|
12
|
+
const SHEET_CONDITIONAL_FORMATTING_PLUGIN = "SHEET_CONDITIONAL_FORMATTING_PLUGIN";
|
|
13
|
+
var CFTextOperator = /* @__PURE__ */ ((CFTextOperator2) => (CFTextOperator2.beginsWith = "beginsWith", CFTextOperator2.endsWith = "endsWith", CFTextOperator2.containsText = "containsText", CFTextOperator2.notContainsText = "notContainsText", CFTextOperator2.equal = "equal", CFTextOperator2.notEqual = "notEqual", CFTextOperator2.containsBlanks = "containsBlanks", CFTextOperator2.notContainsBlanks = "notContainsBlanks", CFTextOperator2.containsErrors = "containsErrors", CFTextOperator2.notContainsErrors = "notContainsErrors", CFTextOperator2))(CFTextOperator || {}), CFTimePeriodOperator = /* @__PURE__ */ ((CFTimePeriodOperator2) => (CFTimePeriodOperator2.today = "today", CFTimePeriodOperator2.yesterday = "yesterday", CFTimePeriodOperator2.tomorrow = "tomorrow", CFTimePeriodOperator2.last7Days = "last7Days", CFTimePeriodOperator2.thisMonth = "thisMonth", CFTimePeriodOperator2.lastMonth = "lastMonth", CFTimePeriodOperator2.nextMonth = "nextMonth", CFTimePeriodOperator2.thisWeek = "thisWeek", CFTimePeriodOperator2.lastWeek = "lastWeek", CFTimePeriodOperator2.nextWeek = "nextWeek", CFTimePeriodOperator2))(CFTimePeriodOperator || {}), CFNumberOperator = /* @__PURE__ */ ((CFNumberOperator2) => (CFNumberOperator2.greaterThan = "greaterThan", CFNumberOperator2.greaterThanOrEqual = "greaterThanOrEqual", CFNumberOperator2.lessThan = "lessThan", CFNumberOperator2.lessThanOrEqual = "lessThanOrEqual", CFNumberOperator2.notBetween = "notBetween", CFNumberOperator2.between = "between", CFNumberOperator2.equal = "equal", CFNumberOperator2.notEqual = "notEqual", CFNumberOperator2))(CFNumberOperator || {}), CFRuleType = /* @__PURE__ */ ((CFRuleType2) => (CFRuleType2.highlightCell = "highlightCell", CFRuleType2.dataBar = "dataBar", CFRuleType2.colorScale = "colorScale", CFRuleType2.iconSet = "iconSet", CFRuleType2))(CFRuleType || {}), CFSubRuleType = /* @__PURE__ */ ((CFSubRuleType2) => (CFSubRuleType2.uniqueValues = "uniqueValues", CFSubRuleType2.duplicateValues = "duplicateValues", CFSubRuleType2.rank = "rank", CFSubRuleType2.text = "text", CFSubRuleType2.timePeriod = "timePeriod", CFSubRuleType2.number = "number", CFSubRuleType2.average = "average", CFSubRuleType2.formula = "formula", CFSubRuleType2))(CFSubRuleType || {}), CFValueType = /* @__PURE__ */ ((CFValueType2) => (CFValueType2.num = "num", CFValueType2.min = "min", CFValueType2.max = "max", CFValueType2.percent = "percent", CFValueType2.percentile = "percentile", CFValueType2.formula = "formula", CFValueType2))(CFValueType || {});
|
|
14
|
+
const DEFAULT_BG_COLOR = "#fff", DEFAULT_FONT_COLOR = "#000000", createDefaultRule = /* @__PURE__ */ __name(() => ({
|
|
14
15
|
cfId: void 0,
|
|
15
16
|
ranges: [],
|
|
16
17
|
stopIfTrue: !1,
|
|
@@ -20,8 +21,8 @@ const E1 = "#fff", p1 = "#000000", A1 = () => ({
|
|
|
20
21
|
operator: "containsText"
|
|
21
22
|
/* containsText */
|
|
22
23
|
}
|
|
23
|
-
}),
|
|
24
|
-
switch (
|
|
24
|
+
}), "createDefaultRule"), createDefaultValue = /* @__PURE__ */ __name((subType, operator) => {
|
|
25
|
+
switch (subType) {
|
|
25
26
|
case "text": {
|
|
26
27
|
if ([
|
|
27
28
|
"beginsWith",
|
|
@@ -31,7 +32,7 @@ const E1 = "#fff", p1 = "#000000", A1 = () => ({
|
|
|
31
32
|
"notContainsText",
|
|
32
33
|
"notEqual"
|
|
33
34
|
/* notEqual */
|
|
34
|
-
].includes(
|
|
35
|
+
].includes(operator))
|
|
35
36
|
return "";
|
|
36
37
|
break;
|
|
37
38
|
}
|
|
@@ -40,11 +41,11 @@ const E1 = "#fff", p1 = "#000000", A1 = () => ({
|
|
|
40
41
|
"between",
|
|
41
42
|
"notBetween"
|
|
42
43
|
/* notBetween */
|
|
43
|
-
].includes(
|
|
44
|
+
].includes(operator) ? [10, 100] : 10;
|
|
44
45
|
}
|
|
45
46
|
return "";
|
|
46
|
-
},
|
|
47
|
-
switch (
|
|
47
|
+
}, "createDefaultValue"), createDefaultValueByValueType = /* @__PURE__ */ __name((type, defaultValue) => {
|
|
48
|
+
switch (type) {
|
|
48
49
|
case "formula":
|
|
49
50
|
return "=";
|
|
50
51
|
case "max":
|
|
@@ -53,287 +54,289 @@ const E1 = "#fff", p1 = "#000000", A1 = () => ({
|
|
|
53
54
|
case "percent":
|
|
54
55
|
case "percentile":
|
|
55
56
|
case "num":
|
|
56
|
-
return
|
|
57
|
+
return defaultValue !== void 0 ? defaultValue : 10;
|
|
57
58
|
}
|
|
58
59
|
return "";
|
|
59
|
-
},
|
|
60
|
-
if (!
|
|
60
|
+
}, "createDefaultValueByValueType"), findIndexByAnchor = /* @__PURE__ */ __name((anchor, ruleList, get) => {
|
|
61
|
+
if (!ruleList)
|
|
61
62
|
return null;
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
63
|
+
const anchorIndex = ruleList.findIndex((rule) => get(rule) === anchor.id);
|
|
64
|
+
if (anchorIndex < 0)
|
|
64
65
|
return null;
|
|
65
|
-
switch (
|
|
66
|
+
switch (anchor.type) {
|
|
66
67
|
case "after":
|
|
67
|
-
return
|
|
68
|
+
return anchorIndex + 1;
|
|
68
69
|
case "before":
|
|
69
|
-
return
|
|
70
|
+
return anchorIndex - 1;
|
|
70
71
|
case "self":
|
|
71
|
-
return
|
|
72
|
+
return anchorIndex;
|
|
72
73
|
}
|
|
73
|
-
},
|
|
74
|
-
if (!
|
|
74
|
+
}, "findIndexByAnchor"), moveByAnchor = /* @__PURE__ */ __name((start, end, ruleList, get) => {
|
|
75
|
+
if (!ruleList)
|
|
75
76
|
return null;
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
if (
|
|
77
|
+
const startIndex = findIndexByAnchor(start, ruleList, get);
|
|
78
|
+
let endIndex = findIndexByAnchor(end, ruleList, get);
|
|
79
|
+
if (startIndex === null || endIndex === null || startIndex === endIndex)
|
|
79
80
|
return;
|
|
80
|
-
const
|
|
81
|
-
switch (
|
|
81
|
+
const rule = ruleList.splice(startIndex, 1)[0];
|
|
82
|
+
switch (startIndex < endIndex && (endIndex = findIndexByAnchor(end, ruleList, get)), end.type) {
|
|
82
83
|
case "before": {
|
|
83
|
-
|
|
84
|
+
ruleList.splice(endIndex + 1, 0, rule);
|
|
84
85
|
break;
|
|
85
86
|
}
|
|
86
87
|
case "self":
|
|
87
88
|
case "after": {
|
|
88
|
-
|
|
89
|
+
ruleList.splice(endIndex, 0, rule);
|
|
89
90
|
break;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
},
|
|
93
|
-
if (
|
|
94
|
-
return [
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
93
|
+
}, "moveByAnchor"), transformSupportSymmetryAnchor = /* @__PURE__ */ __name((start, end, ruleList, get) => {
|
|
94
|
+
if (start.type === "after" && ["after", "before"].includes(end.type))
|
|
95
|
+
return [start, end];
|
|
96
|
+
const _start = { ...start }, _end = { ...end };
|
|
97
|
+
if (_start.type !== "after") {
|
|
98
|
+
const index = findIndexByAnchor(_start, ruleList, get);
|
|
99
|
+
if (index === null)
|
|
99
100
|
return null;
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
|
|
101
|
+
if (index - 1 < 0) {
|
|
102
|
+
const nextItem = ruleList[index + 1];
|
|
103
|
+
if (nextItem)
|
|
104
|
+
_start.id = get(nextItem), _start.type = "before";
|
|
104
105
|
else
|
|
105
106
|
return null;
|
|
106
107
|
} else {
|
|
107
|
-
const
|
|
108
|
-
|
|
108
|
+
const id = get(ruleList[index - 1]);
|
|
109
|
+
_start.id = id, _start.type = "after";
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
if (!["after", "before"].includes(
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
112
|
+
if (!["after", "before"].includes(_end.type)) {
|
|
113
|
+
const index = findIndexByAnchor(_end, ruleList, get);
|
|
114
|
+
if (index === null)
|
|
114
115
|
return null;
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
else if (
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
} else if (
|
|
121
|
-
const
|
|
122
|
-
|
|
116
|
+
if (index === 0)
|
|
117
|
+
_end.type = "before";
|
|
118
|
+
else if (index - 1 >= 0) {
|
|
119
|
+
const id = get(ruleList[index - 1]);
|
|
120
|
+
_end.id = id, _end.type = "after";
|
|
121
|
+
} else if (index + 1 <= ruleList.length - 1) {
|
|
122
|
+
const id = get(ruleList[index + 1]);
|
|
123
|
+
_end.id = id, _end.type = "before";
|
|
123
124
|
} else
|
|
124
125
|
return null;
|
|
125
126
|
}
|
|
126
|
-
return
|
|
127
|
-
},
|
|
128
|
-
if (["after", "before"].includes(
|
|
129
|
-
if (
|
|
130
|
-
return [
|
|
131
|
-
if (
|
|
132
|
-
return [
|
|
127
|
+
return _start.id === _end.id && _start.type === _end.type ? null : [_start, _end];
|
|
128
|
+
}, "transformSupportSymmetryAnchor"), anchorUndoFactory = /* @__PURE__ */ __name((start, end) => {
|
|
129
|
+
if (["after", "before"].includes(end.type)) {
|
|
130
|
+
if (start.type === "after")
|
|
131
|
+
return [end, start];
|
|
132
|
+
if (start.type === "before")
|
|
133
|
+
return [end, { ...start, type: "self" }];
|
|
133
134
|
}
|
|
134
135
|
return null;
|
|
135
|
-
},
|
|
136
|
-
class B {
|
|
136
|
+
}, "anchorUndoFactory"), isAnchorEqual = /* @__PURE__ */ __name((anchor1, anchor2) => anchor1.id === anchor2.id && anchor1.type === anchor2.type, "isAnchorEqual"), createCfId = /* @__PURE__ */ __name(() => `${Tools.generateRandomId(8)}`, "createCfId"), _ConditionalFormattingRuleModel = class _ConditionalFormattingRuleModel {
|
|
137
137
|
constructor() {
|
|
138
138
|
// Map<unitID ,<sheetId ,IConditionFormattingRule[]>>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
_ensureList(
|
|
144
|
-
let
|
|
145
|
-
if (!
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
|
|
139
|
+
__publicField(this, "_model", /* @__PURE__ */ new Map());
|
|
140
|
+
__publicField(this, "_ruleChange$", new Subject());
|
|
141
|
+
__publicField(this, "$ruleChange", this._ruleChange$.asObservable());
|
|
142
|
+
}
|
|
143
|
+
_ensureList(unitId, subUnitId) {
|
|
144
|
+
let list = this.getSubunitRules(unitId, subUnitId);
|
|
145
|
+
if (!list) {
|
|
146
|
+
list = [];
|
|
147
|
+
let unitMap = this._model.get(unitId);
|
|
148
|
+
unitMap || (unitMap = /* @__PURE__ */ new Map(), this._model.set(unitId, unitMap)), unitMap.set(subUnitId, list);
|
|
149
149
|
}
|
|
150
|
-
return
|
|
150
|
+
return list;
|
|
151
151
|
}
|
|
152
|
-
getRule(
|
|
153
|
-
const
|
|
154
|
-
return
|
|
152
|
+
getRule(unitId, subUnitId, cfId) {
|
|
153
|
+
const list = this.getSubunitRules(unitId, subUnitId);
|
|
154
|
+
return list ? list.find((item) => item.cfId === cfId) : null;
|
|
155
155
|
}
|
|
156
|
-
getUnitRules(
|
|
157
|
-
return this._model.get(
|
|
156
|
+
getUnitRules(unitId) {
|
|
157
|
+
return this._model.get(unitId) || null;
|
|
158
158
|
}
|
|
159
|
-
getSubunitRules(
|
|
160
|
-
var
|
|
161
|
-
return ((
|
|
159
|
+
getSubunitRules(unitId, subUnitId) {
|
|
160
|
+
var _a5;
|
|
161
|
+
return ((_a5 = this._model.get(unitId)) == null ? void 0 : _a5.get(subUnitId)) || null;
|
|
162
162
|
}
|
|
163
|
-
deleteRule(
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
|
|
163
|
+
deleteRule(unitId, subUnitId, cfId) {
|
|
164
|
+
const list = this.getSubunitRules(unitId, subUnitId);
|
|
165
|
+
if (list) {
|
|
166
|
+
const index = list.findIndex((e) => e.cfId === cfId), rule = list[index];
|
|
167
|
+
rule && (list.splice(index, 1), this._ruleChange$.next({ rule, subUnitId, unitId, type: "delete" }));
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
setRule(
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
Object.assign(
|
|
170
|
+
setRule(unitId, subUnitId, rule, oldCfId) {
|
|
171
|
+
const oldRule = this._ensureList(unitId, subUnitId).find((item) => item.cfId === oldCfId);
|
|
172
|
+
if (oldRule) {
|
|
173
|
+
const cloneRule = Tools.deepClone(oldRule);
|
|
174
|
+
Object.assign(oldRule, rule), this._ruleChange$.next({ rule: oldRule, subUnitId, unitId, type: "set", oldRule: cloneRule });
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
addRule(
|
|
178
|
-
const
|
|
179
|
-
|
|
177
|
+
addRule(unitId, subUnitId, rule) {
|
|
178
|
+
const list = this._ensureList(unitId, subUnitId);
|
|
179
|
+
list.find((item2) => item2.cfId === rule.cfId) || list.unshift(rule), this._ruleChange$.next({ rule, subUnitId, unitId, type: "add" });
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* example [1,2,3,4,5,6],if you move behind 5 to 2, then cfId=5,targetId=2.
|
|
183
183
|
* if targetId does not exist, it defaults to top
|
|
184
184
|
*/
|
|
185
|
-
moveRulePriority(
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
185
|
+
moveRulePriority(unitId, subUnitId, start, end) {
|
|
186
|
+
const list = this._ensureList(unitId, subUnitId), curIndex = findIndexByAnchor(start, list, (rule2) => rule2.cfId), targetCfIndex = findIndexByAnchor(end, list, (rule2) => rule2.cfId);
|
|
187
|
+
if (targetCfIndex === null || curIndex === null || targetCfIndex === curIndex)
|
|
188
188
|
return;
|
|
189
|
-
const
|
|
190
|
-
|
|
189
|
+
const rule = list[curIndex];
|
|
190
|
+
rule && (moveByAnchor(start, end, list, (rule2) => rule2.cfId), this._ruleChange$.next({ rule, subUnitId, unitId, type: "sort" }));
|
|
191
191
|
}
|
|
192
|
-
createCfId(
|
|
193
|
-
return
|
|
192
|
+
createCfId(_unitId, _subUnitId) {
|
|
193
|
+
return createCfId();
|
|
194
194
|
}
|
|
195
|
-
deleteUnitId(
|
|
196
|
-
this._model.delete(
|
|
195
|
+
deleteUnitId(unitId) {
|
|
196
|
+
this._model.delete(unitId);
|
|
197
197
|
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
};
|
|
199
|
+
__name(_ConditionalFormattingRuleModel, "ConditionalFormattingRuleModel");
|
|
200
|
+
let ConditionalFormattingRuleModel = _ConditionalFormattingRuleModel;
|
|
201
|
+
const ConditionalFormattingFormulaMarkDirty = {
|
|
202
|
+
type: CommandType.MUTATION,
|
|
201
203
|
id: "sheet.mutation.conditional-formatting-formula-mark-dirty",
|
|
202
204
|
handler() {
|
|
203
205
|
return !0;
|
|
204
206
|
}
|
|
205
207
|
};
|
|
206
|
-
var
|
|
207
|
-
for (var
|
|
208
|
-
(
|
|
209
|
-
return
|
|
210
|
-
},
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
return (
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
|
|
208
|
+
var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor, __decorateClass$3 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
209
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
210
|
+
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
211
|
+
return kind && result && __defProp$3(target, key, result), result;
|
|
212
|
+
}, "__decorateClass$3"), __decorateParam$3 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$3"), FormulaResultStatus = /* @__PURE__ */ ((FormulaResultStatus2) => (FormulaResultStatus2[FormulaResultStatus2.NOT_REGISTER = 1] = "NOT_REGISTER", FormulaResultStatus2[FormulaResultStatus2.SUCCESS = 2] = "SUCCESS", FormulaResultStatus2[FormulaResultStatus2.WAIT = 3] = "WAIT", FormulaResultStatus2[FormulaResultStatus2.ERROR = 4] = "ERROR", FormulaResultStatus2))(FormulaResultStatus || {});
|
|
213
|
+
const getResultFromFormula = /* @__PURE__ */ __name((formulaResult) => {
|
|
214
|
+
const v = formulaResult && formulaResult[0] && formulaResult[0][0];
|
|
215
|
+
return (v == null ? void 0 : v.t) === CellValueType.BOOLEAN ? v.v === BooleanNumber.TRUE || v.v === !0 : v ? v.v : !1;
|
|
216
|
+
}, "getResultFromFormula");
|
|
217
|
+
var _a;
|
|
218
|
+
let ConditionalFormattingFormulaService = (_a = class extends Disposable {
|
|
219
|
+
constructor(_commandService, _activeDirtyManagerService, _conditionalFormattingRuleModel) {
|
|
217
220
|
super();
|
|
218
221
|
// Cache Formula ID and formula mapping.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
this._commandService =
|
|
222
|
+
__publicField(this, "_formulaMap", /* @__PURE__ */ new Map());
|
|
223
|
+
__publicField(this, "_result$", new Subject());
|
|
224
|
+
__publicField(this, "result$", this._result$.asObservable());
|
|
225
|
+
this._commandService = _commandService, this._activeDirtyManagerService = _activeDirtyManagerService, this._conditionalFormattingRuleModel = _conditionalFormattingRuleModel, this._initFormulaCalculationResultChange(), this._initRuleChange();
|
|
223
226
|
}
|
|
224
227
|
_initRuleChange() {
|
|
225
|
-
const
|
|
226
|
-
switch (
|
|
227
|
-
case
|
|
228
|
-
return
|
|
229
|
-
case
|
|
230
|
-
return [
|
|
231
|
-
case
|
|
232
|
-
return
|
|
228
|
+
const isNeedMarkFormulaDirty = /* @__PURE__ */ __name((rule) => {
|
|
229
|
+
switch (rule.type) {
|
|
230
|
+
case CFRuleType.colorScale:
|
|
231
|
+
return rule.config.some((item) => item.value.type === CFValueType.formula);
|
|
232
|
+
case CFRuleType.dataBar:
|
|
233
|
+
return [rule.config.max, rule.config.min].some((item) => item.type === CFValueType.formula);
|
|
234
|
+
case CFRuleType.iconSet:
|
|
235
|
+
return rule.config.some((item) => item.value.type === CFValueType.formula);
|
|
233
236
|
}
|
|
234
|
-
};
|
|
235
|
-
this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((
|
|
236
|
-
const { unitId
|
|
237
|
-
|
|
237
|
+
}, "isNeedMarkFormulaDirty");
|
|
238
|
+
this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((option) => {
|
|
239
|
+
const { unitId, subUnitId, rule, oldRule } = option;
|
|
240
|
+
option.type === "delete" && this._removeFormulaByCfId(unitId, subUnitId, rule.cfId), option.type === "set" && (isNeedMarkFormulaDirty(rule.rule) || oldRule && isNeedMarkFormulaDirty(oldRule.rule)) && this._removeFormulaByCfId(unitId, subUnitId, rule.cfId);
|
|
238
241
|
}));
|
|
239
242
|
}
|
|
240
243
|
_initFormulaCalculationResultChange() {
|
|
241
|
-
this.disposeWithMe(this._commandService.onCommandExecuted((
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
244
|
-
for (const
|
|
245
|
-
for (const
|
|
246
|
-
for (const
|
|
247
|
-
const
|
|
248
|
-
if (!
|
|
244
|
+
this.disposeWithMe(this._commandService.onCommandExecuted((commandInfo) => {
|
|
245
|
+
if (commandInfo.id === SetFormulaCalculationResultMutation.id) {
|
|
246
|
+
const params = commandInfo.params;
|
|
247
|
+
for (const unitId in params.unitOtherData)
|
|
248
|
+
for (const subUnitId in params.unitOtherData[unitId])
|
|
249
|
+
for (const formulaId in params.unitOtherData[unitId][subUnitId]) {
|
|
250
|
+
const resultMatrix = new ObjectMatrix(params.unitOtherData[unitId][subUnitId][formulaId]), formulaMapAlias = this._ensureSubunitFormulaMap(unitId, subUnitId).getValue(formulaId, ["formulaId"]);
|
|
251
|
+
if (!formulaMapAlias)
|
|
249
252
|
continue;
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
253
|
+
const ranges = formulaMapAlias.ranges;
|
|
254
|
+
if (!ranges)
|
|
252
255
|
continue;
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}),
|
|
257
|
-
const
|
|
258
|
-
(
|
|
256
|
+
const resultObject = formulaMapAlias.result, startRow = ranges[0].startRow, startCol = ranges[0].startColumn;
|
|
257
|
+
resultMatrix.forValue((row, col, value) => {
|
|
258
|
+
resultObject.setValue(startRow + row, startCol + col, getResultFromFormula(value));
|
|
259
|
+
}), formulaMapAlias.status = 2;
|
|
260
|
+
const isAllFinished = this._getAllFormulaResultByCfId(unitId, subUnitId, formulaMapAlias.cfId).every(
|
|
261
|
+
(item) => item.status === 2
|
|
259
262
|
/* SUCCESS */
|
|
260
263
|
);
|
|
261
|
-
this._result$.next({ ...
|
|
264
|
+
this._result$.next({ ...formulaMapAlias, isAllFinished });
|
|
262
265
|
}
|
|
263
266
|
}
|
|
264
267
|
})), this._activeDirtyManagerService.register(
|
|
265
|
-
|
|
268
|
+
ConditionalFormattingFormulaMarkDirty.id,
|
|
266
269
|
{
|
|
267
|
-
commandId:
|
|
268
|
-
getDirtyData(
|
|
270
|
+
commandId: ConditionalFormattingFormulaMarkDirty.id,
|
|
271
|
+
getDirtyData(commandInfo) {
|
|
269
272
|
return {
|
|
270
|
-
dirtyUnitOtherFormulaMap:
|
|
273
|
+
dirtyUnitOtherFormulaMap: commandInfo.params
|
|
271
274
|
};
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
277
|
);
|
|
275
278
|
}
|
|
276
|
-
_ensureSubunitFormulaMap(
|
|
277
|
-
let
|
|
278
|
-
|
|
279
|
-
let
|
|
280
|
-
return
|
|
279
|
+
_ensureSubunitFormulaMap(unitId, subUnitId) {
|
|
280
|
+
let unitMap = this._formulaMap.get(unitId);
|
|
281
|
+
unitMap || (unitMap = /* @__PURE__ */ new Map(), this._formulaMap.set(unitId, unitMap));
|
|
282
|
+
let subUnitMap = unitMap.get(subUnitId);
|
|
283
|
+
return subUnitMap || (subUnitMap = new RefAlias([], ["formulaId", "id"]), unitMap.set(subUnitId, subUnitMap)), subUnitMap;
|
|
281
284
|
}
|
|
282
|
-
getSubUnitFormulaMap(
|
|
283
|
-
var
|
|
284
|
-
return (
|
|
285
|
+
getSubUnitFormulaMap(unitId, subUnitId) {
|
|
286
|
+
var _a5;
|
|
287
|
+
return (_a5 = this._formulaMap.get(unitId)) == null ? void 0 : _a5.get(subUnitId);
|
|
285
288
|
}
|
|
286
|
-
registerFormulaWithRange(
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
+
registerFormulaWithRange(unitId, subUnitId, cfId, formulaText, ranges = [{ startRow: 0, endRow: 0, startColumn: 0, endColumn: 0 }]) {
|
|
290
|
+
const formulaMap = this._ensureSubunitFormulaMap(unitId, subUnitId), cfFormulaId = this.createCFormulaId(cfId, formulaText);
|
|
291
|
+
if (formulaMap.getValue(cfFormulaId, ["id"]))
|
|
289
292
|
return;
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
formulaText
|
|
293
|
-
unitId
|
|
294
|
-
subUnitId
|
|
295
|
-
cfId
|
|
296
|
-
id:
|
|
297
|
-
ranges
|
|
298
|
-
formulaId
|
|
293
|
+
const formulaId = this._createFormulaId(unitId, subUnitId);
|
|
294
|
+
formulaMap.addValue({
|
|
295
|
+
formulaText,
|
|
296
|
+
unitId,
|
|
297
|
+
subUnitId,
|
|
298
|
+
cfId,
|
|
299
|
+
id: cfFormulaId,
|
|
300
|
+
ranges,
|
|
301
|
+
formulaId,
|
|
299
302
|
status: 3,
|
|
300
|
-
result: new
|
|
303
|
+
result: new ObjectMatrix()
|
|
301
304
|
});
|
|
302
|
-
const
|
|
303
|
-
unitId
|
|
304
|
-
subUnitId
|
|
305
|
+
const params = {
|
|
306
|
+
unitId,
|
|
307
|
+
subUnitId,
|
|
305
308
|
formulaMap: {
|
|
306
|
-
[
|
|
307
|
-
f:
|
|
308
|
-
ranges
|
|
309
|
+
[formulaId]: {
|
|
310
|
+
f: formulaText,
|
|
311
|
+
ranges
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
};
|
|
312
|
-
this._commandService.executeCommand(
|
|
315
|
+
this._commandService.executeCommand(SetOtherFormulaMutation.id, params, { onlyLocal: !0 }).then(() => {
|
|
313
316
|
this._commandService.executeCommand(
|
|
314
|
-
|
|
315
|
-
{ [
|
|
317
|
+
ConditionalFormattingFormulaMarkDirty.id,
|
|
318
|
+
{ [unitId]: { [subUnitId]: { [formulaId]: !0 } } },
|
|
316
319
|
{ onlyLocal: !0 }
|
|
317
320
|
);
|
|
318
321
|
});
|
|
319
322
|
}
|
|
320
|
-
_removeFormulaByCfId(
|
|
321
|
-
const
|
|
322
|
-
this._commandService.executeCommand(
|
|
323
|
+
_removeFormulaByCfId(unitId, subUnitId, cfId) {
|
|
324
|
+
const formulaIdList = this.deleteCache(unitId, subUnitId, cfId).map((item) => item.formulaId);
|
|
325
|
+
this._commandService.executeCommand(RemoveOtherFormulaMutation.id, { unitId, subUnitId, formulaIdList }, { onlyLocal: !0 });
|
|
323
326
|
}
|
|
324
|
-
getFormulaResultWithCoords(
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
327
|
+
getFormulaResultWithCoords(unitId, subUnitId, cfId, formulaText, row = 0, col = 0) {
|
|
328
|
+
const map2 = this.getSubUnitFormulaMap(unitId, subUnitId);
|
|
329
|
+
if (!map2)
|
|
327
330
|
return {
|
|
328
331
|
status: 1
|
|
329
332
|
/* NOT_REGISTER */
|
|
330
333
|
};
|
|
331
|
-
const
|
|
332
|
-
return
|
|
333
|
-
result:
|
|
334
|
+
const item = map2.getValue(this.createCFormulaId(cfId, formulaText), ["id"]);
|
|
335
|
+
return item ? item.status === 2 && item.result ? {
|
|
336
|
+
result: item.result.getValue(row, col),
|
|
334
337
|
status: 2
|
|
335
338
|
/* SUCCESS */
|
|
336
|
-
} :
|
|
339
|
+
} : item.status === 3 ? {
|
|
337
340
|
status: 3
|
|
338
341
|
/* WAIT */
|
|
339
342
|
} : {
|
|
@@ -344,22 +347,22 @@ let G = class extends m2 {
|
|
|
344
347
|
/* NOT_REGISTER */
|
|
345
348
|
};
|
|
346
349
|
}
|
|
347
|
-
getFormulaMatrix(
|
|
348
|
-
const
|
|
349
|
-
if (!
|
|
350
|
+
getFormulaMatrix(unitId, subUnitId, cfId, formulaText) {
|
|
351
|
+
const map2 = this.getSubUnitFormulaMap(unitId, subUnitId);
|
|
352
|
+
if (!map2)
|
|
350
353
|
return {
|
|
351
354
|
status: 1
|
|
352
355
|
/* NOT_REGISTER */
|
|
353
356
|
};
|
|
354
|
-
const
|
|
355
|
-
if (!
|
|
357
|
+
const item = map2.getValue(this.createCFormulaId(cfId, formulaText), ["id"]);
|
|
358
|
+
if (!item)
|
|
356
359
|
return {
|
|
357
360
|
status: 1
|
|
358
361
|
/* NOT_REGISTER */
|
|
359
362
|
};
|
|
360
|
-
if (
|
|
363
|
+
if (item.status === 2 && item.result)
|
|
361
364
|
return {
|
|
362
|
-
result:
|
|
365
|
+
result: item.result,
|
|
363
366
|
status: 2
|
|
364
367
|
/* SUCCESS */
|
|
365
368
|
};
|
|
@@ -367,63 +370,63 @@ let G = class extends m2 {
|
|
|
367
370
|
/**
|
|
368
371
|
* If `formulaText` is not provided, then all caches related to `cfId` will be deleted.
|
|
369
372
|
*/
|
|
370
|
-
deleteCache(
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
373
|
+
deleteCache(unitId, subUnitId, cfId, formulaText) {
|
|
374
|
+
const map2 = this.getSubUnitFormulaMap(unitId, subUnitId);
|
|
375
|
+
if (!map2)
|
|
373
376
|
return [];
|
|
374
|
-
if (
|
|
375
|
-
const
|
|
376
|
-
return
|
|
377
|
+
if (formulaText) {
|
|
378
|
+
const key = this.createCFormulaId(cfId, formulaText);
|
|
379
|
+
return map2.deleteValue(key, ["id"]), [];
|
|
377
380
|
} else {
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
|
|
381
|
-
}),
|
|
381
|
+
const values = map2.getValues().filter((v) => v.cfId === cfId);
|
|
382
|
+
return values.forEach((e) => {
|
|
383
|
+
map2.deleteValue(e.formulaId, ["formulaId"]);
|
|
384
|
+
}), values;
|
|
382
385
|
}
|
|
383
386
|
}
|
|
384
|
-
_getAllFormulaResultByCfId(
|
|
385
|
-
const
|
|
386
|
-
return
|
|
387
|
+
_getAllFormulaResultByCfId(unitId, subUnitId, cfId) {
|
|
388
|
+
const map2 = this.getSubUnitFormulaMap(unitId, subUnitId);
|
|
389
|
+
return map2 ? map2.getValues().filter((v) => v.cfId === cfId) : [];
|
|
387
390
|
}
|
|
388
391
|
/**
|
|
389
392
|
* The external environment is not aware of`formulaId`;it communicates internally with the formula engine.
|
|
390
393
|
*/
|
|
391
|
-
_createFormulaId(
|
|
392
|
-
return `sheet.cf_${
|
|
394
|
+
_createFormulaId(unitId, subUnitId) {
|
|
395
|
+
return `sheet.cf_${unitId}_${subUnitId}_${Tools.generateRandomId(8)}`;
|
|
393
396
|
}
|
|
394
397
|
/**
|
|
395
398
|
* A conditional formatting may have multiple formulas;if the formulas are identical,then the results will be consistent.
|
|
396
399
|
*/
|
|
397
|
-
createCFormulaId(
|
|
398
|
-
return `${
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
],
|
|
406
|
-
var
|
|
407
|
-
class
|
|
408
|
-
constructor(
|
|
400
|
+
createCFormulaId(cfId, formulaText) {
|
|
401
|
+
return `${cfId}_${formulaText}`;
|
|
402
|
+
}
|
|
403
|
+
}, __name(_a, "ConditionalFormattingFormulaService"), _a);
|
|
404
|
+
ConditionalFormattingFormulaService = __decorateClass$3([
|
|
405
|
+
__decorateParam$3(0, Inject(ICommandService)),
|
|
406
|
+
__decorateParam$3(1, Inject(IActiveDirtyManagerService)),
|
|
407
|
+
__decorateParam$3(2, Inject(ConditionalFormattingRuleModel))
|
|
408
|
+
], ConditionalFormattingFormulaService);
|
|
409
|
+
var CalculateEmitStatus = /* @__PURE__ */ ((CalculateEmitStatus2) => (CalculateEmitStatus2.preComputingStart = "preComputingStart", CalculateEmitStatus2.preComputing = "preComputing", CalculateEmitStatus2.preComputingEnd = "preComputingEnd", CalculateEmitStatus2.preComputingError = "preComputingError", CalculateEmitStatus2))(CalculateEmitStatus || {});
|
|
410
|
+
const _BaseCalculateUnit = class _BaseCalculateUnit {
|
|
411
|
+
constructor(_context) {
|
|
409
412
|
/**
|
|
410
413
|
* 3nd-level cache
|
|
411
414
|
*/
|
|
412
|
-
|
|
413
|
-
|
|
415
|
+
__publicField(this, "_cache");
|
|
416
|
+
__publicField(this, "_preComputingStatus$", new BehaviorSubject(
|
|
414
417
|
"preComputingStart"
|
|
415
418
|
/* preComputingStart */
|
|
416
419
|
));
|
|
417
|
-
|
|
420
|
+
__publicField(this, "preComputingStatus$", this._preComputingStatus$.asObservable().pipe(distinctUntilChanged()));
|
|
418
421
|
/**
|
|
419
422
|
* 2nd-level cache
|
|
420
423
|
*/
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
this._context =
|
|
424
|
+
__publicField(this, "_preComputingCache");
|
|
425
|
+
__publicField(this, "_rule");
|
|
426
|
+
this._context = _context, this._cache = new LRUMap(_context.limit), this._rule = _context.rule, this._preComputingCache = null, this._initClearCacheListener();
|
|
424
427
|
}
|
|
425
|
-
setCacheLength(
|
|
426
|
-
this._cache.limit =
|
|
428
|
+
setCacheLength(length) {
|
|
429
|
+
this._cache.limit = length;
|
|
427
430
|
}
|
|
428
431
|
clearCache() {
|
|
429
432
|
this._cache.clear();
|
|
@@ -434,698 +437,711 @@ class u2 {
|
|
|
434
437
|
/* preComputingStart */
|
|
435
438
|
), this._preComputingCache = null;
|
|
436
439
|
}
|
|
437
|
-
updateRule(
|
|
438
|
-
this._rule =
|
|
440
|
+
updateRule(rule) {
|
|
441
|
+
this._rule = rule, this.resetPreComputingCache();
|
|
439
442
|
}
|
|
440
|
-
getCell(
|
|
441
|
-
const
|
|
443
|
+
getCell(row, col) {
|
|
444
|
+
const key = this._createKey(row, col);
|
|
442
445
|
if (this._preComputingStatus$.getValue() === "preComputing")
|
|
443
|
-
return this._cache.get(
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
+
return this._cache.get(key);
|
|
447
|
+
let preComputingResult = this.getPreComputingResult(row, col);
|
|
448
|
+
if (preComputingResult === null && (this._preComputingStatus$.next(
|
|
446
449
|
"preComputingStart"
|
|
447
450
|
/* preComputingStart */
|
|
448
|
-
), this.preComputing(
|
|
449
|
-
return this._cache.get(
|
|
451
|
+
), this.preComputing(row, col, this._getContext()), preComputingResult = this.getPreComputingResult(row, col), preComputingResult === null))
|
|
452
|
+
return this._cache.get(key);
|
|
450
453
|
if (this._preComputingStatus$.next(
|
|
451
454
|
"preComputingEnd"
|
|
452
455
|
/* preComputingEnd */
|
|
453
|
-
), this._cache.has(
|
|
454
|
-
return this._cache.get(
|
|
455
|
-
const
|
|
456
|
-
return
|
|
456
|
+
), this._cache.has(key))
|
|
457
|
+
return this._cache.get(key);
|
|
458
|
+
const result = this.getCellResult(row, col, preComputingResult, this._getContext());
|
|
459
|
+
return result !== null && this._setCache(row, col, result), result;
|
|
457
460
|
}
|
|
458
|
-
setPreComputingCache(
|
|
459
|
-
this._preComputingCache =
|
|
461
|
+
setPreComputingCache(v) {
|
|
462
|
+
this._preComputingCache = v;
|
|
460
463
|
}
|
|
461
|
-
getPreComputingResult(
|
|
464
|
+
getPreComputingResult(_row, _col) {
|
|
462
465
|
return this._preComputingCache;
|
|
463
466
|
}
|
|
464
|
-
_createKey(
|
|
465
|
-
return `${
|
|
467
|
+
_createKey(row, col) {
|
|
468
|
+
return `${row}_${col}`;
|
|
466
469
|
}
|
|
467
|
-
_setCache(
|
|
468
|
-
const
|
|
469
|
-
this._cache.set(
|
|
470
|
+
_setCache(row, col, v) {
|
|
471
|
+
const key = this._createKey(row, col);
|
|
472
|
+
this._cache.set(key, v);
|
|
470
473
|
}
|
|
471
474
|
_getContext() {
|
|
472
475
|
return { ...this._context, rule: this._rule };
|
|
473
476
|
}
|
|
474
477
|
_initClearCacheListener() {
|
|
475
|
-
this.preComputingStatus$.subscribe((
|
|
476
|
-
|
|
478
|
+
this.preComputingStatus$.subscribe((e) => {
|
|
479
|
+
e === "preComputingEnd" && this.clearCache();
|
|
477
480
|
});
|
|
478
481
|
}
|
|
482
|
+
};
|
|
483
|
+
__name(_BaseCalculateUnit, "BaseCalculateUnit");
|
|
484
|
+
let BaseCalculateUnit = _BaseCalculateUnit;
|
|
485
|
+
function isFloatsEqual(a, b) {
|
|
486
|
+
return Math.abs(a - b) < Number.EPSILON;
|
|
479
487
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
var e, n;
|
|
485
|
-
if (!s)
|
|
488
|
+
__name(isFloatsEqual, "isFloatsEqual");
|
|
489
|
+
const isNullable = /* @__PURE__ */ __name((v) => [void 0, null].includes(v), "isNullable"), getCellValue = /* @__PURE__ */ __name((cell2) => {
|
|
490
|
+
var _a5, _b;
|
|
491
|
+
if (!cell2)
|
|
486
492
|
return null;
|
|
487
|
-
if (
|
|
488
|
-
return
|
|
489
|
-
const
|
|
490
|
-
return
|
|
491
|
-
},
|
|
492
|
-
function
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
493
|
+
if (cell2.t === CellValueType.BOOLEAN)
|
|
494
|
+
return cell2.v === BooleanNumber.TRUE ? BooleanValue.TRUE : BooleanValue.FALSE;
|
|
495
|
+
const v = cell2.v, dataStream = (_b = (_a5 = cell2.p) == null ? void 0 : _a5.body) == null ? void 0 : _b.dataStream.replace(/\r\n$/, "");
|
|
496
|
+
return isNullable(v) ? isNullable(dataStream) ? null : dataStream : v;
|
|
497
|
+
}, "getCellValue"), DAY_SIZE = 86400;
|
|
498
|
+
function toYMD_1900(ord, leap1900 = !0) {
|
|
499
|
+
if (leap1900 && ord >= 0) {
|
|
500
|
+
if (ord === 0)
|
|
495
501
|
return [1900, 1, 0];
|
|
496
|
-
if (
|
|
502
|
+
if (ord === 60)
|
|
497
503
|
return [1900, 2, 29];
|
|
498
|
-
if (
|
|
499
|
-
return [1900,
|
|
500
|
-
}
|
|
501
|
-
let
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
return [100 * (
|
|
504
|
+
if (ord < 60)
|
|
505
|
+
return [1900, ord < 32 ? 1 : 2, (ord - 1) % 31 + 1];
|
|
506
|
+
}
|
|
507
|
+
let l = ord + 68569 + 2415019;
|
|
508
|
+
const n = Math.floor(4 * l / 146097);
|
|
509
|
+
l = l - Math.floor((146097 * n + 3) / 4);
|
|
510
|
+
const i = Math.floor(4e3 * (l + 1) / 1461001);
|
|
511
|
+
l = l - Math.floor(1461 * i / 4) + 31;
|
|
512
|
+
const j = Math.floor(80 * l / 2447), nDay = l - Math.floor(2447 * j / 80);
|
|
513
|
+
l = Math.floor(j / 11);
|
|
514
|
+
const nMonth = j + 2 - 12 * l;
|
|
515
|
+
return [100 * (n - 49) + i + l | 0, nMonth | 0, nDay | 0];
|
|
510
516
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
517
|
+
__name(toYMD_1900, "toYMD_1900");
|
|
518
|
+
const serialTimeToTimestamp = /* @__PURE__ */ __name((value) => {
|
|
519
|
+
let date = value | 0;
|
|
520
|
+
const t = DAY_SIZE * (value - date);
|
|
521
|
+
let time = Math.floor(t);
|
|
522
|
+
t - time > 0.9999 && (time += 1, time === DAY_SIZE && (time = 0, date += 1));
|
|
523
|
+
const x = time < 0 ? DAY_SIZE + time : time, [y, m, d] = toYMD_1900(value, !0), hh = Math.floor(x / 60 / 60) % 60, mm = Math.floor(x / 60) % 60, ss = Math.floor(x) % 60;
|
|
524
|
+
return dayjs(`${y}/${m}/${d} ${hh}:${mm}:${ss}`).valueOf();
|
|
525
|
+
}, "serialTimeToTimestamp"), getValueByType = /* @__PURE__ */ __name((value, matrix, context) => {
|
|
526
|
+
switch (value.type) {
|
|
527
|
+
case CFValueType.max: {
|
|
528
|
+
let max = 0;
|
|
529
|
+
return matrix.forValue((row, col, value2) => {
|
|
530
|
+
value2 > max && (max = value2);
|
|
524
531
|
}), {
|
|
525
|
-
status:
|
|
526
|
-
result:
|
|
532
|
+
status: FormulaResultStatus.SUCCESS,
|
|
533
|
+
result: max
|
|
527
534
|
};
|
|
528
535
|
}
|
|
529
|
-
case
|
|
530
|
-
let
|
|
531
|
-
return
|
|
532
|
-
|
|
536
|
+
case CFValueType.min: {
|
|
537
|
+
let min;
|
|
538
|
+
return matrix.forValue((row, col, value2) => {
|
|
539
|
+
min === void 0 && (min = value2), value2 < min && (min = value2);
|
|
533
540
|
}), {
|
|
534
|
-
status:
|
|
535
|
-
result:
|
|
541
|
+
status: FormulaResultStatus.SUCCESS,
|
|
542
|
+
result: min
|
|
536
543
|
};
|
|
537
544
|
}
|
|
538
|
-
case
|
|
539
|
-
let
|
|
540
|
-
|
|
541
|
-
(
|
|
545
|
+
case CFValueType.percent: {
|
|
546
|
+
let max, min;
|
|
547
|
+
matrix.forValue((row, col, value2) => {
|
|
548
|
+
(max === void 0 || min === void 0) && (max = value2, min = value2), value2 > max && (max = value2), value2 < min && (min = value2);
|
|
542
549
|
});
|
|
543
|
-
const
|
|
550
|
+
const length = (max || 0) - (min || 0), v = Math.max(Math.min(Number(value.value) || 0, 100), 0);
|
|
544
551
|
return {
|
|
545
|
-
status:
|
|
546
|
-
result:
|
|
552
|
+
status: FormulaResultStatus.SUCCESS,
|
|
553
|
+
result: length * (v / 100) + (min || 0)
|
|
547
554
|
};
|
|
548
555
|
}
|
|
549
|
-
case
|
|
550
|
-
const
|
|
556
|
+
case CFValueType.percentile: {
|
|
557
|
+
const list = matrix.toNativeArray().sort((a, b) => a - b), v = Math.max(Math.min(Number(value.value) || 0, 100), 0), index = (list.length - 1) * v / 100, intIndex = Math.floor(index), decimalIndex = index - intIndex, result = list[intIndex] + (list[Math.min(intIndex + 1, list.length - 1)] - list[intIndex]) * decimalIndex;
|
|
551
558
|
return {
|
|
552
|
-
status:
|
|
553
|
-
result
|
|
559
|
+
status: FormulaResultStatus.SUCCESS,
|
|
560
|
+
result
|
|
554
561
|
};
|
|
555
562
|
}
|
|
556
|
-
case
|
|
557
|
-
const { accessor
|
|
558
|
-
return
|
|
563
|
+
case CFValueType.formula: {
|
|
564
|
+
const { accessor, unitId, subUnitId, cfId } = context, formulaText = String(value.value), conditionalFormattingFormulaService = accessor.get(ConditionalFormattingFormulaService);
|
|
565
|
+
return conditionalFormattingFormulaService.registerFormulaWithRange(unitId, subUnitId, cfId, formulaText), conditionalFormattingFormulaService.getFormulaResultWithCoords(unitId, subUnitId, cfId, formulaText);
|
|
559
566
|
}
|
|
560
|
-
case
|
|
561
|
-
const
|
|
567
|
+
case CFValueType.num: {
|
|
568
|
+
const v = Number(value.value);
|
|
562
569
|
return {
|
|
563
|
-
status:
|
|
564
|
-
result: Number.isNaN(
|
|
570
|
+
status: FormulaResultStatus.SUCCESS,
|
|
571
|
+
result: Number.isNaN(v) ? 0 : v
|
|
565
572
|
};
|
|
566
573
|
}
|
|
567
574
|
}
|
|
568
|
-
},
|
|
569
|
-
const { accessor
|
|
570
|
-
return
|
|
571
|
-
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
|
|
575
|
+
}, "getValueByType"), getCacheStyleMatrix = /* @__PURE__ */ __name((unitId, subUnitId, rule, context) => {
|
|
576
|
+
const { accessor } = context, conditionalFormattingViewModel = accessor.get(ConditionalFormattingViewModel), matrix = new ObjectMatrix();
|
|
577
|
+
return rule.ranges.forEach((range) => {
|
|
578
|
+
Range.foreach(range, (row, col) => {
|
|
579
|
+
const cellCfItem = conditionalFormattingViewModel.getCellCfs(unitId, subUnitId, row, col);
|
|
580
|
+
if (cellCfItem) {
|
|
581
|
+
const item = cellCfItem.find((item2) => item2.cfId === rule.cfId);
|
|
582
|
+
item != null && item.result && matrix.setValue(row, col, item.result);
|
|
576
583
|
}
|
|
577
584
|
});
|
|
578
|
-
}),
|
|
579
|
-
},
|
|
580
|
-
switch (
|
|
581
|
-
case
|
|
582
|
-
if (typeof
|
|
585
|
+
}), matrix;
|
|
586
|
+
}, "getCacheStyleMatrix"), compareWithNumber = /* @__PURE__ */ __name((config, v) => {
|
|
587
|
+
switch (config.operator) {
|
|
588
|
+
case CFNumberOperator.between: {
|
|
589
|
+
if (typeof config.value != "object" || !config.value.length)
|
|
583
590
|
return;
|
|
584
|
-
const
|
|
585
|
-
return
|
|
591
|
+
const start = Math.min(...config.value), end = Math.max(...config.value);
|
|
592
|
+
return v >= start && v <= end;
|
|
586
593
|
}
|
|
587
|
-
case
|
|
588
|
-
if (typeof
|
|
594
|
+
case CFNumberOperator.notBetween: {
|
|
595
|
+
if (typeof config.value != "object" || !config.value.length)
|
|
589
596
|
return;
|
|
590
|
-
const
|
|
591
|
-
return !(
|
|
597
|
+
const start = Math.min(...config.value), end = Math.max(...config.value);
|
|
598
|
+
return !(v >= start && v <= end);
|
|
592
599
|
}
|
|
593
|
-
case
|
|
594
|
-
const
|
|
595
|
-
return
|
|
600
|
+
case CFNumberOperator.equal: {
|
|
601
|
+
const condition = config.value || 0;
|
|
602
|
+
return isFloatsEqual(condition, v);
|
|
596
603
|
}
|
|
597
|
-
case
|
|
598
|
-
const
|
|
599
|
-
return !
|
|
604
|
+
case CFNumberOperator.notEqual: {
|
|
605
|
+
const condition = config.value || 0;
|
|
606
|
+
return !isFloatsEqual(condition, v);
|
|
600
607
|
}
|
|
601
|
-
case
|
|
602
|
-
const
|
|
603
|
-
return
|
|
608
|
+
case CFNumberOperator.greaterThan: {
|
|
609
|
+
const condition = config.value || 0;
|
|
610
|
+
return v > condition;
|
|
604
611
|
}
|
|
605
|
-
case
|
|
606
|
-
const
|
|
607
|
-
return
|
|
612
|
+
case CFNumberOperator.greaterThanOrEqual: {
|
|
613
|
+
const condition = config.value || 0;
|
|
614
|
+
return v >= condition;
|
|
608
615
|
}
|
|
609
|
-
case
|
|
610
|
-
const
|
|
611
|
-
return
|
|
616
|
+
case CFNumberOperator.lessThan: {
|
|
617
|
+
const condition = config.value || 0;
|
|
618
|
+
return v < condition;
|
|
612
619
|
}
|
|
613
|
-
case
|
|
614
|
-
const
|
|
615
|
-
return
|
|
620
|
+
case CFNumberOperator.lessThanOrEqual: {
|
|
621
|
+
const condition = config.value || 0;
|
|
622
|
+
return v <= condition;
|
|
616
623
|
}
|
|
617
624
|
default:
|
|
618
625
|
return !1;
|
|
619
626
|
}
|
|
620
|
-
},
|
|
621
|
-
switch (
|
|
622
|
-
case
|
|
623
|
-
return
|
|
624
|
-
case
|
|
625
|
-
return
|
|
626
|
-
case
|
|
627
|
-
return
|
|
628
|
-
case
|
|
629
|
-
return
|
|
630
|
-
}
|
|
631
|
-
return
|
|
632
|
-
},
|
|
633
|
-
const
|
|
634
|
-
if (
|
|
635
|
-
return
|
|
636
|
-
if (
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
const
|
|
641
|
-
return
|
|
627
|
+
}, "compareWithNumber"), getOppositeOperator = /* @__PURE__ */ __name((operator) => {
|
|
628
|
+
switch (operator) {
|
|
629
|
+
case CFNumberOperator.greaterThan:
|
|
630
|
+
return CFNumberOperator.lessThanOrEqual;
|
|
631
|
+
case CFNumberOperator.greaterThanOrEqual:
|
|
632
|
+
return CFNumberOperator.lessThan;
|
|
633
|
+
case CFNumberOperator.lessThan:
|
|
634
|
+
return CFNumberOperator.greaterThanOrEqual;
|
|
635
|
+
case CFNumberOperator.lessThanOrEqual:
|
|
636
|
+
return CFNumberOperator.greaterThan;
|
|
637
|
+
}
|
|
638
|
+
return operator;
|
|
639
|
+
}, "getOppositeOperator"), getColorScaleFromValue = /* @__PURE__ */ __name((colorList, value) => {
|
|
640
|
+
const prefixRgba = /* @__PURE__ */ __name((rgb) => rgb.a !== void 0 ? rgb : { ...rgb, a: 1 }, "prefixRgba"), index = colorList.findIndex((item) => item.value >= value), preIndex = index - 1;
|
|
641
|
+
if (index === 0)
|
|
642
|
+
return colorList[0].color.toRgbString();
|
|
643
|
+
if (preIndex >= 0) {
|
|
644
|
+
const minItem = colorList[preIndex], maxItem = colorList[index];
|
|
645
|
+
if (minItem.color.isValid && maxItem.color.isValid) {
|
|
646
|
+
const minRgb = prefixRgba(minItem.color.toRgb()), maxRgb = prefixRgba(maxItem.color.toRgb()), length = maxItem.value - minItem.value, v = (value - minItem.value) / length, rgbResult = ["r", "g", "b", "a"].reduce((obj, key) => {
|
|
647
|
+
const minV = minRgb[key];
|
|
648
|
+
return obj[key] = (maxRgb[key] - minV) * v + minV, obj;
|
|
642
649
|
}, {});
|
|
643
|
-
return new
|
|
650
|
+
return new ColorKit(rgbResult).toRgbString();
|
|
644
651
|
}
|
|
645
652
|
} else
|
|
646
|
-
return
|
|
647
|
-
},
|
|
648
|
-
if (
|
|
653
|
+
return colorList[colorList.length - 1].color.toRgbString();
|
|
654
|
+
}, "getColorScaleFromValue"), filterRange = /* @__PURE__ */ __name((ranges, maxRow, maxCol) => ranges.map((range) => {
|
|
655
|
+
if (range.startColumn > maxCol || range.startRow > maxRow)
|
|
649
656
|
return null;
|
|
650
|
-
const
|
|
651
|
-
return
|
|
652
|
-
}).filter((
|
|
653
|
-
function
|
|
654
|
-
let
|
|
655
|
-
return new
|
|
656
|
-
|
|
657
|
-
}),
|
|
657
|
+
const _range = { ...range };
|
|
658
|
+
return _range.endRow = Math.min(_range.endRow, maxRow), _range.endColumn = Math.min(_range.endColumn, maxCol), _range;
|
|
659
|
+
}).filter((range) => !!range), "filterRange");
|
|
660
|
+
function getMaxInFormulaResult(result) {
|
|
661
|
+
let max = 0;
|
|
662
|
+
return new ObjectMatrix(result).forValue((row, col, value) => {
|
|
663
|
+
max = Math.max(Number.isNaN(max) ? 0 : max, Number(value));
|
|
664
|
+
}), max;
|
|
658
665
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
666
|
+
__name(getMaxInFormulaResult, "getMaxInFormulaResult");
|
|
667
|
+
const _ColorScaleCalculateUnit = class _ColorScaleCalculateUnit extends BaseCalculateUnit {
|
|
668
|
+
preComputing(_row, _col, context) {
|
|
669
|
+
const rule = context.rule, worksheet = context.worksheet, matrix = new ObjectMatrix();
|
|
670
|
+
!rule.rule.config.every((item) => item.value.type === CFValueType.num) && filterRange(rule.ranges, worksheet.getMaxRows() - 1, worksheet.getMaxColumns() - 1).forEach((range) => {
|
|
671
|
+
Range.foreach(range, (row, col) => {
|
|
672
|
+
const cell2 = context.getCellValue(row, col), v = cell2 && cell2.v;
|
|
673
|
+
if (!isNullable(v) && (cell2 == null ? void 0 : cell2.t) === CellValueType.NUMBER) {
|
|
674
|
+
const _value = Number(v);
|
|
675
|
+
!Number.isNaN(_value) && matrix.setValue(row, col, _value);
|
|
668
676
|
}
|
|
669
677
|
});
|
|
670
678
|
});
|
|
671
|
-
const
|
|
672
|
-
value:
|
|
673
|
-
...
|
|
674
|
-
cfId:
|
|
679
|
+
const _configList = [...rule.rule.config].sort((a, b) => a.index - b.index).map((config) => ({
|
|
680
|
+
value: getValueByType(config.value, matrix, {
|
|
681
|
+
...context,
|
|
682
|
+
cfId: rule.cfId
|
|
675
683
|
}),
|
|
676
|
-
color: new
|
|
684
|
+
color: new ColorKit(config.color)
|
|
677
685
|
}));
|
|
678
|
-
if (!
|
|
679
|
-
const
|
|
686
|
+
if (!_configList.some((item) => isObject(item.value) ? item.value.status !== FormulaResultStatus.SUCCESS : !1)) {
|
|
687
|
+
const colorList = _configList.map((item) => item.color).reduce((result, color, index) => (result.result.push({ color, value: result.sortValue[index] }), result), {
|
|
680
688
|
result: [],
|
|
681
|
-
sortValue:
|
|
689
|
+
sortValue: _configList.map((item) => item.value.result).sort((a, b) => a - b)
|
|
682
690
|
}).result;
|
|
683
|
-
this.setPreComputingCache(
|
|
691
|
+
this.setPreComputingCache(colorList), this._preComputingStatus$.next(CalculateEmitStatus.preComputingEnd);
|
|
684
692
|
return;
|
|
685
693
|
}
|
|
686
|
-
this._preComputingStatus$.next(
|
|
694
|
+
this._preComputingStatus$.next(CalculateEmitStatus.preComputing);
|
|
687
695
|
}
|
|
688
|
-
getCellResult(
|
|
689
|
-
if (!
|
|
696
|
+
getCellResult(row, col, preComputingResult, context) {
|
|
697
|
+
if (!preComputingResult)
|
|
690
698
|
return null;
|
|
691
|
-
const
|
|
692
|
-
if (
|
|
693
|
-
const
|
|
694
|
-
if (!Number.isNaN(
|
|
695
|
-
return
|
|
699
|
+
const value = context.getCellValue(row, col);
|
|
700
|
+
if (value.t === CellValueType.NUMBER) {
|
|
701
|
+
const v = Number(value.v);
|
|
702
|
+
if (!Number.isNaN(v))
|
|
703
|
+
return getColorScaleFromValue(preComputingResult, v);
|
|
696
704
|
}
|
|
697
705
|
}
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
706
|
+
};
|
|
707
|
+
__name(_ColorScaleCalculateUnit, "ColorScaleCalculateUnit");
|
|
708
|
+
let ColorScaleCalculateUnit = _ColorScaleCalculateUnit;
|
|
709
|
+
const dataBarUKey = "sheet-conditional-rule-data-bar", defaultDataBarPositiveColor = "#ffbe38", defaultDataBarNativeColor = "#abd91a", defaultPlaceholderColor = "#000", EXTENSION_Z_INDEX$1 = 34, _DataBar = class _DataBar extends SheetExtension {
|
|
701
710
|
constructor() {
|
|
702
711
|
super(...arguments);
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
712
|
+
__publicField(this, "_paddingRightAndLeft", 2);
|
|
713
|
+
__publicField(this, "_paddingTopAndBottom", 2);
|
|
714
|
+
__publicField(this, "uKey", dataBarUKey);
|
|
715
|
+
__publicField(this, "Z_INDEX", EXTENSION_Z_INDEX$1);
|
|
716
|
+
__publicField(this, "_radius", 1);
|
|
708
717
|
}
|
|
709
718
|
// eslint-disable-next-line max-lines-per-function
|
|
710
|
-
draw(
|
|
711
|
-
const { worksheet
|
|
712
|
-
if (!
|
|
719
|
+
draw(ctx, _parentScale, spreadsheetSkeleton, diffRanges) {
|
|
720
|
+
const { worksheet } = spreadsheetSkeleton;
|
|
721
|
+
if (!worksheet)
|
|
713
722
|
return !1;
|
|
714
|
-
|
|
715
|
-
if (!
|
|
723
|
+
ctx.save(), Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => {
|
|
724
|
+
if (!worksheet.getRowVisible(row) || !worksheet.getColVisible(col))
|
|
716
725
|
return;
|
|
717
|
-
const
|
|
718
|
-
if (
|
|
719
|
-
const { color
|
|
720
|
-
let { isMerged
|
|
721
|
-
if (
|
|
726
|
+
const cellData = worksheet.getCell(row, col);
|
|
727
|
+
if (cellData && cellData.dataBar) {
|
|
728
|
+
const { color, value, startPoint, isGradient } = cellData.dataBar, cellInfo = spreadsheetSkeleton.getCellWithCoordByIndex(row, col, !1);
|
|
729
|
+
let { isMerged, isMergedMainCell, mergeInfo, startY, endY, startX, endX } = cellInfo;
|
|
730
|
+
if (isMerged || (isMergedMainCell && (startY = mergeInfo.startY, endY = mergeInfo.endY, startX = mergeInfo.startX, endX = mergeInfo.endX), !this.isRenderDiffRangesByCell(mergeInfo, diffRanges)))
|
|
722
731
|
return;
|
|
723
|
-
const
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
727
|
-
const
|
|
728
|
-
|
|
732
|
+
const borderWidth = endX - startX, borderHeight = endY + FIX_ONE_PIXEL_BLUR_OFFSET - startY, width = borderWidth - this._paddingRightAndLeft * 2, height = borderHeight - this._paddingTopAndBottom * 2;
|
|
733
|
+
if (value > 0) {
|
|
734
|
+
const dataBarWidth = Math.max(width * (1 - startPoint / 100) * value / 100, 1), x0 = startX + this._paddingRightAndLeft + startPoint / 100 * width, y0 = startY + this._paddingTopAndBottom;
|
|
735
|
+
if (isGradient) {
|
|
736
|
+
const gradient = ctx.createLinearGradient(x0, y0, x0 + dataBarWidth, y0);
|
|
737
|
+
gradient.addColorStop(0, color), gradient.addColorStop(1, "rgb(255 255 255)"), ctx.fillStyle = gradient, ctx.strokeStyle = color, ctx.lineWidth = 1;
|
|
729
738
|
} else
|
|
730
|
-
|
|
731
|
-
this._drawRectWithRoundedCorner(
|
|
739
|
+
ctx.fillStyle = color;
|
|
740
|
+
this._drawRectWithRoundedCorner(ctx, x0, y0, dataBarWidth, height, !1, !0, !0, !1), isGradient && ctx.stroke();
|
|
732
741
|
} else {
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const
|
|
736
|
-
|
|
742
|
+
const dataBarWidth = Math.max(width * startPoint / 100 * Math.abs(value) / 100, 1), x0 = startX + this._paddingRightAndLeft + startPoint / 100 * width - dataBarWidth, y0 = startY + this._paddingTopAndBottom;
|
|
743
|
+
if (isGradient) {
|
|
744
|
+
const gradient = ctx.createLinearGradient(x0, y0, x0 + dataBarWidth, y0);
|
|
745
|
+
gradient.addColorStop(0, "rgb(255 255 255)"), gradient.addColorStop(1, color), ctx.fillStyle = gradient, ctx.strokeStyle = color, ctx.lineWidth = 1;
|
|
737
746
|
} else
|
|
738
|
-
|
|
739
|
-
this._drawRectWithRoundedCorner(
|
|
747
|
+
ctx.fillStyle = color;
|
|
748
|
+
this._drawRectWithRoundedCorner(ctx, x0, y0, dataBarWidth, height, !0, !1, !1, !0), isGradient && ctx.stroke();
|
|
740
749
|
}
|
|
741
750
|
}
|
|
742
|
-
}),
|
|
751
|
+
}), ctx.restore();
|
|
743
752
|
}
|
|
744
|
-
_drawRectWithRoundedCorner(
|
|
745
|
-
const
|
|
746
|
-
!
|
|
753
|
+
_drawRectWithRoundedCorner(ctx, x, y, width, height, topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius) {
|
|
754
|
+
const radius = this._radius;
|
|
755
|
+
!height || !width || (ctx.beginPath(), ctx.moveTo(x + radius, y), ctx.lineTo(x + width - radius, y), topRightRadius ? ctx.arcTo(x + width, y, x + width, y + radius, radius) : ctx.lineTo(x + width, y), ctx.lineTo(x + width, y + height - radius), bottomRightRadius ? ctx.arcTo(x + width, y + height, x + width - radius, y + height, radius) : ctx.lineTo(x + width, y + height), ctx.lineTo(x + radius, y + height), bottomLeftRadius ? ctx.arcTo(x, y + height, x, y + height - radius, radius) : ctx.lineTo(x, y + height), ctx.lineTo(x, y + radius), topLeftRadius ? ctx.arcTo(x, y, x + radius, y, radius) : ctx.lineTo(x, y), ctx.closePath(), ctx.fill());
|
|
747
756
|
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
757
|
+
};
|
|
758
|
+
__name(_DataBar, "DataBar");
|
|
759
|
+
let DataBar = _DataBar;
|
|
760
|
+
SpreadsheetExtensionRegistry.add(DataBar);
|
|
761
|
+
const getSafeValue = /* @__PURE__ */ __name((v) => Math.max(Math.min(100, v), 0), "getSafeValue"), getValue$1 = /* @__PURE__ */ __name((row, col, getCell) => {
|
|
762
|
+
const cell2 = getCell(row, col);
|
|
763
|
+
if (cell2 && cell2.t === CellValueType.NUMBER) {
|
|
764
|
+
const value = Number(cell2.v);
|
|
765
|
+
return Number.isNaN(value) ? null : value;
|
|
755
766
|
}
|
|
756
767
|
return null;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
!Number.isNaN(k) && u.setValue(f, F, k);
|
|
768
|
+
}, "getValue$1"), _DataBarCalculateUnit = class _DataBarCalculateUnit extends BaseCalculateUnit {
|
|
769
|
+
preComputing(row, col, context) {
|
|
770
|
+
const rule = context.rule, ruleConfig = rule.rule, worksheet = context.worksheet, matrix = new ObjectMatrix();
|
|
771
|
+
![rule.rule.config.max, rule.rule.config.min].every((e) => e.type === CFValueType.num) && filterRange(rule.ranges, worksheet.getMaxRows() - 1, worksheet.getMaxColumns() - 1).forEach((range) => {
|
|
772
|
+
Range.foreach(range, (row2, col2) => {
|
|
773
|
+
const cell2 = context.getCellValue(row2, col2), v = cell2 && cell2.v;
|
|
774
|
+
if (!isNullable(v) && (cell2 == null ? void 0 : cell2.t) === CellValueType.NUMBER) {
|
|
775
|
+
const _value = Number(v);
|
|
776
|
+
!Number.isNaN(_value) && matrix.setValue(row2, col2, _value);
|
|
767
777
|
}
|
|
768
778
|
});
|
|
769
779
|
});
|
|
770
|
-
const
|
|
771
|
-
let
|
|
772
|
-
if (
|
|
773
|
-
const
|
|
774
|
-
|
|
780
|
+
const _min = getValueByType(ruleConfig.config.min, matrix, { ...context, cfId: rule.cfId }), _max = getValueByType(ruleConfig.config.max, matrix, { ...context, cfId: rule.cfId });
|
|
781
|
+
let min = 0, max = 0;
|
|
782
|
+
if (_min.status === FormulaResultStatus.SUCCESS) {
|
|
783
|
+
const v = Number(_min.result);
|
|
784
|
+
min = Number.isNaN(v) ? 0 : v;
|
|
775
785
|
} else {
|
|
776
|
-
this._preComputingStatus$.next(
|
|
786
|
+
this._preComputingStatus$.next(CalculateEmitStatus.preComputing);
|
|
777
787
|
return;
|
|
778
788
|
}
|
|
779
|
-
if (
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
let
|
|
783
|
-
if (
|
|
784
|
-
|
|
785
|
-
else if (
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
} else
|
|
789
|
-
this.setPreComputingCache({ min
|
|
789
|
+
if (_max.status === FormulaResultStatus.SUCCESS) {
|
|
790
|
+
const maxResult = Number(_max.result), v = Number.isNaN(maxResult) ? 0 : maxResult;
|
|
791
|
+
max = Math.max(v, min), min = Math.min(v, min);
|
|
792
|
+
let startPoint = 50;
|
|
793
|
+
if (min < 0 && max <= 0)
|
|
794
|
+
startPoint = 100;
|
|
795
|
+
else if (min < 0 && max > 0) {
|
|
796
|
+
const length = Math.abs(max) + Math.abs(min);
|
|
797
|
+
startPoint = Math.abs(min) / length * 100;
|
|
798
|
+
} else min >= 0 && max > 0 && (startPoint = 0);
|
|
799
|
+
this.setPreComputingCache({ min, max, startPoint }), this._preComputingStatus$.next(CalculateEmitStatus.preComputingEnd);
|
|
790
800
|
return;
|
|
791
801
|
}
|
|
792
|
-
this._preComputingStatus$.next(
|
|
802
|
+
this._preComputingStatus$.next(CalculateEmitStatus.preComputing);
|
|
793
803
|
}
|
|
794
804
|
// eslint-disable-next-line complexity
|
|
795
|
-
getCellResult(
|
|
796
|
-
const { min
|
|
797
|
-
if (!(
|
|
798
|
-
if (
|
|
799
|
-
return { color:
|
|
800
|
-
if (
|
|
801
|
-
const
|
|
802
|
-
return
|
|
803
|
-
} else if (
|
|
804
|
-
if (
|
|
805
|
-
const
|
|
806
|
-
return
|
|
805
|
+
getCellResult(row, col, preComputingResult, context) {
|
|
806
|
+
const { min, max, startPoint } = preComputingResult, ruleConfig = context.rule.rule, isShowValue = ruleConfig.isShowValue, isGradient = ruleConfig.config.isGradient, value = getValue$1(row, col, context.getCellValue);
|
|
807
|
+
if (!(value === null || value < min || min === max || max < min)) {
|
|
808
|
+
if (value === 0)
|
|
809
|
+
return { color: defaultPlaceholderColor, startPoint, value: 0, isGradient, isShowValue };
|
|
810
|
+
if (min < 0 && max <= 0) {
|
|
811
|
+
const length = max - min, v = getSafeValue((max - value) / length * 100);
|
|
812
|
+
return v === 0 ? void 0 : { color: ruleConfig.config.nativeColor || defaultDataBarNativeColor, startPoint, value: -v, isGradient, isShowValue };
|
|
813
|
+
} else if (min < 0 && max > 0)
|
|
814
|
+
if (value > 0) {
|
|
815
|
+
const v = getSafeValue(Math.min(value / max, 1) * 100);
|
|
816
|
+
return v === 0 ? void 0 : { color: ruleConfig.config.positiveColor || defaultDataBarPositiveColor, startPoint, value: v, isGradient, isShowValue };
|
|
807
817
|
} else {
|
|
808
|
-
const
|
|
809
|
-
return
|
|
818
|
+
const v = getSafeValue(Math.min(Math.abs(value) / Math.abs(min), 1) * 100);
|
|
819
|
+
return v === 0 ? void 0 : { color: ruleConfig.config.nativeColor || defaultDataBarNativeColor, startPoint, value: -v, isGradient, isShowValue };
|
|
810
820
|
}
|
|
811
|
-
else if (
|
|
812
|
-
const
|
|
813
|
-
return
|
|
821
|
+
else if (min >= 0 && max > 0) {
|
|
822
|
+
const length = max - min, startPoint2 = 0, v = getSafeValue((1 - (max - value) / length) * 100);
|
|
823
|
+
return v === 0 ? void 0 : { color: ruleConfig.config.positiveColor || defaultDataBarPositiveColor, startPoint: startPoint2, value: v, isGradient, isShowValue };
|
|
814
824
|
}
|
|
815
825
|
}
|
|
816
826
|
}
|
|
817
|
-
}
|
|
818
|
-
|
|
827
|
+
};
|
|
828
|
+
__name(_DataBarCalculateUnit, "DataBarCalculateUnit");
|
|
829
|
+
let DataBarCalculateUnit = _DataBarCalculateUnit;
|
|
830
|
+
const _HighlightCellCalculateUnit = class _HighlightCellCalculateUnit extends BaseCalculateUnit {
|
|
819
831
|
// eslint-disable-next-line max-lines-per-function
|
|
820
|
-
preComputing(
|
|
821
|
-
const
|
|
822
|
-
switch (
|
|
823
|
-
case
|
|
824
|
-
let
|
|
825
|
-
return
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
|
|
832
|
+
preComputing(row, col, context) {
|
|
833
|
+
const ruleConfig = context.rule.rule, ranges = context.rule.ranges, result = (/* @__PURE__ */ __name(() => {
|
|
834
|
+
switch (ruleConfig.subType) {
|
|
835
|
+
case CFSubRuleType.average: {
|
|
836
|
+
let sum = 0, count = 0;
|
|
837
|
+
return ranges.forEach((range) => {
|
|
838
|
+
Range.foreach(range, (row2, col2) => {
|
|
839
|
+
const cell2 = context.getCellValue(row2, col2), v = getCellValue(cell2 || void 0);
|
|
840
|
+
cell2 && cell2.t === CellValueType.NUMBER && v !== void 0 && (sum += Number(v) || 0, count++);
|
|
829
841
|
});
|
|
830
|
-
}), { value:
|
|
842
|
+
}), { value: sum / count, type: ruleConfig.subType };
|
|
831
843
|
}
|
|
832
|
-
case
|
|
833
|
-
case
|
|
834
|
-
const
|
|
835
|
-
return
|
|
836
|
-
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
const
|
|
840
|
-
|
|
844
|
+
case CFSubRuleType.uniqueValues:
|
|
845
|
+
case CFSubRuleType.duplicateValues: {
|
|
846
|
+
const cacheMap = /* @__PURE__ */ new Map();
|
|
847
|
+
return ranges.forEach((range) => {
|
|
848
|
+
Range.foreach(range, (row2, col2) => {
|
|
849
|
+
const cell2 = context.getCellValue(row2, col2), v = getCellValue(cell2 || void 0);
|
|
850
|
+
if (v !== void 0) {
|
|
851
|
+
const cache = cacheMap.get(v);
|
|
852
|
+
cache ? cacheMap.set(v, cache + 1) : cacheMap.set(v, 1);
|
|
841
853
|
}
|
|
842
854
|
});
|
|
843
|
-
}), { value:
|
|
855
|
+
}), { value: cacheMap, type: ruleConfig.subType };
|
|
844
856
|
}
|
|
845
|
-
case
|
|
846
|
-
const
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
const
|
|
850
|
-
|
|
857
|
+
case CFSubRuleType.rank: {
|
|
858
|
+
const allValue = [];
|
|
859
|
+
ranges.forEach((range) => {
|
|
860
|
+
Range.foreach(range, (row2, col2) => {
|
|
861
|
+
const cell2 = context.getCellValue(row2, col2), v = getCellValue(cell2 || void 0);
|
|
862
|
+
cell2 && cell2.t === CellValueType.NUMBER && v !== void 0 && allValue.push(Number(v) || 0);
|
|
851
863
|
});
|
|
852
|
-
}),
|
|
853
|
-
const
|
|
854
|
-
return
|
|
864
|
+
}), allValue.sort((a, b) => b - a);
|
|
865
|
+
const configRule = context.rule.rule, targetIndex = configRule.isPercent ? Math.floor(Math.max(Math.min(configRule.value, 100), 0) / 100 * allValue.length) : Math.floor(Math.max(Math.min(configRule.isBottom ? configRule.value - 1 : configRule.value, allValue.length), 0));
|
|
866
|
+
return configRule.isBottom ? { value: allValue[allValue.length - targetIndex - 1], type: ruleConfig.subType } : { value: allValue[Math.max(targetIndex - 1, 0)], type: ruleConfig.subType };
|
|
855
867
|
}
|
|
856
|
-
case
|
|
857
|
-
const
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
return
|
|
861
|
-
value:
|
|
862
|
-
type:
|
|
863
|
-
}) : (this._preComputingStatus$.next(
|
|
868
|
+
case CFSubRuleType.formula: {
|
|
869
|
+
const _ruleConfig = ruleConfig, conditionalFormattingFormulaService = context.accessor.get(ConditionalFormattingFormulaService);
|
|
870
|
+
conditionalFormattingFormulaService.registerFormulaWithRange(context.unitId, context.subUnitId, context.rule.cfId, _ruleConfig.value, context.rule.ranges);
|
|
871
|
+
const result2 = conditionalFormattingFormulaService.getFormulaMatrix(context.unitId, context.subUnitId, context.rule.cfId, _ruleConfig.value);
|
|
872
|
+
return result2 && result2.status === FormulaResultStatus.SUCCESS ? (this._preComputingStatus$.next(CalculateEmitStatus.preComputingEnd), {
|
|
873
|
+
value: result2.result,
|
|
874
|
+
type: ruleConfig.subType
|
|
875
|
+
}) : (this._preComputingStatus$.next(CalculateEmitStatus.preComputing), null);
|
|
864
876
|
}
|
|
865
|
-
case
|
|
866
|
-
switch (
|
|
867
|
-
case
|
|
877
|
+
case CFSubRuleType.timePeriod:
|
|
878
|
+
switch (ruleConfig.operator) {
|
|
879
|
+
case CFTimePeriodOperator.last7Days:
|
|
868
880
|
return {
|
|
869
881
|
value: {
|
|
870
|
-
start:
|
|
871
|
-
end:
|
|
882
|
+
start: dayjs().subtract(7, "day").valueOf(),
|
|
883
|
+
end: dayjs().valueOf()
|
|
872
884
|
},
|
|
873
|
-
type:
|
|
885
|
+
type: ruleConfig.subType
|
|
874
886
|
};
|
|
875
|
-
case
|
|
887
|
+
case CFTimePeriodOperator.lastMonth:
|
|
876
888
|
return {
|
|
877
889
|
value: {
|
|
878
|
-
start:
|
|
879
|
-
end:
|
|
890
|
+
start: dayjs().startOf("month").subtract(1, "month").valueOf(),
|
|
891
|
+
end: dayjs().endOf("month").subtract(1, "month").valueOf()
|
|
880
892
|
},
|
|
881
|
-
type:
|
|
893
|
+
type: ruleConfig.subType
|
|
882
894
|
};
|
|
883
|
-
case
|
|
895
|
+
case CFTimePeriodOperator.lastWeek:
|
|
884
896
|
return {
|
|
885
897
|
value: {
|
|
886
|
-
start:
|
|
887
|
-
end:
|
|
898
|
+
start: dayjs().startOf("week").subtract(1, "week").valueOf(),
|
|
899
|
+
end: dayjs().endOf("week").subtract(1, "week").valueOf()
|
|
888
900
|
},
|
|
889
|
-
type:
|
|
901
|
+
type: ruleConfig.subType
|
|
890
902
|
};
|
|
891
|
-
case
|
|
903
|
+
case CFTimePeriodOperator.nextMonth:
|
|
892
904
|
return {
|
|
893
905
|
value: {
|
|
894
|
-
start:
|
|
895
|
-
end:
|
|
906
|
+
start: dayjs().startOf("month").add(1, "month").valueOf(),
|
|
907
|
+
end: dayjs().endOf("month").add(1, "month").valueOf()
|
|
896
908
|
},
|
|
897
|
-
type:
|
|
909
|
+
type: ruleConfig.subType
|
|
898
910
|
};
|
|
899
|
-
case
|
|
911
|
+
case CFTimePeriodOperator.nextWeek:
|
|
900
912
|
return {
|
|
901
913
|
value: {
|
|
902
|
-
start:
|
|
903
|
-
end:
|
|
914
|
+
start: dayjs().startOf("week").add(1, "week").valueOf(),
|
|
915
|
+
end: dayjs().endOf("week").add(1, "week").valueOf()
|
|
904
916
|
},
|
|
905
|
-
type:
|
|
917
|
+
type: ruleConfig.subType
|
|
906
918
|
};
|
|
907
|
-
case
|
|
919
|
+
case CFTimePeriodOperator.thisMonth:
|
|
908
920
|
return {
|
|
909
921
|
value: {
|
|
910
|
-
start:
|
|
911
|
-
end:
|
|
922
|
+
start: dayjs().startOf("month").valueOf(),
|
|
923
|
+
end: dayjs().endOf("month").valueOf()
|
|
912
924
|
},
|
|
913
|
-
type:
|
|
925
|
+
type: ruleConfig.subType
|
|
914
926
|
};
|
|
915
|
-
case
|
|
927
|
+
case CFTimePeriodOperator.thisWeek:
|
|
916
928
|
return {
|
|
917
929
|
value: {
|
|
918
|
-
start:
|
|
919
|
-
end:
|
|
930
|
+
start: dayjs().startOf("week").valueOf(),
|
|
931
|
+
end: dayjs().endOf("week").valueOf()
|
|
920
932
|
},
|
|
921
|
-
type:
|
|
933
|
+
type: ruleConfig.subType
|
|
922
934
|
};
|
|
923
|
-
case
|
|
935
|
+
case CFTimePeriodOperator.today:
|
|
924
936
|
return {
|
|
925
937
|
value: {
|
|
926
|
-
start:
|
|
927
|
-
end:
|
|
938
|
+
start: dayjs().startOf("day").valueOf(),
|
|
939
|
+
end: dayjs().endOf("day").valueOf()
|
|
928
940
|
},
|
|
929
|
-
type:
|
|
941
|
+
type: ruleConfig.subType
|
|
930
942
|
};
|
|
931
|
-
case
|
|
943
|
+
case CFTimePeriodOperator.tomorrow:
|
|
932
944
|
return {
|
|
933
945
|
value: {
|
|
934
|
-
start:
|
|
935
|
-
end:
|
|
946
|
+
start: dayjs().startOf("day").add(1, "day").valueOf(),
|
|
947
|
+
end: dayjs().endOf("day").add(1, "day").valueOf()
|
|
936
948
|
},
|
|
937
|
-
type:
|
|
949
|
+
type: ruleConfig.subType
|
|
938
950
|
};
|
|
939
|
-
case
|
|
951
|
+
case CFTimePeriodOperator.yesterday:
|
|
940
952
|
return {
|
|
941
953
|
value: {
|
|
942
|
-
start:
|
|
943
|
-
end:
|
|
954
|
+
start: dayjs().startOf("day").subtract(1, "day").valueOf(),
|
|
955
|
+
end: dayjs().endOf("day").subtract(1, "day").valueOf()
|
|
944
956
|
},
|
|
945
|
-
type:
|
|
957
|
+
type: ruleConfig.subType
|
|
946
958
|
};
|
|
947
959
|
}
|
|
948
960
|
}
|
|
949
|
-
})();
|
|
950
|
-
this.setPreComputingCache(
|
|
961
|
+
}, "getCache"))();
|
|
962
|
+
this.setPreComputingCache(result);
|
|
951
963
|
}
|
|
952
964
|
// eslint-disable-next-line max-lines-per-function
|
|
953
|
-
getCellResult(
|
|
954
|
-
const
|
|
955
|
-
return (() => {
|
|
956
|
-
switch (
|
|
957
|
-
case
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
965
|
+
getCellResult(row, col, preComputingResult, context) {
|
|
966
|
+
const cellValue = context.getCellValue(row, col), ruleConfig = context.rule.rule;
|
|
967
|
+
return (/* @__PURE__ */ __name(() => {
|
|
968
|
+
switch (ruleConfig.subType) {
|
|
969
|
+
case CFSubRuleType.number: {
|
|
970
|
+
const v = cellValue && Number(cellValue.v);
|
|
971
|
+
if (isNullable(v) || Number.isNaN(v) || (cellValue == null ? void 0 : cellValue.t) !== CellValueType.NUMBER)
|
|
960
972
|
return;
|
|
961
|
-
const
|
|
962
|
-
return
|
|
973
|
+
const subRuleConfig = ruleConfig;
|
|
974
|
+
return compareWithNumber({ operator: subRuleConfig.operator, value: subRuleConfig.value || 0 }, v || 0);
|
|
963
975
|
}
|
|
964
|
-
case
|
|
965
|
-
const
|
|
966
|
-
switch (
|
|
967
|
-
case
|
|
968
|
-
return
|
|
969
|
-
case
|
|
970
|
-
return /^\s*$/.test(
|
|
971
|
-
case
|
|
972
|
-
return !/^\s*$/.test(
|
|
973
|
-
case
|
|
974
|
-
return
|
|
975
|
-
case
|
|
976
|
-
return !
|
|
977
|
-
case
|
|
978
|
-
return
|
|
979
|
-
case
|
|
980
|
-
return
|
|
981
|
-
case
|
|
982
|
-
return
|
|
983
|
-
case
|
|
984
|
-
return
|
|
985
|
-
case
|
|
986
|
-
return
|
|
976
|
+
case CFSubRuleType.text: {
|
|
977
|
+
const subRuleConfig = ruleConfig, value = getCellValue(cellValue), v = value === null ? "" : String(value), condition = subRuleConfig.value || "";
|
|
978
|
+
switch (subRuleConfig.operator) {
|
|
979
|
+
case CFTextOperator.beginsWith:
|
|
980
|
+
return v.startsWith(condition);
|
|
981
|
+
case CFTextOperator.containsBlanks:
|
|
982
|
+
return /^\s*$/.test(v);
|
|
983
|
+
case CFTextOperator.notContainsBlanks:
|
|
984
|
+
return !/^\s*$/.test(v);
|
|
985
|
+
case CFTextOperator.containsErrors:
|
|
986
|
+
return ERROR_TYPE_SET.has(v);
|
|
987
|
+
case CFTextOperator.notContainsErrors:
|
|
988
|
+
return !ERROR_TYPE_SET.has(v);
|
|
989
|
+
case CFTextOperator.containsText:
|
|
990
|
+
return v.indexOf(condition) > -1;
|
|
991
|
+
case CFTextOperator.notContainsText:
|
|
992
|
+
return v.indexOf(condition) === -1;
|
|
993
|
+
case CFTextOperator.endsWith:
|
|
994
|
+
return v.endsWith(condition);
|
|
995
|
+
case CFTextOperator.equal:
|
|
996
|
+
return v === condition;
|
|
997
|
+
case CFTextOperator.notEqual:
|
|
998
|
+
return v !== condition;
|
|
987
999
|
default:
|
|
988
1000
|
return !1;
|
|
989
1001
|
}
|
|
990
1002
|
}
|
|
991
|
-
case
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
1003
|
+
case CFSubRuleType.timePeriod: {
|
|
1004
|
+
const value = getCellValue(cellValue);
|
|
1005
|
+
if (isNullable(value) || Number.isNaN(Number(value)) || (cellValue == null ? void 0 : cellValue.t) !== CellValueType.NUMBER || !preComputingResult)
|
|
994
1006
|
return;
|
|
995
|
-
const
|
|
996
|
-
return
|
|
1007
|
+
const v = serialTimeToTimestamp(Number(value)), { start, end } = preComputingResult.value;
|
|
1008
|
+
return v >= start && v <= end;
|
|
997
1009
|
}
|
|
998
|
-
case
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
1010
|
+
case CFSubRuleType.average: {
|
|
1011
|
+
const value = cellValue && cellValue.v, v = Number(value);
|
|
1012
|
+
if (isNullable(value) || Number.isNaN(v) || (cellValue == null ? void 0 : cellValue.t) !== CellValueType.NUMBER || !preComputingResult)
|
|
1001
1013
|
return !1;
|
|
1002
|
-
const
|
|
1003
|
-
switch (
|
|
1004
|
-
case
|
|
1005
|
-
return
|
|
1006
|
-
case
|
|
1007
|
-
return
|
|
1008
|
-
case
|
|
1009
|
-
return
|
|
1010
|
-
case
|
|
1011
|
-
return
|
|
1012
|
-
case
|
|
1013
|
-
return
|
|
1014
|
-
case
|
|
1015
|
-
return !
|
|
1014
|
+
const subRuleConfig = ruleConfig, average = preComputingResult.value;
|
|
1015
|
+
switch (subRuleConfig.operator) {
|
|
1016
|
+
case CFNumberOperator.greaterThan:
|
|
1017
|
+
return v > average;
|
|
1018
|
+
case CFNumberOperator.greaterThanOrEqual:
|
|
1019
|
+
return v >= average;
|
|
1020
|
+
case CFNumberOperator.lessThan:
|
|
1021
|
+
return v < average;
|
|
1022
|
+
case CFNumberOperator.lessThanOrEqual:
|
|
1023
|
+
return v <= average;
|
|
1024
|
+
case CFNumberOperator.equal:
|
|
1025
|
+
return isFloatsEqual(v, average);
|
|
1026
|
+
case CFNumberOperator.notEqual:
|
|
1027
|
+
return !isFloatsEqual(v, average);
|
|
1016
1028
|
default:
|
|
1017
1029
|
return !1;
|
|
1018
1030
|
}
|
|
1019
1031
|
}
|
|
1020
|
-
case
|
|
1021
|
-
const
|
|
1022
|
-
if (
|
|
1032
|
+
case CFSubRuleType.rank: {
|
|
1033
|
+
const value = getCellValue(cellValue), v = Number(value);
|
|
1034
|
+
if (isNullable(value) || Number.isNaN(v) || (cellValue == null ? void 0 : cellValue.t) !== CellValueType.NUMBER || !preComputingResult)
|
|
1023
1035
|
return !1;
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
1036
|
+
const targetValue = preComputingResult.value;
|
|
1037
|
+
return ruleConfig.isBottom ? v <= targetValue : v >= targetValue;
|
|
1026
1038
|
}
|
|
1027
|
-
case
|
|
1028
|
-
const
|
|
1029
|
-
return
|
|
1039
|
+
case CFSubRuleType.uniqueValues: {
|
|
1040
|
+
const value = getCellValue(cellValue);
|
|
1041
|
+
return isNullable(value) || !preComputingResult ? !1 : preComputingResult.value.get(value) === 1;
|
|
1030
1042
|
}
|
|
1031
|
-
case
|
|
1032
|
-
const
|
|
1033
|
-
return
|
|
1043
|
+
case CFSubRuleType.duplicateValues: {
|
|
1044
|
+
const value = getCellValue(cellValue);
|
|
1045
|
+
return isNullable(value) || !preComputingResult ? !1 : preComputingResult.value.get(value) !== 1;
|
|
1034
1046
|
}
|
|
1035
|
-
case
|
|
1036
|
-
const
|
|
1037
|
-
return
|
|
1047
|
+
case CFSubRuleType.formula: {
|
|
1048
|
+
const cache = preComputingResult == null ? void 0 : preComputingResult.value;
|
|
1049
|
+
return cache ? cache.getValue(row, col) === !0 : !1;
|
|
1038
1050
|
}
|
|
1039
1051
|
}
|
|
1040
|
-
})() ?
|
|
1052
|
+
}, "run"))() ? ruleConfig.style : {};
|
|
1041
1053
|
}
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1054
|
+
};
|
|
1055
|
+
__name(_HighlightCellCalculateUnit, "HighlightCellCalculateUnit");
|
|
1056
|
+
let HighlightCellCalculateUnit = _HighlightCellCalculateUnit;
|
|
1057
|
+
const getValue = /* @__PURE__ */ __name((row, col, getCell) => {
|
|
1058
|
+
const cell2 = getCell(row, col);
|
|
1059
|
+
if (cell2 && cell2.t === CellValueType.NUMBER) {
|
|
1060
|
+
const value = Number(cell2.v);
|
|
1061
|
+
return Number.isNaN(value) ? null : value;
|
|
1048
1062
|
}
|
|
1049
1063
|
return null;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
!Number.isNaN(F) && a.setValue(d, C, F);
|
|
1064
|
+
}, "getValue"), _IconSetCalculateUnit = class _IconSetCalculateUnit extends BaseCalculateUnit {
|
|
1065
|
+
preComputing(_row, _col, context) {
|
|
1066
|
+
const ruleConfig = context.rule.rule, worksheet = context.worksheet, matrix = new ObjectMatrix();
|
|
1067
|
+
!ruleConfig.config.every((e) => e.value.type === CFValueType.num) && filterRange(context.rule.ranges, worksheet.getMaxRows() - 1, worksheet.getMaxColumns() - 1).forEach((range) => {
|
|
1068
|
+
Range.foreach(range, (row, col) => {
|
|
1069
|
+
const cell2 = context.getCellValue(row, col), v = cell2 && cell2.v;
|
|
1070
|
+
if (!isNullable(v) && (cell2 == null ? void 0 : cell2.t) === CellValueType.NUMBER) {
|
|
1071
|
+
const _value = Number(v);
|
|
1072
|
+
!Number.isNaN(_value) && matrix.setValue(row, col, _value);
|
|
1060
1073
|
}
|
|
1061
1074
|
});
|
|
1062
1075
|
});
|
|
1063
|
-
const
|
|
1064
|
-
if (!
|
|
1065
|
-
const
|
|
1066
|
-
operator:
|
|
1067
|
-
value: Number(
|
|
1068
|
-
})).reduce((
|
|
1069
|
-
const
|
|
1070
|
-
if (!
|
|
1071
|
-
|
|
1076
|
+
const splitValueResult = ruleConfig.config.map((v) => getValueByType(v.value, matrix, { ...context, cfId: context.rule.cfId }));
|
|
1077
|
+
if (!splitValueResult.some((item) => item.status !== FormulaResultStatus.SUCCESS)) {
|
|
1078
|
+
const splitValue = splitValueResult.map((item, index) => ({
|
|
1079
|
+
operator: ruleConfig.config[index].operator,
|
|
1080
|
+
value: Number(item.result) || 0
|
|
1081
|
+
})).reduce((result, cur, index, list) => {
|
|
1082
|
+
const item = ruleConfig.config[index];
|
|
1083
|
+
if (!index || index === list.length - 1)
|
|
1084
|
+
result.push({ ...cur, iconId: item.iconId, iconType: item.iconType });
|
|
1072
1085
|
else {
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1086
|
+
const pre = list[index - 1];
|
|
1087
|
+
compareWithNumber(pre, cur.value) || result.push({ ...cur, iconId: item.iconId, iconType: item.iconType });
|
|
1075
1088
|
}
|
|
1076
|
-
return
|
|
1089
|
+
return result;
|
|
1077
1090
|
}, []);
|
|
1078
|
-
this.setPreComputingCache(
|
|
1091
|
+
this.setPreComputingCache(splitValue), this._preComputingStatus$.next(CalculateEmitStatus.preComputingEnd);
|
|
1079
1092
|
return;
|
|
1080
1093
|
}
|
|
1081
|
-
this._preComputingStatus$.next(
|
|
1094
|
+
this._preComputingStatus$.next(CalculateEmitStatus.preComputing);
|
|
1082
1095
|
}
|
|
1083
|
-
getCellResult(
|
|
1084
|
-
if (!
|
|
1096
|
+
getCellResult(row, col, preComputingResult, context) {
|
|
1097
|
+
if (!preComputingResult)
|
|
1085
1098
|
return null;
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1099
|
+
const value = getValue(row, col, context.getCellValue);
|
|
1100
|
+
if (value === null)
|
|
1088
1101
|
return;
|
|
1089
|
-
const
|
|
1090
|
-
for (let
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1093
|
-
if (
|
|
1094
|
-
return { iconId
|
|
1102
|
+
const ruleConfig = context.rule.rule, isShowValue = ruleConfig.isShowValue === void 0 ? !0 : !!ruleConfig.isShowValue;
|
|
1103
|
+
for (let index = 0; index < preComputingResult.length; index++) {
|
|
1104
|
+
const item = preComputingResult[index], start = { ...item }, end = { ...item }, { iconId, iconType } = item;
|
|
1105
|
+
if (index === 0) {
|
|
1106
|
+
if (compareWithNumber(item, value))
|
|
1107
|
+
return { iconId, iconType, isShowValue };
|
|
1095
1108
|
} else {
|
|
1096
|
-
if (
|
|
1097
|
-
return { iconId
|
|
1109
|
+
if (index === preComputingResult.length - 1)
|
|
1110
|
+
return { iconId, iconType, isShowValue };
|
|
1098
1111
|
{
|
|
1099
|
-
const
|
|
1100
|
-
if (
|
|
1101
|
-
return { iconId
|
|
1112
|
+
const pre = preComputingResult[index - 1];
|
|
1113
|
+
if (end.operator = getOppositeOperator(pre.operator), end.value = pre.value, compareWithNumber(start, value) && compareWithNumber(end, value))
|
|
1114
|
+
return { iconId, iconType, isShowValue };
|
|
1102
1115
|
}
|
|
1103
1116
|
}
|
|
1104
1117
|
}
|
|
1105
1118
|
}
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1119
|
+
};
|
|
1120
|
+
__name(_IconSetCalculateUnit, "IconSetCalculateUnit");
|
|
1121
|
+
let IconSetCalculateUnit = _IconSetCalculateUnit;
|
|
1122
|
+
var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor, __decorateClass$2 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
1123
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1124
|
+
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
1125
|
+
return kind && result && __defProp$2(target, key, result), result;
|
|
1126
|
+
}, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$2");
|
|
1127
|
+
const CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH = 50 * 20 * 3 * 3;
|
|
1128
|
+
var _a2;
|
|
1129
|
+
let ConditionalFormattingViewModel = (_a2 = class extends Disposable {
|
|
1130
|
+
constructor(_injector, _conditionalFormattingRuleModel, _conditionalFormattingFormulaService, _univerInstanceService) {
|
|
1115
1131
|
super();
|
|
1116
1132
|
// Map<unitID ,<sheetId ,ObjectMatrix>>
|
|
1117
|
-
|
|
1118
|
-
|
|
1133
|
+
__publicField(this, "_calculateUnitManagers", /* @__PURE__ */ new Map());
|
|
1134
|
+
__publicField(this, "_rTreeManager", new RTree());
|
|
1119
1135
|
/**
|
|
1120
1136
|
* 1nd-level cache
|
|
1121
1137
|
*/
|
|
1122
|
-
|
|
1123
|
-
|
|
1138
|
+
__publicField(this, "_cellCache", new LRUMap(CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH));
|
|
1139
|
+
__publicField(this, "_markDirty$", new Subject());
|
|
1124
1140
|
/**
|
|
1125
1141
|
* The rendering layer listens to this variable to determine whether a reRender is necessary.
|
|
1126
1142
|
* @memberof ConditionalFormattingViewModel
|
|
1127
1143
|
*/
|
|
1128
|
-
|
|
1144
|
+
__publicField(this, "markDirty$", this._markDirty$.asObservable());
|
|
1129
1145
|
/**
|
|
1130
1146
|
`isNeedResetPreComputingCache` indicates whether it is necessary to remove the 2nd-level cache for each rule individually.
|
|
1131
1147
|
Generally, when the logic of a rule calculation is modified, the cache for that rule needs to be removed.
|
|
@@ -1135,189 +1151,189 @@ let j = class extends m2 {
|
|
|
1135
1151
|
After the calculation is finished, it is only for marking as dirty, and the 2nd-level cache need to be cleared.
|
|
1136
1152
|
* @param {boolean} [isNeedResetPreComputingCache]
|
|
1137
1153
|
*/
|
|
1138
|
-
|
|
1139
|
-
if (this._cellCache.clear(),
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1154
|
+
__publicField(this, "_markRuleDirtyAtOnce", /* @__PURE__ */ __name((unitId, subUnitId, cfId, isNeedResetPreComputingCache = !0) => {
|
|
1155
|
+
if (this._cellCache.clear(), isNeedResetPreComputingCache) {
|
|
1156
|
+
const calculateUnit = this._ensureCalculateUnitManager(unitId, subUnitId).get(cfId);
|
|
1157
|
+
calculateUnit && calculateUnit.resetPreComputingCache();
|
|
1142
1158
|
}
|
|
1143
1159
|
this._markDirty$.next({
|
|
1144
|
-
unitId
|
|
1145
|
-
subUnitId
|
|
1146
|
-
cfId
|
|
1160
|
+
unitId,
|
|
1161
|
+
subUnitId,
|
|
1162
|
+
cfId
|
|
1147
1163
|
});
|
|
1148
|
-
});
|
|
1164
|
+
}, "_markRuleDirtyAtOnce"));
|
|
1149
1165
|
/**
|
|
1150
1166
|
* For the same condition format being marked dirty multiple times at the same time,
|
|
1151
1167
|
* it will cause the style cache to be cleared, thereby causing the screen to flicker.
|
|
1152
1168
|
* Here,multiple dirties are merged into one..
|
|
1153
1169
|
*/
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
return this.disposeWithMe(
|
|
1157
|
-
const
|
|
1158
|
-
return
|
|
1159
|
-
const
|
|
1160
|
-
if (
|
|
1161
|
-
if (
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1170
|
+
__publicField(this, "markRuleDirty", (() => {
|
|
1171
|
+
const rxItem = new Subject();
|
|
1172
|
+
return this.disposeWithMe(rxItem.pipe(bufferTime(100), filter((e) => !!e.length), map((list) => {
|
|
1173
|
+
const set = /* @__PURE__ */ new Set(), result = [];
|
|
1174
|
+
return list.forEach((item) => {
|
|
1175
|
+
const kye = `${item.unitId}_${item.subUnitId}_${item.cfId}`;
|
|
1176
|
+
if (set.has(kye)) {
|
|
1177
|
+
if (item.isNeedResetPreComputingCache) {
|
|
1178
|
+
const i = result.find((e) => e.cfId === item.cfId);
|
|
1179
|
+
i.isNeedResetPreComputingCache = !0;
|
|
1164
1180
|
}
|
|
1165
1181
|
return;
|
|
1166
1182
|
}
|
|
1167
|
-
|
|
1168
|
-
}),
|
|
1169
|
-
})).subscribe((
|
|
1170
|
-
|
|
1171
|
-
this._markRuleDirtyAtOnce(
|
|
1183
|
+
set.add(kye), result.push({ ...item });
|
|
1184
|
+
}), result;
|
|
1185
|
+
})).subscribe((list) => {
|
|
1186
|
+
list.forEach((item) => {
|
|
1187
|
+
this._markRuleDirtyAtOnce(item.unitId, item.subUnitId, item.cfId, item.isNeedResetPreComputingCache);
|
|
1172
1188
|
});
|
|
1173
|
-
})), (
|
|
1174
|
-
|
|
1189
|
+
})), (unitId, subUnitId, cfId, isNeedResetPreComputingCache = !0) => {
|
|
1190
|
+
rxItem.next({ unitId, subUnitId, cfId, isNeedResetPreComputingCache });
|
|
1175
1191
|
};
|
|
1176
1192
|
})());
|
|
1177
|
-
this._injector =
|
|
1193
|
+
this._injector = _injector, this._conditionalFormattingRuleModel = _conditionalFormattingRuleModel, this._conditionalFormattingFormulaService = _conditionalFormattingFormulaService, this._univerInstanceService = _univerInstanceService, this._initRuleListener(), this._handleCustomFormulasSeparately(), this._initCFFormulaListener();
|
|
1178
1194
|
}
|
|
1179
1195
|
_initCFFormulaListener() {
|
|
1180
1196
|
this.disposeWithMe(
|
|
1181
|
-
this._conditionalFormattingFormulaService.result$.subscribe(({ unitId
|
|
1182
|
-
|
|
1197
|
+
this._conditionalFormattingFormulaService.result$.subscribe(({ unitId, subUnitId, cfId, isAllFinished }) => {
|
|
1198
|
+
isAllFinished && this._markRuleDirtyAtOnce(unitId, subUnitId, cfId, isAllFinished);
|
|
1183
1199
|
})
|
|
1184
1200
|
);
|
|
1185
1201
|
}
|
|
1186
|
-
getCellCfs(
|
|
1187
|
-
const
|
|
1188
|
-
if (this._cellCache.has(
|
|
1189
|
-
return this._cellCache.get(
|
|
1190
|
-
const
|
|
1191
|
-
return
|
|
1192
|
-
}
|
|
1193
|
-
_getCellCfs(
|
|
1194
|
-
var
|
|
1195
|
-
const
|
|
1196
|
-
return
|
|
1197
|
-
const
|
|
1198
|
-
return
|
|
1199
|
-
cfId:
|
|
1200
|
-
result:
|
|
1202
|
+
getCellCfs(unitId, subUnitId, row, col) {
|
|
1203
|
+
const key = this._createCacheKey(unitId, subUnitId, row, col);
|
|
1204
|
+
if (this._cellCache.has(key))
|
|
1205
|
+
return this._cellCache.get(key);
|
|
1206
|
+
const result = this._getCellCfs(unitId, subUnitId, row, col);
|
|
1207
|
+
return result.length && this._cellCache.set(key, result), result;
|
|
1208
|
+
}
|
|
1209
|
+
_getCellCfs(unitId, subUnitId, row, col) {
|
|
1210
|
+
var _a5;
|
|
1211
|
+
const subunitRules = (_a5 = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId)) != null ? _a5 : [], _calculateUnitManagers = this._ensureCalculateUnitManager(unitId, subUnitId), list = this._rTreeManager.bulkSearch([{ unitId, sheetId: subUnitId, range: { startColumn: col, endColumn: col, startRow: row, endRow: row } }]), rules = subunitRules.filter((rule) => list.has(rule.cfId));
|
|
1212
|
+
return rules.length ? rules.map((rule) => {
|
|
1213
|
+
const calculateUnit = _calculateUnitManagers.get(rule.cfId);
|
|
1214
|
+
return calculateUnit ? {
|
|
1215
|
+
cfId: rule.cfId,
|
|
1216
|
+
result: calculateUnit.getCell(row, col)
|
|
1201
1217
|
} : null;
|
|
1202
|
-
}).filter((
|
|
1218
|
+
}).filter((e) => !!e).map((e, index) => ({ ...e, priority: index })) : [];
|
|
1203
1219
|
}
|
|
1204
1220
|
_handleCustomFormulasSeparately() {
|
|
1205
1221
|
this.disposeWithMe(
|
|
1206
|
-
this._conditionalFormattingRuleModel.$ruleChange.subscribe((
|
|
1207
|
-
if (
|
|
1208
|
-
const { unitId
|
|
1209
|
-
|
|
1222
|
+
this._conditionalFormattingRuleModel.$ruleChange.subscribe((e) => {
|
|
1223
|
+
if (e.type === "set") {
|
|
1224
|
+
const { unitId, subUnitId } = e, oldRule = e.oldRule;
|
|
1225
|
+
oldRule.rule.type === CFRuleType.highlightCell && oldRule.rule.subType === CFSubRuleType.formula && this._conditionalFormattingFormulaService.deleteCache(unitId, subUnitId, oldRule.cfId);
|
|
1210
1226
|
}
|
|
1211
1227
|
})
|
|
1212
1228
|
);
|
|
1213
1229
|
}
|
|
1214
1230
|
_initRuleListener() {
|
|
1215
1231
|
this.disposeWithMe(
|
|
1216
|
-
this._conditionalFormattingRuleModel.$ruleChange.subscribe((
|
|
1217
|
-
const { unitId
|
|
1218
|
-
switch (this.markRuleDirty(
|
|
1232
|
+
this._conditionalFormattingRuleModel.$ruleChange.subscribe((e) => {
|
|
1233
|
+
const { unitId, subUnitId, rule } = e, { cfId, ranges } = rule, calculateUnitManager = this._ensureCalculateUnitManager(unitId, subUnitId);
|
|
1234
|
+
switch (this.markRuleDirty(unitId, subUnitId, cfId), e.type) {
|
|
1219
1235
|
case "add": {
|
|
1220
|
-
this._rTreeManager.bulkInsert(
|
|
1221
|
-
const
|
|
1222
|
-
if (!
|
|
1236
|
+
this._rTreeManager.bulkInsert(ranges.map((r) => ({ unitId, sheetId: subUnitId, id: cfId, range: r })));
|
|
1237
|
+
const instance = this._createRuleCalculateUnitInstance(unitId, subUnitId, rule);
|
|
1238
|
+
if (!instance)
|
|
1223
1239
|
return;
|
|
1224
|
-
|
|
1240
|
+
calculateUnitManager.set(rule.cfId, instance);
|
|
1225
1241
|
break;
|
|
1226
1242
|
}
|
|
1227
1243
|
case "delete": {
|
|
1228
|
-
this._rTreeManager.bulkRemove(
|
|
1244
|
+
this._rTreeManager.bulkRemove(ranges.map((r) => ({ unitId, sheetId: subUnitId, id: cfId, range: r }))), calculateUnitManager.delete(rule.cfId);
|
|
1229
1245
|
break;
|
|
1230
1246
|
}
|
|
1231
1247
|
case "set": {
|
|
1232
|
-
const
|
|
1233
|
-
if (this._rTreeManager.bulkRemove(
|
|
1234
|
-
const
|
|
1235
|
-
if (!
|
|
1248
|
+
const oldRule = e.oldRule;
|
|
1249
|
+
if (this._rTreeManager.bulkRemove(oldRule.ranges.map((r) => ({ unitId, sheetId: subUnitId, id: oldRule.cfId, range: r }))), this._rTreeManager.bulkInsert(ranges.map((r) => ({ unitId, sheetId: subUnitId, id: cfId, range: r }))), oldRule.rule.type !== rule.rule.type) {
|
|
1250
|
+
const instance = this._createRuleCalculateUnitInstance(unitId, subUnitId, rule);
|
|
1251
|
+
if (!instance)
|
|
1236
1252
|
return;
|
|
1237
|
-
|
|
1253
|
+
calculateUnitManager.delete(oldRule.cfId), calculateUnitManager.set(rule.cfId, instance);
|
|
1238
1254
|
} else {
|
|
1239
|
-
const
|
|
1240
|
-
if (!
|
|
1255
|
+
const instance = calculateUnitManager.get(oldRule.cfId);
|
|
1256
|
+
if (!instance)
|
|
1241
1257
|
return;
|
|
1242
|
-
|
|
1258
|
+
instance.updateRule(rule);
|
|
1243
1259
|
}
|
|
1244
1260
|
}
|
|
1245
1261
|
}
|
|
1246
1262
|
})
|
|
1247
1263
|
);
|
|
1248
1264
|
}
|
|
1249
|
-
_ensureCalculateUnitManager(
|
|
1250
|
-
let
|
|
1251
|
-
|
|
1252
|
-
let
|
|
1253
|
-
return
|
|
1265
|
+
_ensureCalculateUnitManager(unitId, subUnitId) {
|
|
1266
|
+
let unitMap = this._calculateUnitManagers.get(unitId);
|
|
1267
|
+
unitMap || (unitMap = /* @__PURE__ */ new Map(), this._calculateUnitManagers.set(unitId, unitMap));
|
|
1268
|
+
let subUnitMap = unitMap.get(subUnitId);
|
|
1269
|
+
return subUnitMap || (subUnitMap = /* @__PURE__ */ new Map(), unitMap.set(subUnitId, subUnitMap)), subUnitMap;
|
|
1254
1270
|
}
|
|
1255
|
-
_createRuleCalculateUnitInstance(
|
|
1256
|
-
const
|
|
1257
|
-
if (!
|
|
1271
|
+
_createRuleCalculateUnitInstance(unitId, subUnitId, rule) {
|
|
1272
|
+
const workbook = this._univerInstanceService.getUnit(unitId), worksheet = workbook == null ? void 0 : workbook.getSheetBySheetId(subUnitId);
|
|
1273
|
+
if (!workbook || !worksheet)
|
|
1258
1274
|
return;
|
|
1259
|
-
const
|
|
1260
|
-
workbook
|
|
1261
|
-
worksheet
|
|
1262
|
-
unitId
|
|
1263
|
-
subUnitId
|
|
1275
|
+
const context = {
|
|
1276
|
+
workbook,
|
|
1277
|
+
worksheet,
|
|
1278
|
+
unitId,
|
|
1279
|
+
subUnitId,
|
|
1264
1280
|
accessor: this._injector,
|
|
1265
|
-
rule
|
|
1266
|
-
limit:
|
|
1267
|
-
getCellValue: (
|
|
1281
|
+
rule,
|
|
1282
|
+
limit: CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,
|
|
1283
|
+
getCellValue: /* @__PURE__ */ __name((row, col) => worksheet.getCellRaw(row, col) || {}, "getCellValue")
|
|
1268
1284
|
};
|
|
1269
|
-
switch (
|
|
1270
|
-
case
|
|
1271
|
-
return new
|
|
1272
|
-
case
|
|
1273
|
-
return new
|
|
1274
|
-
case
|
|
1275
|
-
return new
|
|
1276
|
-
case
|
|
1277
|
-
return new
|
|
1285
|
+
switch (rule.rule.type) {
|
|
1286
|
+
case CFRuleType.colorScale:
|
|
1287
|
+
return new ColorScaleCalculateUnit(context);
|
|
1288
|
+
case CFRuleType.dataBar:
|
|
1289
|
+
return new DataBarCalculateUnit(context);
|
|
1290
|
+
case CFRuleType.highlightCell:
|
|
1291
|
+
return new HighlightCellCalculateUnit(context);
|
|
1292
|
+
case CFRuleType.iconSet:
|
|
1293
|
+
return new IconSetCalculateUnit(context);
|
|
1278
1294
|
}
|
|
1279
1295
|
}
|
|
1280
|
-
_createCacheKey(
|
|
1281
|
-
return `${
|
|
1296
|
+
_createCacheKey(unitId, subUnitId, row, col) {
|
|
1297
|
+
return `${unitId}_${subUnitId}_${row}_${col}`;
|
|
1282
1298
|
}
|
|
1283
|
-
setCacheLength(
|
|
1284
|
-
this._cellCache.limit !==
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1299
|
+
setCacheLength(length = CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH) {
|
|
1300
|
+
this._cellCache.limit !== length && (this._cellCache.limit = length, this._calculateUnitManagers.forEach((subunitMap) => {
|
|
1301
|
+
subunitMap.forEach((unitMap) => {
|
|
1302
|
+
unitMap.forEach((unit) => {
|
|
1303
|
+
unit.setCacheLength(length);
|
|
1288
1304
|
});
|
|
1289
1305
|
});
|
|
1290
1306
|
}));
|
|
1291
1307
|
}
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
],
|
|
1299
|
-
const $0 = { 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" }, P0 = { starEmpty: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A", starIncomplete: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20clip-path%3D%22url(%23clip0_613_177)%22%3E%0A%3Cmask%20id%3D%22mask0_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2210%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20x%3D%2210.3704%22%20y%3D%220.37037%22%20width%3D%229.25926%22%20height%3D%2219.2593%22%20fill%3D%22%23C4C4C4%22%20stroke%3D%22%23F7D564%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask0_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3Cmask%20id%3D%22mask1_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20width%3D%2210%22%20height%3D%2220%22%20fill%3D%22%23C4C4C4%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask1_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_177%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", starFull: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, W0 = { 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" }, Z0 = { 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" }, q0 = { 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" }, G0 = 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"}'), j0 = { 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" }, H0 = { 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" }, X0 = { "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" }, Y0 = { "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" }, g = {
|
|
1300
|
-
feedback
|
|
1301
|
-
star
|
|
1302
|
-
progress
|
|
1303
|
-
signal
|
|
1304
|
-
feeling
|
|
1305
|
-
arrow
|
|
1306
|
-
shape
|
|
1307
|
-
feedback2
|
|
1308
|
-
flag
|
|
1309
|
-
cell
|
|
1310
|
-
},
|
|
1308
|
+
}, __name(_a2, "ConditionalFormattingViewModel"), _a2);
|
|
1309
|
+
ConditionalFormattingViewModel = __decorateClass$2([
|
|
1310
|
+
__decorateParam$2(0, Inject(Injector)),
|
|
1311
|
+
__decorateParam$2(1, Inject(ConditionalFormattingRuleModel)),
|
|
1312
|
+
__decorateParam$2(2, Inject(ConditionalFormattingFormulaService)),
|
|
1313
|
+
__decorateParam$2(3, IUniverInstanceService)
|
|
1314
|
+
], ConditionalFormattingViewModel);
|
|
1315
|
+
const 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%3Cg%20clip-path%3D%22url(%23clip0_613_177)%22%3E%0A%3Cmask%20id%3D%22mask0_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2210%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20x%3D%2210.3704%22%20y%3D%220.37037%22%20width%3D%229.25926%22%20height%3D%2219.2593%22%20fill%3D%22%23C4C4C4%22%20stroke%3D%22%23F7D564%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask0_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23fff%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3Cmask%20id%3D%22mask1_613_177%22%20style%3D%22mask-type%3Aalpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2220%22%3E%0A%3Crect%20width%3D%2210%22%20height%3D%2220%22%20fill%3D%22%23C4C4C4%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23mask1_613_177)%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.845%207.0699%2012.2165%207.33978%2012.642%207.36863L16.2361%207.61233C16.5692%207.63492%2016.7047%208.05202%2016.4485%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.2149%2011.2859%2013.3189%2011.6996L14.1978%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6417%2015.5971L10.5908%2013.6817C10.2295%2013.4549%209.77039%2013.4549%209.40918%2013.6817L6.35822%2015.5971C6.07547%2015.7746%205.72066%2015.5168%205.80211%2015.1931L6.68098%2011.6996C6.78504%2011.2859%206.64316%2010.8493%206.31586%2010.5758L3.55139%208.26607C3.29519%208.05202%203.43072%207.63492%203.7638%207.61233L7.35793%207.36863C7.78346%207.33978%208.15491%207.0699%208.31385%206.67412L9.65627%203.3312C9.78068%203.0214%2010.2192%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3CclipPath%20id%3D%22clip0_613_177%22%3E%0A%3Crect%20width%3D%2220%22%20height%3D%2220%22%20fill%3D%22white%22%2F%3E%0A%3C%2FclipPath%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E%0A", starFull: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M10.3437%203.3312L11.6861%206.67412C11.8451%207.0699%2012.2165%207.33978%2012.6421%207.36863L16.2362%207.61233C16.5693%207.63492%2016.7048%208.05202%2016.4486%208.26608L13.6841%2010.5758C13.3568%2010.8493%2013.215%2011.2859%2013.319%2011.6996L14.1979%2015.1931C14.2793%2015.5168%2013.9245%2015.7746%2013.6418%2015.5971L10.5908%2013.6817C10.2296%2013.4549%209.77045%2013.4549%209.40924%2013.6817L6.35828%2015.5971C6.07553%2015.7746%205.72072%2015.5168%205.80217%2015.1931L6.68105%2011.6996C6.7851%2011.2859%206.64322%2010.8493%206.31592%2010.5758L3.55145%208.26607C3.29525%208.05202%203.43078%207.63492%203.76386%207.61233L7.358%207.36863C7.78352%207.33978%208.15498%207.0699%208.31391%206.67412L9.65633%203.3312C9.78074%203.0214%2010.2193%203.0214%2010.3437%203.3312Z%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%23FFBD37%22%20stroke-width%3D%220.740741%22%2F%3E%0A%3C%2Fsvg%3E%0A" }, 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 = 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"}'), 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" }, ICON_MAP = {
|
|
1316
|
+
feedback,
|
|
1317
|
+
star,
|
|
1318
|
+
progress,
|
|
1319
|
+
signal,
|
|
1320
|
+
feeling,
|
|
1321
|
+
arrow,
|
|
1322
|
+
shape,
|
|
1323
|
+
feedback2,
|
|
1324
|
+
flag,
|
|
1325
|
+
cell
|
|
1326
|
+
}, iconGroup = [
|
|
1311
1327
|
{
|
|
1312
1328
|
title: "sheet.cf.iconSet.direction",
|
|
1313
1329
|
group: [
|
|
1314
|
-
{ name: "3Arrows", list: [
|
|
1315
|
-
{ name: "3ArrowsGray", list: [
|
|
1316
|
-
{ name: "4Arrows", list: [
|
|
1317
|
-
{ name: "4ArrowsGray", list: [
|
|
1318
|
-
{ name: "5Arrows", list: [
|
|
1319
|
-
{ name: "5ArrowsGray", list: [
|
|
1320
|
-
{ name: "3Triangles", list: [
|
|
1330
|
+
{ name: "3Arrows", list: [ICON_MAP.arrow["up-green"], ICON_MAP.arrow["right-gold"], ICON_MAP.arrow["down-red"]] },
|
|
1331
|
+
{ name: "3ArrowsGray", list: [ICON_MAP.arrow["up-gray"], ICON_MAP.arrow["right-gray"], ICON_MAP.arrow["down-gray"]] },
|
|
1332
|
+
{ name: "4Arrows", list: [ICON_MAP.arrow["up-green"], ICON_MAP.arrow["rightAndUp-gold"], ICON_MAP.arrow["rightAndDown-gold"], ICON_MAP.arrow["down-red"]] },
|
|
1333
|
+
{ name: "4ArrowsGray", list: [ICON_MAP.arrow["up-gray"], ICON_MAP.arrow["rightAndUp-gray"], ICON_MAP.arrow["rightAndDown-gray"], ICON_MAP.arrow["down-gray"]] },
|
|
1334
|
+
{ name: "5Arrows", list: [ICON_MAP.arrow["up-green"], ICON_MAP.arrow["rightAndUp-gold"], ICON_MAP.arrow["right-gold"], ICON_MAP.arrow["rightAndDown-gold"], ICON_MAP.arrow["down-red"]] },
|
|
1335
|
+
{ name: "5ArrowsGray", list: [ICON_MAP.arrow["up-gray"], ICON_MAP.arrow["rightAndUp-gray"], ICON_MAP.arrow["right-gray"], ICON_MAP.arrow["rightAndDown-gray"], ICON_MAP.arrow["down-gray"]] },
|
|
1336
|
+
{ name: "3Triangles", list: [ICON_MAP.shape.up, ICON_MAP.shape.cross, ICON_MAP.shape.down] }
|
|
1321
1337
|
]
|
|
1322
1338
|
},
|
|
1323
1339
|
{
|
|
@@ -1325,20 +1341,20 @@ const $0 = { mistake: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%2
|
|
|
1325
1341
|
group: [
|
|
1326
1342
|
{
|
|
1327
1343
|
name: "3TrafficLights1",
|
|
1328
|
-
list: [
|
|
1344
|
+
list: [ICON_MAP.shape["roundness-greed"], ICON_MAP.shape["roundness-gold"], ICON_MAP.shape["roundness-red"]]
|
|
1329
1345
|
},
|
|
1330
1346
|
{
|
|
1331
1347
|
name: "3Signs",
|
|
1332
|
-
list: [
|
|
1348
|
+
list: [ICON_MAP.shape["roundness-greed"], ICON_MAP.shape["triangle-gold"], ICON_MAP.shape["rhomboid-red"]]
|
|
1333
1349
|
},
|
|
1334
|
-
{ name: "3TrafficLights2", list: [
|
|
1350
|
+
{ name: "3TrafficLights2", list: [ICON_MAP.shape["indicate-greed"], ICON_MAP.shape["indicate-gold"], ICON_MAP.shape["indicate-red"]] },
|
|
1335
1351
|
{
|
|
1336
1352
|
name: "4RedToBlack",
|
|
1337
|
-
list: [
|
|
1353
|
+
list: [ICON_MAP.shape["roundness-red"], ICON_MAP.shape["roundness-pink"], ICON_MAP.shape["roundness-gray"], ICON_MAP.shape["roundness-black"]]
|
|
1338
1354
|
},
|
|
1339
1355
|
{
|
|
1340
1356
|
name: "4TrafficLights",
|
|
1341
|
-
list: [
|
|
1357
|
+
list: [ICON_MAP.shape["roundness-greed"], ICON_MAP.shape["roundness-gold"], ICON_MAP.shape["roundness-red"], ICON_MAP.shape["roundness-black"]]
|
|
1342
1358
|
}
|
|
1343
1359
|
]
|
|
1344
1360
|
},
|
|
@@ -1347,15 +1363,15 @@ const $0 = { mistake: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%2
|
|
|
1347
1363
|
group: [
|
|
1348
1364
|
{
|
|
1349
1365
|
name: "3Symbols",
|
|
1350
|
-
list: [
|
|
1366
|
+
list: [ICON_MAP.feedback.correct, ICON_MAP.feedback.warn, ICON_MAP.feedback.mistake]
|
|
1351
1367
|
},
|
|
1352
1368
|
{
|
|
1353
1369
|
name: "3Symbols2",
|
|
1354
|
-
list: [
|
|
1370
|
+
list: [ICON_MAP.feedback2.correct2, ICON_MAP.feedback2.warn2, ICON_MAP.feedback2.mistake2]
|
|
1355
1371
|
},
|
|
1356
1372
|
{
|
|
1357
1373
|
name: "3Flags",
|
|
1358
|
-
list: [
|
|
1374
|
+
list: [ICON_MAP.flag["flag-green"], ICON_MAP.flag["flag-gold"], ICON_MAP.flag["flag-red"]]
|
|
1359
1375
|
}
|
|
1360
1376
|
]
|
|
1361
1377
|
},
|
|
@@ -1364,225 +1380,225 @@ const $0 = { mistake: "data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%2
|
|
|
1364
1380
|
group: [
|
|
1365
1381
|
{
|
|
1366
1382
|
name: "4Rating",
|
|
1367
|
-
list: [
|
|
1383
|
+
list: [ICON_MAP.signal.signal25, ICON_MAP.signal.signal50, ICON_MAP.signal.signal75, ICON_MAP.signal.signal100]
|
|
1368
1384
|
},
|
|
1369
1385
|
{
|
|
1370
1386
|
name: "5Rating",
|
|
1371
|
-
list: [
|
|
1387
|
+
list: [ICON_MAP.signal.signal0, ICON_MAP.signal.signal25, ICON_MAP.signal.signal50, ICON_MAP.signal.signal75, ICON_MAP.signal.signal100]
|
|
1372
1388
|
},
|
|
1373
1389
|
{
|
|
1374
1390
|
name: "5Quarters",
|
|
1375
|
-
list: [
|
|
1391
|
+
list: [ICON_MAP.progress.progress100, ICON_MAP.progress.progress75, ICON_MAP.progress.progress50, ICON_MAP.progress.progress25, ICON_MAP.progress.progress0]
|
|
1376
1392
|
},
|
|
1377
1393
|
{
|
|
1378
1394
|
name: "_5Felling",
|
|
1379
|
-
list: [
|
|
1395
|
+
list: [ICON_MAP.feeling.guffaw, ICON_MAP.feeling.smile, ICON_MAP.feeling.noninductive, ICON_MAP.feeling.dissatisfied, ICON_MAP.feeling.impatient]
|
|
1380
1396
|
},
|
|
1381
1397
|
{
|
|
1382
1398
|
name: "5Boxes",
|
|
1383
|
-
list: [
|
|
1399
|
+
list: [ICON_MAP.cell["cell-100"], ICON_MAP.cell["cell-75"], ICON_MAP.cell["cell-50"], ICON_MAP.cell["cell-25"], ICON_MAP.cell["cell-0"]]
|
|
1384
1400
|
},
|
|
1385
1401
|
{
|
|
1386
1402
|
name: "3Stars",
|
|
1387
|
-
list: [
|
|
1403
|
+
list: [ICON_MAP.star.starFull, ICON_MAP.star.starIncomplete, ICON_MAP.star.starEmpty]
|
|
1388
1404
|
}
|
|
1389
1405
|
]
|
|
1390
1406
|
}
|
|
1391
|
-
],
|
|
1392
|
-
const { group
|
|
1393
|
-
for (const
|
|
1394
|
-
|
|
1395
|
-
return
|
|
1407
|
+
], iconMap = iconGroup.reduce((result, cur) => {
|
|
1408
|
+
const { group } = cur;
|
|
1409
|
+
for (const v of group)
|
|
1410
|
+
result[v.name] = v.list;
|
|
1411
|
+
return result;
|
|
1396
1412
|
}, {});
|
|
1397
|
-
for (const
|
|
1398
|
-
const
|
|
1399
|
-
Object.freeze(
|
|
1413
|
+
for (const key in iconMap) {
|
|
1414
|
+
const v = iconMap[key];
|
|
1415
|
+
Object.freeze(v);
|
|
1400
1416
|
}
|
|
1401
|
-
const
|
|
1402
|
-
type:
|
|
1417
|
+
const EMPTY_ICON_TYPE = "EMPTY_ICON_TYPE", MoveConditionalRuleMutation = {
|
|
1418
|
+
type: CommandType.MUTATION,
|
|
1403
1419
|
id: "sheet.mutation.move-conditional-rule",
|
|
1404
|
-
handler(
|
|
1405
|
-
if (!
|
|
1420
|
+
handler(accessor, params) {
|
|
1421
|
+
if (!params)
|
|
1406
1422
|
return !1;
|
|
1407
|
-
const { unitId
|
|
1408
|
-
return
|
|
1423
|
+
const { unitId, subUnitId, start, end } = params;
|
|
1424
|
+
return accessor.get(ConditionalFormattingRuleModel).moveRulePriority(unitId, subUnitId, start, end), !0;
|
|
1409
1425
|
}
|
|
1410
|
-
},
|
|
1411
|
-
const { unitId
|
|
1412
|
-
if (!
|
|
1426
|
+
}, MoveConditionalRuleMutationUndoFactory = /* @__PURE__ */ __name((param) => {
|
|
1427
|
+
const { unitId, subUnitId } = param, undo = anchorUndoFactory(param.start, param.end);
|
|
1428
|
+
if (!undo)
|
|
1413
1429
|
return [];
|
|
1414
|
-
const [
|
|
1430
|
+
const [start, end] = undo;
|
|
1415
1431
|
return [
|
|
1416
1432
|
{
|
|
1417
|
-
id:
|
|
1418
|
-
params: { unitId
|
|
1433
|
+
id: MoveConditionalRuleMutation.id,
|
|
1434
|
+
params: { unitId, subUnitId, start, end }
|
|
1419
1435
|
}
|
|
1420
1436
|
];
|
|
1421
|
-
},
|
|
1422
|
-
const
|
|
1423
|
-
if (
|
|
1424
|
-
const
|
|
1425
|
-
id:
|
|
1426
|
-
params: { unitId
|
|
1437
|
+
}, "MoveConditionalRuleMutationUndoFactory"), DeleteConditionalRuleMutationUndoFactory = /* @__PURE__ */ __name((accessor, param) => {
|
|
1438
|
+
const conditionalFormattingRuleModel = accessor.get(ConditionalFormattingRuleModel), { unitId, subUnitId, cfId } = param, ruleList = [...conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId) || []], index = ruleList.findIndex((item) => item.cfId === cfId), beforeRule = ruleList[index - 1];
|
|
1439
|
+
if (index > -1) {
|
|
1440
|
+
const rule = ruleList[index], result = [{
|
|
1441
|
+
id: AddConditionalRuleMutation.id,
|
|
1442
|
+
params: { unitId, subUnitId, rule: Tools.deepClone(rule) }
|
|
1427
1443
|
}];
|
|
1428
|
-
if (
|
|
1429
|
-
const
|
|
1430
|
-
if (
|
|
1431
|
-
const
|
|
1432
|
-
if (!
|
|
1433
|
-
return
|
|
1434
|
-
const [
|
|
1435
|
-
unitId
|
|
1436
|
-
subUnitId
|
|
1437
|
-
start
|
|
1438
|
-
end
|
|
1444
|
+
if (ruleList.splice(index, 1), index !== 0) {
|
|
1445
|
+
const firstRule = ruleList[0];
|
|
1446
|
+
if (firstRule) {
|
|
1447
|
+
const transformResult = transformSupportSymmetryAnchor({ id: firstRule.cfId, type: "before" }, { id: beforeRule.cfId, type: "after" }, ruleList, (rule2) => rule2.cfId);
|
|
1448
|
+
if (!transformResult)
|
|
1449
|
+
return result;
|
|
1450
|
+
const [start, end] = transformResult, params = {
|
|
1451
|
+
unitId,
|
|
1452
|
+
subUnitId,
|
|
1453
|
+
start,
|
|
1454
|
+
end
|
|
1439
1455
|
};
|
|
1440
|
-
|
|
1456
|
+
result.push({ id: MoveConditionalRuleMutation.id, params });
|
|
1441
1457
|
}
|
|
1442
1458
|
}
|
|
1443
|
-
return
|
|
1459
|
+
return result;
|
|
1444
1460
|
}
|
|
1445
1461
|
return [];
|
|
1446
|
-
},
|
|
1447
|
-
type:
|
|
1462
|
+
}, "DeleteConditionalRuleMutationUndoFactory"), DeleteConditionalRuleMutation = {
|
|
1463
|
+
type: CommandType.MUTATION,
|
|
1448
1464
|
id: "sheet.mutation.delete-conditional-rule",
|
|
1449
|
-
handler(
|
|
1450
|
-
if (!
|
|
1465
|
+
handler(accessor, params) {
|
|
1466
|
+
if (!params)
|
|
1451
1467
|
return !1;
|
|
1452
|
-
const { unitId
|
|
1453
|
-
return
|
|
1468
|
+
const { unitId, subUnitId, cfId } = params;
|
|
1469
|
+
return accessor.get(ConditionalFormattingRuleModel).deleteRule(unitId, subUnitId, cfId), !0;
|
|
1454
1470
|
}
|
|
1455
|
-
},
|
|
1456
|
-
type:
|
|
1471
|
+
}, AddConditionalRuleMutationUndoFactory = /* @__PURE__ */ __name((accessor, param) => ({ id: DeleteConditionalRuleMutation.id, params: { unitId: param.unitId, subUnitId: param.subUnitId, cfId: param.rule.cfId } }), "AddConditionalRuleMutationUndoFactory"), AddConditionalRuleMutation = {
|
|
1472
|
+
type: CommandType.MUTATION,
|
|
1457
1473
|
id: "sheet.mutation.add-conditional-rule",
|
|
1458
|
-
handler(
|
|
1459
|
-
if (!
|
|
1474
|
+
handler(accessor, params) {
|
|
1475
|
+
if (!params)
|
|
1460
1476
|
return !1;
|
|
1461
|
-
const { unitId
|
|
1462
|
-
return
|
|
1477
|
+
const { unitId, subUnitId, rule } = params;
|
|
1478
|
+
return accessor.get(ConditionalFormattingRuleModel).addRule(unitId, subUnitId, rule), !0;
|
|
1463
1479
|
}
|
|
1464
|
-
},
|
|
1465
|
-
type:
|
|
1480
|
+
}, SetConditionalRuleMutation = {
|
|
1481
|
+
type: CommandType.MUTATION,
|
|
1466
1482
|
id: "sheet.mutation.set-conditional-rule",
|
|
1467
|
-
handler(
|
|
1468
|
-
if (!
|
|
1483
|
+
handler(accessor, params) {
|
|
1484
|
+
if (!params)
|
|
1469
1485
|
return !1;
|
|
1470
|
-
const { unitId
|
|
1471
|
-
return
|
|
1486
|
+
const { unitId, subUnitId, rule } = params, cfId = params.cfId || params.rule.cfId;
|
|
1487
|
+
return accessor.get(ConditionalFormattingRuleModel).setRule(unitId, subUnitId, rule, cfId), !0;
|
|
1472
1488
|
}
|
|
1473
|
-
},
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1489
|
+
}, setConditionalRuleMutationUndoFactory = /* @__PURE__ */ __name((accessor, param) => {
|
|
1490
|
+
const conditionalFormattingRuleModel = accessor.get(ConditionalFormattingRuleModel), { unitId, subUnitId } = param, cfId = param.cfId || param.rule.cfId, rule = conditionalFormattingRuleModel.getRule(unitId, subUnitId, cfId);
|
|
1491
|
+
return rule ? [
|
|
1476
1492
|
{
|
|
1477
|
-
id:
|
|
1493
|
+
id: SetConditionalRuleMutation.id,
|
|
1478
1494
|
params: {
|
|
1479
|
-
unitId
|
|
1480
|
-
subUnitId
|
|
1481
|
-
cfId
|
|
1482
|
-
rule:
|
|
1495
|
+
unitId,
|
|
1496
|
+
subUnitId,
|
|
1497
|
+
cfId,
|
|
1498
|
+
rule: Tools.deepClone(rule)
|
|
1483
1499
|
}
|
|
1484
1500
|
}
|
|
1485
1501
|
] : [];
|
|
1486
|
-
},
|
|
1487
|
-
var
|
|
1488
|
-
for (var
|
|
1489
|
-
(
|
|
1490
|
-
return
|
|
1491
|
-
},
|
|
1492
|
-
let
|
|
1493
|
-
constructor(
|
|
1494
|
-
super(), this._conditionalFormattingRuleModel =
|
|
1502
|
+
}, "setConditionalRuleMutationUndoFactory"), SHEETS_CONDITIONAL_FORMATTING_PLUGIN_CONFIG_KEY = "ssheets-conditional-formatting.config", defaultPluginConfig = {};
|
|
1503
|
+
var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
1504
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1505
|
+
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
1506
|
+
return kind && result && __defProp$1(target, key, result), result;
|
|
1507
|
+
}, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$1"), _a3;
|
|
1508
|
+
let ConditionalFormattingService = (_a3 = class extends Disposable {
|
|
1509
|
+
constructor(_conditionalFormattingRuleModel, _injector, _univerInstanceService, _resourceManagerService, _sheetInterceptorService, _commandService) {
|
|
1510
|
+
super(), this._conditionalFormattingRuleModel = _conditionalFormattingRuleModel, this._injector = _injector, this._univerInstanceService = _univerInstanceService, this._resourceManagerService = _resourceManagerService, this._sheetInterceptorService = _sheetInterceptorService, this._commandService = _commandService, this._initCellChange(), this._initSnapshot(), this._initSheetChange();
|
|
1495
1511
|
}
|
|
1496
1512
|
get _conditionalFormattingViewModelV2() {
|
|
1497
|
-
return this._injector.get(
|
|
1498
|
-
}
|
|
1499
|
-
composeStyle(
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
return
|
|
1504
|
-
var
|
|
1505
|
-
const
|
|
1506
|
-
if (
|
|
1507
|
-
|
|
1508
|
-
else if (
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
} else if (
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1514
|
-
} else if (
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1513
|
+
return this._injector.get(ConditionalFormattingViewModel);
|
|
1514
|
+
}
|
|
1515
|
+
composeStyle(unitId, subUnitId, row, col) {
|
|
1516
|
+
const cellCfs = this._conditionalFormattingViewModelV2.getCellCfs(unitId, subUnitId, row, col);
|
|
1517
|
+
if (cellCfs && (cellCfs != null && cellCfs.length)) {
|
|
1518
|
+
const ruleList = cellCfs.map((item) => this._conditionalFormattingRuleModel.getRule(unitId, subUnitId, item.cfId)).filter((rule) => !!rule).reverse(), endIndex = ruleList.findIndex((rule) => rule == null ? void 0 : rule.stopIfTrue);
|
|
1519
|
+
return endIndex > -1 && ruleList.splice(endIndex + 1), ruleList.reduce((pre, rule) => {
|
|
1520
|
+
var _a5;
|
|
1521
|
+
const type = rule.rule.type, ruleCacheItem = cellCfs.find((cache) => cache.cfId === rule.cfId);
|
|
1522
|
+
if (type === CFRuleType.highlightCell)
|
|
1523
|
+
ruleCacheItem.result && Tools.deepMerge(pre, { style: ruleCacheItem.result });
|
|
1524
|
+
else if (type === CFRuleType.colorScale) {
|
|
1525
|
+
const ruleCache = ruleCacheItem == null ? void 0 : ruleCacheItem.result;
|
|
1526
|
+
ruleCache && typeof ruleCache == "string" && (pre.style = { ...(_a5 = pre.style) != null ? _a5 : {}, bg: { rgb: ruleCache } });
|
|
1527
|
+
} else if (type === CFRuleType.dataBar) {
|
|
1528
|
+
const ruleCache = ruleCacheItem == null ? void 0 : ruleCacheItem.result;
|
|
1529
|
+
ruleCache && (pre.dataBar = ruleCache, pre.isShowValue = ruleCache.isShowValue);
|
|
1530
|
+
} else if (type === CFRuleType.iconSet) {
|
|
1531
|
+
const ruleCache = ruleCacheItem == null ? void 0 : ruleCacheItem.result;
|
|
1532
|
+
ruleCache && (pre.iconSet = ruleCache, pre.isShowValue = ruleCache.isShowValue);
|
|
1517
1533
|
}
|
|
1518
|
-
return
|
|
1534
|
+
return pre;
|
|
1519
1535
|
}, {});
|
|
1520
1536
|
}
|
|
1521
1537
|
return null;
|
|
1522
1538
|
}
|
|
1523
1539
|
_initSnapshot() {
|
|
1524
|
-
const
|
|
1525
|
-
const
|
|
1526
|
-
return
|
|
1527
|
-
|
|
1528
|
-
}), JSON.stringify(
|
|
1529
|
-
},
|
|
1530
|
-
if (!
|
|
1540
|
+
const toJson = /* @__PURE__ */ __name((unitID) => {
|
|
1541
|
+
const map2 = this._conditionalFormattingRuleModel.getUnitRules(unitID), resultMap = {};
|
|
1542
|
+
return map2 ? (map2.forEach((v, key) => {
|
|
1543
|
+
resultMap[key] = v;
|
|
1544
|
+
}), JSON.stringify(resultMap)) : "";
|
|
1545
|
+
}, "toJson"), parseJson = /* @__PURE__ */ __name((json) => {
|
|
1546
|
+
if (!json)
|
|
1531
1547
|
return {};
|
|
1532
1548
|
try {
|
|
1533
|
-
return JSON.parse(
|
|
1549
|
+
return JSON.parse(json);
|
|
1534
1550
|
} catch {
|
|
1535
1551
|
return {};
|
|
1536
1552
|
}
|
|
1537
|
-
};
|
|
1553
|
+
}, "parseJson");
|
|
1538
1554
|
this.disposeWithMe(
|
|
1539
1555
|
this._resourceManagerService.registerPluginResource({
|
|
1540
|
-
pluginName:
|
|
1541
|
-
businesses: [
|
|
1542
|
-
toJson: (
|
|
1543
|
-
parseJson: (
|
|
1544
|
-
onUnLoad: (
|
|
1545
|
-
this._conditionalFormattingRuleModel.deleteUnitId(
|
|
1546
|
-
},
|
|
1547
|
-
onLoad: (
|
|
1548
|
-
Object.keys(
|
|
1549
|
-
[...
|
|
1550
|
-
this._conditionalFormattingRuleModel.addRule(
|
|
1556
|
+
pluginName: SHEET_CONDITIONAL_FORMATTING_PLUGIN,
|
|
1557
|
+
businesses: [UniverInstanceType.UNIVER_SHEET],
|
|
1558
|
+
toJson: /* @__PURE__ */ __name((unitID) => toJson(unitID), "toJson"),
|
|
1559
|
+
parseJson: /* @__PURE__ */ __name((json) => parseJson(json), "parseJson"),
|
|
1560
|
+
onUnLoad: /* @__PURE__ */ __name((unitID) => {
|
|
1561
|
+
this._conditionalFormattingRuleModel.deleteUnitId(unitID);
|
|
1562
|
+
}, "onUnLoad"),
|
|
1563
|
+
onLoad: /* @__PURE__ */ __name((unitID, value) => {
|
|
1564
|
+
Object.keys(value).forEach((subunitId) => {
|
|
1565
|
+
[...value[subunitId]].reverse().forEach((rule) => {
|
|
1566
|
+
this._conditionalFormattingRuleModel.addRule(unitID, subunitId, rule);
|
|
1551
1567
|
});
|
|
1552
1568
|
});
|
|
1553
|
-
}
|
|
1569
|
+
}, "onLoad")
|
|
1554
1570
|
})
|
|
1555
1571
|
);
|
|
1556
1572
|
}
|
|
1557
1573
|
_initSheetChange() {
|
|
1558
1574
|
this.disposeWithMe(
|
|
1559
1575
|
this._sheetInterceptorService.interceptCommand({
|
|
1560
|
-
getMutations: (
|
|
1561
|
-
if (
|
|
1562
|
-
const
|
|
1563
|
-
if (!
|
|
1576
|
+
getMutations: /* @__PURE__ */ __name((commandInfo) => {
|
|
1577
|
+
if (commandInfo.id === RemoveSheetCommand.id) {
|
|
1578
|
+
const params = commandInfo.params, unitId = params.unitId || getUnitId(this._univerInstanceService), subUnitId = params.subUnitId || getSubUnitId(this._univerInstanceService);
|
|
1579
|
+
if (!subUnitId)
|
|
1564
1580
|
return { redos: [], undos: [] };
|
|
1565
|
-
const
|
|
1566
|
-
if (!
|
|
1581
|
+
const ruleList = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId);
|
|
1582
|
+
if (!ruleList)
|
|
1567
1583
|
return { redos: [], undos: [] };
|
|
1568
|
-
const
|
|
1569
|
-
return
|
|
1570
|
-
const
|
|
1571
|
-
unitId
|
|
1572
|
-
subUnitId
|
|
1573
|
-
cfId:
|
|
1584
|
+
const redos = [], undos = [];
|
|
1585
|
+
return ruleList.forEach((item) => {
|
|
1586
|
+
const params2 = {
|
|
1587
|
+
unitId,
|
|
1588
|
+
subUnitId,
|
|
1589
|
+
cfId: item.cfId
|
|
1574
1590
|
};
|
|
1575
|
-
|
|
1576
|
-
id:
|
|
1577
|
-
params:
|
|
1578
|
-
}),
|
|
1591
|
+
redos.push({
|
|
1592
|
+
id: DeleteConditionalRuleMutation.id,
|
|
1593
|
+
params: params2
|
|
1594
|
+
}), undos.push(...DeleteConditionalRuleMutationUndoFactory(this._injector, params2));
|
|
1579
1595
|
}), {
|
|
1580
|
-
redos
|
|
1581
|
-
undos
|
|
1596
|
+
redos,
|
|
1597
|
+
undos
|
|
1582
1598
|
};
|
|
1583
1599
|
}
|
|
1584
1600
|
return { redos: [], undos: [] };
|
|
1585
|
-
}
|
|
1601
|
+
}, "getMutations")
|
|
1586
1602
|
})
|
|
1587
1603
|
);
|
|
1588
1604
|
}
|
|
@@ -1590,80 +1606,80 @@ let K = class extends m2 {
|
|
|
1590
1606
|
_initCellChange() {
|
|
1591
1607
|
this.disposeWithMe(
|
|
1592
1608
|
// eslint-disable-next-line max-lines-per-function
|
|
1593
|
-
this._commandService.onCommandExecuted((
|
|
1594
|
-
const
|
|
1595
|
-
const
|
|
1596
|
-
return
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
}), [...
|
|
1600
|
-
};
|
|
1601
|
-
switch (
|
|
1602
|
-
case
|
|
1603
|
-
const
|
|
1604
|
-
new
|
|
1605
|
-
|
|
1606
|
-
}),
|
|
1607
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1609
|
+
this._commandService.onCommandExecuted((commandInfo) => {
|
|
1610
|
+
const collectRule = /* @__PURE__ */ __name((unitId, subUnitId, cellData) => {
|
|
1611
|
+
const ruleIds = /* @__PURE__ */ new Set();
|
|
1612
|
+
return cellData.forEach(([row, col]) => {
|
|
1613
|
+
const ruleItem = this._conditionalFormattingViewModelV2.getCellCfs(unitId, subUnitId, row, col);
|
|
1614
|
+
ruleItem == null || ruleItem.forEach((item) => ruleIds.add(item.cfId));
|
|
1615
|
+
}), [...ruleIds].map((cfId) => this._conditionalFormattingRuleModel.getRule(unitId, subUnitId, cfId)).filter((rule) => !!rule);
|
|
1616
|
+
}, "collectRule");
|
|
1617
|
+
switch (commandInfo.id) {
|
|
1618
|
+
case SetRangeValuesMutation.id: {
|
|
1619
|
+
const params = commandInfo.params, { subUnitId, unitId, cellValue } = params, cellMatrix = [];
|
|
1620
|
+
new ObjectMatrix(cellValue).forValue((row, col, value) => {
|
|
1621
|
+
value && Object.keys(value).some((key) => ["p", "v"].includes(key)) && cellMatrix.push([row, col]);
|
|
1622
|
+
}), collectRule(unitId, subUnitId, cellMatrix).forEach((rule) => {
|
|
1623
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1608
1624
|
});
|
|
1609
1625
|
break;
|
|
1610
1626
|
}
|
|
1611
|
-
case
|
|
1612
|
-
case
|
|
1613
|
-
const { range
|
|
1614
|
-
|
|
1615
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1627
|
+
case InsertColMutation.id:
|
|
1628
|
+
case RemoveColMutation.id: {
|
|
1629
|
+
const { range, unitId, subUnitId } = commandInfo.params, allRules = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId), effectRange = { ...range, endColumn: Number.MAX_SAFE_INTEGER };
|
|
1630
|
+
allRules && allRules.filter((rule) => rule.ranges.some((ruleRange) => Rectangle.intersects(ruleRange, effectRange))).forEach((rule) => {
|
|
1631
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1616
1632
|
});
|
|
1617
1633
|
break;
|
|
1618
1634
|
}
|
|
1619
|
-
case
|
|
1620
|
-
case
|
|
1621
|
-
const { range
|
|
1622
|
-
|
|
1623
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1635
|
+
case RemoveRowMutation.id:
|
|
1636
|
+
case InsertRowMutation.id: {
|
|
1637
|
+
const { range, unitId, subUnitId } = commandInfo.params, allRules = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId), effectRange = { ...range, endRow: Number.MAX_SAFE_INTEGER };
|
|
1638
|
+
allRules && allRules.filter((rule) => rule.ranges.some((ruleRange) => Rectangle.intersects(ruleRange, effectRange))).forEach((rule) => {
|
|
1639
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1624
1640
|
});
|
|
1625
1641
|
break;
|
|
1626
1642
|
}
|
|
1627
|
-
case
|
|
1628
|
-
const { sourceRange
|
|
1629
|
-
startRow: Math.min(
|
|
1643
|
+
case MoveRowsMutation.id: {
|
|
1644
|
+
const { sourceRange, targetRange, unitId, subUnitId } = commandInfo.params, allRules = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId), effectRange = {
|
|
1645
|
+
startRow: Math.min(sourceRange.startRow, targetRange.startRow),
|
|
1630
1646
|
endRow: Number.MAX_SAFE_INTEGER,
|
|
1631
1647
|
startColumn: 0,
|
|
1632
1648
|
endColumn: Number.MAX_SAFE_INTEGER
|
|
1633
1649
|
};
|
|
1634
|
-
|
|
1635
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1650
|
+
allRules && allRules.filter((rule) => rule.ranges.some((ruleRange) => Rectangle.intersects(ruleRange, effectRange))).forEach((rule) => {
|
|
1651
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1636
1652
|
});
|
|
1637
1653
|
break;
|
|
1638
1654
|
}
|
|
1639
|
-
case
|
|
1640
|
-
const { sourceRange
|
|
1655
|
+
case MoveColsMutation.id: {
|
|
1656
|
+
const { sourceRange, targetRange, unitId, subUnitId } = commandInfo.params, allRules = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId), effectRange = {
|
|
1641
1657
|
startRow: 0,
|
|
1642
1658
|
endRow: Number.MAX_SAFE_INTEGER,
|
|
1643
|
-
startColumn: Math.min(
|
|
1659
|
+
startColumn: Math.min(sourceRange.startColumn, targetRange.startColumn),
|
|
1644
1660
|
endColumn: Number.MAX_SAFE_INTEGER
|
|
1645
1661
|
};
|
|
1646
|
-
|
|
1647
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1662
|
+
allRules && allRules.filter((rule) => rule.ranges.some((ruleRange) => Rectangle.intersects(ruleRange, effectRange))).forEach((rule) => {
|
|
1663
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1648
1664
|
});
|
|
1649
1665
|
break;
|
|
1650
1666
|
}
|
|
1651
|
-
case
|
|
1652
|
-
const { unitId
|
|
1653
|
-
const
|
|
1654
|
-
new
|
|
1655
|
-
|
|
1656
|
-
}),
|
|
1657
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1667
|
+
case MoveRangeMutation.id: {
|
|
1668
|
+
const { unitId, to, from } = commandInfo.params, handleSubUnit = /* @__PURE__ */ __name((value) => {
|
|
1669
|
+
const cellMatrix = [];
|
|
1670
|
+
new ObjectMatrix(value.value).forValue((row, col) => {
|
|
1671
|
+
cellMatrix.push([row, col]);
|
|
1672
|
+
}), collectRule(unitId, value.subUnitId, cellMatrix).forEach((rule) => {
|
|
1673
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, value.subUnitId, rule.cfId);
|
|
1658
1674
|
});
|
|
1659
|
-
};
|
|
1660
|
-
|
|
1675
|
+
}, "handleSubUnit");
|
|
1676
|
+
handleSubUnit(to), handleSubUnit(from);
|
|
1661
1677
|
break;
|
|
1662
1678
|
}
|
|
1663
|
-
case
|
|
1664
|
-
const { range
|
|
1665
|
-
|
|
1666
|
-
this._conditionalFormattingViewModelV2.markRuleDirty(
|
|
1679
|
+
case ReorderRangeMutation.id: {
|
|
1680
|
+
const { range, unitId, subUnitId } = commandInfo.params, allRules = this._conditionalFormattingRuleModel.getSubunitRules(unitId, subUnitId);
|
|
1681
|
+
allRules && allRules.filter((rule) => rule.ranges.some((ruleRange) => Rectangle.intersects(ruleRange, range))).forEach((rule) => {
|
|
1682
|
+
this._conditionalFormattingViewModelV2.markRuleDirty(unitId, subUnitId, rule.cfId);
|
|
1667
1683
|
});
|
|
1668
1684
|
break;
|
|
1669
1685
|
}
|
|
@@ -1671,181 +1687,183 @@ let K = class extends m2 {
|
|
|
1671
1687
|
})
|
|
1672
1688
|
);
|
|
1673
1689
|
}
|
|
1674
|
-
};
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
],
|
|
1683
|
-
const
|
|
1684
|
-
var
|
|
1685
|
-
return (
|
|
1686
|
-
};
|
|
1687
|
-
var
|
|
1688
|
-
for (var
|
|
1689
|
-
(
|
|
1690
|
-
return
|
|
1691
|
-
},
|
|
1692
|
-
let
|
|
1693
|
-
constructor(
|
|
1694
|
-
super(), this._config =
|
|
1695
|
-
const { ...
|
|
1690
|
+
}, __name(_a3, "ConditionalFormattingService"), _a3);
|
|
1691
|
+
ConditionalFormattingService = __decorateClass$1([
|
|
1692
|
+
__decorateParam$1(0, Inject(ConditionalFormattingRuleModel)),
|
|
1693
|
+
__decorateParam$1(1, Inject(Injector)),
|
|
1694
|
+
__decorateParam$1(2, Inject(IUniverInstanceService)),
|
|
1695
|
+
__decorateParam$1(3, Inject(IResourceManagerService)),
|
|
1696
|
+
__decorateParam$1(4, Inject(SheetInterceptorService)),
|
|
1697
|
+
__decorateParam$1(5, Inject(ICommandService))
|
|
1698
|
+
], ConditionalFormattingService);
|
|
1699
|
+
const getUnitId = /* @__PURE__ */ __name((u) => u.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET).getUnitId(), "getUnitId"), getSubUnitId = /* @__PURE__ */ __name((u) => {
|
|
1700
|
+
var _a5;
|
|
1701
|
+
return (_a5 = u.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : _a5.getSheetId();
|
|
1702
|
+
}, "getSubUnitId");
|
|
1703
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __decorateClass = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
|
1704
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1705
|
+
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
|
1706
|
+
return kind && result && __defProp2(target, key, result), result;
|
|
1707
|
+
}, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam"), _a4;
|
|
1708
|
+
let UniverSheetsConditionalFormattingPlugin = (_a4 = class extends Plugin {
|
|
1709
|
+
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
|
1710
|
+
super(), this._config = _config, this._injector = _injector, this._commandService = _commandService, this._configService = _configService;
|
|
1711
|
+
const { ...rest } = merge(
|
|
1696
1712
|
{},
|
|
1697
|
-
|
|
1713
|
+
defaultPluginConfig,
|
|
1698
1714
|
this._config
|
|
1699
1715
|
);
|
|
1700
|
-
this._configService.setConfig(
|
|
1701
|
-
[
|
|
1702
|
-
[
|
|
1703
|
-
[
|
|
1704
|
-
[
|
|
1705
|
-
].forEach((
|
|
1706
|
-
this._injector.add(
|
|
1716
|
+
this._configService.setConfig(SHEETS_CONDITIONAL_FORMATTING_PLUGIN_CONFIG_KEY, rest), [
|
|
1717
|
+
[ConditionalFormattingService],
|
|
1718
|
+
[ConditionalFormattingFormulaService],
|
|
1719
|
+
[ConditionalFormattingRuleModel],
|
|
1720
|
+
[ConditionalFormattingViewModel]
|
|
1721
|
+
].forEach((dependency) => {
|
|
1722
|
+
this._injector.add(dependency);
|
|
1707
1723
|
}), [
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
].forEach((
|
|
1714
|
-
this._commandService.registerCommand(
|
|
1724
|
+
AddConditionalRuleMutation,
|
|
1725
|
+
DeleteConditionalRuleMutation,
|
|
1726
|
+
SetConditionalRuleMutation,
|
|
1727
|
+
MoveConditionalRuleMutation,
|
|
1728
|
+
ConditionalFormattingFormulaMarkDirty
|
|
1729
|
+
].forEach((m) => {
|
|
1730
|
+
this._commandService.registerCommand(m);
|
|
1715
1731
|
});
|
|
1716
1732
|
}
|
|
1717
1733
|
onStarting() {
|
|
1718
|
-
this._injector.get(
|
|
1719
|
-
}
|
|
1720
|
-
},
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
],
|
|
1726
|
-
const
|
|
1727
|
-
class d1 extends k2 {
|
|
1734
|
+
this._injector.get(ConditionalFormattingService), touchDependencies(this._injector, [[ConditionalFormattingService], [ConditionalFormattingViewModel]]);
|
|
1735
|
+
}
|
|
1736
|
+
}, __name(_a4, "UniverSheetsConditionalFormattingPlugin"), __publicField(_a4, "pluginName", SHEET_CONDITIONAL_FORMATTING_PLUGIN), __publicField(_a4, "type", UniverInstanceType.UNIVER_SHEET), _a4);
|
|
1737
|
+
UniverSheetsConditionalFormattingPlugin = __decorateClass([
|
|
1738
|
+
__decorateParam(1, Inject(Injector)),
|
|
1739
|
+
__decorateParam(2, Inject(ICommandService)),
|
|
1740
|
+
__decorateParam(3, IConfigService)
|
|
1741
|
+
], UniverSheetsConditionalFormattingPlugin);
|
|
1742
|
+
const IconUKey = "sheet-conditional-rule-icon", EXTENSION_Z_INDEX = 35, DEFAULT_WIDTH = 15, DEFAULT_PADDING = 2, _ConditionalFormattingIcon = class _ConditionalFormattingIcon extends SheetExtension {
|
|
1728
1743
|
constructor() {
|
|
1729
1744
|
super();
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1745
|
+
__publicField(this, "_paddingRightAndLeft", DEFAULT_PADDING);
|
|
1746
|
+
__publicField(this, "_width", DEFAULT_WIDTH);
|
|
1747
|
+
__publicField(this, "_imageMap", /* @__PURE__ */ new Map());
|
|
1748
|
+
__publicField(this, "uKey", IconUKey);
|
|
1749
|
+
__publicField(this, "Z_INDEX", EXTENSION_Z_INDEX);
|
|
1750
|
+
__publicField(this, "_radius", 1);
|
|
1736
1751
|
this._init();
|
|
1737
1752
|
}
|
|
1738
|
-
draw(
|
|
1739
|
-
const { worksheet
|
|
1740
|
-
if (!
|
|
1753
|
+
draw(ctx, _parentScale, spreadsheetSkeleton, diffRanges) {
|
|
1754
|
+
const { worksheet } = spreadsheetSkeleton;
|
|
1755
|
+
if (!worksheet)
|
|
1741
1756
|
return !1;
|
|
1742
|
-
|
|
1743
|
-
if (!
|
|
1757
|
+
ctx.save(), Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => {
|
|
1758
|
+
if (!worksheet.getRowVisible(row) || !worksheet.getColVisible(col))
|
|
1744
1759
|
return;
|
|
1745
|
-
const
|
|
1746
|
-
if (
|
|
1747
|
-
const { iconType
|
|
1748
|
-
if (
|
|
1760
|
+
const cellData = worksheet.getCell(row, col);
|
|
1761
|
+
if (cellData != null && cellData.iconSet) {
|
|
1762
|
+
const { iconType, iconId } = cellData.iconSet;
|
|
1763
|
+
if (iconType === EMPTY_ICON_TYPE)
|
|
1749
1764
|
return;
|
|
1750
|
-
const
|
|
1751
|
-
if (!
|
|
1765
|
+
const icon = this._imageMap.get(this._createKey(iconType, iconId));
|
|
1766
|
+
if (!icon)
|
|
1752
1767
|
return;
|
|
1753
|
-
const
|
|
1754
|
-
let { isMerged
|
|
1755
|
-
if (
|
|
1768
|
+
const cellInfo = spreadsheetSkeleton.getCellWithCoordByIndex(row, col, !1);
|
|
1769
|
+
let { isMerged, isMergedMainCell, mergeInfo, startY, endY, startX, endX } = cellInfo;
|
|
1770
|
+
if (isMerged || (isMergedMainCell && (startY = mergeInfo.startY, endY = mergeInfo.endY, startX = mergeInfo.startX, endX = mergeInfo.endX), !this.isRenderDiffRangesByCell(mergeInfo, diffRanges)))
|
|
1756
1771
|
return;
|
|
1757
|
-
const
|
|
1758
|
-
if (this._width >
|
|
1772
|
+
const borderWidth = endX - startX, borderHeight = endY - startY;
|
|
1773
|
+
if (this._width > borderHeight || this._width > borderWidth + this._paddingRightAndLeft * 2)
|
|
1759
1774
|
return;
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1775
|
+
const y = (borderHeight - this._width) / 2 + startY;
|
|
1776
|
+
ctx.drawImage(icon, startX + this._paddingRightAndLeft, y, this._width, this._width);
|
|
1762
1777
|
}
|
|
1763
|
-
}),
|
|
1778
|
+
}), ctx.restore();
|
|
1764
1779
|
}
|
|
1765
1780
|
_init() {
|
|
1766
|
-
for (const
|
|
1767
|
-
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1770
|
-
this._imageMap.set(
|
|
1771
|
-
},
|
|
1781
|
+
for (const type in iconMap)
|
|
1782
|
+
iconMap[type].forEach((base64, index) => {
|
|
1783
|
+
const key = this._createKey(type, String(index)), image = new Image();
|
|
1784
|
+
image.onload = () => {
|
|
1785
|
+
this._imageMap.set(key, image);
|
|
1786
|
+
}, image.src = base64;
|
|
1772
1787
|
});
|
|
1773
1788
|
}
|
|
1774
|
-
_createKey(
|
|
1775
|
-
return `${
|
|
1789
|
+
_createKey(iconType, iconIndex) {
|
|
1790
|
+
return `${iconType}_${iconIndex}`;
|
|
1776
1791
|
}
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1792
|
+
};
|
|
1793
|
+
__name(_ConditionalFormattingIcon, "ConditionalFormattingIcon");
|
|
1794
|
+
let ConditionalFormattingIcon = _ConditionalFormattingIcon;
|
|
1795
|
+
SpreadsheetExtensionRegistry.add(ConditionalFormattingIcon);
|
|
1796
|
+
function removeUndefinedAttr(obj) {
|
|
1797
|
+
if (typeof obj != "object" || obj === null)
|
|
1798
|
+
return obj;
|
|
1799
|
+
const result = {};
|
|
1800
|
+
for (const key in obj)
|
|
1801
|
+
if (obj.hasOwnProperty(key)) {
|
|
1802
|
+
const value = removeUndefinedAttr(obj[key]);
|
|
1803
|
+
value !== void 0 && (result[key] = value);
|
|
1787
1804
|
}
|
|
1788
|
-
return
|
|
1805
|
+
return result;
|
|
1789
1806
|
}
|
|
1807
|
+
__name(removeUndefinedAttr, "removeUndefinedAttr");
|
|
1790
1808
|
export {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1809
|
+
AddConditionalRuleMutation,
|
|
1810
|
+
AddConditionalRuleMutationUndoFactory,
|
|
1811
|
+
CFNumberOperator,
|
|
1812
|
+
CFRuleType,
|
|
1813
|
+
CFSubRuleType,
|
|
1814
|
+
CFTextOperator,
|
|
1815
|
+
CFTimePeriodOperator,
|
|
1816
|
+
CFValueType,
|
|
1817
|
+
CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH,
|
|
1818
|
+
ConditionalFormattingFormulaMarkDirty,
|
|
1819
|
+
ConditionalFormattingFormulaService,
|
|
1820
|
+
ConditionalFormattingIcon,
|
|
1821
|
+
ConditionalFormattingRuleModel,
|
|
1822
|
+
ConditionalFormattingService,
|
|
1823
|
+
ConditionalFormattingViewModel,
|
|
1824
|
+
DEFAULT_BG_COLOR,
|
|
1825
|
+
DEFAULT_FONT_COLOR,
|
|
1826
|
+
DEFAULT_PADDING,
|
|
1827
|
+
DEFAULT_WIDTH,
|
|
1828
|
+
DataBar,
|
|
1829
|
+
DeleteConditionalRuleMutation,
|
|
1830
|
+
DeleteConditionalRuleMutationUndoFactory,
|
|
1831
|
+
EMPTY_ICON_TYPE,
|
|
1832
|
+
FormulaResultStatus,
|
|
1833
|
+
IconUKey,
|
|
1834
|
+
MoveConditionalRuleMutation,
|
|
1835
|
+
MoveConditionalRuleMutationUndoFactory,
|
|
1836
|
+
SHEET_CONDITIONAL_FORMATTING_PLUGIN,
|
|
1837
|
+
SetConditionalRuleMutation,
|
|
1838
|
+
UniverSheetsConditionalFormattingPlugin,
|
|
1839
|
+
anchorUndoFactory,
|
|
1840
|
+
compareWithNumber,
|
|
1841
|
+
createCfId,
|
|
1842
|
+
createDefaultRule,
|
|
1843
|
+
createDefaultValue,
|
|
1844
|
+
createDefaultValueByValueType,
|
|
1845
|
+
dataBarUKey,
|
|
1846
|
+
defaultDataBarNativeColor,
|
|
1847
|
+
defaultDataBarPositiveColor,
|
|
1848
|
+
defaultPlaceholderColor,
|
|
1849
|
+
filterRange,
|
|
1850
|
+
findIndexByAnchor,
|
|
1851
|
+
getCacheStyleMatrix,
|
|
1852
|
+
getCellValue,
|
|
1853
|
+
getColorScaleFromValue,
|
|
1854
|
+
getMaxInFormulaResult,
|
|
1855
|
+
getOppositeOperator,
|
|
1856
|
+
getValueByType,
|
|
1857
|
+
iconGroup,
|
|
1858
|
+
iconMap,
|
|
1859
|
+
isAnchorEqual,
|
|
1860
|
+
isFloatsEqual,
|
|
1861
|
+
isNullable,
|
|
1862
|
+
isRangesEqual,
|
|
1863
|
+
moveByAnchor,
|
|
1864
|
+
removeUndefinedAttr,
|
|
1865
|
+
serialTimeToTimestamp,
|
|
1866
|
+
setConditionalRuleMutationUndoFactory,
|
|
1867
|
+
toYMD_1900,
|
|
1868
|
+
transformSupportSymmetryAnchor
|
|
1851
1869
|
};
|