n8n-nodes-craft-daily-notes 1.0.23 → 1.0.26
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/credentials/CraftDocumentsApi.credentials.d.ts +9 -0
- package/dist/credentials/CraftDocumentsApi.credentials.js +31 -0
- package/dist/credentials/CraftDocumentsApi.credentials.js.map +1 -0
- package/dist/nodes/CraftDailyNotes/resources/block/insert.js +7 -43
- package/dist/nodes/CraftDailyNotes/resources/block/insert.js.map +1 -1
- package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js +33 -7
- package/dist/nodes/CraftDailyNotes/resources/collection/addItems.js.map +1 -1
- package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js +1 -1
- package/dist/nodes/CraftDailyNotes/resources/collection/deleteItems.js.map +1 -1
- package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js +40 -7
- package/dist/nodes/CraftDailyNotes/resources/collection/updateItems.js.map +1 -1
- package/dist/nodes/CraftDocuments/CraftDocuments.node.d.ts +12 -0
- package/dist/nodes/CraftDocuments/CraftDocuments.node.js +83 -0
- package/dist/nodes/CraftDocuments/CraftDocuments.node.js.map +1 -0
- package/dist/nodes/CraftDocuments/CraftDocuments.node.json +22 -0
- package/dist/nodes/CraftDocuments/loadOptions/getCollections.d.ts +2 -0
- package/dist/nodes/CraftDocuments/loadOptions/getCollections.js +18 -0
- package/dist/nodes/CraftDocuments/loadOptions/getCollections.js.map +1 -0
- package/dist/nodes/CraftDocuments/loadOptions/getDocuments.d.ts +2 -0
- package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js +18 -0
- package/dist/nodes/CraftDocuments/loadOptions/getDocuments.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/delete.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/delete.js +24 -0
- package/dist/nodes/CraftDocuments/resources/block/delete.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/get.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/get.js +91 -0
- package/dist/nodes/CraftDocuments/resources/block/get.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/index.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/index.js +104 -0
- package/dist/nodes/CraftDocuments/resources/block/index.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/insert.d.ts +3 -0
- package/dist/nodes/CraftDocuments/resources/block/insert.js +117 -0
- package/dist/nodes/CraftDocuments/resources/block/insert.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/move.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/move.js +81 -0
- package/dist/nodes/CraftDocuments/resources/block/move.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/search.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/search.js +96 -0
- package/dist/nodes/CraftDocuments/resources/block/search.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/block/update.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/block/update.js +85 -0
- package/dist/nodes/CraftDocuments/resources/block/update.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/addItems.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/addItems.js +60 -0
- package/dist/nodes/CraftDocuments/resources/collection/addItems.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/deleteItems.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js +36 -0
- package/dist/nodes/CraftDocuments/resources/collection/deleteItems.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/getItems.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/getItems.js +37 -0
- package/dist/nodes/CraftDocuments/resources/collection/getItems.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/getSchema.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/getSchema.js +45 -0
- package/dist/nodes/CraftDocuments/resources/collection/getSchema.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/index.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/index.js +101 -0
- package/dist/nodes/CraftDocuments/resources/collection/index.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/list.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/list.js +60 -0
- package/dist/nodes/CraftDocuments/resources/collection/list.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/collection/updateItems.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/collection/updateItems.js +67 -0
- package/dist/nodes/CraftDocuments/resources/collection/updateItems.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/document/index.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/document/index.js +31 -0
- package/dist/nodes/CraftDocuments/resources/document/index.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/document/list.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/document/list.js +15 -0
- package/dist/nodes/CraftDocuments/resources/document/list.js.map +1 -0
- package/dist/nodes/CraftDocuments/resources/search/index.d.ts +2 -0
- package/dist/nodes/CraftDocuments/resources/search/index.js +110 -0
- package/dist/nodes/CraftDocuments/resources/search/index.js.map +1 -0
- package/dist/nodes/CraftDocuments/shared/transport.d.ts +2 -0
- package/dist/nodes/CraftDocuments/shared/transport.js +20 -0
- package/dist/nodes/CraftDocuments/shared/transport.js.map +1 -0
- package/dist/package.json +11 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -6
- package/dist/nodes/CraftDailyNotes/shared/blockBuilder.d.ts +0 -18
- package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js +0 -191
- package/dist/nodes/CraftDailyNotes/shared/blockBuilder.js.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockDescription = void 0;
|
|
4
|
+
const get_1 = require("./get");
|
|
5
|
+
const insert_1 = require("./insert");
|
|
6
|
+
const update_1 = require("./update");
|
|
7
|
+
const delete_1 = require("./delete");
|
|
8
|
+
const move_1 = require("./move");
|
|
9
|
+
const search_1 = require("./search");
|
|
10
|
+
const showOnlyForBlocks = { resource: ['block'] };
|
|
11
|
+
exports.blockDescription = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Operation',
|
|
14
|
+
name: 'operation',
|
|
15
|
+
type: 'options',
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: { show: showOnlyForBlocks },
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
name: 'Delete',
|
|
21
|
+
value: 'delete',
|
|
22
|
+
action: 'Delete blocks from a document',
|
|
23
|
+
description: 'Delete blocks by their IDs',
|
|
24
|
+
routing: {
|
|
25
|
+
request: {
|
|
26
|
+
method: 'DELETE',
|
|
27
|
+
url: '/blocks',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Get',
|
|
33
|
+
value: 'get',
|
|
34
|
+
action: 'Get blocks from a document',
|
|
35
|
+
description: 'Fetch content from documents by document or block ID',
|
|
36
|
+
routing: {
|
|
37
|
+
request: {
|
|
38
|
+
method: 'GET',
|
|
39
|
+
url: '/blocks',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Insert',
|
|
45
|
+
value: 'insert',
|
|
46
|
+
action: 'Insert blocks into a document',
|
|
47
|
+
description: 'Insert content into a document',
|
|
48
|
+
routing: {
|
|
49
|
+
request: {
|
|
50
|
+
method: 'POST',
|
|
51
|
+
url: '/blocks',
|
|
52
|
+
},
|
|
53
|
+
send: {
|
|
54
|
+
preSend: [insert_1.blockInsertPreSend],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Move',
|
|
60
|
+
value: 'move',
|
|
61
|
+
action: 'Move blocks',
|
|
62
|
+
description: 'Move blocks to reorder or move between documents',
|
|
63
|
+
routing: {
|
|
64
|
+
request: {
|
|
65
|
+
method: 'PUT',
|
|
66
|
+
url: '/blocks/move',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Search in Document',
|
|
72
|
+
value: 'searchInDocument',
|
|
73
|
+
action: 'Search in a specific document',
|
|
74
|
+
description: 'Search content within a specific document using regex',
|
|
75
|
+
routing: {
|
|
76
|
+
request: {
|
|
77
|
+
method: 'GET',
|
|
78
|
+
url: '/blocks/search',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Update',
|
|
84
|
+
value: 'update',
|
|
85
|
+
action: 'Update blocks in a document',
|
|
86
|
+
description: 'Update content in documents',
|
|
87
|
+
routing: {
|
|
88
|
+
request: {
|
|
89
|
+
method: 'PUT',
|
|
90
|
+
url: '/blocks',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
default: 'get',
|
|
96
|
+
},
|
|
97
|
+
...get_1.blockGetDescription,
|
|
98
|
+
...insert_1.blockInsertDescription,
|
|
99
|
+
...update_1.blockUpdateDescription,
|
|
100
|
+
...delete_1.blockDeleteDescription,
|
|
101
|
+
...move_1.blockMoveDescription,
|
|
102
|
+
...search_1.blockSearchDescription,
|
|
103
|
+
];
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/index.ts"],"names":[],"mappings":";;;AAMA,+BAA4C;AAC5C,qCAAsE;AACtE,qCAAkD;AAClD,qCAAkD;AAClD,iCAA8C;AAC9C,qCAAkD;AAElD,MAAM,iBAAiB,GAAG,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAErC,QAAA,gBAAgB,GAAsB;IAElD;Q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BACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;iBACD;aACD;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,6BAA6B;gBACrC,WAAW,EAAE,6BAA6B;gBAC1C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,SAAS;qBACd;iBACD;aACD;SACD;QACD,OAAO,EAAE,KAAK;KACd;IAGD,GAAG,yBAAmB;IACtB,GAAG,+BAAsB;IACzB,GAAG,+BAAsB;IACzB,GAAG,+BAAsB;IACzB,GAAG,2BAAoB;IACvB,GAAG,+BAAsB;CACzB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { INodeProperties, IExecuteSingleFunctions, IHttpRequestOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function blockInsertPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
3
|
+
export declare const blockInsertDescription: INodeProperties[];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockInsertDescription = void 0;
|
|
4
|
+
exports.blockInsertPreSend = blockInsertPreSend;
|
|
5
|
+
const showOnlyForBlockInsert = { operation: ['insert'], resource: ['block'] };
|
|
6
|
+
function buildPositionObject(context) {
|
|
7
|
+
let positionType = 'end';
|
|
8
|
+
let targetPageId = '';
|
|
9
|
+
let referenceBlockId = '';
|
|
10
|
+
try {
|
|
11
|
+
positionType = context.getNodeParameter('positionType', 'end');
|
|
12
|
+
targetPageId = context.getNodeParameter('targetPageId', '');
|
|
13
|
+
referenceBlockId = context.getNodeParameter('referenceBlockId', '');
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
}
|
|
17
|
+
const position = {
|
|
18
|
+
position: positionType || 'end',
|
|
19
|
+
pageId: targetPageId,
|
|
20
|
+
};
|
|
21
|
+
if (['before', 'after'].includes(positionType) && referenceBlockId) {
|
|
22
|
+
position.referenceBlockId = referenceBlockId;
|
|
23
|
+
}
|
|
24
|
+
return position;
|
|
25
|
+
}
|
|
26
|
+
async function blockInsertPreSend(requestOptions) {
|
|
27
|
+
const position = buildPositionObject(this);
|
|
28
|
+
let markdownContent = '';
|
|
29
|
+
try {
|
|
30
|
+
const rawValue = this.getNodeParameter('markdownContent', '');
|
|
31
|
+
if (typeof rawValue === 'string') {
|
|
32
|
+
markdownContent = rawValue;
|
|
33
|
+
}
|
|
34
|
+
else if (rawValue) {
|
|
35
|
+
markdownContent = String(rawValue);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
markdownContent = '';
|
|
40
|
+
}
|
|
41
|
+
const requestBody = {
|
|
42
|
+
blocks: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
markdown: markdownContent,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
position: {
|
|
49
|
+
position: String(position.position || 'end'),
|
|
50
|
+
pageId: String(position.pageId || ''),
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
if (position.referenceBlockId) {
|
|
54
|
+
requestBody.position.referenceBlockId = String(position.referenceBlockId);
|
|
55
|
+
}
|
|
56
|
+
requestOptions.body = JSON.stringify(requestBody);
|
|
57
|
+
requestOptions.headers = {
|
|
58
|
+
'Content-Type': 'application/json',
|
|
59
|
+
'Accept': 'application/json',
|
|
60
|
+
};
|
|
61
|
+
return requestOptions;
|
|
62
|
+
}
|
|
63
|
+
exports.blockInsertDescription = [
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Target Document/Page ID',
|
|
66
|
+
name: 'targetPageId',
|
|
67
|
+
type: 'string',
|
|
68
|
+
default: '',
|
|
69
|
+
required: true,
|
|
70
|
+
placeholder: 'doc-123',
|
|
71
|
+
description: 'The ID of the document or page to insert into. Use "List Documents" to find available IDs.',
|
|
72
|
+
displayOptions: { show: showOnlyForBlockInsert },
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Markdown Content',
|
|
76
|
+
name: 'markdownContent',
|
|
77
|
+
type: 'string',
|
|
78
|
+
typeOptions: {
|
|
79
|
+
rows: 10,
|
|
80
|
+
},
|
|
81
|
+
default: '',
|
|
82
|
+
required: true,
|
|
83
|
+
placeholder: '# Meeting Notes\n\n- Discussed timeline\n- Assigned tasks\n\n```javascript\nconsole.log("code blocks work too!");\n```\n\nNext steps...',
|
|
84
|
+
description: 'Paste markdown content. Craft API automatically parses it into proper blocks (headers, code, lists, etc.).',
|
|
85
|
+
displayOptions: { show: showOnlyForBlockInsert },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
displayName: 'Insert Position',
|
|
89
|
+
name: 'positionType',
|
|
90
|
+
type: 'options',
|
|
91
|
+
noDataExpression: true,
|
|
92
|
+
options: [
|
|
93
|
+
{ name: 'End of Document', value: 'end' },
|
|
94
|
+
{ name: 'Start of Document', value: 'start' },
|
|
95
|
+
{ name: 'Before Block', value: 'before' },
|
|
96
|
+
{ name: 'After Block', value: 'after' },
|
|
97
|
+
],
|
|
98
|
+
default: 'end',
|
|
99
|
+
description: 'Where to insert the content in the document',
|
|
100
|
+
displayOptions: { show: showOnlyForBlockInsert },
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Reference Block ID',
|
|
104
|
+
name: 'referenceBlockId',
|
|
105
|
+
type: 'string',
|
|
106
|
+
default: '',
|
|
107
|
+
placeholder: 'Block UUID',
|
|
108
|
+
description: 'The block ID to position relative to (required for before/after)',
|
|
109
|
+
displayOptions: {
|
|
110
|
+
show: {
|
|
111
|
+
...showOnlyForBlockInsert,
|
|
112
|
+
positionType: ['before', 'after'],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
//# sourceMappingURL=insert.js.map
|
|
@@ -0,0 +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AE;YACZ,IAAI,EAAE,EAAE;SACR;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yIAAyI;QACtJ,WAAW,EAAE,4GAA4G;QACzH,cAAc,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;KAChD;IAGD;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE;YACzC,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE;YAC7C,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;YACzC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE;SACvC;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,6CAA6C;QAC1D,cAAc,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;KAChD;IAGD;QACC,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,kEAAkE;QAC/E,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,GAAG,sBAAsB;gBACzB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;aACjC;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockMoveDescription = void 0;
|
|
4
|
+
const showOnlyForBlockMove = { operation: ['move'], resource: ['block'] };
|
|
5
|
+
exports.blockMoveDescription = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Block IDs',
|
|
8
|
+
name: 'blockIds',
|
|
9
|
+
type: 'string',
|
|
10
|
+
default: '',
|
|
11
|
+
required: true,
|
|
12
|
+
placeholder: 'ID1, ID2, ID3 or ["ID1", "ID2"]',
|
|
13
|
+
description: 'Block IDs to move. Provide as comma-separated values or JSON array.',
|
|
14
|
+
displayOptions: { show: showOnlyForBlockMove },
|
|
15
|
+
routing: {
|
|
16
|
+
send: {
|
|
17
|
+
type: 'body',
|
|
18
|
+
property: 'blockIds',
|
|
19
|
+
value: '={{ $value.startsWith("[") ? JSON.parse($value) : $value.split(",").map(id => id.trim()) }}',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Position',
|
|
25
|
+
name: 'position',
|
|
26
|
+
type: 'fixedCollection',
|
|
27
|
+
default: {},
|
|
28
|
+
placeholder: 'Add Position',
|
|
29
|
+
displayOptions: { show: showOnlyForBlockMove },
|
|
30
|
+
options: [
|
|
31
|
+
{
|
|
32
|
+
name: 'positionValues',
|
|
33
|
+
displayName: 'Position',
|
|
34
|
+
values: [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Position Type',
|
|
37
|
+
name: 'position',
|
|
38
|
+
type: 'options',
|
|
39
|
+
options: [
|
|
40
|
+
{ name: 'End', value: 'end', description: 'Move to the end of the document' },
|
|
41
|
+
{ name: 'Start', value: 'start', description: 'Move to the start of the document' },
|
|
42
|
+
{ name: 'Before', value: 'before', description: 'Move before a specific block' },
|
|
43
|
+
{ name: 'After', value: 'after', description: 'Move after a specific block' },
|
|
44
|
+
],
|
|
45
|
+
default: 'end',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Target Document/Page ID',
|
|
49
|
+
name: 'pageId',
|
|
50
|
+
type: 'string',
|
|
51
|
+
default: '',
|
|
52
|
+
required: true,
|
|
53
|
+
placeholder: 'doc-123',
|
|
54
|
+
description: 'Which document/page to move the blocks to',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Reference Block ID',
|
|
58
|
+
name: 'referenceBlockId',
|
|
59
|
+
type: 'string',
|
|
60
|
+
default: '',
|
|
61
|
+
placeholder: 'Block ID (UUID)',
|
|
62
|
+
description: 'The block ID to position relative to (required for before/after)',
|
|
63
|
+
displayOptions: {
|
|
64
|
+
show: {
|
|
65
|
+
position: ['before', 'after'],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
routing: {
|
|
73
|
+
send: {
|
|
74
|
+
type: 'body',
|
|
75
|
+
property: 'position',
|
|
76
|
+
value: '={{ $value.positionValues ? { position: $value.positionValues.position, pageId: $value.positionValues.pageId, ...(["before", "after"].includes($value.positionValues.position) && $value.positionValues.referenceBlockId ? { referenceBlockId: $value.positionValues.referenceBlockId } : {}) } : { position: "end", pageId: "" } }}',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
//# sourceMappingURL=move.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/move.ts"],"names":[],"mappings":";;;AAQA,MAAM,oBAAoB,GAAG,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAE7D,QAAA,oBAAoB,GAAsB;IAEtD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE,qEAAqE;QAClF,cAAc,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;QAC9C,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,UAAU;gBACpB,KAAK,EACJ,6FAA6F;a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C7B;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,UAAU;gBAEpB,KAAK,EACJ,sUAAsU;aACvU;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockSearchDescription = void 0;
|
|
4
|
+
const showOnlyForBlockSearch = { operation: ['searchInDocument'], resource: ['block'] };
|
|
5
|
+
exports.blockSearchDescription = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Document ID',
|
|
8
|
+
name: 'documentId',
|
|
9
|
+
type: 'string',
|
|
10
|
+
default: '',
|
|
11
|
+
required: true,
|
|
12
|
+
placeholder: 'doc-123',
|
|
13
|
+
description: 'The document ID to search within. Use "List Documents" to find available IDs.',
|
|
14
|
+
displayOptions: { show: showOnlyForBlockSearch },
|
|
15
|
+
routing: {
|
|
16
|
+
send: {
|
|
17
|
+
type: 'query',
|
|
18
|
+
property: 'documentId',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Search Pattern',
|
|
24
|
+
name: 'pattern',
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: '',
|
|
27
|
+
required: true,
|
|
28
|
+
placeholder: 'meeting|agenda',
|
|
29
|
+
description: 'The search pattern. Supports NodeJS regular expressions.',
|
|
30
|
+
displayOptions: { show: showOnlyForBlockSearch },
|
|
31
|
+
routing: {
|
|
32
|
+
send: {
|
|
33
|
+
type: 'query',
|
|
34
|
+
property: 'pattern',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Options',
|
|
40
|
+
name: 'searchOptions',
|
|
41
|
+
type: 'collection',
|
|
42
|
+
placeholder: 'Add Option',
|
|
43
|
+
default: {},
|
|
44
|
+
displayOptions: { show: showOnlyForBlockSearch },
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Case Sensitive',
|
|
48
|
+
name: 'caseSensitive',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
default: false,
|
|
51
|
+
description: 'Whether the search should be case sensitive',
|
|
52
|
+
routing: {
|
|
53
|
+
send: {
|
|
54
|
+
type: 'query',
|
|
55
|
+
property: 'caseSensitive',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Blocks Before',
|
|
61
|
+
name: 'beforeBlockCount',
|
|
62
|
+
type: 'number',
|
|
63
|
+
typeOptions: {
|
|
64
|
+
minValue: 0,
|
|
65
|
+
maxValue: 5,
|
|
66
|
+
},
|
|
67
|
+
default: 0,
|
|
68
|
+
description: 'Number of blocks to include before each match for context',
|
|
69
|
+
routing: {
|
|
70
|
+
send: {
|
|
71
|
+
type: 'query',
|
|
72
|
+
property: 'beforeBlockCount',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: 'Blocks After',
|
|
78
|
+
name: 'afterBlockCount',
|
|
79
|
+
type: 'number',
|
|
80
|
+
typeOptions: {
|
|
81
|
+
minValue: 0,
|
|
82
|
+
maxValue: 5,
|
|
83
|
+
},
|
|
84
|
+
default: 0,
|
|
85
|
+
description: 'Number of blocks to include after each match for context',
|
|
86
|
+
routing: {
|
|
87
|
+
send: {
|
|
88
|
+
type: 'query',
|
|
89
|
+
property: 'afterBlockCount',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/search.ts"],"names":[],"mappings":";;;AAQA,MAAM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,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;iBACX;gBACD,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,2DAA2D;gBACxE,OAAO,EAAE;oBACR,IAAI,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,kBAAkB;qBAC5B;iBACD;aACD;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;iBACX;gBACD,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,0DAA0D;gBACvE,OAAO,EAAE;oBACR,IAAI,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,iBAAiB;qBAC3B;iBACD;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockUpdateDescription = void 0;
|
|
4
|
+
const showOnlyForBlockUpdate = { operation: ['update'], resource: ['block'] };
|
|
5
|
+
exports.blockUpdateDescription = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Blocks to Update',
|
|
8
|
+
name: 'blocksToUpdate',
|
|
9
|
+
type: 'fixedCollection',
|
|
10
|
+
typeOptions: {
|
|
11
|
+
multipleValues: true,
|
|
12
|
+
},
|
|
13
|
+
default: {},
|
|
14
|
+
placeholder: 'Add Block',
|
|
15
|
+
displayOptions: { show: showOnlyForBlockUpdate },
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'blockValues',
|
|
19
|
+
displayName: 'Block',
|
|
20
|
+
values: [
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Block ID',
|
|
23
|
+
name: 'id',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '',
|
|
26
|
+
required: true,
|
|
27
|
+
placeholder: 'E21E3640-FBD2-4887-BD1B-B1FFE1781168',
|
|
28
|
+
description: 'The UUID of the block to update',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
displayName: 'New Markdown',
|
|
32
|
+
name: 'markdown',
|
|
33
|
+
type: 'string',
|
|
34
|
+
typeOptions: {
|
|
35
|
+
rows: 4,
|
|
36
|
+
},
|
|
37
|
+
default: '',
|
|
38
|
+
description: 'The new markdown content for the block',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Text Style',
|
|
42
|
+
name: 'textStyle',
|
|
43
|
+
type: 'options',
|
|
44
|
+
options: [
|
|
45
|
+
{ name: 'Body', value: 'body' },
|
|
46
|
+
{ name: 'Caption', value: 'caption' },
|
|
47
|
+
{ name: 'Card', value: 'card' },
|
|
48
|
+
{ name: "Don't Change", value: '', description: 'Keep current text style' },
|
|
49
|
+
{ name: 'Heading 1', value: 'h1' },
|
|
50
|
+
{ name: 'Heading 2', value: 'h2' },
|
|
51
|
+
{ name: 'Heading 3', value: 'h3' },
|
|
52
|
+
{ name: 'Heading 4', value: 'h4' },
|
|
53
|
+
{ name: 'Page', value: 'page' },
|
|
54
|
+
],
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'The text style for the block. Code blocks are auto-detected from ``` markdown syntax.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'List Style',
|
|
60
|
+
name: 'listStyle',
|
|
61
|
+
type: 'options',
|
|
62
|
+
options: [
|
|
63
|
+
{ name: 'Bullet', value: 'bullet' },
|
|
64
|
+
{ name: "Don't Change", value: '', description: 'Keep current list style' },
|
|
65
|
+
{ name: 'None', value: 'none' },
|
|
66
|
+
{ name: 'Numbered', value: 'numbered' },
|
|
67
|
+
{ name: 'Todo', value: 'todo' },
|
|
68
|
+
{ name: 'Toggle', value: 'toggle' },
|
|
69
|
+
],
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'The list style for the block',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
routing: {
|
|
77
|
+
send: {
|
|
78
|
+
type: 'body',
|
|
79
|
+
property: 'blocks',
|
|
80
|
+
value: '={{ $value.blockValues ? $value.blockValues.map(b => { const block = { id: b.id }; if (b.markdown) block.markdown = b.markdown; if (b.textStyle && b.textStyle !== "") block.textStyle = b.textStyle; if (b.listStyle && b.listStyle !== "") block.listStyle = b.listStyle; return block; }) : [] }}',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/block/update.ts"],"names":[],"mappings":";;;AAQA,MAAM,sBAAsB,GAAG,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAEjE,QAAA,sBAAsB,GAAsB;IAExD;QACC,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,WAAW;QACxB,cAAc,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAChD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,OAAO;gBACpB,MAAM,EAAE;oBACP;wBACC,WAAW,EAAE,UAAU;wBACvB,IAAI,EAAE,IAAI;wBACV,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,sCAAsC;wBACnD,WAAW,EAAE,iCA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EAAE,KAAK,EAAE,MAAM,EAAE;4BAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;4BACvC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;4BAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;yBACnC;wBACD,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,8BAA8B;qBAC3C;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,QAAQ;gBAElB,KAAK,EACJ,sSAAsS;aACvS;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collectionAddItemsDescription = void 0;
|
|
4
|
+
const showOnlyForCollectionAddItems = { operation: ['addItems'], resource: ['collection'] };
|
|
5
|
+
exports.collectionAddItemsDescription = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Collection Name or ID',
|
|
8
|
+
name: 'collectionId',
|
|
9
|
+
type: 'options',
|
|
10
|
+
typeOptions: {
|
|
11
|
+
loadOptionsMethod: 'getCollections',
|
|
12
|
+
},
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
16
|
+
displayOptions: { show: showOnlyForCollectionAddItems },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Items',
|
|
20
|
+
name: 'items',
|
|
21
|
+
type: 'fixedCollection',
|
|
22
|
+
typeOptions: {
|
|
23
|
+
multipleValues: true,
|
|
24
|
+
},
|
|
25
|
+
default: {},
|
|
26
|
+
placeholder: 'Add Item',
|
|
27
|
+
displayOptions: { show: showOnlyForCollectionAddItems },
|
|
28
|
+
options: [
|
|
29
|
+
{
|
|
30
|
+
name: 'itemValues',
|
|
31
|
+
displayName: 'Item',
|
|
32
|
+
values: [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Title',
|
|
35
|
+
name: 'title',
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: '',
|
|
38
|
+
required: true,
|
|
39
|
+
description: 'The title for the new item',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Properties (JSON)',
|
|
43
|
+
name: 'properties',
|
|
44
|
+
type: 'json',
|
|
45
|
+
default: '{}',
|
|
46
|
+
description: 'Additional properties for the item as JSON object. Schema depends on collection.',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
routing: {
|
|
52
|
+
send: {
|
|
53
|
+
type: 'body',
|
|
54
|
+
property: 'items',
|
|
55
|
+
value: '={{ $value.itemValues ? $value.itemValues.map(item => ({ title: item.title, properties: typeof item.properties === "string" ? JSON.parse(item.properties || "{}") : (item.properties || {}) })) : [] }}',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
//# sourceMappingURL=addItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addItems.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/addItems.ts"],"names":[],"mappings":";;;AAQA,MAAM,6BAA6B,GAAG,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAE/E,QAAA,6BAA6B,GAAsB;IAE/D;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;KACvD;IAED;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,UAAU;QACvB,cAAc,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;QACvD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,MAAM;gBACnB,MAAM,EAAE;oBACP;wBACC,WAAW,EAAE,OAAO;wBACpB,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;qBACzC;oBACD;wBACC,WAAW,EAAE,mBAAmB;wBAChC,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,IAAI;wBACb,WAAW,EAAE,kFAAkF;qBAC/F;iBACD;aACD;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,OAAO;gBACjB,KAAK,EACJ,yMAAyM;aAC1M;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collectionDeleteItemsDescription = void 0;
|
|
4
|
+
const showOnlyForCollectionDeleteItems = { operation: ['deleteItems'], resource: ['collection'] };
|
|
5
|
+
exports.collectionDeleteItemsDescription = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Collection Name or ID',
|
|
8
|
+
name: 'collectionId',
|
|
9
|
+
type: 'options',
|
|
10
|
+
typeOptions: {
|
|
11
|
+
loadOptionsMethod: 'getCollections',
|
|
12
|
+
},
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
description: 'Select a collection from your documents. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
16
|
+
displayOptions: { show: showOnlyForCollectionDeleteItems },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Item IDs',
|
|
20
|
+
name: 'idsToDelete',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
required: true,
|
|
24
|
+
placeholder: 'ID1, ID2, ID3 or ["ID1", "ID2"]',
|
|
25
|
+
description: 'Item IDs to delete. Provide as comma-separated values or JSON array.',
|
|
26
|
+
displayOptions: { show: showOnlyForCollectionDeleteItems },
|
|
27
|
+
routing: {
|
|
28
|
+
send: {
|
|
29
|
+
type: 'body',
|
|
30
|
+
property: 'idsToDelete',
|
|
31
|
+
value: '={{ $value.startsWith("[") ? JSON.parse($value) : $value.split(",").map(id => id.trim()) }}',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
//# sourceMappingURL=deleteItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteItems.js","sourceRoot":"","sources":["../../../../../nodes/CraftDocuments/resources/collection/deleteItems.ts"],"names":[],"mappings":";;;AAQA,MAAM,gCAAgC,GAAG,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAErF,QAAA,gCAAgC,GAAsB;IAElE;QACC,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,0JAA0J;QACvK,cAAc,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE;KAC1D;IAED;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE,sEAAsE;QACnF,cAAc,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE;QAC1D,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,aAAa;gBACvB,KAAK,EACJ,6FAA6F;aAC9F;SACD;KACD;CACD,CAAC"}
|