@things-factory/dataset 5.0.0-alpha.25 → 5.0.0-alpha.28

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.
@@ -21,6 +21,7 @@ class DataEntryForm extends localize(i18next)(LitElement) {
21
21
  flex-direction: column;
22
22
 
23
23
  background-color: #fff;
24
+ overflow: auto;
24
25
  }
25
26
 
26
27
  ox-data-entry-form {
@@ -0,0 +1,360 @@
1
+ import '@operato/data-grist'
2
+ import './data-entry-form'
3
+
4
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
5
+ import { PageView, store } from '@operato/shell'
6
+ import { css, html } from 'lit'
7
+ import { i18next, localize } from '@operato/i18n'
8
+ import { notify, openPopup } from '@operato/layout'
9
+
10
+ import JSON5 from 'json5'
11
+ import { OxDataUseCase } from '@operato/dataset'
12
+ import { client } from '@operato/graphql'
13
+ import { connect } from 'pwa-helpers/connect-mixin'
14
+ import gql from 'graphql-tag'
15
+
16
+ export class DataEntryListPage extends connect(store)(localize(i18next)(PageView)) {
17
+ static get properties() {
18
+ return {
19
+ active: String,
20
+ gristConfig: Object,
21
+ filters: Object,
22
+ sorters: Object,
23
+ mode: String
24
+ }
25
+ }
26
+
27
+ static get styles() {
28
+ return [
29
+ ScrollbarStyles,
30
+ CommonGristStyles,
31
+ css`
32
+ :host {
33
+ display: flex;
34
+
35
+ width: 100%;
36
+
37
+ --grid-record-emphasized-background-color: red;
38
+ --grid-record-emphasized-color: yellow;
39
+ }
40
+ `
41
+ ]
42
+ }
43
+
44
+ get context() {
45
+ return {
46
+ title: i18next.t('title.data-entry list'),
47
+ help: 'dataset/data-entry-list'
48
+ }
49
+ }
50
+
51
+ render() {
52
+ const mode = 'CARD'
53
+
54
+ return html`
55
+ <ox-grist
56
+ .mode=${mode}
57
+ .config=${this.gristConfig}
58
+ .filters=${this.filters}
59
+ .orders=${this.orders}
60
+ .fetchHandler=${this.fetchHandler.bind(this)}
61
+ >
62
+ <div slot="headroom" id="filters">
63
+ <div id="filters">
64
+ <ox-filters-form></ox-filters-form>
65
+ </div>
66
+
67
+ <div id="sorters">
68
+ Sort
69
+ <mwc-icon
70
+ @click=${e => {
71
+ const target = e.currentTarget
72
+ this.renderRoot.querySelector('#sorter-control').open({
73
+ right: 0,
74
+ top: target.offsetTop + target.offsetHeight
75
+ })
76
+ }}
77
+ >expand_more</mwc-icon
78
+ >
79
+ <ox-popup id="sorter-control">
80
+ <ox-sorters-control> </ox-sorters-control>
81
+ </ox-popup>
82
+ </div>
83
+ </div>
84
+ </ox-grist>
85
+ `
86
+ }
87
+
88
+ get grist() {
89
+ return this.renderRoot.querySelector('ox-grist')
90
+ }
91
+
92
+ async pageInitialized(lifecycle) {
93
+ this.gristConfig = {
94
+ list: {
95
+ fields: ['name', 'description'],
96
+ details: ['schedule', 'active', 'type', 'useCase', 'latestCollectedAt', 'nextSchedule', 'prevSchedule']
97
+ },
98
+ columns: [
99
+ {
100
+ type: 'string',
101
+ name: 'name',
102
+ header: i18next.t('field.name'),
103
+ record: {
104
+ editable: true
105
+ },
106
+ filter: 'search',
107
+ sortable: true,
108
+ width: 150
109
+ },
110
+ {
111
+ type: 'string',
112
+ name: 'description',
113
+ header: i18next.t('field.description'),
114
+ record: {
115
+ editable: true
116
+ },
117
+ filter: 'search',
118
+ width: 200
119
+ },
120
+ {
121
+ type: 'checkbox',
122
+ name: 'active',
123
+ label: true,
124
+ header: i18next.t('field.active'),
125
+ record: {
126
+ editable: false
127
+ },
128
+ filter: true,
129
+ sortable: true,
130
+ width: 60
131
+ },
132
+ {
133
+ type: 'select',
134
+ name: 'type',
135
+ label: true,
136
+ header: i18next.t('field.type'),
137
+ record: {
138
+ editable: false,
139
+ options: [
140
+ {},
141
+ {
142
+ display: 'Manually Collected',
143
+ value: 'manual'
144
+ },
145
+ {
146
+ display: 'Automatically Collected',
147
+ value: 'automatic'
148
+ }
149
+ ]
150
+ },
151
+ sortable: true,
152
+ filter: true,
153
+ width: 60
154
+ },
155
+ {
156
+ type: 'select',
157
+ name: 'useCase',
158
+ label: true,
159
+ header: i18next.t('field.use-case'),
160
+ record: {
161
+ editable: false,
162
+ options: () => {
163
+ return ['', ...OxDataUseCase.getUseCaseNames()].map(name => {
164
+ return {
165
+ display: name,
166
+ value: name
167
+ }
168
+ })
169
+ }
170
+ },
171
+ sortable: true,
172
+ filter: {
173
+ operator: 'eq',
174
+ options: () => {
175
+ return ['', ...OxDataUseCase.getUseCaseNames()].map(name => {
176
+ return {
177
+ display: name,
178
+ value: name
179
+ }
180
+ })
181
+ }
182
+ },
183
+ width: 80
184
+ },
185
+ {
186
+ type: 'crontab',
187
+ name: 'schedule',
188
+ label: true,
189
+ header: i18next.t('field.schedule'),
190
+ record: {
191
+ editable: true,
192
+ options: {
193
+ objectified: true
194
+ }
195
+ },
196
+ width: 80,
197
+ label: true
198
+ },
199
+ {
200
+ type: 'resource-object',
201
+ name: 'supervisoryRole',
202
+ header: i18next.t('field.supervisory-role'),
203
+ record: {
204
+ editable: true,
205
+ options: {
206
+ queryName: 'roles'
207
+ }
208
+ },
209
+ sortable: true,
210
+ width: 120
211
+ },
212
+ {
213
+ type: 'datetime',
214
+ name: 'latestCollectedAt',
215
+ label: true,
216
+ header: i18next.t('field.latest-collected-at'),
217
+ record: {
218
+ editable: false
219
+ },
220
+ sortable: true,
221
+ width: 180
222
+ },
223
+ {
224
+ type: 'datetime',
225
+ name: 'prevSchedule',
226
+ label: true,
227
+ header: i18next.t('field.prev-schedule'),
228
+ record: {
229
+ editable: false
230
+ },
231
+ sortable: true,
232
+ width: 180
233
+ },
234
+ {
235
+ type: 'datetime',
236
+ name: 'nextSchedule',
237
+ label: true,
238
+ header: i18next.t('field.next-schedule'),
239
+ record: {
240
+ editable: false
241
+ },
242
+ sortable: true,
243
+ width: 180
244
+ }
245
+ ],
246
+ rows: {
247
+ selectable: {
248
+ multiple: false
249
+ },
250
+ handlers: {
251
+ click: (columns, data, column, record, rowIndex) => {
252
+ openPopup(html` <data-entry-form .dataSet=${record} style="background-color: white;"></data-entry-form> `, {
253
+ backdrop: true,
254
+ size: 'large',
255
+ title: i18next.t('title.data-entry-form')
256
+ })
257
+ }
258
+ },
259
+ classifier: function (record, rowIndex) {}
260
+ },
261
+ sorters: [
262
+ {
263
+ name: 'name'
264
+ }
265
+ ]
266
+ }
267
+
268
+ await this.updateComplete
269
+
270
+ this.grist.fetch()
271
+ }
272
+
273
+ async pageUpdated(changes, lifecycle) {
274
+ if (this.active) {
275
+ await this.updateComplete
276
+
277
+ var filters = lifecycle.params?.['filters']
278
+ if (filters) {
279
+ try {
280
+ filters = JSON5.parse(filters)
281
+ this.filters = filters
282
+ } catch (e) {
283
+ console.error(`filters parameter parsing error: ${e}`)
284
+ }
285
+ }
286
+
287
+ var sorters = lifecycle.params?.['sorters']
288
+ if (sorters) {
289
+ try {
290
+ sorters = JSON5.parse(sorters)
291
+ this.sorters = sorters
292
+ } catch (e) {
293
+ console.error(`sorters parameter parsing error: ${e}`)
294
+ }
295
+ }
296
+
297
+ this.grist.fetch()
298
+ }
299
+ }
300
+
301
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
302
+ const response = await client.query({
303
+ query: gql`
304
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
305
+ responses: dataSets(filters: $filters, pagination: $pagination, sortings: $sortings) {
306
+ items {
307
+ id
308
+ name
309
+ description
310
+ partitionKeys
311
+ slugger
312
+ active
313
+ type
314
+ useCase
315
+ schedule
316
+ timezone
317
+ supervisoryRole {
318
+ id
319
+ name
320
+ }
321
+ updater {
322
+ id
323
+ name
324
+ }
325
+ updatedAt
326
+ dataItems {
327
+ name
328
+ description
329
+ sequence
330
+ active
331
+ tag
332
+ type
333
+ unit
334
+ options
335
+ quota
336
+ spec
337
+ }
338
+ latestCollectedAt
339
+ nextSchedule
340
+ prevSchedule
341
+ }
342
+ total
343
+ }
344
+ }
345
+ `,
346
+ variables: {
347
+ filters,
348
+ pagination: { page, limit },
349
+ sortings
350
+ }
351
+ })
352
+
353
+ return {
354
+ total: response.data.responses.total || 0,
355
+ records: response.data.responses.items || []
356
+ }
357
+ }
358
+ }
359
+
360
+ window.customElements.define('data-entry-list-page', DataEntryListPage)
@@ -12,7 +12,7 @@ import { PageView, store } from '@operato/shell'
12
12
  import { ScrollbarStyles } from '@operato/styles'
