@quillsql/react 2.12.40 → 2.12.41
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/dist/cjs/Chart.js +1 -1
- package/dist/cjs/ChartBuilder.d.ts +1 -1
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +6 -6
- package/dist/cjs/Dashboard.js +5 -5
- package/dist/cjs/ReportBuilder.d.ts +1 -1
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +111 -1588
- package/dist/cjs/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/BarChart.js +0 -9
- package/dist/cjs/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/LineChart.js +1 -11
- package/dist/cjs/components/Dashboard/DataLoader.js +1 -1
- package/dist/cjs/components/ReportBuilder/FilterModal.js +32 -32
- package/dist/cjs/components/ReportBuilder/convert.d.ts +5 -31
- package/dist/cjs/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/convert.js +1 -1
- package/dist/cjs/hooks/useAskQuill.d.ts +27 -0
- package/dist/cjs/hooks/useAskQuill.d.ts.map +1 -0
- package/dist/cjs/hooks/useAskQuill.js +177 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/internals/ReportBuilder/PivotForm.d.ts +3 -3
- package/dist/cjs/internals/ReportBuilder/PivotForm.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotForm.js +4 -2
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts +1 -15
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.js +24 -24
- package/dist/cjs/models/Filter.d.ts +25 -19
- package/dist/cjs/models/Filter.d.ts.map +1 -1
- package/dist/cjs/models/Filter.js +2 -2
- package/dist/cjs/{components/ReportBuilder/pivot.d.ts → models/Pivot.d.ts} +13 -4
- package/dist/cjs/models/Pivot.d.ts.map +1 -0
- package/dist/cjs/models/Report.d.ts +1 -1
- package/dist/cjs/models/Report.d.ts.map +1 -1
- package/dist/cjs/models/Tables.d.ts +16 -0
- package/dist/cjs/models/Tables.d.ts.map +1 -1
- package/dist/cjs/utils/astFilterProcessing.js +27 -27
- package/dist/cjs/utils/astProcessing.d.ts +42 -0
- package/dist/cjs/utils/astProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/astProcessing.js +210 -1
- package/dist/cjs/utils/constants.d.ts +1 -0
- package/dist/cjs/utils/constants.d.ts.map +1 -1
- package/dist/cjs/utils/constants.js +2 -1
- package/dist/cjs/utils/dataFetcher.d.ts +4 -0
- package/dist/cjs/utils/dataFetcher.d.ts.map +1 -1
- package/dist/cjs/utils/dataFetcher.js +24 -1
- package/dist/cjs/utils/dates.d.ts +1 -1
- package/dist/cjs/utils/filterProcessing.d.ts +2 -2
- package/dist/cjs/utils/filterProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/filterProcessing.js +6 -6
- package/dist/cjs/utils/pivotConstructor.d.ts +1 -1
- package/dist/cjs/utils/pivotConstructor.d.ts.map +1 -1
- package/dist/cjs/utils/pivotConstructor.js +7 -4
- package/dist/cjs/utils/pivotProcessing.d.ts +4 -4
- package/dist/cjs/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/pivotProcessing.js +21 -2
- package/dist/cjs/utils/queryConstructor.d.ts +1 -1
- package/dist/cjs/utils/queryConstructor.d.ts.map +1 -1
- package/dist/cjs/utils/queryConstructor.js +3 -3
- package/dist/cjs/utils/report.d.ts +25 -0
- package/dist/cjs/utils/report.d.ts.map +1 -1
- package/dist/cjs/utils/report.js +114 -2
- package/dist/cjs/utils/schema.d.ts.map +1 -1
- package/dist/cjs/utils/schema.js +1 -1
- package/dist/cjs/utils/tableProcessing.d.ts +18 -0
- package/dist/cjs/utils/tableProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/tableProcessing.js +94 -1
- package/dist/esm/Chart.js +1 -1
- package/dist/esm/ChartBuilder.d.ts +1 -1
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +6 -6
- package/dist/esm/Dashboard.js +5 -5
- package/dist/esm/ReportBuilder.d.ts +1 -1
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/ReportBuilder.js +121 -1598
- package/dist/esm/components/Chart/BarChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/BarChart.js +0 -9
- package/dist/esm/components/Chart/LineChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/LineChart.js +1 -11
- package/dist/esm/components/Dashboard/DataLoader.js +1 -1
- package/dist/esm/components/ReportBuilder/FilterModal.js +32 -32
- package/dist/esm/components/ReportBuilder/convert.d.ts +5 -31
- package/dist/esm/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/convert.js +1 -1
- package/dist/esm/hooks/useAskQuill.d.ts +27 -0
- package/dist/esm/hooks/useAskQuill.d.ts.map +1 -0
- package/dist/esm/hooks/useAskQuill.js +173 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/internals/ReportBuilder/PivotForm.d.ts +3 -3
- package/dist/esm/internals/ReportBuilder/PivotForm.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotForm.js +4 -2
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +1 -15
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.js +24 -24
- package/dist/esm/models/Filter.d.ts +25 -19
- package/dist/esm/models/Filter.d.ts.map +1 -1
- package/dist/esm/models/Filter.js +2 -2
- package/dist/esm/{components/ReportBuilder/pivot.d.ts → models/Pivot.d.ts} +13 -4
- package/dist/esm/models/Pivot.d.ts.map +1 -0
- package/dist/esm/models/Report.d.ts +1 -1
- package/dist/esm/models/Report.d.ts.map +1 -1
- package/dist/esm/models/Tables.d.ts +16 -0
- package/dist/esm/models/Tables.d.ts.map +1 -1
- package/dist/esm/utils/astFilterProcessing.js +27 -27
- package/dist/esm/utils/astProcessing.d.ts +42 -0
- package/dist/esm/utils/astProcessing.d.ts.map +1 -1
- package/dist/esm/utils/astProcessing.js +204 -0
- package/dist/esm/utils/constants.d.ts +1 -0
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -0
- package/dist/esm/utils/dataFetcher.d.ts +4 -0
- package/dist/esm/utils/dataFetcher.d.ts.map +1 -1
- package/dist/esm/utils/dataFetcher.js +22 -0
- package/dist/esm/utils/dates.d.ts +1 -1
- package/dist/esm/utils/filterProcessing.d.ts +2 -2
- package/dist/esm/utils/filterProcessing.d.ts.map +1 -1
- package/dist/esm/utils/filterProcessing.js +7 -7
- package/dist/esm/utils/pivotConstructor.d.ts +1 -1
- package/dist/esm/utils/pivotConstructor.d.ts.map +1 -1
- package/dist/esm/utils/pivotConstructor.js +7 -4
- package/dist/esm/utils/pivotProcessing.d.ts +4 -4
- package/dist/esm/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/esm/utils/pivotProcessing.js +19 -1
- package/dist/esm/utils/queryConstructor.d.ts +1 -1
- package/dist/esm/utils/queryConstructor.d.ts.map +1 -1
- package/dist/esm/utils/queryConstructor.js +3 -3
- package/dist/esm/utils/report.d.ts +25 -0
- package/dist/esm/utils/report.d.ts.map +1 -1
- package/dist/esm/utils/report.js +114 -3
- package/dist/esm/utils/schema.d.ts.map +1 -1
- package/dist/esm/utils/schema.js +1 -1
- package/dist/esm/utils/tableProcessing.d.ts +18 -0
- package/dist/esm/utils/tableProcessing.d.ts.map +1 -1
- package/dist/esm/utils/tableProcessing.js +91 -1
- package/package.json +1 -1
- package/dist/cjs/components/ReportBuilder/pivot.d.ts.map +0 -1
- package/dist/cjs/models/Pivots.d.ts +0 -2
- package/dist/cjs/models/Pivots.d.ts.map +0 -1
- package/dist/cjs/models/Pivots.js +0 -2
- package/dist/esm/components/ReportBuilder/pivot.d.ts.map +0 -1
- package/dist/esm/models/Pivots.d.ts +0 -2
- package/dist/esm/models/Pivots.d.ts.map +0 -1
- package/dist/esm/models/Pivots.js +0 -1
- /package/dist/cjs/{components/ReportBuilder/pivot.js → models/Pivot.js} +0 -0
- /package/dist/esm/{components/ReportBuilder/pivot.js → models/Pivot.js} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { getTableNames } from '../components/ReportBuilder/ast';
|
|
2
|
+
import { convertBigQuery, convertGroupBy, convertRemoveSimpleParentheses, convertStringComparison, convertUnaryToBinary, convertWildcardColumns, } from '../components/ReportBuilder/convert';
|
|
3
|
+
import { deepCopy, removeNonSelectedTableReferences, } from '../components/ReportBuilder/util';
|
|
4
|
+
import { QUILL_SERVER } from './constants';
|
|
5
|
+
import { getSchemaInfoWithCustomFields } from './schema';
|
|
1
6
|
export function getSelectFromAST(ast) {
|
|
2
7
|
if (Array.isArray(ast)) {
|
|
3
8
|
return ast[0];
|
|
@@ -252,3 +257,202 @@ export function getColumnsByTableFromASTAndSchema(ast, tables, tableAliasMap) {
|
|
|
252
257
|
}
|
|
253
258
|
return referencedColumns;
|
|
254
259
|
}
|
|
260
|
+
export const isSubquery = (node) => {
|
|
261
|
+
if (!node)
|
|
262
|
+
return false;
|
|
263
|
+
if (node.ast)
|
|
264
|
+
return true;
|
|
265
|
+
if (node.left && isSubquery(node.left))
|
|
266
|
+
return true;
|
|
267
|
+
if (node.right && isSubquery(node.right))
|
|
268
|
+
return true;
|
|
269
|
+
if (node.value && Array.isArray(node.value)) {
|
|
270
|
+
for (const value of node.value) {
|
|
271
|
+
if (isSubquery(value))
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return false;
|
|
276
|
+
};
|
|
277
|
+
export const getAllPossibleColumns = (baseAst, schema) => {
|
|
278
|
+
if (!baseAst || !baseAst.from) {
|
|
279
|
+
return schema.flatMap((table) => table.columns.map((c) => ({
|
|
280
|
+
...c,
|
|
281
|
+
table: table.displayName,
|
|
282
|
+
})));
|
|
283
|
+
}
|
|
284
|
+
// TODO: support infinitely nested FROM table lookups.
|
|
285
|
+
// This currently only supports top-level table names in the FROM section
|
|
286
|
+
// of queries (eg. FROM "table_name", not "FROM (SELECT * FROM other) AS table_name")
|
|
287
|
+
const tableNamesInQuery = baseAst.from.map((tbl) => tbl.table);
|
|
288
|
+
return schema
|
|
289
|
+
.filter((t) => tableNamesInQuery.includes(t.displayName))
|
|
290
|
+
.flatMap((table) => table.columns
|
|
291
|
+
.map((c) => ({
|
|
292
|
+
...c,
|
|
293
|
+
table: table.displayName,
|
|
294
|
+
}))
|
|
295
|
+
.sort((a, b) => {
|
|
296
|
+
const aIsId = a.name.toLowerCase() === 'id' ||
|
|
297
|
+
a.name.toLowerCase().endsWith('_id') ||
|
|
298
|
+
a.name.endsWith('Id');
|
|
299
|
+
const bIsId = b.name.toLowerCase() === 'id' ||
|
|
300
|
+
b.name.toLowerCase().endsWith('_id') ||
|
|
301
|
+
b.name.endsWith('Id');
|
|
302
|
+
if (aIsId && !bIsId)
|
|
303
|
+
return 1;
|
|
304
|
+
if (bIsId && !aIsId)
|
|
305
|
+
return -1;
|
|
306
|
+
return 0;
|
|
307
|
+
}));
|
|
308
|
+
};
|
|
309
|
+
export const createBasicSelectASTFromColumns = (columns, tableName) => {
|
|
310
|
+
return {
|
|
311
|
+
type: 'select',
|
|
312
|
+
options: null,
|
|
313
|
+
distinct: null,
|
|
314
|
+
columns: columns.map((column) => ({
|
|
315
|
+
expr: {
|
|
316
|
+
type: 'column_ref',
|
|
317
|
+
table: tableName,
|
|
318
|
+
// @ts-ignore
|
|
319
|
+
column: column.field || column.name,
|
|
320
|
+
},
|
|
321
|
+
as: null,
|
|
322
|
+
})),
|
|
323
|
+
from: [{ db: null, table: tableName, as: null }],
|
|
324
|
+
where: null,
|
|
325
|
+
groupby: null,
|
|
326
|
+
having: null,
|
|
327
|
+
orderby: null,
|
|
328
|
+
limit: null,
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
export const fetchAndProcessASTFromPrompt = async (aiPrompt, schema, client, prevPivot, currentQuery) => {
|
|
332
|
+
let res, data, ast, newAst, pivot;
|
|
333
|
+
let numRetries = 0;
|
|
334
|
+
let whereAST;
|
|
335
|
+
const MAX_RETRIES = 3;
|
|
336
|
+
try {
|
|
337
|
+
console.log(`[Prompt]: ${aiPrompt}`);
|
|
338
|
+
let isTableJoin = !ast || !ast.from || ast.from.length !== 1;
|
|
339
|
+
while (isTableJoin || isSubquery(ast?.where)) {
|
|
340
|
+
if (numRetries === MAX_RETRIES)
|
|
341
|
+
break;
|
|
342
|
+
if (!currentQuery || (ast && (isTableJoin || isSubquery(ast?.where)))) {
|
|
343
|
+
res = await fetch(`${QUILL_SERVER}/magic`, {
|
|
344
|
+
method: 'POST',
|
|
345
|
+
headers: { 'Content-Type': 'application/json' },
|
|
346
|
+
body: JSON.stringify({
|
|
347
|
+
initialQuestion: aiPrompt,
|
|
348
|
+
publicKey: client.publicKey,
|
|
349
|
+
useNewNodeSql: true, // new flag
|
|
350
|
+
}),
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
res = await fetch(`${QUILL_SERVER}/magic/edit`, {
|
|
355
|
+
method: 'POST',
|
|
356
|
+
headers: { 'Content-Type': 'application/json' },
|
|
357
|
+
body: JSON.stringify({
|
|
358
|
+
sqlQuery: currentQuery,
|
|
359
|
+
initialQuestion: aiPrompt,
|
|
360
|
+
publicKey: client.publicKey,
|
|
361
|
+
useNewNodeSql: true, // new flag
|
|
362
|
+
}),
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
data = await res.json();
|
|
366
|
+
ast = data?.ast?.length ? data?.ast[0] : data?.ast;
|
|
367
|
+
// TODO: Debug invalid table joins in handleAsk
|
|
368
|
+
isTableJoin =
|
|
369
|
+
ast?.type !== 'bigquery' &&
|
|
370
|
+
(!ast || !ast.from || ast.from.length !== 1);
|
|
371
|
+
numRetries += 1;
|
|
372
|
+
}
|
|
373
|
+
if (numRetries === MAX_RETRIES) {
|
|
374
|
+
console.error('[Error]: Max retries exceeded.');
|
|
375
|
+
console.info(`%c[Prompt]: ${aiPrompt}`, 'color: dimgray');
|
|
376
|
+
throw new Error("Error: Couldn't process your request, please re-word your prompt.");
|
|
377
|
+
}
|
|
378
|
+
ast = ast.length ? ast[0] : ast;
|
|
379
|
+
newAst = convertBigQuery(ast);
|
|
380
|
+
newAst = convertWildcardColumns(newAst, schema); // must go before groupby
|
|
381
|
+
({ ast: newAst, pivot } = convertGroupBy(newAst, schema, prevPivot));
|
|
382
|
+
newAst = convertStringComparison(newAst, client.databaseType);
|
|
383
|
+
newAst = convertRemoveSimpleParentheses(newAst);
|
|
384
|
+
const table = getTableNames(newAst)[0];
|
|
385
|
+
if (!table) {
|
|
386
|
+
throw new Error('Table or table alias not found');
|
|
387
|
+
}
|
|
388
|
+
const processedName = table || '';
|
|
389
|
+
const tableInfo = schema.find((t) => t.name === processedName);
|
|
390
|
+
if (!tableInfo) {
|
|
391
|
+
throw new Error('Table info not found');
|
|
392
|
+
}
|
|
393
|
+
newAst = convertUnaryToBinary(newAst);
|
|
394
|
+
newAst = removeNonSelectedTableReferences(newAst, processedName, tableInfo.columns.map((col) => col.name));
|
|
395
|
+
if (pivot) {
|
|
396
|
+
newAst = deepCopy({ ...newAst, orderby: null, limit: null });
|
|
397
|
+
}
|
|
398
|
+
whereAST = deepCopy(newAst.where);
|
|
399
|
+
}
|
|
400
|
+
catch (e) {
|
|
401
|
+
console.log(e);
|
|
402
|
+
if (e instanceof Error) {
|
|
403
|
+
return {
|
|
404
|
+
ast: null,
|
|
405
|
+
pivot: null,
|
|
406
|
+
whereAST: null,
|
|
407
|
+
error: "Error: Couldn't process your request, please re-word your prompt.",
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return { ast: newAst, pivot, whereAST };
|
|
412
|
+
};
|
|
413
|
+
export const fetchASTFromQuillReport = async (report, client, schema) => {
|
|
414
|
+
let newAst;
|
|
415
|
+
let groupByPivot = null;
|
|
416
|
+
let schemaInfo = [];
|
|
417
|
+
try {
|
|
418
|
+
if (!report || report.referencedTables?.length !== 1) {
|
|
419
|
+
throw new Error('Report not found');
|
|
420
|
+
}
|
|
421
|
+
const url = `${QUILL_SERVER}/astify`;
|
|
422
|
+
const result = await fetch(url, {
|
|
423
|
+
method: 'POST',
|
|
424
|
+
headers: {
|
|
425
|
+
'Content-Type': 'application/json',
|
|
426
|
+
},
|
|
427
|
+
body: JSON.stringify({ query: report.queryString, useNewNodeSql: true }),
|
|
428
|
+
});
|
|
429
|
+
const resp = await result.json();
|
|
430
|
+
if (resp.success === false) {
|
|
431
|
+
throw new Error("Couldn't process report query.");
|
|
432
|
+
}
|
|
433
|
+
const ast = getSelectFromAST(resp.ast);
|
|
434
|
+
let convertedAst = processStarColumn(ast, report.columns);
|
|
435
|
+
convertedAst = convertWildcardColumns(convertedAst, schema); // must go before groupby
|
|
436
|
+
convertedAst = convertBigQuery(convertedAst);
|
|
437
|
+
schemaInfo = schema;
|
|
438
|
+
if (!schemaInfo) {
|
|
439
|
+
const { schemaData } = await getSchemaInfoWithCustomFields(client, 'rb');
|
|
440
|
+
schemaInfo = schemaData;
|
|
441
|
+
}
|
|
442
|
+
processApostrophe(convertedAst, ['type', 'value']);
|
|
443
|
+
convertedAst = convertBigQuery(convertedAst);
|
|
444
|
+
({ ast: newAst, pivot: groupByPivot } = convertGroupBy(convertedAst, schemaInfo, report.pivot ? report.pivot : undefined));
|
|
445
|
+
newAst = groupByPivot ? newAst : convertedAst;
|
|
446
|
+
}
|
|
447
|
+
catch (e) {
|
|
448
|
+
console.log(e);
|
|
449
|
+
if (e instanceof Error) {
|
|
450
|
+
return {
|
|
451
|
+
error: e.message,
|
|
452
|
+
ast: null,
|
|
453
|
+
pivot: null,
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return { ast: newAst, pivot: groupByPivot, schema: schemaInfo };
|
|
458
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,uBAAuB,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,YAAY,0CAA0C,CAAC;AACpE,eAAO,MAAM,uBAAuB,MAAM,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare function getData(client: any, cloudQueryEndpoint: string, noCred: RequestCredentials, hostedRequestBody: any, cloudRequestBody: any, method?: string, queryParam?: string): Promise<any>;
|
|
2
2
|
export declare function getDataFromCloud(client: any, cloudQueryEndpoint: string, cloudRequestBody: any, method?: string): Promise<any>;
|
|
3
|
+
export declare function fetchSqlQuery(ast: any, client: any, formData?: any): Promise<{
|
|
4
|
+
query: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}>;
|
|
3
7
|
//# sourceMappingURL=dataFetcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataFetcher.d.ts","sourceRoot":"","sources":["../../../src/utils/dataFetcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataFetcher.d.ts","sourceRoot":"","sources":["../../../src/utils/dataFetcher.tsx"],"names":[],"mappings":"AA6EA,wBAAsB,OAAO,CAC3B,MAAM,EAAE,GAAG,EACX,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,GAAG,EACtB,gBAAgB,EAAE,GAAG,EACrB,MAAM,SAAS,EACf,UAAU,CAAC,EAAE,MAAM,gBA6IpB;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,GAAG,EACX,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,GAAG,EACrB,MAAM,SAAS,gBAgChB;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,GAAG,GACb,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmB5C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QUILL_SERVER } from './constants';
|
|
1
2
|
function fetchQuillData(responseData) {
|
|
2
3
|
if (!responseData) {
|
|
3
4
|
return null;
|
|
@@ -203,3 +204,24 @@ export async function getDataFromCloud(client, cloudQueryEndpoint, cloudRequestB
|
|
|
203
204
|
return null;
|
|
204
205
|
}
|
|
205
206
|
}
|
|
207
|
+
export async function fetchSqlQuery(ast, client, formData) {
|
|
208
|
+
try {
|
|
209
|
+
const where = formData ? formData : ast?.where || null;
|
|
210
|
+
const response = await fetch(`${QUILL_SERVER}/sqlify`, {
|
|
211
|
+
method: 'POST',
|
|
212
|
+
headers: {
|
|
213
|
+
'Content-Type': 'application/json',
|
|
214
|
+
},
|
|
215
|
+
body: JSON.stringify({
|
|
216
|
+
ast: { ...ast, where },
|
|
217
|
+
publicKey: client.publicKey,
|
|
218
|
+
useNewNodeSql: true, // new flag
|
|
219
|
+
}),
|
|
220
|
+
});
|
|
221
|
+
const data = await response.json();
|
|
222
|
+
return { query: data.query };
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
return { query: '', error: 'Failed to fetch query' };
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare function getComparisonInterval(comparisonRange: {
|
|
|
14
14
|
export declare function getDateBucketFromRange(dateRange: {
|
|
15
15
|
start: Date;
|
|
16
16
|
end: Date;
|
|
17
|
-
}): "month" | "week" | "
|
|
17
|
+
}): "month" | "week" | "day" | "year";
|
|
18
18
|
export declare function parseDateByDatabaseType(date: any, databaseType: string): Date;
|
|
19
19
|
export declare function getDateFormatFromBucket(dateBucket: string): string;
|
|
20
20
|
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Filter } from '../models/Filter';
|
|
1
|
+
import { FieldTypes, Filter } from '../models/Filter';
|
|
2
2
|
export declare function findAndProcessDateFilter(filters: any[]): any;
|
|
3
3
|
export declare function processFilterFromBackend(filter: any): any;
|
|
4
4
|
export declare function updateFilter(filter: any, value?: any, comparison?: any): any;
|
|
5
|
-
export declare const getType: (t: string) =>
|
|
5
|
+
export declare const getType: (t: string) => FieldTypes.String | FieldTypes.Number | FieldTypes.Date | FieldTypes.Boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Returns a sentence to describe a Filter
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterProcessing.d.ts","sourceRoot":"","sources":["../../../src/utils/filterProcessing.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"filterProcessing.d.ts","sourceRoot":"","sources":["../../../src/utils/filterProcessing.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,UAAU,EACV,MAAM,EAEP,MAAM,kBAAkB,CAAC;AAG1B,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAoB5D;AAMD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,OAkBnD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,GAAG,EACX,KAAK,GAAE,GAAU,EACjB,UAAU,GAAE,GAAU,OAuGvB;AAGD,eAAO,MAAM,OAAO,MAAO,MAAM,iFAwDhC,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAwBrD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { COMPARISON_RANGE, PRIMARY_RANGE, defaultOptionsV2, getRangeFromPresetOptions, } from '../DateRangePicker/dateRangePickerUtils';
|
|
2
|
-
import { DateOperator, FilterNames } from '../models/Filter';
|
|
2
|
+
import { DateOperator, FieldTypes, FilterNames, } from '../models/Filter';
|
|
3
3
|
import { snakeAndCamelCaseToTitleCase } from './textProcessing';
|
|
4
4
|
export function findAndProcessDateFilter(filters) {
|
|
5
5
|
let dateFilter = filters.find((filter) => filter.filterType === 'date_range');
|
|
@@ -161,7 +161,7 @@ export const getType = (t) => {
|
|
|
161
161
|
case 'longtext':
|
|
162
162
|
case 'longblob':
|
|
163
163
|
case 'text':
|
|
164
|
-
return
|
|
164
|
+
return FieldTypes.String;
|
|
165
165
|
case 'numeric':
|
|
166
166
|
case 'bit':
|
|
167
167
|
case 'tinybit':
|
|
@@ -179,7 +179,7 @@ export const getType = (t) => {
|
|
|
179
179
|
case 'smallmoney':
|
|
180
180
|
case 'money':
|
|
181
181
|
case 'real':
|
|
182
|
-
return
|
|
182
|
+
return FieldTypes.Number;
|
|
183
183
|
case 'date':
|
|
184
184
|
case 'datetime':
|
|
185
185
|
case 'datetime2':
|
|
@@ -189,12 +189,12 @@ export const getType = (t) => {
|
|
|
189
189
|
case 'timestamptz':
|
|
190
190
|
case 'time':
|
|
191
191
|
case 'year':
|
|
192
|
-
return
|
|
192
|
+
return FieldTypes.Date;
|
|
193
193
|
case 'bool':
|
|
194
194
|
case 'boolean':
|
|
195
|
-
return
|
|
195
|
+
return FieldTypes.Boolean;
|
|
196
196
|
default:
|
|
197
|
-
return
|
|
197
|
+
return FieldTypes.String;
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
200
|
/**
|
|
@@ -202,7 +202,7 @@ export const getType = (t) => {
|
|
|
202
202
|
*/
|
|
203
203
|
export function filterSentence(filter) {
|
|
204
204
|
let value = '';
|
|
205
|
-
if (filter.
|
|
205
|
+
if (filter.filterType == FilterNames.NullFilter) {
|
|
206
206
|
return `${snakeAndCamelCaseToTitleCase(filter.field)} ${filter.operator}`;
|
|
207
207
|
}
|
|
208
208
|
else if (filter.value === null || filter.value === undefined) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pivot } from '../
|
|
1
|
+
import { Pivot } from '../models/Pivot';
|
|
2
2
|
import { QuillReportInternal } from '../models/Report';
|
|
3
3
|
export declare function generatePivotWithSQL(pivot: Pivot, report: QuillReportInternal, client: any, dateBucket?: string, dateFilter?: any, distinctStrings?: any): Promise<{
|
|
4
4
|
rows: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivotConstructor.d.ts","sourceRoot":"","sources":["../../../src/utils/pivotConstructor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pivotConstructor.d.ts","sourceRoot":"","sources":["../../../src/utils/pivotConstructor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAOvD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,mBAAmB,EAC3B,MAAM,EAAE,GAAG,EACX,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,GAAG,EAChB,eAAe,CAAC,EAAE,GAAG;;;eAgMtB"}
|
|
@@ -84,15 +84,17 @@ export async function generatePivotWithSQL(pivot, report, client, dateBucket, da
|
|
|
84
84
|
}
|
|
85
85
|
return 0;
|
|
86
86
|
});
|
|
87
|
-
if (pivot.rowField &&
|
|
87
|
+
if (pivot.rowField &&
|
|
88
|
+
!['string', 'varchar'].includes(pivot.rowFieldType || '')) {
|
|
88
89
|
rows.forEach((row) => {
|
|
89
|
-
row[pivot.rowField] = getDateString(row[pivot.rowField], undefined, dateBucket);
|
|
90
|
+
row[pivot.rowField || ''] = getDateString(row[pivot.rowField || ''], undefined, dateBucket);
|
|
90
91
|
});
|
|
91
92
|
// add a row for each date in the range that doesn't have a value
|
|
92
93
|
if (pivot.rowField &&
|
|
94
|
+
pivot.rowFieldType &&
|
|
93
95
|
!['string', 'varchar'].includes(pivot.rowFieldType) &&
|
|
94
96
|
dateFilter) {
|
|
95
|
-
const dateSet = new Set(rows.map((row) => row[pivot.rowField]));
|
|
97
|
+
const dateSet = new Set(rows.map((row) => row[pivot.rowField || '']));
|
|
96
98
|
// create a loop that will go through each formatted date and add a row if it doesn't exist going to the current date
|
|
97
99
|
for (let date = dateFilter.start ?? dateFilter.startDate; date <= dateFilter.end; date = new Date(date.getTime() + 24 * 60 * 60 * 1000)) {
|
|
98
100
|
const formattedDate = getDateString(date.toDateString(), undefined, dateBucket);
|
|
@@ -104,7 +106,8 @@ export async function generatePivotWithSQL(pivot, report, client, dateBucket, da
|
|
|
104
106
|
}
|
|
105
107
|
// order the rows by the date field
|
|
106
108
|
rows.sort((a, b) => {
|
|
107
|
-
return new Date(a[pivot.rowField]) <
|
|
109
|
+
return new Date(a[pivot.rowField || '']) <
|
|
110
|
+
new Date(b[pivot.rowField || ''])
|
|
108
111
|
? -1
|
|
109
112
|
: 1;
|
|
110
113
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Pivot } from '../internals/ReportBuilder/PivotModal';
|
|
2
1
|
import { ColumnInternal } from '../models/Columns';
|
|
2
|
+
import { Pivot } from '../models/Pivot';
|
|
3
|
+
import { UniqueValuesByColumn } from '../models/Tables';
|
|
3
4
|
export declare function pivotToSql(pivot: Pivot, query: string, columns: ColumnInternal[]): string;
|
|
4
5
|
export declare function isValidPivot(pivot: Pivot): boolean;
|
|
5
|
-
export declare function getPossiblePivotFieldOptions(columns: ColumnInternal[], uniqueValues: {
|
|
6
|
-
[field: string]: any;
|
|
7
|
-
}): {
|
|
6
|
+
export declare function getPossiblePivotFieldOptions(columns: ColumnInternal[], uniqueValues: UniqueValuesByColumn): {
|
|
8
7
|
rowFields: string[];
|
|
9
8
|
columnFields: string[];
|
|
10
9
|
valueFields: string[];
|
|
@@ -14,4 +13,5 @@ export declare function cleanPivot(pivot: Pivot, possibleColumns: {
|
|
|
14
13
|
columnFields: any;
|
|
15
14
|
valueFields: any;
|
|
16
15
|
}): Pivot;
|
|
16
|
+
export declare const isPivotPossible: (fields: any, pivot: Pivot) => boolean;
|
|
17
17
|
//# sourceMappingURL=pivotProcessing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivotProcessing.d.ts","sourceRoot":"","sources":["../../../src/utils/pivotProcessing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pivotProcessing.d.ts","sourceRoot":"","sources":["../../../src/utils/pivotProcessing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,cAAc,EAAE,GACxB,MAAM,CAuCR;AAkBD,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,WA0BxC;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,cAAc,EAAE,EACzB,YAAY,EAAE,oBAAoB;;;;EA4CnC;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE;IACf,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,GAAG,CAAC;IAClB,WAAW,EAAE,GAAG,CAAC;CAClB,GACA,KAAK,CAqCP;AAED,eAAO,MAAM,eAAe,WAAY,GAAG,SAAS,KAAK,YA8BxD,CAAC"}
|
|
@@ -26,7 +26,9 @@ export function pivotToSql(pivot, query, columns) {
|
|
|
26
26
|
pivot.valueField &&
|
|
27
27
|
processedAggType) {
|
|
28
28
|
// 2-d pivot
|
|
29
|
-
const sqlQuery = generateTwoDPivotQuery(
|
|
29
|
+
const sqlQuery = generateTwoDPivotQuery(
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
{ ...pivot, aggregationType: processedAggType }, query, columns);
|
|
30
32
|
return sqlQuery;
|
|
31
33
|
}
|
|
32
34
|
return query;
|
|
@@ -133,3 +135,19 @@ export function cleanPivot(pivot, possibleColumns) {
|
|
|
133
135
|
}
|
|
134
136
|
return pivot;
|
|
135
137
|
}
|
|
138
|
+
export const isPivotPossible = (fields, pivot) => {
|
|
139
|
+
let validPivot = true;
|
|
140
|
+
if (pivot.rowField &&
|
|
141
|
+
!fields.find((field) => field.name === pivot.rowField || field.field === pivot.rowField)) {
|
|
142
|
+
validPivot = false;
|
|
143
|
+
}
|
|
144
|
+
if (pivot.valueField &&
|
|
145
|
+
!fields.find((field) => field.name === pivot.valueField || field.field === pivot.valueField)) {
|
|
146
|
+
validPivot = false;
|
|
147
|
+
}
|
|
148
|
+
if (pivot.columnField &&
|
|
149
|
+
!fields.find((field) => field.name === pivot.columnField || field.field === pivot.columnField)) {
|
|
150
|
+
validPivot = false;
|
|
151
|
+
}
|
|
152
|
+
return validPivot;
|
|
153
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pivot } from '../
|
|
1
|
+
import { Pivot } from '../models/Pivot';
|
|
2
2
|
export declare function processColumnReference(column: string, databaseType: string, fallbackOnNull?: string): string;
|
|
3
3
|
export declare function generateCountQuery(fields: string[], query: string, databaseType: string): string;
|
|
4
4
|
export declare function generateDistinctQuery(stringFields: string[], query: string, databaseType: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryConstructor.d.ts","sourceRoot":"","sources":["../../../src/utils/queryConstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"queryConstructor.d.ts","sourceRoot":"","sources":["../../../src/utils/queryConstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAmBxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,UAiBxB;AAgDD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EAAE,EAChB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,UAUrB;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,UASrB;AAED,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EAAE,EACtB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,UAcrB;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EAAE,EACrB,YAAY,EAAE,MAAM,EACpB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAwBpB"}
|
|
@@ -102,7 +102,7 @@ function create2DPivotQuery(pivot, itemQueries, databaseType, dateBucket, compar
|
|
|
102
102
|
if (!columnFieldValues) {
|
|
103
103
|
return undefined;
|
|
104
104
|
}
|
|
105
|
-
if (['string', 'varchar'].includes(pivot.rowFieldType) ||
|
|
105
|
+
if (['string', 'varchar'].includes(pivot.rowFieldType || '') ||
|
|
106
106
|
!pivot.rowFieldType) {
|
|
107
107
|
return create2DStringPivotQuery(pivot, itemQueries, columnFieldValues, databaseType);
|
|
108
108
|
}
|
|
@@ -164,7 +164,7 @@ function create2DDatePivotQuery(pivot, itemQueries, columnFieldValues, databaseT
|
|
|
164
164
|
${joinQuery} ORDER BY qt.${processColumnReference(`${rowField}`, databaseType)}`;
|
|
165
165
|
}
|
|
166
166
|
function create1DPivotQuery(pivot, itemQueries, dateBucket = 'month', databaseType, comparisonInterval) {
|
|
167
|
-
if (['string', 'varchar'].includes(pivot.rowFieldType) ||
|
|
167
|
+
if (['string', 'varchar'].includes(pivot.rowFieldType || '') ||
|
|
168
168
|
!pivot.rowFieldType) {
|
|
169
169
|
return create1DStringPivotQuery(pivot, itemQueries, databaseType);
|
|
170
170
|
}
|
|
@@ -189,7 +189,7 @@ function create1DStringPivotQuery(pivot, itemQueries, databaseType) {
|
|
|
189
189
|
${joinQuery}`;
|
|
190
190
|
}
|
|
191
191
|
function create1DDatePivotQuery(pivot, itemQueries, dateBucket = 'month', databaseType, comparisonInterval) {
|
|
192
|
-
const rowField = pivot.rowField;
|
|
192
|
+
const rowField = pivot.rowField || '';
|
|
193
193
|
const valueField = pivot.valueField;
|
|
194
194
|
const compareCTE = itemQueries[1] && comparisonInterval
|
|
195
195
|
? `, quill_ct as (${itemQueries[1]?.replaceAll(';', '')})`
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
+
import { TableInfo } from '../components/ReportBuilder/schema';
|
|
2
|
+
import { ColumnInternal } from '../models/Columns';
|
|
3
|
+
import { Pivot } from '../models/Pivot';
|
|
1
4
|
import { QuillReport, QuillReportInternal } from '../models/Report';
|
|
5
|
+
import { DateRangesByColumn, UniqueValuesByTable } from '../models/Tables';
|
|
2
6
|
import { AdditionalProcessing } from './tableProcessing';
|
|
7
|
+
export type ReportBuilderInfo = {
|
|
8
|
+
rows: any[];
|
|
9
|
+
columns: ColumnInternal[];
|
|
10
|
+
rowCount: number;
|
|
11
|
+
pivot: Pivot | null;
|
|
12
|
+
pivotData: {
|
|
13
|
+
rows: any[];
|
|
14
|
+
columns: ColumnInternal[];
|
|
15
|
+
} | null;
|
|
16
|
+
formattedRows: any[];
|
|
17
|
+
report: QuillReportInternal;
|
|
18
|
+
table: string;
|
|
19
|
+
uniqueValues: UniqueValuesByTable;
|
|
20
|
+
dateRanges: DateRangesByColumn;
|
|
21
|
+
query: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
3
24
|
export declare const EMPTY_REPORT: QuillReport;
|
|
4
25
|
export declare function fetchReport(reportId: string, client: any, useReportTask?: boolean, filters?: any[], additionalProcessing?: AdditionalProcessing, dateBucket?: string, customFields?: any): Promise<{
|
|
5
26
|
report: QuillReportInternal;
|
|
@@ -7,4 +28,8 @@ export declare function fetchReport(reportId: string, client: any, useReportTask
|
|
|
7
28
|
}>;
|
|
8
29
|
export declare const formatRowsFromReport: (report: any) => any;
|
|
9
30
|
export declare function convertInternalReportToReport(report: QuillReportInternal): QuillReport;
|
|
31
|
+
export declare const fetchReportBuilderDataFromAST: (baseAst: any, formData: any, schema: TableInfo[], client: any, pivot?: Pivot, previousFormData?: any, currentTable?: string, previousRelevant?: {
|
|
32
|
+
uniqueStrings: UniqueValuesByTable;
|
|
33
|
+
dateRanges: DateRangesByColumn;
|
|
34
|
+
}, report?: QuillReportInternal, customFields?: any) => Promise<ReportBuilderInfo>;
|
|
10
35
|
//# sourceMappingURL=report.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/utils/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/utils/report.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,EAAU,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAa3E,OAAO,EACL,oBAAoB,EAGrB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,OAAO,EAAE,cAAc,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7D,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,mBAAmB,CAAC;IAClC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,WAkB1B,CAAC;AAEF,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,GAAG,EACX,aAAa,UAAO,EACpB,OAAO,GAAE,GAAG,EAAO,EACnB,oBAAoB,CAAC,EAAE,oBAAoB,EAC3C,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,GAAG,GACjB,OAAO,CAAC;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA0G1D;AAED,eAAO,MAAM,oBAAoB,WAAY,GAAG,QAkB/C,CAAC;AAEF,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,mBAAmB,GAC1B,WAAW,CAsDb;AAED,eAAO,MAAM,6BAA6B,YAC/B,GAAG,YACF,GAAG,UACL,SAAS,EAAE,UACX,GAAG,UACH,KAAK,qBACM,GAAG,iBACP,MAAM,qBACF;IACjB,aAAa,EAAE,mBAAmB,CAAC;IACnC,UAAU,EAAE,kBAAkB,CAAC;CAChC,WACQ,mBAAmB,iBACb,GAAG,KACjB,QAAQ,iBAAiB,CAmI3B,CAAC"}
|