conformtools 0.5.1 → 0.6.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.
- package/README.md +69 -6
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/chunk-6TM32YIJ.js +7 -0
- package/dist/chunk-BTXLTVNK.js +3 -0
- package/dist/{chunk-AHNDJFQR.js → chunk-BUEIRRNY.js} +1 -1
- package/dist/chunk-BXFVYGFW.js +3 -0
- package/dist/chunk-CX3USH6A.js +318 -0
- package/dist/chunk-D5DEQ467.js +3 -0
- package/dist/{chunk-YPRTUS5W.js → chunk-FNGHTZ5F.js} +1 -1
- package/dist/chunk-GXEVALBL.js +3 -0
- package/dist/chunk-JH3OLTR6.js +3 -0
- package/dist/chunk-KP4C2MFM.js +3 -0
- package/dist/chunk-PIEH7J6J.js +3 -0
- package/dist/chunk-RUBNBRUK.js +3 -0
- package/dist/chunk-RULUDOB7.js +3 -0
- package/dist/chunk-Y2BEEOPB.js +3 -0
- package/dist/claude-setup-XSNTKEU7.js +5 -0
- package/dist/cli.js +11 -5
- package/dist/conformtools-decode +0 -0
- package/dist/cr3-wasm-YTMVBAFM.js +3 -0
- package/dist/dng-wasm-WUUQB7M2.js +3 -0
- package/dist/dpx-wasm-XBKO4V4W.js +3 -0
- package/dist/exr-wasm-VE2W6MFW.js +3 -0
- package/dist/{h264-JHQCJTWP.js → h264-HD7BY5J5.js} +1 -1
- package/dist/{h264-mxf-4M63NBQK.js → h264-mxf-6OOODSAK.js} +1 -1
- package/dist/http.js +2 -2
- package/dist/{inspect-6OM4FTVW.js → inspect-TDZCNXVW.js} +2 -2
- package/dist/isobmff-57HSD6O2.js +3 -0
- package/dist/mcp.js +10 -9
- package/dist/media_core-R5PPN3AY.js +9 -0
- package/dist/{media_core_bg-XIM7Y4R3.js → media_core_bg-YBW45HJ2.js} +1 -1
- package/dist/mxf-FAXEK4WR.js +3 -0
- package/dist/{ops-7HVBBXUQ.js → ops-UPPAG2TI.js} +1 -1
- package/dist/premiere-uxp/icons/panel.png +0 -0
- package/dist/premiere-uxp/icons/panel@2x.png +0 -0
- package/dist/premiere-uxp/icons/plugin.png +0 -0
- package/dist/premiere-uxp/icons/plugin@2x.png +0 -0
- package/dist/premiere-uxp/index.html +38 -0
- package/dist/premiere-uxp/index.js +93 -0
- package/dist/premiere-uxp/lib/clipmeta.js +170 -0
- package/dist/premiere-uxp/lib/ctx.js +62 -0
- package/dist/premiere-uxp/lib/handles.js +57 -0
- package/dist/premiere-uxp/lib/markers.js +198 -0
- package/dist/premiere-uxp/lib/pairing.js +58 -0
- package/dist/premiere-uxp/lib/premiere.js +82 -0
- package/dist/premiere-uxp/lib/probe.js +139 -0
- package/dist/premiere-uxp/lib/protocol.js +165 -0
- package/dist/premiere-uxp/lib/render.js +38 -0
- package/dist/premiere-uxp/lib/session.js +85 -0
- package/dist/premiere-uxp/lib/sizing.js +312 -0
- package/dist/premiere-uxp/lib/time.js +82 -0
- package/dist/premiere-uxp/lib/timeline.js +336 -0
- package/dist/premiere-uxp/lib/verbs.js +20 -0
- package/dist/premiere-uxp/lib/write.js +97 -0
- package/dist/premiere-uxp/manifest.json +102 -0
- package/dist/{r3d-AT6NNIY3.js → r3d-EY6FEFKM.js} +1 -1
- package/dist/r3d-KJVC7T2C.js +3 -0
- package/dist/resolve-bridge.py +974 -0
- package/dist/resolve-presets/conform.tools.xml +127 -0
- package/dist/sscd-embed-DHFTEIOC.js +3 -0
- package/dist/sscd-sweep-OYS4XAID.js +3 -0
- package/dist/statusline-GMMCFMOA.js +4 -0
- package/dist/statusline.js +3 -0
- package/dist/{still-E4HLCCST.js → still-WY7MUR7A.js} +1 -1
- package/dist/tiff-wasm-T2V2ICZT.js +3 -0
- package/dist/wasm/media_core_bg.wasm +0 -0
- package/dist/wasm/udf_bg.wasm +0 -0
- package/dist/wasm-threads/media_core_bg.wasm +0 -0
- package/dist/{wav-DXF73Y56.js → wav-LFS6OZHJ.js} +1 -1
- package/package.json +1 -1
- package/dist/chunk-35U7WGES.js +0 -3
- package/dist/chunk-3XTUTEKJ.js +0 -102
- package/dist/chunk-HJXRLQOI.js +0 -3
- package/dist/chunk-IDDQR56R.js +0 -7
- package/dist/chunk-UUMHVA7R.js +0 -3
- package/dist/chunk-WWGQFOB2.js +0 -64
- package/dist/cr3-wasm-X6Q4YMUU.js +0 -3
- package/dist/dng-wasm-EAB24KDN.js +0 -3
- package/dist/dpx-wasm-OX2D24ZB.js +0 -3
- package/dist/exr-wasm-Z6BBPJSN.js +0 -3
- package/dist/isobmff-XL33CVJR.js +0 -3
- package/dist/media_core-VSTO6CS4.js +0 -9
- package/dist/mxf-VIANACTI.js +0 -3
- package/dist/r3d-2QCFX7UX.js +0 -3
- package/dist/sscd-sweep-IXM4OD7O.js +0 -3
- package/dist/tiff-wasm-XYTQNL2F.js +0 -3
- package/dist/zod-IPSV75LP.js +0 -3
- /package/dist/{arriraw-Y5VXHXNX.js → arriraw-BEZILZY3.js} +0 -0
- /package/dist/{chunk-NYB4ISL3.js → chunk-NP53ITN6.js} +0 -0
- /package/dist/{media_core_bg-BKXQLNFA.js → media_core_bg-5UIQAP7I.js} +0 -0
- /package/dist/{prores-TQEZ3KFH.js → prores-BNALPJPS.js} +0 -0
- /package/dist/{timeline_core_bg-QEOVAIWP.js → timeline_core_bg-XYT26ZTU.js} +0 -0
- /package/dist/{udf_bg-UTQ6BVXX.js → udf_bg-R3JEZJAT.js} +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--DbAppVer="20.3.3.0010" DbPrjVer="15"-->
|
|
3
|
+
<SyRecordInfo DbId="a977254f-7ada-4fc7-8a13-e57ad89dd3c2">
|
|
4
|
+
<FieldsBlob>00000001000000090000002a00550073006500540069006d0065006c0069006e0065005200650073006f006c007500740069006f006e0000000100010000002800550073006500540069006d0065006c0069006e0065004600720061006d0065005200610074006500000001000100000026005300750062007400690074006c0065005200650063006f007200640043006f00640065006300000002006d73633100000028005300750062007400690074006c0065004500780070006f007200740046006f0072006d006100740000000200000000030000002200520065006e0064006500720041007500640069006f0054007200610063006b00730000000c000000006f00000001000000010000000200300000000c000000005800000001000000020000001c0054007200610063006b0049006e0066006f00560061006c007500650000000200000000010000001a0054007200610063006b0049006e0066006f00540079007000650000000200000000010000002a005200650063006f007200640041007500640069006f00530061006d0070006c0065005200610074006500000002000000bb800000005e005200650063006f007200640041007500640069006f004e006f0072006d0061006c0069007a006100740069006f006e004f007500740070007500740054007200610063006b00730045006e00610062006c0065005300740061007400650000000c000000001700000001000000010000000200300000000200000000010000002800490073005200650063006f007200640041006c007000680061005000720065006d0075006c0074000000010001000000240043007500730074006f006d00500072006500730065007400490063006f006e00490064000000020000000001</FieldsBlob>
|
|
5
|
+
<Session/>
|
|
6
|
+
<Timeline/>
|
|
7
|
+
<UniqueSequenceId/>
|
|
8
|
+
<ReplaceHoleWithBlank>0</ReplaceHoleWithBlank>
|
|
9
|
+
<ApplyWfmDuringRecord>0</ApplyWfmDuringRecord>
|
|
10
|
+
<DisableCcDuringRecording>0</DisableCcDuringRecording>
|
|
11
|
+
<DisablePtzDuringRecording>0</DisablePtzDuringRecording>
|
|
12
|
+
<RecordStartFrame>0</RecordStartFrame>
|
|
13
|
+
<RecordEndFrame>0</RecordEndFrame>
|
|
14
|
+
<RecordTotalFrame>0</RecordTotalFrame>
|
|
15
|
+
<RecordOldFrame>0</RecordOldFrame>
|
|
16
|
+
<RecordNewFrame>86400</RecordNewFrame>
|
|
17
|
+
<RecordAllowDupImg>1</RecordAllowDupImg>
|
|
18
|
+
<RecordClipUniqueName>false</RecordClipUniqueName>
|
|
19
|
+
<RecordClipUniqueNameStyle>0</RecordClipUniqueNameStyle>
|
|
20
|
+
<RecordDigit>8</RecordDigit>
|
|
21
|
+
<RecordBitDepth>16</RecordBitDepth>
|
|
22
|
+
<RecordAsFloat>false</RecordAsFloat>
|
|
23
|
+
<FormatWidth>1920</FormatWidth>
|
|
24
|
+
<FormatHeight>1080</FormatHeight>
|
|
25
|
+
<FormatPixelAspectRatio>1</FormatPixelAspectRatio>
|
|
26
|
+
<FormatOption>-1</FormatOption>
|
|
27
|
+
<RecordTargetDir></RecordTargetDir>
|
|
28
|
+
<RecordUseTgtTimeCode>1</RecordUseTgtTimeCode>
|
|
29
|
+
<RenderAtSourceResolution>false</RenderAtSourceResolution>
|
|
30
|
+
<RecordSetTimelineTimecode>false</RecordSetTimelineTimecode>
|
|
31
|
+
<UseRecordClipStartFrame>true</UseRecordClipStartFrame>
|
|
32
|
+
<RecordClipStartFrame>1001</RecordClipStartFrame>
|
|
33
|
+
<RecordPrefix>conform_qc</RecordPrefix>
|
|
34
|
+
<RecordSuffix/>
|
|
35
|
+
<RecordFormatType>7145B29C33684D8AA1C7E5126F9B405D:C04F07127A5D4E18B93684A15D2F7166</RecordFormatType>
|
|
36
|
+
<RecordFormatSubType>7145B29C33684D8AA1C7E5126F9B405D:9E4FA32B8C714D55A63DE8124F9B6C07</RecordFormatSubType>
|
|
37
|
+
<RecordInFieldMode>false</RecordInFieldMode>
|
|
38
|
+
<RecordDataLevel>DATA_LEVEL_AUTO</RecordDataLevel>
|
|
39
|
+
<RecordQuality>4</RecordQuality>
|
|
40
|
+
<RecordFPS>23.976</RecordFPS>
|
|
41
|
+
<StereoRender>false</StereoRender>
|
|
42
|
+
<StereoRenderFrameMeshMode>-1</StereoRenderFrameMeshMode>
|
|
43
|
+
<StereoRenderBothEyesSeparately>false</StereoRenderBothEyesSeparately>
|
|
44
|
+
<StereoRenderSourceType>0</StereoRenderSourceType>
|
|
45
|
+
<UserName/>
|
|
46
|
+
<ProjectName/>
|
|
47
|
+
<FolderName/>
|
|
48
|
+
<SessionName/>
|
|
49
|
+
<CreationTime/>
|
|
50
|
+
<Status>READY</Status>
|
|
51
|
+
<RecordSpeed>0</RecordSpeed>
|
|
52
|
+
<UsePrefixAndSuffixFromSrc>0</UsePrefixAndSuffixFromSrc>
|
|
53
|
+
<UseCommercialWorkflow>0</UseCommercialWorkflow>
|
|
54
|
+
<AlternateOffset>0</AlternateOffset>
|
|
55
|
+
<ReelInFolder>0</ReelInFolder>
|
|
56
|
+
<ClipInFolder>0</ClipInFolder>
|
|
57
|
+
<AlternateInFolder>1</AlternateInFolder>
|
|
58
|
+
<SrcDirPreserveLevel>0</SrcDirPreserveLevel>
|
|
59
|
+
<SrcDirLevelsMode>0</SrcDirLevelsMode>
|
|
60
|
+
<NumFramesOfHandles>0</NumFramesOfHandles>
|
|
61
|
+
<UseVersionNameForFolder>0</UseVersionNameForFolder>
|
|
62
|
+
<DestSuffix/>
|
|
63
|
+
<RecordInfoName/>
|
|
64
|
+
<VersionIdList/>
|
|
65
|
+
<VersionNameList/>
|
|
66
|
+
<CompletionPercentage>0</CompletionPercentage>
|
|
67
|
+
<RecordSlatePreset>None</RecordSlatePreset>
|
|
68
|
+
<AdditionalOutputFormats/>
|
|
69
|
+
<RecordAudioEnabled>true</RecordAudioEnabled>
|
|
70
|
+
<RecordAudioNumChannels>2</RecordAudioNumChannels>
|
|
71
|
+
<RecordAudioBitDepth>24</RecordAudioBitDepth>
|
|
72
|
+
<CustomClips>0000000000000000</CustomClips>
|
|
73
|
+
<DisplayOrder>-1</DisplayOrder>
|
|
74
|
+
<ForceHighestQualitySizing>1</ForceHighestQualitySizing>
|
|
75
|
+
<ForceHighestQualityDebayerRes>1</ForceHighestQualityDebayerRes>
|
|
76
|
+
<RecordMode>RECORD_MODE_NONE</RecordMode>
|
|
77
|
+
<ExtraInfoMap>
|
|
78
|
+
<Element>
|
|
79
|
+
<DbKey>smpte</DbKey>
|
|
80
|
+
<DbVal>y</DbVal>
|
|
81
|
+
</Element>
|
|
82
|
+
<Element>
|
|
83
|
+
<DbKey>aud_codec</DbKey>
|
|
84
|
+
<DbVal>lpcm</DbVal>
|
|
85
|
+
</Element>
|
|
86
|
+
<Element>
|
|
87
|
+
<DbKey>subs_enable</DbKey>
|
|
88
|
+
<DbVal>0</DbVal>
|
|
89
|
+
</Element>
|
|
90
|
+
<Element>
|
|
91
|
+
<DbKey>aud_discrete</DbKey>
|
|
92
|
+
<DbVal>0</DbVal>
|
|
93
|
+
</Element>
|
|
94
|
+
<Element>
|
|
95
|
+
<DbKey>tag_sm_gamma</DbKey>
|
|
96
|
+
<DbVal>13</DbVal>
|
|
97
|
+
</Element>
|
|
98
|
+
<Element>
|
|
99
|
+
<DbKey>aud_src_config</DbKey>
|
|
100
|
+
<DbVal>AUX0</DbVal>
|
|
101
|
+
</Element>
|
|
102
|
+
<Element>
|
|
103
|
+
<DbKey>imf_profile_level</DbKey>
|
|
104
|
+
<DbVal>0</DbVal>
|
|
105
|
+
</Element>
|
|
106
|
+
<Element>
|
|
107
|
+
<DbKey>tag_sm_colorspace</DbKey>
|
|
108
|
+
<DbVal>23</DbVal>
|
|
109
|
+
</Element>
|
|
110
|
+
<Element>
|
|
111
|
+
<DbKey>plugin_vcodec_config</DbKey>
|
|
112
|
+
<DbVal>CgAAAHFjX2VuYWJsZWQCAAAAAQAAAAE=</DbVal>
|
|
113
|
+
</Element>
|
|
114
|
+
<Element>
|
|
115
|
+
<DbKey>include_spatial_metadata</DbKey>
|
|
116
|
+
<DbVal>0</DbVal>
|
|
117
|
+
</Element>
|
|
118
|
+
</ExtraInfoMap>
|
|
119
|
+
<UseRenderCachedImagesForRecording>false</UseRenderCachedImagesForRecording>
|
|
120
|
+
<TgtSysId>None</TgtSysId>
|
|
121
|
+
<CurSysId/>
|
|
122
|
+
<TimeTakenToRenderInMs>0</TimeTakenToRenderInMs>
|
|
123
|
+
<EstimatedTimeRemainingInMs>0</EstimatedTimeRemainingInMs>
|
|
124
|
+
<ErrorCode>0</ErrorCode>
|
|
125
|
+
<ErrorStr/>
|
|
126
|
+
<ErrorNotified>true</ErrorNotified>
|
|
127
|
+
</SyRecordInfo>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a as o}from"./chunk-DRHOPOC7.js";import{a as c,b as a,c as l,d as w,e as _}from"./chunk-Y2BEEOPB.js";import"./chunk-PSANHDZM.js";var f=import.meta.env?.VITE_SSCD_MODEL_URL||"/sscd/sscd_disc_mixup.288.fp16.onnx";async function C(){try{let t=await fetch(f,{method:"HEAD"});if(!t.ok||(t.headers.get("content-type")??"").startsWith("text/html"))return!1;let r=t.headers.get("content-length");return r===null||Number(r)>1e6}catch{return!1}}var m=null;function p(){return m||(m=(async()=>{let t=await import("./onnxruntime-web-stub-PKJ2NZBF.js"),r=(typeof globalThis.crossOriginIsolated=="boolean"?globalThis.crossOriginIsolated:!1)?Math.max(1,Math.min(navigator.hardwareConcurrency||4,10)):1;return t.env.wasm.wasmPaths=r>1?{wasm:o,mjs:o}:{wasm:o},t.env.wasm.numThreads=r,t.InferenceSession.create(f,{executionProviders:["wasm"]})})()),m}function T(){p().catch(()=>{})}async function v(t,e=288){if(t.length===0)return[];let r=await import("./onnxruntime-web-stub-PKJ2NZBF.js"),y=await p(),d=[];for(let n=0;n<t.length;n+=8){let i=t.slice(n,n+8),S=l(i,e),u=(await y.run({rgb:new r.Tensor("float32",S,[i.length,3,e,e])})).embedding,h=u.dims[1],g=u.data;for(let s=0;s<i.length;s++)d.push(g.slice(s*h,(s+1)*h))}return d}export{a as SSCD_BATCH,f as SSCD_MODEL_URL,c as SSCD_SIZE,w as cosine,v as embedFrames,p as initSscd,_ as norm,C as sscdAvailable,l as toTensorData,T as warmSscd};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a,b,c,d,e}from"./chunk-GXEVALBL.js";import"./chunk-Y2BEEOPB.js";import"./chunk-PSANHDZM.js";export{a as MAX_EMBED_STRIDE,e as embedAtFrames,c as lumaToRgba,b as squareRgba,d as sweepClipEmbeddings};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import"./chunk-PSANHDZM.js";import{readFileSync as d}from"node:fs";import{join as i}from"node:path";import{homedir as h}from"node:os";var s=[255,60,0],p=[245,245,245],a=[140,140,140],$=[80,200,120],r=(t,n)=>`\x1B[38;2;${t[0]};${t[1]};${t[2]}m${n}\x1B[0m`,_=3e4,y=9e4,c="\u25D0\u25D3\u25D1\u25D2";function m(t){let n=Math.max(0,Math.round(t/1e3));return n>=3600?`${Math.floor(n/3600)}:${String(Math.floor(n/60)%60).padStart(2,"0")}:${String(n%60).padStart(2,"0")}`:`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function M(t,n,e=8){let o=n>0?Math.min(e,Math.round(e*t/n)):0;return r(s,"\u25B0".repeat(o))+r(a,"\u25B1".repeat(e-o))}function S(t,n){if(!t)return"";let e=t.verb.replace(/^timeline_|^media_/,"");if(t.status==="running"){if(n-Date.parse(t.updated_at)>_)return"";let f=r(s,c[Math.floor(n/250)%c.length]),g=t.total>0?`${t.done}/${t.total}`:"",b=t.phase&&t.phase!=="starting"?t.phase.replace(/\s*\d+\/\d+.*$/,"").slice(0,32):"";return[`${f} ${r(p,e)}`,t.total>0?M(t.done,t.total):"",r(a,[g,b,m(n-Date.parse(t.started_at))].filter(Boolean).join(" \xB7 "))].filter(Boolean).join(" ")}let o=Date.parse(t.finished_at??t.updated_at);if(n-o>y)return"";let u=m(o-Date.parse(t.started_at));return t.status==="done"?r($,`\u2713 ${e} done`)+r(a,` \xB7 ${u}`):r(s,`\u2717 ${e} ${t.status}`)+r(a,` \xB7 ${u}`)}function R(t){let n=t.now??Date.now();return[r(s,"\u25C9")+" "+r(p,"conform.tools"),t.facility?r(a,t.facility):"",S(t.job,n),t.model?r(a,t.model):""].filter(Boolean).join(r(a," \xB7 "))}function l(t){try{return JSON.parse(d(t,"utf8"))}catch{return null}}function B(){let t=process.env.CONFORM_MCP_HOME??i(h(),".conform-mcp"),n=null;try{let o=d(0,"utf8");n=o.trim()?JSON.parse(o):null}catch{}let e=l(i(t,"profile.json"))??l(i(t,"naming.json"));process.stdout.write(R({job:l(i(t,"jobs",".current")),facility:e?.facility||void 0,model:n?.model?.display_name})+`
|
|
4
|
+
`)}(import.meta.main??/statusline\.(js|ts)$/.test(process.argv[1]??""))&&B();export{M as bar,m as clock,S as jobPart,B as main,R as statusLine};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{readFileSync as d}from"node:fs";import{join as i}from"node:path";import{homedir as h}from"node:os";var s=[255,60,0],p=[245,245,245],a=[140,140,140],$=[80,200,120],r=(t,n)=>`\x1B[38;2;${t[0]};${t[1]};${t[2]}m${n}\x1B[0m`,_=3e4,y=9e4,c="\u25D0\u25D3\u25D1\u25D2";function m(t){let n=Math.max(0,Math.round(t/1e3));return n>=3600?`${Math.floor(n/3600)}:${String(Math.floor(n/60)%60).padStart(2,"0")}:${String(n%60).padStart(2,"0")}`:`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`}function M(t,n,e=8){let o=n>0?Math.min(e,Math.round(e*t/n)):0;return r(s,"\u25B0".repeat(o))+r(a,"\u25B1".repeat(e-o))}function S(t,n){if(!t)return"";let e=t.verb.replace(/^timeline_|^media_/,"");if(t.status==="running"){if(n-Date.parse(t.updated_at)>_)return"";let f=r(s,c[Math.floor(n/250)%c.length]),g=t.total>0?`${t.done}/${t.total}`:"",b=t.phase&&t.phase!=="starting"?t.phase.replace(/\s*\d+\/\d+.*$/,"").slice(0,32):"";return[`${f} ${r(p,e)}`,t.total>0?M(t.done,t.total):"",r(a,[g,b,m(n-Date.parse(t.started_at))].filter(Boolean).join(" \xB7 "))].filter(Boolean).join(" ")}let o=Date.parse(t.finished_at??t.updated_at);if(n-o>y)return"";let u=m(o-Date.parse(t.started_at));return t.status==="done"?r($,`\u2713 ${e} done`)+r(a,` \xB7 ${u}`):r(s,`\u2717 ${e} ${t.status}`)+r(a,` \xB7 ${u}`)}function R(t){let n=t.now??Date.now();return[r(s,"\u25C9")+" "+r(p,"conform.tools"),t.facility?r(a,t.facility):"",S(t.job,n),t.model?r(a,t.model):""].filter(Boolean).join(r(a," \xB7 "))}function l(t){try{return JSON.parse(d(t,"utf8"))}catch{return null}}function B(){let t=process.env.CONFORM_MCP_HOME??i(h(),".conform-mcp"),n=null;try{let o=d(0,"utf8");n=o.trim()?JSON.parse(o):null}catch{}let e=l(i(t,"profile.json"))??l(i(t,"naming.json"));process.stdout.write(R({job:l(i(t,"jobs",".current")),facility:e?.facility||void 0,model:n?.model?.display_name})+`
|
|
3
|
+
`)}(import.meta.main??/statusline\.(js|ts)$/.test(process.argv[1]??""))&&B();export{M as bar,m as clock,S as jobPart,B as main,R as statusLine};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as _}from"./chunk-RXHNBSER.js";import{a as M}from"./chunk-UCMNH6Q6.js";import"./chunk-PSANHDZM.js";function v(n){return{size:n.fileSize,read:(t,e)=>n.read(t,e)}}var U=class{constructor(t){this.r=t;this.buf=new Uint8Array(0);this.base=0}async at(t,e){if(t<0||e<=0)return new Uint8Array(0);let r=t-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(t,Math.max(e,65536)),this.base=t,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(n,t)=>n[t]<<8|n[t+1],w=(n,t)=>n[t]|n[t+1]<<8,W=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16,d=(n,t)=>(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0,b=(n,t)=>(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0,P=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,p=(n,t,e)=>String.fromCharCode(...n.subarray(t,t+e));function h(n,t){if(!Number.isFinite(n)||!Number.isFinite(t))return null;let e=Math.round(n),r=Math.round(t);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var k=n=>({width:n.height,height:n.width});async function C(n){let t=await n.at(0,24);return t.length<24||t[0]!==137||p(t,1,3)!=="PNG"||p(t,12,4)!=="IHDR"?null:h(d(t,16),d(t,20))}var D=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function I(n){if(n.length<8)return null;let t=n[0]===73&&n[1]===73,e=n[0]===77&&n[1]===77;if(!t&&!e)return null;let r=a=>t?w(n,a):A(n,a),i=a=>t?b(n,a):d(n,a);if(r(2)!==42)return null;let l=i(4);if(l+2>n.length)return null;let c=r(l);for(let a=0;a<c;a++){let u=l+2+a*12;if(u+12>n.length)break;if(r(u)===274)return r(u+8)}return null}async function F(n,t){let e=await n.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,i=null,l=2;for(;l+4<=t;){let c=await n.at(l,4);if(c.length<4)break;if(c[0]!==255){l++;continue}let a=c[1];if(a===255){l++;continue}if(a===1||a>=208&&a<=217){l+=2;continue}if(a===218)break;let u=A(c,2);if(u<2)break;if(D.has(a)){let o=await n.at(l+4,5);o.length>=5&&(i=h(A(o,3),A(o,1)));break}if(a===225){let o=await n.at(l+4,Math.min(u-2,65536));o.length>6&&p(o,0,4)==="Exif"&&(r=I(o.subarray(6))??1)}l+=2+u}return i?r>=5&&r<=8?k(i):i:null}async function j(n){let t=await n.at(0,10);return t.length<10||p(t,0,3)!=="GIF"?null:h(w(t,6),w(t,8))}async function L(n){let t=await n.at(0,26);return t.length<22||p(t,0,2)!=="BM"?null:b(t,14)===12?h(w(t,18),w(t,20)):t.length<26?null:h(P(t,18),Math.abs(P(t,22)))}async function H(n){let t=await n.at(0,30);if(t.length<16||p(t,0,4)!=="RIFF"||p(t,8,4)!=="WEBP")return null;let e=p(t,12,4);if(e==="VP8X")return t.length<30?null:h(W(t,24)+1,W(t,27)+1);if(e==="VP8 ")return t.length<30||t[23]!==157||t[24]!==1||t[25]!==42?null:h(w(t,26)&16383,w(t,28)&16383);if(e==="VP8L"){if(t.length<25||t[20]!==47)return null;let r=b(t,21);return h((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(n,t){let e=[],r=0;async function i(a,u,o){let f=a;for(;f+8<=u&&o<8;){let g=await n.at(f,16);if(g.length<8)return;let s=d(g,0),m=p(g,4,4),y=8;if(s===1){if(g.length<16)return;s=d(g,8)*2**32+d(g,12),y=16}else s===0&&(s=u-f);if(s<y||f+s>u)return;if(m==="meta")await i(f+y+4,f+s,o+1);else if(m==="iprp"||m==="ipco")await i(f+y,f+s,o+1);else if(m==="ispe"){let x=await n.at(f+y+4,8);if(x.length===8){let R=h(d(x,0),d(x,4));R&&e.push(R)}}else if(m==="irot"){let x=await n.at(f+y,1);x.length===1&&(r=x[0]&3)}f+=s}}let l=await n.at(0,12);if(l.length<12||p(l,4,4)!=="ftyp"||(await i(0,t,0),e.length===0))return null;let c=e.reduce((a,u)=>a.width*a.height>=u.width*u.height?a:u);return r===1||r===3?k(c):c}async function G(n){let t=await n.at(0,22);return t.length<22||p(t,0,4)!=="8BPS"?null:h(d(t,18),d(t,14))}var N=new Set([0,1,2,3,9,10,11]);async function T(n){let t=await n.at(0,18);if(t.length<18||t[1]>1||!N.has(t[2]))return null;let e=t[16];return[8,15,16,24,32].includes(e)?h(w(t,12),w(t,14)):null}async function B(n){let t=await n.at(0,8);if(t.length<8)return null;let e=t[0]===73&&t[1]===73,r=t[0]===77&&t[1]===77;if(!e&&!r)return null;let i=(s,m)=>e?w(s,m):A(s,m),l=(s,m)=>e?b(s,m):d(s,m);if(i(t,2)!==42)return null;let c=l(t,4),a=await n.at(c,2);if(a.length<2)return null;let u=i(a,0);if(u<1||u>4096)return null;let o=await n.at(c+2,u*12),f=0,g=0;for(let s=0;s<u;s++){let m=s*12;if(m+12>o.length)break;let y=i(o,m),R=i(o,m+2)===3?i(o,m+8):l(o,m+8);y===256?f=R:y===257&&(g=R)}return h(f,g)}async function V(n,t){let e=await n.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,i=Math.min(t,1<<20);for(;r<i;){let l=await n.at(r,512);if(l.length===0)return null;let c=l.indexOf(0);if(c<=0)return null;let a=p(l,0,c),u=l.subarray(c+1).indexOf(0);if(u<0)return null;let o=c+1+u+1;if(o+4>l.length)return null;let f=b(l,o),g=r+o+4;if(a==="dataWindow"){if(f<16)return null;let s=await n.at(g,16);return s.length<16?null:h(P(s,8)-P(s,0)+1,P(s,12)-P(s,4)+1)}r=g+f}return null}async function X(n){let t=await n.at(0,4);if(t.length<4)return null;let e=p(t,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let i=await n.at(772,8);return i.length<8?null:h(r?d(i,0):b(i,0),r?d(i,4):b(i,4))}var Y={png:C,jpg:F,jpeg:F,gif:j,bmp:L,webp:H,avif:S,heic:S,heif:S,psd:G,tga:T,tif:B,tiff:B,exr:V,dpx:X};async function z(n,t){let e=Y[(n??"").toLowerCase()];if(!e)return null;try{return await e(new U(t),t.size)}catch{return null}}var q=n=>{let t=n.split(/[/\\]/).pop()??"",e=t.lastIndexOf(".");return e>0?t.slice(e+1).toLowerCase():""};async function J(n,t){try{if(n==="dpx"){let e=await(await import("./dpx-wasm-
|
|
3
|
+
import{a as _}from"./chunk-RXHNBSER.js";import{a as M}from"./chunk-UCMNH6Q6.js";import"./chunk-PSANHDZM.js";function v(n){return{size:n.fileSize,read:(t,e)=>n.read(t,e)}}var U=class{constructor(t){this.r=t;this.buf=new Uint8Array(0);this.base=0}async at(t,e){if(t<0||e<=0)return new Uint8Array(0);let r=t-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(t,Math.max(e,65536)),this.base=t,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(n,t)=>n[t]<<8|n[t+1],w=(n,t)=>n[t]|n[t+1]<<8,W=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16,d=(n,t)=>(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0,b=(n,t)=>(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0,P=(n,t)=>n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,p=(n,t,e)=>String.fromCharCode(...n.subarray(t,t+e));function h(n,t){if(!Number.isFinite(n)||!Number.isFinite(t))return null;let e=Math.round(n),r=Math.round(t);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var k=n=>({width:n.height,height:n.width});async function C(n){let t=await n.at(0,24);return t.length<24||t[0]!==137||p(t,1,3)!=="PNG"||p(t,12,4)!=="IHDR"?null:h(d(t,16),d(t,20))}var D=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function I(n){if(n.length<8)return null;let t=n[0]===73&&n[1]===73,e=n[0]===77&&n[1]===77;if(!t&&!e)return null;let r=a=>t?w(n,a):A(n,a),i=a=>t?b(n,a):d(n,a);if(r(2)!==42)return null;let l=i(4);if(l+2>n.length)return null;let c=r(l);for(let a=0;a<c;a++){let u=l+2+a*12;if(u+12>n.length)break;if(r(u)===274)return r(u+8)}return null}async function F(n,t){let e=await n.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,i=null,l=2;for(;l+4<=t;){let c=await n.at(l,4);if(c.length<4)break;if(c[0]!==255){l++;continue}let a=c[1];if(a===255){l++;continue}if(a===1||a>=208&&a<=217){l+=2;continue}if(a===218)break;let u=A(c,2);if(u<2)break;if(D.has(a)){let o=await n.at(l+4,5);o.length>=5&&(i=h(A(o,3),A(o,1)));break}if(a===225){let o=await n.at(l+4,Math.min(u-2,65536));o.length>6&&p(o,0,4)==="Exif"&&(r=I(o.subarray(6))??1)}l+=2+u}return i?r>=5&&r<=8?k(i):i:null}async function j(n){let t=await n.at(0,10);return t.length<10||p(t,0,3)!=="GIF"?null:h(w(t,6),w(t,8))}async function L(n){let t=await n.at(0,26);return t.length<22||p(t,0,2)!=="BM"?null:b(t,14)===12?h(w(t,18),w(t,20)):t.length<26?null:h(P(t,18),Math.abs(P(t,22)))}async function H(n){let t=await n.at(0,30);if(t.length<16||p(t,0,4)!=="RIFF"||p(t,8,4)!=="WEBP")return null;let e=p(t,12,4);if(e==="VP8X")return t.length<30?null:h(W(t,24)+1,W(t,27)+1);if(e==="VP8 ")return t.length<30||t[23]!==157||t[24]!==1||t[25]!==42?null:h(w(t,26)&16383,w(t,28)&16383);if(e==="VP8L"){if(t.length<25||t[20]!==47)return null;let r=b(t,21);return h((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(n,t){let e=[],r=0;async function i(a,u,o){let f=a;for(;f+8<=u&&o<8;){let g=await n.at(f,16);if(g.length<8)return;let s=d(g,0),m=p(g,4,4),y=8;if(s===1){if(g.length<16)return;s=d(g,8)*2**32+d(g,12),y=16}else s===0&&(s=u-f);if(s<y||f+s>u)return;if(m==="meta")await i(f+y+4,f+s,o+1);else if(m==="iprp"||m==="ipco")await i(f+y,f+s,o+1);else if(m==="ispe"){let x=await n.at(f+y+4,8);if(x.length===8){let R=h(d(x,0),d(x,4));R&&e.push(R)}}else if(m==="irot"){let x=await n.at(f+y,1);x.length===1&&(r=x[0]&3)}f+=s}}let l=await n.at(0,12);if(l.length<12||p(l,4,4)!=="ftyp"||(await i(0,t,0),e.length===0))return null;let c=e.reduce((a,u)=>a.width*a.height>=u.width*u.height?a:u);return r===1||r===3?k(c):c}async function G(n){let t=await n.at(0,22);return t.length<22||p(t,0,4)!=="8BPS"?null:h(d(t,18),d(t,14))}var N=new Set([0,1,2,3,9,10,11]);async function T(n){let t=await n.at(0,18);if(t.length<18||t[1]>1||!N.has(t[2]))return null;let e=t[16];return[8,15,16,24,32].includes(e)?h(w(t,12),w(t,14)):null}async function B(n){let t=await n.at(0,8);if(t.length<8)return null;let e=t[0]===73&&t[1]===73,r=t[0]===77&&t[1]===77;if(!e&&!r)return null;let i=(s,m)=>e?w(s,m):A(s,m),l=(s,m)=>e?b(s,m):d(s,m);if(i(t,2)!==42)return null;let c=l(t,4),a=await n.at(c,2);if(a.length<2)return null;let u=i(a,0);if(u<1||u>4096)return null;let o=await n.at(c+2,u*12),f=0,g=0;for(let s=0;s<u;s++){let m=s*12;if(m+12>o.length)break;let y=i(o,m),R=i(o,m+2)===3?i(o,m+8):l(o,m+8);y===256?f=R:y===257&&(g=R)}return h(f,g)}async function V(n,t){let e=await n.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,i=Math.min(t,1<<20);for(;r<i;){let l=await n.at(r,512);if(l.length===0)return null;let c=l.indexOf(0);if(c<=0)return null;let a=p(l,0,c),u=l.subarray(c+1).indexOf(0);if(u<0)return null;let o=c+1+u+1;if(o+4>l.length)return null;let f=b(l,o),g=r+o+4;if(a==="dataWindow"){if(f<16)return null;let s=await n.at(g,16);return s.length<16?null:h(P(s,8)-P(s,0)+1,P(s,12)-P(s,4)+1)}r=g+f}return null}async function X(n){let t=await n.at(0,4);if(t.length<4)return null;let e=p(t,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let i=await n.at(772,8);return i.length<8?null:h(r?d(i,0):b(i,0),r?d(i,4):b(i,4))}var Y={png:C,jpg:F,jpeg:F,gif:j,bmp:L,webp:H,avif:S,heic:S,heif:S,psd:G,tga:T,tif:B,tiff:B,exr:V,dpx:X};async function z(n,t){let e=Y[(n??"").toLowerCase()];if(!e)return null;try{return await e(new U(t),t.size)}catch{return null}}var q=n=>{let t=n.split(/[/\\]/).pop()??"",e=t.lastIndexOf(".");return e>0?t.slice(e+1).toLowerCase():""};async function J(n,t){try{if(n==="dpx"){let e=await(await import("./dpx-wasm-XBKO4V4W.js")).inspectDpxWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="exr"){let e=await(await import("./exr-wasm-VE2W6MFW.js")).inspectExrWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="dng"){let e=await(await import("./dng-wasm-WUUQB7M2.js")).inspectDngWasm(t);return e?{width:e.width,height:e.height}:null}if(n==="cr3"){let e=await(await import("./cr3-wasm-YTMVBAFM.js")).inspectCr3Wasm(t);return e?{width:e.width,height:e.height}:null}if(n==="tif"||n==="tiff"){let e=await(await import("./tiff-wasm-T2V2ICZT.js")).inspectTiffWasm(t);return e?{width:e.width,height:e.height}:null}}catch{}return null}async function K(n){if(typeof createImageBitmap!="function"||typeof Blob>"u")return null;try{let t=await createImageBitmap(new Blob([n])),e={width:t.width,height:t.height};return t.close?.(),e.width>0&&e.height>0?e:null}catch{return null}}async function O(n){let t=q(n.filename),e=await z(t,v(n));if(e)return e;let r=M(t);if(r===null||r==="none")return null;let i;try{i=await n.read(0,n.fileSize)}catch{return null}return r==="wasm-decoder"?await J(t,i):await K(i)}function E(n){let t=_(n);return t==="jpg"?"jpeg":t==="tif"?"tiff":t||"still"}var rt={async inspect(n){let t=n.parts[0],e=await O(t);return{id:t.filename,kind:"external",content_kind:"still",target_url:t.filename,available_range:null,reel_name:null,source_timecode:null,container:_(t.filename)||"still",codec:E(t.filename),size_bytes:t.fileSize,bitrate_bps:null,source_resolution_w:e?.width??null,source_resolution_h:e?.height??null,source_pixel_aspect:e?1:null,streams:[],vendor_metadata:{},binding_state:"unbound",raw_extraction:{},metadata:{}}},async extract(n){let t=n.parts.map((e,r)=>({kind:"frame",part:r,offset:0,length:e.fileSize,frame_in:r,frame_out:r}));return t.length===0?null:{v:1,container:_(n.parts[0].filename)||"still",codec:E(n.parts[0].filename),frame_count:t.length,granularity:"frame",segments:t,...n.parts.length>1?{part_names:n.parts.map(e=>e.filename)}:{}}},async sparsify(){throw new Error("stillFormat.sparsify: stills ship whole \u2014 no sparse plan exists")},async trim(){throw new Error("stillFormat.trim: stills ship whole \u2014 no trim plan exists")}};export{rt as stillFormat};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a,b,c}from"./chunk-BTXLTVNK.js";import"./chunk-DKGGJM6Z.js";import"./chunk-PIEH7J6J.js";import"./chunk-PSANHDZM.js";export{c as decodeTiffPreviewWasm,b as decodeTiffWasm,a as inspectTiffWasm};
|
|
Binary file
|
package/dist/wasm/udf_bg.wasm
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as b}from"./chunk-AACY2V3L.js";import{
|
|
3
|
+
import{a as b}from"./chunk-AACY2V3L.js";import{Ca as u,Y as _,ga as f,ma as d,pa as g}from"./chunk-PIEH7J6J.js";import"./chunk-PSANHDZM.js";function p(s){return(r,t)=>s.read(r,t)}function S(s){let r=[];for(let t of s)t.kind!=="clip"||!t.source_range||r.push({start_frame:t.source_range.start.value,dur_frames:t.source_range.duration.value,fps:t.source_range.start.rate??1});return r}var w={async inspect(s){await u();let r=s.parts[0],t=await _(p(r),r.fileSize),e=JSON.parse(t);if(!e||!e.sample_rate)return null;let a=e.byte_rate>0?e.data_length/e.byte_rate:null,m=a?Math.round(a*e.sample_rate):0,n=[{kind:"audio",codec:"pcm",rate:e.sample_rate,channels:e.channels,bit_depth:e.bits_per_sample,codec_specific:{bits_per_sample:e.bits_per_sample}}];return{id:r.filename,kind:"external",content_kind:"audio",target_url:r.filename,available_range:a?{start:{value:0,rate:e.sample_rate},duration:{value:m,rate:e.sample_rate}}:null,reel_name:null,source_timecode:e.source_timecode??null,container:"wav",codec:"pcm",size_bytes:r.fileSize,bitrate_bps:e.byte_rate*8,streams:n,vendor_metadata:e.bext?{bext:e.bext}:{},binding_state:"unbound",raw_extraction:{wav_meta:e},metadata:{}}},async extract(s){await u();let r=s.parts[0],t=JSON.parse(await f(p(r),r.fileSize));return t.length===0?null:{v:1,container:"wav",codec:"pcm",frame_count:b(t),granularity:"second",segments:t}},async sparsify(s,r){await u();let t=s.parts[0],e=await g(p(t),t.fileSize,JSON.stringify(S(r.items)),r.handles),a=JSON.parse(e);return[{filename:t.filename,fileSize:a.fileSize,structuralRanges:a.structuralRanges,essenceRanges:a.essenceRanges,trimInputs:a.trimInputs}]},async trim(s,r){await u();let t=s.parts[0],e=[];for(let n of r.items){if(n.kind!=="clip"||!n.source_range)continue;let i=n.source_range.start.rate??1,o=Math.max(0,(n.source_range.start.value-r.handles)/i),c=(n.source_range.start.value+n.source_range.duration.value+r.handles)/i;c>o&&e.push([o,c])}if(e.length===0)throw new Error("wav trim: no usable trim ranges in items");e.sort((n,i)=>n[0]-i[0]);let a=[];for(let[n,i]of e){let o=a[a.length-1];o&&n<=o[1]?o[1]=Math.max(o[1],i):a.push([n,i])}let m=[];for(let[n,[i,o]]of a.entries()){let c=await d(p(t),t.fileSize,i,o,1),l=JSON.parse(c);a.length>1&&(l.output_clip_number=n+1,l.output_clip_count=a.length,l.output_part_number=1),m.push(l)}return m}};export{w as wavFormat};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conformtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "conform.tools on your machine: timeline exchange, relink, media trim, delivery and auto conform, as MCP tools for Claude and other AI apps, a CLI and a local HTTP API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
package/dist/chunk-35U7WGES.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{c as m,d as w}from"./chunk-P7OVDUA5.js";import{i as b}from"./chunk-YPRTUS5W.js";import{G as g,S as _}from"./chunk-C2ESM27Z.js";var f={prproj:"prproj","resolve-drt":"drt",aaf:"aaf",avb:"avb",otio:"otio","flame-archive":"flame","resolve-fcpxml":"fcpxml","fcp-xml":"xmeml","premiere-xml":"xmeml","resolve-xml":"xmeml"};function S(e){return e in f}var p=null;function l(){return p||(p=E()),p}async function E(){let e=await import("./timeline_core-VK2ZWPCO.js"),r=(await import("./timeline_core_bg-QEOVAIWP.js")).default;return await e.default({module_or_path:r}),e}async function A(e,r){let o=f[r];if(!o)throw new Error(`timelineInspect: no Rust engine for format '${r}'`);let t=await l(),i=e.name.replace(/\.[^.]+$/,""),n=(R,...M)=>t[R](...M),s;switch(o){case"prproj":s=n("inspect_prproj_json",await a(e));break;case"aaf":s=n("inspect_aaf_json",await a(e));break;case"avb":s=n("inspect_avb_json",await a(e));break;case"flame":s=n("inspect_flame_json",await a(e),i);break;case"drt":s=n("inspect_drt_json",await y(e));break;case"otio":s=n("inspect_otio_json",await e.text(),i);break;case"fcpxml":s=n("inspect_fcpxml_json",await e.text(),i);break;case"xmeml":s=n("inspect_xmeml_json",await e.text(),i);break}return I(s)}var x=12*1024*1024,d=!1;function j(e){d=e}var h=null,k=8e3;async function F(){!h||d||await Promise.race([h,new Promise(e=>setTimeout(e,k))])}function c(e,r,o){if(d||e.length<=x)return e;let t=(e.length/1048576).toFixed(0),i=o?.length??0;throw i===1?new Error(`This ${r.toUpperCase()} timeline extracts to ${t} MB, past what our conversion server can hold in one pass (the ceiling is ours, not your file \u2014 a single long timeline can exceed it on its own). Get in touch and we will convert it for you while we lift the limit.`):new Error(`This ${r.toUpperCase()} selection${i?` (${i} sequences)`:""} extracts to ${t} MB, past what our conversion server can hold in one pass. Convert a few sequences at a time \u2014 one long timeline is usually about ${(x/1048576).toFixed(0)} MB. If a single timeline still will not go through, get in touch and we will convert it for you.`)}async function T(e,r,o){let t=f[r];if(!t)throw new Error(`timelineExtract: no Rust engine for format '${r}'`);switch(await F(),t){case"otio":case"fcpxml":case"xmeml":return{fmt:t,extract:await e.text()};case"drt":{let n=(await l()).extract_drt_json(await y(e));return{fmt:t,extract:c(n,t,o)}}case"prproj":{let i=await l(),n=JSON.stringify(o??[]),s=i.extract_prproj_json(await a(e),n);return{fmt:t,extract:c(s,t,o)}}case"avb":{let i=await l(),n=JSON.stringify(o??[]),s=i.extract_avb_json(await a(e),n);return{fmt:t,extract:c(s,t,o)}}case"aaf":case"flame":{let n=(await l())[`extract_${t}_json`](await a(e));return{fmt:t,extract:c(n,t,o)}}}}async function a(e){return new Uint8Array(await e.arrayBuffer())}async function y(e){let r=_(await a(e)),o={};for(let[t,i]of Object.entries(r))t.toLowerCase().endsWith(".xml")&&(o[t]=g(i));return JSON.stringify(o)}function I(e){let r=JSON.parse(e),o=Array.isArray(r)?r:r?.timelines??r?.sequences??[],t=o.filter(n=>typeof n=="object"&&n!==null),i=o.map(n=>{if(typeof n=="string")return n;let s=n;return s?.name??s?.title??s?.id??""}).filter(n=>!!n);return{names:Array.from(new Set(i)),timelines:t}}var P=/^(.+)_(\d{3})\.R3D$/i;function u(e){let o=(e.split(/[/\\]/).pop()??e).match(P);return o?{clipBase:o[1],partNumber:parseInt(o[2],10)}:null}function C(e){return u(e)!==null}function U(e,r){let o=u(e);if(!o)return[];let t=[];for(let i of r){let n=u(i);n&&n.clipBase===o.clipBase&&t.push({name:i,n:n.partNumber})}return t.sort((i,n)=>i.n-n.n),t.map(i=>i.name)}async function L(e){if(!m(e.name))return null;try{return await b(w(e),{verb:"inspect"})}catch(r){return console.warn(`[probeMedia] ${e.name} probe failed:`,r),null}}var z={reelName:!1,fileName:!0,fileNameMode:"loose",fileExtensions:"",totalDuration:!1,resolution:!1,bitDepth:!1,fileFormat:!1,codec:!1,mediaUmid:!1};var Y="X-Write-Issues";function Q(e){if(!e)return[];try{let r=JSON.parse(decodeURIComponent(e));return Array.isArray(r)?r:[]}catch{return[]}}export{u as a,C as b,U as c,z as d,S as e,A as f,j as g,T as h,Y as i,Q as j,L as k};
|