@oanda/labs-currency-power-balance-widget 1.0.112 → 1.0.113
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/CHANGELOG.md +456 -0
- package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js +7 -7
- package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +9 -9
- package/dist/main/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/Main.js +10 -10
- package/dist/main/CurrencyPowerBalanceWidget/Main.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js +11 -11
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/options/utils.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +4 -4
- package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +9 -9
- package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/config.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/constants.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/render.js +8 -8
- package/dist/main/CurrencyPowerBalanceWidget/render.js.map +1 -1
- package/dist/main/CurrencyPowerBalanceWidget/types.js.map +1 -1
- package/dist/main/gql/types/fragment-masking.js.map +1 -1
- package/dist/main/gql/types/gql.js +1 -1
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js +64 -64
- package/dist/main/gql/types/graphql.js.map +1 -1
- package/dist/main/gql/types/index.js.map +1 -1
- package/dist/main/translations/index.js +1 -1
- package/dist/main/translations/index.js.map +1 -1
- package/dist/main/translations/translations.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js +7 -7
- package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js +9 -9
- package/dist/module/CurrencyPowerBalanceWidget/CurrencyPowerBalance.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/Main.js +10 -10
- package/dist/module/CurrencyPowerBalanceWidget/Main.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js +10 -10
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/Chart.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/constants.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js +2 -2
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/formatters.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js +2 -2
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getOption.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/types.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/options/utils.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/Chart/types.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js +4 -4
- package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js +10 -10
- package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/config.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/constants.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/render.js +8 -8
- package/dist/module/CurrencyPowerBalanceWidget/render.js.map +1 -1
- package/dist/module/CurrencyPowerBalanceWidget/types.js.map +1 -1
- package/dist/module/gql/types/fragment-masking.js.map +1 -1
- package/dist/module/gql/types/gql.js +1 -1
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +64 -64
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/gql/types/index.js +2 -2
- package/dist/module/gql/types/index.js.map +1 -1
- package/dist/module/translations/index.js +1 -1
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/translations/translations.js.map +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/ChartWithData.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/CurrencyPowerBalance.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/Main.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/Chart.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/constants.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/formatters.d.ts +4 -3
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/getOption.d.ts +2 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/options/utils.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/Chart/types.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.d.ts +1 -1
- package/dist/types/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.d.ts +3 -3
- package/dist/types/CurrencyPowerBalanceWidget/types.d.ts +2 -2
- package/dist/types/gql/types/gql.d.ts +2 -2
- package/dist/types/gql/types/index.d.ts +2 -2
- package/dist/types/translations/index.d.ts +2 -2
- package/package.json +3 -3
- package/src/CurrencyPowerBalanceWidget/ChartWithData.tsx +31 -17
- package/src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx +16 -9
- package/src/CurrencyPowerBalanceWidget/Main.tsx +18 -9
- package/src/CurrencyPowerBalanceWidget/components/Chart/Chart.tsx +25 -20
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/constants.ts +11 -10
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/formatters.ts +42 -22
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/getOption.ts +59 -44
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/getResponsiveOption.ts +7 -4
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/types.ts +1 -1
- package/src/CurrencyPowerBalanceWidget/components/Chart/options/utils.ts +10 -9
- package/src/CurrencyPowerBalanceWidget/components/Chart/types.ts +4 -1
- package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSelect.tsx +21 -15
- package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/TimeUnitSwitch.tsx +47 -37
- package/src/CurrencyPowerBalanceWidget/components/TimeUnitSwitch/types.ts +3 -3
- package/src/CurrencyPowerBalanceWidget/config.ts +8 -2
- package/src/CurrencyPowerBalanceWidget/constants.ts +2 -1
- package/src/CurrencyPowerBalanceWidget/render.tsx +24 -20
- package/src/CurrencyPowerBalanceWidget/types.ts +5 -3
- package/src/gql/types/fragment-masking.ts +41 -21
- package/src/gql/types/gql.ts +7 -3
- package/src/gql/types/graphql.ts +117 -44
- package/src/gql/types/index.ts +2 -2
- package/src/translations/index.ts +4 -4
- package/src/translations/translations.ts +2 -1
- package/test/Main.test.tsx +28 -14
- package/test/chartFormatters.test.ts +84 -24
- package/test/responsesMocks.ts +254 -255
- package/test/utils.test.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,462 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.0.113 (2024-12-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.173 (2024-12-11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.172 (2024-11-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.171 (2024-11-28)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.170 (2024-11-28)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.169 (2024-11-20)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.168 (2024-11-19)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.167 (2024-10-14)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.166 (2024-10-07)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.165 (2024-10-03)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.164 (2024-09-26)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.163 (2024-09-18)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.162 (2024-09-12)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.161 (2024-09-11)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.160 (2024-09-10)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.159 (2024-09-09)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## 1.0.158 (2024-09-04)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.157 (2024-09-04)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.156 (2024-09-02)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.155 (2024-08-29)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.154 (2024-08-29)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.153 (2024-08-23)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.152 (2024-08-23)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.151 (2024-08-20)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## 1.0.150 (2024-08-19)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.149 (2024-08-07)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## 1.0.148 (2024-08-01)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 1.0.147 (2024-08-01)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 1.0.146 (2024-07-26)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## 1.0.145 (2024-07-25)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 1.0.144 (2024-07-22)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## 1.0.143 (2024-07-19)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## 1.0.142 (2024-07-16)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## 1.0.141 (2024-07-16)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## 1.0.140 (2024-07-12)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 1.0.139 (2024-07-12)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## 1.0.138 (2024-07-10)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## 1.0.137 (2024-07-05)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## 1.0.136 (2024-07-03)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## 1.0.135 (2024-07-03)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## 1.0.134 (2024-07-03)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## 1.0.133 (2024-06-28)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## 1.0.132 (2024-06-27)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## 1.0.131 (2024-06-27)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## 1.0.130 (2024-06-26)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## 1.0.129 (2024-06-17)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 1.0.128 (2024-06-17)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## 1.0.127 (2024-06-10)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## 1.0.126 (2024-05-29)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## 1.0.125 (2024-05-29)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## 1.0.124 (2024-05-29)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## 1.0.123 (2024-05-28)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## 1.0.122 (2024-05-27)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## 1.0.121 (2024-05-27)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## 1.0.120 (2024-05-24)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## 1.0.119 (2024-05-17)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## 1.0.118 (2024-05-09)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## 1.0.117 (2024-05-07)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## 1.0.116 (2024-04-23)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
## 1.0.115 (2024-04-22)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
## 1.0.114 (2024-04-19)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## 1.0.113 (2024-04-19)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
## 1.0.112 (2024-04-15)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## 1.0.111 (2024-04-11)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## 1.0.110 (2024-04-05)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
## 1.0.109 (2024-04-05)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
## 1.0.108 (2024-04-04)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## 1.0.107 (2024-04-03)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## 1.0.106 (2024-03-29)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
## 1.0.105 (2024-03-28)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
## 1.0.104 (2024-03-21)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## 1.0.103 (2024-03-20)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## 1.0.102 (2024-03-20)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## 1.0.101 (2024-03-13)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## 1.0.100 (2024-03-12)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## 1.0.99 (2024-03-11)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## 1.0.98 (2024-03-07)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
## 1.0.97 (2024-03-06)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
## 1.0.96 (2024-03-06)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## 1.0.95 (2024-03-04)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
## 1.0.94 (2024-02-29)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
## 1.0.93 (2024-02-28)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
## 1.0.92 (2024-02-28)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## 1.0.91 (2024-02-23)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
## 1.0.90 (2024-02-23)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
## 1.0.89 (2024-02-21)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## 1.0.88 (2024-02-21)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
## 1.0.87 (2024-02-20)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## 1.0.86 (2024-02-20)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
## 1.0.85 (2024-02-13)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
## 1.0.84 (2024-02-13)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## 1.0.83 (2024-02-09)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
## 1.0.82 (2024-02-05)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
## 1.0.81 (2024-02-05)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
## 1.0.80 (2024-02-05)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
## 1.0.79 (2024-02-05)
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
## 1.0.78 (2024-01-30)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
## 1.0.77 (2024-01-25)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
## 1.0.76 (2024-01-25)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
## 1.0.75 (2024-01-22)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
## 1.0.74 (2024-01-22)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
## 1.0.73 (2024-01-22)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
## 1.0.72 (2024-01-19)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
## 1.0.71 (2024-01-18)
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
## 1.0.70 (2024-01-17)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
## 1.0.69 (2024-01-17)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
## 1.0.68 (2024-01-15)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
## 1.0.67 (2024-01-15)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## 1.0.66 (2024-01-12)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
## 1.0.65 (2024-01-11)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
## 1.0.64 (2024-01-11)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
## 1.0.63 (2024-01-11)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
## 1.0.62 (2024-01-10)
|
|
455
|
+
|
|
456
|
+
**Note:** Version bump only for package @oanda/labs-currency-power-balance-widget
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
6
462
|
## 1.0.112 (2024-12-11)
|
|
7
463
|
|
|
8
464
|
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ChartWithData = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _client = require("@apollo/client");
|
|
9
|
-
var _monoI18n = require("@oanda/mono-i18n");
|
|
10
8
|
var _labsWidgetCommon = require("@oanda/labs-widget-common");
|
|
9
|
+
var _monoI18n = require("@oanda/mono-i18n");
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _getCurrencyPowerBalance = require("../gql/getCurrencyPowerBalance");
|
|
11
12
|
var _Chart = require("./components/Chart");
|
|
12
13
|
var _constants = require("./constants");
|
|
13
|
-
var _getCurrencyPowerBalance = require("../gql/getCurrencyPowerBalance");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
const ChartWithData = _ref => {
|
|
16
16
|
let {
|
|
@@ -40,9 +40,9 @@ const ChartWithData = _ref => {
|
|
|
40
40
|
}, _react.default.createElement(_labsWidgetCommon.Spinner, {
|
|
41
41
|
size: _labsWidgetCommon.SpinnerSize.lg
|
|
42
42
|
})), !loading && !showError && _react.default.createElement(_Chart.Chart, {
|
|
43
|
-
|
|
43
|
+
currencies: currencies,
|
|
44
44
|
timeUnit: timeUnit,
|
|
45
|
-
|
|
45
|
+
values: data?.currencyPowerBalance
|
|
46
46
|
}), !loading && showError && _react.default.createElement("div", {
|
|
47
47
|
className: "lw-flex lw-h-[375px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary"
|
|
48
48
|
}, _react.default.createElement(_labsWidgetCommon.ChartError, null)), isDesktop && _react.default.createElement(_labsWidgetCommon.Tooltip, {
|
|
@@ -50,8 +50,8 @@ const ChartWithData = _ref => {
|
|
|
50
50
|
}), _react.default.createElement("div", {
|
|
51
51
|
className: "lw-mt-2 lw-h-8"
|
|
52
52
|
}, !loading && !showError && _react.default.createElement(_labsWidgetCommon.LastUpdated, {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
labelCallback: lang,
|
|
54
|
+
timestamp: data?.currencyPowerBalance[0]?.updatedAt
|
|
55
55
|
})));
|
|
56
56
|
};
|
|
57
57
|
exports.ChartWithData = ChartWithData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartWithData.js","names":["
|
|
1
|
+
{"version":3,"file":"ChartWithData.js","names":["_client","require","_labsWidgetCommon","_monoI18n","_react","_interopRequireDefault","_getCurrencyPowerBalance","_Chart","_constants","e","__esModule","default","ChartWithData","_ref","timeUnit","currencies","size","useLayoutProvider","isDesktop","Size","DESKTOP","lang","useLocale","loading","data","error","useQuery","getCurrencyPowerBalance","variables","fetchPolicy","showError","currencyPowerBalance","length","createElement","Fragment","className","Spinner","SpinnerSize","lg","Chart","values","ChartError","Tooltip","id","CURRENCY_POWER_BALANCE_TOOLTIP_ID","LastUpdated","labelCallback","timestamp","updatedAt","exports"],"sources":["../../../src/CurrencyPowerBalanceWidget/ChartWithData.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client';\nimport {\n ChartError,\n LastUpdated,\n Size,\n Spinner,\n SpinnerSize,\n Tooltip,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React from 'react';\n\nimport { getCurrencyPowerBalance } from '../gql/getCurrencyPowerBalance';\nimport type {\n GetCurrencyPowerBalanceQuery,\n GetCurrencyPowerBalanceQueryVariables,\n} from '../gql/types/graphql';\nimport { Chart } from './components/Chart';\nimport { CURRENCY_POWER_BALANCE_TOOLTIP_ID } from './constants';\nimport type { ChartWithDataProps } from './types';\n\nconst ChartWithData = ({ timeUnit, currencies }: ChartWithDataProps) => {\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n const { lang } = useLocale();\n const { loading, data, error } = useQuery<\n GetCurrencyPowerBalanceQuery,\n GetCurrencyPowerBalanceQueryVariables\n >(getCurrencyPowerBalance, {\n variables: {\n timeUnit,\n },\n fetchPolicy: 'cache-and-network',\n });\n\n const showError =\n data?.currencyPowerBalance?.length === 0 ||\n error ||\n (currencies && (currencies.length === 0 || currencies.length === 1));\n\n return (\n <>\n {loading && (\n <div className=\"lw-mb-[50px] lw-flex lw-h-[375px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <Spinner size={SpinnerSize.lg} />\n </div>\n )}\n {!loading && !showError && (\n <Chart\n currencies={currencies}\n timeUnit={timeUnit}\n values={data?.currencyPowerBalance!}\n />\n )}\n {!loading && showError && (\n <div className=\"lw-flex lw-h-[375px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\">\n <ChartError />\n </div>\n )}\n {isDesktop && <Tooltip id={CURRENCY_POWER_BALANCE_TOOLTIP_ID} />}\n <div className=\"lw-mt-2 lw-h-8\">\n {!loading && !showError && (\n <LastUpdated\n labelCallback={lang}\n timestamp={data?.currencyPowerBalance![0]?.updatedAt}\n />\n )}\n </div>\n </>\n );\n};\n\nexport { ChartWithData };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,wBAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAAgE,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhE,MAAMG,aAAa,GAAGC,IAAA,IAAkD;EAAA,IAAjD;IAAEC,QAAQ;IAAEC;EAA+B,CAAC,GAAAF,IAAA;EACjE,MAAM;IAAEG;EAAK,CAAC,GAAG,IAAAC,mCAAiB,EAAC,CAAC;EACpC,MAAMC,SAAS,GAAGF,IAAI,KAAKG,sBAAI,CAACC,OAAO;EACvC,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,mBAAS,EAAC,CAAC;EAC5B,MAAM;IAAEC,OAAO;IAAEC,IAAI;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I,CAACO,SAAS,IACrB1B,MAAA,CAAAO,OAAA,CAAAsB,aAAA,CAAC/B,iBAAA,CAAA2C,WAAW;IACVC,aAAa,EAAEzB,IAAK;IACpB0B,SAAS,EAAEvB,IAAI,EAAEO,oBAAoB,CAAE,CAAC,CAAC,EAAEiB;EAAU,CACtD,CAEA,CACL,CAAC;AAEP,CAAC;AAACC,OAAA,CAAArC,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CurrencyPowerBalance = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _client = require("@apollo/client");
|
|
9
8
|
var _labsWidgetCommon = require("@oanda/labs-widget-common");
|
|
10
|
-
var
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _translations = require("../translations");
|
|
11
|
+
var _Main = require("./Main");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
const CurrencyPowerBalance = _ref => {
|
|
14
14
|
let {
|
|
@@ -25,17 +25,17 @@ const CurrencyPowerBalance = _ref => {
|
|
|
25
25
|
cache: new _client.InMemoryCache()
|
|
26
26
|
});
|
|
27
27
|
return _react.default.createElement(_labsWidgetCommon.WidgetProvider, {
|
|
28
|
-
locale: locale,
|
|
29
|
-
translations: _translations.translations,
|
|
30
28
|
client: client,
|
|
31
|
-
|
|
29
|
+
locale: locale,
|
|
30
|
+
theme: theme,
|
|
31
|
+
translations: _translations.translations
|
|
32
32
|
}, _react.default.createElement(_labsWidgetCommon.WidgetWrapper, {
|
|
33
|
-
|
|
33
|
+
isParamError: isParamError,
|
|
34
34
|
linkArea: "logo",
|
|
35
|
-
|
|
35
|
+
logoLink: logoLink
|
|
36
36
|
}, _react.default.createElement(_Main.Main, {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
currencies: currencies,
|
|
38
|
+
timeUnit: timeUnit
|
|
39
39
|
})));
|
|
40
40
|
};
|
|
41
41
|
exports.CurrencyPowerBalance = CurrencyPowerBalance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyPowerBalance.js","names":["
|
|
1
|
+
{"version":3,"file":"CurrencyPowerBalance.js","names":["_client","require","_labsWidgetCommon","_react","_interopRequireDefault","_translations","_Main","e","__esModule","default","CurrencyPowerBalance","_ref","graphqlUrl","theme","locale","timeUnit","currencies","isParamError","logoLink","client","ApolloClient","uri","cache","InMemoryCache","createElement","WidgetProvider","translations","WidgetWrapper","linkArea","Main","exports"],"sources":["../../../src/CurrencyPowerBalanceWidget/CurrencyPowerBalance.tsx"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { WidgetProvider, WidgetWrapper } from '@oanda/labs-widget-common';\nimport React from 'react';\n\nimport { translations } from '../translations';\nimport { Main } from './Main';\nimport type { CurrencyPowerBalanceConfig } from './types';\n\nconst CurrencyPowerBalance = ({\n graphqlUrl,\n theme,\n locale,\n timeUnit,\n currencies,\n isParamError,\n logoLink,\n}: CurrencyPowerBalanceConfig) => {\n const client = new ApolloClient({\n uri: graphqlUrl,\n cache: new InMemoryCache(),\n });\n\n return (\n <WidgetProvider\n client={client}\n locale={locale}\n theme={theme}\n translations={translations}\n >\n <WidgetWrapper\n isParamError={isParamError}\n linkArea=\"logo\"\n logoLink={logoLink}\n >\n <Main currencies={currencies} timeUnit={timeUnit} />\n </WidgetWrapper>\n </WidgetProvider>\n );\n};\n\nexport { CurrencyPowerBalance };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAA8B,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG9B,MAAMG,oBAAoB,GAAGC,IAAA,IAQK;EAAA,IARJ;IAC5BC,UAAU;IACVC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,YAAY;IACZC;EAC0B,CAAC,GAAAP,IAAA;EAC3B,MAAMQ,MAAM,GAAG,IAAIC,oBAAY,CAAC;IAC9BC,GAAG,EAAET,UAAU;IACfU,KAAK,EAAE,IAAIC,qBAAa,CAAC;EAC3B,CAAC,CAAC;EAEF,OACEpB,MAAA,CAAAM,OAAA,CAAAe,aAAA,CAACtB,iBAAA,CAAAuB,cAAc;IACbN,MAAM,EAAEA,MAAO;IACfL,MAAM,EAAEA,MAAO;IACfD,KAAK,EAAEA,KAAM;IACba,YAAY,EAAEA;EAAa,GAE3BvB,MAAA,CAAAM,OAAA,CAAAe,aAAA,CAACtB,iBAAA,CAAAyB,aAAa;IACZV,YAAY,EAAEA,YAAa;IAC3BW,QAAQ,EAAC,MAAM;IACfV,QAAQ,EAAEA;EAAS,GAEnBf,MAAA,CAAAM,OAAA,CAAAe,aAAA,CAAClB,KAAA,CAAAuB,IAAI;IAACb,UAAU,EAAEA,UAAW;IAACD,QAAQ,EAAEA;EAAS,CAAE,CACtC,CACD,CAAC;AAErB,CAAC;AAACe,OAAA,CAAApB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Main = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
7
|
var _labsWidgetCommon = require("@oanda/labs-widget-common");
|
|
9
8
|
var _monoI18n = require("@oanda/mono-i18n");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _graphql = require("../gql/types/graphql");
|
|
11
|
+
var _ChartWithData = require("./ChartWithData");
|
|
11
12
|
var _TimeUnitSwitch = require("./components/TimeUnitSwitch");
|
|
12
13
|
var _config = require("./config");
|
|
13
|
-
var _ChartWithData = require("./ChartWithData");
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
const Main = _ref => {
|
|
@@ -26,8 +26,8 @@ const Main = _ref => {
|
|
|
26
26
|
} = (0, _monoI18n.useLocale)();
|
|
27
27
|
const [selectedTimeUnit, setSelectedTimeUnit] = (0, _react.useState)(timeUnit || _graphql.CurrencyPowerBalanceTimeUnit.CurrentDay);
|
|
28
28
|
return _react.default.createElement(_react.default.Fragment, null, size && _react.default.createElement("div", {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
className: "lw-flex lw-flex-col lw-text-sm lw-tracking-normal",
|
|
30
|
+
"data-testid": "currency-power-balance-wrapper"
|
|
31
31
|
}, timeUnit && currencies ? _react.default.createElement(_react.default.Fragment, null, _config.timeUnitConfig.filter(_ref2 => {
|
|
32
32
|
let {
|
|
33
33
|
value
|
|
@@ -39,19 +39,19 @@ const Main = _ref => {
|
|
|
39
39
|
label
|
|
40
40
|
} = _ref3;
|
|
41
41
|
return _react.default.createElement("div", {
|
|
42
|
-
"data-testid": "time-unit-label",
|
|
43
42
|
key: label,
|
|
44
|
-
className: "lw-mb-6 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold"
|
|
43
|
+
className: "lw-mb-6 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold",
|
|
44
|
+
"data-testid": "time-unit-label"
|
|
45
45
|
}, tooltipLabel ? _react.default.createElement("span", null, `${lang(tooltipLabel.translationKey, {
|
|
46
46
|
count: tooltipLabel.count
|
|
47
47
|
})}`) : _react.default.createElement("span", null, `${lang(label)}`));
|
|
48
48
|
})) : _react.default.createElement(_TimeUnitSwitch.TimeUnitSwitch, {
|
|
49
|
-
selected: selectedTimeUnit,
|
|
50
49
|
callback: setSelectedTimeUnit,
|
|
51
|
-
options: _config.timeUnitConfig
|
|
50
|
+
options: _config.timeUnitConfig,
|
|
51
|
+
selected: selectedTimeUnit
|
|
52
52
|
}), _react.default.createElement(_ChartWithData.ChartWithData, {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
currencies: timeUnit && currencies,
|
|
54
|
+
timeUnit: selectedTimeUnit
|
|
55
55
|
})));
|
|
56
56
|
};
|
|
57
57
|
exports.Main = Main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.js","names":["
|
|
1
|
+
{"version":3,"file":"Main.js","names":["_labsWidgetCommon","require","_monoI18n","_react","_interopRequireWildcard","_graphql","_ChartWithData","_TimeUnitSwitch","_config","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Main","_ref","timeUnit","currencies","size","useLayoutProvider","lang","useLocale","selectedTimeUnit","setSelectedTimeUnit","useState","CurrencyPowerBalanceTimeUnit","CurrentDay","createElement","Fragment","className","timeUnitConfig","filter","_ref2","value","map","_ref3","tooltipLabel","label","key","translationKey","count","TimeUnitSwitch","callback","options","selected","ChartWithData","exports"],"sources":["../../../src/CurrencyPowerBalanceWidget/Main.tsx"],"sourcesContent":["import { useLayoutProvider } from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport React, { useState } from 'react';\n\nimport { CurrencyPowerBalanceTimeUnit } from '../gql/types/graphql';\nimport { ChartWithData } from './ChartWithData';\nimport { TimeUnitSwitch } from './components/TimeUnitSwitch';\nimport { timeUnitConfig } from './config';\nimport type { MainProps } from './types';\n\nconst Main = ({ timeUnit, currencies }: MainProps) => {\n const { size } = useLayoutProvider();\n const { lang } = useLocale();\n const [selectedTimeUnit, setSelectedTimeUnit] = useState(\n timeUnit || CurrencyPowerBalanceTimeUnit.CurrentDay\n );\n return (\n <>\n {size && (\n <div\n className=\"lw-flex lw-flex-col lw-text-sm lw-tracking-normal\"\n data-testid=\"currency-power-balance-wrapper\"\n >\n {timeUnit && currencies ? (\n <>\n {timeUnitConfig\n .filter(({ value }) => value === selectedTimeUnit)\n .map(({ tooltipLabel, label }) => (\n <div\n key={label}\n className=\"lw-mb-6 lw-flex lw-justify-center lw-font-sans lw-text-lg lw-font-bold\"\n data-testid=\"time-unit-label\"\n >\n {tooltipLabel ? (\n <span>{`${lang(tooltipLabel!.translationKey, { count: tooltipLabel!.count })}`}</span>\n ) : (\n <span>{`${lang(label)}`}</span>\n )}\n </div>\n ))}\n </>\n ) : (\n <TimeUnitSwitch\n callback={setSelectedTimeUnit}\n options={timeUnitConfig}\n selected={selectedTimeUnit}\n />\n )}\n <ChartWithData\n currencies={timeUnit && currencies}\n timeUnit={selectedTimeUnit}\n />\n </div>\n )}\n </>\n );\n};\n\nexport { Main };\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAA0C,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAA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