13
13
  import { isMobileDevice } from '@operato/utils'
14
14
 
15
- export class DataOoc extends connect(store)(localize(i18next)(PageView)) {
15
+ export class DataOocListPage extends connect(store)(localize(i18next)(PageView)) {
16
16
  static get properties() {
17
17
  return {
18
18
  active: String,
@@ -54,7 +54,7 @@ export class DataOoc extends connect(store)(localize(i18next)(PageView)) {
54
54
  get context() {
55
55
  return {
56
56
  title: i18next.t('title.data-ooc list'),
57
- help: 'integration/ui/data-ooc',
57
+ help: 'dataset/data-ooc',
58
58
  actions: [
59
59
  // {
60
60
  // title: i18next.t('button.save'),
@@ -485,4 +485,4 @@ export class DataOoc extends connect(store)(localize(i18next)(PageView)) {
485
485
  }
486
486
  }
487
487
 
488
- window.customElements.define('data-ooc-page', DataOoc)
488
+ window.customElements.define('data-ooc-list-page', DataOocListPage)
@@ -12,7 +12,7 @@ import { PageView, store } from '@operato/shell'
12
12
  import { ScrollbarStyles } from '@operato/styles'
13
13
  import { isMobileDevice } from '@operato/utils'
14
14
 
15
- export class DataSample extends connect(store)(localize(i18next)(PageView)) {
15
+ export class DataSampleListPage extends connect(store)(localize(i18next)(PageView)) {
16
16
  static get properties() {
17
17
  return {
18
18
  active: String,
@@ -54,7 +54,7 @@ export class DataSample extends connect(store)(localize(i18next)(PageView)) {
54
54
  get context() {
55
55
  return {
56
56
  title: i18next.t('title.data-sample list'),
57
- help: 'integration/ui/data-sample',
57
+ help: 'dataset/data-sample',
58
58
  actions: [],
59
59
  exportable: {
60
60
  name: i18next.t('title.data-sample list'),
@@ -388,4 +388,4 @@ export class DataSample extends connect(store)(localize(i18next)(PageView)) {
388
388
  }
389
389
  }
390
390
 
391
- window.customElements.define('data-sample-page', DataSample)
391
+ window.customElements.define('data-sample-list-page', DataSampleListPage)
@@ -11,7 +11,7 @@ import gql from 'graphql-tag'
11
11
  import { isMobileDevice } from '@operato/utils'
12
12
  import { notify } from '@operato/layout'
13
13
 
14
- export class DataSensor extends connect(store)(localize(i18next)(PageView)) {
14
+ export class DataSensorListPage extends connect(store)(localize(i18next)(PageView)) {
15
15
  static get properties() {
16
16
  return {
17
17
  active: String,
@@ -53,7 +53,7 @@ export class DataSensor extends connect(store)(localize(i18next)(PageView)) {
53
53
  get context() {
54
54
  return {
55
55
  title: i18next.t('title.data-sensor list'),
56
- help: 'integration/ui/data-sensor',
56
+ help: 'dataset/data-sensor',
57
57
  actions: [
58
58
  {
59
59
  title: i18next.t('button.copy'),
@@ -438,4 +438,4 @@ export class DataSensor extends connect(store)(localize(i18next)(PageView)) {
438
438
  }
439
439
  }
440
440
 
441
- window.customElements.define('data-sensor-page', DataSensor)
441
+ window.customElements.define('data-sensor-list-page', DataSensorListPage)
@@ -1,7 +1,7 @@
1
1
  import '@operato/data-grist'
2
- import './data-item-list'
3
- import './data-set-importer'
4
- import './data-entry-form'
2
+ import './data-item-list.js'
3
+ import './data-set-importer.js'
4
+ import '../data-entry/data-entry-form.js'
5
5
 
6
6
  import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
7
7
  import { PageView, store } from '@operato/shell'
@@ -17,7 +17,10 @@ import gql from 'graphql-tag'
17
17
  import { isMobileDevice } from '@operato/utils'
18
18
  import moment from 'moment-timezone'
19
19
 
20
- export class DataSet extends connect(store)(localize(i18next)(PageView)) {
20
+ const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
21
+ const TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]
22
+
23
+ export class DataSetListPage extends connect(store)(localize(i18next)(PageView)) {
21
24
  static get properties() {
22
25
  return {
23
26
  active: String,
@@ -48,7 +51,7 @@ export class DataSet extends connect(store)(localize(i18next)(PageView)) {
48
51
  get context() {
49
52
  return {
50
53
  title: i18next.t('title.data-set list'),
51
- help: 'integration/ui/data-set',
54
+ help: 'dataset/data-set',
52
55
  actions: [
53
56
  {
54
57
  title: i18next.t('button.copy'),
@@ -286,7 +289,7 @@ export class DataSet extends connect(store)(localize(i18next)(PageView)) {
286
289
  header: i18next.t('field.timezone'),
287
290
  record: {
288
291
  editable: true,
289
- options: ['', ...moment.tz.names()]
292
+ options: TIMEZONE_OPTIONS
290
293
  },
291
294
  width: 120
292
295
  },
@@ -549,4 +552,4 @@ export class DataSet extends connect(store)(localize(i18next)(PageView)) {
549
552
  }
550
553
  }
551
554
 
552
- window.customElements.define('data-set-page', DataSet)
555
+ window.customElements.define('data-set-list-page', DataSetListPage)
package/client/route.js CHANGED
@@ -1,19 +1,23 @@
1
1
  export default function route(page) {
2
2
  switch (page) {
3
- case 'data-set':
4
- import('./pages/data-set')
3
+ case 'data-set-list':
4
+ import('./pages/data-set/data-set-list-page.js')
5
5
  return page
6
6
 
7
- case 'data-sensor':
8
- import('./pages/data-sensor')
7
+ case 'data-sensor-list':
8
+ import('./pages/data-sensor/data-sensor-list-page.js')
9
9
  return page
10
10
 
11
- case 'data-sample':
12
- import('./pages/data-sample')
11
+ case 'data-sample-list':
12
+ import('./pages/data-sample/data-sample-list-page.js')
13
13
  return page
14
14
 
15
- case 'data-ooc':
16
- import('./pages/data-ooc')
15
+ case 'data-ooc-list':
16
+ import('./pages/data-ooc/data-ooc-list-page.js')
17
+ return page
18
+
19
+ case 'data-entry-list':
20
+ import('./pages/data-entry/data-entry-list-page.js')
17
21
  return page
18
22
  }
19
23
  }
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createDataSample = void 0;
7
- const data_ooc_1 = require("../service/data-ooc/data-ooc");
7
+ const moment_timezone_1 = __importDefault(require("moment-timezone"));
8
8
  const shell_1 = require("@things-factory/shell");
9
9
  const data_item_1 = require("../service/data-item/data-item");
10
+ const data_ooc_1 = require("../service/data-ooc/data-ooc");
10
11
  const data_sample_1 = require("../service/data-sample/data-sample");
11
12
  const data_set_1 = require("../service/data-set/data-set");
12
13
  const data_use_case_1 = require("./data-use-case");
13
14
  const work_shift_1 = require("@things-factory/work-shift");
14
- const moment_1 = __importDefault(require("moment"));
15
15
  const debug = require('debug')('things-factory:dataset:controller/save-data-sample');
16
16
  // parse variable javascript string pattern
17
17
  const replaceVariables = (keys, dic) => {
@@ -55,19 +55,24 @@ async function createDataSample(dataSample, context) {
55
55
  return spec;
56
56
  }, {});
57
57
  const collectedAt = dataSample.collectedAt || new Date();
58
- const momentUtc = (0, moment_1.default)(collectedAt).utc();
58
+ // workDate ex) 2022-04-04
59
+ const { workDate, workShift } = await (0, work_shift_1.getWorkDateAndShift)(domain, collectedAt);
60
+ const dateFormat = 'YYYY-MM-DD';
61
+ // local time
62
+ const timezone = 'Asia/Seoul';
63
+ // const collectedAt = dataSample.collectedAt || new Date()
64
+ const localDateTz = (0, moment_timezone_1.default)(collectedAt).tz(timezone);
59
65
  const defaultPartitionKeys = {
60
66
  domain: domain.subdomain,
61
- datasetid: dataSample.dataSet.id /* It should not be 'data_set_id' as column name duplicated for Glue */,
62
- year: momentUtc.format('Y'),
63
- month: momentUtc.format('M'),
64
- day: momentUtc.format('D')
67
+ datasetid: dataSample.dataSet.id,
68
+ date: localDateTz.format(dateFormat),
69
+ workdate: workDate,
70
+ workshift: workShift
65
71
  };
66
72
  var partitionKeys = Object.assign(Object.assign({}, defaultPartitionKeys), dataSet.partitionKeys);
67
- partitionKeys = formatDate(partitionKeys, momentUtc);
73
+ partitionKeys = formatDate(partitionKeys, localDateTz);
68
74
  partitionKeys = replaceVariables(partitionKeys, Object.assign({}, dataSample.data));
69
75
  const { ooc, oos } = data_use_case_1.DataUseCase.evaluate(dataSet, dataItems, dataSample.data) || {};
70
- const { workDate, workShift } = await (0, work_shift_1.getWorkDateAndShift)(domain, collectedAt);
71
76
  const result = await tx.getRepository(data_sample_1.DataSample).save(Object.assign(Object.assign({ name: dataSet.name, description: dataSet.description, useCase: dataSet.useCase }, dataSample), { domain,
72
77
  partitionKeys,
73
78
  spec,
@@ -1 +1 @@
1
- {"version":3,"file":"create-data-sample.js","sourceRoot":"","sources":["../../server/controllers/create-data-sample.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAqE;AACrE,iDAAgF;AAEhF,8DAAyD;AACzD,oEAA+D;AAC/D,2DAAsD;AACtD,mDAA6C;AAI7C,2DAAgE;AAChE,oDAA2B;AAE3B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,oDAAoD,CAAC,CAAA;AAEpF,2CAA2C;AAC3C,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACrC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QACpB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QAC3C,OAAO;YACL,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAClB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACnD,CAAC,CAAC,CAAA;KACL;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,gFAAgF;AAChF,sBAAsB;AACtB,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;IACnC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QACpB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACtC,OAAO;YACL,OAAO,CAAC,OAAO,CAAC,CAAC,C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AAO,CAAC,WAAW;YAChC,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO;YACP,UAAU,EAAE,MAAM;YAClB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,MAAM;YACN,aAAa;YACb,IAAI;YACJ,GAAG;YACH,GAAG;YACH,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE;wBACJ,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,IAAI,EAAE,IAAI,CAAC,IAAI;qBAChB;oBACD,KAAK,EAAE,wBAAa,CAAC,OAAO;oBAC5B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;iBACtB;aACF;YACD,KAAK,EAAE,wBAAa,CAAC,OAAO;YAC5B,QAAQ;YACR,SAAS;YACT,WAAW;YACX,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;QAEF,cAAM,CAAC,OAAO,CAAC,UAAU,EAAE;YACzB,OAAO;YACP,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;SAC7C,CAAC,CAAA;QAEF,cAAM,CAAC,OAAO,CAAC,cAAc,EAAE;YAC7B,YAAY,EAAE;gBACZ,MAAM;gBACN,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,yBAAyB,OAAO,CAAC,IAAI,GAAG;gBAC/C,IAAI,EAAE,yBAAyB,OAAO,CAAC,IAAI,GAAG;gBAC9C,GAAG,EAAE,IAAA,gCAAwB,EAAC,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,OAAO,CAAC,EAAE,EAAE,CAAC;gBACnF,SAAS,EAAE,WAAW;aACvB;SACF,CAAC,CAAA;KACH;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AA7HD,4CA6HC"}
1
+ {"version":3,"file":"create-data-sample.js","sourceRoot":"","sources":["../../server/controllers/create-data-sample.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAoC;AAIpC,iDAAgF;AAEhF,8DAAyD;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