@ibracob.dev/n8n-nodes-fal 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -0
  3. package/dist/credentials/FalApi.credentials.d.ts +10 -0
  4. package/dist/credentials/FalApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/FalApi.credentials.js +36 -0
  6. package/dist/credentials/FalApi.credentials.js.map +1 -0
  7. package/dist/credentials/fal-ai-logo.svg +3 -0
  8. package/dist/nodes/Fal/Fal.node.d.ts +6 -0
  9. package/dist/nodes/Fal/Fal.node.d.ts.map +1 -0
  10. package/dist/nodes/Fal/Fal.node.js +202 -0
  11. package/dist/nodes/Fal/Fal.node.js.map +1 -0
  12. package/dist/nodes/Fal/enums/index.d.ts +2 -0
  13. package/dist/nodes/Fal/enums/index.d.ts.map +1 -0
  14. package/dist/nodes/Fal/enums/index.js +18 -0
  15. package/dist/nodes/Fal/enums/index.js.map +1 -0
  16. package/dist/nodes/Fal/enums/queue-status.enum.d.ts +7 -0
  17. package/dist/nodes/Fal/enums/queue-status.enum.d.ts.map +1 -0
  18. package/dist/nodes/Fal/enums/queue-status.enum.js +11 -0
  19. package/dist/nodes/Fal/enums/queue-status.enum.js.map +1 -0
  20. package/dist/nodes/Fal/fal-ai-logo.svg +3 -0
  21. package/dist/nodes/Fal/interfaces/index.d.ts +3 -0
  22. package/dist/nodes/Fal/interfaces/index.d.ts.map +1 -0
  23. package/dist/nodes/Fal/interfaces/index.js +19 -0
  24. package/dist/nodes/Fal/interfaces/index.js.map +1 -0
  25. package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts +14 -0
  26. package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts.map +1 -0
  27. package/dist/nodes/Fal/interfaces/queue-status-response.interface.js +3 -0
  28. package/dist/nodes/Fal/interfaces/queue-status-response.interface.js.map +1 -0
  29. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts +6 -0
  30. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts.map +1 -0
  31. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js +3 -0
  32. package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js.map +1 -0
  33. package/dist/nodes/Fal/resources/image-editing/description.d.ts +5 -0
  34. package/dist/nodes/Fal/resources/image-editing/description.d.ts.map +1 -0
  35. package/dist/nodes/Fal/resources/image-editing/description.js +178 -0
  36. package/dist/nodes/Fal/resources/image-editing/description.js.map +1 -0
  37. package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts +3 -0
  38. package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts.map +1 -0
  39. package/dist/nodes/Fal/resources/image-editing/execute/index.js +63 -0
  40. package/dist/nodes/Fal/resources/image-editing/execute/index.js.map +1 -0
  41. package/dist/nodes/Fal/resources/image-editing/index.d.ts +4 -0
  42. package/dist/nodes/Fal/resources/image-editing/index.d.ts.map +1 -0
  43. package/dist/nodes/Fal/resources/image-editing/index.js +41 -0
  44. package/dist/nodes/Fal/resources/image-editing/index.js.map +1 -0
  45. package/dist/nodes/Fal/resources/image-editing/models.d.ts +6 -0
  46. package/dist/nodes/Fal/resources/image-editing/models.d.ts.map +1 -0
  47. package/dist/nodes/Fal/resources/image-editing/models.js +31 -0
  48. package/dist/nodes/Fal/resources/image-editing/models.js.map +1 -0
  49. package/dist/nodes/Fal/resources/image-to-video/description.d.ts +5 -0
  50. package/dist/nodes/Fal/resources/image-to-video/description.d.ts.map +1 -0
  51. package/dist/nodes/Fal/resources/image-to-video/description.js +236 -0
  52. package/dist/nodes/Fal/resources/image-to-video/description.js.map +1 -0
  53. package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts +3 -0
  54. package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts.map +1 -0
  55. package/dist/nodes/Fal/resources/image-to-video/execute/index.js +64 -0
  56. package/dist/nodes/Fal/resources/image-to-video/execute/index.js.map +1 -0
  57. package/dist/nodes/Fal/resources/image-to-video/index.d.ts +4 -0
  58. package/dist/nodes/Fal/resources/image-to-video/index.d.ts.map +1 -0
  59. package/dist/nodes/Fal/resources/image-to-video/index.js +41 -0
  60. package/dist/nodes/Fal/resources/image-to-video/index.js.map +1 -0
  61. package/dist/nodes/Fal/resources/image-to-video/models.d.ts +6 -0
  62. package/dist/nodes/Fal/resources/image-to-video/models.d.ts.map +1 -0
  63. package/dist/nodes/Fal/resources/image-to-video/models.js +66 -0
  64. package/dist/nodes/Fal/resources/image-to-video/models.js.map +1 -0
  65. package/dist/nodes/Fal/resources/llm/description.d.ts +5 -0
  66. package/dist/nodes/Fal/resources/llm/description.d.ts.map +1 -0
  67. package/dist/nodes/Fal/resources/llm/description.js +132 -0
  68. package/dist/nodes/Fal/resources/llm/description.js.map +1 -0
  69. package/dist/nodes/Fal/resources/llm/execute/index.d.ts +3 -0
  70. package/dist/nodes/Fal/resources/llm/execute/index.d.ts.map +1 -0
  71. package/dist/nodes/Fal/resources/llm/execute/index.js +49 -0
  72. package/dist/nodes/Fal/resources/llm/execute/index.js.map +1 -0
  73. package/dist/nodes/Fal/resources/llm/index.d.ts +4 -0
  74. package/dist/nodes/Fal/resources/llm/index.d.ts.map +1 -0
  75. package/dist/nodes/Fal/resources/llm/index.js +41 -0
  76. package/dist/nodes/Fal/resources/llm/index.js.map +1 -0
  77. package/dist/nodes/Fal/resources/llm/models.d.ts +6 -0
  78. package/dist/nodes/Fal/resources/llm/models.d.ts.map +1 -0
  79. package/dist/nodes/Fal/resources/llm/models.js +136 -0
  80. package/dist/nodes/Fal/resources/llm/models.js.map +1 -0
  81. package/dist/nodes/Fal/resources/queue/description.d.ts +4 -0
  82. package/dist/nodes/Fal/resources/queue/description.d.ts.map +1 -0
  83. package/dist/nodes/Fal/resources/queue/description.js +149 -0
  84. package/dist/nodes/Fal/resources/queue/description.js.map +1 -0
  85. package/dist/nodes/Fal/resources/queue/execute/index.d.ts +3 -0
  86. package/dist/nodes/Fal/resources/queue/execute/index.d.ts.map +1 -0
  87. package/dist/nodes/Fal/resources/queue/execute/index.js +220 -0
  88. package/dist/nodes/Fal/resources/queue/execute/index.js.map +1 -0
  89. package/dist/nodes/Fal/resources/queue/index.d.ts +4 -0
  90. package/dist/nodes/Fal/resources/queue/index.d.ts.map +1 -0
  91. package/dist/nodes/Fal/resources/queue/index.js +9 -0
  92. package/dist/nodes/Fal/resources/queue/index.js.map +1 -0
  93. package/dist/nodes/Fal/resources/queue/models.d.ts +75 -0
  94. package/dist/nodes/Fal/resources/queue/models.d.ts.map +1 -0
  95. package/dist/nodes/Fal/resources/queue/models.js +12 -0
  96. package/dist/nodes/Fal/resources/queue/models.js.map +1 -0
  97. package/dist/nodes/Fal/resources/text-to-image/description.d.ts +5 -0
  98. package/dist/nodes/Fal/resources/text-to-image/description.d.ts.map +1 -0
  99. package/dist/nodes/Fal/resources/text-to-image/description.js +165 -0
  100. package/dist/nodes/Fal/resources/text-to-image/description.js.map +1 -0
  101. package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts +3 -0
  102. package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts.map +1 -0
  103. package/dist/nodes/Fal/resources/text-to-image/execute/index.js +64 -0
  104. package/dist/nodes/Fal/resources/text-to-image/execute/index.js.map +1 -0
  105. package/dist/nodes/Fal/resources/text-to-image/index.d.ts +4 -0
  106. package/dist/nodes/Fal/resources/text-to-image/index.d.ts.map +1 -0
  107. package/dist/nodes/Fal/resources/text-to-image/index.js +41 -0
  108. package/dist/nodes/Fal/resources/text-to-image/index.js.map +1 -0
  109. package/dist/nodes/Fal/resources/text-to-image/models.d.ts +6 -0
  110. package/dist/nodes/Fal/resources/text-to-image/models.d.ts.map +1 -0
  111. package/dist/nodes/Fal/resources/text-to-image/models.js +36 -0
  112. package/dist/nodes/Fal/resources/text-to-image/models.js.map +1 -0
  113. package/dist/nodes/Fal/resources/text-to-video/description.d.ts +5 -0
  114. package/dist/nodes/Fal/resources/text-to-video/description.d.ts.map +1 -0
  115. package/dist/nodes/Fal/resources/text-to-video/description.js +174 -0
  116. package/dist/nodes/Fal/resources/text-to-video/description.js.map +1 -0
  117. package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts +3 -0
  118. package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts.map +1 -0
  119. package/dist/nodes/Fal/resources/text-to-video/execute/index.js +57 -0
  120. package/dist/nodes/Fal/resources/text-to-video/execute/index.js.map +1 -0
  121. package/dist/nodes/Fal/resources/text-to-video/index.d.ts +4 -0
  122. package/dist/nodes/Fal/resources/text-to-video/index.d.ts.map +1 -0
  123. package/dist/nodes/Fal/resources/text-to-video/index.js +41 -0
  124. package/dist/nodes/Fal/resources/text-to-video/index.js.map +1 -0
  125. package/dist/nodes/Fal/resources/text-to-video/models.d.ts +6 -0
  126. package/dist/nodes/Fal/resources/text-to-video/models.d.ts.map +1 -0
  127. package/dist/nodes/Fal/resources/text-to-video/models.js +26 -0
  128. package/dist/nodes/Fal/resources/text-to-video/models.js.map +1 -0
  129. package/dist/nodes/Fal/resources/utility/description.d.ts +5 -0
  130. package/dist/nodes/Fal/resources/utility/description.d.ts.map +1 -0
  131. package/dist/nodes/Fal/resources/utility/description.js +101 -0
  132. package/dist/nodes/Fal/resources/utility/description.js.map +1 -0
  133. package/dist/nodes/Fal/resources/utility/execute/index.d.ts +3 -0
  134. package/dist/nodes/Fal/resources/utility/execute/index.d.ts.map +1 -0
  135. package/dist/nodes/Fal/resources/utility/execute/index.js +56 -0
  136. package/dist/nodes/Fal/resources/utility/execute/index.js.map +1 -0
  137. package/dist/nodes/Fal/resources/utility/index.d.ts +4 -0
  138. package/dist/nodes/Fal/resources/utility/index.d.ts.map +1 -0
  139. package/dist/nodes/Fal/resources/utility/index.js +41 -0
  140. package/dist/nodes/Fal/resources/utility/index.js.map +1 -0
  141. package/dist/nodes/Fal/resources/utility/models.d.ts +6 -0
  142. package/dist/nodes/Fal/resources/utility/models.d.ts.map +1 -0
  143. package/dist/nodes/Fal/resources/utility/models.js +31 -0
  144. package/dist/nodes/Fal/resources/utility/models.js.map +1 -0
  145. package/dist/nodes/Fal/resources/video-to-video/description.d.ts +5 -0
  146. package/dist/nodes/Fal/resources/video-to-video/description.d.ts.map +1 -0
  147. package/dist/nodes/Fal/resources/video-to-video/description.js +144 -0
  148. package/dist/nodes/Fal/resources/video-to-video/description.js.map +1 -0
  149. package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts +3 -0
  150. package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts.map +1 -0
  151. package/dist/nodes/Fal/resources/video-to-video/execute/index.js +47 -0
  152. package/dist/nodes/Fal/resources/video-to-video/execute/index.js.map +1 -0
  153. package/dist/nodes/Fal/resources/video-to-video/index.d.ts +4 -0
  154. package/dist/nodes/Fal/resources/video-to-video/index.d.ts.map +1 -0
  155. package/dist/nodes/Fal/resources/video-to-video/index.js +41 -0
  156. package/dist/nodes/Fal/resources/video-to-video/index.js.map +1 -0
  157. package/dist/nodes/Fal/resources/video-to-video/models.d.ts +6 -0
  158. package/dist/nodes/Fal/resources/video-to-video/models.d.ts.map +1 -0
  159. package/dist/nodes/Fal/resources/video-to-video/models.js +11 -0
  160. package/dist/nodes/Fal/resources/video-to-video/models.js.map +1 -0
  161. package/dist/nodes/Fal/resources/vision/description.d.ts +5 -0
  162. package/dist/nodes/Fal/resources/vision/description.d.ts.map +1 -0
  163. package/dist/nodes/Fal/resources/vision/description.js +146 -0
  164. package/dist/nodes/Fal/resources/vision/description.js.map +1 -0
  165. package/dist/nodes/Fal/resources/vision/execute/index.d.ts +3 -0
  166. package/dist/nodes/Fal/resources/vision/execute/index.d.ts.map +1 -0
  167. package/dist/nodes/Fal/resources/vision/execute/index.js +56 -0
  168. package/dist/nodes/Fal/resources/vision/execute/index.js.map +1 -0
  169. package/dist/nodes/Fal/resources/vision/index.d.ts +4 -0
  170. package/dist/nodes/Fal/resources/vision/index.d.ts.map +1 -0
  171. package/dist/nodes/Fal/resources/vision/index.js +41 -0
  172. package/dist/nodes/Fal/resources/vision/index.js.map +1 -0
  173. package/dist/nodes/Fal/resources/vision/models.d.ts +6 -0
  174. package/dist/nodes/Fal/resources/vision/models.d.ts.map +1 -0
  175. package/dist/nodes/Fal/resources/vision/models.js +46 -0
  176. package/dist/nodes/Fal/resources/vision/models.js.map +1 -0
  177. package/dist/nodes/Fal/resources/workflow/description.d.ts +4 -0
  178. package/dist/nodes/Fal/resources/workflow/description.d.ts.map +1 -0
  179. package/dist/nodes/Fal/resources/workflow/description.js +178 -0
  180. package/dist/nodes/Fal/resources/workflow/description.js.map +1 -0
  181. package/dist/nodes/Fal/resources/workflow/execute/index.d.ts +3 -0
  182. package/dist/nodes/Fal/resources/workflow/execute/index.d.ts.map +1 -0
  183. package/dist/nodes/Fal/resources/workflow/execute/index.js +120 -0
  184. package/dist/nodes/Fal/resources/workflow/execute/index.js.map +1 -0
  185. package/dist/nodes/Fal/resources/workflow/index.d.ts +4 -0
  186. package/dist/nodes/Fal/resources/workflow/index.d.ts.map +1 -0
  187. package/dist/nodes/Fal/resources/workflow/index.js +9 -0
  188. package/dist/nodes/Fal/resources/workflow/index.js.map +1 -0
  189. package/dist/nodes/Fal/resources/workflow/models.d.ts +65 -0
  190. package/dist/nodes/Fal/resources/workflow/models.d.ts.map +1 -0
  191. package/dist/nodes/Fal/resources/workflow/models.js +9 -0
  192. package/dist/nodes/Fal/resources/workflow/models.js.map +1 -0
  193. package/dist/nodes/Fal/utils/poll-queue.util.d.ts +9 -0
  194. package/dist/nodes/Fal/utils/poll-queue.util.d.ts.map +1 -0
  195. package/dist/nodes/Fal/utils/poll-queue.util.js +62 -0
  196. package/dist/nodes/Fal/utils/poll-queue.util.js.map +1 -0
  197. package/package.json +86 -0
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = exports.textToImageFields = exports.textToImageOperations = void 0;
4
+ const models_1 = require("./models");
5
+ exports.textToImageOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['textToImage'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Generate',
19
+ value: 'generate',
20
+ description: 'Generate an image from text',
21
+ action: 'Generate an image from text',
22
+ },
23
+ ],
24
+ default: 'generate',
25
+ },
26
+ ];
27
+ exports.textToImageFields = [
28
+ {
29
+ displayName: 'Model',
30
+ name: 'model',
31
+ type: 'options',
32
+ displayOptions: {
33
+ show: {
34
+ resource: ['textToImage'],
35
+ operation: ['generate'],
36
+ },
37
+ },
38
+ options: models_1.textToImageModels,
39
+ default: 'fal-ai/flux-pro/v1.1',
40
+ description: 'The AI model to use for image generation',
41
+ },
42
+ {
43
+ displayName: 'Prompt',
44
+ name: 'prompt',
45
+ type: 'string',
46
+ typeOptions: {
47
+ rows: 4,
48
+ },
49
+ displayOptions: {
50
+ show: {
51
+ resource: ['textToImage'],
52
+ operation: ['generate'],
53
+ },
54
+ },
55
+ default: '',
56
+ required: true,
57
+ placeholder: '={{$json.imagePrompt}} or A serene landscape with mountains...',
58
+ description: 'The text prompt to generate an image from. Supports expressions from previous nodes.',
59
+ },
60
+ {
61
+ displayName: 'Additional Options',
62
+ name: 'additionalOptions',
63
+ type: 'collection',
64
+ placeholder: 'Add Option',
65
+ default: {},
66
+ displayOptions: {
67
+ show: {
68
+ resource: ['textToImage'],
69
+ operation: ['generate'],
70
+ },
71
+ },
72
+ options: [
73
+ {
74
+ displayName: 'Image Size',
75
+ name: 'imageSize',
76
+ type: 'options',
77
+ options: [
78
+ {
79
+ name: 'Square (1024x1024)',
80
+ value: 'square',
81
+ },
82
+ {
83
+ name: 'Landscape (1280x720)',
84
+ value: 'landscape',
85
+ },
86
+ {
87
+ name: 'Portrait (720x1280)',
88
+ value: 'portrait',
89
+ },
90
+ {
91
+ name: 'Custom',
92
+ value: 'custom',
93
+ },
94
+ ],
95
+ default: 'square',
96
+ description: 'The size of the generated image',
97
+ },
98
+ {
99
+ displayName: 'Width',
100
+ name: 'width',
101
+ type: 'number',
102
+ displayOptions: {
103
+ show: {
104
+ imageSize: ['custom'],
105
+ },
106
+ },
107
+ default: 1024,
108
+ description: 'Width of the generated image',
109
+ },
110
+ {
111
+ displayName: 'Height',
112
+ name: 'height',
113
+ type: 'number',
114
+ displayOptions: {
115
+ show: {
116
+ imageSize: ['custom'],
117
+ },
118
+ },
119
+ default: 1024,
120
+ description: 'Height of the generated image',
121
+ },
122
+ {
123
+ displayName: 'Number of Images',
124
+ name: 'numImages',
125
+ type: 'number',
126
+ default: 1,
127
+ description: 'Number of images to generate',
128
+ },
129
+ {
130
+ displayName: 'Seed',
131
+ name: 'seed',
132
+ type: 'number',
133
+ default: -1,
134
+ description: 'Random seed for reproducibility. Use -1 for random.',
135
+ },
136
+ {
137
+ displayName: 'Guidance Scale',
138
+ name: 'guidanceScale',
139
+ type: 'number',
140
+ typeOptions: {
141
+ minValue: 0,
142
+ maxValue: 20,
143
+ },
144
+ default: 7.5,
145
+ description: 'How closely to follow the prompt (0-20)',
146
+ },
147
+ {
148
+ displayName: 'Number of Inference Steps',
149
+ name: 'numInferenceSteps',
150
+ type: 'number',
151
+ default: 50,
152
+ description: 'Number of denoising steps',
153
+ },
154
+ {
155
+ displayName: 'Safety Check',
156
+ name: 'safetyCheck',
157
+ type: 'boolean',
158
+ default: true,
159
+ description: 'Whether to run safety checks on generated images',
160
+ },
161
+ ],
162
+ },
163
+ ];
164
+ exports.description = [...exports.textToImageOperations, ...exports.textToImageFields];
165
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/description.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAEhC,QAAA,qBAAqB,GAAsB;IACvD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE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,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,EAAE;iBACZ;gBACD,OAAO,EAAE,GAAG;gBACZ,WAAW,EAAE,yCAAyC;aACtD;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,2BAA2B;aACxC;YACD;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,kDAAkD;aAC/D;SACD;KACD;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB,CAAC,GAAG,6BAAqB,EAAE,GAAG,yBAAiB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, IDataObject } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/text-to-image/execute/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAC;AAI5E,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAoE9F"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const poll_queue_util_1 = require("../../../utils/poll-queue.util");
6
+ async function execute(itemIndex) {
7
+ const model = this.getNodeParameter('model', itemIndex);
8
+ const prompt = this.getNodeParameter('prompt', itemIndex);
9
+ const additionalOptions = this.getNodeParameter('additionalOptions', itemIndex, {});
10
+ // Build the request body
11
+ const body = {
12
+ prompt,
13
+ };
14
+ // Handle image size
15
+ const imageSize = additionalOptions.imageSize || 'square';
16
+ if (imageSize === 'custom') {
17
+ body.image_size = {
18
+ width: additionalOptions.width || 1024,
19
+ height: additionalOptions.height || 1024,
20
+ };
21
+ }
22
+ else {
23
+ const sizes = {
24
+ square: { width: 1024, height: 1024 },
25
+ landscape: { width: 1280, height: 720 },
26
+ portrait: { width: 720, height: 1280 },
27
+ };
28
+ body.image_size = sizes[imageSize];
29
+ }
30
+ // Add optional parameters
31
+ if (additionalOptions.numImages) {
32
+ body.num_images = additionalOptions.numImages;
33
+ }
34
+ if (additionalOptions.seed && additionalOptions.seed !== -1) {
35
+ body.seed = additionalOptions.seed;
36
+ }
37
+ if (additionalOptions.guidanceScale) {
38
+ body.guidance_scale = additionalOptions.guidanceScale;
39
+ }
40
+ if (additionalOptions.numInferenceSteps) {
41
+ body.num_inference_steps = additionalOptions.numInferenceSteps;
42
+ }
43
+ if (additionalOptions.safetyCheck !== undefined) {
44
+ body.enable_safety_checker = additionalOptions.safetyCheck;
45
+ }
46
+ // Submit the request to the queue
47
+ const submitResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
48
+ method: 'POST',
49
+ url: `/${model}`,
50
+ body,
51
+ json: true,
52
+ });
53
+ const queueData = submitResponse;
54
+ if (!queueData.request_id) {
55
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), {
56
+ message: 'Failed to submit request to queue',
57
+ description: 'No request_id received',
58
+ });
59
+ }
60
+ // Poll for completion
61
+ const result = await poll_queue_util_1.pollQueue.call(this, queueData.request_id, queueData.response_url);
62
+ return result;
63
+ }
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/text-to-image/execute/index.ts"],"names":[],"mappings":";;AAIA,0BAoEC;AAxED,+CAA4E;AAC5E,oEAA2D;AAGpD,KAAK,UAAU,OAAO,CAA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C;IACD,IAAI,iBAAiB,CAAC,aAAa,EAAE,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC,aAAa,CAAC;IACvD,CAAC;IACD,IAAI,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC;IAChE,CAAC;IACD,IAAI,iBAAiB,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACjD,IAAI,CAAC,qBAAqB,GAAG,iBAAiB,CAAC,WAAW,CAAC;IAC5D,CAAC;IAED,kCAAkC;IAClC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE;QAC5F,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,IAAI,KAAK,EAAE;QAChB,IAAI;QACJ,IAAI,EAAE,IAAI;KACV,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,cAAqC,CAAC;IAExD,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;YACtC,OAAO,EAAE,mCAAmC;YAC5C,WAAW,EAAE,wBAAwB;SACrC,CAAC,CAAC;IACJ,CAAC;IAED,sBAAsB;IACtB,MAAM,MAAM,GAAG,MAAM,2BAAS,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAExF,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as execute from './execute';
2
+ export { description } from './description';
3
+ export { execute };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.execute = exports.description = void 0;
37
+ const execute = __importStar(require("./execute"));
38
+ exports.execute = execute;
39
+ var description_1 = require("./description");
40
+ Object.defineProperty(exports, "description", { enumerable: true, get: function () { return description_1.description; } });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AAG5B,0BAAO;AADhB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const textToImageModels: {
2
+ name: string;
3
+ value: string;
4
+ description: string;
5
+ }[];
6
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/models.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;GA+B7B,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.textToImageModels = void 0;
4
+ exports.textToImageModels = [
5
+ {
6
+ name: 'FLUX 1.1 Pro',
7
+ value: 'fal-ai/flux-pro/v1.1',
8
+ description: 'High-quality text-to-image generation',
9
+ },
10
+ {
11
+ name: 'FLUX 1 Pro',
12
+ value: 'fal-ai/flux-pro',
13
+ description: 'Professional text-to-image generation',
14
+ },
15
+ {
16
+ name: 'FLUX 1 Dev',
17
+ value: 'fal-ai/flux/dev',
18
+ description: 'Development version of FLUX',
19
+ },
20
+ {
21
+ name: 'FLUX 1 Schnell',
22
+ value: 'fal-ai/flux/schnell',
23
+ description: 'Fast text-to-image generation',
24
+ },
25
+ {
26
+ name: 'Stable Diffusion XL',
27
+ value: 'fal-ai/fast-sdxl',
28
+ description: 'Fast Stable Diffusion XL',
29
+ },
30
+ {
31
+ name: 'Stable Diffusion 3.5 Large',
32
+ value: 'fal-ai/stable-diffusion-v3-5-large',
33
+ description: 'Latest Stable Diffusion 3.5 Large model',
34
+ },
35
+ ];
36
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-image/models.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAChC;QACC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,uCAAuC;KACpD;IACD;QACC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,uCAAuC;KACpD;IACD;QACC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,6BAA6B;KAC1C;IACD;QACC,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,+BAA+B;KAC5C;IACD;QACC,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,0BAA0B;KACvC;IACD;QACC,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EAAE,yCAAyC;KACtD;CACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const textToVideoOperations: INodeProperties[];
3
+ export declare const textToVideoFields: INodeProperties[];
4
+ export declare const description: INodeProperties[];
5
+ //# sourceMappingURL=description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,qBAAqB,EAAE,eAAe,EAqBlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAkJ9C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAAqD,CAAC"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = exports.textToVideoFields = exports.textToVideoOperations = void 0;
4
+ const models_1 = require("./models");
5
+ exports.textToVideoOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['textToVideo'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Generate',
19
+ value: 'generate',
20
+ description: 'Generate a video from text',
21
+ action: 'Generate a video from text',
22
+ },
23
+ ],
24
+ default: 'generate',
25
+ },
26
+ ];
27
+ exports.textToVideoFields = [
28
+ {
29
+ displayName: 'Model',
30
+ name: 'model',
31
+ type: 'options',
32
+ displayOptions: {
33
+ show: {
34
+ resource: ['textToVideo'],
35
+ operation: ['generate'],
36
+ },
37
+ },
38
+ options: models_1.textToVideoModels,
39
+ default: 'fal-ai/veo3.1/fast',
40
+ description: 'The AI model to use for video generation',
41
+ },
42
+ {
43
+ displayName: 'Prompt',
44
+ name: 'prompt',
45
+ type: 'string',
46
+ typeOptions: {
47
+ rows: 4,
48
+ },
49
+ displayOptions: {
50
+ show: {
51
+ resource: ['textToVideo'],
52
+ operation: ['generate'],
53
+ },
54
+ },
55
+ default: '',
56
+ required: true,
57
+ placeholder: '={{$json.videoPrompt}} or A cinematic shot of waves crashing...',
58
+ description: 'The text prompt describing the video you want to generate. Supports expressions from previous nodes.',
59
+ },
60
+ {
61
+ displayName: 'Additional Options',
62
+ name: 'additionalOptions',
63
+ type: 'collection',
64
+ placeholder: 'Add Option',
65
+ default: {},
66
+ displayOptions: {
67
+ show: {
68
+ resource: ['textToVideo'],
69
+ operation: ['generate'],
70
+ },
71
+ },
72
+ options: [
73
+ {
74
+ displayName: 'Duration',
75
+ name: 'duration',
76
+ type: 'options',
77
+ options: [
78
+ {
79
+ name: '4 seconds',
80
+ value: '4s',
81
+ },
82
+ {
83
+ name: '6 seconds',
84
+ value: '6s',
85
+ },
86
+ {
87
+ name: '8 seconds',
88
+ value: '8s',
89
+ },
90
+ ],
91
+ default: '8s',
92
+ description: 'Duration of the generated video in seconds',
93
+ },
94
+ {
95
+ displayName: 'Aspect Ratio',
96
+ name: 'aspectRatio',
97
+ type: 'options',
98
+ options: [
99
+ {
100
+ name: '16:9',
101
+ value: '16:9',
102
+ },
103
+ {
104
+ name: '9:16',
105
+ value: '9:16',
106
+ },
107
+ {
108
+ name: '1:1',
109
+ value: '1:1',
110
+ },
111
+ ],
112
+ default: '16:9',
113
+ description: 'Aspect ratio of the generated video',
114
+ },
115
+ {
116
+ displayName: 'Resolution',
117
+ name: 'resolution',
118
+ type: 'options',
119
+ options: [
120
+ {
121
+ name: '720p',
122
+ value: '720p',
123
+ },
124
+ {
125
+ name: '1080p',
126
+ value: '1080p',
127
+ },
128
+ ],
129
+ default: '720p',
130
+ description: 'Resolution of the generated video',
131
+ },
132
+ {
133
+ displayName: 'Generate Audio',
134
+ name: 'generateAudio',
135
+ type: 'boolean',
136
+ default: true,
137
+ description: 'Whether to generate audio. If false, 33% less credits will be used.',
138
+ },
139
+ {
140
+ displayName: 'Negative Prompt',
141
+ name: 'negativePrompt',
142
+ type: 'string',
143
+ typeOptions: {
144
+ rows: 2,
145
+ },
146
+ default: '',
147
+ description: 'A negative prompt to guide the video generation',
148
+ },
149
+ {
150
+ displayName: 'Enhance Prompt',
151
+ name: 'enhancePrompt',
152
+ type: 'boolean',
153
+ default: true,
154
+ description: 'Whether to enhance the video generation',
155
+ },
156
+ {
157
+ displayName: 'Auto Fix',
158
+ name: 'autoFix',
159
+ type: 'boolean',
160
+ default: true,
161
+ description: 'Whether to automatically fix prompts that fail content policy',
162
+ },
163
+ {
164
+ displayName: 'Seed',
165
+ name: 'seed',
166
+ type: 'number',
167
+ default: -1,
168
+ description: 'Random seed for reproducibility. Use -1 for random.',
169
+ },
170
+ ],
171
+ },
172
+ ];
173
+ exports.description = [...exports.textToVideoOperations, ...exports.textToVideoFields];
174
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/description.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAEhC,QAAA,qBAAqB,GAAsB;IACvD;QACC,WAAW,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gBACd,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,iDAAiD;aAC9D;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,yCAAyC;aACtD;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,+DAA+D;aAC5E;YACD;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC,CAAC;gBACX,WAAW,EAAE,qDAAqD;aAClE;SACD;KACD;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB,CAAC,GAAG,6BAAqB,EAAE,GAAG,yBAAiB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { IExecuteFunctions, IDataObject } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, itemIndex: number): Promise<IDataObject>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/text-to-video/execute/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAC;AAI5E,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6D9F"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const poll_queue_util_1 = require("../../../utils/poll-queue.util");
6
+ async function execute(itemIndex) {
7
+ const model = this.getNodeParameter('model', itemIndex);
8
+ const prompt = this.getNodeParameter('prompt', itemIndex);
9
+ const additionalOptions = this.getNodeParameter('additionalOptions', itemIndex, {});
10
+ // Build the request body
11
+ const body = {
12
+ prompt,
13
+ };
14
+ // Add optional parameters
15
+ if (additionalOptions.duration) {
16
+ body.duration = additionalOptions.duration;
17
+ }
18
+ if (additionalOptions.aspectRatio) {
19
+ body.aspect_ratio = additionalOptions.aspectRatio;
20
+ }
21
+ if (additionalOptions.resolution) {
22
+ body.resolution = additionalOptions.resolution;
23
+ }
24
+ if (additionalOptions.generateAudio !== undefined) {
25
+ body.generate_audio = additionalOptions.generateAudio;
26
+ }
27
+ if (additionalOptions.negativePrompt) {
28
+ body.negative_prompt = additionalOptions.negativePrompt;
29
+ }
30
+ if (additionalOptions.enhancePrompt !== undefined) {
31
+ body.enhance_prompt = additionalOptions.enhancePrompt;
32
+ }
33
+ if (additionalOptions.autoFix !== undefined) {
34
+ body.auto_fix = additionalOptions.autoFix;
35
+ }
36
+ if (additionalOptions.seed && additionalOptions.seed !== -1) {
37
+ body.seed = additionalOptions.seed;
38
+ }
39
+ // Submit the request to the queue
40
+ const submitResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
41
+ method: 'POST',
42
+ url: `/${model}`,
43
+ body,
44
+ json: true,
45
+ });
46
+ const queueData = submitResponse;
47
+ if (!queueData.request_id) {
48
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), {
49
+ message: 'Failed to submit request to queue',
50
+ description: 'No request_id received',
51
+ });
52
+ }
53
+ // Poll for completion
54
+ const result = await poll_queue_util_1.pollQueue.call(this, queueData.request_id, queueData.response_url);
55
+ return result;
56
+ }
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/text-to-video/execute/index.ts"],"names":[],"mappings":";;AAIA,0BA6DC;AAjED,+CAA4E;AAC5E,oEAA2D;AAGpD,KA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I,iBAAiB,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,kCAAkC;IAClC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE;QAC5F,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,IAAI,KAAK,EAAE;QAChB,IAAI;QACJ,IAAI,EAAE,IAAI;KACV,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,cAAqC,CAAC;IAExD,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;YACtC,OAAO,EAAE,mCAAmC;YAC5C,WAAW,EAAE,wBAAwB;SACrC,CAAC,CAAC;IACJ,CAAC;IAED,sBAAsB;IACtB,MAAM,MAAM,GAAG,MAAM,2BAAS,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAExF,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as execute from './execute';
2
+ export { description } from './description';
3
+ export { execute };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,CAAC"}