@univerjs/sheets-conditional-formatting 0.23.0-insiders.20260523-10caf99 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/lib/cjs/index.js CHANGED
@@ -2473,7 +2473,7 @@ for (const key in iconMap) {
2473
2473
  //#endregion
2474
2474
  //#region package.json
2475
2475
  var name = "@univerjs/sheets-conditional-formatting";
2476
- var version = "0.23.0-insiders.20260523-10caf99";
2476
+ var version = "0.24.0";
2477
2477
 
2478
2478
  //#endregion
2479
2479
  //#region src/config/config.ts
package/lib/es/index.js CHANGED
@@ -2472,7 +2472,7 @@ for (const key in iconMap) {
2472
2472
  //#endregion
2473
2473
  //#region package.json
2474
2474
  var name = "@univerjs/sheets-conditional-formatting";
2475
- var version = "0.23.0-insiders.20260523-10caf99";
2475
+ var version = "0.24.0";
2476
2476
 
2477
2477
  //#endregion
2478
2478
  //#region src/config/config.ts
package/lib/index.js CHANGED
@@ -2472,7 +2472,7 @@ for (const key in iconMap) {
2472
2472
  //#endregion
2473
2473
  //#region package.json
2474
2474
  var name = "@univerjs/sheets-conditional-formatting";
2475
- var version = "0.23.0-insiders.20260523-10caf99";
2475
+ var version = "0.24.0";
2476
2476
 
2477
2477
  //#endregion
2478
2478
  //#region src/config/config.ts
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@univerjs/core`),require(`@univerjs/sheets`),require(`rxjs`),require(`@univerjs/engine-formula`),require(`rxjs/operators`),require(`@univerjs/engine-render`)):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`@univerjs/sheets`,`rxjs`,`@univerjs/engine-formula`,`rxjs/operators`,`@univerjs/engine-render`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsConditionalFormatting={},e.UniverCore,e.UniverSheets,e.rxjs,e.UniverEngineFormula,e.rxjs.operators,e.UniverEngineRender))})(this,function(e,t,n,r,i,a,o){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let s=`SHEET_CONDITIONAL_FORMATTING_PLUGIN`,c=function(e){return e.beginsWith=`beginsWith`,e.endsWith=`endsWith`,e.containsText=`containsText`,e.notContainsText=`notContainsText`,e.equal=`equal`,e.notEqual=`notEqual`,e.containsBlanks=`containsBlanks`,e.notContainsBlanks=`notContainsBlanks`,e.containsErrors=`containsErrors`,e.notContainsErrors=`notContainsErrors`,e}({}),l=function(e){return e.today=`today`,e.yesterday=`yesterday`,e.tomorrow=`tomorrow`,e.last7Days=`last7Days`,e.thisMonth=`thisMonth`,e.lastMonth=`lastMonth`,e.nextMonth=`nextMonth`,e.thisWeek=`thisWeek`,e.lastWeek=`lastWeek`,e.nextWeek=`nextWeek`,e}({}),u=function(e){return e.greaterThan=`greaterThan`,e.greaterThanOrEqual=`greaterThanOrEqual`,e.lessThan=`lessThan`,e.lessThanOrEqual=`lessThanOrEqual`,e.notBetween=`notBetween`,e.between=`between`,e.equal=`equal`,e.notEqual=`notEqual`,e}({}),d=function(e){return e.highlightCell=`highlightCell`,e.dataBar=`dataBar`,e.colorScale=`colorScale`,e.iconSet=`iconSet`,e}({}),f=function(e){return e.uniqueValues=`uniqueValues`,e.duplicateValues=`duplicateValues`,e.rank=`rank`,e.text=`text`,e.timePeriod=`timePeriod`,e.number=`number`,e.average=`average`,e.formula=`formula`,e}({}),p=function(e){return e.num=`num`,e.min=`min`,e.max=`max`,e.percent=`percent`,e.percentile=`percentile`,e.formula=`formula`,e}({}),m=()=>({cfId:void 0,ranges:[],stopIfTrue:!1,rule:{type:`highlightCell`,subType:`text`,operator:`containsText`}}),h=(e,t)=>{switch(e){case`text`:if([`beginsWith`,`containsText`,`endsWith`,`equal`,`notContainsText`,`notEqual`].includes(t))return``;break;case`number`:return[`between`,`notBetween`].includes(t)?[10,100]:10}return``},g=(e,t)=>{switch(e){case`formula`:return`=`;case`max`:case`min`:return``;case`percent`:case`percentile`:case`num`:return t===void 0?10:t}return``},_=(e,t,n)=>{if(!t)return null;let r=t.findIndex(t=>n(t)===e.id);if(r<0)return null;switch(e.type){case`after`:return r+1;case`before`:return r-1;case`self`:return r}},v=(e,t,n,r)=>{if(!n)return null;let i=_(e,n,r),a=_(t,n,r);if(i===null||a===null||i===a)return;let o=n.splice(i,1)[0];switch(i<a&&(a=_(t,n,r)),t.type){case`before`:n.splice(a+1,0,o);break;case`self`:case`after`:n.splice(a,0,o);break}},y=(e,t,n,r)=>{if(e.type===`after`&&[`after`,`before`].includes(t.type))return[e,t];let i={...e},a={...t};if(i.type!==`after`){let e=_(i,n,r);if(e===null)return null;if(e-1<0){let t=n[e+1];if(t)i.id=r(t),i.type=`before`;else return null}else i.id=r(n[e-1]),i.type=`after`}if(![`after`,`before`].includes(a.type)){let e=_(a,n,r);if(e===null)return null;if(e===0)a.type=`before`;else if(e-1>=0)a.id=r(n[e-1]),a.type=`after`;else if(e+1<=n.length-1)a.id=r(n[e+1]),a.type=`before`;else return null}return i.id===a.id&&i.type===a.type?null:[i,a]},b=(e,t)=>{if([`after`,`before`].includes(t.type)){if(e.type===`after`)return[t,e];if(e.type===`before`)return[t,{...e,type:`self`}]}return null},x=(e,t)=>e.id===t.id&&e.type===t.type,S=()=>`${(0,t.generateRandomId)(8)}`;function C(e){"@babel/helpers - typeof";return C=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C(e)}function w(e,t){if(C(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ee(e){var t=w(e,`string`);return C(t)==`symbol`?t:t+``}function T(e,t,n){return(t=ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=class{constructor(){T(this,`_model`,new Map),T(this,`_ruleChange$`,new r.Subject),T(this,`$ruleChange`,this._ruleChange$.asObservable())}_ensureList(e,t){let n=this.getSubunitRules(e,t);if(!n){n=[];let r=this._model.get(e);r||(r=new Map,this._model.set(e,r)),r.set(t,n)}return n}getRule(e,t,n){let r=this.getSubunitRules(e,t);return r?r.find(e=>e.cfId===n):null}getUnitRules(e){return this._model.get(e)||null}getSubunitRules(e,t){var n;return((n=this._model.get(e))==null?void 0:n.get(t))||null}getAll(){return this._model}deleteRule(e,t,n){let r=this.getSubunitRules(e,t);if(r){let i=r.findIndex(e=>e.cfId===n),a=r[i];a&&(r.splice(i,1),this._ruleChange$.next({rule:a,subUnitId:t,unitId:e,type:`delete`}))}}setRule(e,n,r,i){let a=this._ensureList(e,n).find(e=>e.cfId===i);if(a){let i=t.Tools.deepClone(a);Object.assign(a,r),this._ruleChange$.next({rule:a,subUnitId:n,unitId:e,type:`set`,oldRule:i})}}addRule(e,t,n){let r=this._ensureList(e,t);r.find(e=>e.cfId===n.cfId)||r.unshift(n),this._ruleChange$.next({rule:n,subUnitId:t,unitId:e,type:`add`})}moveRulePriority(e,t,n,r){let i=this._ensureList(e,t),a=_(n,i,e=>e.cfId),o=_(r,i,e=>e.cfId);if(o===null||a===null||o===a)return;let s=i[a];s&&(v(n,r,i,e=>e.cfId),this._ruleChange$.next({rule:s,subUnitId:t,unitId:e,type:`sort`}))}createCfId(e,t){return S()}deleteUnitId(e){this._model.delete(e)}};let D={type:t.CommandType.MUTATION,id:`sheet.mutation.move-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,start:i,end:a}=t;return e.get(E).moveRulePriority(n,r,i,a),!0}},te=e=>{let{unitId:t,subUnitId:n}=e,r=b(e.start,e.end);if(!r)return[];let[i,a]=r;return[{id:D.id,params:{unitId:t,subUnitId:n,start:i,end:a}}]},O=(e,n)=>{let r=e.get(E),{unitId:i,subUnitId:a,cfId:o}=n,s=[...r.getSubunitRules(i,a)||[]],c=s.findIndex(e=>e.cfId===o),l=s[c-1];if(c>-1){let e=s[c],n=[{id:j.id,params:{unitId:i,subUnitId:a,rule:t.Tools.deepClone(e)}}];if(s.splice(c,1),c!==0){let e=s[0];if(e){let t=y({id:e.cfId,type:`before`},{id:l.cfId,type:`after`},s,e=>e.cfId);if(!t)return n;let[r,o]=t,c={unitId:i,subUnitId:a,start:r,end:o};n.push({id:D.id,params:c})}}return n}return[]},k={type:t.CommandType.MUTATION,id:`sheet.mutation.delete-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,cfId:i}=t;return e.get(E).deleteRule(n,r,i),!0}},A=(e,t)=>({id:k.id,params:{unitId:t.unitId,subUnitId:t.subUnitId,cfId:t.rule.cfId}}),j={type:t.CommandType.MUTATION,id:`sheet.mutation.add-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t;return e.get(E).addRule(n,r,i),!0}},ne={type:t.CommandType.COMMAND,id:`sheet.command.add-conditional-rule`,handler(e,r){if(!r)return!1;let{rule:i}=r,a=e.get(t.IUndoRedoService),o=e.get(t.ICommandService),s=e.get(E),c=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=s.createCfId(l,u),f={unitId:l,subUnitId:u,rule:{...i,cfId:i.cfId||d}},p=A(e,f),m=o.syncExecuteCommand(j.id,f);return m&&a.pushUndoRedo({unitID:l,redoMutations:[{id:j.id,params:f}],undoMutations:[p]}),m}},M={type:t.CommandType.MUTATION,id:`sheet.mutation.set-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t,a=t.cfId||t.rule.cfId;return e.get(E).setRule(n,r,i,a),!0}},N=(e,n)=>{let r=e.get(E),{unitId:i,subUnitId:a}=n,o=n.cfId||n.rule.cfId,s=r.getRule(i,a,o);return s?[{id:M.id,params:{unitId:i,subUnitId:a,cfId:o,rule:t.Tools.deepClone(s)}}]:[]},re={type:t.CommandType.COMMAND,id:`sheet.command.clear-range-conditional-rule`,handler(e,r){var i;if(!r)return!1;let a=e.get(E),o=e.get(t.IUniverInstanceService),s=e.get(t.ICommandService),c=e.get(t.IUndoRedoService),l=e.get(n.SheetsSelectionsService),u=(0,n.getSheetCommandTarget)(o,r);if(!u)return!1;let{unitId:d,subUnitId:f}=u,p=((i=l.getCurrentSelections())==null?void 0:i.map(e=>e.range))||[],m=a.getSubunitRules(d,f);if(!(m!=null&&m.length)||!p.length)return!1;let h=[],g=[];m.forEach(r=>{let i=new t.ObjectMatrix;r.ranges.forEach(e=>{t.Range.foreach(e,(e,t)=>{i.setValue(e,t,1)})}),p.forEach(e=>{t.Range.foreach(e,(e,t)=>{i.realDeleteValue(e,t)})});let a=(0,n.findAllRectangle)((0,n.createTopMatrixFromMatrix)(i));if(a.length){let t={unitId:d,subUnitId:f,rule:{...r,ranges:a}},n=N(e,t);h.push({id:M.id,params:t}),g.push(...n)}else{let t={unitId:d,subUnitId:f,cfId:r.cfId},n=O(e,t);h.push({id:k.id,params:t}),g.push(...n)}});let _=(0,t.sequenceExecute)(h,s).result;return _&&c.pushUndoRedo({unitID:d,redoMutations:h,undoMutations:g}),_}},ie={type:t.CommandType.COMMAND,id:`sheet.command.clear-worksheet-conditional-rule`,handler(e,r){let i=e.get(E),a=e.get(t.IUniverInstanceService),o=e.get(t.ICommandService),s=e.get(t.IUndoRedoService),c=(0,n.getSheetCommandTarget)(a,r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=i.getSubunitRules(l,u);if(!(d!=null&&d.length))return!1;let f=d.map(e=>({cfId:e.cfId,unitId:l,subUnitId:u})),p=f.map(e=>({id:k.id,params:e})),m=f.map(t=>O(e,t)[0]),h=(0,t.sequenceExecute)(p,o).result;return h&&s.pushUndoRedo({unitID:l,redoMutations:p,undoMutations:m}),h}},ae={type:t.CommandType.COMMAND,id:`sheet.command.delete-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!o)return!1;let{unitId:s,subUnitId:c}=o,l={unitId:s,subUnitId:c,cfId:r.cfId},u=O(e,l),d=a.syncExecuteCommand(k.id,l);return d&&i.pushUndoRedo({unitID:s,undoMutations:u,redoMutations:[{id:k.id,params:l}]}),d}},P={type:t.CommandType.COMMAND,id:`sheet.command.move-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=e.get(t.IUniverInstanceService),s=e.get(E),c=(0,n.getSheetCommandTarget)(o,r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=y(r.start,r.end,s.getSubunitRules(l,u)||[],e=>e.cfId);if(!d)return!1;let[f,p]=d,m={unitId:l,subUnitId:u,start:f,end:p},h=te(m),g=a.syncExecuteCommand(D.id,m);return g&&i.pushUndoRedo({unitID:l,redoMutations:[{id:D.id,params:m}],undoMutations:h}),g}},oe={type:t.CommandType.COMMAND,id:`sheet.command.set-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!o)return!1;let{unitId:s,subUnitId:c}=o,l={unitId:s,subUnitId:c,rule:r.rule,cfId:r.cfId},u=N(e,l),d=a.syncExecuteCommand(M.id,l);return d&&i.pushUndoRedo({unitID:s,undoMutations:u,redoMutations:[{id:M.id,params:l}]}),d}};function F(e,t){return function(n,r){t(n,r,e)}}function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let L=class extends t.Disposable{constructor(e,t){super(),this._registerOtherFormulaService=e,this._conditionalFormattingRuleModel=t,T(this,`_formulaMap`,new Map),T(this,`_result$`,new r.Subject),T(this,`result$`,this._result$.asObservable()),this._initFormulaResultChange(),this._initRuleChange()}_initRuleChange(){let e=e=>{switch(e.type){case`colorScale`:return e.config.some(e=>e.value.type===`formula`);case`dataBar`:return[e.config.max,e.config.min].some(e=>e.type===`formula`);case`iconSet`:return e.config.some(e=>e.value.type===`formula`)}};this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(t=>{let{unitId:n,subUnitId:r,rule:i,oldRule:a}=t;t.type===`delete`&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`set`&&(e(i.rule)||a&&e(a.rule))&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`add`&&this._registerRuleFormulas(n,r,i)}))}_registerRuleFormulas(e,t,n){switch(n.rule.type){case`highlightCell`:if(n.rule.subType===`formula`){let r=n.rule.value;r&&this.registerFormulaWithRange(e,t,n.cfId,r,n.ranges)}break}}_initFormulaResultChange(){this.disposeWithMe(this._registerOtherFormulaService.formulaResult$.subscribe(e=>{for(let t in e)for(let n in e[t]){let r=e[t][n];for(let e of r){let r=this._ensureSubunitFormulaMap(t,n).getValue(e.formulaId,[`formulaId`]);if(!r)continue;let a=this._getAllFormulaResultByCfId(t,n,r.cfId).every(e=>{let r=this._registerOtherFormulaService.getFormulaValueSync(t,n,e.formulaId);return(r==null?void 0:r.status)===i.FormulaResultStatus.SUCCESS});this._result$.next({...r,isAllFinished:a})}}}))}_ensureSubunitFormulaMap(e,n){let r=this._formulaMap.get(e);r||(r=new Map,this._formulaMap.set(e,r));let i=r.get(n);return i||(i=new t.RefAlias([],[`formulaId`,`id`]),r.set(n,i)),i}getSubUnitFormulaMap(e,t){var n;return(n=this._formulaMap.get(e))==null?void 0:n.get(t)}registerFormulaWithRange(e,t,n,r,a=[{startRow:0,endRow:0,startColumn:0,endColumn:0}]){let o=this._ensureSubunitFormulaMap(e,t),s=this.createCFormulaId(n,r);if(o.getValue(s,[`id`]))return;let c=[...a].sort((e,t)=>e.startRow===t.startRow?e.startColumn-t.startColumn:e.startRow-t.startRow),l=this._registerOtherFormulaService.registerFormulaWithRange(e,t,r,c,void 0,i.OtherFormulaBizType.CONDITIONAL_FORMATTING,n);o.addValue({formulaText:r,unitId:e,subUnitId:t,cfId:n,id:s,formulaId:l})}_removeFormulaByCfId(e,t,n){let r=this.deleteCache(e,t,n).map(e=>e.formulaId);this._registerOtherFormulaService.deleteFormula(e,t,r)}getFormulaResultWithCoords(e,t,n,r,a=0,o=0){let s=this.getSubUnitFormulaMap(e,t);if(!s)return{status:i.FormulaResultStatus.NOT_REGISTER};let c=s.getValue(this.createCFormulaId(n,r),[`id`]);if(!c)return{status:i.FormulaResultStatus.NOT_REGISTER};let l=this._registerOtherFormulaService.getFormulaValueSync(e,t,c.formulaId);if(!l)return{status:i.FormulaResultStatus.NOT_REGISTER};if(l.status===i.FormulaResultStatus.SUCCESS&&l.result){var u;let e=(u=l.result[a])==null?void 0:u[o];return{result:this._getCellValue(e),status:i.FormulaResultStatus.SUCCESS}}return{status:l.status}}getFormulaMatrix(e,n,r,a){let o=this.getSubUnitFormulaMap(e,n);if(!o)return{status:i.FormulaResultStatus.NOT_REGISTER};let s=o.getValue(this.createCFormulaId(r,a),[`id`]);if(!s)return{status:i.FormulaResultStatus.NOT_REGISTER};let c=this._registerOtherFormulaService.getFormulaValueSync(e,n,s.formulaId);if(!c)return{status:i.FormulaResultStatus.NOT_REGISTER};if(c.status===i.FormulaResultStatus.SUCCESS&&c.result){let e=new t.ObjectMatrix;return new t.ObjectMatrix(c.result).forValue((t,n,r)=>{e.setValue(t,n,this._getCellValue(r))}),{result:e,status:i.FormulaResultStatus.SUCCESS}}return{status:c.status}}_getCellValue(e){if(!e||!e[0]||!e[0][0])return!1;let n=e[0][0];return(n==null?void 0:n.t)===t.CellValueType.BOOLEAN?n.v===t.BooleanNumber.TRUE||n.v===!0:n==null?void 0:n.v}deleteCache(e,t,n,r){let i=this.getSubUnitFormulaMap(e,t);if(!i)return[];if(r){let e=this.createCFormulaId(n,r);return i.deleteValue(e,[`id`]),[]}else{let e=i.getValues().filter(e=>e.cfId===n);return e.forEach(e=>{i.deleteValue(e.formulaId,[`formulaId`])}),e}}_getAllFormulaResultByCfId(e,t,n){let r=this.getSubUnitFormulaMap(e,t);return r?r.getValues().filter(e=>e.cfId===n):[]}createCFormulaId(e,t){return`${e}_${t}`}};L=I([F(0,(0,t.Inject)(i.RegisterOtherFormulaService)),F(1,(0,t.Inject)(E))],L);var R=class{constructor(e){this._context=e,T(this,`_cache`,void 0),T(this,`_preComputingStatus$`,new r.BehaviorSubject(`preComputingStart`)),T(this,`preComputingStatus$`,this._preComputingStatus$.asObservable().pipe((0,a.distinctUntilChanged)())),T(this,`_preComputingCache`,void 0),T(this,`_rule`,void 0),this._cache=new t.LRUMap(e.limit),this._rule=e.rule,this._preComputingCache=null,this._initClearCacheListener()}setCacheLength(e){this._cache.limit=e}clearCache(){this._cache.clear()}resetPreComputingCache(){this._preComputingStatus$.next(`preComputingStart`),this._preComputingCache=null}updateRule(e){this._rule=e,this.resetPreComputingCache()}getCell(e,t){let n=this._createKey(e,t);if(this._preComputingStatus$.getValue()===`preComputing`)return this._cache.get(n);let r=this.getPreComputingResult(e,t);if(r===null&&(this._preComputingStatus$.next(`preComputingStart`),this.preComputing(e,t,this._getContext()),r=this.getPreComputingResult(e,t),r===null)||(this._preComputingStatus$.next(`preComputingEnd`),this._cache.has(n)))return this._cache.get(n);let i=this.getCellResult(e,t,r,this._getContext());return i!==null&&this._setCache(e,t,i),i}setPreComputingCache(e){this._preComputingCache=e}getPreComputingResult(e,t){return this._preComputingCache}_createKey(e,t){return`${e}_${t}`}_setCache(e,t,n){let r=this._createKey(e,t);this._cache.set(r,n)}_getContext(){return{...this._context,rule:this._rule}}_initClearCacheListener(){this.preComputingStatus$.subscribe(e=>{e===`preComputingEnd`&&this.clearCache()})}},se=class extends R{preComputing(e,n,r){let a=r.rule,s=r.worksheet,c=new t.ObjectMatrix;a.rule.config.every(e=>e.value.type===`num`)||Y(a.ranges,s.getMaxRows()-1,s.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&c.setValue(e,n,t)}})});let l=[...a.rule.config].sort((e,t)=>e.index-t.index).map(e=>({value:q(e.value,c,{...r,cfId:a.cfId}),color:new t.ColorKit(e.color)}));if(!l.some(e=>(0,o.isObject)(e.value)?e.value.status!==i.FormulaResultStatus.SUCCESS:!1)){let e=l.map(e=>e.color).reduce((e,t,n)=>(e.result.push({color:t,value:e.sortValue[n]}),e),{result:[],sortValue:l.map(e=>e.value.result).sort((e,t)=>e-t)}).result;this.setPreComputingCache(e),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,n,r,i){if(!r)return null;let a=i.getCellValue(e,n);if(a.t===t.CellValueType.NUMBER){let e=Number(a.v);if(!Number.isNaN(e))return Se(r,e)}}};let ce=`sheet-conditional-rule-data-bar`,le=`#000`,ue=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var de=class extends o.SheetExtension{constructor(...e){super(...e),T(this,`_paddingRightAndLeft`,2),T(this,`_paddingTopAndBottom`,2),T(this,`uKey`,ce),T(this,`Z_INDEX`,34),T(this,`_radius`,1)}draw(e,n,r,i){let{worksheet:a}=r;if(!a)return!1;let s=new Set,c=i!=null&&i.length?i:[r.rowColumnSegment];e.save(),c.forEach(n=>{t.Range.foreach(n,(t,n)=>{if(!a.getRowVisible(t)||!a.getColVisible(n))return;let c=r.getCellWithCoordByIndex(t,n,!1),{isMerged:l,isMergedMainCell:u,mergeInfo:d}=c,f=a.getCell(t,n);if(l&&(f=a.getCell(d.startRow,d.startColumn)),!(f!=null&&f.dataBar)||!this.isRenderDiffRangesByCell(d,i))return;if(l||u){let e=ue(d);if(s.has(e))return;s.add(e)}let{color:p,value:m,startPoint:h,isGradient:g}=f.dataBar,{startX:_,endX:v,startY:y,endY:b}=l||u?d:c,x=v-_,S=b+o.FIX_ONE_PIXEL_BLUR_OFFSET-y,C=x-this._paddingRightAndLeft*2,w=S-this._paddingTopAndBottom*2;if(m>0){let t=Math.max(C*(1-h/100)*m/100,1),n=_+this._paddingRightAndLeft+h/100*C,r=y+this._paddingTopAndBottom;if(g){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,p),i.addColorStop(1,`rgb(255 255 255)`),e.fillStyle=i,e.strokeStyle=p,e.lineWidth=1}else e.fillStyle=p;this._drawRectWithRoundedCorner(e,n,r,t,w,!1,!0,!0,!1),g&&e.stroke()}else{let t=Math.max(C*h/100*Math.abs(m)/100,1),n=_+this._paddingRightAndLeft+h/100*C-t,r=y+this._paddingTopAndBottom;if(g){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,`rgb(255 255 255)`),i.addColorStop(1,p),e.fillStyle=i,e.strokeStyle=p,e.lineWidth=1}else e.fillStyle=p;this._drawRectWithRoundedCorner(e,n,r,t,w,!0,!1,!1,!0),g&&e.stroke()}})}),e.restore()}_drawRectWithRoundedCorner(e,t,n,r,i,a,o,s,c){let l=this._radius;!i||!r||(e.beginPath(),e.moveTo(t+l,n),e.lineTo(t+r-l,n),o?e.arcTo(t+r,n,t+r,n+l,l):e.lineTo(t+r,n),e.lineTo(t+r,n+i-l),s?e.arcTo(t+r,n+i,t+r-l,n+i,l):e.lineTo(t+r,n+i),e.lineTo(t+l,n+i),c?e.arcTo(t,n+i,t,n+i-l,l):e.lineTo(t,n+i),e.lineTo(t,n+l),a?e.arcTo(t,n,t+l,n,l):e.lineTo(t,n),e.closePath(),e.fill())}};o.SpreadsheetExtensionRegistry.add(de);let z=e=>Math.max(Math.min(100,e),0),fe=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.CellValueType.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var pe=class extends R{preComputing(e,n,r){let a=r.rule,o=a.rule,s=r.worksheet,c=new t.ObjectMatrix;[a.rule.config.max,a.rule.config.min].every(e=>e.type===`num`)||Y(a.ranges,s.getMaxRows()-1,s.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&c.setValue(e,n,t)}})});let l=q(o.config.min,c,{...r,cfId:a.cfId}),u=q(o.config.max,c,{...r,cfId:a.cfId}),d=0,f=0;if(l.status===i.FormulaResultStatus.SUCCESS){let e=Number(l.result);d=Number.isNaN(e)?0:e}else{this._preComputingStatus$.next(`preComputing`);return}if(u.status===i.FormulaResultStatus.SUCCESS){let e=Number(u.result),t=Number.isNaN(e)?0:e;f=Math.max(t,d),d=Math.min(t,d);let n=50;if(d<0&&f<=0)n=100;else if(d<0&&f>0){let e=Math.abs(f)+Math.abs(d);n=Math.abs(d)/e*100}else d>=0&&f>0&&(n=0);this.setPreComputingCache({min:d,max:f,startPoint:n}),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,t,n,r){let{min:i,max:a,startPoint:o}=n,s=r.rule.rule,c=s.isShowValue,l=s.config.isGradient,u=fe(e,t,r.getCellValue);if(!(u===null||u<i||i===a||a<i)){if(u===0)return{color:le,startPoint:o,value:0,isGradient:l,isShowValue:c};if(i<0&&a<=0){let e=a-i,t=z((a-u)/e*100);return t===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-t,isGradient:l,isShowValue:c}}else if(i<0&&a>0)if(u>0){let e=z(Math.min(u/a,1)*100);return e===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:o,value:e,isGradient:l,isShowValue:c}}else{let e=z(Math.min(Math.abs(u)/Math.abs(i),1)*100);return e===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-e,isGradient:l,isShowValue:c}}else if(i>=0&&a>0){let e=a-i,t=z((1-(a-u)/e)*100);return t===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:0,value:t,isGradient:l,isShowValue:c}}}}};let B=e=>e===!0||e===1||e===`TRUE`,me=e=>[...e].sort((e,t)=>e.startRow===t.startRow?e.startColumn-t.startColumn:e.startRow-t.startRow);var he=class extends R{preComputing(e,n,r){let a=r.rule.rule,o=Y(r.rule.ranges,r.worksheet.getMaxRows()-1,r.worksheet.getMaxColumns()-1),s=(()=>{switch(a.subType){case`average`:{let e=0,n=0;return o.forEach(i=>{t.Range.foreach(i,(i,a)=>{let o=r.getCellValue(i,a),s=G(o);o&&o.t===t.CellValueType.NUMBER&&!W(s)&&(e+=Number(s)||0,n++)})}),{value:e/n,type:a.subType}}case`uniqueValues`:case`duplicateValues`:{let e=new Map;return o.forEach(n=>{t.Range.foreach(n,(t,n)=>{let i=G(r.getCellValue(t,n));if(!W(i)){let t=e.get(i);t?e.set(i,t+1):e.set(i,1)}})}),{value:e,type:a.subType}}case`rank`:{let e=[];o.forEach(n=>{t.Range.foreach(n,(n,i)=>{let a=r.getCellValue(n,i),o=G(a);a&&a.t===t.CellValueType.NUMBER&&!W(o)&&e.push(Number(o)||0)})}),e.sort((e,t)=>t-e);let n=r.rule.rule;if(n.isPercent){n.isBottom&&(e=e.toReversed());let r=t.Tools.clamp(n.value,0,100)/100,i=Math.floor(r*e.length),o=t.Tools.clamp(i-1,0,e.length-1);return{value:e[o],type:a.subType}}let i=Math.floor(t.Tools.clamp(n.isBottom?n.value-1:n.value,0,e.length));return n.isBottom?{value:e[e.length-i-1],type:a.subType}:{value:e[Math.max(i-1,0)],type:a.subType}}case`formula`:{let e=a,t=r.accessor.get(L),n=me(r.rule.ranges);t.registerFormulaWithRange(r.unitId,r.subUnitId,r.rule.cfId,e.value,n);let o=t.getFormulaMatrix(r.unitId,r.subUnitId,r.rule.cfId,e.value);return o&&o.status===i.FormulaResultStatus.SUCCESS?(this._preComputingStatus$.next(`preComputingEnd`),{value:o.result,type:a.subType}):(this._preComputingStatus$.next(`preComputing`),null)}case`timePeriod`:switch(a.operator){case`last7Days`:return{value:{start:(0,t.dateKit)().subtract(7,`day`).valueOf(),end:(0,t.dateKit)().valueOf()},type:a.subType};case`lastMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).subtract(1,`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).subtract(1,`month`).valueOf()},type:a.subType};case`lastWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).subtract(1,`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).subtract(1,`week`).valueOf()},type:a.subType};case`nextMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).add(1,`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).add(1,`month`).valueOf()},type:a.subType};case`nextWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).add(1,`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).add(1,`week`).valueOf()},type:a.subType};case`thisMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).valueOf()},type:a.subType};case`thisWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).valueOf()},type:a.subType};case`today`:return{value:{start:(0,t.dateKit)().startOf(`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).valueOf()},type:a.subType};case`tomorrow`:return{value:{start:(0,t.dateKit)().startOf(`day`).add(1,`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).add(1,`day`).valueOf()},type:a.subType};case`yesterday`:return{value:{start:(0,t.dateKit)().startOf(`day`).subtract(1,`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).subtract(1,`day`).valueOf()},type:a.subType}}}})();this.setPreComputingCache(s)}getCellResult(e,n,r,a){let o=a.getCellValue(e,n),s=a.rule.rule;return(()=>{switch(s.subType){case`number`:{let e=o&&Number(o.v),n=(o==null?void 0:o.t)===t.CellValueType.NUMBER,r=s;return n?W(e)||Number.isNaN(e)?void 0:J({operator:r.operator,value:r.value||0},e||0):!![`notEqual`,`notBetween`].includes(r.operator)}case`text`:{let e=s,t=G(o),n=W(t)?``:String(t),r=e.value||``;switch(e.operator){case`beginsWith`:return n.startsWith(r);case`containsBlanks`:return/^\s*$/.test(n);case`notContainsBlanks`:return!/^\s*$/.test(n);case`containsErrors`:return i.ERROR_TYPE_SET.has(n);case`notContainsErrors`:return!i.ERROR_TYPE_SET.has(n);case`containsText`:return n.indexOf(r)>-1;case`notContainsText`:return n.indexOf(r)===-1;case`endsWith`:return n.endsWith(r);case`equal`:return n===r;case`notEqual`:return n!==r;default:return!1}}case`timePeriod`:{let e=G(o);if(W(e)||Number.isNaN(Number(e))||(o==null?void 0:o.t)!==t.CellValueType.NUMBER||!r)return;let n=ye(Number(e)),{start:i,end:a}=r.value;return n>=i&&n<=a}case`average`:{let e=o&&o.v,n=Number(e),i=(o==null?void 0:o.t)===t.CellValueType.NUMBER,a=s;if(!i)return a.operator===`notEqual`;if(W(e)||Number.isNaN(n)||!r)return!1;let c=r.value;switch(a.operator){case`greaterThan`:return n>c;case`greaterThanOrEqual`:return n>=c;case`lessThan`:return n<c;case`lessThanOrEqual`:return n<=c;case`equal`:return U(n,c);case`notEqual`:return!U(n,c);default:return!1}}case`rank`:{let e=G(o),n=Number(e);if(W(e)||Number.isNaN(n)||(o==null?void 0:o.t)!==t.CellValueType.NUMBER||!r)return!1;let i=r.value;return s.isBottom?n<=i:n>=i}case`uniqueValues`:{let e=G(o);return W(e)||!r?!1:r.value.get(e)===1}case`duplicateValues`:{let e=G(o);if(W(e)||!r)return!1;let t=r.value.get(e);return t&&t!==1}case`formula`:{let t=s,o=a.accessor.get(L),c=me(a.rule.ranges)[0],l=e-c.startRow,u=n-c.startColumn,d=o.getFormulaResultWithCoords(a.unitId,a.subUnitId,a.rule.cfId,t.value,l,u);if(d.status===i.FormulaResultStatus.SUCCESS&&d.result!==void 0)return B(d.result);let f=r==null?void 0:r.value;return f?B(f.getValue(l,u)):!1}}})()?s.style:{}}};let ge=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.CellValueType.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var _e=class extends R{preComputing(e,n,r){let a=r.rule.rule,o=r.worksheet,s=new t.ObjectMatrix;a.config.every(e=>e.value.type===`num`)||Y(r.rule.ranges,o.getMaxRows()-1,o.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&s.setValue(e,n,t)}})});let c=a.config.map(e=>q(e.value,s,{...r,cfId:r.rule.cfId}));if(!c.some(e=>e.status!==i.FormulaResultStatus.SUCCESS)){let e=c.map((e,t)=>({operator:a.config[t].operator,value:Number(e.result)||0})).reduce((e,t,n,r)=>{let i=a.config[n];if(!n||n===r.length-1)e.push({...t,iconId:i.iconId,iconType:i.iconType});else{let a=r[n-1];J(a,t.value)||e.push({...t,iconId:i.iconId,iconType:i.iconType})}return e},[]);this.setPreComputingCache(e),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,t,n,r){if(!n)return null;let i=ge(e,t,r.getCellValue);if(i===null)return;let a=r.rule.rule,o=a.isShowValue===void 0?!0:!!a.isShowValue;for(let e=0;e<n.length;e++){let t=n[e],r={...t},a={...t},{iconId:s,iconType:c}=t;if(e===0){if(J(t,i))return{iconId:s,iconType:c,isShowValue:o}}else if(e===n.length-1)return{iconId:s,iconType:c,isShowValue:o};else{let t=n[e-1];if(a.operator=xe(t.operator),a.value=t.value,J(r,i)&&J(a,i))return{iconId:s,iconType:c,isShowValue:o}}}}};let V=1e3*3*3,H=class extends t.Disposable{constructor(e,n,i,o){super(),this._injector=e,this._conditionalFormattingRuleModel=n,this._conditionalFormattingFormulaService=i,this._univerInstanceService=o,T(this,`_calculateUnitManagers`,new Map),T(this,`_rTreeManager`,new t.RTree),T(this,`_cellCache`,new t.LRUMap(V)),T(this,`_markDirty$`,new r.Subject),T(this,`markDirty$`,this._markDirty$.asObservable()),T(this,`_markRuleDirtyAtOnce`,(e,t,n,r=!0)=>{if(this._cellCache.clear(),r){let r=this._ensureCalculateUnitManager(e,t).get(n);r&&r.resetPreComputingCache()}this._markDirty$.next({unitId:e,subUnitId:t,cfId:n})}),T(this,`markRuleDirty`,(()=>{let e=new r.Subject;return this.disposeWithMe(e.pipe((0,a.bufferTime)(100),(0,a.filter)(e=>!!e.length),(0,a.map)(e=>{let t=new Set,n=[];return e.forEach(e=>{let r=`${e.unitId}_${e.subUnitId}_${e.cfId}`;if(t.has(r)){if(e.isNeedResetPreComputingCache){let t=n.find(t=>t.cfId===e.cfId);t.isNeedResetPreComputingCache=!0}return}t.add(r),n.push({...e})}),n})).subscribe(e=>{e.forEach(e=>{this._markRuleDirtyAtOnce(e.unitId,e.subUnitId,e.cfId,e.isNeedResetPreComputingCache)})})),(t,n,r,i=!0)=>{e.next({unitId:t,subUnitId:n,cfId:r,isNeedResetPreComputingCache:i})}})()),this._initRuleListener(),this._handleCustomFormulasSeparately(),this._initCFFormulaListener()}_initCFFormulaListener(){this.disposeWithMe(this._conditionalFormattingFormulaService.result$.subscribe(({unitId:e,subUnitId:t,cfId:n,isAllFinished:r})=>{r&&this._markRuleDirtyAtOnce(e,t,n,r)}))}getCellCfs(e,t,n,r){let i=this._createCacheKey(e,t,n,r);if(this._cellCache.has(i))return this._cellCache.get(i);let a=this._getCellCfs(e,t,n,r);return a.length&&this._cellCache.set(i,a),a}_getCellCfs(e,t,n,r){var i;let a=(i=this._conditionalFormattingRuleModel.getSubunitRules(e,t))==null?[]:i,o=this._ensureCalculateUnitManager(e,t),s=this._rTreeManager.bulkSearch([{unitId:e,sheetId:t,range:{startColumn:r,endColumn:r,startRow:n,endRow:n}}]),c=a.filter(e=>s.has(e.cfId));return c.length?c.map(e=>{let t=o.get(e.cfId);return t?{cfId:e.cfId,result:t.getCell(n,r)}:null}).filter(e=>!!e).map((e,t)=>({...e,priority:t})):[]}dispose(){this.clearCache(),super.dispose()}clearCache(){this._calculateUnitManagers.clear(),this._cellCache.clear(),this._rTreeManager.clear()}_handleCustomFormulasSeparately(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{if(e.type===`set`){let{unitId:t,subUnitId:n}=e,r=e.oldRule;r.rule.type===`highlightCell`&&r.rule.subType===`formula`&&this._conditionalFormattingFormulaService.deleteCache(t,n,r.cfId)}}))}_initRuleListener(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{let{unitId:t,subUnitId:n,rule:r}=e,{cfId:i,ranges:a}=r,o=this._ensureCalculateUnitManager(t,n);switch(this.markRuleDirty(t,n,i),e.type){case`add`:{this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e})));let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.set(r.cfId,e);break}case`delete`:this._rTreeManager.bulkRemove(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),o.delete(r.cfId);break;case`set`:{let s=e.oldRule;if(this._rTreeManager.bulkRemove(s.ranges.map(e=>({unitId:t,sheetId:n,id:s.cfId,range:e}))),this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),s.rule.type!==r.rule.type){let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.delete(s.cfId),o.set(r.cfId,e)}else{let e=o.get(s.cfId);if(!e)return;e.updateRule(r)}}}}))}_ensureCalculateUnitManager(e,t){let n=this._calculateUnitManagers.get(e);n||(n=new Map,this._calculateUnitManagers.set(e,n));let r=n.get(t);return r||(r=new Map,n.set(t,r)),r}_createRuleCalculateUnitInstance(e,t,n){let r=this._univerInstanceService.getUnit(e),i=r==null?void 0:r.getSheetBySheetId(t);if(!r||!i)return;let a={workbook:r,worksheet:i,unitId:e,subUnitId:t,accessor:this._injector,rule:n,limit:V,getCellValue:(e,t)=>i.getCellRaw(e,t)||{}};switch(n.rule.type){case`colorScale`:return new se(a);case`dataBar`:return new pe(a);case`highlightCell`:return new he(a);case`iconSet`:return new _e(a)}}_createCacheKey(e,t,n,r){return`${e}_${t}_${n}_${r}`}setCacheLength(e=V){this._cellCache.limit!==e&&(this._cellCache.limit=e,this._calculateUnitManagers.forEach(t=>{t.forEach(t=>{t.forEach(t=>{t.setCacheLength(e)})})}))}};H=I([F(0,(0,t.Inject)(t.Injector)),F(1,(0,t.Inject)(E)),F(2,(0,t.Inject)(L)),F(3,t.IUniverInstanceService)],H);function U(e,t){return Math.abs(e-t)<2**-52}let W=e=>e==null||typeof e==`string`&&e.trim()===``,G=e=>{var n;if(!e)return null;if(e.t===t.CellValueType.BOOLEAN)return e.v===t.BooleanNumber.TRUE?i.BooleanValue.TRUE:i.BooleanValue.FALSE;let r=e.v,a=(n=e.p)==null||(n=n.body)==null?void 0:n.dataStream.replace(/\r\n$/,``);return W(r)?W(a)?null:a:r},K=86400;function ve(e,t=!0){if(t&&e>=0){if(e===0)return[1900,1,0];if(e===60)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let n=e+68569+2415019,r=Math.floor(4*n/146097);n-=Math.floor((146097*r+3)/4);let i=Math.floor(4e3*(n+1)/1461001);n=n-Math.floor(1461*i/4)+31;let a=Math.floor(80*n/2447),o=n-Math.floor(2447*a/80);n=Math.floor(a/11);let s=a+2-12*n;return[100*(r-49)+i+n|0,s|0,o|0]}let ye=e=>{let n=e|0,r=K*(e-n),i=Math.floor(r);r-i>.9999&&(i+=1,i===K&&(i=0,n+=1));let a=i<0?K+i:i,[o,s,c]=ve(e,!0);return(0,t.dateKit)(`${o}/${s}/${c} ${Math.floor(a/60/60)%60}:${Math.floor(a/60)%60}:${Math.floor(a)%60}`).valueOf()},q=(e,t,n)=>{switch(e.type){case`max`:{let e=0;return t.forValue((t,n,r)=>{r>e&&(e=r)}),{status:i.FormulaResultStatus.SUCCESS,result:e}}case`min`:{let e;return t.forValue((t,n,r)=>{e===void 0&&(e=r),r<e&&(e=r)}),{status:i.FormulaResultStatus.SUCCESS,result:e}}case`percent`:{let n,r;t.forValue((e,t,i)=>{(n===void 0||r===void 0)&&(n=i,r=i),i>n&&(n=i),i<r&&(r=i)});let a=(n||0)-(r||0),o=Math.max(Math.min(Number(e.value)||0,100),0);return{status:i.FormulaResultStatus.SUCCESS,result:o/100*a+(r||0)}}case`percentile`:{let n=t.toNativeArray().sort((e,t)=>e-t),r=Math.max(Math.min(Number(e.value)||0,100),0),a=(n.length-1)*r/100,o=Math.floor(a),s=a-o,c=n[o]+(n[Math.min(o+1,n.length-1)]-n[o])*s;return{status:i.FormulaResultStatus.SUCCESS,result:c}}case`formula`:{let{accessor:t,unitId:r,subUnitId:i,cfId:a}=n,o=String(e.value),s=t.get(L);return s.registerFormulaWithRange(r,i,a,o),s.getFormulaResultWithCoords(r,i,a,o)}default:{let t=Number(e.value);return{status:i.FormulaResultStatus.SUCCESS,result:Number.isNaN(t)?0:t}}}},be=(e,n,r,i)=>{let{accessor:a}=i,o=a.get(H),s=new t.ObjectMatrix;return r.ranges.forEach(i=>{t.Range.foreach(i,(t,i)=>{let a=o.getCellCfs(e,n,t,i);if(a){let e=a.find(e=>e.cfId===r.cfId);e!=null&&e.result&&s.setValue(t,i,e.result)}})}),s},J=(e,t)=>{switch(e.operator){case`between`:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return t>=n&&t<=r}case`notBetween`:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return!(t>=n&&t<=r)}case`equal`:return U(e.value||0,t);case`notEqual`:return!U(e.value||0,t);case`greaterThan`:return t>(e.value||0);case`greaterThanOrEqual`:return t>=(e.value||0);case`lessThan`:return t<(e.value||0);case`lessThanOrEqual`:return t<=(e.value||0);default:return!1}},xe=e=>{switch(e){case`greaterThan`:return`lessThanOrEqual`;case`greaterThanOrEqual`:return`lessThan`;case`lessThan`:return`greaterThanOrEqual`;case`lessThanOrEqual`:return`greaterThan`}return e},Se=(e,n)=>{let r=e=>e.a===void 0?{...e,a:1}:e,i=e.findIndex(e=>e.value>=n),a=i-1;if(i===0)return e[0].color.toRgbString();if(a>=0){let o=e[a],s=e[i];if(o.color.isValid&&s.color.isValid){let e=r(o.color.toRgb()),i=r(s.color.toRgb()),a=s.value-o.value,c=(n-o.value)/a;return new t.ColorKit([`r`,`g`,`b`,`a`].reduce((t,n)=>{let r=e[n];return t[n]=(i[n]-r)*c+r,t},{})).toRgbString()}}else return e[e.length-1].color.toRgbString()},Y=(e,t,n)=>e.map(e=>{if(e.startColumn>n||e.startRow>t)return null;let r={...e};return r.endRow=Math.min(r.endRow,t),r.endColumn=Math.min(r.endColumn,n),r}).filter(e=>!!e);function Ce(e){let n=0;return new t.ObjectMatrix(e).forValue((e,t,r)=>{n=Math.max(Number.isNaN(n)?0:n,Number(r))}),n}let X={feedback:{mistake:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20d%3D%22M5.69014%205.69014C5.45583%205.92445%205.45583%206.30435%205.69014%206.53867L7.15137%207.9999L5.6899%209.46137C5.45558%209.69569%205.45558%2010.0756%205.6899%2010.3099C5.92421%2010.5442%206.30411%2010.5442%206.53842%2010.3099L7.9999%208.84843L9.46137%2010.3099C9.69569%2010.5442%2010.0756%2010.5442%2010.3099%2010.3099C10.5442%2010.0756%2010.5442%209.69569%2010.3099%209.46137L8.84843%207.9999L10.3097%206.53867C10.544%206.30435%2010.544%205.92445%2010.3097%205.69014C10.0753%205.45583%209.69544%205.45583%209.46113%205.69014L7.9999%207.15137L6.53867%205.69014C6.30435%205.45583%205.92445%205.45583%205.69014%205.69014Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A`,warn:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M7.4%204.4335C7.4%204.10213%207.66863%203.8335%208%203.8335C8.33137%203.8335%208.6%204.10213%208.6%204.4335V9.36683C8.6%209.6982%208.33137%209.96683%208%209.96683C7.66863%209.96683%207.4%209.6982%207.4%209.36683V4.4335Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%2211.5338%22%20r%3D%220.83333%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A`,correct:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M11.7245%205.57564C11.4901%205.34132%2011.1102%205.34132%2010.8759%205.57564L7.3002%209.15137L5.72446%207.57564C5.49014%207.34132%205.11025%207.34132%204.87593%207.57564C4.64162%207.80995%204.64162%208.18985%204.87593%208.42417L6.87593%2010.4242C7.11025%2010.6585%207.49014%2010.6585%207.72446%2010.4242L11.7245%206.42417C11.9588%206.18985%2011.9588%205.80995%2011.7245%205.57564Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23fff%22%2F%3E%0A%3C%2Fsvg%3E%0A`,starIncomplete:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23fff%22%2F%3E%0A%3Cmask%20id%3D%22star-incomplete-mask%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%228%22%20height%3D%2216%22%3E%0A%3Crect%20width%3D%228%22%20height%3D%2216%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23star-incomplete-mask)%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A`,starFull:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`},progress:{progress0:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress25:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208H8V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress50:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress75:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208H8V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress100:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`},signal:{signal0:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal25:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal50:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal75:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal100:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M4.8%209.15C5.25%2011.25%206.5%2012.55%208%2012.55C9.5%2012.55%2010.75%2011.25%2011.2%209.15H4.8Z%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3C%2Fsvg%3E%0A`,smile:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%209.3C5.65%2010.65%206.65%2011.35%208%2011.35C9.35%2011.35%2010.35%2010.65%2011%209.3%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,noninductive:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Crect%20x%3D%225%22%20y%3D%225.85%22%20width%3D%221.5%22%20height%3D%221.1%22%20rx%3D%220.55%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%229.5%22%20y%3D%225.85%22%20width%3D%221.5%22%20height%3D%221.1%22%20rx%3D%220.55%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5.2%2010.4H10.8%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,dissatisfied:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%2011C5.65%209.65%206.65%208.95%208%208.95C9.35%208.95%2010.35%209.65%2011%2011%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,impatient:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Cpath%20d%3D%22M4.9%205.4L6.7%206.15%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3Cpath%20d%3D%22M11.1%205.4L9.3%206.15%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%227.2%22%20r%3D%220.65%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%227.2%22%20r%3D%220.65%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%2011.25C5.7%2010.05%206.7%209.45%208%209.45C9.3%209.45%2010.3%2010.05%2011%2011.25%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`},arrow:{"down-red":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"right-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"up-green":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndDown-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndUp-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"down-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"right-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"up-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndDown-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndUp-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`},shape:{cross:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%220.75%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,up:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.48861%204.23829C7.75558%203.87976%208.29238%203.87976%208.55935%204.23829L12.9614%2010.1507C13.2907%2010.5929%2012.975%2011.2223%2012.4236%2011.2223H3.62432C3.07292%2011.2223%202.75722%2010.5929%203.08649%2010.1507L7.48861%204.23829Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`,down:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8.55935%2011.7617C8.29238%2012.1202%207.75558%2012.1202%207.48861%2011.7617L3.08649%205.84931C2.75722%205.40708%203.07292%204.77771%203.62432%204.77771H12.4236C12.975%204.77771%2013.2907%205.40708%2012.9614%205.84931L8.55935%2011.7617Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.57574%201.92426C7.81005%201.68995%208.18995%201.68995%208.42426%201.92426L14.0757%207.57574C14.3101%207.81005%2014.3101%208.18995%2014.0757%208.42426L8.42426%2014.0757C8.18995%2014.3101%207.81005%2014.3101%207.57574%2014.0757L1.92426%208.42426C1.68995%208.18995%201.68995%207.81005%201.92426%207.57574L7.57574%201.92426Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.57574%201.92426C7.81005%201.68995%208.18995%201.68995%208.42426%201.92426L14.0757%207.57574C14.3101%207.81005%2014.3101%208.18995%2014.0757%208.42426L8.42426%2014.0757C8.18995%2014.3101%207.81005%2014.3101%207.57574%2014.0757L1.92426%208.42426C1.68995%208.18995%201.68995%207.81005%201.92426%207.57574L7.57574%201.92426Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"triangle-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.35127%202.31778C7.61335%201.86074%208.27331%201.86074%208.53539%202.31778L14.0808%2011.9898C14.3423%2012.4459%2014.0131%2013.0147%2013.4877%2013.0147H2.399C1.87354%2013.0147%201.54441%2012.4459%201.80595%2011.9898L7.35127%202.31778Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"indicate-greed":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.71274%202.86421C3.47843%202.6299%203.09853%202.6299%202.86421%202.86421C2.6299%203.09853%202.6299%203.47843%202.86421%203.71274L7.15154%208.00007L2.86421%2012.2874C2.6299%2012.5217%202.6299%2012.9016%202.86421%2013.1359C3.09853%2013.3702%203.47843%2013.3702%203.71274%2013.1359L8.00007%208.84859L12.2874%2013.1359C12.5217%2013.3702%2012.9016%2013.3702%2013.1359%2013.1359C13.3702%2012.9016%2013.3702%2012.5217%2013.1359%2012.2874L8.84859%208.00007L13.1359%203.71274C13.3702%203.47843%2013.3702%203.09853%2013.1359%202.86421C12.9016%202.6299%2012.5217%202.6299%2012.2874%202.86421L8.00007%207.15154L3.71274%202.86421Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A`,warn2:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.25%202.5C7.25%202.08579%207.58579%201.75%208%201.75C8.41421%201.75%208.75%202.08579%208.75%202.5V10C8.75%2010.4142%208.41421%2010.75%208%2010.75C7.58579%2010.75%207.25%2010.4142%207.25%2010V2.5Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%2213.25%22%20r%3D%221%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,correct2:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%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%22M14.1544%203.75557C14.3887%203.98988%2014.3887%204.36978%2014.1544%204.6041L6.51409%2012.2444C6.40157%2012.3569%206.24896%2012.4201%206.08983%2012.4201C5.9307%2012.4201%205.77808%2012.3569%205.66556%2012.2444L1.84541%208.42425C1.6111%208.18993%201.6111%207.81003%201.84541%207.57572C2.07973%207.34141%202.45963%207.34141%202.69394%207.57572L6.08983%2010.9716L13.3059%203.75557C13.5402%203.52126%2013.9201%203.52126%2014.1544%203.75557Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`},flag:{"flag-green":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"cell-75":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"cell-100":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`}},we=function(e){return e.threeArrows=`3Arrows`,e.threeArrowsGray=`3ArrowsGray`,e.fourArrows=`4Arrows`,e.fourArrowsGray=`4ArrowsGray`,e.fiveArrows=`5Arrows`,e.fiveArrowsGray=`5ArrowsGray`,e.threeTriangles=`3Triangles`,e.threeTrafficLights1=`3TrafficLights1`,e.threeSigns=`3Signs`,e.threeTrafficLights2=`3TrafficLights2`,e.fourRedToBlack=`4RedToBlack`,e.fourTrafficLights=`4TrafficLights`,e.threeSymbols=`3Symbols`,e.threeSymbols2=`3Symbols2`,e.threeFlags=`3Flags`,e.fourRating=`4Rating`,e.fiveRating=`5Rating`,e.fiveQuarters=`5Quarters`,e.fiveFelling=`_5Felling`,e.fiveBoxes=`5Boxes`,e.threeStars=`3Stars`,e.empty=`EMPTY_ICON_TYPE`,e}({}),Te=[{title:`sheet.cf.iconSet.direction`,group:[{name:`3Arrows`,list:[X.arrow[`up-green`],X.arrow[`right-gold`],X.arrow[`down-red`]]},{name:`3ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`right-gray`],X.arrow[`down-gray`]]},{name:`4Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`4ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`5Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`right-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`5ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`right-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`3Triangles`,list:[X.shape.up,X.shape.cross,X.shape.down]}]},{title:`sheet.cf.iconSet.shape`,group:[{name:`3TrafficLights1`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`]]},{name:`3Signs`,list:[X.shape[`roundness-greed`],X.shape[`triangle-gold`],X.shape[`rhomboid-red`]]},{name:`3TrafficLights2`,list:[X.shape[`indicate-greed`],X.shape[`indicate-gold`],X.shape[`indicate-red`]]},{name:`4RedToBlack`,list:[X.shape[`roundness-red`],X.shape[`roundness-pink`],X.shape[`roundness-gray`],X.shape[`roundness-black`]]},{name:`4TrafficLights`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`],X.shape[`roundness-black`]]}]},{title:`sheet.cf.iconSet.mark`,group:[{name:`3Symbols`,list:[X.feedback.correct,X.feedback.warn,X.feedback.mistake]},{name:`3Symbols2`,list:[X.feedback2.correct2,X.feedback2.warn2,X.feedback2.mistake2]},{name:`3Flags`,list:[X.flag[`flag-green`],X.flag[`flag-gold`],X.flag[`flag-red`]]}]},{title:`sheet.cf.iconSet.rank`,group:[{name:`4Rating`,list:[X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Rating`,list:[X.signal.signal0,X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Quarters`,list:[X.progress.progress100,X.progress.progress75,X.progress.progress50,X.progress.progress25,X.progress.progress0]},{name:`_5Felling`,list:[X.feeling.guffaw,X.feeling.smile,X.feeling.noninductive,X.feeling.dissatisfied,X.feeling.impatient]},{name:`5Boxes`,list:[X.cell[`cell-100`],X.cell[`cell-75`],X.cell[`cell-50`],X.cell[`cell-25`],X.cell[`cell-0`]]},{name:`3Stars`,list:[X.star.starFull,X.star.starIncomplete,X.star.starEmpty]}]}],Z=Te.reduce((e,t)=>{let{group:n}=t;for(let t of n)e[t.name]=t.list;return e},{});for(let e in Z){let t=Z[e];Object.freeze(t)}var Ee=`@univerjs/sheets-conditional-formatting`,De=`0.23.0-insiders.20260523-10caf99`;let Oe=`ssheets-conditional-formatting.config`;Symbol(Oe);let ke={},Q=class extends t.Disposable{get _conditionalFormattingViewModelV2(){return this._injector.get(H)}_mergeComposeResult(e,n,r){let i=n.rule.type;if(i===`highlightCell`){r&&(0,t.merge)(e,{style:r});return}if(i===`colorScale`){r&&typeof r==`string`&&(e.style={...e.style||{},bg:{rgb:r}});return}if(i===`dataBar`){let t=r;t&&(e.dataBar=t,e.isShowValue=t.isShowValue);return}if(i===`iconSet`){let t=r;t&&(e.iconSet=t,e.isShowValue=t.isShowValue)}}constructor(e,t,n,r,i,a){super(),this._conditionalFormattingRuleModel=e,this._injector=t,this._univerInstanceService=n,this._resourceManagerService=r,this._sheetInterceptorService=i,this._commandService=a,this._initCellChange(),this._initSnapshot(),this._initSheetChange()}composeStyle(e,t,n,r){let i=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,r);if(!(i!=null&&i.length))return null;let a=[],o=-1;for(let n of i){let r=this._conditionalFormattingRuleModel.getRule(e,t,n.cfId);r&&(a.push({rule:r,cacheItem:n}),o===-1&&r.stopIfTrue&&this._isRuleMatched(r,n.result)&&(o=a.length-1))}if(!a.length)return null;let s=o>-1?a.slice(0,o+1):a,c={};for(let e=s.length-1;e>=0;e--){let{rule:t,cacheItem:n}=s[e];this._mergeComposeResult(c,t,n.result)}return c}_isRuleMatched(e,t){return e.rule.type===`highlightCell`?!!t&&typeof t==`object`&&Object.keys(t).length>0:!!t}_initSnapshot(){let e=e=>{let t=this._conditionalFormattingRuleModel.getUnitRules(e),n={};return t?(t.forEach((e,t)=>{n[t]=e}),JSON.stringify(n)):``},n=e=>{if(!e)return{};try{return JSON.parse(e)}catch{return{}}};this.disposeWithMe(this._resourceManagerService.registerPluginResource({pluginName:s,businesses:[t.UniverInstanceType.UNIVER_SHEET],toJson:t=>e(t),parseJson:e=>n(e),onUnLoad:e=>{this._conditionalFormattingRuleModel.deleteUnitId(e),!(0,t.isInternalEditorID)(e)&&this._conditionalFormattingViewModelV2.clearCache()},onLoad:(e,t)=>{Object.keys(t).forEach(n=>{[...t[n]].reverse().forEach(t=>{this._conditionalFormattingRuleModel.addRule(e,n,t)})})}}))}_initSheetChange(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:e=>{if(e.id===n.RemoveSheetCommand.id){let t=e.params,r=(0,n.getSheetCommandTarget)(this._univerInstanceService,t);if(!r)return{redos:[],undos:[]};let{unitId:i,subUnitId:a}=r,o=this._conditionalFormattingRuleModel.getSubunitRules(i,a);if(!o)return{redos:[],undos:[]};let s=[],c=[];return o.forEach(e=>{let t={unitId:i,subUnitId:a,cfId:e.cfId};s.push({id:k.id,params:t}),c.push(...O(this._injector,t))}),{redos:s,undos:c}}else if(e.id===n.CopySheetCommand.id){let t=e.params,r=(0,n.getSheetCommandTarget)(this._univerInstanceService,t);if(!r)return{redos:[],undos:[]};let{unitId:i,subUnitId:a}=r,{targetSubUnitId:o}=t,s=this._conditionalFormattingRuleModel.getSubunitRules(i,a);if(!s)return{redos:[],undos:[]};let c=[],l=[];return s.forEach(e=>{let t={unitId:i,subUnitId:o,rule:{...e,cfId:this._conditionalFormattingRuleModel.createCfId(i,o)}};c.push({id:j.id,params:t}),l.push(A(this._injector,t))}),{redos:c,undos:l}}return{redos:[],undos:[]}}}))}_initCellChange(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{let r=(e,t,n)=>{let r=new Set;n.forEach(([n,i])=>{let a=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,i);a==null||a.forEach(e=>r.add(e.cfId))});let i=[];for(let n of r){let r=this._conditionalFormattingRuleModel.getRule(e,t,n);r&&i.push(r)}return i};switch(e.id){case n.SetRangeValuesMutation.id:{let{subUnitId:n,unitId:i,cellValue:a}=e.params,o=[];new t.ObjectMatrix(a).forValue((e,t,n)=>{n&&Object.keys(n).some(e=>[`p`,`v`].includes(e))&&o.push([e,t])}),r(i,n,o).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,n,e.cfId)});break}case n.InsertColMutation.id:case n.RemoveColMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{range:c}=r,l={...c,endColumn:a.getColumnCount()-1},u=this._conditionalFormattingRuleModel.getSubunitRules(o,s);u&&u.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,l))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.RemoveRowMutation.id:case n.InsertRowMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{range:c}=r,l={...c,endRow:a.getRowCount()-1},u=this._conditionalFormattingRuleModel.getSubunitRules(o,s);u&&u.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,l))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveRowsMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{sourceRange:c,targetRange:l}=r,u={startRow:Math.min(c.startRow,l.startRow),endRow:a.getRowCount()-1,startColumn:0,endColumn:a.getColumnCount()-1},d=this._conditionalFormattingRuleModel.getSubunitRules(o,s);d&&d.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,u))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveColsMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{sourceRange:c,targetRange:l}=r,u={startRow:0,endRow:a.getRowCount()-1,startColumn:Math.min(c.startColumn,l.startColumn),endColumn:a.getColumnCount()-1},d=this._conditionalFormattingRuleModel.getSubunitRules(o,s);d&&d.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,u))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveRangeMutation.id:{let{unitId:n,to:i,from:a}=e.params,o=e=>{let i=[];new t.ObjectMatrix(e.value).forValue((e,t)=>{i.push([e,t])}),r(n,e.subUnitId,i).forEach(t=>{this._conditionalFormattingViewModelV2.markRuleDirty(n,e.subUnitId,t.cfId)})};o(i),o(a);break}case n.ReorderRangeMutation.id:{let{range:n,unitId:r,subUnitId:i}=e.params,a=this._conditionalFormattingRuleModel.getSubunitRules(r,i);a&&a.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,n))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(r,i,e.cfId)});break}}}))}};Q=I([F(0,(0,t.Inject)(E)),F(1,(0,t.Inject)(t.Injector)),F(2,(0,t.Inject)(t.IUniverInstanceService)),F(3,(0,t.Inject)(t.IResourceManagerService)),F(4,(0,t.Inject)(n.SheetInterceptorService)),F(5,(0,t.Inject)(t.ICommandService))],Q);let $=class extends t.Plugin{constructor(e=ke,n,r,i){super(),this._config=e,this._injector=n,this._commandService=r,this._configService=i;let{...a}=(0,t.merge)({},ke,this._config);this._configService.setConfig(Oe,a),[[Q],[L],[E],[H]].forEach(e=>{this._injector.add(e)}),[ne,re,ie,ae,P,oe,j,k,M,D].forEach(e=>{this._commandService.registerCommand(e)})}onStarting(){this._injector.get(Q),(0,t.touchDependencies)(this._injector,[[Q],[H]])}};T($,`pluginName`,s),T($,`packageName`,Ee),T($,`version`,De),T($,`type`,t.UniverInstanceType.UNIVER_SHEET),$=I([(0,t.DependentOn)(i.UniverFormulaEnginePlugin),F(1,(0,t.Inject)(t.Injector)),F(2,(0,t.Inject)(t.ICommandService)),F(3,t.IConfigService)],$);let Ae=`sheet-conditional-rule-icon`,je=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var Me=class extends o.SheetExtension{constructor(){super(),T(this,`_paddingRightAndLeft`,2),T(this,`_width`,15),T(this,`_imageMap`,new Map),T(this,`uKey`,Ae),T(this,`Z_INDEX`,35),T(this,`_radius`,1),this._init()}draw(e,n,r,i){let{worksheet:a}=r;if(!a)return!1;let o=new Set,s=i!=null&&i.length?i:[r.rowColumnSegment];e.save(),s.forEach(n=>{t.Range.foreach(n,(t,n)=>{if(!a.getRowVisible(t)||!a.getColVisible(n))return;let s=r.getCellWithCoordByIndex(t,n,!1),{isMerged:c,isMergedMainCell:l,mergeInfo:u}=s,d=a.getCell(t,n);if(c&&(d=a.getCell(u.startRow,u.startColumn)),!(d!=null&&d.iconSet))return;let{iconType:f,iconId:p}=d.iconSet;if(f===`EMPTY_ICON_TYPE`)return;let m=this._imageMap.get(this._createKey(f,p));if(!m||!this.isRenderDiffRangesByCell(u,i))return;if(c||l){let e=je(u);if(o.has(e))return;o.add(e)}let{startX:h,endX:g,startY:_,endY:v}=c||l?u:s,y=g-h,b=v-_;if(this._width>b||this._width>y+this._paddingRightAndLeft*2)return;let x=(b-this._width)/2+_;e.drawImage(m,h+this._paddingRightAndLeft,x,this._width,this._width)})}),e.restore()}_init(){for(let e in Z)Z[e].forEach((t,n)=>{let r=this._createKey(e,String(n)),i=new Image;i.onload=()=>{this._imageMap.set(r,i)},i.src=t})}_createKey(e,t){return`${e}_${t}`}};o.SpreadsheetExtensionRegistry.add(Me);function Ne(e){if(typeof e!=`object`||!e)return e;let t={};for(let n in e)if(e.hasOwnProperty(n)){let r=Ne(e[n]);r!==void 0&&(t[n]=r)}return t}e.AddCfCommand=ne,e.AddConditionalRuleMutation=j,e.AddConditionalRuleMutationUndoFactory=A,e.CFNumberOperator=u,e.CFRuleType=d,e.CFSubRuleType=f,e.CFTextOperator=c,e.CFTimePeriodOperator=l,e.CFValueType=p,e.CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH=V,e.ClearRangeCfCommand=re,e.ClearWorksheetCfCommand=ie,Object.defineProperty(e,`ConditionalFormattingFormulaService`,{enumerable:!0,get:function(){return L}}),e.ConditionalFormattingIcon=Me,e.ConditionalFormattingRuleModel=E,Object.defineProperty(e,`ConditionalFormattingService`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(e,`ConditionalFormattingViewModel`,{enumerable:!0,get:function(){return H}}),e.DEFAULT_BG_COLOR=`#fff`,e.DEFAULT_FONT_COLOR=`#000000`,e.DEFAULT_PADDING=2,e.DEFAULT_WIDTH=15,e.DataBar=de,e.DeleteCfCommand=ae,e.DeleteConditionalRuleMutation=k,e.DeleteConditionalRuleMutationUndoFactory=O,e.IIconSetType=we,e.IconUKey=Ae,e.MoveCfCommand=P,e.MoveConditionalRuleMutation=D,e.MoveConditionalRuleMutationUndoFactory=te,e.SHEET_CONDITIONAL_FORMATTING_PLUGIN=s,e.SetCfCommand=oe,e.SetConditionalRuleMutation=M,Object.defineProperty(e,`UniverSheetsConditionalFormattingPlugin`,{enumerable:!0,get:function(){return $}}),e.anchorUndoFactory=b,e.compareWithNumber=J,e.createCfId=S,e.createDefaultRule=m,e.createDefaultValue=h,e.createDefaultValueByValueType=g,e.dataBarUKey=ce,e.defaultDataBarNativeColor=`#abd91a`,e.defaultDataBarPositiveColor=`#ffbe38`,e.defaultPlaceholderColor=le,e.filterRange=Y,e.findIndexByAnchor=_,e.getCacheStyleMatrix=be,e.getCellValue=G,e.getColorScaleFromValue=Se,e.getMaxInFormulaResult=Ce,e.getOppositeOperator=xe,e.getValueByType=q,e.iconGroup=Te,e.iconMap=Z,e.isAnchorEqual=x,e.isFloatsEqual=U,e.isNullable=W,Object.defineProperty(e,`isRangesEqual`,{enumerable:!0,get:function(){return t.isRangesEqual}}),e.moveByAnchor=v,e.removeUndefinedAttr=Ne,e.serialTimeToTimestamp=ye,e.setConditionalRuleMutationUndoFactory=N,e.toYMD_1900=ve,e.transformSupportSymmetryAnchor=y});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@univerjs/core`),require(`@univerjs/sheets`),require(`rxjs`),require(`@univerjs/engine-formula`),require(`rxjs/operators`),require(`@univerjs/engine-render`)):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/core`,`@univerjs/sheets`,`rxjs`,`@univerjs/engine-formula`,`rxjs/operators`,`@univerjs/engine-render`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverSheetsConditionalFormatting={},e.UniverCore,e.UniverSheets,e.rxjs,e.UniverEngineFormula,e.rxjs.operators,e.UniverEngineRender))})(this,function(e,t,n,r,i,a,o){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let s=`SHEET_CONDITIONAL_FORMATTING_PLUGIN`,c=function(e){return e.beginsWith=`beginsWith`,e.endsWith=`endsWith`,e.containsText=`containsText`,e.notContainsText=`notContainsText`,e.equal=`equal`,e.notEqual=`notEqual`,e.containsBlanks=`containsBlanks`,e.notContainsBlanks=`notContainsBlanks`,e.containsErrors=`containsErrors`,e.notContainsErrors=`notContainsErrors`,e}({}),l=function(e){return e.today=`today`,e.yesterday=`yesterday`,e.tomorrow=`tomorrow`,e.last7Days=`last7Days`,e.thisMonth=`thisMonth`,e.lastMonth=`lastMonth`,e.nextMonth=`nextMonth`,e.thisWeek=`thisWeek`,e.lastWeek=`lastWeek`,e.nextWeek=`nextWeek`,e}({}),u=function(e){return e.greaterThan=`greaterThan`,e.greaterThanOrEqual=`greaterThanOrEqual`,e.lessThan=`lessThan`,e.lessThanOrEqual=`lessThanOrEqual`,e.notBetween=`notBetween`,e.between=`between`,e.equal=`equal`,e.notEqual=`notEqual`,e}({}),d=function(e){return e.highlightCell=`highlightCell`,e.dataBar=`dataBar`,e.colorScale=`colorScale`,e.iconSet=`iconSet`,e}({}),f=function(e){return e.uniqueValues=`uniqueValues`,e.duplicateValues=`duplicateValues`,e.rank=`rank`,e.text=`text`,e.timePeriod=`timePeriod`,e.number=`number`,e.average=`average`,e.formula=`formula`,e}({}),p=function(e){return e.num=`num`,e.min=`min`,e.max=`max`,e.percent=`percent`,e.percentile=`percentile`,e.formula=`formula`,e}({}),m=()=>({cfId:void 0,ranges:[],stopIfTrue:!1,rule:{type:`highlightCell`,subType:`text`,operator:`containsText`}}),h=(e,t)=>{switch(e){case`text`:if([`beginsWith`,`containsText`,`endsWith`,`equal`,`notContainsText`,`notEqual`].includes(t))return``;break;case`number`:return[`between`,`notBetween`].includes(t)?[10,100]:10}return``},g=(e,t)=>{switch(e){case`formula`:return`=`;case`max`:case`min`:return``;case`percent`:case`percentile`:case`num`:return t===void 0?10:t}return``},_=(e,t,n)=>{if(!t)return null;let r=t.findIndex(t=>n(t)===e.id);if(r<0)return null;switch(e.type){case`after`:return r+1;case`before`:return r-1;case`self`:return r}},v=(e,t,n,r)=>{if(!n)return null;let i=_(e,n,r),a=_(t,n,r);if(i===null||a===null||i===a)return;let o=n.splice(i,1)[0];switch(i<a&&(a=_(t,n,r)),t.type){case`before`:n.splice(a+1,0,o);break;case`self`:case`after`:n.splice(a,0,o);break}},y=(e,t,n,r)=>{if(e.type===`after`&&[`after`,`before`].includes(t.type))return[e,t];let i={...e},a={...t};if(i.type!==`after`){let e=_(i,n,r);if(e===null)return null;if(e-1<0){let t=n[e+1];if(t)i.id=r(t),i.type=`before`;else return null}else i.id=r(n[e-1]),i.type=`after`}if(![`after`,`before`].includes(a.type)){let e=_(a,n,r);if(e===null)return null;if(e===0)a.type=`before`;else if(e-1>=0)a.id=r(n[e-1]),a.type=`after`;else if(e+1<=n.length-1)a.id=r(n[e+1]),a.type=`before`;else return null}return i.id===a.id&&i.type===a.type?null:[i,a]},b=(e,t)=>{if([`after`,`before`].includes(t.type)){if(e.type===`after`)return[t,e];if(e.type===`before`)return[t,{...e,type:`self`}]}return null},x=(e,t)=>e.id===t.id&&e.type===t.type,S=()=>`${(0,t.generateRandomId)(8)}`;function C(e){"@babel/helpers - typeof";return C=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C(e)}function w(e,t){if(C(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ee(e){var t=w(e,`string`);return C(t)==`symbol`?t:t+``}function T(e,t,n){return(t=ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=class{constructor(){T(this,`_model`,new Map),T(this,`_ruleChange$`,new r.Subject),T(this,`$ruleChange`,this._ruleChange$.asObservable())}_ensureList(e,t){let n=this.getSubunitRules(e,t);if(!n){n=[];let r=this._model.get(e);r||(r=new Map,this._model.set(e,r)),r.set(t,n)}return n}getRule(e,t,n){let r=this.getSubunitRules(e,t);return r?r.find(e=>e.cfId===n):null}getUnitRules(e){return this._model.get(e)||null}getSubunitRules(e,t){var n;return((n=this._model.get(e))==null?void 0:n.get(t))||null}getAll(){return this._model}deleteRule(e,t,n){let r=this.getSubunitRules(e,t);if(r){let i=r.findIndex(e=>e.cfId===n),a=r[i];a&&(r.splice(i,1),this._ruleChange$.next({rule:a,subUnitId:t,unitId:e,type:`delete`}))}}setRule(e,n,r,i){let a=this._ensureList(e,n).find(e=>e.cfId===i);if(a){let i=t.Tools.deepClone(a);Object.assign(a,r),this._ruleChange$.next({rule:a,subUnitId:n,unitId:e,type:`set`,oldRule:i})}}addRule(e,t,n){let r=this._ensureList(e,t);r.find(e=>e.cfId===n.cfId)||r.unshift(n),this._ruleChange$.next({rule:n,subUnitId:t,unitId:e,type:`add`})}moveRulePriority(e,t,n,r){let i=this._ensureList(e,t),a=_(n,i,e=>e.cfId),o=_(r,i,e=>e.cfId);if(o===null||a===null||o===a)return;let s=i[a];s&&(v(n,r,i,e=>e.cfId),this._ruleChange$.next({rule:s,subUnitId:t,unitId:e,type:`sort`}))}createCfId(e,t){return S()}deleteUnitId(e){this._model.delete(e)}};let D={type:t.CommandType.MUTATION,id:`sheet.mutation.move-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,start:i,end:a}=t;return e.get(E).moveRulePriority(n,r,i,a),!0}},te=e=>{let{unitId:t,subUnitId:n}=e,r=b(e.start,e.end);if(!r)return[];let[i,a]=r;return[{id:D.id,params:{unitId:t,subUnitId:n,start:i,end:a}}]},O=(e,n)=>{let r=e.get(E),{unitId:i,subUnitId:a,cfId:o}=n,s=[...r.getSubunitRules(i,a)||[]],c=s.findIndex(e=>e.cfId===o),l=s[c-1];if(c>-1){let e=s[c],n=[{id:j.id,params:{unitId:i,subUnitId:a,rule:t.Tools.deepClone(e)}}];if(s.splice(c,1),c!==0){let e=s[0];if(e){let t=y({id:e.cfId,type:`before`},{id:l.cfId,type:`after`},s,e=>e.cfId);if(!t)return n;let[r,o]=t,c={unitId:i,subUnitId:a,start:r,end:o};n.push({id:D.id,params:c})}}return n}return[]},k={type:t.CommandType.MUTATION,id:`sheet.mutation.delete-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,cfId:i}=t;return e.get(E).deleteRule(n,r,i),!0}},A=(e,t)=>({id:k.id,params:{unitId:t.unitId,subUnitId:t.subUnitId,cfId:t.rule.cfId}}),j={type:t.CommandType.MUTATION,id:`sheet.mutation.add-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t;return e.get(E).addRule(n,r,i),!0}},ne={type:t.CommandType.COMMAND,id:`sheet.command.add-conditional-rule`,handler(e,r){if(!r)return!1;let{rule:i}=r,a=e.get(t.IUndoRedoService),o=e.get(t.ICommandService),s=e.get(E),c=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=s.createCfId(l,u),f={unitId:l,subUnitId:u,rule:{...i,cfId:i.cfId||d}},p=A(e,f),m=o.syncExecuteCommand(j.id,f);return m&&a.pushUndoRedo({unitID:l,redoMutations:[{id:j.id,params:f}],undoMutations:[p]}),m}},M={type:t.CommandType.MUTATION,id:`sheet.mutation.set-conditional-rule`,handler(e,t){if(!t)return!1;let{unitId:n,subUnitId:r,rule:i}=t,a=t.cfId||t.rule.cfId;return e.get(E).setRule(n,r,i,a),!0}},N=(e,n)=>{let r=e.get(E),{unitId:i,subUnitId:a}=n,o=n.cfId||n.rule.cfId,s=r.getRule(i,a,o);return s?[{id:M.id,params:{unitId:i,subUnitId:a,cfId:o,rule:t.Tools.deepClone(s)}}]:[]},re={type:t.CommandType.COMMAND,id:`sheet.command.clear-range-conditional-rule`,handler(e,r){var i;if(!r)return!1;let a=e.get(E),o=e.get(t.IUniverInstanceService),s=e.get(t.ICommandService),c=e.get(t.IUndoRedoService),l=e.get(n.SheetsSelectionsService),u=(0,n.getSheetCommandTarget)(o,r);if(!u)return!1;let{unitId:d,subUnitId:f}=u,p=((i=l.getCurrentSelections())==null?void 0:i.map(e=>e.range))||[],m=a.getSubunitRules(d,f);if(!(m!=null&&m.length)||!p.length)return!1;let h=[],g=[];m.forEach(r=>{let i=new t.ObjectMatrix;r.ranges.forEach(e=>{t.Range.foreach(e,(e,t)=>{i.setValue(e,t,1)})}),p.forEach(e=>{t.Range.foreach(e,(e,t)=>{i.realDeleteValue(e,t)})});let a=(0,n.findAllRectangle)((0,n.createTopMatrixFromMatrix)(i));if(a.length){let t={unitId:d,subUnitId:f,rule:{...r,ranges:a}},n=N(e,t);h.push({id:M.id,params:t}),g.push(...n)}else{let t={unitId:d,subUnitId:f,cfId:r.cfId},n=O(e,t);h.push({id:k.id,params:t}),g.push(...n)}});let _=(0,t.sequenceExecute)(h,s).result;return _&&c.pushUndoRedo({unitID:d,redoMutations:h,undoMutations:g}),_}},ie={type:t.CommandType.COMMAND,id:`sheet.command.clear-worksheet-conditional-rule`,handler(e,r){let i=e.get(E),a=e.get(t.IUniverInstanceService),o=e.get(t.ICommandService),s=e.get(t.IUndoRedoService),c=(0,n.getSheetCommandTarget)(a,r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=i.getSubunitRules(l,u);if(!(d!=null&&d.length))return!1;let f=d.map(e=>({cfId:e.cfId,unitId:l,subUnitId:u})),p=f.map(e=>({id:k.id,params:e})),m=f.map(t=>O(e,t)[0]),h=(0,t.sequenceExecute)(p,o).result;return h&&s.pushUndoRedo({unitID:l,redoMutations:p,undoMutations:m}),h}},ae={type:t.CommandType.COMMAND,id:`sheet.command.delete-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!o)return!1;let{unitId:s,subUnitId:c}=o,l={unitId:s,subUnitId:c,cfId:r.cfId},u=O(e,l),d=a.syncExecuteCommand(k.id,l);return d&&i.pushUndoRedo({unitID:s,undoMutations:u,redoMutations:[{id:k.id,params:l}]}),d}},P={type:t.CommandType.COMMAND,id:`sheet.command.move-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=e.get(t.IUniverInstanceService),s=e.get(E),c=(0,n.getSheetCommandTarget)(o,r);if(!c)return!1;let{unitId:l,subUnitId:u}=c,d=y(r.start,r.end,s.getSubunitRules(l,u)||[],e=>e.cfId);if(!d)return!1;let[f,p]=d,m={unitId:l,subUnitId:u,start:f,end:p},h=te(m),g=a.syncExecuteCommand(D.id,m);return g&&i.pushUndoRedo({unitID:l,redoMutations:[{id:D.id,params:m}],undoMutations:h}),g}},oe={type:t.CommandType.COMMAND,id:`sheet.command.set-conditional-rule`,handler(e,r){if(!r)return!1;let i=e.get(t.IUndoRedoService),a=e.get(t.ICommandService),o=(0,n.getSheetCommandTarget)(e.get(t.IUniverInstanceService),r);if(!o)return!1;let{unitId:s,subUnitId:c}=o,l={unitId:s,subUnitId:c,rule:r.rule,cfId:r.cfId},u=N(e,l),d=a.syncExecuteCommand(M.id,l);return d&&i.pushUndoRedo({unitID:s,undoMutations:u,redoMutations:[{id:M.id,params:l}]}),d}};function F(e,t){return function(n,r){t(n,r,e)}}function I(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let L=class extends t.Disposable{constructor(e,t){super(),this._registerOtherFormulaService=e,this._conditionalFormattingRuleModel=t,T(this,`_formulaMap`,new Map),T(this,`_result$`,new r.Subject),T(this,`result$`,this._result$.asObservable()),this._initFormulaResultChange(),this._initRuleChange()}_initRuleChange(){let e=e=>{switch(e.type){case`colorScale`:return e.config.some(e=>e.value.type===`formula`);case`dataBar`:return[e.config.max,e.config.min].some(e=>e.type===`formula`);case`iconSet`:return e.config.some(e=>e.value.type===`formula`)}};this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(t=>{let{unitId:n,subUnitId:r,rule:i,oldRule:a}=t;t.type===`delete`&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`set`&&(e(i.rule)||a&&e(a.rule))&&this._removeFormulaByCfId(n,r,i.cfId),t.type===`add`&&this._registerRuleFormulas(n,r,i)}))}_registerRuleFormulas(e,t,n){switch(n.rule.type){case`highlightCell`:if(n.rule.subType===`formula`){let r=n.rule.value;r&&this.registerFormulaWithRange(e,t,n.cfId,r,n.ranges)}break}}_initFormulaResultChange(){this.disposeWithMe(this._registerOtherFormulaService.formulaResult$.subscribe(e=>{for(let t in e)for(let n in e[t]){let r=e[t][n];for(let e of r){let r=this._ensureSubunitFormulaMap(t,n).getValue(e.formulaId,[`formulaId`]);if(!r)continue;let a=this._getAllFormulaResultByCfId(t,n,r.cfId).every(e=>{let r=this._registerOtherFormulaService.getFormulaValueSync(t,n,e.formulaId);return(r==null?void 0:r.status)===i.FormulaResultStatus.SUCCESS});this._result$.next({...r,isAllFinished:a})}}}))}_ensureSubunitFormulaMap(e,n){let r=this._formulaMap.get(e);r||(r=new Map,this._formulaMap.set(e,r));let i=r.get(n);return i||(i=new t.RefAlias([],[`formulaId`,`id`]),r.set(n,i)),i}getSubUnitFormulaMap(e,t){var n;return(n=this._formulaMap.get(e))==null?void 0:n.get(t)}registerFormulaWithRange(e,t,n,r,a=[{startRow:0,endRow:0,startColumn:0,endColumn:0}]){let o=this._ensureSubunitFormulaMap(e,t),s=this.createCFormulaId(n,r);if(o.getValue(s,[`id`]))return;let c=[...a].sort((e,t)=>e.startRow===t.startRow?e.startColumn-t.startColumn:e.startRow-t.startRow),l=this._registerOtherFormulaService.registerFormulaWithRange(e,t,r,c,void 0,i.OtherFormulaBizType.CONDITIONAL_FORMATTING,n);o.addValue({formulaText:r,unitId:e,subUnitId:t,cfId:n,id:s,formulaId:l})}_removeFormulaByCfId(e,t,n){let r=this.deleteCache(e,t,n).map(e=>e.formulaId);this._registerOtherFormulaService.deleteFormula(e,t,r)}getFormulaResultWithCoords(e,t,n,r,a=0,o=0){let s=this.getSubUnitFormulaMap(e,t);if(!s)return{status:i.FormulaResultStatus.NOT_REGISTER};let c=s.getValue(this.createCFormulaId(n,r),[`id`]);if(!c)return{status:i.FormulaResultStatus.NOT_REGISTER};let l=this._registerOtherFormulaService.getFormulaValueSync(e,t,c.formulaId);if(!l)return{status:i.FormulaResultStatus.NOT_REGISTER};if(l.status===i.FormulaResultStatus.SUCCESS&&l.result){var u;let e=(u=l.result[a])==null?void 0:u[o];return{result:this._getCellValue(e),status:i.FormulaResultStatus.SUCCESS}}return{status:l.status}}getFormulaMatrix(e,n,r,a){let o=this.getSubUnitFormulaMap(e,n);if(!o)return{status:i.FormulaResultStatus.NOT_REGISTER};let s=o.getValue(this.createCFormulaId(r,a),[`id`]);if(!s)return{status:i.FormulaResultStatus.NOT_REGISTER};let c=this._registerOtherFormulaService.getFormulaValueSync(e,n,s.formulaId);if(!c)return{status:i.FormulaResultStatus.NOT_REGISTER};if(c.status===i.FormulaResultStatus.SUCCESS&&c.result){let e=new t.ObjectMatrix;return new t.ObjectMatrix(c.result).forValue((t,n,r)=>{e.setValue(t,n,this._getCellValue(r))}),{result:e,status:i.FormulaResultStatus.SUCCESS}}return{status:c.status}}_getCellValue(e){if(!e||!e[0]||!e[0][0])return!1;let n=e[0][0];return(n==null?void 0:n.t)===t.CellValueType.BOOLEAN?n.v===t.BooleanNumber.TRUE||n.v===!0:n==null?void 0:n.v}deleteCache(e,t,n,r){let i=this.getSubUnitFormulaMap(e,t);if(!i)return[];if(r){let e=this.createCFormulaId(n,r);return i.deleteValue(e,[`id`]),[]}else{let e=i.getValues().filter(e=>e.cfId===n);return e.forEach(e=>{i.deleteValue(e.formulaId,[`formulaId`])}),e}}_getAllFormulaResultByCfId(e,t,n){let r=this.getSubUnitFormulaMap(e,t);return r?r.getValues().filter(e=>e.cfId===n):[]}createCFormulaId(e,t){return`${e}_${t}`}};L=I([F(0,(0,t.Inject)(i.RegisterOtherFormulaService)),F(1,(0,t.Inject)(E))],L);var R=class{constructor(e){this._context=e,T(this,`_cache`,void 0),T(this,`_preComputingStatus$`,new r.BehaviorSubject(`preComputingStart`)),T(this,`preComputingStatus$`,this._preComputingStatus$.asObservable().pipe((0,a.distinctUntilChanged)())),T(this,`_preComputingCache`,void 0),T(this,`_rule`,void 0),this._cache=new t.LRUMap(e.limit),this._rule=e.rule,this._preComputingCache=null,this._initClearCacheListener()}setCacheLength(e){this._cache.limit=e}clearCache(){this._cache.clear()}resetPreComputingCache(){this._preComputingStatus$.next(`preComputingStart`),this._preComputingCache=null}updateRule(e){this._rule=e,this.resetPreComputingCache()}getCell(e,t){let n=this._createKey(e,t);if(this._preComputingStatus$.getValue()===`preComputing`)return this._cache.get(n);let r=this.getPreComputingResult(e,t);if(r===null&&(this._preComputingStatus$.next(`preComputingStart`),this.preComputing(e,t,this._getContext()),r=this.getPreComputingResult(e,t),r===null)||(this._preComputingStatus$.next(`preComputingEnd`),this._cache.has(n)))return this._cache.get(n);let i=this.getCellResult(e,t,r,this._getContext());return i!==null&&this._setCache(e,t,i),i}setPreComputingCache(e){this._preComputingCache=e}getPreComputingResult(e,t){return this._preComputingCache}_createKey(e,t){return`${e}_${t}`}_setCache(e,t,n){let r=this._createKey(e,t);this._cache.set(r,n)}_getContext(){return{...this._context,rule:this._rule}}_initClearCacheListener(){this.preComputingStatus$.subscribe(e=>{e===`preComputingEnd`&&this.clearCache()})}},se=class extends R{preComputing(e,n,r){let a=r.rule,s=r.worksheet,c=new t.ObjectMatrix;a.rule.config.every(e=>e.value.type===`num`)||Y(a.ranges,s.getMaxRows()-1,s.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&c.setValue(e,n,t)}})});let l=[...a.rule.config].sort((e,t)=>e.index-t.index).map(e=>({value:q(e.value,c,{...r,cfId:a.cfId}),color:new t.ColorKit(e.color)}));if(!l.some(e=>(0,o.isObject)(e.value)?e.value.status!==i.FormulaResultStatus.SUCCESS:!1)){let e=l.map(e=>e.color).reduce((e,t,n)=>(e.result.push({color:t,value:e.sortValue[n]}),e),{result:[],sortValue:l.map(e=>e.value.result).sort((e,t)=>e-t)}).result;this.setPreComputingCache(e),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,n,r,i){if(!r)return null;let a=i.getCellValue(e,n);if(a.t===t.CellValueType.NUMBER){let e=Number(a.v);if(!Number.isNaN(e))return Se(r,e)}}};let ce=`sheet-conditional-rule-data-bar`,le=`#000`,ue=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var de=class extends o.SheetExtension{constructor(...e){super(...e),T(this,`_paddingRightAndLeft`,2),T(this,`_paddingTopAndBottom`,2),T(this,`uKey`,ce),T(this,`Z_INDEX`,34),T(this,`_radius`,1)}draw(e,n,r,i){let{worksheet:a}=r;if(!a)return!1;let s=new Set,c=i!=null&&i.length?i:[r.rowColumnSegment];e.save(),c.forEach(n=>{t.Range.foreach(n,(t,n)=>{if(!a.getRowVisible(t)||!a.getColVisible(n))return;let c=r.getCellWithCoordByIndex(t,n,!1),{isMerged:l,isMergedMainCell:u,mergeInfo:d}=c,f=a.getCell(t,n);if(l&&(f=a.getCell(d.startRow,d.startColumn)),!(f!=null&&f.dataBar)||!this.isRenderDiffRangesByCell(d,i))return;if(l||u){let e=ue(d);if(s.has(e))return;s.add(e)}let{color:p,value:m,startPoint:h,isGradient:g}=f.dataBar,{startX:_,endX:v,startY:y,endY:b}=l||u?d:c,x=v-_,S=b+o.FIX_ONE_PIXEL_BLUR_OFFSET-y,C=x-this._paddingRightAndLeft*2,w=S-this._paddingTopAndBottom*2;if(m>0){let t=Math.max(C*(1-h/100)*m/100,1),n=_+this._paddingRightAndLeft+h/100*C,r=y+this._paddingTopAndBottom;if(g){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,p),i.addColorStop(1,`rgb(255 255 255)`),e.fillStyle=i,e.strokeStyle=p,e.lineWidth=1}else e.fillStyle=p;this._drawRectWithRoundedCorner(e,n,r,t,w,!1,!0,!0,!1),g&&e.stroke()}else{let t=Math.max(C*h/100*Math.abs(m)/100,1),n=_+this._paddingRightAndLeft+h/100*C-t,r=y+this._paddingTopAndBottom;if(g){let i=e.createLinearGradient(n,r,n+t,r);i.addColorStop(0,`rgb(255 255 255)`),i.addColorStop(1,p),e.fillStyle=i,e.strokeStyle=p,e.lineWidth=1}else e.fillStyle=p;this._drawRectWithRoundedCorner(e,n,r,t,w,!0,!1,!1,!0),g&&e.stroke()}})}),e.restore()}_drawRectWithRoundedCorner(e,t,n,r,i,a,o,s,c){let l=this._radius;!i||!r||(e.beginPath(),e.moveTo(t+l,n),e.lineTo(t+r-l,n),o?e.arcTo(t+r,n,t+r,n+l,l):e.lineTo(t+r,n),e.lineTo(t+r,n+i-l),s?e.arcTo(t+r,n+i,t+r-l,n+i,l):e.lineTo(t+r,n+i),e.lineTo(t+l,n+i),c?e.arcTo(t,n+i,t,n+i-l,l):e.lineTo(t,n+i),e.lineTo(t,n+l),a?e.arcTo(t,n,t+l,n,l):e.lineTo(t,n),e.closePath(),e.fill())}};o.SpreadsheetExtensionRegistry.add(de);let z=e=>Math.max(Math.min(100,e),0),fe=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.CellValueType.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var pe=class extends R{preComputing(e,n,r){let a=r.rule,o=a.rule,s=r.worksheet,c=new t.ObjectMatrix;[a.rule.config.max,a.rule.config.min].every(e=>e.type===`num`)||Y(a.ranges,s.getMaxRows()-1,s.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&c.setValue(e,n,t)}})});let l=q(o.config.min,c,{...r,cfId:a.cfId}),u=q(o.config.max,c,{...r,cfId:a.cfId}),d=0,f=0;if(l.status===i.FormulaResultStatus.SUCCESS){let e=Number(l.result);d=Number.isNaN(e)?0:e}else{this._preComputingStatus$.next(`preComputing`);return}if(u.status===i.FormulaResultStatus.SUCCESS){let e=Number(u.result),t=Number.isNaN(e)?0:e;f=Math.max(t,d),d=Math.min(t,d);let n=50;if(d<0&&f<=0)n=100;else if(d<0&&f>0){let e=Math.abs(f)+Math.abs(d);n=Math.abs(d)/e*100}else d>=0&&f>0&&(n=0);this.setPreComputingCache({min:d,max:f,startPoint:n}),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,t,n,r){let{min:i,max:a,startPoint:o}=n,s=r.rule.rule,c=s.isShowValue,l=s.config.isGradient,u=fe(e,t,r.getCellValue);if(!(u===null||u<i||i===a||a<i)){if(u===0)return{color:le,startPoint:o,value:0,isGradient:l,isShowValue:c};if(i<0&&a<=0){let e=a-i,t=z((a-u)/e*100);return t===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-t,isGradient:l,isShowValue:c}}else if(i<0&&a>0)if(u>0){let e=z(Math.min(u/a,1)*100);return e===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:o,value:e,isGradient:l,isShowValue:c}}else{let e=z(Math.min(Math.abs(u)/Math.abs(i),1)*100);return e===0?void 0:{color:s.config.nativeColor||`#abd91a`,startPoint:o,value:-e,isGradient:l,isShowValue:c}}else if(i>=0&&a>0){let e=a-i,t=z((1-(a-u)/e)*100);return t===0?void 0:{color:s.config.positiveColor||`#ffbe38`,startPoint:0,value:t,isGradient:l,isShowValue:c}}}}};let B=e=>e===!0||e===1||e===`TRUE`,me=e=>[...e].sort((e,t)=>e.startRow===t.startRow?e.startColumn-t.startColumn:e.startRow-t.startRow);var he=class extends R{preComputing(e,n,r){let a=r.rule.rule,o=Y(r.rule.ranges,r.worksheet.getMaxRows()-1,r.worksheet.getMaxColumns()-1),s=(()=>{switch(a.subType){case`average`:{let e=0,n=0;return o.forEach(i=>{t.Range.foreach(i,(i,a)=>{let o=r.getCellValue(i,a),s=G(o);o&&o.t===t.CellValueType.NUMBER&&!W(s)&&(e+=Number(s)||0,n++)})}),{value:e/n,type:a.subType}}case`uniqueValues`:case`duplicateValues`:{let e=new Map;return o.forEach(n=>{t.Range.foreach(n,(t,n)=>{let i=G(r.getCellValue(t,n));if(!W(i)){let t=e.get(i);t?e.set(i,t+1):e.set(i,1)}})}),{value:e,type:a.subType}}case`rank`:{let e=[];o.forEach(n=>{t.Range.foreach(n,(n,i)=>{let a=r.getCellValue(n,i),o=G(a);a&&a.t===t.CellValueType.NUMBER&&!W(o)&&e.push(Number(o)||0)})}),e.sort((e,t)=>t-e);let n=r.rule.rule;if(n.isPercent){n.isBottom&&(e=e.toReversed());let r=t.Tools.clamp(n.value,0,100)/100,i=Math.floor(r*e.length),o=t.Tools.clamp(i-1,0,e.length-1);return{value:e[o],type:a.subType}}let i=Math.floor(t.Tools.clamp(n.isBottom?n.value-1:n.value,0,e.length));return n.isBottom?{value:e[e.length-i-1],type:a.subType}:{value:e[Math.max(i-1,0)],type:a.subType}}case`formula`:{let e=a,t=r.accessor.get(L),n=me(r.rule.ranges);t.registerFormulaWithRange(r.unitId,r.subUnitId,r.rule.cfId,e.value,n);let o=t.getFormulaMatrix(r.unitId,r.subUnitId,r.rule.cfId,e.value);return o&&o.status===i.FormulaResultStatus.SUCCESS?(this._preComputingStatus$.next(`preComputingEnd`),{value:o.result,type:a.subType}):(this._preComputingStatus$.next(`preComputing`),null)}case`timePeriod`:switch(a.operator){case`last7Days`:return{value:{start:(0,t.dateKit)().subtract(7,`day`).valueOf(),end:(0,t.dateKit)().valueOf()},type:a.subType};case`lastMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).subtract(1,`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).subtract(1,`month`).valueOf()},type:a.subType};case`lastWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).subtract(1,`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).subtract(1,`week`).valueOf()},type:a.subType};case`nextMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).add(1,`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).add(1,`month`).valueOf()},type:a.subType};case`nextWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).add(1,`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).add(1,`week`).valueOf()},type:a.subType};case`thisMonth`:return{value:{start:(0,t.dateKit)().startOf(`month`).valueOf(),end:(0,t.dateKit)().endOf(`month`).valueOf()},type:a.subType};case`thisWeek`:return{value:{start:(0,t.dateKit)().startOf(`week`).valueOf(),end:(0,t.dateKit)().endOf(`week`).valueOf()},type:a.subType};case`today`:return{value:{start:(0,t.dateKit)().startOf(`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).valueOf()},type:a.subType};case`tomorrow`:return{value:{start:(0,t.dateKit)().startOf(`day`).add(1,`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).add(1,`day`).valueOf()},type:a.subType};case`yesterday`:return{value:{start:(0,t.dateKit)().startOf(`day`).subtract(1,`day`).valueOf(),end:(0,t.dateKit)().endOf(`day`).subtract(1,`day`).valueOf()},type:a.subType}}}})();this.setPreComputingCache(s)}getCellResult(e,n,r,a){let o=a.getCellValue(e,n),s=a.rule.rule;return(()=>{switch(s.subType){case`number`:{let e=o&&Number(o.v),n=(o==null?void 0:o.t)===t.CellValueType.NUMBER,r=s;return n?W(e)||Number.isNaN(e)?void 0:J({operator:r.operator,value:r.value||0},e||0):!![`notEqual`,`notBetween`].includes(r.operator)}case`text`:{let e=s,t=G(o),n=W(t)?``:String(t),r=e.value||``;switch(e.operator){case`beginsWith`:return n.startsWith(r);case`containsBlanks`:return/^\s*$/.test(n);case`notContainsBlanks`:return!/^\s*$/.test(n);case`containsErrors`:return i.ERROR_TYPE_SET.has(n);case`notContainsErrors`:return!i.ERROR_TYPE_SET.has(n);case`containsText`:return n.indexOf(r)>-1;case`notContainsText`:return n.indexOf(r)===-1;case`endsWith`:return n.endsWith(r);case`equal`:return n===r;case`notEqual`:return n!==r;default:return!1}}case`timePeriod`:{let e=G(o);if(W(e)||Number.isNaN(Number(e))||(o==null?void 0:o.t)!==t.CellValueType.NUMBER||!r)return;let n=ye(Number(e)),{start:i,end:a}=r.value;return n>=i&&n<=a}case`average`:{let e=o&&o.v,n=Number(e),i=(o==null?void 0:o.t)===t.CellValueType.NUMBER,a=s;if(!i)return a.operator===`notEqual`;if(W(e)||Number.isNaN(n)||!r)return!1;let c=r.value;switch(a.operator){case`greaterThan`:return n>c;case`greaterThanOrEqual`:return n>=c;case`lessThan`:return n<c;case`lessThanOrEqual`:return n<=c;case`equal`:return U(n,c);case`notEqual`:return!U(n,c);default:return!1}}case`rank`:{let e=G(o),n=Number(e);if(W(e)||Number.isNaN(n)||(o==null?void 0:o.t)!==t.CellValueType.NUMBER||!r)return!1;let i=r.value;return s.isBottom?n<=i:n>=i}case`uniqueValues`:{let e=G(o);return W(e)||!r?!1:r.value.get(e)===1}case`duplicateValues`:{let e=G(o);if(W(e)||!r)return!1;let t=r.value.get(e);return t&&t!==1}case`formula`:{let t=s,o=a.accessor.get(L),c=me(a.rule.ranges)[0],l=e-c.startRow,u=n-c.startColumn,d=o.getFormulaResultWithCoords(a.unitId,a.subUnitId,a.rule.cfId,t.value,l,u);if(d.status===i.FormulaResultStatus.SUCCESS&&d.result!==void 0)return B(d.result);let f=r==null?void 0:r.value;return f?B(f.getValue(l,u)):!1}}})()?s.style:{}}};let ge=(e,n,r)=>{let i=r(e,n);if(i&&i.t===t.CellValueType.NUMBER){let e=Number(i.v);return Number.isNaN(e)?null:e}return null};var _e=class extends R{preComputing(e,n,r){let a=r.rule.rule,o=r.worksheet,s=new t.ObjectMatrix;a.config.every(e=>e.value.type===`num`)||Y(r.rule.ranges,o.getMaxRows()-1,o.getMaxColumns()-1).forEach(e=>{t.Range.foreach(e,(e,n)=>{let i=r.getCellValue(e,n),a=i&&i.v;if(!W(a)&&(i==null?void 0:i.t)===t.CellValueType.NUMBER){let t=Number(a);!Number.isNaN(t)&&s.setValue(e,n,t)}})});let c=a.config.map(e=>q(e.value,s,{...r,cfId:r.rule.cfId}));if(!c.some(e=>e.status!==i.FormulaResultStatus.SUCCESS)){let e=c.map((e,t)=>({operator:a.config[t].operator,value:Number(e.result)||0})).reduce((e,t,n,r)=>{let i=a.config[n];if(!n||n===r.length-1)e.push({...t,iconId:i.iconId,iconType:i.iconType});else{let a=r[n-1];J(a,t.value)||e.push({...t,iconId:i.iconId,iconType:i.iconType})}return e},[]);this.setPreComputingCache(e),this._preComputingStatus$.next(`preComputingEnd`);return}this._preComputingStatus$.next(`preComputing`)}getCellResult(e,t,n,r){if(!n)return null;let i=ge(e,t,r.getCellValue);if(i===null)return;let a=r.rule.rule,o=a.isShowValue===void 0?!0:!!a.isShowValue;for(let e=0;e<n.length;e++){let t=n[e],r={...t},a={...t},{iconId:s,iconType:c}=t;if(e===0){if(J(t,i))return{iconId:s,iconType:c,isShowValue:o}}else if(e===n.length-1)return{iconId:s,iconType:c,isShowValue:o};else{let t=n[e-1];if(a.operator=xe(t.operator),a.value=t.value,J(r,i)&&J(a,i))return{iconId:s,iconType:c,isShowValue:o}}}}};let V=1e3*3*3,H=class extends t.Disposable{constructor(e,n,i,o){super(),this._injector=e,this._conditionalFormattingRuleModel=n,this._conditionalFormattingFormulaService=i,this._univerInstanceService=o,T(this,`_calculateUnitManagers`,new Map),T(this,`_rTreeManager`,new t.RTree),T(this,`_cellCache`,new t.LRUMap(V)),T(this,`_markDirty$`,new r.Subject),T(this,`markDirty$`,this._markDirty$.asObservable()),T(this,`_markRuleDirtyAtOnce`,(e,t,n,r=!0)=>{if(this._cellCache.clear(),r){let r=this._ensureCalculateUnitManager(e,t).get(n);r&&r.resetPreComputingCache()}this._markDirty$.next({unitId:e,subUnitId:t,cfId:n})}),T(this,`markRuleDirty`,(()=>{let e=new r.Subject;return this.disposeWithMe(e.pipe((0,a.bufferTime)(100),(0,a.filter)(e=>!!e.length),(0,a.map)(e=>{let t=new Set,n=[];return e.forEach(e=>{let r=`${e.unitId}_${e.subUnitId}_${e.cfId}`;if(t.has(r)){if(e.isNeedResetPreComputingCache){let t=n.find(t=>t.cfId===e.cfId);t.isNeedResetPreComputingCache=!0}return}t.add(r),n.push({...e})}),n})).subscribe(e=>{e.forEach(e=>{this._markRuleDirtyAtOnce(e.unitId,e.subUnitId,e.cfId,e.isNeedResetPreComputingCache)})})),(t,n,r,i=!0)=>{e.next({unitId:t,subUnitId:n,cfId:r,isNeedResetPreComputingCache:i})}})()),this._initRuleListener(),this._handleCustomFormulasSeparately(),this._initCFFormulaListener()}_initCFFormulaListener(){this.disposeWithMe(this._conditionalFormattingFormulaService.result$.subscribe(({unitId:e,subUnitId:t,cfId:n,isAllFinished:r})=>{r&&this._markRuleDirtyAtOnce(e,t,n,r)}))}getCellCfs(e,t,n,r){let i=this._createCacheKey(e,t,n,r);if(this._cellCache.has(i))return this._cellCache.get(i);let a=this._getCellCfs(e,t,n,r);return a.length&&this._cellCache.set(i,a),a}_getCellCfs(e,t,n,r){var i;let a=(i=this._conditionalFormattingRuleModel.getSubunitRules(e,t))==null?[]:i,o=this._ensureCalculateUnitManager(e,t),s=this._rTreeManager.bulkSearch([{unitId:e,sheetId:t,range:{startColumn:r,endColumn:r,startRow:n,endRow:n}}]),c=a.filter(e=>s.has(e.cfId));return c.length?c.map(e=>{let t=o.get(e.cfId);return t?{cfId:e.cfId,result:t.getCell(n,r)}:null}).filter(e=>!!e).map((e,t)=>({...e,priority:t})):[]}dispose(){this.clearCache(),super.dispose()}clearCache(){this._calculateUnitManagers.clear(),this._cellCache.clear(),this._rTreeManager.clear()}_handleCustomFormulasSeparately(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{if(e.type===`set`){let{unitId:t,subUnitId:n}=e,r=e.oldRule;r.rule.type===`highlightCell`&&r.rule.subType===`formula`&&this._conditionalFormattingFormulaService.deleteCache(t,n,r.cfId)}}))}_initRuleListener(){this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe(e=>{let{unitId:t,subUnitId:n,rule:r}=e,{cfId:i,ranges:a}=r,o=this._ensureCalculateUnitManager(t,n);switch(this.markRuleDirty(t,n,i),e.type){case`add`:{this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e})));let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.set(r.cfId,e);break}case`delete`:this._rTreeManager.bulkRemove(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),o.delete(r.cfId);break;case`set`:{let s=e.oldRule;if(this._rTreeManager.bulkRemove(s.ranges.map(e=>({unitId:t,sheetId:n,id:s.cfId,range:e}))),this._rTreeManager.bulkInsert(a.map(e=>({unitId:t,sheetId:n,id:i,range:e}))),s.rule.type!==r.rule.type){let e=this._createRuleCalculateUnitInstance(t,n,r);if(!e)return;o.delete(s.cfId),o.set(r.cfId,e)}else{let e=o.get(s.cfId);if(!e)return;e.updateRule(r)}}}}))}_ensureCalculateUnitManager(e,t){let n=this._calculateUnitManagers.get(e);n||(n=new Map,this._calculateUnitManagers.set(e,n));let r=n.get(t);return r||(r=new Map,n.set(t,r)),r}_createRuleCalculateUnitInstance(e,t,n){let r=this._univerInstanceService.getUnit(e),i=r==null?void 0:r.getSheetBySheetId(t);if(!r||!i)return;let a={workbook:r,worksheet:i,unitId:e,subUnitId:t,accessor:this._injector,rule:n,limit:V,getCellValue:(e,t)=>i.getCellRaw(e,t)||{}};switch(n.rule.type){case`colorScale`:return new se(a);case`dataBar`:return new pe(a);case`highlightCell`:return new he(a);case`iconSet`:return new _e(a)}}_createCacheKey(e,t,n,r){return`${e}_${t}_${n}_${r}`}setCacheLength(e=V){this._cellCache.limit!==e&&(this._cellCache.limit=e,this._calculateUnitManagers.forEach(t=>{t.forEach(t=>{t.forEach(t=>{t.setCacheLength(e)})})}))}};H=I([F(0,(0,t.Inject)(t.Injector)),F(1,(0,t.Inject)(E)),F(2,(0,t.Inject)(L)),F(3,t.IUniverInstanceService)],H);function U(e,t){return Math.abs(e-t)<2**-52}let W=e=>e==null||typeof e==`string`&&e.trim()===``,G=e=>{var n;if(!e)return null;if(e.t===t.CellValueType.BOOLEAN)return e.v===t.BooleanNumber.TRUE?i.BooleanValue.TRUE:i.BooleanValue.FALSE;let r=e.v,a=(n=e.p)==null||(n=n.body)==null?void 0:n.dataStream.replace(/\r\n$/,``);return W(r)?W(a)?null:a:r},K=86400;function ve(e,t=!0){if(t&&e>=0){if(e===0)return[1900,1,0];if(e===60)return[1900,2,29];if(e<60)return[1900,e<32?1:2,(e-1)%31+1]}let n=e+68569+2415019,r=Math.floor(4*n/146097);n-=Math.floor((146097*r+3)/4);let i=Math.floor(4e3*(n+1)/1461001);n=n-Math.floor(1461*i/4)+31;let a=Math.floor(80*n/2447),o=n-Math.floor(2447*a/80);n=Math.floor(a/11);let s=a+2-12*n;return[100*(r-49)+i+n|0,s|0,o|0]}let ye=e=>{let n=e|0,r=K*(e-n),i=Math.floor(r);r-i>.9999&&(i+=1,i===K&&(i=0,n+=1));let a=i<0?K+i:i,[o,s,c]=ve(e,!0);return(0,t.dateKit)(`${o}/${s}/${c} ${Math.floor(a/60/60)%60}:${Math.floor(a/60)%60}:${Math.floor(a)%60}`).valueOf()},q=(e,t,n)=>{switch(e.type){case`max`:{let e=0;return t.forValue((t,n,r)=>{r>e&&(e=r)}),{status:i.FormulaResultStatus.SUCCESS,result:e}}case`min`:{let e;return t.forValue((t,n,r)=>{e===void 0&&(e=r),r<e&&(e=r)}),{status:i.FormulaResultStatus.SUCCESS,result:e}}case`percent`:{let n,r;t.forValue((e,t,i)=>{(n===void 0||r===void 0)&&(n=i,r=i),i>n&&(n=i),i<r&&(r=i)});let a=(n||0)-(r||0),o=Math.max(Math.min(Number(e.value)||0,100),0);return{status:i.FormulaResultStatus.SUCCESS,result:o/100*a+(r||0)}}case`percentile`:{let n=t.toNativeArray().sort((e,t)=>e-t),r=Math.max(Math.min(Number(e.value)||0,100),0),a=(n.length-1)*r/100,o=Math.floor(a),s=a-o,c=n[o]+(n[Math.min(o+1,n.length-1)]-n[o])*s;return{status:i.FormulaResultStatus.SUCCESS,result:c}}case`formula`:{let{accessor:t,unitId:r,subUnitId:i,cfId:a}=n,o=String(e.value),s=t.get(L);return s.registerFormulaWithRange(r,i,a,o),s.getFormulaResultWithCoords(r,i,a,o)}default:{let t=Number(e.value);return{status:i.FormulaResultStatus.SUCCESS,result:Number.isNaN(t)?0:t}}}},be=(e,n,r,i)=>{let{accessor:a}=i,o=a.get(H),s=new t.ObjectMatrix;return r.ranges.forEach(i=>{t.Range.foreach(i,(t,i)=>{let a=o.getCellCfs(e,n,t,i);if(a){let e=a.find(e=>e.cfId===r.cfId);e!=null&&e.result&&s.setValue(t,i,e.result)}})}),s},J=(e,t)=>{switch(e.operator){case`between`:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return t>=n&&t<=r}case`notBetween`:{if(typeof e.value!=`object`||!e.value.length)return;let n=Math.min(...e.value),r=Math.max(...e.value);return!(t>=n&&t<=r)}case`equal`:return U(e.value||0,t);case`notEqual`:return!U(e.value||0,t);case`greaterThan`:return t>(e.value||0);case`greaterThanOrEqual`:return t>=(e.value||0);case`lessThan`:return t<(e.value||0);case`lessThanOrEqual`:return t<=(e.value||0);default:return!1}},xe=e=>{switch(e){case`greaterThan`:return`lessThanOrEqual`;case`greaterThanOrEqual`:return`lessThan`;case`lessThan`:return`greaterThanOrEqual`;case`lessThanOrEqual`:return`greaterThan`}return e},Se=(e,n)=>{let r=e=>e.a===void 0?{...e,a:1}:e,i=e.findIndex(e=>e.value>=n),a=i-1;if(i===0)return e[0].color.toRgbString();if(a>=0){let o=e[a],s=e[i];if(o.color.isValid&&s.color.isValid){let e=r(o.color.toRgb()),i=r(s.color.toRgb()),a=s.value-o.value,c=(n-o.value)/a;return new t.ColorKit([`r`,`g`,`b`,`a`].reduce((t,n)=>{let r=e[n];return t[n]=(i[n]-r)*c+r,t},{})).toRgbString()}}else return e[e.length-1].color.toRgbString()},Y=(e,t,n)=>e.map(e=>{if(e.startColumn>n||e.startRow>t)return null;let r={...e};return r.endRow=Math.min(r.endRow,t),r.endColumn=Math.min(r.endColumn,n),r}).filter(e=>!!e);function Ce(e){let n=0;return new t.ObjectMatrix(e).forValue((e,t,r)=>{n=Math.max(Number.isNaN(n)?0:n,Number(r))}),n}let X={feedback:{mistake:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20d%3D%22M5.69014%205.69014C5.45583%205.92445%205.45583%206.30435%205.69014%206.53867L7.15137%207.9999L5.6899%209.46137C5.45558%209.69569%205.45558%2010.0756%205.6899%2010.3099C5.92421%2010.5442%206.30411%2010.5442%206.53842%2010.3099L7.9999%208.84843L9.46137%2010.3099C9.69569%2010.5442%2010.0756%2010.5442%2010.3099%2010.3099C10.5442%2010.0756%2010.5442%209.69569%2010.3099%209.46137L8.84843%207.9999L10.3097%206.53867C10.544%206.30435%2010.544%205.92445%2010.3097%205.69014C10.0753%205.45583%209.69544%205.45583%209.46113%205.69014L7.9999%207.15137L6.53867%205.69014C6.30435%205.45583%205.92445%205.45583%205.69014%205.69014Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A`,warn:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M7.4%204.4335C7.4%204.10213%207.66863%203.8335%208%203.8335C8.33137%203.8335%208.6%204.10213%208.6%204.4335V9.36683C8.6%209.6982%208.33137%209.96683%208%209.96683C7.66863%209.96683%207.4%209.6982%207.4%209.36683V4.4335Z%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%2211.5338%22%20r%3D%220.83333%22%20fill%3D%22%23FFFFFF%22%2F%3E%0A%3C%2Fsvg%3E%0A`,correct:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%227%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M11.7245%205.57564C11.4901%205.34132%2011.1102%205.34132%2010.8759%205.57564L7.3002%209.15137L5.72446%207.57564C5.49014%207.34132%205.11025%207.34132%204.87593%207.57564C4.64162%207.80995%204.64162%208.18985%204.87593%208.42417L6.87593%2010.4242C7.11025%2010.6585%207.49014%2010.6585%207.72446%2010.4242L11.7245%206.42417C11.9588%206.18985%2011.9588%205.80995%2011.7245%205.57564Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23fff%22%2F%3E%0A%3C%2Fsvg%3E%0A`,starIncomplete:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23fff%22%2F%3E%0A%3Cmask%20id%3D%22star-incomplete-mask%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%220%22%20y%3D%220%22%20width%3D%228%22%20height%3D%2216%22%3E%0A%3Crect%20width%3D%228%22%20height%3D%2216%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fmask%3E%0A%3Cg%20mask%3D%22url(%23star-incomplete-mask)%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A`,starFull:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8%201.8L9.73075%205.30631L13.6%205.86863L10.8%208.59897L11.4615%2012.4526L8%2010.632L4.53853%2012.4526L5.2%208.59897L2.4%205.86863L6.26927%205.30631L8%201.8Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`},progress:{progress0:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress25:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208H8V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress50:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress75:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Cpath%20d%3D%22M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208H8V1.5Z%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`,progress100:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22%237A7A7A%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20stroke%3D%22%237A7A7A%22%20stroke-width%3D%220.75%22%2F%3E%0A%3C%2Fsvg%3E%0A`},signal:{signal0:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal25:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal50:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal75:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3C%2Fsvg%3E%0A`,signal100:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%221.6%22%20y%3D%2211%22%20width%3D%221.8%22%20height%3D%223%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%225.6%22%20y%3D%228%22%20width%3D%221.8%22%20height%3D%226%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%229.6%22%20y%3D%225%22%20width%3D%221.8%22%20height%3D%229%22%20rx%3D%220.65%22%20fill%3D%22%230493EE%22%2F%3E%0A%3Crect%20x%3D%2213.6%22%20y%3D%222%22%20width%3D%221.8%22%20height%3D%2212%22%20rx%3D%220.65%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M4.8%209.15C5.25%2011.25%206.5%2012.55%208%2012.55C9.5%2012.55%2010.75%2011.25%2011.2%209.15H4.8Z%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3C%2Fsvg%3E%0A`,smile:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%209.3C5.65%2010.65%206.65%2011.35%208%2011.35C9.35%2011.35%2010.35%2010.65%2011%209.3%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,noninductive:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Crect%20x%3D%225%22%20y%3D%225.85%22%20width%3D%221.5%22%20height%3D%221.1%22%20rx%3D%220.55%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Crect%20x%3D%229.5%22%20y%3D%225.85%22%20width%3D%221.5%22%20height%3D%221.1%22%20rx%3D%220.55%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5.2%2010.4H10.8%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,dissatisfied:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%226.3%22%20r%3D%220.75%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%2011C5.65%209.65%206.65%208.95%208%208.95C9.35%208.95%2010.35%209.65%2011%2011%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`,impatient:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.4%22%20fill%3D%22%23FFBD37%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%2F%3E%0A%3Cpath%20d%3D%22M4.9%205.4L6.7%206.15%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3Cpath%20d%3D%22M11.1%205.4L9.3%206.15%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3Ccircle%20cx%3D%225.75%22%20cy%3D%227.2%22%20r%3D%220.65%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Ccircle%20cx%3D%2210.25%22%20cy%3D%227.2%22%20r%3D%220.65%22%20fill%3D%22%238F5F00%22%2F%3E%0A%3Cpath%20d%3D%22M5%2011.25C5.7%2010.05%206.7%209.45%208%209.45C9.3%209.45%2010.3%2010.05%2011%2011.25%22%20stroke%3D%22%238F5F00%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E%0A`},arrow:{"down-red":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"right-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"up-green":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndDown-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndUp-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"down-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.90467%203.99244C8.84611%204.1338%208.84611%204.31301%208.84611%204.67143V13.716L5.92068%2010.7906C5.66724%2010.5371%205.54052%2010.4104%205.39916%2010.3519C5.21067%2010.2738%204.9989%2010.2738%204.81041%2010.3519C4.66905%2010.4104%204.54233%2010.5371%204.28889%2010.7906C4.03545%2011.044%203.90873%2011.1707%203.85018%2011.3121C3.77211%2011.5006%203.77211%2011.7124%203.85018%2011.9008C3.90873%2012.0422%204.03545%2012.1689%204.28889%2012.4224L9.03476%2017.1682C9.07839%2017.2127%209.12737%2017.2617%209.18231%2017.3166L9.18239%2017.3167L9.18241%2017.3167C9.40545%2017.5398%209.53035%2017.6647%209.65346%2017.7313C9.67085%2017.7408%209.6882%2017.7492%209.70577%2017.7564C9.89425%2017.8345%2010.106%2017.8345%2010.2945%2017.7564C10.4359%2017.6979%2010.5626%2017.5712%2010.816%2017.3177C10.8986%2017.2352%2010.9677%2017.1661%2011.0253%2017.1056L15.7095%2012.4214L15.7095%2012.4213C15.963%2012.1679%2016.0897%2012.0412%2016.1482%2011.8998C16.2263%2011.7114%2016.2263%2011.4996%2016.1482%2011.3111C16.0897%2011.1697%2015.963%2011.043%2015.7095%2010.7896C15.4561%2010.5361%2015.3294%2010.4094%2015.188%2010.3509C14.9995%2010.2728%2014.7878%2010.2728%2014.5993%2010.3509C14.4579%2010.4094%2014.3312%2010.5361%2014.0778%2010.7896L14.0777%2010.7896L11.1538%2013.7135V4.67142C11.1538%204.31301%2011.1538%204.1338%2011.0953%203.99244C11.0172%203.80395%2010.8674%203.6542%2010.6789%203.57613C10.5376%203.51758%2010.3584%203.51758%209.99996%203.51758C9.64154%203.51758%209.46233%203.51758%209.32097%203.57613C9.13249%203.6542%208.98274%203.80395%208.90467%203.99244Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"right-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.32508%2011.7609C3.46644%2011.8194%203.64565%2011.8194%204.00407%2011.8194H13.049L10.1235%2014.745C9.87002%2014.9984%209.7433%2015.1251%209.68475%2015.2665C9.60668%2015.455%209.60668%2015.6668%209.68475%2015.8552C9.7433%2015.9966%209.87002%2016.1233%2010.1235%2016.3768C10.3769%2016.6302%2010.5036%2016.7569%2010.645%2016.8155C10.8335%2016.8935%2011.0452%2016.8935%2011.2337%2016.8155C11.3751%2016.7569%2011.5018%2016.6302%2011.7552%2016.3768L16.5105%2011.6215C16.5524%2011.5803%2016.5983%2011.5344%2016.6493%2011.4834L16.6495%2011.4831C16.8561%2011.2765%2016.9785%2011.1542%2017.0484%2011.0394C17.0648%2011.0128%2017.0782%2010.9866%2017.0893%2010.9599C17.1674%2010.7714%2017.1674%2010.5596%2017.0893%2010.3711C17.0308%2010.2298%2016.904%2010.1031%2016.6506%209.84962C16.5685%209.76752%2016.4997%209.69872%2016.4394%209.64123L11.7542%204.95601C11.5007%204.70257%2011.374%204.57585%2011.2327%204.5173C11.0442%204.43923%2010.8324%204.43923%2010.6439%204.5173C10.5026%204.57585%2010.3758%204.70257%2010.1224%204.95601L10.1224%204.95601C9.86895%205.20945%209.74223%205.33617%209.68368%205.47753C9.60561%205.66601%209.60561%205.87779%209.68368%206.06627C9.74223%206.20764%209.86895%206.33436%2010.1224%206.5878L13.0463%209.51175H4.00407C3.64565%209.51175%203.46644%209.51175%203.32508%209.5703C3.1366%209.64837%202.98685%209.79812%202.90877%209.98661C2.85022%2010.128%202.85022%2010.3072%202.85022%2010.6656C2.85022%2011.024%202.85022%2011.2032%202.90877%2011.3446C2.98685%2011.5331%203.1366%2011.6828%203.32508%2011.7609Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"up-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M11.0936%2017.3406C11.1522%2017.1992%2011.1522%2017.02%2011.1522%2016.6616V7.61701L14.0776%2010.5424C14.3311%2010.7959%2014.4578%2010.9226%2014.5991%2010.9811C14.7876%2011.0592%2014.9994%2011.0592%2015.1879%2010.9811C15.3292%2010.9226%2015.456%2010.7959%2015.7094%2010.5424C15.9628%2010.289%2016.0896%2010.1623%2016.1481%2010.0209C16.2262%209.83243%2016.2262%209.62066%2016.1481%209.43217C16.0896%209.29081%2015.9628%209.16409%2015.7094%208.91065L10.9645%204.16576C10.9207%204.12105%2010.8714%204.07178%2010.8161%204.01648L10.8159%204.0163C10.5916%203.792%2010.4666%203.66696%2010.3428%203.60058C10.3261%203.59154%2010.3094%203.58358%2010.2925%203.57658C10.104%203.49851%209.89226%203.49851%209.70378%203.57658C9.56242%203.63514%209.4357%203.76186%209.18226%204.0153C9.09955%204.09801%209.03034%204.16722%208.97258%204.22785L4.28878%208.91166C4.03534%209.1651%203.90862%209.29182%203.85006%209.43318C3.77199%209.62166%203.77199%209.83344%203.85006%2010.0219C3.90862%2010.1633%204.03534%2010.29%204.28878%2010.5434C4.54221%2010.7969%204.66893%2010.9236%204.8103%2010.9822C4.99878%2011.0602%205.21056%2011.0602%205.39904%2010.9822C5.5404%2010.9236%205.66712%2010.7969%205.92056%2010.5434L5.92056%2010.5434L8.84449%207.61951V16.6616C8.84449%2017.02%208.84449%2017.1992%208.90305%2017.3406C8.98112%2017.5291%209.13087%2017.6788%209.31935%2017.7569C9.46072%2017.8154%209.63992%2017.8154%209.99834%2017.8154C10.3568%2017.8154%2010.536%2017.8154%2010.6773%2017.7569C10.8658%2017.6788%2011.0156%2017.5291%2011.0936%2017.3406Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndDown-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.5062%206.72126C4.56476%206.86262%204.69148%206.98934%204.94492%207.24278L11.3404%2013.6382L7.20313%2013.6382C6.84471%2013.6382%206.66551%2013.6382%206.52414%2013.6968C6.33566%2013.7749%206.18591%2013.9246%206.10784%2014.1131C6.04928%2014.2545%206.04928%2014.4337%206.04928%2014.7921C6.04928%2015.1505%206.04928%2015.3297%206.10784%2015.4711C6.18591%2015.6596%206.33566%2015.8093%206.52414%2015.8874C6.66551%2015.9459%206.84471%2015.9459%207.20313%2015.9459L13.9194%2015.9459C13.9805%2015.9465%2014.0484%2015.9465%2014.1243%2015.9465H14.1243C14.4353%2015.9465%2014.6114%2015.9465%2014.7449%2015.9082C14.7659%2015.9023%2014.7859%2015.8954%2014.8052%2015.8874C14.9937%2015.8093%2015.1434%2015.6596%2015.2215%2015.4711C15.2801%2015.3297%2015.2801%2015.1505%2015.2801%2014.7921C15.2801%2014.6767%2015.2801%2014.5799%2015.2781%2014.497L15.2781%207.86957C15.2781%207.51115%2015.2781%207.33194%2015.2195%207.19058C15.1415%207.0021%2014.9917%206.85235%2014.8032%206.77428C14.6619%206.71572%2014.4827%206.71572%2014.1243%206.71572C13.7658%206.71572%2013.5866%206.71572%2013.4453%206.77428C13.2568%206.85235%2013.107%207.0021%2013.029%207.19058C12.9704%207.33194%2012.9704%207.51115%2012.9704%207.86957L12.9704%2012.0047L6.5767%205.61099C6.32326%205.35755%206.19654%205.23083%206.05518%205.17228C5.8667%205.09421%205.65492%205.09421%205.46644%205.17228C5.32508%205.23083%205.19836%205.35755%204.94492%205.61099C4.69148%205.86443%204.56476%205.99115%204.5062%206.13251C4.42813%206.32099%204.42813%206.53277%204.5062%206.72126Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"rightAndUp-gray":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2220%22%20height%3D%2221%22%20viewBox%3D%220%200%2020%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.05431%2016.1597C6.19567%2016.1012%206.32239%2015.9745%206.57583%2015.721L12.9712%209.32568L12.9712%2013.4626C12.9712%2013.821%2012.9712%2014.0002%2013.0297%2014.1416C13.1078%2014.3301%2013.2576%2014.4798%2013.446%2014.5579C13.5874%2014.6164%2013.7666%2014.6164%2014.125%2014.6164C14.4834%2014.6164%2014.6626%2014.6164%2014.804%2014.5579C14.9925%2014.4798%2015.1422%2014.3301%2015.2203%2014.1416C15.2789%2014.0002%2015.2789%2013.821%2015.2789%2013.4626L15.2789%206.75233C15.2795%206.68972%2015.2795%206.62004%2015.2795%206.54182L15.2795%206.54157C15.2795%206.22585%2015.2795%206.04918%2015.2395%205.91495C15.2339%205.89605%2015.2276%205.878%2015.2203%205.86053C15.1422%205.67204%2014.9925%205.52229%2014.804%205.44422C14.6626%205.38567%2014.4834%205.38567%2014.125%205.38567L14.125%205.38567C14.0075%205.38567%2013.9093%205.38567%2013.8254%205.38773L7.20256%205.38773C6.84414%205.38773%206.66493%205.38773%206.52357%205.44628C6.33509%205.52436%206.18534%205.6741%206.10727%205.86259C6.04871%206.00395%206.04871%206.18315%206.04871%206.54156V6.54157L6.04871%206.54159C6.04871%206.9%206.04871%207.0792%206.10727%207.22056C6.18534%207.40905%206.33509%207.55879%206.52357%207.63687C6.66493%207.69542%206.84414%207.69542%207.20256%207.69542H11.3379L4.94405%2014.0892C4.69061%2014.3427%204.56389%2014.4694%204.50533%2014.6108C4.42726%2014.7992%204.42726%2015.011%204.50533%2015.1995C4.56389%2015.3409%204.69061%2015.4676%204.94405%2015.721C5.19749%2015.9745%205.32421%2016.1012%205.46557%2016.1597C5.65405%2016.2378%205.86583%2016.2378%206.05431%2016.1597Z%22%20fill%3D%22%23999999%22%2F%3E%0A%3C%2Fsvg%3E%0A`},shape:{cross:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%220.75%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,up:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.48861%204.23829C7.75558%203.87976%208.29238%203.87976%208.55935%204.23829L12.9614%2010.1507C13.2907%2010.5929%2012.975%2011.2223%2012.4236%2011.2223H3.62432C3.07292%2011.2223%202.75722%2010.5929%203.08649%2010.1507L7.48861%204.23829Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`,down:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M8.55935%2011.7617C8.29238%2012.1202%207.75558%2012.1202%207.48861%2011.7617L3.08649%205.84931C2.75722%205.40708%203.07292%204.77771%203.62432%204.77771H12.4236C12.975%204.77771%2013.2907%205.40708%2012.9614%205.84931L8.55935%2011.7617Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.57574%201.92426C7.81005%201.68995%208.18995%201.68995%208.42426%201.92426L14.0757%207.57574C14.3101%207.81005%2014.3101%208.18995%2014.0757%208.42426L8.42426%2014.0757C8.18995%2014.3101%207.81005%2014.3101%207.57574%2014.0757L1.92426%208.42426C1.68995%208.18995%201.68995%207.81005%201.92426%207.57574L7.57574%201.92426Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.57574%201.92426C7.81005%201.68995%208.18995%201.68995%208.42426%201.92426L14.0757%207.57574C14.3101%207.81005%2014.3101%208.18995%2014.0757%208.42426L8.42426%2014.0757C8.18995%2014.3101%207.81005%2014.3101%207.57574%2014.0757L1.92426%208.42426C1.68995%208.18995%201.68995%207.81005%201.92426%207.57574L7.57574%201.92426Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226.5%22%20fill%3D%22black%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"triangle-gold":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.35127%202.31778C7.61335%201.86074%208.27331%201.86074%208.53539%202.31778L14.0808%2011.9898C14.3423%2012.4459%2014.0131%2013.0147%2013.4877%2013.0147H2.399C1.87354%2013.0147%201.54441%2012.4459%201.80595%2011.9898L7.35127%202.31778Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"indicate-greed":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2212%22%20height%3D%2212%22%20rx%3D%222.4%22%20fill%3D%22black%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.75%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.71274%202.86421C3.47843%202.6299%203.09853%202.6299%202.86421%202.86421C2.6299%203.09853%202.6299%203.47843%202.86421%203.71274L7.15154%208.00007L2.86421%2012.2874C2.6299%2012.5217%202.6299%2012.9016%202.86421%2013.1359C3.09853%2013.3702%203.47843%2013.3702%203.71274%2013.1359L8.00007%208.84859L12.2874%2013.1359C12.5217%2013.3702%2012.9016%2013.3702%2013.1359%2013.1359C13.3702%2012.9016%2013.3702%2012.5217%2013.1359%2012.2874L8.84859%208.00007L13.1359%203.71274C13.3702%203.47843%2013.3702%203.09853%2013.1359%202.86421C12.9016%202.6299%2012.5217%202.6299%2012.2874%202.86421L8.00007%207.15154L3.71274%202.86421Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3C%2Fsvg%3E%0A`,warn2:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M7.25%202.5C7.25%202.08579%207.58579%201.75%208%201.75C8.41421%201.75%208.75%202.08579%208.75%202.5V10C8.75%2010.4142%208.41421%2010.75%208%2010.75C7.58579%2010.75%207.25%2010.4142%207.25%2010V2.5Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Ccircle%20cx%3D%228%22%20cy%3D%2213.25%22%20r%3D%221%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3C%2Fsvg%3E%0A`,correct2:`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%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%22M14.1544%203.75557C14.3887%203.98988%2014.3887%204.36978%2014.1544%204.6041L6.51409%2012.2444C6.40157%2012.3569%206.24896%2012.4201%206.08983%2012.4201C5.9307%2012.4201%205.77808%2012.3569%205.66556%2012.2444L1.84541%208.42425C1.6111%208.18993%201.6111%207.81003%201.84541%207.57572C2.07973%207.34141%202.45963%207.34141%202.69394%207.57572L6.08983%2010.9716L13.3059%203.75557C13.5402%203.52126%2013.9201%203.52126%2014.1544%203.75557Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3C%2Fsvg%3E%0A`},flag:{"flag-green":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%2359D01E%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%23FFBD37%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M3.25%202.5C3.25%202.08579%203.58579%201.75%204%201.75C4.41421%201.75%204.75%202.08579%204.75%202.5V13.5C4.75%2013.9142%204.41421%2014.25%204%2014.25C3.58579%2014.25%203.25%2013.9142%203.25%2013.5V2.5Z%22%20fill%3D%22%23FE4B4B%22%2F%3E%0A%3Cpath%20d%3D%22M4.75%203.088C6.02367%202.7469%207.00972%202.7044%207.8443%202.81465C8.70544%202.92841%209.37774%203.19906%2010.0279%203.46147L10.0668%203.47718C11.004%203.85549%2011.9397%204.21307%2013.4603%203.8373C13.8931%203.73034%2014.3125%204.05801%2014.3125%204.50387V10.1091C14.3125%2010.4232%2014.0992%2010.697%2013.7946%2010.774C11.8986%2011.2535%2010.6411%2010.7813%209.51441%2010.3265L9.47546%2010.3108C8.82531%2010.0484%208.153%209.77774%207.29186%209.66398C6.62487%209.5759%205.84983%209.58567%204.75%209.84134V3.088Z%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%223%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%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%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"cell-75":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229%22%20y%3D%229%22%20width%3D%224%22%20height%3D%224%22%20rx%3D%220.8%22%20fill%3D%22%23E5E5E5%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`,"cell-100":`data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%229.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%223.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3Crect%20x%3D%229.4%22%20y%3D%223.4%22%20width%3D%223.2%22%20height%3D%223.2%22%20rx%3D%220.55%22%20fill%3D%22%230493EE%22%20stroke%3D%22%230493EE%22%20stroke-width%3D%220.8%22%2F%3E%0A%3C%2Fsvg%3E%0A`}},we=function(e){return e.threeArrows=`3Arrows`,e.threeArrowsGray=`3ArrowsGray`,e.fourArrows=`4Arrows`,e.fourArrowsGray=`4ArrowsGray`,e.fiveArrows=`5Arrows`,e.fiveArrowsGray=`5ArrowsGray`,e.threeTriangles=`3Triangles`,e.threeTrafficLights1=`3TrafficLights1`,e.threeSigns=`3Signs`,e.threeTrafficLights2=`3TrafficLights2`,e.fourRedToBlack=`4RedToBlack`,e.fourTrafficLights=`4TrafficLights`,e.threeSymbols=`3Symbols`,e.threeSymbols2=`3Symbols2`,e.threeFlags=`3Flags`,e.fourRating=`4Rating`,e.fiveRating=`5Rating`,e.fiveQuarters=`5Quarters`,e.fiveFelling=`_5Felling`,e.fiveBoxes=`5Boxes`,e.threeStars=`3Stars`,e.empty=`EMPTY_ICON_TYPE`,e}({}),Te=[{title:`sheet.cf.iconSet.direction`,group:[{name:`3Arrows`,list:[X.arrow[`up-green`],X.arrow[`right-gold`],X.arrow[`down-red`]]},{name:`3ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`right-gray`],X.arrow[`down-gray`]]},{name:`4Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`4ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`5Arrows`,list:[X.arrow[`up-green`],X.arrow[`rightAndUp-gold`],X.arrow[`right-gold`],X.arrow[`rightAndDown-gold`],X.arrow[`down-red`]]},{name:`5ArrowsGray`,list:[X.arrow[`up-gray`],X.arrow[`rightAndUp-gray`],X.arrow[`right-gray`],X.arrow[`rightAndDown-gray`],X.arrow[`down-gray`]]},{name:`3Triangles`,list:[X.shape.up,X.shape.cross,X.shape.down]}]},{title:`sheet.cf.iconSet.shape`,group:[{name:`3TrafficLights1`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`]]},{name:`3Signs`,list:[X.shape[`roundness-greed`],X.shape[`triangle-gold`],X.shape[`rhomboid-red`]]},{name:`3TrafficLights2`,list:[X.shape[`indicate-greed`],X.shape[`indicate-gold`],X.shape[`indicate-red`]]},{name:`4RedToBlack`,list:[X.shape[`roundness-red`],X.shape[`roundness-pink`],X.shape[`roundness-gray`],X.shape[`roundness-black`]]},{name:`4TrafficLights`,list:[X.shape[`roundness-greed`],X.shape[`roundness-gold`],X.shape[`roundness-red`],X.shape[`roundness-black`]]}]},{title:`sheet.cf.iconSet.mark`,group:[{name:`3Symbols`,list:[X.feedback.correct,X.feedback.warn,X.feedback.mistake]},{name:`3Symbols2`,list:[X.feedback2.correct2,X.feedback2.warn2,X.feedback2.mistake2]},{name:`3Flags`,list:[X.flag[`flag-green`],X.flag[`flag-gold`],X.flag[`flag-red`]]}]},{title:`sheet.cf.iconSet.rank`,group:[{name:`4Rating`,list:[X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Rating`,list:[X.signal.signal0,X.signal.signal25,X.signal.signal50,X.signal.signal75,X.signal.signal100]},{name:`5Quarters`,list:[X.progress.progress100,X.progress.progress75,X.progress.progress50,X.progress.progress25,X.progress.progress0]},{name:`_5Felling`,list:[X.feeling.guffaw,X.feeling.smile,X.feeling.noninductive,X.feeling.dissatisfied,X.feeling.impatient]},{name:`5Boxes`,list:[X.cell[`cell-100`],X.cell[`cell-75`],X.cell[`cell-50`],X.cell[`cell-25`],X.cell[`cell-0`]]},{name:`3Stars`,list:[X.star.starFull,X.star.starIncomplete,X.star.starEmpty]}]}],Z=Te.reduce((e,t)=>{let{group:n}=t;for(let t of n)e[t.name]=t.list;return e},{});for(let e in Z){let t=Z[e];Object.freeze(t)}var Ee=`@univerjs/sheets-conditional-formatting`,De=`0.24.0`;let Oe=`ssheets-conditional-formatting.config`;Symbol(Oe);let ke={},Q=class extends t.Disposable{get _conditionalFormattingViewModelV2(){return this._injector.get(H)}_mergeComposeResult(e,n,r){let i=n.rule.type;if(i===`highlightCell`){r&&(0,t.merge)(e,{style:r});return}if(i===`colorScale`){r&&typeof r==`string`&&(e.style={...e.style||{},bg:{rgb:r}});return}if(i===`dataBar`){let t=r;t&&(e.dataBar=t,e.isShowValue=t.isShowValue);return}if(i===`iconSet`){let t=r;t&&(e.iconSet=t,e.isShowValue=t.isShowValue)}}constructor(e,t,n,r,i,a){super(),this._conditionalFormattingRuleModel=e,this._injector=t,this._univerInstanceService=n,this._resourceManagerService=r,this._sheetInterceptorService=i,this._commandService=a,this._initCellChange(),this._initSnapshot(),this._initSheetChange()}composeStyle(e,t,n,r){let i=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,r);if(!(i!=null&&i.length))return null;let a=[],o=-1;for(let n of i){let r=this._conditionalFormattingRuleModel.getRule(e,t,n.cfId);r&&(a.push({rule:r,cacheItem:n}),o===-1&&r.stopIfTrue&&this._isRuleMatched(r,n.result)&&(o=a.length-1))}if(!a.length)return null;let s=o>-1?a.slice(0,o+1):a,c={};for(let e=s.length-1;e>=0;e--){let{rule:t,cacheItem:n}=s[e];this._mergeComposeResult(c,t,n.result)}return c}_isRuleMatched(e,t){return e.rule.type===`highlightCell`?!!t&&typeof t==`object`&&Object.keys(t).length>0:!!t}_initSnapshot(){let e=e=>{let t=this._conditionalFormattingRuleModel.getUnitRules(e),n={};return t?(t.forEach((e,t)=>{n[t]=e}),JSON.stringify(n)):``},n=e=>{if(!e)return{};try{return JSON.parse(e)}catch{return{}}};this.disposeWithMe(this._resourceManagerService.registerPluginResource({pluginName:s,businesses:[t.UniverInstanceType.UNIVER_SHEET],toJson:t=>e(t),parseJson:e=>n(e),onUnLoad:e=>{this._conditionalFormattingRuleModel.deleteUnitId(e),!(0,t.isInternalEditorID)(e)&&this._conditionalFormattingViewModelV2.clearCache()},onLoad:(e,t)=>{Object.keys(t).forEach(n=>{[...t[n]].reverse().forEach(t=>{this._conditionalFormattingRuleModel.addRule(e,n,t)})})}}))}_initSheetChange(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:e=>{if(e.id===n.RemoveSheetCommand.id){let t=e.params,r=(0,n.getSheetCommandTarget)(this._univerInstanceService,t);if(!r)return{redos:[],undos:[]};let{unitId:i,subUnitId:a}=r,o=this._conditionalFormattingRuleModel.getSubunitRules(i,a);if(!o)return{redos:[],undos:[]};let s=[],c=[];return o.forEach(e=>{let t={unitId:i,subUnitId:a,cfId:e.cfId};s.push({id:k.id,params:t}),c.push(...O(this._injector,t))}),{redos:s,undos:c}}else if(e.id===n.CopySheetCommand.id){let t=e.params,r=(0,n.getSheetCommandTarget)(this._univerInstanceService,t);if(!r)return{redos:[],undos:[]};let{unitId:i,subUnitId:a}=r,{targetSubUnitId:o}=t,s=this._conditionalFormattingRuleModel.getSubunitRules(i,a);if(!s)return{redos:[],undos:[]};let c=[],l=[];return s.forEach(e=>{let t={unitId:i,subUnitId:o,rule:{...e,cfId:this._conditionalFormattingRuleModel.createCfId(i,o)}};c.push({id:j.id,params:t}),l.push(A(this._injector,t))}),{redos:c,undos:l}}return{redos:[],undos:[]}}}))}_initCellChange(){this.disposeWithMe(this._commandService.onCommandExecuted(e=>{let r=(e,t,n)=>{let r=new Set;n.forEach(([n,i])=>{let a=this._conditionalFormattingViewModelV2.getCellCfs(e,t,n,i);a==null||a.forEach(e=>r.add(e.cfId))});let i=[];for(let n of r){let r=this._conditionalFormattingRuleModel.getRule(e,t,n);r&&i.push(r)}return i};switch(e.id){case n.SetRangeValuesMutation.id:{let{subUnitId:n,unitId:i,cellValue:a}=e.params,o=[];new t.ObjectMatrix(a).forValue((e,t,n)=>{n&&Object.keys(n).some(e=>[`p`,`v`].includes(e))&&o.push([e,t])}),r(i,n,o).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(i,n,e.cfId)});break}case n.InsertColMutation.id:case n.RemoveColMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{range:c}=r,l={...c,endColumn:a.getColumnCount()-1},u=this._conditionalFormattingRuleModel.getSubunitRules(o,s);u&&u.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,l))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.RemoveRowMutation.id:case n.InsertRowMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{range:c}=r,l={...c,endRow:a.getRowCount()-1},u=this._conditionalFormattingRuleModel.getSubunitRules(o,s);u&&u.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,l))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveRowsMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{sourceRange:c,targetRange:l}=r,u={startRow:Math.min(c.startRow,l.startRow),endRow:a.getRowCount()-1,startColumn:0,endColumn:a.getColumnCount()-1},d=this._conditionalFormattingRuleModel.getSubunitRules(o,s);d&&d.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,u))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveColsMutation.id:{let r=e.params,i=(0,n.getSheetCommandTarget)(this._univerInstanceService,r);if(!i)return;let{worksheet:a,unitId:o,subUnitId:s}=i,{sourceRange:c,targetRange:l}=r,u={startRow:0,endRow:a.getRowCount()-1,startColumn:Math.min(c.startColumn,l.startColumn),endColumn:a.getColumnCount()-1},d=this._conditionalFormattingRuleModel.getSubunitRules(o,s);d&&d.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,u))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(o,s,e.cfId)});break}case n.MoveRangeMutation.id:{let{unitId:n,to:i,from:a}=e.params,o=e=>{let i=[];new t.ObjectMatrix(e.value).forValue((e,t)=>{i.push([e,t])}),r(n,e.subUnitId,i).forEach(t=>{this._conditionalFormattingViewModelV2.markRuleDirty(n,e.subUnitId,t.cfId)})};o(i),o(a);break}case n.ReorderRangeMutation.id:{let{range:n,unitId:r,subUnitId:i}=e.params,a=this._conditionalFormattingRuleModel.getSubunitRules(r,i);a&&a.filter(e=>e.ranges.some(e=>t.Rectangle.intersects(e,n))).forEach(e=>{this._conditionalFormattingViewModelV2.markRuleDirty(r,i,e.cfId)});break}}}))}};Q=I([F(0,(0,t.Inject)(E)),F(1,(0,t.Inject)(t.Injector)),F(2,(0,t.Inject)(t.IUniverInstanceService)),F(3,(0,t.Inject)(t.IResourceManagerService)),F(4,(0,t.Inject)(n.SheetInterceptorService)),F(5,(0,t.Inject)(t.ICommandService))],Q);let $=class extends t.Plugin{constructor(e=ke,n,r,i){super(),this._config=e,this._injector=n,this._commandService=r,this._configService=i;let{...a}=(0,t.merge)({},ke,this._config);this._configService.setConfig(Oe,a),[[Q],[L],[E],[H]].forEach(e=>{this._injector.add(e)}),[ne,re,ie,ae,P,oe,j,k,M,D].forEach(e=>{this._commandService.registerCommand(e)})}onStarting(){this._injector.get(Q),(0,t.touchDependencies)(this._injector,[[Q],[H]])}};T($,`pluginName`,s),T($,`packageName`,Ee),T($,`version`,De),T($,`type`,t.UniverInstanceType.UNIVER_SHEET),$=I([(0,t.DependentOn)(i.UniverFormulaEnginePlugin),F(1,(0,t.Inject)(t.Injector)),F(2,(0,t.Inject)(t.ICommandService)),F(3,t.IConfigService)],$);let Ae=`sheet-conditional-rule-icon`,je=e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;return`${t}-${n}-${r}-${i}`};var Me=class extends o.SheetExtension{constructor(){super(),T(this,`_paddingRightAndLeft`,2),T(this,`_width`,15),T(this,`_imageMap`,new Map),T(this,`uKey`,Ae),T(this,`Z_INDEX`,35),T(this,`_radius`,1),this._init()}draw(e,n,r,i){let{worksheet:a}=r;if(!a)return!1;let o=new Set,s=i!=null&&i.length?i:[r.rowColumnSegment];e.save(),s.forEach(n=>{t.Range.foreach(n,(t,n)=>{if(!a.getRowVisible(t)||!a.getColVisible(n))return;let s=r.getCellWithCoordByIndex(t,n,!1),{isMerged:c,isMergedMainCell:l,mergeInfo:u}=s,d=a.getCell(t,n);if(c&&(d=a.getCell(u.startRow,u.startColumn)),!(d!=null&&d.iconSet))return;let{iconType:f,iconId:p}=d.iconSet;if(f===`EMPTY_ICON_TYPE`)return;let m=this._imageMap.get(this._createKey(f,p));if(!m||!this.isRenderDiffRangesByCell(u,i))return;if(c||l){let e=je(u);if(o.has(e))return;o.add(e)}let{startX:h,endX:g,startY:_,endY:v}=c||l?u:s,y=g-h,b=v-_;if(this._width>b||this._width>y+this._paddingRightAndLeft*2)return;let x=(b-this._width)/2+_;e.drawImage(m,h+this._paddingRightAndLeft,x,this._width,this._width)})}),e.restore()}_init(){for(let e in Z)Z[e].forEach((t,n)=>{let r=this._createKey(e,String(n)),i=new Image;i.onload=()=>{this._imageMap.set(r,i)},i.src=t})}_createKey(e,t){return`${e}_${t}`}};o.SpreadsheetExtensionRegistry.add(Me);function Ne(e){if(typeof e!=`object`||!e)return e;let t={};for(let n in e)if(e.hasOwnProperty(n)){let r=Ne(e[n]);r!==void 0&&(t[n]=r)}return t}e.AddCfCommand=ne,e.AddConditionalRuleMutation=j,e.AddConditionalRuleMutationUndoFactory=A,e.CFNumberOperator=u,e.CFRuleType=d,e.CFSubRuleType=f,e.CFTextOperator=c,e.CFTimePeriodOperator=l,e.CFValueType=p,e.CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH=V,e.ClearRangeCfCommand=re,e.ClearWorksheetCfCommand=ie,Object.defineProperty(e,`ConditionalFormattingFormulaService`,{enumerable:!0,get:function(){return L}}),e.ConditionalFormattingIcon=Me,e.ConditionalFormattingRuleModel=E,Object.defineProperty(e,`ConditionalFormattingService`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(e,`ConditionalFormattingViewModel`,{enumerable:!0,get:function(){return H}}),e.DEFAULT_BG_COLOR=`#fff`,e.DEFAULT_FONT_COLOR=`#000000`,e.DEFAULT_PADDING=2,e.DEFAULT_WIDTH=15,e.DataBar=de,e.DeleteCfCommand=ae,e.DeleteConditionalRuleMutation=k,e.DeleteConditionalRuleMutationUndoFactory=O,e.IIconSetType=we,e.IconUKey=Ae,e.MoveCfCommand=P,e.MoveConditionalRuleMutation=D,e.MoveConditionalRuleMutationUndoFactory=te,e.SHEET_CONDITIONAL_FORMATTING_PLUGIN=s,e.SetCfCommand=oe,e.SetConditionalRuleMutation=M,Object.defineProperty(e,`UniverSheetsConditionalFormattingPlugin`,{enumerable:!0,get:function(){return $}}),e.anchorUndoFactory=b,e.compareWithNumber=J,e.createCfId=S,e.createDefaultRule=m,e.createDefaultValue=h,e.createDefaultValueByValueType=g,e.dataBarUKey=ce,e.defaultDataBarNativeColor=`#abd91a`,e.defaultDataBarPositiveColor=`#ffbe38`,e.defaultPlaceholderColor=le,e.filterRange=Y,e.findIndexByAnchor=_,e.getCacheStyleMatrix=be,e.getCellValue=G,e.getColorScaleFromValue=Se,e.getMaxInFormulaResult=Ce,e.getOppositeOperator=xe,e.getValueByType=q,e.iconGroup=Te,e.iconMap=Z,e.isAnchorEqual=x,e.isFloatsEqual=U,e.isNullable=W,Object.defineProperty(e,`isRangesEqual`,{enumerable:!0,get:function(){return t.isRangesEqual}}),e.moveByAnchor=v,e.removeUndefinedAttr=Ne,e.serialTimeToTimestamp=ye,e.setConditionalRuleMutationUndoFactory=N,e.toYMD_1900=ve,e.transformSupportSymmetryAnchor=y});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-conditional-formatting",
3
- "version": "0.23.0-insiders.20260523-10caf99",
3
+ "version": "0.24.0",
4
4
  "private": false,
5
5
  "description": "Conditional formatting model, commands, and calculation support for Univer Sheets.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -62,18 +62,18 @@
62
62
  "rxjs": ">=7.0.0"
63
63
  },
64
64
  "dependencies": {
65
- "@univerjs/core": "0.23.0-insiders.20260523-10caf99",
66
- "@univerjs/engine-formula": "0.23.0-insiders.20260523-10caf99",
67
- "@univerjs/sheets": "0.23.0-insiders.20260523-10caf99",
68
- "@univerjs/engine-render": "0.23.0-insiders.20260523-10caf99"
65
+ "@univerjs/core": "0.24.0",
66
+ "@univerjs/engine-formula": "0.24.0",
67
+ "@univerjs/sheets": "0.24.0",
68
+ "@univerjs/engine-render": "0.24.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@univerjs/icons-svg": "^1.2.0",
72
72
  "rxjs": "^7.8.2",
73
73
  "typescript": "^6.0.3",
74
74
  "vitest": "^4.1.5",
75
- "@univerjs-infra/shared": "0.23.0",
76
- "@univerjs/sheets-formula": "0.23.0-insiders.20260523-10caf99"
75
+ "@univerjs-infra/shared": "0.24.0",
76
+ "@univerjs/sheets-formula": "0.24.0"
77
77
  },
78
78
  "scripts": {
79
79
  "test": "vitest run",