@uploadista/core 0.0.15 → 0.0.16-beta.2

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 (97) hide show
  1. package/dist/{checksum-BaO9w1gC.mjs → checksum-Cwf-Mqw5.mjs} +2 -2
  2. package/dist/{checksum-BaO9w1gC.mjs.map → checksum-Cwf-Mqw5.mjs.map} +1 -1
  3. package/dist/{checksum-DXCv7Avr.cjs → checksum-DIrJRrlk.cjs} +1 -1
  4. package/dist/errors/index.cjs +1 -1
  5. package/dist/errors/index.d.cts +1 -1
  6. package/dist/errors/index.d.mts +1 -1
  7. package/dist/errors/index.mjs +1 -1
  8. package/dist/flow/index.cjs +1 -1
  9. package/dist/flow/index.d.cts +5 -5
  10. package/dist/flow/index.d.mts +5 -5
  11. package/dist/flow/index.mjs +1 -1
  12. package/dist/flow-BtI159Fi.mjs +2 -0
  13. package/dist/flow-BtI159Fi.mjs.map +1 -0
  14. package/dist/flow-DK3kacMQ.cjs +1 -0
  15. package/dist/{index-CdP4c5LF.d.mts → index-8m7lfPuJ.d.mts} +612 -245
  16. package/dist/index-8m7lfPuJ.d.mts.map +1 -0
  17. package/dist/{index-Bu5i-gcV.d.mts → index-BGi1r_fi.d.mts} +2 -2
  18. package/dist/{index-Bu5i-gcV.d.mts.map → index-BGi1r_fi.d.mts.map} +1 -1
  19. package/dist/{index-T6MZvUlM.d.cts → index-B_SvQ0MU.d.cts} +2 -2
  20. package/dist/{index-T6MZvUlM.d.cts.map → index-B_SvQ0MU.d.cts.map} +1 -1
  21. package/dist/{index-3jSHmGwH.d.mts → index-DIWuZlxd.d.mts} +2 -2
  22. package/dist/{index-3jSHmGwH.d.mts.map → index-DIWuZlxd.d.mts.map} +1 -1
  23. package/dist/{index-BmL4G8Qk.d.cts → index-DiKp9dFO.d.cts} +612 -245
  24. package/dist/index-DiKp9dFO.d.cts.map +1 -0
  25. package/dist/{index-CHGBYDtr.d.cts → index-qIN6ULCb.d.cts} +2 -2
  26. package/dist/{index-CHGBYDtr.d.cts.map → index-qIN6ULCb.d.cts.map} +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.cts +5 -5
  29. package/dist/index.d.mts +5 -5
  30. package/dist/index.mjs +1 -1
  31. package/dist/{stream-limiter-BcTJAjs-.cjs → stream-limiter-B6dfCtCy.cjs} +1 -1
  32. package/dist/{stream-limiter-D1-sVS5i.mjs → stream-limiter-Dfyh6hbh.mjs} +2 -2
  33. package/dist/{stream-limiter-D1-sVS5i.mjs.map → stream-limiter-Dfyh6hbh.mjs.map} +1 -1
  34. package/dist/streams/index.cjs +1 -1
  35. package/dist/streams/index.d.cts +2 -2
  36. package/dist/streams/index.d.mts +2 -2
  37. package/dist/streams/index.mjs +1 -1
  38. package/dist/testing/index.cjs +1 -1
  39. package/dist/testing/index.d.cts +67 -45
  40. package/dist/testing/index.d.cts.map +1 -1
  41. package/dist/testing/index.d.mts +67 -45
  42. package/dist/testing/index.d.mts.map +1 -1
  43. package/dist/testing/index.mjs +1 -1
  44. package/dist/testing/index.mjs.map +1 -1
  45. package/dist/types/index.cjs +1 -1
  46. package/dist/types/index.d.cts +4 -4
  47. package/dist/types/index.d.mts +4 -4
  48. package/dist/types/index.mjs +1 -1
  49. package/dist/{types-B-EckCWW.cjs → types-B140y5RX.cjs} +1 -1
  50. package/dist/{types-CO-R4pFG.mjs → types-D54Q_YmF.mjs} +2 -2
  51. package/dist/{types-CO-R4pFG.mjs.map → types-D54Q_YmF.mjs.map} +1 -1
  52. package/dist/upload/index.cjs +1 -1
  53. package/dist/upload/index.d.cts +4 -4
  54. package/dist/upload/index.d.mts +4 -4
  55. package/dist/upload/index.mjs +1 -1
  56. package/dist/{upload-C_Ew1NMF.mjs → upload-DDke4PGB.mjs} +2 -2
  57. package/dist/{upload-C_Ew1NMF.mjs.map → upload-DDke4PGB.mjs.map} +1 -1
  58. package/dist/{upload-BwXGQQ26.cjs → upload-DsehAabn.cjs} +1 -1
  59. package/dist/{uploadista-error-Blmj3lpk.cjs → uploadista-error-B9lL5xFQ.cjs} +12 -1
  60. package/dist/{uploadista-error-DgdQnozn.d.cts → uploadista-error-Bb-qIIKM.d.cts} +2 -2
  61. package/dist/uploadista-error-Bb-qIIKM.d.cts.map +1 -0
  62. package/dist/{uploadista-error-Cpn3uBLO.d.mts → uploadista-error-D7Gubrr1.d.mts} +2 -2
  63. package/dist/uploadista-error-D7Gubrr1.d.mts.map +1 -0
  64. package/dist/{uploadista-error-DhNBioWq.mjs → uploadista-error-DR65duXB.mjs} +12 -1
  65. package/dist/uploadista-error-DR65duXB.mjs.map +1 -0
  66. package/dist/utils/index.cjs +1 -1
  67. package/dist/utils/index.d.cts +2 -2
  68. package/dist/utils/index.d.mts +2 -2
  69. package/dist/utils/index.mjs +1 -1
  70. package/dist/{utils-7gziergl.mjs → utils-B6ATFEx5.mjs} +2 -2
  71. package/dist/{utils-7gziergl.mjs.map → utils-B6ATFEx5.mjs.map} +1 -1
  72. package/dist/{utils-C_STf6Wl.cjs → utils-XGw-9f3d.cjs} +1 -1
  73. package/package.json +5 -5
  74. package/src/errors/uploadista-error.ts +56 -1
  75. package/src/flow/flow-server.ts +1 -1
  76. package/src/flow/flow.ts +1 -3
  77. package/src/flow/index.ts +7 -3
  78. package/src/flow/node-types/index.ts +2 -1
  79. package/src/flow/node.ts +95 -78
  80. package/src/flow/nodes/transform-node.ts +2 -1
  81. package/src/flow/plugins/document-ai-plugin.ts +124 -0
  82. package/src/flow/plugins/document-plugin.ts +161 -0
  83. package/src/flow/plugins/plugins.ts +15 -0
  84. package/src/flow/plugins/virus-scan-plugin.ts +129 -0
  85. package/src/flow/type-guards.ts +2 -4
  86. package/src/flow/types/flow-types.ts +3 -1
  87. package/src/testing/index.ts +4 -3
  88. package/src/testing/mock-upload-server.ts +1 -1
  89. package/src/testing/mock-virus-scan-plugin.ts +58 -0
  90. package/dist/flow-DhuIQwjv.mjs +0 -2
  91. package/dist/flow-DhuIQwjv.mjs.map +0 -1
  92. package/dist/flow-s_AlC4r5.cjs +0 -1
  93. package/dist/index-BmL4G8Qk.d.cts.map +0 -1
  94. package/dist/index-CdP4c5LF.d.mts.map +0 -1
  95. package/dist/uploadista-error-Cpn3uBLO.d.mts.map +0 -1
  96. package/dist/uploadista-error-DgdQnozn.d.cts.map +0 -1
  97. package/dist/uploadista-error-DhNBioWq.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- import{n as e}from"./uploadista-error-DhNBioWq.mjs";import{Context as t,Effect as n,Layer as r}from"effect";var i=class extends t.Tag(`UploadistaGenerateIdService`)(){};const a=i.Service,o=i.of({generateId:()=>n.succeed(crypto.randomUUID())}),s=r.succeed(i,o),c=i.of({generateId:()=>n.succeed(`${Date.now()}-${Math.random().toString(36).slice(2,11)}`)}),l=[`sha256`];function u(e){return l.includes(e)}function d(t,r){return n.gen(function*(){if(!u(r))return yield*e.fromCode(`UNSUPPORTED_CHECKSUM_ALGORITHM`,{body:`Checksum algorithm '${r}' is not supported. Supported algorithms: ${l.join(`, `)}`,details:{algorithm:r,supportedAlgorithms:l}}).toEffect();let i=r.toUpperCase().replace(/\d+/,`-$&`),a=yield*n.tryPromise({try:()=>crypto.subtle.digest(i,t),catch:t=>e.fromCode(`UNKNOWN_ERROR`,{body:`Failed to compute checksum: ${t instanceof Error?t.message:`Unknown error`}`,cause:t,details:{algorithm:r}})});return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,`0`)).join(``)})}export{o as a,s as i,u as n,a as o,i as r,c as s,d as t};
