@nodaro/shared 3.63.0 → 3.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3K24DWOH.js → chunk-222QM7CO.js} +3 -3
- package/dist/{chunk-3K24DWOH.js.map → chunk-222QM7CO.js.map} +1 -1
- package/dist/chunk-27HA6YOL.cjs +377 -0
- package/dist/chunk-27HA6YOL.cjs.map +1 -0
- package/dist/{chunk-4DVWXEB6.js → chunk-2NKF476Z.js} +3 -3
- package/dist/{chunk-4DVWXEB6.js.map → chunk-2NKF476Z.js.map} +1 -1
- package/dist/chunk-3AU52TSW.js +143 -0
- package/dist/chunk-3AU52TSW.js.map +1 -0
- package/dist/{chunk-F6WGGYQW.cjs → chunk-5NVGKXJV.cjs} +68 -29
- package/dist/chunk-5NVGKXJV.cjs.map +1 -0
- package/dist/{chunk-HWQ2SYNA.js → chunk-5SSMPYE5.js} +99 -9
- package/dist/chunk-5SSMPYE5.js.map +1 -0
- package/dist/{chunk-WRSWH7US.cjs → chunk-6BRWPJPP.cjs} +17 -2
- package/dist/chunk-6BRWPJPP.cjs.map +1 -0
- package/dist/{chunk-KHH54GRP.cjs → chunk-6ET3KDO4.cjs} +15 -338
- package/dist/chunk-6ET3KDO4.cjs.map +1 -0
- package/dist/{chunk-TM5JYSJF.cjs → chunk-6OSIOVF7.cjs} +98 -37
- package/dist/chunk-6OSIOVF7.cjs.map +1 -0
- package/dist/{chunk-YUER7TJG.js → chunk-6X5PBAC4.js} +13 -4
- package/dist/chunk-6X5PBAC4.js.map +1 -0
- package/dist/chunk-7BN4EDIC.cjs +185 -0
- package/dist/chunk-7BN4EDIC.cjs.map +1 -0
- package/dist/{chunk-6M563QE6.js → chunk-7OWXHW7Z.js} +78 -28
- package/dist/chunk-7OWXHW7Z.js.map +1 -0
- package/dist/{chunk-FXGNRYQQ.js → chunk-AT53ZQUC.js} +3 -3
- package/dist/{chunk-FXGNRYQQ.js.map → chunk-AT53ZQUC.js.map} +1 -1
- package/dist/{chunk-HSHCCBIV.js → chunk-BQYCZLMF.js} +16 -3
- package/dist/chunk-BQYCZLMF.js.map +1 -0
- package/dist/{chunk-34QLPTSA.js → chunk-BSTAAGLY.js} +3 -3
- package/dist/{chunk-34QLPTSA.js.map → chunk-BSTAAGLY.js.map} +1 -1
- package/dist/{chunk-PSKZKLDG.js → chunk-CW6MMQNO.js} +562 -26
- package/dist/chunk-CW6MMQNO.js.map +1 -0
- package/dist/{chunk-EPXGG27L.js → chunk-D5Y3EYRM.js} +5 -5
- package/dist/{chunk-EPXGG27L.js.map → chunk-D5Y3EYRM.js.map} +1 -1
- package/dist/{chunk-XGVJGNZW.cjs → chunk-DQ2PARNH.cjs} +15 -5
- package/dist/chunk-DQ2PARNH.cjs.map +1 -0
- package/dist/{chunk-6BZC2ZHC.cjs → chunk-E66HSC2E.cjs} +9 -9
- package/dist/{chunk-6BZC2ZHC.cjs.map → chunk-E66HSC2E.cjs.map} +1 -1
- package/dist/{chunk-NIAFR5EE.js → chunk-FGBGKBML.js} +32 -3
- package/dist/chunk-FGBGKBML.js.map +1 -0
- package/dist/{chunk-M5OCFGHF.cjs → chunk-FI3HJZWM.cjs} +588 -25
- package/dist/chunk-FI3HJZWM.cjs.map +1 -0
- package/dist/{chunk-L2TVY6XN.cjs → chunk-FJZTQTF4.cjs} +4 -4
- package/dist/{chunk-L2TVY6XN.cjs.map → chunk-FJZTQTF4.cjs.map} +1 -1
- package/dist/{chunk-XGGZWA4A.cjs → chunk-GJ3D5X4X.cjs} +52 -49
- package/dist/chunk-GJ3D5X4X.cjs.map +1 -0
- package/dist/{chunk-Q6IES3U2.js → chunk-H5KHWTAE.js} +5 -2
- package/dist/chunk-H5KHWTAE.js.map +1 -0
- package/dist/{chunk-MD4XHED4.js → chunk-H745DQ6V.js} +3 -3
- package/dist/{chunk-MD4XHED4.js.map → chunk-H745DQ6V.js.map} +1 -1
- package/dist/{chunk-KCZHQH2O.js → chunk-HAH2F7LT.js} +4 -4
- package/dist/{chunk-KCZHQH2O.js.map → chunk-HAH2F7LT.js.map} +1 -1
- package/dist/{chunk-V5EEQR2U.cjs → chunk-JQMFJAYU.cjs} +21 -21
- package/dist/{chunk-V5EEQR2U.cjs.map → chunk-JQMFJAYU.cjs.map} +1 -1
- package/dist/{chunk-WZVIBAKN.cjs → chunk-JYU5EIRM.cjs} +12 -12
- package/dist/{chunk-WZVIBAKN.cjs.map → chunk-JYU5EIRM.cjs.map} +1 -1
- package/dist/{chunk-Y35JQPT6.cjs → chunk-K6RIN3LW.cjs} +142 -45
- package/dist/chunk-K6RIN3LW.cjs.map +1 -0
- package/dist/{chunk-BLJUCPMV.cjs → chunk-KSHAAPQF.cjs} +5 -2
- package/dist/chunk-KSHAAPQF.cjs.map +1 -0
- package/dist/{chunk-2PU3AGGS.cjs → chunk-KTCEKGBJ.cjs} +7 -7
- package/dist/{chunk-2PU3AGGS.cjs.map → chunk-KTCEKGBJ.cjs.map} +1 -1
- package/dist/{chunk-LH72PQO2.cjs → chunk-KWYS4IIM.cjs} +165 -50
- package/dist/chunk-KWYS4IIM.cjs.map +1 -0
- package/dist/{chunk-GSKLPI3J.cjs → chunk-MIT2USTS.cjs} +118 -61
- package/dist/chunk-MIT2USTS.cjs.map +1 -0
- package/dist/{chunk-Y4GCJJPF.cjs → chunk-NYZQOIXJ.cjs} +35 -2
- package/dist/chunk-NYZQOIXJ.cjs.map +1 -0
- package/dist/{chunk-A2PX5IRC.cjs → chunk-PERUFUVH.cjs} +13 -13
- package/dist/{chunk-A2PX5IRC.cjs.map → chunk-PERUFUVH.cjs.map} +1 -1
- package/dist/{chunk-X5BAFW3Q.cjs → chunk-PGDR7CO3.cjs} +8 -8
- package/dist/{chunk-X5BAFW3Q.cjs.map → chunk-PGDR7CO3.cjs.map} +1 -1
- package/dist/{chunk-OV3JTKBY.js → chunk-PL7AQQV7.js} +123 -22
- package/dist/chunk-PL7AQQV7.js.map +1 -0
- package/dist/chunk-Q4YOLT4M.js +164 -0
- package/dist/chunk-Q4YOLT4M.js.map +1 -0
- package/dist/{chunk-GMBDLNLD.cjs → chunk-R5ILCNCC.cjs} +197 -60
- package/dist/chunk-R5ILCNCC.cjs.map +1 -0
- package/dist/chunk-RP4KQUNU.cjs +168 -0
- package/dist/chunk-RP4KQUNU.cjs.map +1 -0
- package/dist/{chunk-77WU3V3J.cjs → chunk-SPU7MUWE.cjs} +6 -6
- package/dist/{chunk-77WU3V3J.cjs.map → chunk-SPU7MUWE.cjs.map} +1 -1
- package/dist/{chunk-XBTYGQ6Z.js → chunk-ST7OBB5J.js} +8 -5
- package/dist/chunk-ST7OBB5J.js.map +1 -0
- package/dist/{chunk-2QKF7M2Z.js → chunk-TAPBDT47.js} +3 -3
- package/dist/{chunk-2QKF7M2Z.js.map → chunk-TAPBDT47.js.map} +1 -1
- package/dist/{chunk-BMJVKYVB.js → chunk-V5NLQ4L5.js} +123 -7
- package/dist/chunk-V5NLQ4L5.js.map +1 -0
- package/dist/{chunk-KMGCHV6O.js → chunk-V6OXSXIX.js} +63 -30
- package/dist/chunk-V6OXSXIX.js.map +1 -0
- package/dist/{chunk-LMAQUR55.cjs → chunk-WQMPIURW.cjs} +6 -6
- package/dist/{chunk-LMAQUR55.cjs.map → chunk-WQMPIURW.cjs.map} +1 -1
- package/dist/{chunk-ZPE2ZTJ4.cjs → chunk-WZG6GZIL.cjs} +4 -4
- package/dist/{chunk-ZPE2ZTJ4.cjs.map → chunk-WZG6GZIL.cjs.map} +1 -1
- package/dist/{chunk-AE3AAJ4O.js → chunk-XJANKTIL.js} +3 -3
- package/dist/{chunk-AE3AAJ4O.js.map → chunk-XJANKTIL.js.map} +1 -1
- package/dist/{chunk-O7RZRUMZ.js → chunk-XJWED257.js} +14 -309
- package/dist/chunk-XJWED257.js.map +1 -0
- package/dist/chunk-XSSLNINL.js +346 -0
- package/dist/chunk-XSSLNINL.js.map +1 -0
- package/dist/{chunk-6TGB7ECA.cjs → chunk-YD4XY74W.cjs} +12 -8
- package/dist/chunk-YD4XY74W.cjs.map +1 -0
- package/dist/{chunk-YX6TFX7H.js → chunk-YMZUE2IX.js} +66 -11
- package/dist/chunk-YMZUE2IX.js.map +1 -0
- package/dist/{chunk-4MMZD63H.js → chunk-Z77M7Q2R.js} +3 -3
- package/dist/{chunk-4MMZD63H.js.map → chunk-Z77M7Q2R.js.map} +1 -1
- package/dist/{chunk-CZ5IQB3L.js → chunk-ZSRXY5YT.js} +8 -5
- package/dist/chunk-ZSRXY5YT.js.map +1 -0
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.js +8 -7
- package/dist/entries/captions.cjs +38 -30
- package/dist/entries/captions.d.cts +48 -2
- package/dist/entries/captions.d.ts +48 -2
- package/dist/entries/captions.js +1 -1
- package/dist/entries/credits.cjs +319 -191
- package/dist/entries/credits.d.cts +260 -19
- package/dist/entries/credits.d.ts +260 -19
- package/dist/entries/credits.js +11 -11
- package/dist/entries/entities.cjs +202 -193
- package/dist/entries/entities.d.cts +44 -9
- package/dist/entries/entities.d.ts +44 -9
- package/dist/entries/entities.js +2 -1
- package/dist/entries/llm-models.cjs +86 -62
- package/dist/entries/llm-models.d.cts +73 -20
- package/dist/entries/llm-models.d.ts +73 -20
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +79 -63
- package/dist/entries/media.d.cts +154 -1
- package/dist/entries/media.d.ts +154 -1
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +205 -109
- package/dist/entries/model-catalog.d.cts +65 -58
- package/dist/entries/model-catalog.d.ts +65 -58
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +527 -346
- package/dist/entries/models.d.cts +86 -7
- package/dist/entries/models.d.ts +86 -7
- package/dist/entries/models.js +6 -5
- package/dist/entries/nodes.cjs +220 -211
- package/dist/entries/nodes.d.cts +46 -3
- package/dist/entries/nodes.d.ts +46 -3
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +156 -152
- package/dist/entries/pipeline.d.cts +14 -4
- package/dist/entries/pipeline.d.ts +14 -4
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +174 -145
- package/dist/entries/video.d.cts +114 -2
- package/dist/entries/video.d.ts +114 -2
- package/dist/entries/video.js +7 -6
- package/dist/entries/workflow.cjs +150 -150
- package/dist/entries/workflow.d.cts +1 -1
- package/dist/entries/workflow.d.ts +1 -1
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +2430 -1929
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +28 -27
- package/dist/{model-catalog-C_Eo35tL.d.cts → model-catalog-BoUKGFNl.d.cts} +182 -3
- package/dist/{model-catalog-C_Eo35tL.d.ts → model-catalog-BoUKGFNl.d.ts} +182 -3
- package/dist/{model-constants-DWcxOmaY.d.cts → model-constants-BElS3AeE.d.ts} +142 -23
- package/dist/{model-constants-Bg4ccSQb.d.ts → model-constants-CpQz1bGa.d.cts} +142 -23
- package/dist/tts-capabilities-BtnDWK9K.d.ts +133 -0
- package/dist/tts-capabilities-C52UccTI.d.cts +133 -0
- package/package.json +1 -1
- package/src/__tests__/add-captions-nemotron-pricing.test.ts +111 -0
- package/src/__tests__/dialogue-capabilities.test.ts +167 -6
- package/src/__tests__/extend-providers.test.ts +353 -26
- package/src/__tests__/fixtures/mask-composite-quote-parity.json +1 -1
- package/src/__tests__/fixtures/measured-input-quote-parity.json +1435 -0
- package/src/__tests__/fixtures/planned-length-quote-parity.json +1866 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +2343 -0
- package/src/__tests__/flux-3-klein.test.ts +203 -0
- package/src/__tests__/gpt-image-2-6-formats.test.ts +3 -1
- package/src/__tests__/kling4-catalog.test.ts +1 -1
- package/src/__tests__/llm-models.test.ts +48 -13
- package/src/__tests__/llm-price-key.test.ts +12 -0
- package/src/__tests__/model-makers.test.ts +3 -0
- package/src/__tests__/node-runtime-keys.test.ts +7 -0
- package/src/__tests__/normalize-node-params.test.ts +147 -1
- package/src/__tests__/retired-lip-sync-providers.test.ts +43 -0
- package/src/__tests__/seedance-extend-source-credit-id.test.ts +89 -0
- package/src/__tests__/sequence-execution.test.ts +22 -1
- package/src/__tests__/speech-pricing.test.ts +62 -1
- package/src/__tests__/suno-credit-type.test.ts +21 -2
- package/src/__tests__/transcribe-capabilities.test.ts +4 -2
- package/src/__tests__/tts-capabilities.test.ts +160 -4
- package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -2
- package/src/__tests__/video-analysis-pricing.test.ts +22 -9
- package/src/__tests__/video-subjects.test.ts +192 -0
- package/src/__tests__/wired-character-names.test.ts +142 -0
- package/src/caption-styles.ts +62 -0
- package/src/credit-estimators/add-captions-nemotron.ts +73 -0
- package/src/credit-estimators/index.ts +14 -0
- package/src/credit-estimators/speech.ts +57 -9
- package/src/credit-identifiers.ts +284 -13
- package/src/dialogue-capabilities.ts +220 -3
- package/src/dubbing-structure.ts +186 -0
- package/src/entries/captions.ts +2 -0
- package/src/entries/credits.ts +25 -1
- package/src/entries/entities.ts +2 -0
- package/src/entries/llm-models.ts +7 -0
- package/src/entries/media.ts +3 -1
- package/src/entries/model-catalog.ts +30 -0
- package/src/entries/models.ts +54 -0
- package/src/entries/nodes.ts +2 -0
- package/src/entries/pipeline.ts +1 -1
- package/src/entries/video.ts +8 -1
- package/src/flux-3-klein.ts +69 -0
- package/src/gemini-tts.ts +144 -0
- package/src/input-image-pricing.ts +23 -6
- package/src/llm-models.ts +130 -36
- package/src/model-catalog.ts +539 -25
- package/src/model-constants.ts +247 -25
- package/src/node-default-mappings.ts +3 -0
- package/src/node-runtime-keys.ts +3 -0
- package/src/normalize-node-params.ts +123 -2
- package/src/seedance-extend-rate.ts +116 -0
- package/src/sequence-execution.ts +24 -0
- package/src/transcribe-preflight.ts +23 -0
- package/src/tts-capabilities.ts +193 -1
- package/src/video-analysis-pricing.ts +39 -15
- package/src/video-character-refs.ts +160 -3
- package/src/wired-character-names.ts +134 -18
- package/src/wired-character-video-subjects.ts +63 -0
- package/dist/chunk-63H4C56Q.cjs +0 -38
- package/dist/chunk-63H4C56Q.cjs.map +0 -1
- package/dist/chunk-6M563QE6.js.map +0 -1
- package/dist/chunk-6TGB7ECA.cjs.map +0 -1
- package/dist/chunk-6XUG4L7X.cjs +0 -54
- package/dist/chunk-6XUG4L7X.cjs.map +0 -1
- package/dist/chunk-BLJUCPMV.cjs.map +0 -1
- package/dist/chunk-BMJVKYVB.js.map +0 -1
- package/dist/chunk-CZ5IQB3L.js.map +0 -1
- package/dist/chunk-F6WGGYQW.cjs.map +0 -1
- package/dist/chunk-GMBDLNLD.cjs.map +0 -1
- package/dist/chunk-GSKLPI3J.cjs.map +0 -1
- package/dist/chunk-HBXF6RUU.js +0 -31
- package/dist/chunk-HBXF6RUU.js.map +0 -1
- package/dist/chunk-HSHCCBIV.js.map +0 -1
- package/dist/chunk-HWQ2SYNA.js.map +0 -1
- package/dist/chunk-IY3Y462W.js +0 -42
- package/dist/chunk-IY3Y462W.js.map +0 -1
- package/dist/chunk-KHH54GRP.cjs.map +0 -1
- package/dist/chunk-KMGCHV6O.js.map +0 -1
- package/dist/chunk-LH72PQO2.cjs.map +0 -1
- package/dist/chunk-M5OCFGHF.cjs.map +0 -1
- package/dist/chunk-NIAFR5EE.js.map +0 -1
- package/dist/chunk-O7RZRUMZ.js.map +0 -1
- package/dist/chunk-OV3JTKBY.js.map +0 -1
- package/dist/chunk-PSKZKLDG.js.map +0 -1
- package/dist/chunk-Q6IES3U2.js.map +0 -1
- package/dist/chunk-TM5JYSJF.cjs.map +0 -1
- package/dist/chunk-WRSWH7US.cjs.map +0 -1
- package/dist/chunk-XBTYGQ6Z.js.map +0 -1
- package/dist/chunk-XGGZWA4A.cjs.map +0 -1
- package/dist/chunk-XGVJGNZW.cjs.map +0 -1
- package/dist/chunk-Y35JQPT6.cjs.map +0 -1
- package/dist/chunk-Y4GCJJPF.cjs.map +0 -1
- package/dist/chunk-YUER7TJG.js.map +0 -1
- package/dist/chunk-YX6TFX7H.js.map +0 -1
|
@@ -1,64 +1,109 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkT3TOSWVH_cjs = require('./chunk-T3TOSWVH.cjs');
|
|
4
|
+
var chunkJYU5EIRM_cjs = require('./chunk-JYU5EIRM.cjs');
|
|
4
5
|
var chunkD34K455O_cjs = require('./chunk-D34K455O.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
6
|
+
var chunkKWYS4IIM_cjs = require('./chunk-KWYS4IIM.cjs');
|
|
7
|
+
var chunkFI3HJZWM_cjs = require('./chunk-FI3HJZWM.cjs');
|
|
8
|
+
|
|
9
|
+
// src/seedance-extend-rate.ts
|
|
10
|
+
var SEEDANCE_EXTEND_SENT_PRICED_PROVIDER = "seedance-2-5-extend";
|
|
11
|
+
var SEEDANCE_EXTEND_CONTEXT_MAX_SEC = 10;
|
|
12
|
+
var SEEDANCE_EXTEND_RATE_SECONDS = 2;
|
|
13
|
+
var SEEDANCE_EXTEND_RATE_CREDIT_IDS = {
|
|
14
|
+
"480p": "seedance-2-5-extend:480p:per-2s",
|
|
15
|
+
"720p": "seedance-2-5-extend:720p:per-2s",
|
|
16
|
+
"1080p": "seedance-2-5-extend:1080p:per-2s"
|
|
17
|
+
};
|
|
18
|
+
function isSeedanceExtendPricedBySecondsSent(provider) {
|
|
19
|
+
return provider === SEEDANCE_EXTEND_SENT_PRICED_PROVIDER;
|
|
20
|
+
}
|
|
21
|
+
function isSeedanceExtendRateCreditId(id) {
|
|
22
|
+
return typeof id === "string" && Object.values(SEEDANCE_EXTEND_RATE_CREDIT_IDS).includes(id);
|
|
23
|
+
}
|
|
24
|
+
function seedanceExtendAddedSec(provider, duration) {
|
|
25
|
+
const requested = typeof duration === "number" || typeof duration === "string" ? duration : void 0;
|
|
26
|
+
const offered = chunkFI3HJZWM_cjs.MODEL_CATALOG[provider]?.durations ?? [];
|
|
27
|
+
const min = offered.length > 0 ? Math.min(...offered) : 1;
|
|
28
|
+
const max = offered.length > 0 ? Math.max(...offered) : Number.POSITIVE_INFINITY;
|
|
29
|
+
return Math.min(max, Math.max(min, Math.round(chunkKWYS4IIM_cjs.pricedOutputDurationSec(provider, requested))));
|
|
30
|
+
}
|
|
31
|
+
function knownSec(sec) {
|
|
32
|
+
return typeof sec === "number" && Number.isFinite(sec) && sec > 0 ? sec : void 0;
|
|
33
|
+
}
|
|
34
|
+
function seedanceExtendSourceSec(pictureSec) {
|
|
35
|
+
const whole = Math.floor(pictureSec);
|
|
36
|
+
return whole >= 1 && pictureSec - whole <= chunkFI3HJZWM_cjs.CONTAINER_OVERHANG_SEC ? whole : pictureSec;
|
|
37
|
+
}
|
|
38
|
+
function seedanceExtendSentSec(sourcePictureSec) {
|
|
39
|
+
const known = knownSec(sourcePictureSec);
|
|
40
|
+
return known === void 0 ? SEEDANCE_EXTEND_CONTEXT_MAX_SEC : Math.min(SEEDANCE_EXTEND_CONTEXT_MAX_SEC, seedanceExtendSourceSec(known));
|
|
41
|
+
}
|
|
42
|
+
function seedanceExtendRefusesSource(sourcePictureSec) {
|
|
43
|
+
const known = knownSec(sourcePictureSec);
|
|
44
|
+
return known !== void 0 && known < chunkKWYS4IIM_cjs.SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC;
|
|
45
|
+
}
|
|
46
|
+
function seedanceExtendUnits(sentSec, addedSec) {
|
|
47
|
+
return (sentSec + addedSec) / SEEDANCE_EXTEND_RATE_SECONDS;
|
|
48
|
+
}
|
|
7
49
|
|
|
8
50
|
// src/credit-identifiers.ts
|
|
9
51
|
function flux2MegapixelTier(model, resolution) {
|
|
10
52
|
const bare = (v) => v.replace(/\s*MP$/i, "").trim();
|
|
11
53
|
const raw = typeof resolution === "string" ? bare(resolution) : "";
|
|
12
54
|
if (raw === "") return "1";
|
|
13
|
-
const tier =
|
|
14
|
-
return tier ?? bare(
|
|
55
|
+
const tier = chunkFI3HJZWM_cjs.FLUX2_RES_MP.find((t) => Number(t) === Number(raw));
|
|
56
|
+
return tier ?? bare(chunkFI3HJZWM_cjs.defaultResolutionFor(model) ?? "1 MP");
|
|
15
57
|
}
|
|
16
58
|
function gptImage26CreditId(provider, quality, resolution, referenceImageCount, imageFormat) {
|
|
17
59
|
const q = chunkD34K455O_cjs.GPT_IMAGE_2_6_QUALITIES.includes(quality ?? "") ? quality : chunkD34K455O_cjs.GPT_IMAGE_2_6_DEFAULT_QUALITY;
|
|
18
60
|
const r = chunkD34K455O_cjs.GPT_IMAGE_2_6_RESOLUTIONS.includes(resolution ?? "") ? resolution : chunkD34K455O_cjs.GPT_IMAGE_2_6_DEFAULT_RESOLUTION;
|
|
19
61
|
const images = Math.trunc(referenceImageCount ?? 0);
|
|
20
|
-
const model = !chunkD34K455O_cjs.isGptImage26I2i(provider) && images > 0 ?
|
|
62
|
+
const model = !chunkD34K455O_cjs.isGptImage26I2i(provider) && images > 0 ? chunkKWYS4IIM_cjs.T2I_TO_I2I_VARIANT[provider] : provider;
|
|
21
63
|
const format = chunkD34K455O_cjs.gptImage26PricedFormat(imageFormat);
|
|
22
64
|
const base = format?.kind === "gif" ? `${model}:${q}:gif-${format.band}` : format?.kind === "svg" ? `${model}:${q}:${r}:svg-${format.level}` : `${model}:${q}:${r}`;
|
|
23
65
|
if (!chunkD34K455O_cjs.isGptImage26I2i(model)) return base;
|
|
24
66
|
return `${base}:${Math.min(Math.max(1, images), chunkD34K455O_cjs.GPT_IMAGE_2_6_MAX_INPUT_IMAGES)}ref`;
|
|
25
67
|
}
|
|
26
68
|
function seedream55CreditId(provider, resolution, referenceImageCount) {
|
|
27
|
-
const size =
|
|
69
|
+
const size = chunkFI3HJZWM_cjs.seedream55Resolution(resolution);
|
|
28
70
|
const images = Math.trunc(referenceImageCount ?? 0);
|
|
29
|
-
const model = !
|
|
30
|
-
if (!
|
|
31
|
-
return `${model}:${size}:${Math.min(Math.max(1, images),
|
|
71
|
+
const model = !chunkFI3HJZWM_cjs.isSeedream55I2i(provider) && images > 0 ? chunkFI3HJZWM_cjs.SEEDREAM_5_5_I2I : provider;
|
|
72
|
+
if (!chunkFI3HJZWM_cjs.isSeedream55I2i(model)) return `${model}:${size}`;
|
|
73
|
+
return `${model}:${size}:${Math.min(Math.max(1, images), chunkFI3HJZWM_cjs.SEEDREAM_5_5_MAX_INPUT_IMAGES)}ref`;
|
|
32
74
|
}
|
|
33
75
|
function buildCreditModelIdentifier(provider, quality, resolution, renderingSpeed, targetResolution, referenceImageCount, imageFormat) {
|
|
34
|
-
if (
|
|
76
|
+
if (chunkFI3HJZWM_cjs.isFlux2Model(provider)) {
|
|
35
77
|
return `${provider}:${flux2MegapixelTier(provider, resolution)}MP:${Math.min(referenceImageCount ?? 0, 8)}ref`;
|
|
36
78
|
}
|
|
37
79
|
if (chunkD34K455O_cjs.isGptImage26Tiered(provider)) {
|
|
38
80
|
return gptImage26CreditId(provider, quality, resolution, referenceImageCount, imageFormat);
|
|
39
81
|
}
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
82
|
+
if (chunkFI3HJZWM_cjs.isMinimaxH3Image(provider)) {
|
|
83
|
+
return chunkFI3HJZWM_cjs.minimaxH3ImageCreditId(provider, resolution, referenceImageCount);
|
|
42
84
|
}
|
|
43
|
-
if (
|
|
85
|
+
if (chunkFI3HJZWM_cjs.isSeedream55(provider)) {
|
|
44
86
|
return seedream55CreditId(provider, resolution, referenceImageCount);
|
|
45
87
|
}
|
|
46
|
-
if (
|
|
88
|
+
if (chunkFI3HJZWM_cjs.isFlux3Klein(provider)) {
|
|
89
|
+
return chunkFI3HJZWM_cjs.flux3KleinCreditId(provider, resolution, referenceImageCount);
|
|
90
|
+
}
|
|
91
|
+
if (chunkKWYS4IIM_cjs.HIGH_QUALITY_PROVIDERS.has(provider) && quality === "high") {
|
|
47
92
|
return `${provider}:high`;
|
|
48
93
|
}
|
|
49
|
-
if (
|
|
94
|
+
if (chunkKWYS4IIM_cjs.TWO_K_RESOLUTION_PROVIDERS.has(provider) && resolution === "2K") {
|
|
50
95
|
return `${provider}:2K`;
|
|
51
96
|
}
|
|
52
97
|
if (provider === "nano-banana-pro" && resolution === "4K") {
|
|
53
98
|
return `${provider}:4K`;
|
|
54
99
|
}
|
|
55
|
-
if (
|
|
100
|
+
if (chunkKWYS4IIM_cjs.RESOLUTION_2K_4K_TIERED_PROVIDERS.has(provider) && (resolution === "2K" || resolution === "4K")) {
|
|
56
101
|
return `${provider}:${resolution}`;
|
|
57
102
|
}
|
|
58
103
|
if (provider === "topaz-image-upscale" && targetResolution && targetResolution !== "2K") {
|
|
59
104
|
return `${provider}:${targetResolution}`;
|
|
60
105
|
}
|
|
61
|
-
if (
|
|
106
|
+
if (chunkKWYS4IIM_cjs.IDEOGRAM_PROVIDERS.has(provider)) {
|
|
62
107
|
if (renderingSpeed === "TURBO") return `${provider}:TURBO`;
|
|
63
108
|
if (renderingSpeed === "QUALITY") return `${provider}:QUALITY`;
|
|
64
109
|
}
|
|
@@ -66,10 +111,10 @@ function buildCreditModelIdentifier(provider, quality, resolution, renderingSpee
|
|
|
66
111
|
}
|
|
67
112
|
function normalizedImageGenModelId(opts) {
|
|
68
113
|
const provider = typeof opts.provider === "string" && opts.provider.length > 0 ? opts.provider : "nano-banana";
|
|
69
|
-
return opts.swapToI2i && opts.refCount > 0 ?
|
|
114
|
+
return opts.swapToI2i && opts.refCount > 0 ? chunkKWYS4IIM_cjs.T2I_TO_I2I_VARIANT[provider] ?? provider : provider;
|
|
70
115
|
}
|
|
71
116
|
function imageGenAutoAspectNeedsSourceImage(opts) {
|
|
72
|
-
const asks = (refCount) =>
|
|
117
|
+
const asks = (refCount) => chunkFI3HJZWM_cjs.autoAspectNeedsSourceImage(normalizedImageGenModelId({ provider: opts.provider, refCount, swapToI2i: true }), opts.aspectRatio);
|
|
73
118
|
return opts.refCount === void 0 ? asks(0) || asks(1) : asks(opts.refCount);
|
|
74
119
|
}
|
|
75
120
|
function imageFormatInputOf(source) {
|
|
@@ -89,7 +134,7 @@ function imageFormatInputOf(source) {
|
|
|
89
134
|
function resolveNormalizedImageGen(opts) {
|
|
90
135
|
const str = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
91
136
|
const modelId = normalizedImageGenModelId(opts);
|
|
92
|
-
const n =
|
|
137
|
+
const n = chunkFI3HJZWM_cjs.normalizeModelInput(
|
|
93
138
|
modelId,
|
|
94
139
|
{
|
|
95
140
|
aspectRatio: str(opts.aspectRatio),
|
|
@@ -142,88 +187,90 @@ function ltxPricedTier(provider, resolution, duration) {
|
|
|
142
187
|
if (!bands) return void 0;
|
|
143
188
|
const band = bands[String(resolution)] ? String(resolution) : "1080p";
|
|
144
189
|
const allowed = bands[band];
|
|
145
|
-
const dur =
|
|
190
|
+
const dur = chunkKWYS4IIM_cjs.snapToNearestDuration(chunkKWYS4IIM_cjs.pricedOutputDurationSec(provider, duration), allowed);
|
|
146
191
|
return { band, duration: dur };
|
|
147
192
|
}
|
|
148
193
|
function wireNormalizedResolution(provider, resolution) {
|
|
149
|
-
if (
|
|
150
|
-
if (
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
if (
|
|
154
|
-
if (
|
|
194
|
+
if (chunkKWYS4IIM_cjs.isWan3Provider(provider)) return chunkKWYS4IIM_cjs.normalizeWan3Resolution(resolution).toLowerCase();
|
|
195
|
+
if (chunkKWYS4IIM_cjs.isViduQ4Provider(provider)) return chunkKWYS4IIM_cjs.normalizeViduQ4Resolution(resolution);
|
|
196
|
+
if (chunkKWYS4IIM_cjs.isKling4Provider(provider)) return chunkKWYS4IIM_cjs.normalizeKling4Resolution(resolution);
|
|
197
|
+
if (chunkKWYS4IIM_cjs.isKling4FlashProvider(provider)) return chunkKWYS4IIM_cjs.KLING_4_FLASH_RESOLUTION;
|
|
198
|
+
if (chunkKWYS4IIM_cjs.isGrokVideo15Provider(provider)) return chunkKWYS4IIM_cjs.normalizeGrokVideo15Resolution(resolution);
|
|
199
|
+
if (chunkKWYS4IIM_cjs.isPixverseV6MaxProvider(provider)) return chunkKWYS4IIM_cjs.normalizePixverseV6MaxQuality(resolution);
|
|
155
200
|
return resolution;
|
|
156
201
|
}
|
|
157
202
|
function buildVideoCreditModelIdentifier(rawProvider, duration, sound, nodeType, mode, resolution, hasVideoRef) {
|
|
158
203
|
const audio = typeof sound === "object" && sound !== null ? sound : { sound };
|
|
159
|
-
const provider =
|
|
160
|
-
if (
|
|
204
|
+
const provider = chunkKWYS4IIM_cjs.canonicalVideoProvider(rawProvider);
|
|
205
|
+
if (chunkKWYS4IIM_cjs.isTailExtendProvider(provider)) return tailExtendCreditId(provider, duration, resolution);
|
|
206
|
+
if (chunkKWYS4IIM_cjs.isPixverseExtendProvider(provider)) return pixverseExtendCreditId(duration, resolution, audio.generateAudio ?? audio.sound);
|
|
207
|
+
if (chunkKWYS4IIM_cjs.isGrokExtendProvider(provider)) return grokExtendCreditId(duration);
|
|
161
208
|
let effectiveProvider = provider;
|
|
162
209
|
if (nodeType === "text-to-video") {
|
|
163
210
|
const override = T2V_CREDIT_OVERRIDES[provider];
|
|
164
211
|
if (override) {
|
|
165
|
-
if (
|
|
212
|
+
if (chunkKWYS4IIM_cjs.DURATION_PRICED_PROVIDERS.has(override)) {
|
|
166
213
|
effectiveProvider = override;
|
|
167
214
|
} else {
|
|
168
215
|
return override;
|
|
169
216
|
}
|
|
170
217
|
}
|
|
171
218
|
}
|
|
172
|
-
if (
|
|
219
|
+
if (chunkKWYS4IIM_cjs.isVeoProvider(effectiveProvider)) {
|
|
173
220
|
if (resolution === "4k") return `${effectiveProvider}:4k`;
|
|
174
|
-
if (resolution === "1080p" &&
|
|
221
|
+
if (resolution === "1080p" && chunkKWYS4IIM_cjs.VEO_RESOLUTION_TIERED_PROVIDERS.has(effectiveProvider)) return `${effectiveProvider}:1080p`;
|
|
175
222
|
return effectiveProvider;
|
|
176
223
|
}
|
|
177
|
-
if (
|
|
224
|
+
if (chunkKWYS4IIM_cjs.isGeminiOmniProvider(effectiveProvider) && !chunkKWYS4IIM_cjs.isGeminiOmniPerSecondProvider(effectiveProvider)) {
|
|
178
225
|
if (hasVideoRef) {
|
|
179
226
|
return resolution === "4k" ? `${effectiveProvider}:4k:vref` : `${effectiveProvider}:vref`;
|
|
180
227
|
}
|
|
181
|
-
const d =
|
|
228
|
+
const d = chunkKWYS4IIM_cjs.pricedOutputDurationSec(effectiveProvider, duration);
|
|
182
229
|
return resolution === "4k" ? `${effectiveProvider}:4k:${d}` : `${effectiveProvider}:${d}`;
|
|
183
230
|
}
|
|
184
231
|
const ltxTier = ltxPricedTier(effectiveProvider, resolution, duration);
|
|
185
232
|
if (ltxTier) {
|
|
186
233
|
return `${effectiveProvider}:${ltxTier.band}:${ltxTier.duration}s`;
|
|
187
234
|
}
|
|
188
|
-
if (!
|
|
235
|
+
if (!chunkKWYS4IIM_cjs.DURATION_PRICED_PROVIDERS.has(effectiveProvider)) {
|
|
189
236
|
return effectiveProvider;
|
|
190
237
|
}
|
|
191
|
-
const durationSec =
|
|
192
|
-
const tiers =
|
|
238
|
+
const durationSec = chunkKWYS4IIM_cjs.pricedOutputDurationSec(effectiveProvider, duration);
|
|
239
|
+
const tiers = chunkKWYS4IIM_cjs.VIDEO_DURATION_TIERS[effectiveProvider];
|
|
193
240
|
if (!tiers) return effectiveProvider;
|
|
194
241
|
const tier = tiers.find((t) => durationSec <= t.maxSeconds) ?? tiers[tiers.length - 1];
|
|
195
242
|
let identifier = `${effectiveProvider}:${tier.suffix}`;
|
|
196
|
-
if (
|
|
243
|
+
if (chunkKWYS4IIM_cjs.MODE_ADDON_PROVIDERS.has(effectiveProvider) && (mode === "high" || mode === "pro")) {
|
|
197
244
|
identifier += ":high";
|
|
198
245
|
}
|
|
199
|
-
if (
|
|
200
|
-
const supported =
|
|
201
|
-
const requested = resolution ??
|
|
246
|
+
if (chunkKWYS4IIM_cjs.RESOLUTION_VIDEO_REF_PRICING.has(effectiveProvider)) {
|
|
247
|
+
const supported = chunkFI3HJZWM_cjs.MODEL_CATALOG[effectiveProvider]?.resolutions ?? ["480p", "720p", "1080p"];
|
|
248
|
+
const requested = resolution ?? chunkKWYS4IIM_cjs.PRICING_DEFAULT_RESOLUTION[effectiveProvider];
|
|
202
249
|
const want = requested === "4k" ? "4k" : requested === "1080p" ? "1080p" : requested === "720p" ? "720p" : "480p";
|
|
203
250
|
const res = supported.includes(want) ? want : supported[supported.length - 1] ?? "480p";
|
|
204
251
|
identifier += `:${res}`;
|
|
205
252
|
if (hasVideoRef) identifier += "-ref";
|
|
206
253
|
}
|
|
207
|
-
const resTiers =
|
|
254
|
+
const resTiers = chunkKWYS4IIM_cjs.RESOLUTION_DURATION_PRICING[effectiveProvider];
|
|
208
255
|
if (resTiers) {
|
|
209
|
-
const declaredDefault =
|
|
256
|
+
const declaredDefault = chunkKWYS4IIM_cjs.PRICING_DEFAULT_RESOLUTION[effectiveProvider];
|
|
210
257
|
const fallback = declaredDefault && resTiers.includes(declaredDefault) ? declaredDefault : resTiers[0];
|
|
211
258
|
const requested = wireNormalizedResolution(effectiveProvider, resolution);
|
|
212
259
|
const res = requested && resTiers.includes(requested) ? requested : fallback;
|
|
213
260
|
identifier += `:${res}`;
|
|
214
|
-
if (hasVideoRef &&
|
|
261
|
+
if (hasVideoRef && chunkKWYS4IIM_cjs.VIDEO_REF_RATE_PROVIDERS.has(effectiveProvider)) identifier += "-ref";
|
|
215
262
|
}
|
|
216
|
-
if (
|
|
263
|
+
if (chunkKWYS4IIM_cjs.isMinimaxH3Provider(effectiveProvider) && chunkKWYS4IIM_cjs.normalizeMinimaxH3Resolution(resolution) === "768P") {
|
|
217
264
|
identifier += ":768p";
|
|
218
265
|
}
|
|
219
|
-
if (
|
|
266
|
+
if (chunkKWYS4IIM_cjs.AUDIO_ADDON_PROVIDERS.has(effectiveProvider) && chunkKWYS4IIM_cjs.videoAudioPricedOn(effectiveProvider, audio)) {
|
|
220
267
|
identifier += ":audio";
|
|
221
268
|
}
|
|
222
269
|
return identifier;
|
|
223
270
|
}
|
|
224
271
|
function videoGenerationCreditId(args) {
|
|
225
|
-
const { resolution } =
|
|
226
|
-
resolution: args.resolution ??
|
|
272
|
+
const { resolution } = chunkFI3HJZWM_cjs.normalizeVideoRequestParams(args.provider, {
|
|
273
|
+
resolution: args.resolution ?? chunkJYU5EIRM_cjs.uiResolutionFill(args.provider),
|
|
227
274
|
draft: args.draft === true
|
|
228
275
|
});
|
|
229
276
|
return buildVideoCreditModelIdentifier(
|
|
@@ -239,7 +286,7 @@ function videoGenerationCreditId(args) {
|
|
|
239
286
|
function seedanceVideoEditCreditId(provider, resolution, draft) {
|
|
240
287
|
return videoGenerationCreditId({
|
|
241
288
|
provider,
|
|
242
|
-
duration:
|
|
289
|
+
duration: chunkFI3HJZWM_cjs.VIDEO_DURATION_AUTO,
|
|
243
290
|
nodeType: "text-to-video",
|
|
244
291
|
resolution,
|
|
245
292
|
draft,
|
|
@@ -248,10 +295,74 @@ function seedanceVideoEditCreditId(provider, resolution, draft) {
|
|
|
248
295
|
}
|
|
249
296
|
var TAIL_EXTEND_DEFAULT_RESOLUTION = "720p";
|
|
250
297
|
function tailExtendResolution(provider, resolution) {
|
|
251
|
-
return typeof resolution === "string" &&
|
|
298
|
+
return typeof resolution === "string" && chunkFI3HJZWM_cjs.MODEL_CATALOG[provider]?.resolutions?.includes(resolution) ? resolution : TAIL_EXTEND_DEFAULT_RESOLUTION;
|
|
299
|
+
}
|
|
300
|
+
function seedanceExtendRateCreditId(resolution) {
|
|
301
|
+
const res = tailExtendResolution(SEEDANCE_EXTEND_SENT_PRICED_PROVIDER, resolution);
|
|
302
|
+
return SEEDANCE_EXTEND_RATE_CREDIT_IDS[res] ?? SEEDANCE_EXTEND_RATE_CREDIT_IDS["720p"];
|
|
303
|
+
}
|
|
304
|
+
function seedanceExtendSourceCreditId(sourcePictureSec, duration, resolution) {
|
|
305
|
+
if (seedanceExtendRefusesSource(sourcePictureSec)) return void 0;
|
|
306
|
+
return seedanceExtendWholeRunCreditId(seedanceExtendSentSec(sourcePictureSec), duration, resolution);
|
|
307
|
+
}
|
|
308
|
+
function seedanceExtendWholeRunCreditId(sentSec, duration, resolution) {
|
|
309
|
+
const units = seedanceExtendUnits(sentSec, seedanceExtendAddedSec(SEEDANCE_EXTEND_SENT_PRICED_PROVIDER, duration));
|
|
310
|
+
return chunkT3TOSWVH_cjs.unitQuoteCreditId(seedanceExtendRateCreditId(resolution), units);
|
|
311
|
+
}
|
|
312
|
+
function seedanceExtendFullWindowCreditId(duration, resolution) {
|
|
313
|
+
return seedanceExtendWholeRunCreditId(seedanceExtendSentSec(void 0), duration, resolution);
|
|
252
314
|
}
|
|
253
315
|
function tailExtendCreditId(provider, duration, resolution) {
|
|
254
|
-
|
|
316
|
+
if (isSeedanceExtendPricedBySecondsSent(provider)) return seedanceExtendFullWindowCreditId(duration, resolution);
|
|
317
|
+
return `${provider}:${chunkKWYS4IIM_cjs.pricedOutputDurationSec(provider, duration)}s:${tailExtendResolution(provider, resolution)}`;
|
|
318
|
+
}
|
|
319
|
+
var PIXVERSE_EXTEND_DEFAULT_QUALITY = "720p";
|
|
320
|
+
function pixverseExtendQuality(resolution) {
|
|
321
|
+
if (resolution === "480p") return "540p";
|
|
322
|
+
return typeof resolution === "string" && chunkFI3HJZWM_cjs.MODEL_CATALOG[chunkKWYS4IIM_cjs.PIXVERSE_V6_EXTEND_PROVIDER]?.resolutions?.includes(resolution) ? resolution : PIXVERSE_EXTEND_DEFAULT_QUALITY;
|
|
323
|
+
}
|
|
324
|
+
function pixverseExtendCreditId(duration, resolution, generateAudio) {
|
|
325
|
+
const seconds = chunkKWYS4IIM_cjs.pricedOutputDurationSec(chunkKWYS4IIM_cjs.PIXVERSE_V6_EXTEND_PROVIDER, duration);
|
|
326
|
+
return `${chunkKWYS4IIM_cjs.PIXVERSE_V6_EXTEND_PROVIDER}:${seconds}s:${pixverseExtendQuality(resolution)}${generateAudio === false ? "" : ":audio"}`;
|
|
327
|
+
}
|
|
328
|
+
function catalogExtendResolution(provider, resolution) {
|
|
329
|
+
return chunkKWYS4IIM_cjs.isPixverseExtendProvider(provider) ? pixverseExtendQuality(resolution) : tailExtendResolution(provider, resolution);
|
|
330
|
+
}
|
|
331
|
+
function catalogExtendCreditId(provider, duration, resolution, generateAudio) {
|
|
332
|
+
return chunkKWYS4IIM_cjs.isPixverseExtendProvider(provider) ? pixverseExtendCreditId(duration, resolution, generateAudio) : tailExtendCreditId(provider, duration, resolution);
|
|
333
|
+
}
|
|
334
|
+
function grokExtendSeconds(duration) {
|
|
335
|
+
const requested = typeof duration === "number" || typeof duration === "string" ? duration : void 0;
|
|
336
|
+
return chunkKWYS4IIM_cjs.pricedOutputDurationSec(chunkKWYS4IIM_cjs.GROK_EXTEND_PROVIDER, requested);
|
|
337
|
+
}
|
|
338
|
+
function grokExtendCreditId(duration, sourceResolution) {
|
|
339
|
+
const resolution = sourceResolution === "480p" ? "480p" : "720p";
|
|
340
|
+
return `${chunkKWYS4IIM_cjs.GROK_EXTEND_PROVIDER}:${grokExtendSeconds(duration)}s:${resolution}`;
|
|
341
|
+
}
|
|
342
|
+
var GROK_EXTEND_SOURCE_NODE_TYPES = /* @__PURE__ */ new Set(["generate-video", "text-to-video", "image-to-video"]);
|
|
343
|
+
function grokMadeClipResolution(data) {
|
|
344
|
+
const rows = (Array.isArray(data.generatedResults) ? data.generatedResults : []).filter(
|
|
345
|
+
(r) => typeof r === "object" && r !== null && typeof r.url === "string" && r.url.trim() !== ""
|
|
346
|
+
);
|
|
347
|
+
const task = typeof data.kieTaskId === "string" && data.kieTaskId.trim() !== "" ? data.kieTaskId.trim() : void 0;
|
|
348
|
+
if (task === void 0 && rows.length === 0) return void 0;
|
|
349
|
+
const named = task !== void 0 ? rows.find((r) => typeof r.kieTaskId === "string" && r.kieTaskId.trim() === task) : void 0;
|
|
350
|
+
const recorded = typeof named?.recordedResolution === "string" ? named.recordedResolution.trim().toLowerCase() : void 0;
|
|
351
|
+
return recorded === "480p" ? "480p" : "720p";
|
|
352
|
+
}
|
|
353
|
+
function grokExtendWiredSourceResolution(nodeId, nodes, edges, rerunIds = /* @__PURE__ */ new Set()) {
|
|
354
|
+
if (nodeId === void 0 || !edges) return "720p";
|
|
355
|
+
const sources = edges.filter((e) => e.target === nodeId && (e.targetHandle == null || e.targetHandle === "video")).map((e) => nodes.find((n) => n.id !== void 0 && n.id === e.source));
|
|
356
|
+
if (sources.length === 0) return "720p";
|
|
357
|
+
const surely480p = sources.every((n) => {
|
|
358
|
+
const data = n?.data ?? {};
|
|
359
|
+
if (n?.type === void 0 || !GROK_EXTEND_SOURCE_NODE_TYPES.has(n.type) || !chunkKWYS4IIM_cjs.isGrokExtendSourceModel(data.provider)) return false;
|
|
360
|
+
const runsAgain = n.id !== void 0 && rerunIds.has(n.id) && data.skipped !== true;
|
|
361
|
+
const made = runsAgain ? void 0 : grokMadeClipResolution(data);
|
|
362
|
+
if (made !== void 0) return made === "480p";
|
|
363
|
+
return typeof data.resolution === "string" && data.resolution.trim().toLowerCase() === "480p";
|
|
364
|
+
});
|
|
365
|
+
return surely480p ? "480p" : "720p";
|
|
255
366
|
}
|
|
256
367
|
function seedanceExtendResolution(provider, resolution) {
|
|
257
368
|
return tailExtendResolution(provider, resolution);
|
|
@@ -262,12 +373,12 @@ function seedanceExtendCreditId(provider, duration, resolution) {
|
|
|
262
373
|
function pricedVideoSelection(opts) {
|
|
263
374
|
const adjustments = [];
|
|
264
375
|
const ltx = ltxPricedTier(opts.provider, opts.resolution, opts.duration);
|
|
265
|
-
const resolution = opts.resolution ?? (ltx ? ltx.band :
|
|
376
|
+
const resolution = opts.resolution ?? (ltx ? ltx.band : chunkKWYS4IIM_cjs.PRICING_DEFAULT_RESOLUTION[opts.provider]);
|
|
266
377
|
const requested = typeof opts.duration === "string" ? parseInt(opts.duration, 10) : opts.duration;
|
|
267
378
|
const asked = requested !== void 0 && !Number.isNaN(requested);
|
|
268
|
-
const lengthPriced = !!ltx ||
|
|
379
|
+
const lengthPriced = !!ltx || chunkKWYS4IIM_cjs.DURATION_PRICED_PROVIDERS.has(opts.provider) || chunkKWYS4IIM_cjs.isGeminiOmniProvider(opts.provider);
|
|
269
380
|
if (!lengthPriced || !ltx && asked && requested <= 0) return { resolution, adjustments };
|
|
270
|
-
const duration = ltx ? ltx.duration :
|
|
381
|
+
const duration = ltx ? ltx.duration : chunkKWYS4IIM_cjs.pricedOutputDurationSec(opts.provider, opts.duration);
|
|
271
382
|
if (asked && requested !== duration) {
|
|
272
383
|
adjustments.push({
|
|
273
384
|
field: "duration",
|
|
@@ -288,7 +399,7 @@ var MOTION_MODELS_SENT_AS_NAMED = /* @__PURE__ */ new Set(["motion-transfer", "k
|
|
|
288
399
|
function motionTransferResolution(provider, resolution) {
|
|
289
400
|
const model = motionModelOf(provider);
|
|
290
401
|
if (MOTION_MODELS_SENT_AS_NAMED.has(model)) return { resolution, adjustments: [] };
|
|
291
|
-
const normalized =
|
|
402
|
+
const normalized = chunkFI3HJZWM_cjs.normalizeModelInput(model, { resolution });
|
|
292
403
|
if (normalized.resolution === void 0) return { resolution, adjustments: [] };
|
|
293
404
|
return { resolution: normalized.resolution, adjustments: normalized.adjustments };
|
|
294
405
|
}
|
|
@@ -301,7 +412,7 @@ function motionCreditIdentifier(provider, resolution, videoDuration) {
|
|
|
301
412
|
}
|
|
302
413
|
const raw = videoDuration ?? 10;
|
|
303
414
|
const durationSec = Math.floor(Number.isNaN(raw) ? 10 : raw);
|
|
304
|
-
const tier =
|
|
415
|
+
const tier = chunkKWYS4IIM_cjs.MOTION_DURATION_TIERS.find((t) => durationSec <= t.maxSeconds) ?? chunkKWYS4IIM_cjs.MOTION_DURATION_TIERS[chunkKWYS4IIM_cjs.MOTION_DURATION_TIERS.length - 1];
|
|
305
416
|
const base = provider === "kling-3.0" ? "kling-3.0-motion" : "motion-transfer";
|
|
306
417
|
const resSuffix = resolution === "1080p" ? ":1080p" : "";
|
|
307
418
|
return `${base}${resSuffix}:${tier.suffix}`;
|
|
@@ -349,9 +460,18 @@ var SUNO_VERSION_CREDIT_KEYS = {
|
|
|
349
460
|
V6_WILD: "suno-v6_wild",
|
|
350
461
|
V6_MINI: "suno-v6_mini",
|
|
351
462
|
V5_5: "suno-v5_5",
|
|
352
|
-
V5: "suno-v5"
|
|
463
|
+
V5: "suno-v5",
|
|
464
|
+
// Their own rows since 2026-11-12, at the price their runs were charged
|
|
465
|
+
// under the operation's row before.
|
|
466
|
+
V4_5PLUS: "suno-v4_5plus",
|
|
467
|
+
V4_5ALL: "suno-v4_5all",
|
|
468
|
+
V4_5: "suno-v4_5"
|
|
353
469
|
};
|
|
354
470
|
|
|
471
|
+
exports.SEEDANCE_EXTEND_CONTEXT_MAX_SEC = SEEDANCE_EXTEND_CONTEXT_MAX_SEC;
|
|
472
|
+
exports.SEEDANCE_EXTEND_RATE_CREDIT_IDS = SEEDANCE_EXTEND_RATE_CREDIT_IDS;
|
|
473
|
+
exports.SEEDANCE_EXTEND_RATE_SECONDS = SEEDANCE_EXTEND_RATE_SECONDS;
|
|
474
|
+
exports.SEEDANCE_EXTEND_SENT_PRICED_PROVIDER = SEEDANCE_EXTEND_SENT_PRICED_PROVIDER;
|
|
355
475
|
exports.SPEAKER_VIEW_CREDIT_IDS = SPEAKER_VIEW_CREDIT_IDS;
|
|
356
476
|
exports.SPEAKER_VIEW_PRICE_TIERS = SPEAKER_VIEW_PRICE_TIERS;
|
|
357
477
|
exports.SUNO_SELECT_OPERATIONS = SUNO_SELECT_OPERATIONS;
|
|
@@ -361,15 +481,32 @@ exports.applyEdlCreditId = applyEdlCreditId;
|
|
|
361
481
|
exports.buildCreditModelIdentifier = buildCreditModelIdentifier;
|
|
362
482
|
exports.buildMotionCreditModelIdentifier = buildMotionCreditModelIdentifier;
|
|
363
483
|
exports.buildVideoCreditModelIdentifier = buildVideoCreditModelIdentifier;
|
|
484
|
+
exports.catalogExtendCreditId = catalogExtendCreditId;
|
|
485
|
+
exports.catalogExtendResolution = catalogExtendResolution;
|
|
486
|
+
exports.grokExtendCreditId = grokExtendCreditId;
|
|
487
|
+
exports.grokExtendSeconds = grokExtendSeconds;
|
|
488
|
+
exports.grokExtendWiredSourceResolution = grokExtendWiredSourceResolution;
|
|
364
489
|
exports.imageFormatInputOf = imageFormatInputOf;
|
|
365
490
|
exports.imageGenAutoAspectNeedsSourceImage = imageGenAutoAspectNeedsSourceImage;
|
|
491
|
+
exports.isSeedanceExtendPricedBySecondsSent = isSeedanceExtendPricedBySecondsSent;
|
|
492
|
+
exports.isSeedanceExtendRateCreditId = isSeedanceExtendRateCreditId;
|
|
366
493
|
exports.motionTransferResolution = motionTransferResolution;
|
|
367
494
|
exports.normalizedImageGenModelId = normalizedImageGenModelId;
|
|
495
|
+
exports.pixverseExtendCreditId = pixverseExtendCreditId;
|
|
496
|
+
exports.pixverseExtendQuality = pixverseExtendQuality;
|
|
368
497
|
exports.pricedVideoSelection = pricedVideoSelection;
|
|
369
498
|
exports.resolveImageGenCreditIdentifier = resolveImageGenCreditIdentifier;
|
|
370
499
|
exports.resolveNormalizedImageGen = resolveNormalizedImageGen;
|
|
500
|
+
exports.seedanceExtendAddedSec = seedanceExtendAddedSec;
|
|
371
501
|
exports.seedanceExtendCreditId = seedanceExtendCreditId;
|
|
502
|
+
exports.seedanceExtendFullWindowCreditId = seedanceExtendFullWindowCreditId;
|
|
503
|
+
exports.seedanceExtendRateCreditId = seedanceExtendRateCreditId;
|
|
504
|
+
exports.seedanceExtendRefusesSource = seedanceExtendRefusesSource;
|
|
372
505
|
exports.seedanceExtendResolution = seedanceExtendResolution;
|
|
506
|
+
exports.seedanceExtendSentSec = seedanceExtendSentSec;
|
|
507
|
+
exports.seedanceExtendSourceCreditId = seedanceExtendSourceCreditId;
|
|
508
|
+
exports.seedanceExtendSourceSec = seedanceExtendSourceSec;
|
|
509
|
+
exports.seedanceExtendUnits = seedanceExtendUnits;
|
|
373
510
|
exports.seedanceVideoEditCreditId = seedanceVideoEditCreditId;
|
|
374
511
|
exports.speakerViewCreditId = speakerViewCreditId;
|
|
375
512
|
exports.speedRampCreditId = speedRampCreditId;
|
|
@@ -377,5 +514,5 @@ exports.sunoCreditType = sunoCreditType;
|
|
|
377
514
|
exports.tailExtendCreditId = tailExtendCreditId;
|
|
378
515
|
exports.tailExtendResolution = tailExtendResolution;
|
|
379
516
|
exports.videoGenerationCreditId = videoGenerationCreditId;
|
|
380
|
-
//# sourceMappingURL=chunk-
|
|
381
|
-
//# sourceMappingURL=chunk-
|
|
517
|
+
//# sourceMappingURL=chunk-R5ILCNCC.cjs.map
|
|
518
|
+
//# sourceMappingURL=chunk-R5ILCNCC.cjs.map
|