2
- //# sourceMappingURL=checksum-BaO9w1gC.mjs.map
1
+ import{n as e}from"./uploadista-error-DR65duXB.mjs";import{Context as t,Effect as n,Layer as r}from"effect";var i=class extends t.Tag(`UploadistaGenerateIdService`)(){};const a=i.Service,o=i.of({generateId:()=>n.succeed(crypto.randomUUID())}),s=r.succeed(i,o),c=i.of({generateId:()=>n.succeed(`${Date.now()}-${Math.random().toString(36).slice(2,11)}`)}),l=[`sha256`];function u(e){return l.includes(e)}function d(t,r){return n.gen(function*(){if(!u(r))return yield*e.fromCode(`UNSUPPORTED_CHECKSUM_ALGORITHM`,{body:`Checksum algorithm '${r}' is not supported. Supported algorithms: ${l.join(`, `)}`,details:{algorithm:r,supportedAlgorithms:l}}).toEffect();let i=r.toUpperCase().replace(/\d+/,`-$&`),a=yield*n.tryPromise({try:()=>crypto.subtle.digest(i,t),catch:t=>e.fromCode(`UNKNOWN_ERROR`,{body:`Failed to compute checksum: ${t instanceof Error?t.message:`Unknown error`}`,cause:t,details:{algorithm:r}})});return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,`0`)).join(``)})}export{o as a,s as i,u as n,a as o,i as r,c as s,d as t};
2
+ //# sourceMappingURL=checksum-Cwf-Mqw5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"checksum-BaO9w1gC.mjs","names":[],"sources":["../src/utils/generate-id.ts","../src/utils/checksum.ts"],"sourcesContent":["import { Context, Effect, Layer } from \"effect\";\n\nexport type GenerateIdShape = {\n generateId: () => Effect.Effect<string>;\n};\n\n// Declaring a tag for a service that generates random id\nexport class GenerateId extends Context.Tag(\"UploadistaGenerateIdService\")<\n GenerateId,\n { readonly generateId: () => Effect.Effect<string> }\n>() {}\n\n/**\n * Effect-based ID generation services\n */\nexport const GenerateIdService = GenerateId.Service;\n\n/**\n * Generates a random UUID using Effect\n * @returns Effect that produces a random UUID string\n */\nexport const GenerateIdRandom = GenerateId.of({\n generateId: () => Effect.succeed(crypto.randomUUID()),\n});\n\nexport const GenerateIdLive = Layer.succeed(GenerateId, GenerateIdRandom);\n\n/**\n * Generates a timestamp-based ID using Effect\n * @returns Effect that produces a timestamp-based ID\n */\nexport const GenerateIdTimestamp = GenerateId.of({\n generateId: () =>\n Effect.succeed(`${Date.now()}-${Math.random().toString(36).slice(2, 11)}`),\n});\n","import { Effect } from \"effect\";\nimport { UploadistaError } from \"../errors/uploadista-error\";\n\n/**\n * Supported checksum algorithms\n */\nconst SUPPORTED_ALGORITHMS = [\"sha256\"] as const;\nexport type ChecksumAlgorithm = (typeof SUPPORTED_ALGORITHMS)[number];\n\n/**\n * Check if a checksum algorithm is supported\n */\nexport function isSupportedAlgorithm(\n algorithm: string,\n): algorithm is ChecksumAlgorithm {\n return SUPPORTED_ALGORITHMS.includes(algorithm as ChecksumAlgorithm);\n}\n\n/**\n * Compute checksum of file bytes using the Web Crypto API.\n * This works across all modern platforms: browsers, Node.js 15+, Deno, Bun, and Cloudflare Workers.\n *\n * @param bytes - File content as Uint8Array\n * @param algorithm - Hashing algorithm to use (currently only 'sha256' is supported)\n * @returns Effect that resolves to hex-encoded checksum string\n */\nexport function computeChecksum(\n bytes: Uint8Array,\n algorithm: string,\n): Effect.Effect<string, UploadistaError> {\n return Effect.gen(function* () {\n // Validate algorithm is supported\n if (!isSupportedAlgorithm(algorithm)) {\n return yield* UploadistaError.fromCode(\"UNSUPPORTED_CHECKSUM_ALGORITHM\", {\n body: `Checksum algorithm '${algorithm}' is not supported. Supported algorithms: ${SUPPORTED_ALGORITHMS.join(\", \")}`,\n details: { algorithm, supportedAlgorithms: SUPPORTED_ALGORITHMS },\n }).toEffect();\n }\n\n // Map algorithm name to Web Crypto API algorithm name\n const webCryptoAlgorithm = algorithm.toUpperCase().replace(/\\d+/, \"-$&\"); // \"sha256\" -> \"SHA-256\"\n\n // Compute hash using Web Crypto API (available in browsers, Node.js 15+, Deno, Bun, Cloudflare Workers)\n // Pass Uint8Array directly - it's a valid BufferSource\n const hashBuffer = yield* Effect.tryPromise({\n try: () =>\n crypto.subtle.digest(webCryptoAlgorithm, bytes as BufferSource),\n catch: (error) =>\n UploadistaError.fromCode(\"UNKNOWN_ERROR\", {\n body: `Failed to compute checksum: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n cause: error,\n details: { algorithm },\n }),\n });\n\n // Convert ArrayBuffer to hex string\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray\n .map((byte) => byte.toString(16).padStart(2, \"0\"))\n .join(\"\");\n\n return hashHex;\n });\n}\n"],"mappings":"4GAOA,IAAa,EAAb,cAAgC,EAAQ,IAAI,8BAA8B,EAGvE,AAAC,GAKJ,MAAa,EAAoB,EAAW,QAM/B,EAAmB,EAAW,GAAG,CAC5C,eAAkB,EAAO,QAAQ,OAAO,YAAY,CAAC,CACtD,CAAC,CAEW,EAAiB,EAAM,QAAQ,EAAY,EAAiB,CAM5D,EAAsB,EAAW,GAAG,CAC/C,eACE,EAAO,QAAQ,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAG,GAAG,GAAG,CAC7E,CAAC,CC5BI,EAAuB,CAAC,SAAS,CAMvC,SAAgB,EACd,EACgC,CAChC,OAAO,EAAqB,SAAS,EAA+B,CAWtE,SAAgB,EACd,EACA,EACwC,CACxC,OAAO,EAAO,IAAI,WAAa,CAE7B,GAAI,CAAC,EAAqB,EAAU,CAClC,OAAO,MAAO,EAAgB,SAAS,iCAAkC,CACvE,KAAM,uBAAuB,EAAU,4CAA4C,EAAqB,KAAK,KAAK,GAClH,QAAS,CAAE,YAAW,oBAAqB,EAAsB,CAClE,CAAC,CAAC,UAAU,CAIf,IAAM,EAAqB,EAAU,aAAa,CAAC,QAAQ,MAAO,MAAM,CAIlE,EAAa,MAAO,EAAO,WAAW,CAC1C,QACE,OAAO,OAAO,OAAO,EAAoB,EAAsB,CACjE,MAAQ,GACN,EAAgB,SAAS,gBAAiB,CACxC,KAAM,+BAA+B,aAAiB,MAAQ,EAAM,QAAU,kBAC9E,MAAO,EACP,QAAS,CAAE,YAAW,CACvB,CAAC,CACL,CAAC,CAQF,OALkB,MAAM,KAAK,IAAI,WAAW,EAAW,CAAC,CAErD,IAAK,GAAS,EAAK,SAAS,GAAG,CAAC,SAAS,EAAG,IAAI,CAAC,CACjD,KAAK,GAAG,EAGX"}
1
+ {"version":3,"file":"checksum-Cwf-Mqw5.mjs","names":[],"sources":["../src/utils/generate-id.ts","../src/utils/checksum.ts"],"sourcesContent":["import { Context, Effect, Layer } from \"effect\";\n\nexport type GenerateIdShape = {\n generateId: () => Effect.Effect<string>;\n};\n\n// Declaring a tag for a service that generates random id\nexport class GenerateId extends Context.Tag(\"UploadistaGenerateIdService\")<\n GenerateId,\n { readonly generateId: () => Effect.Effect<string> }\n>() {}\n\n/**\n * Effect-based ID generation services\n */\nexport const GenerateIdService = GenerateId.Service;\n\n/**\n * Generates a random UUID using Effect\n * @returns Effect that produces a random UUID string\n */\nexport const GenerateIdRandom = GenerateId.of({\n generateId: () => Effect.succeed(crypto.randomUUID()),\n});\n\nexport const GenerateIdLive = Layer.succeed(GenerateId, GenerateIdRandom);\n\n/**\n * Generates a timestamp-based ID using Effect\n * @returns Effect that produces a timestamp-based ID\n */\nexport const GenerateIdTimestamp = GenerateId.of({\n generateId: () =>\n Effect.succeed(`${Date.now()}-${Math.random().toString(36).slice(2, 11)}`),\n});\n","import { Effect } from \"effect\";\nimport { UploadistaError } from \"../errors/uploadista-error\";\n\n/**\n * Supported checksum algorithms\n */\nconst SUPPORTED_ALGORITHMS = [\"sha256\"] as const;\nexport type ChecksumAlgorithm = (typeof SUPPORTED_ALGORITHMS)[number];\n\n/**\n * Check if a checksum algorithm is supported\n */\nexport function isSupportedAlgorithm(\n algorithm: string,\n): algorithm is ChecksumAlgorithm {\n return SUPPORTED_ALGORITHMS.includes(algorithm as ChecksumAlgorithm);\n}\n\n/**\n * Compute checksum of file bytes using the Web Crypto API.\n * This works across all modern platforms: browsers, Node.js 15+, Deno, Bun, and Cloudflare Workers.\n *\n * @param bytes - File content as Uint8Array\n * @param algorithm - Hashing algorithm to use (currently only 'sha256' is supported)\n * @returns Effect that resolves to hex-encoded checksum string\n */\nexport function computeChecksum(\n bytes: Uint8Array,\n algorithm: string,\n): Effect.Effect<string, UploadistaError> {\n return Effect.gen(function* () {\n // Validate algorithm is supported\n if (!isSupportedAlgorithm(algorithm)) {\n return yield* UploadistaError.fromCode(\"UNSUPPORTED_CHECKSUM_ALGORITHM\", {\n body: `Checksum algorithm '${algorithm}' is not supported. Supported algorithms: ${SUPPORTED_ALGORITHMS.join(\", \")}`,\n details: { algorithm, supportedAlgorithms: SUPPORTED_ALGORITHMS },\n }).toEffect();\n }\n\n // Map algorithm name to Web Crypto API algorithm name\n const webCryptoAlgorithm = algorithm.toUpperCase().replace(/\\d+/, \"-$&\"); // \"sha256\" -> \"SHA-256\"\n\n // Compute hash using Web Crypto API (available in browsers, Node.js 15+, Deno, Bun, Cloudflare Workers)\n // Pass Uint8Array directly - it's a valid BufferSource\n const hashBuffer = yield* Effect.tryPromise({\n try: () =>\n crypto.subtle.digest(webCryptoAlgorithm, bytes as BufferSource),\n catch: (error) =>\n UploadistaError.fromCode(\"UNKNOWN_ERROR\", {\n body: `Failed to compute checksum: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n cause: error,\n details: { algorithm },\n }),\n });\n\n // Convert ArrayBuffer to hex string\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n const hashHex = hashArray\n .map((byte) => byte.toString(16).padStart(2, \"0\"))\n .join(\"\");\n\n return hashHex;\n });\n}\n"],"mappings":"4GAOA,IAAa,EAAb,cAAgC,EAAQ,IAAI,8BAA8B,EAGvE,AAAC,GAKJ,MAAa,EAAoB,EAAW,QAM/B,EAAmB,EAAW,GAAG,CAC5C,eAAkB,EAAO,QAAQ,OAAO,YAAY,CAAC,CACtD,CAAC,CAEW,EAAiB,EAAM,QAAQ,EAAY,EAAiB,CAM5D,EAAsB,EAAW,GAAG,CAC/C,eACE,EAAO,QAAQ,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,MAAM,EAAG,GAAG,GAAG,CAC7E,CAAC,CC5BI,EAAuB,CAAC,SAAS,CAMvC,SAAgB,EACd,EACgC,CAChC,OAAO,EAAqB,SAAS,EAA+B,CAWtE,SAAgB,EACd,EACA,EACwC,CACxC,OAAO,EAAO,IAAI,WAAa,CAE7B,GAAI,CAAC,EAAqB,EAAU,CAClC,OAAO,MAAO,EAAgB,SAAS,iCAAkC,CACvE,KAAM,uBAAuB,EAAU,4CAA4C,EAAqB,KAAK,KAAK,GAClH,QAAS,CAAE,YAAW,oBAAqB,EAAsB,CAClE,CAAC,CAAC,UAAU,CAIf,IAAM,EAAqB,EAAU,aAAa,CAAC,QAAQ,MAAO,MAAM,CAIlE,EAAa,MAAO,EAAO,WAAW,CAC1C,QACE,OAAO,OAAO,OAAO,EAAoB,EAAsB,CACjE,MAAQ,GACN,EAAgB,SAAS,gBAAiB,CACxC,KAAM,+BAA+B,aAAiB,MAAQ,EAAM,QAAU,kBAC9E,MAAO,EACP,QAAS,CAAE,YAAW,CACvB,CAAC,CACL,CAAC,CAQF,OALkB,MAAM,KAAK,IAAI,WAAW,EAAW,CAAC,CAErD,IAAK,GAAS,EAAK,SAAS,GAAG,CAAC,SAAS,EAAG,IAAI,CAAC,CACjD,KAAK,GAAG,EAGX"}
@@ -1 +1 @@
1
- const e=require(`./types-B-EckCWW.cjs`),t=require(`./uploadista-error-Blmj3lpk.cjs`);let n=require(`effect`);var r=class extends n.Context.Tag(`UploadistaGenerateIdService`)(){};const i=r.Service,a=r.of({generateId:()=>n.Effect.succeed(crypto.randomUUID())}),o=n.Layer.succeed(r,a),s=r.of({generateId:()=>n.Effect.succeed(`${Date.now()}-${Math.random().toString(36).slice(2,11)}`)}),c=[`sha256`];function l(e){return c.includes(e)}function u(e,r){return n.Effect.gen(function*(){if(!l(r))return yield*t.n.fromCode(`UNSUPPORTED_CHECKSUM_ALGORITHM`,{body:`Checksum algorithm '${r}' is not supported. Supported algorithms: ${c.join(`, `)}`,details:{algorithm:r,supportedAlgorithms:c}}).toEffect();let i=r.toUpperCase().replace(/\d+/,`-$&`),a=yield*n.Effect.tryPromise({try:()=>crypto.subtle.digest(i,e),catch:e=>t.n.fromCode(`UNKNOWN_ERROR`,{body:`Failed to compute checksum: ${e instanceof Error?e.message:`Unknown error`}`,cause:e,details:{algorithm:r}})});return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,`0`)).join(``)})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
1
+ const e=require(`./types-B140y5RX.cjs`),t=require(`./uploadista-error-B9lL5xFQ.cjs`);let n=require(`effect`);var r=class extends n.Context.Tag(`UploadistaGenerateIdService`)(){};const i=r.Service,a=r.of({generateId:()=>n.Effect.succeed(crypto.randomUUID())}),o=n.Layer.succeed(r,a),s=r.of({generateId:()=>n.Effect.succeed(`${Date.now()}-${Math.random().toString(36).slice(2,11)}`)}),c=[`sha256`];function l(e){return c.includes(e)}function u(e,r){return n.Effect.gen(function*(){if(!l(r))return yield*t.n.fromCode(`UNSUPPORTED_CHECKSUM_ALGORITHM`,{body:`Checksum algorithm '${r}' is not supported. Supported algorithms: ${c.join(`, `)}`,details:{algorithm:r,supportedAlgorithms:c}}).toEffect();let i=r.toUpperCase().replace(/\d+/,`-$&`),a=yield*n.Effect.tryPromise({try:()=>crypto.subtle.digest(i,e),catch:e=>t.n.fromCode(`UNKNOWN_ERROR`,{body:`Failed to compute checksum: ${e instanceof Error?e.message:`Unknown error`}`,cause:e,details:{algorithm:r}})});return Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,`0`)).join(``)})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
@@ -1 +1 @@
1
- const e=require(`../uploadista-error-Blmj3lpk.cjs`);require(`../errors-CRm1FHHT.cjs`),exports.ERRORS=e.t,exports.ERROR_CATALOG=e.t,exports.UploadistaError=e.n,exports.httpFailure=e.r,exports.isUploadistaError=e.i;
1
+ const e=require(`../uploadista-error-B9lL5xFQ.cjs`);require(`../errors-CRm1FHHT.cjs`),exports.ERRORS=e.t,exports.ERROR_CATALOG=e.t,exports.UploadistaError=e.n,exports.httpFailure=e.r,exports.isUploadistaError=e.i;
@@ -1,3 +1,3 @@
1
- import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "../uploadista-error-DgdQnozn.cjs";
1
+ import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "../uploadista-error-Bb-qIIKM.cjs";
2
2
  import "../index-_wQ5ClJU.cjs";
3
3
  export { ERROR_CATALOG as ERRORS, ERROR_CATALOG, UploadistaError, UploadistaErrorCode, httpFailure, isUploadistaError };
@@ -1,3 +1,3 @@
1
- import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "../uploadista-error-Cpn3uBLO.mjs";
1
+ import { a as isUploadistaError, i as httpFailure, n as UploadistaError, r as UploadistaErrorCode, t as ERROR_CATALOG } from "../uploadista-error-D7Gubrr1.mjs";
2
2
  import "../index-C-svZlpj.mjs";
3
3
  export { ERROR_CATALOG as ERRORS, ERROR_CATALOG, UploadistaError, UploadistaErrorCode, httpFailure, isUploadistaError };
@@ -1 +1 @@
1
- import{i as e,n as t,r as n,t as r}from"../uploadista-error-DhNBioWq.mjs";import"../errors-DEFjN-xn.mjs";export{r as ERRORS,r as ERROR_CATALOG,t as UploadistaError,n as httpFailure,e as isUploadistaError};
1
+ import{i as e,n as t,r as n,t as r}from"../uploadista-error-DR65duXB.mjs";import"../errors-DEFjN-xn.mjs";export{r as ERRORS,r as ERROR_CATALOG,t as UploadistaError,n as httpFailure,e as isUploadistaError};
@@ -1 +1 @@
1
- require(`../types-B-EckCWW.cjs`),require(`../uploadista-error-Blmj3lpk.cjs`),require(`../errors-CRm1FHHT.cjs`);const e=require(`../flow-s_AlC4r5.cjs`);require(`../upload-BwXGQQ26.cjs`),require(`../checksum-DXCv7Avr.cjs`),require(`../stream-limiter-BcTJAjs-.cjs`),exports.CredentialProvider=e.A,exports.EventType=e.ct,exports.FlowProvider=e.B,exports.FlowServer=e.V,exports.FlowTypeRegistry=e.ot,exports.FlowWaitUntil=e.H,exports.ImageAiPlugin=e.k,exports.ImagePlugin=e.O,exports.NodeType=e.J,exports.ParallelScheduler=e.q,exports.STORAGE_OUTPUT_TYPE_ID=e.it,exports.STREAMING_INPUT_TYPE_ID=e.at,exports.VideoPlugin=e.i,exports.ZipPlugin=e.r,exports.blurTransformSchema=e.o,exports.brightnessTransformSchema=e.s,exports.completeNodeExecution=e.R,exports.contrastTransformSchema=e.c,exports.createFlow=e.n,exports.createFlowEdge=e.lt,exports.createFlowNode=e.Y,exports.createFlowServer=e.U,exports.createFlowWithSchema=e.G,exports.createInputNode=e.P,exports.createStorageNode=e.M,exports.createTransformNode=e.j,exports.createTypeGuard=e.Z,exports.describeImageParamsSchema=e.D,exports.describeVideoMetadataSchema=e.E,exports.extractFrameVideoParamsSchema=e.T,exports.filterOutputsByType=e.Q,exports.flipTransformSchema=e.l,exports.flowServer=e.W,exports.flowTypeRegistry=e.st,exports.getFirstOutputByType=e.$,exports.getFlowData=e.K,exports.getNodeData=e.X,exports.getOutputByNodeId=e.et,exports.getSingleOutputByType=e.tt,exports.grayscaleTransformSchema=e.u,exports.hasOutputOfType=e.nt,exports.inputDataSchema=e.F,exports.inputNodeParamsSchema=e.I,exports.isStorageOutput=e.rt,exports.logoTransformSchema=e.d,exports.optimizeParamsSchema=e.w,exports.removeBackgroundParamsSchema=e.C,exports.resizeParamsSchema=e.S,exports.resizeTransformSchema=e.f,exports.resizeVideoParamsSchema=e.x,exports.resolveUploadMetadata=e.L,exports.rotateTransformSchema=e.p,exports.runArgsSchema=e.t,exports.sepiaTransformSchema=e.m,exports.sharpenTransformSchema=e.h,exports.storageParamsSchema=e.N,exports.textTransformSchema=e.g,exports.transcodeVideoParamsSchema=e.b,exports.transformImageParamsSchema=e._,exports.transformationSchema=e.v,exports.trimVideoParamsSchema=e.a,exports.waitingNodeExecution=e.z,exports.watermarkTransformSchema=e.y;
1
+ require(`../types-B140y5RX.cjs`),require(`../uploadista-error-B9lL5xFQ.cjs`),require(`../errors-CRm1FHHT.cjs`);const e=require(`../flow-DK3kacMQ.cjs`);require(`../upload-DsehAabn.cjs`),require(`../checksum-DIrJRrlk.cjs`),require(`../stream-limiter-B6dfCtCy.cjs`),exports.CredentialProvider=e.B,exports.DocumentAiPlugin=e.z,exports.DocumentPlugin=e.R,exports.EventType=e.dt,exports.FlowProvider=e.X,exports.FlowServer=e.Z,exports.FlowTypeRegistry=e.lt,exports.FlowWaitUntil=e.Q,exports.ImageAiPlugin=e.L,exports.ImagePlugin=e.I,exports.NodeType=e.it,exports.ParallelScheduler=e.rt,exports.STORAGE_OUTPUT_TYPE_ID=e.st,exports.STREAMING_INPUT_TYPE_ID=e.ct,exports.VideoPlugin=e.f,exports.VirusScanPlugin=e.d,exports.ZipPlugin=e.u,exports.blurTransformSchema=e.m,exports.brightnessTransformSchema=e.h,exports.completeNodeExecution=e.J,exports.contrastTransformSchema=e.g,exports.createFlow=e.n,exports.createFlowEdge=e.ft,exports.createFlowNode=e.at,exports.createFlowServer=e.$,exports.createFlowWithSchema=e.tt,exports.createInputNode=e.W,exports.createStorageNode=e.H,exports.createTransformNode=e.V,exports.createTypeGuard=e.r,exports.describeImageParamsSchema=e.F,exports.describeVideoMetadataSchema=e.P,exports.extractFrameVideoParamsSchema=e.N,exports.filterOutputsByType=e.i,exports.flipTransformSchema=e._,exports.flowServer=e.et,exports.flowTypeRegistry=e.ut,exports.getFirstOutputByType=e.a,exports.getFlowData=e.nt,exports.getNodeData=e.ot,exports.getOutputByNodeId=e.o,exports.getSingleOutputByType=e.s,exports.grayscaleTransformSchema=e.v,exports.hasOutputOfType=e.c,exports.inputDataSchema=e.G,exports.inputNodeParamsSchema=e.K,exports.isStorageOutput=e.l,exports.logoTransformSchema=e.y,exports.optimizeParamsSchema=e.M,exports.removeBackgroundParamsSchema=e.j,exports.resizeParamsSchema=e.A,exports.resizeTransformSchema=e.b,exports.resizeVideoParamsSchema=e.k,exports.resolveUploadMetadata=e.q,exports.rotateTransformSchema=e.x,exports.runArgsSchema=e.t,exports.sepiaTransformSchema=e.S,exports.sharpenTransformSchema=e.C,exports.storageParamsSchema=e.U,exports.textTransformSchema=e.w,exports.transcodeVideoParamsSchema=e.O,exports.transformImageParamsSchema=e.T,exports.transformationSchema=e.E,exports.trimVideoParamsSchema=e.p,exports.waitingNodeExecution=e.Y,exports.watermarkTransformSchema=e.D;
@@ -1,6 +1,6 @@
1
- import "../uploadista-error-DgdQnozn.cjs";
1
+ import "../uploadista-error-Bb-qIIKM.cjs";
2
2
  import "../index-_wQ5ClJU.cjs";
3
- import { $ as LogoTransform, $r as FlowEventNodeResponse, $t as FlowServerShape, A as ZipPluginLayer, Ar as CustomTypedOutput, At as ImageAiPluginLayer, B as resizeVideoParamsSchema, Br as waitingNodeExecution, Bt as StorageParams, C as DescribeImageParams, Cn as hasOutputOfType, Cr as FlowData, Ct as watermarkTransformSchema, D as ZipInput, Dr as FlowEdge, Dt as optimizeParamsSchema, E as PluginLayer, Er as getFlowData, Et as OptimizeParams, F as TrimVideoParams, Fr as NodeExecutionResult, Ft as ExecutionLevel, G as ImagePlugin, Gr as FlowEventFlowError, Gt as createInputNode, H as extractFrameVideoParamsSchema, Hr as FlowEvent, Ht as storageParamsSchema, I as trimVideoParamsSchema, Ir as NodeTypeMap, It as ParallelScheduler, J as BlurTransform, Jr as FlowEventJobEnd, Jt as FlowProvider, K as ImagePluginLayer, Kr as FlowEventFlowPause, Kt as inputDataSchema, L as TranscodeVideoParams, Lr as TypeCompatibilityChecker, Lt as ParallelSchedulerConfig, M as VideoPlugin, Mr as FlowNode, Mt as CredentialProvider, N as VideoPluginLayer, Nr as FlowNodeData, Nt as CredentialProviderLayer, O as ZipParams, Or as createFlowEdge, Ot as ImageAiContext, P as VideoPluginShape, Pr as NodeConnectionValidator, Pt as CredentialProviderShape, Q as GrayscaleTransform, Qr as FlowEventNodePause, Qt as FlowServerOptions, R as transcodeVideoParamsSchema, Rr as TypedOutput, Rt as TransformNodeConfig, S as removeBackgroundParamsSchema, Sn as getSingleOutputByType, Sr as Flow, St as transformationSchema, T as Plugin, Tr as createFlowWithSchema, Tt as resizeParamsSchema, U as DescribeVideoMetadata, Ur as FlowEventFlowCancel, Ut as InputData, V as ExtractFrameVideoParams, Vr as EventType, Vt as createStorageNode, W as describeVideoMetadataSchema, Wr as FlowEventFlowEnd, Wt as InputNodeParams, X as ContrastTransform, Xr as FlowEventNodeEnd, Xt as FlowServer, Y as BrightnessTransform, Yr as FlowEventJobStart, Yt as FlowProviderShape, Z as FlipTransform, Zr as FlowEventNodeError, Zt as FlowServerLayer, _ as ExtractLayerService, _r as FlowTypeRegistry, _t as rotateTransformSchema, a as FlowInputMap, ai as NodeType, an as FlowJobStatus, at as TextTransform, b as FlowCondition, bn as getFirstOutputByType, br as ValidationResult, bt as textTransformSchema, c as FlowRequirements, ct as TransformationType, d as TypedFlow, dt as brightnessTransformSchema, ei as FlowEventNodeResume, en as FlowWaitUntil, et as OverlayPosition, f as TypedFlowConfig, ft as contrastTransformSchema, g as ExtractEffectRequirements, gr as STREAMING_INPUT_TYPE_ID, gt as resizeTransformSchema, h as ExtractEffectError, hr as STORAGE_OUTPUT_TYPE_ID, ht as logoTransformSchema, i as runArgsSchema, ii as ConditionValue, in as FlowJob, it as SharpenTransform, j as ZipPluginShape, jr as FlowConfig, jt as ImageAiPluginShape, k as ZipPlugin, kr as BuiltInTypedOutput, kt as ImageAiPlugin, l as NodeDefinition, lt as WatermarkTransform, m as createFlow, mt as grayscaleTransformSchema, n as resolveUploadMetadata, ni as ConditionField, nn as createFlowServer, nt as RotateTransform, o as FlowOutputMap, oi as createFlowNode, on as FlowJobTask, ot as TransformImageParams, p as TypedFlowEdge, pt as flipTransformSchema, q as ImagePluginShape, qr as FlowEventFlowStart, qt as inputNodeParamsSchema, r as RunArgs, ri as ConditionOperator, rn as flowServer, rt as SepiaTransform, s as FlowPluginRequirements, si as getNodeData, sn as FlowJobTaskStatus, st as Transformation, t as ResolvedUploadMetadata, ti as FlowEventNodeStart, tn as WaitUntilCallback, tt as ResizeTransform, u as NodeDefinitionsRecord, ut as blurTransformSchema, v as ExtractLayerServices, vn as createTypeGuard, vr as NodeTypeCategory, vt as sepiaTransformSchema, w as describeImageParamsSchema, wn as isStorageOutput, wr as FlowExecutionResult, wt as ResizeParams, x as RemoveBackgroundParams, xn as getOutputByNodeId, xr as flowTypeRegistry, xt as transformImageParamsSchema, y as ResolveEffect, yn as filterOutputsByType, yr as NodeTypeDefinition, yt as sharpenTransformSchema, z as ResizeVideoParams, zr as completeNodeExecution, zt as createTransformNode } from "../index-BmL4G8Qk.cjs";
4
- import "../index-T6MZvUlM.cjs";
5
- import "../index-CHGBYDtr.cjs";
6
- export { BlurTransform, BrightnessTransform, BuiltInTypedOutput, ConditionField, ConditionOperator, ConditionValue, ContrastTransform, CredentialProvider, CredentialProviderLayer, CredentialProviderShape, CustomTypedOutput, DescribeImageParams, DescribeVideoMetadata, EventType, ExecutionLevel, ExtractEffectError, ExtractEffectRequirements, ExtractFrameVideoParams, ExtractLayerService, ExtractLayerServices, FlipTransform, Flow, FlowCondition, FlowConfig, FlowData, FlowEdge, FlowEvent, FlowEventFlowCancel, FlowEventFlowEnd, FlowEventFlowError, FlowEventFlowPause, FlowEventFlowStart, FlowEventJobEnd, FlowEventJobStart, FlowEventNodeEnd, FlowEventNodeError, FlowEventNodePause, FlowEventNodeResponse, FlowEventNodeResume, FlowEventNodeStart, FlowExecutionResult, FlowInputMap, FlowJob, FlowJobStatus, FlowJobTask, FlowJobTaskStatus, FlowNode, FlowNodeData, FlowOutputMap, FlowPluginRequirements, FlowProvider, FlowProviderShape, FlowRequirements, FlowServer, FlowServerLayer, FlowServerOptions, FlowServerShape, FlowTypeRegistry, FlowWaitUntil, GrayscaleTransform, ImageAiContext, ImageAiPlugin, ImageAiPluginLayer, ImageAiPluginShape, ImagePlugin, ImagePluginLayer, ImagePluginShape, InputData, InputNodeParams, LogoTransform, NodeConnectionValidator, NodeDefinition, NodeDefinitionsRecord, NodeExecutionResult, NodeType, NodeTypeCategory, NodeTypeDefinition, NodeTypeMap, OptimizeParams, OverlayPosition, ParallelScheduler, ParallelSchedulerConfig, Plugin, PluginLayer, RemoveBackgroundParams, ResizeParams, ResizeTransform, ResizeVideoParams, ResolveEffect, ResolvedUploadMetadata, RotateTransform, RunArgs, STORAGE_OUTPUT_TYPE_ID, STREAMING_INPUT_TYPE_ID, SepiaTransform, SharpenTransform, StorageParams, TextTransform, TranscodeVideoParams, TransformImageParams, TransformNodeConfig, Transformation, TransformationType, TrimVideoParams, TypeCompatibilityChecker, TypedFlow, TypedFlowConfig, TypedFlowEdge, TypedOutput, ValidationResult, VideoPlugin, VideoPluginLayer, VideoPluginShape, WaitUntilCallback, WatermarkTransform, ZipInput, ZipParams, ZipPlugin, ZipPluginLayer, ZipPluginShape, blurTransformSchema, brightnessTransformSchema, completeNodeExecution, contrastTransformSchema, createFlow, createFlowEdge, createFlowNode, createFlowServer, createFlowWithSchema, createInputNode, createStorageNode, createTransformNode, createTypeGuard, describeImageParamsSchema, describeVideoMetadataSchema, extractFrameVideoParamsSchema, filterOutputsByType, flipTransformSchema, flowServer, flowTypeRegistry, getFirstOutputByType, getFlowData, getNodeData, getOutputByNodeId, getSingleOutputByType, grayscaleTransformSchema, hasOutputOfType, inputDataSchema, inputNodeParamsSchema, isStorageOutput, logoTransformSchema, optimizeParamsSchema, removeBackgroundParamsSchema, resizeParamsSchema, resizeTransformSchema, resizeVideoParamsSchema, resolveUploadMetadata, rotateTransformSchema, runArgsSchema, sepiaTransformSchema, sharpenTransformSchema, storageParamsSchema, textTransformSchema, transcodeVideoParamsSchema, transformImageParamsSchema, transformationSchema, trimVideoParamsSchema, waitingNodeExecution, watermarkTransformSchema };
3
+ import { $ as ExtractFrameVideoParams, $r as FlowNodeData, $t as DocumentAiPluginLayer, A as DescribeImageParams, An as flowServer, At as sepiaTransformSchema, B as ScanResult, Br as ValidationResult, Bt as ImageAiContext, C as getFirstOutputByType, Ci as ConditionOperator, Cn as FlowServer, Ct as brightnessTransformSchema, D as isStorageOutput, Di as getNodeData, Dn as FlowWaitUntil, Dt as logoTransformSchema, E as hasOutputOfType, Ei as createFlowNode, En as FlowServerShape, Et as grayscaleTransformSchema, F as ZipParams, Fr as STORAGE_OUTPUT_TYPE_ID, Ft as watermarkTransformSchema, G as VideoPluginLayer, Gr as createFlowWithSchema, Gt as DocumentPlugin, H as VirusScanPluginLayer, Hr as Flow, Ht as ImageAiPluginLayer, I as ZipPlugin, Ir as STREAMING_INPUT_TYPE_ID, It as ResizeParams, J as trimVideoParamsSchema, Jr as createFlowEdge, Jt as MergePdfParams, K as VideoPluginShape, Kr as getFlowData, Kt as DocumentPluginLayer, L as ZipPluginLayer, Lr as FlowTypeRegistry, Lt as resizeParamsSchema, M as Plugin, Mn as FlowJobStatus, Mt as textTransformSchema, N as PluginLayer, Nn as FlowJobTask, Nt as transformImageParamsSchema, O as RemoveBackgroundParams, On as WaitUntilCallback, Ot as resizeTransformSchema, P as ZipInput, Pn as FlowJobTaskStatus, Pt as transformationSchema, Q as resizeVideoParamsSchema, Qr as FlowNode, Qt as DocumentAiPlugin, R as ZipPluginShape, Rr as NodeTypeCategory, Rt as OptimizeParams, S as filterOutputsByType, Si as ConditionField, Sn as FlowProviderShape, St as blurTransformSchema, T as getSingleOutputByType, Ti as NodeType, Tn as FlowServerOptions, Tt as flipTransformSchema, U as VirusScanPluginShape, Ur as FlowData, Ut as ImageAiPluginShape, V as VirusScanPlugin, Vr as flowTypeRegistry, Vt as ImageAiPlugin, W as VideoPlugin, Wr as FlowExecutionResult, Wt as DocumentMetadata, X as transcodeVideoParamsSchema, Xr as CustomTypedOutput, Xt as SplitPdfResult, Y as TranscodeVideoParams, Yr as BuiltInTypedOutput, Yt as SplitPdfParams, Z as ResizeVideoParams, Zr as FlowConfig, Zt as DocumentAiContext, _ as ExtractLayerService, _i as FlowEventNodeError, _n as InputNodeParams, _t as TextTransform, a as FlowInputMap, ai as completeNodeExecution, an as CredentialProvider, at as ImagePluginShape, b as FlowCondition, bi as FlowEventNodeResume, bn as inputNodeParamsSchema, bt as TransformationType, c as FlowRequirements, ci as FlowEvent, cn as ExecutionLevel, ct as ContrastTransform, d as TypedFlow, di as FlowEventFlowError, dn as TransformNodeConfig, dt as LogoTransform, ei as NodeConnectionValidator, en as DocumentAiPluginShape, et as extractFrameVideoParamsSchema, f as TypedFlowConfig, fi as FlowEventFlowPause, fn as createTransformNode, ft as OverlayPosition, g as ExtractEffectRequirements, gi as FlowEventNodeEnd, gn as InputData, gt as SharpenTransform, h as ExtractEffectError, hi as FlowEventJobStart, hn as storageParamsSchema, ht as SepiaTransform, i as runArgsSchema, ii as TypedOutput, in as OcrTaskType, it as ImagePluginLayer, j as describeImageParamsSchema, jn as FlowJob, jt as sharpenTransformSchema, k as removeBackgroundParamsSchema, kn as createFlowServer, kt as rotateTransformSchema, l as NodeDefinition, li as FlowEventFlowCancel, ln as ParallelScheduler, lt as FlipTransform, m as createFlow, mi as FlowEventJobEnd, mn as createStorageNode, mt as RotateTransform, n as resolveUploadMetadata, ni as NodeTypeMap, nn as OcrResolution, nt as describeVideoMetadataSchema, o as FlowOutputMap, oi as waitingNodeExecution, on as CredentialProviderLayer, ot as BlurTransform, p as TypedFlowEdge, pi as FlowEventFlowStart, pn as StorageParams, pt as ResizeTransform, q as TrimVideoParams, qr as FlowEdge, qt as DocumentPluginShape, r as RunArgs, ri as TypeCompatibilityChecker, rn as OcrResult, rt as ImagePlugin, s as FlowPluginRequirements, si as EventType, sn as CredentialProviderShape, st as BrightnessTransform, t as ResolvedUploadMetadata, ti as NodeExecutionResult, tn as OcrParams, tt as DescribeVideoMetadata, u as NodeDefinitionsRecord, ui as FlowEventFlowEnd, un as ParallelSchedulerConfig, ut as GrayscaleTransform, v as ExtractLayerServices, vi as FlowEventNodePause, vn as createInputNode, vt as TransformImageParams, w as getOutputByNodeId, wi as ConditionValue, wn as FlowServerLayer, wt as contrastTransformSchema, x as createTypeGuard, xi as FlowEventNodeStart, xn as FlowProvider, xt as WatermarkTransform, y as ResolveEffect, yi as FlowEventNodeResponse, yn as inputDataSchema, yt as Transformation, z as ScanMetadata, zr as NodeTypeDefinition, zt as optimizeParamsSchema } from "../index-DiKp9dFO.cjs";
4
+ import "../index-B_SvQ0MU.cjs";
5
+ import "../index-qIN6ULCb.cjs";
6
+ export { BlurTransform, BrightnessTransform, BuiltInTypedOutput, ConditionField, ConditionOperator, ConditionValue, ContrastTransform, CredentialProvider, CredentialProviderLayer, CredentialProviderShape, CustomTypedOutput, DescribeImageParams, DescribeVideoMetadata, DocumentAiContext, DocumentAiPlugin, DocumentAiPluginLayer, DocumentAiPluginShape, DocumentMetadata, DocumentPlugin, DocumentPluginLayer, DocumentPluginShape, EventType, ExecutionLevel, ExtractEffectError, ExtractEffectRequirements, ExtractFrameVideoParams, ExtractLayerService, ExtractLayerServices, FlipTransform, Flow, FlowCondition, FlowConfig, FlowData, FlowEdge, FlowEvent, FlowEventFlowCancel, FlowEventFlowEnd, FlowEventFlowError, FlowEventFlowPause, FlowEventFlowStart, FlowEventJobEnd, FlowEventJobStart, FlowEventNodeEnd, FlowEventNodeError, FlowEventNodePause, FlowEventNodeResponse, FlowEventNodeResume, FlowEventNodeStart, FlowExecutionResult, FlowInputMap, FlowJob, FlowJobStatus, FlowJobTask, FlowJobTaskStatus, FlowNode, FlowNodeData, FlowOutputMap, FlowPluginRequirements, FlowProvider, FlowProviderShape, FlowRequirements, FlowServer, FlowServerLayer, FlowServerOptions, FlowServerShape, FlowTypeRegistry, FlowWaitUntil, GrayscaleTransform, ImageAiContext, ImageAiPlugin, ImageAiPluginLayer, ImageAiPluginShape, ImagePlugin, ImagePluginLayer, ImagePluginShape, InputData, InputNodeParams, LogoTransform, MergePdfParams, NodeConnectionValidator, NodeDefinition, NodeDefinitionsRecord, NodeExecutionResult, NodeType, NodeTypeCategory, NodeTypeDefinition, NodeTypeMap, OcrParams, OcrResolution, OcrResult, OcrTaskType, OptimizeParams, OverlayPosition, ParallelScheduler, ParallelSchedulerConfig, Plugin, PluginLayer, RemoveBackgroundParams, ResizeParams, ResizeTransform, ResizeVideoParams, ResolveEffect, ResolvedUploadMetadata, RotateTransform, RunArgs, STORAGE_OUTPUT_TYPE_ID, STREAMING_INPUT_TYPE_ID, ScanMetadata, ScanResult, SepiaTransform, SharpenTransform, SplitPdfParams, SplitPdfResult, StorageParams, TextTransform, TranscodeVideoParams, TransformImageParams, TransformNodeConfig, Transformation, TransformationType, TrimVideoParams, TypeCompatibilityChecker, TypedFlow, TypedFlowConfig, TypedFlowEdge, TypedOutput, ValidationResult, VideoPlugin, VideoPluginLayer, VideoPluginShape, VirusScanPlugin, VirusScanPluginLayer, VirusScanPluginShape, WaitUntilCallback, WatermarkTransform, ZipInput, ZipParams, ZipPlugin, ZipPluginLayer, ZipPluginShape, blurTransformSchema, brightnessTransformSchema, completeNodeExecution, contrastTransformSchema, createFlow, createFlowEdge, createFlowNode, createFlowServer, createFlowWithSchema, createInputNode, createStorageNode, createTransformNode, createTypeGuard, describeImageParamsSchema, describeVideoMetadataSchema, extractFrameVideoParamsSchema, filterOutputsByType, flipTransformSchema, flowServer, flowTypeRegistry, getFirstOutputByType, getFlowData, getNodeData, getOutputByNodeId, getSingleOutputByType, grayscaleTransformSchema, hasOutputOfType, inputDataSchema, inputNodeParamsSchema, isStorageOutput, logoTransformSchema, optimizeParamsSchema, removeBackgroundParamsSchema, resizeParamsSchema, resizeTransformSchema, resizeVideoParamsSchema, resolveUploadMetadata, rotateTransformSchema, runArgsSchema, sepiaTransformSchema, sharpenTransformSchema, storageParamsSchema, textTransformSchema, transcodeVideoParamsSchema, transformImageParamsSchema, transformationSchema, trimVideoParamsSchema, waitingNodeExecution, watermarkTransformSchema };
@@ -1,6 +1,6 @@
1
- import "../uploadista-error-Cpn3uBLO.mjs";
1
+ import "../uploadista-error-D7Gubrr1.mjs";
2
2
  import "../index-C-svZlpj.mjs";
3
- import { $ as LogoTransform, $r as FlowEventNodeResponse, $t as FlowServerShape, A as ZipPluginLayer, Ar as CustomTypedOutput, At as ImageAiPluginLayer, B as resizeVideoParamsSchema, Br as waitingNodeExecution, Bt as StorageParams, C as DescribeImageParams, Cn as hasOutputOfType, Cr as FlowData, Ct as watermarkTransformSchema, D as ZipInput, Dr as FlowEdge, Dt as optimizeParamsSchema, E as PluginLayer, Er as getFlowData, Et as OptimizeParams, F as TrimVideoParams, Fr as NodeExecutionResult, Ft as ExecutionLevel, G as ImagePlugin, Gr as FlowEventFlowError, Gt as createInputNode, H as extractFrameVideoParamsSchema, Hr as FlowEvent, Ht as storageParamsSchema, I as trimVideoParamsSchema, Ir as NodeTypeMap, It as ParallelScheduler, J as BlurTransform, Jr as FlowEventJobEnd, Jt as FlowProvider, K as ImagePluginLayer, Kr as FlowEventFlowPause, Kt as inputDataSchema, L as TranscodeVideoParams, Lr as TypeCompatibilityChecker, Lt as ParallelSchedulerConfig, M as VideoPlugin, Mr as FlowNode, Mt as CredentialProvider, N as VideoPluginLayer, Nr as FlowNodeData, Nt as CredentialProviderLayer, O as ZipParams, Or as createFlowEdge, Ot as ImageAiContext, P as VideoPluginShape, Pr as NodeConnectionValidator, Pt as CredentialProviderShape, Q as GrayscaleTransform, Qr as FlowEventNodePause, Qt as FlowServerOptions, R as transcodeVideoParamsSchema, Rr as TypedOutput, Rt as TransformNodeConfig, S as removeBackgroundParamsSchema, Sn as getSingleOutputByType, Sr as Flow, St as transformationSchema, T as Plugin, Tr as createFlowWithSchema, Tt as resizeParamsSchema, U as DescribeVideoMetadata, Ur as FlowEventFlowCancel, Ut as InputData, V as ExtractFrameVideoParams, Vr as EventType, Vt as createStorageNode, W as describeVideoMetadataSchema, Wr as FlowEventFlowEnd, Wt as InputNodeParams, X as ContrastTransform, Xr as FlowEventNodeEnd, Xt as FlowServer, Y as BrightnessTransform, Yr as FlowEventJobStart, Yt as FlowProviderShape, Z as FlipTransform, Zr as FlowEventNodeError, Zt as FlowServerLayer, _ as ExtractLayerService, _r as FlowTypeRegistry, _t as rotateTransformSchema, a as FlowInputMap, ai as NodeType, an as FlowJobStatus, at as TextTransform, b as FlowCondition, bn as getFirstOutputByType, br as ValidationResult, bt as textTransformSchema, c as FlowRequirements, ct as TransformationType, d as TypedFlow, dt as brightnessTransformSchema, ei as FlowEventNodeResume, en as FlowWaitUntil, et as OverlayPosition, f as TypedFlowConfig, ft as contrastTransformSchema, g as ExtractEffectRequirements, gr as STREAMING_INPUT_TYPE_ID, gt as resizeTransformSchema, h as ExtractEffectError, hr as STORAGE_OUTPUT_TYPE_ID, ht as logoTransformSchema, i as runArgsSchema, ii as ConditionValue, in as FlowJob, it as SharpenTransform, j as ZipPluginShape, jr as FlowConfig, jt as ImageAiPluginShape, k as ZipPlugin, kr as BuiltInTypedOutput, kt as ImageAiPlugin, l as NodeDefinition, lt as WatermarkTransform, m as createFlow, mt as grayscaleTransformSchema, n as resolveUploadMetadata, ni as ConditionField, nn as createFlowServer, nt as RotateTransform, o as FlowOutputMap, oi as createFlowNode, on as FlowJobTask, ot as TransformImageParams, p as TypedFlowEdge, pt as flipTransformSchema, q as ImagePluginShape, qr as FlowEventFlowStart, qt as inputNodeParamsSchema, r as RunArgs, ri as ConditionOperator, rn as flowServer, rt as SepiaTransform, s as FlowPluginRequirements, si as getNodeData, sn as FlowJobTaskStatus, st as Transformation, t as ResolvedUploadMetadata, ti as FlowEventNodeStart, tn as WaitUntilCallback, tt as ResizeTransform, u as NodeDefinitionsRecord, ut as blurTransformSchema, v as ExtractLayerServices, vn as createTypeGuard, vr as NodeTypeCategory, vt as sepiaTransformSchema, w as describeImageParamsSchema, wn as isStorageOutput, wr as FlowExecutionResult, wt as ResizeParams, x as RemoveBackgroundParams, xn as getOutputByNodeId, xr as flowTypeRegistry, xt as transformImageParamsSchema, y as ResolveEffect, yn as filterOutputsByType, yr as NodeTypeDefinition, yt as sharpenTransformSchema, z as ResizeVideoParams, zr as completeNodeExecution, zt as createTransformNode } from "../index-CdP4c5LF.mjs";
4
- import "../index-Bu5i-gcV.mjs";
5
- import "../index-3jSHmGwH.mjs";
6
- export { BlurTransform, BrightnessTransform, BuiltInTypedOutput, ConditionField, ConditionOperator, ConditionValue, ContrastTransform, CredentialProvider, CredentialProviderLayer, CredentialProviderShape, CustomTypedOutput, DescribeImageParams, DescribeVideoMetadata, EventType, ExecutionLevel, ExtractEffectError, ExtractEffectRequirements, ExtractFrameVideoParams, ExtractLayerService, ExtractLayerServices, FlipTransform, Flow, FlowCondition, FlowConfig, FlowData, FlowEdge, FlowEvent, FlowEventFlowCancel, FlowEventFlowEnd, FlowEventFlowError, FlowEventFlowPause, FlowEventFlowStart, FlowEventJobEnd, FlowEventJobStart, FlowEventNodeEnd, FlowEventNodeError, FlowEventNodePause, FlowEventNodeResponse, FlowEventNodeResume, FlowEventNodeStart, FlowExecutionResult, FlowInputMap, FlowJob, FlowJobStatus, FlowJobTask, FlowJobTaskStatus, FlowNode, FlowNodeData, FlowOutputMap, FlowPluginRequirements, FlowProvider, FlowProviderShape, FlowRequirements, FlowServer, FlowServerLayer, FlowServerOptions, FlowServerShape, FlowTypeRegistry, FlowWaitUntil, GrayscaleTransform, ImageAiContext, ImageAiPlugin, ImageAiPluginLayer, ImageAiPluginShape, ImagePlugin, ImagePluginLayer, ImagePluginShape, InputData, InputNodeParams, LogoTransform, NodeConnectionValidator, NodeDefinition, NodeDefinitionsRecord, NodeExecutionResult, NodeType, NodeTypeCategory, NodeTypeDefinition, NodeTypeMap, OptimizeParams, OverlayPosition, ParallelScheduler, ParallelSchedulerConfig, Plugin, PluginLayer, RemoveBackgroundParams, ResizeParams, ResizeTransform, ResizeVideoParams, ResolveEffect, ResolvedUploadMetadata, RotateTransform, RunArgs, STORAGE_OUTPUT_TYPE_ID, STREAMING_INPUT_TYPE_ID, SepiaTransform, SharpenTransform, StorageParams, TextTransform, TranscodeVideoParams, TransformImageParams, TransformNodeConfig, Transformation, TransformationType, TrimVideoParams, TypeCompatibilityChecker, TypedFlow, TypedFlowConfig, TypedFlowEdge, TypedOutput, ValidationResult, VideoPlugin, VideoPluginLayer, VideoPluginShape, WaitUntilCallback, WatermarkTransform, ZipInput, ZipParams, ZipPlugin, ZipPluginLayer, ZipPluginShape, blurTransformSchema, brightnessTransformSchema, completeNodeExecution, contrastTransformSchema, createFlow, createFlowEdge, createFlowNode, createFlowServer, createFlowWithSchema, createInputNode, createStorageNode, createTransformNode, createTypeGuard, describeImageParamsSchema, describeVideoMetadataSchema, extractFrameVideoParamsSchema, filterOutputsByType, flipTransformSchema, flowServer, flowTypeRegistry, getFirstOutputByType, getFlowData, getNodeData, getOutputByNodeId, getSingleOutputByType, grayscaleTransformSchema, hasOutputOfType, inputDataSchema, inputNodeParamsSchema, isStorageOutput, logoTransformSchema, optimizeParamsSchema, removeBackgroundParamsSchema, resizeParamsSchema, resizeTransformSchema, resizeVideoParamsSchema, resolveUploadMetadata, rotateTransformSchema, runArgsSchema, sepiaTransformSchema, sharpenTransformSchema, storageParamsSchema, textTransformSchema, transcodeVideoParamsSchema, transformImageParamsSchema, transformationSchema, trimVideoParamsSchema, waitingNodeExecution, watermarkTransformSchema };
3
+ import { $ as ExtractFrameVideoParams, $r as FlowNodeData, $t as DocumentAiPluginLayer, A as DescribeImageParams, An as flowServer, At as sepiaTransformSchema, B as ScanResult, Br as ValidationResult, Bt as ImageAiContext, C as getFirstOutputByType, Ci as ConditionOperator, Cn as FlowServer, Ct as brightnessTransformSchema, D as isStorageOutput, Di as getNodeData, Dn as FlowWaitUntil, Dt as logoTransformSchema, E as hasOutputOfType, Ei as createFlowNode, En as FlowServerShape, Et as grayscaleTransformSchema, F as ZipParams, Fr as STORAGE_OUTPUT_TYPE_ID, Ft as watermarkTransformSchema, G as VideoPluginLayer, Gr as createFlowWithSchema, Gt as DocumentPlugin, H as VirusScanPluginLayer, Hr as Flow, Ht as ImageAiPluginLayer, I as ZipPlugin, Ir as STREAMING_INPUT_TYPE_ID, It as ResizeParams, J as trimVideoParamsSchema, Jr as createFlowEdge, Jt as MergePdfParams, K as VideoPluginShape, Kr as getFlowData, Kt as DocumentPluginLayer, L as ZipPluginLayer, Lr as FlowTypeRegistry, Lt as resizeParamsSchema, M as Plugin, Mn as FlowJobStatus, Mt as textTransformSchema, N as PluginLayer, Nn as FlowJobTask, Nt as transformImageParamsSchema, O as RemoveBackgroundParams, On as WaitUntilCallback, Ot as resizeTransformSchema, P as ZipInput, Pn as FlowJobTaskStatus, Pt as transformationSchema, Q as resizeVideoParamsSchema, Qr as FlowNode, Qt as DocumentAiPlugin, R as ZipPluginShape, Rr as NodeTypeCategory, Rt as OptimizeParams, S as filterOutputsByType, Si as ConditionField, Sn as FlowProviderShape, St as blurTransformSchema, T as getSingleOutputByType, Ti as NodeType, Tn as FlowServerOptions, Tt as flipTransformSchema, U as VirusScanPluginShape, Ur as FlowData, Ut as ImageAiPluginShape, V as VirusScanPlugin, Vr as flowTypeRegistry, Vt as ImageAiPlugin, W as VideoPlugin, Wr as FlowExecutionResult, Wt as DocumentMetadata, X as transcodeVideoParamsSchema, Xr as CustomTypedOutput, Xt as SplitPdfResult, Y as TranscodeVideoParams, Yr as BuiltInTypedOutput, Yt as SplitPdfParams, Z as ResizeVideoParams, Zr as FlowConfig, Zt as DocumentAiContext, _ as ExtractLayerService, _i as FlowEventNodeError, _n as InputNodeParams, _t as TextTransform, a as FlowInputMap, ai as completeNodeExecution, an as CredentialProvider, at as ImagePluginShape, b as FlowCondition, bi as FlowEventNodeResume, bn as inputNodeParamsSchema, bt as TransformationType, c as FlowRequirements, ci as FlowEvent, cn as ExecutionLevel, ct as ContrastTransform, d as TypedFlow, di as FlowEventFlowError, dn as TransformNodeConfig, dt as LogoTransform, ei as NodeConnectionValidator, en as DocumentAiPluginShape, et as extractFrameVideoParamsSchema, f as TypedFlowConfig, fi as FlowEventFlowPause, fn as createTransformNode, ft as OverlayPosition, g as ExtractEffectRequirements, gi as FlowEventNodeEnd, gn as InputData, gt as SharpenTransform, h as ExtractEffectError, hi as FlowEventJobStart, hn as storageParamsSchema, ht as SepiaTransform, i as runArgsSchema, ii as TypedOutput, in as OcrTaskType, it as ImagePluginLayer, j as describeImageParamsSchema, jn as FlowJob, jt as sharpenTransformSchema, k as removeBackgroundParamsSchema, kn as createFlowServer, kt as rotateTransformSchema, l as NodeDefinition, li as FlowEventFlowCancel, ln as ParallelScheduler, lt as FlipTransform, m as createFlow, mi as FlowEventJobEnd, mn as createStorageNode, mt as RotateTransform, n as resolveUploadMetadata, ni as NodeTypeMap, nn as OcrResolution, nt as describeVideoMetadataSchema, o as FlowOutputMap, oi as waitingNodeExecution, on as CredentialProviderLayer, ot as BlurTransform, p as TypedFlowEdge, pi as FlowEventFlowStart, pn as StorageParams, pt as ResizeTransform, q as TrimVideoParams, qr as FlowEdge, qt as DocumentPluginShape, r as RunArgs, ri as TypeCompatibilityChecker, rn as OcrResult, rt as ImagePlugin, s as FlowPluginRequirements, si as EventType, sn as CredentialProviderShape, st as BrightnessTransform, t as ResolvedUploadMetadata, ti as NodeExecutionResult, tn as OcrParams, tt as DescribeVideoMetadata, u as NodeDefinitionsRecord, ui as FlowEventFlowEnd, un as ParallelSchedulerConfig, ut as GrayscaleTransform, v as ExtractLayerServices, vi as FlowEventNodePause, vn as createInputNode, vt as TransformImageParams, w as getOutputByNodeId, wi as ConditionValue, wn as FlowServerLayer, wt as contrastTransformSchema, x as createTypeGuard, xi as FlowEventNodeStart, xn as FlowProvider, xt as WatermarkTransform, y as ResolveEffect, yi as FlowEventNodeResponse, yn as inputDataSchema, yt as Transformation, z as ScanMetadata, zr as NodeTypeDefinition, zt as optimizeParamsSchema } from "../index-8m7lfPuJ.mjs";
4
+ import "../index-BGi1r_fi.mjs";
5
+ import "../index-DIWuZlxd.mjs";
6
+ export { BlurTransform, BrightnessTransform, BuiltInTypedOutput, ConditionField, ConditionOperator, ConditionValue, ContrastTransform, CredentialProvider, CredentialProviderLayer, CredentialProviderShape, CustomTypedOutput, DescribeImageParams, DescribeVideoMetadata, DocumentAiContext, DocumentAiPlugin, DocumentAiPluginLayer, DocumentAiPluginShape, DocumentMetadata, DocumentPlugin, DocumentPluginLayer, DocumentPluginShape, EventType, ExecutionLevel, ExtractEffectError, ExtractEffectRequirements, ExtractFrameVideoParams, ExtractLayerService, ExtractLayerServices, FlipTransform, Flow, FlowCondition, FlowConfig, FlowData, FlowEdge, FlowEvent, FlowEventFlowCancel, FlowEventFlowEnd, FlowEventFlowError, FlowEventFlowPause, FlowEventFlowStart, FlowEventJobEnd, FlowEventJobStart, FlowEventNodeEnd, FlowEventNodeError, FlowEventNodePause, FlowEventNodeResponse, FlowEventNodeResume, FlowEventNodeStart, FlowExecutionResult, FlowInputMap, FlowJob, FlowJobStatus, FlowJobTask, FlowJobTaskStatus, FlowNode, FlowNodeData, FlowOutputMap, FlowPluginRequirements, FlowProvider, FlowProviderShape, FlowRequirements, FlowServer, FlowServerLayer, FlowServerOptions, FlowServerShape, FlowTypeRegistry, FlowWaitUntil, GrayscaleTransform, ImageAiContext, ImageAiPlugin, ImageAiPluginLayer, ImageAiPluginShape, ImagePlugin, ImagePluginLayer, ImagePluginShape, InputData, InputNodeParams, LogoTransform, MergePdfParams, NodeConnectionValidator, NodeDefinition, NodeDefinitionsRecord, NodeExecutionResult, NodeType, NodeTypeCategory, NodeTypeDefinition, NodeTypeMap, OcrParams, OcrResolution, OcrResult, OcrTaskType, OptimizeParams, OverlayPosition, ParallelScheduler, ParallelSchedulerConfig, Plugin, PluginLayer, RemoveBackgroundParams, ResizeParams, ResizeTransform, ResizeVideoParams, ResolveEffect, ResolvedUploadMetadata, RotateTransform, RunArgs, STORAGE_OUTPUT_TYPE_ID, STREAMING_INPUT_TYPE_ID, ScanMetadata, ScanResult, SepiaTransform, SharpenTransform, SplitPdfParams, SplitPdfResult, StorageParams, TextTransform, TranscodeVideoParams, TransformImageParams, TransformNodeConfig, Transformation, TransformationType, TrimVideoParams, TypeCompatibilityChecker, TypedFlow, TypedFlowConfig, TypedFlowEdge, TypedOutput, ValidationResult, VideoPlugin, VideoPluginLayer, VideoPluginShape, VirusScanPlugin, VirusScanPluginLayer, VirusScanPluginShape, WaitUntilCallback, WatermarkTransform, ZipInput, ZipParams, ZipPlugin, ZipPluginLayer, ZipPluginShape, blurTransformSchema, brightnessTransformSchema, completeNodeExecution, contrastTransformSchema, createFlow, createFlowEdge, createFlowNode, createFlowServer, createFlowWithSchema, createInputNode, createStorageNode, createTransformNode, createTypeGuard, describeImageParamsSchema, describeVideoMetadataSchema, extractFrameVideoParamsSchema, filterOutputsByType, flipTransformSchema, flowServer, flowTypeRegistry, getFirstOutputByType, getFlowData, getNodeData, getOutputByNodeId, getSingleOutputByType, grayscaleTransformSchema, hasOutputOfType, inputDataSchema, inputNodeParamsSchema, isStorageOutput, logoTransformSchema, optimizeParamsSchema, removeBackgroundParamsSchema, resizeParamsSchema, resizeTransformSchema, resizeVideoParamsSchema, resolveUploadMetadata, rotateTransformSchema, runArgsSchema, sepiaTransformSchema, sharpenTransformSchema, storageParamsSchema, textTransformSchema, transcodeVideoParamsSchema, transformImageParamsSchema, transformationSchema, trimVideoParamsSchema, waitingNodeExecution, watermarkTransformSchema };
@@ -1 +1 @@
1
- import"../uploadista-error-DhNBioWq.mjs";import"../errors-DEFjN-xn.mjs";import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,at as k,b as A,c as j,ct as M,d as N,et as P,f as F,g as I,h as L,i as R,it as z,j as B,k as V,l as H,lt as U,m as W,n as G,nt as K,o as q,ot as J,p as Y,q as X,r as Z,rt as Q,s as $,st as ee,t as te,tt as ne,u as re,v as ie,w as ae,x as oe,y as se,z as ce}from"../flow-DhuIQwjv.mjs";import"../types-CO-R4pFG.mjs";import"../upload-C_Ew1NMF.mjs";import"../checksum-BaO9w1gC.mjs";import"../stream-limiter-D1-sVS5i.mjs";export{t as CredentialProvider,M as EventType,n as FlowProvider,S as FlowServer,J as FlowTypeRegistry,c as FlowWaitUntil,V as ImageAiPlugin,h as ImagePlugin,u as NodeType,X as ParallelScheduler,z as STORAGE_OUTPUT_TYPE_ID,k as STREAMING_INPUT_TYPE_ID,R as VideoPlugin,Z as ZipPlugin,q as blurTransformSchema,$ as brightnessTransformSchema,v as completeNodeExecution,j as contrastTransformSchema,G as createFlow,U as createFlowEdge,T as createFlowNode,x as createFlowServer,s as createFlowWithSchema,g as createInputNode,p as createStorageNode,B as createTransformNode,E as createTypeGuard,i as describeImageParamsSchema,a as describeVideoMetadataSchema,b as extractFrameVideoParamsSchema,_ as filterOutputsByType,H as flipTransformSchema,C as flowServer,ee as flowTypeRegistry,e as getFirstOutputByType,d as getFlowData,w as getNodeData,P as getOutputByNodeId,ne as getSingleOutputByType,re as grayscaleTransformSchema,K as hasOutputOfType,o as inputDataSchema,l as inputNodeParamsSchema,Q as isStorageOutput,N as logoTransformSchema,ae as optimizeParamsSchema,r as removeBackgroundParamsSchema,y as resizeParamsSchema,F as resizeTransformSchema,oe as resizeVideoParamsSchema,f as resolveUploadMetadata,Y as rotateTransformSchema,te as runArgsSchema,W as sepiaTransformSchema,L as sharpenTransformSchema,m as storageParamsSchema,I as textTransformSchema,A as transcodeVideoParamsSchema,D as transformImageParamsSchema,ie as transformationSchema,O as trimVideoParamsSchema,ce as waitingNodeExecution,se as watermarkTransformSchema};
1
+ import"../uploadista-error-DR65duXB.mjs";import"../errors-DEFjN-xn.mjs";import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as T,Z as E,_ as D,a as O,at as k,b as A,c as j,ct as M,d as N,dt as P,et as F,f as I,ft as L,g as R,h as z,i as B,it as V,j as H,k as U,l as W,lt as G,m as K,n as q,nt as J,o as Y,ot as X,p as Z,q as Q,r as $,rt as ee,s as te,st as ne,t as re,tt as ie,u as ae,ut as oe,v as se,w as ce,x as le,y as ue,z as de}from"../flow-BtI159Fi.mjs";import"../types-D54Q_YmF.mjs";import"../upload-DDke4PGB.mjs";import"../checksum-Cwf-Mqw5.mjs";import"../stream-limiter-Dfyh6hbh.mjs";export{n as CredentialProvider,de as DocumentAiPlugin,v as DocumentPlugin,P as EventType,w as FlowProvider,E as FlowServer,G as FlowTypeRegistry,_ as FlowWaitUntil,f as ImageAiPlugin,l as ImagePlugin,V as NodeType,ee as ParallelScheduler,ne as STORAGE_OUTPUT_TYPE_ID,M as STREAMING_INPUT_TYPE_ID,I as VideoPlugin,N as VirusScanPlugin,ae as ZipPlugin,K as blurTransformSchema,z as brightnessTransformSchema,u as completeNodeExecution,R as contrastTransformSchema,q as createFlow,L as createFlowEdge,k as createFlowNode,e as createFlowServer,ie as createFlowWithSchema,C as createInputNode,c as createStorageNode,S as createTransformNode,$ as createTypeGuard,o as describeImageParamsSchema,g as describeVideoMetadataSchema,m as extractFrameVideoParamsSchema,B as filterOutputsByType,D as flipTransformSchema,F as flowServer,oe as flowTypeRegistry,O as getFirstOutputByType,J as getFlowData,X as getNodeData,Y as getOutputByNodeId,te as getSingleOutputByType,se as grayscaleTransformSchema,j as hasOutputOfType,s as inputDataSchema,d as inputNodeParamsSchema,W as isStorageOutput,ue as logoTransformSchema,p as optimizeParamsSchema,H as removeBackgroundParamsSchema,t as resizeParamsSchema,A as resizeTransformSchema,U as resizeVideoParamsSchema,Q as resolveUploadMetadata,le as rotateTransformSchema,re as runArgsSchema,y as sepiaTransformSchema,r as sharpenTransformSchema,x as storageParamsSchema,ce as textTransformSchema,h as transcodeVideoParamsSchema,b as transformImageParamsSchema,a as transformationSchema,Z as trimVideoParamsSchema,T as waitingNodeExecution,i as watermarkTransformSchema};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./uploadista-error-DR65duXB.mjs";import{D as t,h as n,s as r}from"./types-D54Q_YmF.mjs";import{a as i,n as a,o}from"./upload-DDke4PGB.mjs";import{Context as s,Effect as c,Layer as l,Option as u,Runtime as d}from"effect";import{z as f}from"zod";function p({source:e,target:t,sourcePort:n,targetPort:r}){return{source:e,target:t,sourcePort:n,targetPort:r}}let m=function(e){return e.JobStart=`job-start`,e.JobEnd=`job-end`,e.FlowStart=`flow-start`,e.FlowEnd=`flow-end`,e.FlowError=`flow-error`,e.FlowPause=`flow-pause`,e.FlowCancel=`flow-cancel`,e.NodeStart=`node-start`,e.NodeEnd=`node-end`,e.NodePause=`node-pause`,e.NodeResume=`node-resume`,e.NodeError=`node-error`,e.NodeStream=`node-stream`,e.NodeResponse=`node-response`,e}({});var h=class{types;constructor(){this.types=new Map}register(t){if(this.types.has(t.id))throw e.fromCode(`VALIDATION_ERROR`,{body:`Node type "${t.id}" is already registered. Types cannot be modified or re-registered.`,details:{typeId:t.id}});this.types.set(t.id,t)}get(e){return this.types.get(e)}listByCategory(e){let t=[];for(let n of this.types.values())n.category===e&&t.push(n);return t}validate(t,n){let r=this.types.get(t);if(!r)return{success:!1,error:e.fromCode(`VALIDATION_ERROR`,{body:`Node type "${t}" is not registered`,details:{typeId:t}})};try{return{success:!0,data:r.schema.parse(n)}}catch(n){return{success:!1,error:e.fromCode(`VALIDATION_ERROR`,{body:`Data validation failed for type "${t}"`,cause:n,details:{typeId:t,validationErrors:n}})}}}has(e){return this.types.has(e)}size(){return this.types.size}};const g=new h,_=`streaming-input-v1`,v=`storage-output-v1`;g.register({id:_,category:`input`,schema:t,version:`1.0.0`,description:`Streaming file input node that accepts chunked uploads`}),g.register({id:v,category:`output`,schema:t,version:`1.0.0`,description:`Storage output node that saves files to configured storage backend`});let y=function(e){return e.input=`input`,e.process=`process`,e.output=`output`,e.conditional=`conditional`,e.multiplex=`multiplex`,e.merge=`merge`,e}({});function b({id:t,name:n,description:r,type:i,inputSchema:a,outputSchema:o,run:s,condition:l,multiInput:u=!1,multiOutput:d=!1,pausable:f=!1,retry:p,nodeTypeId:m}){return c.gen(function*(){if(m){let n=g.get(m);if(!n)return yield*e.fromCode(`INVALID_NODE_TYPE`,{body:`Node type "${m}" is not registered`,details:{nodeTypeId:m,nodeId:t}}).toEffect();if(i===y.input&&n.category!==`input`)return yield*e.fromCode(`TYPE_CATEGORY_MISMATCH`,{body:`Node type "${m}" is registered as "${n.category}" but node "${t}" is type "${i}"`,details:{nodeTypeId:m,nodeId:t,expectedCategory:`input`,actualCategory:n.category}}).toEffect();if(i===y.output&&n.category!==`output`)return yield*e.fromCode(`TYPE_CATEGORY_MISMATCH`,{body:`Node type "${m}" is registered as "${n.category}" but node "${t}" is type "${i}"`,details:{nodeTypeId:m,nodeId:t,expectedCategory:`output`,actualCategory:n.category}}).toEffect()}return{id:t,name:n,description:r,type:i,inputSchema:a,outputSchema:o,pausable:f,run:({data:r,jobId:i,flowId:l,storageId:u,clientId:d})=>c.gen(function*(){let f=yield*s({data:yield*c.try({try:()=>a.parse(r),catch:r=>{let i=r instanceof Error?r.message:String(r);return e.fromCode(`FLOW_INPUT_VALIDATION_ERROR`,{body:`Node '${n}' (${t}) input validation failed: ${i}`,cause:r})}}),jobId:i,storageId:u,flowId:l,clientId:d});return f.type===`waiting`?{type:`waiting`,partialData:f.partialData,nodeType:m,nodeId:t}:{type:`complete`,data:yield*c.try({try:()=>o.parse(f.data),catch:r=>{let i=r instanceof Error?r.message:String(r);return e.fromCode(`FLOW_OUTPUT_VALIDATION_ERROR`,{body:`Node '${n}' (${t}) output validation failed: ${i}`,cause:r})}}),nodeType:m,nodeId:t}}),condition:l,multiInput:u,multiOutput:d,retry:p}})}const x=e=>({id:e.id,name:e.name,description:e.description,type:e.type});var S=class{maxConcurrency;constructor(e={}){this.maxConcurrency=e.maxConcurrency??4}groupNodesByExecutionLevel(e,t){let n={},r={};e.forEach(e=>{n[e.id]=[],r[e.id]=0}),t.forEach(e=>{n[e.source]?.push(e.target),r[e.target]=(r[e.target]||0)+1});let i=[],a=new Set,o=0;for(;a.size<e.length;){let e=Object.keys(r).filter(e=>r[e]===0&&!a.has(e));if(e.length===0)throw Error(`Cycle detected in flow graph - cannot execute in parallel`);i.push({level:o++,nodes:e}),e.forEach(e=>{a.add(e),delete r[e],n[e]?.forEach(e=>{r[e]!==void 0&&r[e]--})})}return i}executeNodesInParallel(e){return c.all(e.map(e=>e()),{concurrency:this.maxConcurrency})}canExecuteInParallel(e,t,n){return e.every(e=>(n[e]||[]).every(e=>t.has(e)))}getStats(){return{maxConcurrency:this.maxConcurrency}}};const C=(e,t)=>{if(e===t)return!0;try{return!!(e&&t&&typeof e==`object`&&typeof t==`object`)}catch{return!0}};var w=class{typeChecker;constructor(e=C){this.typeChecker=e}validateConnection(e,t,n){return this.getCompatibleTypes(e.outputSchema,t.inputSchema)}getCompatibleTypes(e,t){return this.typeChecker(e,t)}validateFlow(e,t){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=r.get(e.source),i=r.get(e.target);if(!t){n.push(`Source node ${e.source} not found`);continue}if(!i){n.push(`Target node ${e.target} not found`);continue}this.validateConnection(t,i,e)||n.push(`Schema mismatch: ${t.id} output schema incompatible with ${i.id} input schema`)}return{isValid:n.length===0,errors:n}}getExpectedInputSchemas(e,t,n){let r=new Map(t.map(e=>[e.id,e])),i={};for(let t of n)if(t.target===e){let e=r.get(t.source);if(e){let n=t.sourcePort||t.source;i[n]=e.outputSchema}}return i}getActualOutputSchemas(e,t,n){let r=new Map(t.map(e=>[e.id,e])),i={};for(let t of n)if(t.source===e){let e=r.get(t.target);if(e){let n=t.targetPort||t.target;i[n]=e.inputSchema}}return i}validateData(e,t){try{return t.parse(e),{isValid:!0,errors:[]}}catch(e){return e instanceof Error&&`errors`in e?{isValid:!1,errors:e.errors.map(e=>`${e.path.join(`.`)}: ${e.message}`)}:{isValid:!1,errors:[e instanceof Error?e.message:`Validation failed`]}}}};const T=e=>({id:e.id,name:e.name,nodes:e.nodes.map(x),edges:e.edges});function E(t){return c.gen(function*(){let n=yield*c.all(t.nodes.map(e=>c.isEffect(e)?e:c.succeed(e))),{flowId:r,name:i,onEvent:a,checkJobStatus:o,edges:s,inputSchema:l,outputSchema:u,typeChecker:d}=t,p=n,h=new w(d),g=()=>{let e={},t={},n={};return p.forEach(r=>{e[r.id]=[],n[r.id]=[],t[r.id]=0}),s.forEach(r=>{e[r.source]?.push(r.target),n[r.target]?.push(r.source),t[r.target]=(t[r.target]||0)+1}),{graph:e,reverseGraph:n,inDegree:t}},_=()=>{let{graph:e,inDegree:t}=g(),n=[],r=[];for(Object.keys(t).forEach(e=>{t[e]===0&&n.push(e)});n.length>0;){let i=n.shift();if(!i)throw Error(`No current node found`);r.push(i),e[i]?.forEach(e=>{t[e]=(t[e]||0)-1,t[e]===0&&n.push(e)})}return r},v=(e,t)=>{if(!e.condition)return c.succeed(!0);let{field:n,operator:r,value:i}=e.condition,a=t,o=a?.metadata?.[n]||a?.[n],s=(()=>{switch(r){case`equals`:return o===i;case`notEquals`:return o!==i;case`greaterThan`:return Number(o)>Number(i);case`lessThan`:return Number(o)<Number(i);case`contains`:return String(o).includes(String(i));case`startsWith`:return String(o).startsWith(String(i));default:return!0}})();return c.succeed(s)},y=(e,t)=>{let{reverseGraph:n}=g(),r=n[e]||[],i={};return r.forEach(e=>{let n=t.get(e);n!==void 0&&(i[e]=n)}),i},b=e=>{let t=p.filter(e=>e.type===`input`),n={};return t.forEach(t=>{e&&typeof e==`object`&&t.id in e&&(n[t.id]=l.parse(e[t.id]))}),n},x=e=>{let t=p.filter(e=>e.type===`output`),n={};return t.forEach(t=>{let r=e.get(t.id);r!==void 0&&(n[t.id]=r)}),n},C=(e,t)=>{let n=p.filter(e=>e.type===`output`),r=[];return n.forEach(n=>{let i=e.get(n.id);if(i!==void 0){let e=t.get(n.id);r.push({nodeId:n.id,nodeType:e,data:i,timestamp:new Date().toISOString()})}}),r},T=(t,n,i,s,l,u,d)=>c.gen(function*(){let f=l.get(t);if(!f)return yield*e.fromCode(`FLOW_NODE_NOT_FOUND`).toEffect();if(o){let t=yield*o(u);if(t===`paused`)return yield*e.fromCode(`FLOW_PAUSED`,{cause:`Flow ${r} was paused by user at job ${u}`}).toEffect();if(t===`cancelled`)return yield*e.fromCode(`FLOW_CANCELLED`,{cause:`Flow ${r} was cancelled by user at job ${u}`}).toEffect()}a&&(yield*a({jobId:u,flowId:r,nodeId:t,eventType:m.NodeStart,nodeName:f.name,nodeType:f.type}));let p=f.retry?.maxRetries??0,h=f.retry?.retryDelay??1e3,g=f.retry?.exponentialBackoff??!0,_=0,b=null;for(;_<=p;)try{let o,l={};if(f.type===`input`){if(o=i[t],o===void 0)return yield*c.logError(`Input node ${t} has no input data`),yield*e.fromCode(`FLOW_NODE_ERROR`,{cause:Error(`Input node ${t} has no input data`)}).toEffect()}else{if(l=y(t,s),Object.keys(l).length===0)return yield*c.logError(`Node ${t} has no input data`),yield*e.fromCode(`FLOW_NODE_ERROR`,{cause:Error(`Node ${t} has no input data`)}).toEffect();if(f.multiInput)o=l;else{let n=Object.keys(l)[0];if(!n)return yield*e.fromCode(`FLOW_NODE_ERROR`,{cause:Error(`Node ${t} has no input data`)}).toEffect();o=l[n]}}if(f.type===`conditional`&&!(yield*v(f,o)))return a&&(yield*a({jobId:u,flowId:r,nodeId:t,eventType:m.NodeEnd,nodeName:f.name})),{nodeId:t,result:o,success:!0,waiting:!1};let p=yield*f.run({data:o,inputs:l,jobId:u,flowId:r,storageId:n,clientId:d});if(p.type===`waiting`){let e=p.partialData;return a&&(yield*a({jobId:u,flowId:r,nodeId:t,eventType:m.NodePause,nodeName:f.name,partialData:e})),{nodeId:t,result:e,success:!0,waiting:!0,nodeType:p.nodeType}}let h=p.data;return a&&(yield*a({jobId:u,flowId:r,nodeId:t,eventType:m.NodeEnd,nodeName:f.name,result:h})),{nodeId:t,result:h,success:!0,waiting:!1,nodeType:p.nodeType}}catch(n){if(b=n instanceof e?n:e.fromCode(`FLOW_NODE_ERROR`,{cause:n}),_<p){_++;let e=g?h*2**(_-1):h;yield*c.logWarning(`Node ${t} (${f.name}) failed, retrying (${_}/${p}) after ${e}ms`),yield*c.sleep(e);continue}return a&&(yield*a({jobId:u,flowId:r,nodeId:t,eventType:m.NodeError,nodeName:f.name,error:b.body,retryCount:_})),yield*b.toEffect()}return b?yield*b.toEffect():yield*e.fromCode(`FLOW_NODE_ERROR`,{cause:Error(`Unexpected error in retry loop`)}).toEffect()}),E=({inputs:n,storageId:i,jobId:o,resumeFrom:l,clientId:d})=>c.gen(function*(){!l&&a&&(yield*a({jobId:o,eventType:m.FlowStart,flowId:r}));let h=b(n||{}),g,v,y;l?(g=l.executionOrder,v=l.nodeResults,y=l.currentIndex):(g=_(),v=new Map,y=0);let w=new Map;if(g.length!==p.length)return yield*e.fromCode(`FLOW_CYCLE_ERROR`).toEffect();let E=new Map(p.map(e=>[e.id,e]));if(t.parallelExecution?.enabled??!1){yield*c.logDebug(`Flow ${r}: Executing in parallel mode (maxConcurrency: ${t.parallelExecution?.maxConcurrency??4})`);let e=new S({maxConcurrency:t.parallelExecution?.maxConcurrency??4}),n=e.groupNodesByExecutionLevel(p,s);yield*c.logDebug(`Flow ${r}: Grouped nodes into ${n.length} execution levels`);let u={};p.forEach(e=>{u[e.id]=[]}),s.forEach(e=>{u[e.target]?.push(e.source)});for(let t of n){yield*c.logDebug(`Flow ${r}: Executing level ${t.level} with nodes: ${t.nodes.join(`, `)}`);let n=t.nodes.map(e=>()=>c.gen(function*(){if(l&&e===l.executionOrder[y]&&a){let t=E.get(e);t&&(yield*a({jobId:o,flowId:r,nodeId:e,eventType:m.NodeResume,nodeName:t.name,nodeType:t.type}))}return{nodeId:e,nodeResult:yield*T(e,i,h,v,E,o,d)}})),s=yield*e.executeNodesInParallel(n);for(let{nodeId:e,nodeResult:t}of s){if(t.waiting)return t.result!==void 0&&(v.set(e,t.result),t.nodeType&&w.set(e,t.nodeType)),{type:`paused`,nodeId:e,executionState:{executionOrder:g,currentIndex:g.indexOf(e),inputs:h}};t.success&&(v.set(e,t.result),t.nodeType&&w.set(e,t.nodeType))}}}else{yield*c.logDebug(`Flow ${r}: Executing in sequential mode`);for(let t=y;t<g.length;t++){let n=g[t];if(!n)return yield*e.fromCode(`FLOW_NODE_NOT_FOUND`).toEffect();if(l&&t===y&&a){let e=E.get(n);e&&(yield*a({jobId:o,flowId:r,nodeId:n,eventType:m.NodeResume,nodeName:e.name,nodeType:e.type}))}let s=yield*T(n,i,h,v,E,o,d);if(s.waiting)return s.result!==void 0&&(v.set(s.nodeId,s.result),s.nodeType&&w.set(s.nodeId,s.nodeType)),{type:`paused`,nodeId:s.nodeId,executionState:{executionOrder:g,currentIndex:t,inputs:h}};s.success&&(v.set(s.nodeId,s.result),s.nodeType&&w.set(s.nodeId,s.nodeType))}}let D=x(v),O=C(v,w),k=f.record(f.string(),u).safeParse(D);if(!k.success){let t=`Flow output validation failed: ${k.error.message}. Expected outputs: ${JSON.stringify(Object.keys(x(v)))}. Output nodes: ${p.filter(e=>e.type===`output`).map(e=>e.id).join(`, `)}`;return a&&(yield*a({jobId:o,eventType:m.FlowError,flowId:r,error:t})),yield*e.fromCode(`FLOW_OUTPUT_VALIDATION_ERROR`,{body:t,cause:k.error}).toEffect()}let A=k.data;return a&&(yield*a({jobId:o,eventType:m.FlowEnd,flowId:r,outputs:O,result:A})),{type:`completed`,result:A,outputs:O}});return{id:r,name:i,nodes:p,edges:s,inputSchema:l,outputSchema:u,onEvent:a,checkJobStatus:o,run:({inputs:e,storageId:t,jobId:n,clientId:r})=>E({inputs:e,storageId:t,jobId:n,clientId:r}),resume:({jobId:e,storageId:t,nodeResults:n,executionState:r,clientId:i})=>E({inputs:r.inputs,storageId:t,jobId:e,resumeFrom:{executionOrder:r.executionOrder,nodeResults:new Map(Object.entries(n)),currentIndex:r.currentIndex},clientId:i}),validateTypes:()=>{let e=p;return h.validateFlow(e,s)},validateInputs:e=>h.validateData(e,l),validateOutputs:e=>h.validateData(e,u)}})}var D=class e extends s.Tag(`FlowWaitUntil`)(){static optional=c.serviceOption(e)},O=class extends s.Tag(`FlowProvider`)(){},k=class extends s.Tag(`FlowServer`)(){};const A=e=>typeof e==`object`&&!!e&&`id`in e,ee=e=>typeof e==`object`&&e&&`nodeId`in e&&`data`in e&&`timestamp`in e?e.data:e;function j(t,n,r){let i=e=>{let i=t=>c.gen(function*(){let n=yield*r.get(e);n&&(yield*r.set(e,{...n,...t,updatedAt:new Date}))});return a=>c.gen(function*(){switch(t.onEvent&&(yield*c.catchAll(t.onEvent(a),e=>(c.logError(`Original onEvent failed`,e),c.succeed({eventId:null})))),yield*n.emit(e,a),c.logInfo(`Updating job ${e} with event ${a.eventType}`),a.eventType){case m.FlowStart:yield*i({status:`running`});break;case m.FlowEnd:yield*c.gen(function*(){let t=yield*r.get(e);t&&a.outputs&&(yield*r.set(e,{...t,result:a.outputs,updatedAt:new Date}))});break;case m.FlowError:yield*i({status:`failed`,error:a.error});break;case m.NodeStart:yield*c.gen(function*(){let t=yield*r.get(e);if(t){let n=t.tasks.find(e=>e.nodeId===a.nodeId)?t.tasks.map(e=>e.nodeId===a.nodeId?{...e,status:`running`,updatedAt:new Date}:e):[...t.tasks,{nodeId:a.nodeId,status:`running`,createdAt:new Date,updatedAt:new Date}];yield*r.set(e,{...t,tasks:n,updatedAt:new Date})}});break;case m.NodePause:yield*c.gen(function*(){let t=yield*r.get(e);if(t){let n=t.tasks.find(e=>e.nodeId===a.nodeId)?t.tasks.map(e=>e.nodeId===a.nodeId?{...e,status:`paused`,result:a.partialData,updatedAt:new Date}:e):[...t.tasks,{nodeId:a.nodeId,status:`paused`,result:a.partialData,createdAt:new Date,updatedAt:new Date}];yield*r.set(e,{...t,tasks:n,updatedAt:new Date})}});break;case m.NodeResume:yield*c.gen(function*(){let t=yield*r.get(e);if(t){let n=t.tasks.map(e=>e.nodeId===a.nodeId?{...e,status:`running`,updatedAt:new Date}:e);yield*r.set(e,{...t,tasks:n,updatedAt:new Date})}});break;case m.NodeEnd:yield*c.gen(function*(){let n=yield*r.get(e);if(n){let i=n.tasks.map(e=>e.nodeId===a.nodeId?{...e,status:`completed`,result:a.result,updatedAt:new Date}:e),o=t.nodes.find(e=>e.id===a.nodeId)?.type===`output`,s=a.result,c=ee(s),l=n.intermediateFiles||[];o&&A(c)&&c.id?l=l.filter(e=>e!==c.id):!o&&A(c)&&c.id&&(l.includes(c.id)||l.push(c.id)),yield*r.set(e,{...n,tasks:i,intermediateFiles:l,updatedAt:new Date})}});break;case m.NodeError:yield*c.gen(function*(){let t=yield*r.get(e);if(t){let n=t.tasks.map(e=>e.nodeId===a.nodeId?{...e,status:`failed`,error:a.error,retryCount:a.retryCount,updatedAt:new Date}:e);yield*r.set(e,{...t,tasks:n,error:a.error,updatedAt:new Date})}});break}return{eventId:e}})},a=t=>t=>c.gen(function*(){let n=yield*r.get(t);return n?n.status===`paused`?`paused`:n.status===`cancelled`?`cancelled`:`running`:yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found`}))});return{...t,run:e=>c.gen(function*(){let n=e.jobId||crypto.randomUUID(),r=i(n),o=a(n);return yield*(yield*E({flowId:t.id,name:t.name,nodes:t.nodes,edges:t.edges,inputSchema:t.inputSchema,outputSchema:t.outputSchema,onEvent:r,checkJobStatus:o})).run({...e,jobId:n,clientId:e.clientId})}),resume:e=>c.gen(function*(){let n=e.jobId,r=i(n),o=a(n);return yield*(yield*E({flowId:t.id,name:t.name,nodes:t.nodes,edges:t.edges,inputSchema:t.inputSchema,outputSchema:t.outputSchema,onEvent:r,checkJobStatus:o})).resume(e)})}}function M(){return c.gen(function*(){let t=yield*O,i=yield*n,o=yield*r,s=yield*a,l=(t,n)=>c.gen(function*(){let r=yield*o.get(t);return r?yield*o.set(t,{...r,...n}):yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found`}))}),f=(e,t)=>c.gen(function*(){let n=yield*o.get(e);!n||!n.intermediateFiles||n.intermediateFiles.length===0||(yield*c.logInfo(`Cleaning up ${n.intermediateFiles.length} intermediate files for job ${e}`),yield*c.all(n.intermediateFiles.map(e=>c.gen(function*(){yield*s.delete(e,t),yield*c.logDebug(`Deleted intermediate file ${e}`)}).pipe(c.catchAll(t=>c.gen(function*(){return yield*c.logWarning(`Failed to delete intermediate file ${e}: ${t}`),c.succeed(void 0)})))),{concurrency:5}),yield*l(e,{intermediateFiles:[]}))}),p=({jobId:t,flow:n,storageId:r,clientId:a,inputs:s})=>c.gen(function*(){console.log(`[FlowServer] executeFlowInBackground started for job: ${t}`),yield*l(t,{status:`running`}),console.log(`[FlowServer] Creating flowWithEvents for job: ${t}`);let e=j(n,i,o);console.log(`[FlowServer] Running flow for job: ${t}`);let c=yield*e.run({inputs:s,storageId:r,jobId:t,clientId:a});return console.log(`[FlowServer] Flow completed for job: ${t}, result type: ${c.type}`),c.type===`paused`?yield*l(t,{status:`paused`,pausedAt:c.nodeId,executionState:c.executionState,updatedAt:new Date}):(yield*l(t,{status:`completed`,updatedAt:new Date,endedAt:new Date}),yield*f(t,a)),c}).pipe(c.catchAll(n=>c.gen(function*(){yield*c.logError(`Flow execution failed`,n);let r=n instanceof e?n.body:String(n);yield*c.logInfo(`Updating job ${t} to failed status with error: ${r}`),yield*l(t,{status:`failed`,error:r,updatedAt:new Date}).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logError(`Failed to update job ${t}`,e),c.succeed(void 0)})));let s=yield*o.get(t);throw s&&(yield*i.emit(t,{jobId:t,eventType:m.FlowError,flowId:s.flowId,error:r}).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logError(`Failed to emit FlowError event for job ${t}`,e),c.succeed(void 0)})))),yield*f(t,a).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logWarning(`Failed to cleanup intermediate files for job ${t}`,e),c.succeed(void 0)}))),n})));return{getFlow:(e,n)=>c.gen(function*(){return yield*t.getFlow(e,n)}),getFlowData:(e,n)=>c.gen(function*(){return T(yield*t.getFlow(e,n))}),runFlow:({flowId:n,storageId:r,clientId:i,inputs:a})=>c.gen(function*(){let s=yield*D.optional,l=yield*c.try({try:()=>Pe.parse({inputs:a}),catch:t=>e.fromCode(`FLOW_INPUT_VALIDATION_ERROR`,{cause:t})}),f=crypto.randomUUID(),m=new Date,h={id:f,flowId:n,storageId:r,clientId:i,status:`started`,createdAt:m,updatedAt:m,tasks:[]};yield*o.set(f,h);let g=yield*t.getFlow(n,i);console.log(`[FlowServer] About to fork flow execution for job: ${f}`);let _=p({jobId:f,flow:g,storageId:r,clientId:i,inputs:l.inputs}).pipe(c.tapErrorCause(e=>c.logError(`Flow execution failed`,e)));if(u.isSome(s)){console.log(`[FlowServer] Using waitUntil for job: ${f}`);let e=yield*c.runtime(),t=d.runPromise(e)(_);s.value(t)}else console.log(`[FlowServer] Using Effect.forkDaemon for job: ${f}`),yield*c.forkDaemon(_);return console.log(`[FlowServer] Flow execution started for job: ${f}`),h}),getJobStatus:t=>c.gen(function*(){return(yield*o.get(t))||(yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found`})))}),resumeFlow:({jobId:n,nodeId:r,newData:a,clientId:s})=>c.gen(function*(){let p=yield*D.optional,h=yield*o.get(n);if(!h)return console.error(`Job not found`),yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${n} not found`}));if(h.status!==`paused`)return console.error(`Job is not paused`),yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${n} is not paused (status: ${h.status})`}));if(h.pausedAt!==r)return console.error(`Job is not paused at the expected node`),yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${n} is paused at node ${h.pausedAt}, not ${r}`}));if(!h.executionState)return console.error(`Job has no execution state`),yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${n} has no execution state`}));let g={...h.tasks.reduce((e,t)=>(t.result!==void 0&&(e[t.nodeId]=t.result),e),{}),[r]:a},_={...h.executionState.inputs,[r]:a};yield*l(n,{status:`running`});let v=yield*t.getFlow(h.flowId,h.clientId),y=c.gen(function*(){let t=j(v,i,o);if(!h.executionState)return yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${n} has no execution state`}));let r=yield*t.resume({jobId:n,storageId:h.storageId,nodeResults:g,executionState:{...h.executionState,inputs:_},clientId:h.clientId});return r.type===`paused`?yield*l(n,{status:`paused`,pausedAt:r.nodeId,executionState:r.executionState,updatedAt:new Date}):(yield*l(n,{status:`completed`,pausedAt:void 0,executionState:void 0,updatedAt:new Date,endedAt:new Date}),yield*f(n,s)),r}).pipe(c.catchAll(t=>c.gen(function*(){yield*c.logError(`Flow resume failed`,t);let r=t instanceof e?t.body:String(t);yield*c.logInfo(`Updating job ${n} to failed status with error: ${r}`),yield*l(n,{status:`failed`,error:r,updatedAt:new Date}).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logError(`Failed to update job ${n}`,e),c.succeed(void 0)})));let a=yield*o.get(n);throw a&&(yield*i.emit(n,{jobId:n,eventType:m.FlowError,flowId:a.flowId,error:r}).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logError(`Failed to emit FlowError event for job ${n}`,e),c.succeed(void 0)})))),yield*f(n,s).pipe(c.catchAll(e=>c.gen(function*(){return yield*c.logWarning(`Failed to cleanup intermediate files for job ${n}`,e),c.succeed(void 0)}))),t}))).pipe(c.tapErrorCause(e=>c.logError(`Flow resume failed`,e)));if(u.isSome(p)){console.log(`[FlowServer] Using waitUntil for resume job: ${n}`);let e=yield*c.runtime(),t=d.runPromise(e)(y);p.value(t)}else console.log(`[FlowServer] Using Effect.forkDaemon for resume job: ${n}`),yield*c.forkDaemon(y);return(yield*o.get(n))||(yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${n} not found after update`})))}),pauseFlow:(t,n)=>c.gen(function*(){let r=yield*o.get(t);if(!r)return yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found`}));if(n!==null&&r.clientId!==n)return yield*c.fail(e.fromCode(`FLOW_NOT_AUTHORIZED`,{cause:`Client ${n} is not authorized to pause job ${t}`}));if(r.status!==`running`)return yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${t} cannot be paused (current status: ${r.status})`}));let a=r.tasks.find(e=>e.status===`running`)?.nodeId;return yield*l(t,{status:`paused`,pausedAt:a,updatedAt:new Date}),yield*i.emit(t,{jobId:t,flowId:r.flowId,eventType:m.FlowPause,pausedAt:a}),(yield*o.get(t))||(yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found after pause`})))}),cancelFlow:(t,n)=>c.gen(function*(){let r=yield*o.get(t);return r?n!==null&&r.clientId!==n?yield*c.fail(e.fromCode(`FLOW_NOT_AUTHORIZED`,{cause:`Client ${n} is not authorized to cancel job ${t}`})):r.status!==`running`&&r.status!==`paused`&&r.status!==`started`?yield*c.fail(e.fromCode(`FLOW_JOB_ERROR`,{cause:`Job ${t} cannot be cancelled (current status: ${r.status})`})):(yield*l(t,{status:`cancelled`,updatedAt:new Date,endedAt:new Date}),yield*i.emit(t,{jobId:t,flowId:r.flowId,eventType:m.FlowCancel}),yield*f(t,n),(yield*o.get(t))||(yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found after cancellation`})))):yield*c.fail(e.fromCode(`FLOW_JOB_NOT_FOUND`,{cause:`Job ${t} not found`}))}),subscribeToFlowEvents:(e,t)=>c.gen(function*(){yield*i.subscribe(e,t)}),unsubscribeFromFlowEvents:e=>c.gen(function*(){yield*i.unsubscribe(e)})}})}const te=l.effect(k,M()),N=e=>({type:`complete`,data:e}),P=e=>({type:`waiting`,partialData:e});function F(e){if(!e)return{type:``,fileName:``,metadata:void 0,metadataJson:void 0};let t={...e},n=String(t.type||t.mimeType||t[`content-type`]||``);n&&(t.type||=n,t.mimeType||=n);let r=String(t.fileName||t.originalName||t.name||``);return r&&(t.fileName||=r,t.originalName||=r,t.name||=r),{type:n,fileName:r,metadata:t,metadataJson:JSON.stringify(t)}}const ne=f.object({operation:f.literal(`init`),storageId:f.string(),metadata:f.record(f.string(),f.any()).optional()}),re=f.object({operation:f.literal(`finalize`),uploadId:f.string()}),ie=f.object({operation:f.literal(`url`),url:f.string(),storageId:f.string().optional(),metadata:f.record(f.string(),f.any()).optional()}),I=f.union([ne,re,ie]),ae=f.object({allowedMimeTypes:f.array(f.string()).optional(),minSize:f.number().positive().optional(),maxSize:f.number().positive().optional()});function L(t,n){return c.gen(function*(){if(n){if(n.allowedMimeTypes&&n.allowedMimeTypes.length>0&&!n.allowedMimeTypes.some(e=>{if(e.endsWith(`/*`)){let n=e.slice(0,-2);return t.type.startsWith(n)}return t.type===e}))throw yield*e.fromCode(`VALIDATION_ERROR`,{cause:Error(`File type "${t.type}" is not allowed. Allowed types: ${n.allowedMimeTypes.join(`, `)}`)}).toEffect();if(n.minSize!==void 0&&t.size<n.minSize)throw yield*e.fromCode(`VALIDATION_ERROR`,{cause:Error(`File size (${t.size} bytes) is below minimum (${n.minSize} bytes)`)}).toEffect();if(n.maxSize!==void 0&&t.size>n.maxSize)throw yield*e.fromCode(`VALIDATION_ERROR`,{cause:Error(`File size (${t.size} bytes) exceeds maximum (${n.maxSize} bytes)`)}).toEffect()}})}function oe(n,r){return c.gen(function*(){let s=yield*a;return yield*b({id:n,name:`Input`,description:`Handles file input through multiple methods - streaming upload (init/finalize) or direct URL fetch`,type:y.input,inputSchema:I,outputSchema:t,nodeTypeId:_,run:({data:t,flowId:a,jobId:l,clientId:u})=>c.gen(function*(){switch(t.operation){case`init`:{let e={storageId:t.storageId,size:t.metadata?.size||0,type:t.metadata?.mimeType||`application/octet-stream`,fileName:t.metadata?.originalName,lastModified:t.metadata?.size?Date.now():void 0,metadata:t.metadata?JSON.stringify(t.metadata):void 0,flow:{flowId:a,nodeId:n,jobId:l}};return P(yield*s.createUpload(e,u))}case`finalize`:{let e=yield*s.getUpload(t.uploadId),{type:n}=F(e.metadata);return yield*L({type:n,size:e.size||0},r),N(e)}case`url`:{let e=yield*o(t.url),c=yield*i(e),d=t.metadata?.mimeType||e.headers.get(`content-type`)||`application/octet-stream`,f=t.metadata?.size||Number(e.headers.get(`content-length`)||0),p=t.metadata?.originalName||t.url.split(`/`).pop()||`file`;yield*L({type:d,size:f},r);let m=new ReadableStream({start(e){e.enqueue(new Uint8Array(c)),e.close()}}),h={storageId:t.storageId||`buffer`,size:f,type:d,fileName:p,lastModified:Date.now(),metadata:t.metadata?JSON.stringify(t.metadata):void 0};return N({...yield*s.upload(h,u,m),flow:{flowId:a,nodeId:n,jobId:l}})}default:throw yield*e.fromCode(`VALIDATION_ERROR`,{cause:Error(`Invalid operation`)}).toEffect()}})})})}const se=f.object({});function ce(n,r=e=>c.succeed(e)){return c.gen(function*(){let i=yield*a;return yield*b({id:n,name:`Storage`,description:`Stores a file in the storage`,type:y.output,inputSchema:t,outputSchema:t,nodeTypeId:v,run:({data:t,storageId:a,flowId:o,jobId:s,clientId:l})=>c.gen(function*(){let{type:u,fileName:d,metadata:f,metadataJson:p}=F(t.metadata),m={flowId:o,nodeId:n,jobId:s},h=f?{...t,metadata:f}:t,g=yield*i.getUpload(t.id);if(!g.id)return yield*c.fail(e.fromCode(`FILE_READ_ERROR`,Error(`Upload Key is undefined`)));if(g.storage.id===a)return N(yield*r({...h,flow:m}));let _=yield*i.read(t.id,l),v=new ReadableStream({start(e){e.enqueue(_),e.close()}}),y=yield*i.upload({storageId:a,size:_.byteLength,type:u,fileName:d,lastModified:0,metadata:p,flow:m},l,v),b=F(y.metadata);return N(yield*r(b.metadata?{...y,metadata:b.metadata}:y))})})})}function le({id:e,name:n,description:r,transform:i}){return c.gen(function*(){let o=yield*a;return yield*b({id:e,name:n,description:r,type:y.process,inputSchema:t,outputSchema:t,run:({data:t,storageId:n,flowId:r,jobId:a,clientId:s})=>c.gen(function*(){let c={flowId:r,nodeId:e,jobId:a},l=yield*i(yield*o.read(t.id,s),t),u=l instanceof Uint8Array?l:l.bytes,d=l instanceof Uint8Array?void 0:l.type,f=l instanceof Uint8Array?void 0:l.fileName,p=new ReadableStream({start(e){e.enqueue(u),e.close()}}),{type:m,fileName:h,metadata:g,metadataJson:_}=F(t.metadata),v=yield*o.upload({storageId:n,size:u.byteLength,type:d??m,fileName:f??h,lastModified:0,metadata:_,flow:c},s,p),y=g?{...g,...d&&{mimeType:d,type:d,"content-type":d},...f&&{fileName:f,originalName:f,name:f,extension:f.split(`.`).pop()||g.extension}}:v.metadata;return N(y?{...v,metadata:y}:v)})})})}var ue=class extends s.Tag(`CredentialProvider`)(){},de=class extends s.Tag(`DocumentAiPlugin`)(){},fe=class extends s.Tag(`DocumentPlugin`)(){},pe=class extends s.Tag(`ImageAiPlugin`)(){},me=class extends s.Tag(`ImagePlugin`)(){};const he=f.object({serviceType:f.enum([`replicate`]).optional()}),ge=f.object({duration:f.number().nonnegative(),width:f.number().positive(),height:f.number().positive(),codec:f.string(),format:f.string(),bitrate:f.number().nonnegative(),frameRate:f.number().positive(),aspectRatio:f.string(),hasAudio:f.boolean(),audioCodec:f.string().optional(),audioBitrate:f.number().nonnegative().optional(),size:f.number().nonnegative()}),_e=f.object({timestamp:f.number().nonnegative(),format:f.enum([`png`,`jpeg`]).optional(),quality:f.number().min(1).max(100).optional()}),ve=f.object({quality:f.number().min(0).max(100),format:f.enum([`jpeg`,`webp`,`png`,`avif`])}),ye=f.object({serviceType:f.enum([`replicate`]).optional()}),be=f.object({width:f.number().positive().optional(),height:f.number().positive().optional(),fit:f.enum([`contain`,`cover`,`fill`])}).refine(e=>e.width||e.height,`Either width or height must be specified for resize`),xe=f.object({width:f.number().positive().optional(),height:f.number().positive().optional(),aspectRatio:f.enum([`keep`,`ignore`]).optional(),scaling:f.enum([`bicubic`,`bilinear`,`lanczos`]).optional()}).refine(e=>e.width||e.height,`Either width or height must be specified for video resize`),Se=f.object({format:f.enum([`mp4`,`webm`,`mov`,`avi`]),codec:f.enum([`h264`,`h265`,`vp9`,`av1`]).optional(),videoBitrate:f.string().optional(),audioBitrate:f.string().optional(),audioCodec:f.enum([`aac`,`mp3`,`opus`,`vorbis`]).optional()}),R=f.object({type:f.literal(`resize`),width:f.number().positive().optional(),height:f.number().positive().optional(),fit:f.enum([`contain`,`cover`,`fill`])}),z=f.object({type:f.literal(`blur`),sigma:f.number().min(.3).max(1e3)}),B=f.object({type:f.literal(`rotate`),angle:f.number(),background:f.string().optional()}),V=f.object({type:f.literal(`flip`),direction:f.enum([`horizontal`,`vertical`])}),H=f.object({type:f.literal(`grayscale`)}),U=f.object({type:f.literal(`sepia`)}),W=f.object({type:f.literal(`brightness`),value:f.number().min(-100).max(100)}),G=f.object({type:f.literal(`contrast`),value:f.number().min(-100).max(100)}),K=f.object({type:f.literal(`sharpen`),sigma:f.number().positive().optional()}),q=f.object({type:f.literal(`watermark`),imagePath:f.string().min(1).url(),position:f.enum([`top-left`,`top-right`,`bottom-left`,`bottom-right`,`center`]),opacity:f.number().min(0).max(1),offsetX:f.number().optional(),offsetY:f.number().optional()}),J=f.object({type:f.literal(`logo`),imagePath:f.string().min(1).url(),position:f.enum([`top-left`,`top-right`,`bottom-left`,`bottom-right`,`center`]),scale:f.number().min(.1).max(2),offsetX:f.number().optional(),offsetY:f.number().optional()}),Y=f.object({type:f.literal(`text`),text:f.string().min(1),position:f.enum([`top-left`,`top-right`,`bottom-left`,`bottom-right`,`center`]),fontSize:f.number().positive(),color:f.string().min(1),fontFamily:f.string().optional(),offsetX:f.number().optional(),offsetY:f.number().optional()}),X=f.discriminatedUnion(`type`,[R,z,B,V,H,U,W,G,K,q,J,Y]),Ce=f.object({transformations:f.array(X).min(1)}),we=f.object({startTime:f.number().nonnegative(),endTime:f.number().positive().optional(),duration:f.number().positive().optional()}).refine(e=>!e.endTime||!e.duration,`Cannot specify both endTime and duration`).refine(e=>!e.endTime||e.endTime>e.startTime,`endTime must be greater than startTime`);var Te=class extends s.Tag(`VideoPlugin`)(){},Ee=class extends s.Tag(`VirusScanPlugin`)(){},De=class extends s.Tag(`ZipPlugin`)(){};function Z(e){return t=>{if(t.nodeType!==e)return!1;let n=g.get(e);return n?n.schema.safeParse(t.data).success:!1}}const Oe=Z(`storage-output-v1`);function Q(e,t){return e.filter(t)}function ke(t,n){return c.gen(function*(){let r=Q(t,n);return r.length===0?yield*e.fromCode(`OUTPUT_NOT_FOUND`,{body:`No output of the specified type was found in the flow results`}).toEffect():r.length>1?yield*e.fromCode(`MULTIPLE_OUTPUTS_FOUND`,{body:`Found ${r.length} outputs of the specified type, expected exactly one`,details:{foundCount:r.length,nodeIds:r.map(e=>e.nodeId)}}).toEffect():r[0]})}function Ae(e,t){return Q(e,t)[0]}function je(e,t){return e.find(e=>e.nodeId===t)}function Me(e,t){return e.some(t)}const $=(e,t)=>{if(e.length===0)return t;let[n,...r]=e;return r.reduce((e,t)=>f.union([e,t]),n)};function Ne(t){return c.gen(function*(){let n=Object.entries(t.nodes),r=e=>c.isEffect(e)?e:c.succeed(e),i=yield*c.forEach(n,([t,n])=>c.flatMap(r(n),n=>n.id===t?c.succeed([t,n]):c.fail(e.fromCode(`FLOW_NODE_ERROR`,{cause:Error(`Node key ${t} does not match node id ${n.id}`)})))),a=Object.fromEntries(i),o=i.map(([,e])=>e),s=i.filter(([,e])=>e.type===y.input).map(([,e])=>e.inputSchema),l=i.filter(([,e])=>e.type===y.output).map(([,e])=>e.outputSchema),u=t.inputSchema??$(s,f.unknown()),d=t.outputSchema??$(l,f.unknown()),p=t.edges.map(e=>({source:a[e.source]?.id??e.source,target:a[e.target]?.id??e.target,sourcePort:e.sourcePort,targetPort:e.targetPort}));return yield*E({flowId:t.flowId,name:t.name,nodes:o,edges:p,inputSchema:u,outputSchema:d,typeChecker:t.typeChecker,onEvent:t.onEvent,parallelExecution:t.parallelExecution})})}const Pe=f.object({inputs:f.record(f.string(),f.any())});export{M as $,be as A,ue as B,K as C,q as D,X as E,he as F,I as G,ce as H,me as I,N as J,ae as K,pe as L,ve as M,_e as N,Se as O,ge as P,D as Q,fe as R,U as S,Ce as T,se as U,le as V,oe as W,O as X,P as Y,k as Z,V as _,Ae as a,b as at,R as b,Me as c,_ as ct,Ee as d,m as dt,te as et,Te as f,p as ft,G as g,W as h,Q as i,y as it,ye as j,xe as k,Oe as l,h as lt,z as m,Ne as n,T as nt,je as o,x as ot,we as p,F as q,Z as r,S as rt,ke as s,v as st,Pe as t,E as tt,De as u,g as ut,H as v,Y as w,B as x,J as y,de as z};
2
+ //# sourceMappingURL=flow-BtI159Fi.mjs.map