conformtools 0.6.16 → 0.6.17
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 +1 -1
- package/dist/{account-W7Z2MYZU.js → account-VXAKXGY6.js} +1 -1
- package/dist/{agent-hook-setup-JCIZG3Q3.js → agent-hook-setup-HBT2LTVR.js} +1 -1
- package/dist/{analysis-engine-DCHJHZ7W.js → analysis-engine-BZUEBW55.js} +1 -1
- package/dist/{arriraw-YIJ3BYNN.js → arriraw-GZ63YMLZ.js} +7 -7
- package/dist/bridge-DRC6BQFR.js +3 -0
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-HOACOBAY.js → chunk-2SDAOYP5.js} +3 -3
- package/dist/{chunk-XVZ7KJRI.js → chunk-2VH2Z6RD.js} +1 -1
- package/dist/chunk-3PVQ5QP4.js +3 -0
- package/dist/chunk-73RFYAVG.js +3 -0
- package/dist/{chunk-RGMTLNMF.js → chunk-BBCQMZQN.js} +1 -1
- package/dist/{chunk-JL454FFL.js → chunk-CRMGV32N.js} +2 -2
- package/dist/{chunk-JM5LHKTU.js → chunk-CZ6OZKR6.js} +222 -216
- package/dist/chunk-GRJLKGBG.js +3 -0
- package/dist/chunk-GTPTZRO6.js +3 -0
- package/dist/{chunk-4RA57LTJ.js → chunk-IG2X534U.js} +1 -1
- package/dist/{chunk-MGMDNGNX.js → chunk-JT3HI632.js} +2 -2
- package/dist/chunk-JTRM2JCE.js +7 -0
- package/dist/{chunk-UAURERD3.js → chunk-M5CEBOLK.js} +1 -1
- package/dist/{chunk-XDI6CPPV.js → chunk-MTAXVOHK.js} +1 -1
- package/dist/{chunk-WJ5EWXP2.js → chunk-MVQ5RGZB.js} +1 -1
- package/dist/{chunk-VETHR2O7.js → chunk-NN444GPH.js} +1 -1
- package/dist/chunk-OSUIS4JU.js +3 -0
- package/dist/chunk-P4PCSGEH.js +10 -0
- package/dist/{chunk-DPA26AOI.js → chunk-QNF4NMIW.js} +1 -1
- package/dist/{chunk-QRZO5GOI.js → chunk-R2WEXCVQ.js} +1 -1
- package/dist/chunk-RITYQNOO.js +3 -0
- package/dist/{chunk-RJD44NQU.js → chunk-S2WAFMRV.js} +2 -2
- package/dist/chunk-S5AOIOTT.js +3 -0
- package/dist/chunk-STGGRRYM.js +3 -0
- package/dist/{chunk-FLLB6UZJ.js → chunk-T7S2UBNN.js} +1 -1
- package/dist/chunk-TWHNQFKI.js +3 -0
- package/dist/chunk-UBWUED67.js +3 -0
- package/dist/{chunk-VWFEMXYZ.js → chunk-VCBLWNQR.js} +102 -101
- package/dist/{chunk-6V4OEOOX.js → chunk-VFXMP7IF.js} +1 -1
- package/dist/{chunk-5W57ITT2.js → chunk-WKNX742H.js} +2 -2
- package/dist/{chunk-UKXSKFL3.js → chunk-YGAAGTLE.js} +1 -1
- package/dist/{claude-setup-CM7G2YSG.js → claude-setup-W27DLJIO.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{cr3-wasm-NYCB34ND.js → cr3-wasm-VUEEZYKQ.js} +1 -1
- package/dist/{demo-engine-CBFAAPPO.js → demo-engine-5TCNOTTH.js} +1 -1
- package/dist/dng-wasm-5RQBGYAK.js +3 -0
- package/dist/dpx-wasm-OQVTNGOB.js +3 -0
- package/dist/{engine-6YYXTF2Q.js → engine-4X6TDWWA.js} +2 -2
- package/dist/exr-wasm-72YZFOME.js +3 -0
- package/dist/framing-HGW5RCUA.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-MAUVJTR4.js → h264-QCYEI6RF.js} +1 -1
- package/dist/{h264-mxf-2O4SAUTA.js → h264-mxf-2BYKXDGT.js} +1 -1
- package/dist/hook.js +2 -2
- package/dist/{host-relink-NVLUO73P.js → host-relink-37DCSN47.js} +1 -1
- package/dist/hosted-M2OZSONX.js +3 -0
- package/dist/hosts-IAJTORJD.js +3 -0
- package/dist/http.js +3 -3
- package/dist/{inspect-YIFLNOJW.js → inspect-R4RWCK3X.js} +2 -2
- package/dist/isobmff-RH4JKUUB.js +3 -0
- package/dist/{mc-video-HRZC7HGH.js → mc-video-MMKWEKFZ.js} +1 -1
- package/dist/mcp.js +8 -8
- package/dist/media-6MB7EKA7.js +3 -0
- package/dist/mxf-7HFFEBNW.js +3 -0
- package/dist/{ops-XIUVNJE2.js → ops-EM345H7F.js} +1 -1
- package/dist/{probe-GIAKRPFV.js → probe-YDOFGCGD.js} +1 -1
- package/dist/{r3d-I6EYEYX7.js → r3d-DDOTSYZH.js} +5 -5
- package/dist/r3d-G34YLXXA.js +3 -0
- package/dist/sequence-patch-2S7IPE52.js +3 -0
- package/dist/{source-QGWWLMME.js → source-L2JNTYS6.js} +1 -1
- package/dist/{still-4UR35GZH.js → still-AGBF3OOY.js} +1 -1
- package/dist/{still-wasm-RTPOMH7S.js → still-wasm-6YLI6NQQ.js} +1 -1
- package/dist/{store-MWNX47IK.js → store-LWUDJD76.js} +1 -1
- package/dist/tiff-wasm-6APT7FYP.js +3 -0
- package/dist/timeline-EZ6WUHCB.js +3 -0
- package/dist/{wav-HSCUCY4U.js → wav-CV43ZAJI.js} +1 -1
- package/package.json +5 -5
- package/dist/bridge-UPSJ7F3S.js +0 -3
- package/dist/chunk-DKGGJM6Z.js +0 -3
- package/dist/chunk-DLF5AKXT.js +0 -10
- package/dist/chunk-EEDLRRKU.js +0 -3
- package/dist/chunk-IDJIOKXA.js +0 -3
- package/dist/chunk-ISKNIQVO.js +0 -3
- package/dist/chunk-JKOB3U54.js +0 -3
- package/dist/chunk-OWWXUNJF.js +0 -7
- package/dist/chunk-PFZVET7S.js +0 -3
- package/dist/chunk-QH5DTYSE.js +0 -3
- package/dist/chunk-RVZQ3Y6N.js +0 -3
- package/dist/chunk-X527E5VI.js +0 -3
- package/dist/chunk-YUO3UWPH.js +0 -3
- package/dist/dng-wasm-XCPPBXPZ.js +0 -3
- package/dist/dpx-wasm-XACWNFPB.js +0 -3
- package/dist/exr-wasm-FQBUR6QT.js +0 -3
- package/dist/framing-QYRCUEB5.js +0 -3
- package/dist/hosted-2XACQY7J.js +0 -3
- package/dist/hosts-GEXAZFB3.js +0 -3
- package/dist/isobmff-MTMGQKLK.js +0 -3
- package/dist/media-WC4ZVKIL.js +0 -3
- package/dist/mxf-J5QHA3VY.js +0 -3
- package/dist/r3d-2PCOFR2Z.js +0 -3
- package/dist/sequence-patch-DFGEAJGB.js +0 -3
- package/dist/tiff-wasm-N2S267IA.js +0 -3
- package/dist/timeline-Z3KD2CJX.js +0 -3
|
@@ -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{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m,t as n,u as o,v as p}from"./chunk-P4PCSGEH.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-BBCQMZQN.js";import"./chunk-MTAXVOHK.js";import"./chunk-YGAAGTLE.js";import"./chunk-IG2X534U.js";import"./chunk-NU3X7P4N.js";import"./chunk-QNF4NMIW.js";import"./chunk-ROGMKTND.js";import"./chunk-GTPTZRO6.js";import"./chunk-PSANHDZM.js";export{a as MEDIA_EXTS,f as bwfAt,p as coverage,d as decodeFrameRgba,n as factsLine,g as factsText,m as findMedia,o as findText,h as islandsFor,l as nameMatch,k as normName,c as openSource,e as probeMedia,b as siblingParts,j as trimMedia,i as trimSource};
|
|
@@ -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 N}from"./chunk-AACY2V3L.js";import{b as $}from"./chunk-YGAAGTLE.js";import{b as J}from"./chunk-IG2X534U.js";import{Ha as l,M,R as P,b as U,ca as D,da as T,e as B,ea as C,fa as E,g as S,ga as L,ia as O,ra as V,ua as W,w as k,wa as G}from"./chunk-QNF4NMIW.js";import"./chunk-PSANHDZM.js";var z=new Uint8Array([6,14,43,52,2,5,1,1,13,1,2,1,1,17,1,0]);function oe(t){e:for(let r=t.length-z.length;r>=0;r--){for(let e=0;e<z.length;e++)if(t[r+e]!==z[e])continue e;return r}return-1}function j(t,r){if(r>=t.byteLength)return[null,0];let e=t.getUint8(r);if(e<128)return[e,1];let n=e&127;if(n===0||n>8||r+1+n>t.byteLength)return[null,1];let a=0;for(let i=0;i<n;i++)a=a*256+t.getUint8(r+1+i);return[a,1+n]}function b(t,r){let e=t.getUint32(r,!1),n=t.getUint32(r+4,!1);return e*4294967296+n}async function Z(t){let r=t.fileSize,e=[];if(r<1024)return e;let a=Math.max(0,r-65536),i=r-a,o=await t.read(a,i);e.push({offset:a,length:i});let s=oe(o);if(s<0)return e;let c=new DataView(o.buffer,o.byteOffset,o.byteLength),[f,re]=j(c,s+16);if(f===null||f<16||f>65536)return e;let F=s+16+re;if(F+f>o.length)return e;let A=[],te=new DataView(o.buffer,o.byteOffset+F,f),g=Math.floor((f-4)/12);if(g<1||g>4096)return e;for(let u=0;u<g;u++){let d=b(te,u*12+4);d>=0&&d<r&&A.push(d)}for(let u of A){let d=Math.min(256,r-u),p=await t.read(u,d);if(p.length<80)continue;let _=new DataView(p.buffer,p.byteOffset,p.byteLength),[R,v]=j(_,16);if(R===null)continue;let m=16+v,y,x;if(p.length<m+64){let ie=Math.min(m+64,r-u),h=await t.read(u,ie);if(h.length<m+64)continue;let I=new DataView(h.buffer,h.byteOffset,h.byteLength);y=b(I,m+32),x=b(I,m+40)}else y=b(_,m+32),x=b(_,m+40);let ne=u+16+v+R+y+x,ae=Math.min(ne+65536,r)-u;e.push({offset:u,length:ae})}return e}function H(t,r){let e=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let a=n.source_range.start.value,i=n.source_range.duration.value,o=Math.max(0,Math.floor(a)-r),s=Math.floor(a+i-1)+r;s>=o&&e.push({first_frame:o,last_frame:s})}return e}function se(t,r){let e=[...t].sort((i,o)=>i.offset-o.offset),n=[],a=0;for(let i of e)i.offset>a&&n.push({offset:a,length:i.offset-a}),a=Math.max(a,i.offset+i.length);return a<r&&n.push({offset:a,length:r-a}),n}async function q(t,r,e){let n=H(r,0);if(n.length===0)throw new Error("planMxfTrimsFromItems: no usable trim ranges in items");await l();let a=(o,s)=>t.read(o,s),i=await $(n,e,(o,s)=>V(a,t.fileSize,o,s));return i.map((o,s)=>{let c=JSON.parse(o);return i.length>1&&(c.output_clip_number=s+1,c.output_clip_count=i.length,c.output_part_number=1),c})}async function K(t,r,e){await l();let n=H(r,e),i=await W((s,c)=>t.read(s,c),t.fileSize,JSON.stringify(n));if(i!=="null")return JSON.parse(i);console.warn(`[mxf] no parseable index \u2014 shipping the WHOLE file (${t.fileSize} bytes). The cut's ${n.length} range(s) cannot be addressed; nothing is trimmed.`);let o=(await Z(t)).map(s=>({offset:s.offset,length:s.length}));return{fileSize:t.fileSize,structuralRanges:o,essenceRanges:se(o,t.fileSize),trimInputs:n,wholeFileFallback:!0}}async function Q(t){await l();let e=await G((n,a)=>t.read(n,a),t.fileSize);return JSON.parse(e)}function w(t){return(r,e)=>t.read(r,e)}var Me={async inspect(t){let r=t.parts[0],e=await Q(r);if(!e)return null;let n=e.timecode??null,a=n&&n.fps_denominator>0?n.fps_numerator/n.fps_denominator:null,i=e.width??null,o=e.height??null,s=e.inner_codec==="mpeg2"||e.inner_codec==="dv"?e.inner_codec:null;return{id:r.filename,kind:"external",target_url:r.filename,available_range:a&&e.frame_count?{start:{value:0,rate:a},duration:{value:e.frame_count,rate:a}}:null,reel_name:null,source_timecode:n?.display??null,source_fps:a,source_resolution_w:i,source_resolution_h:o,container:"mxf",codec:s,size_bytes:r.fileSize,streams:[...i||o||a?[{kind:"video",codec:s,width:i??void 0,height:o??void 0,rate:a??void 0,codec_specific:null}]:[],...e.audio?[{kind:"audio",codec:e.audio.codec_fourcc,channels:e.audio.channels??void 0,rate:e.audio.sample_rate??void 0,bit_depth:e.audio.bit_depth??void 0,codec_specific:{fourcc:e.audio.codec_fourcc}}]:[]],decode_provenance:e.decode_provenance??null,vendor_metadata:{frame_count:e.frame_count,...n?{drop_frame:n.drop_frame}:{},...e.inner_codec?{inner_codec:e.inner_codec}:{},...e.truncated?{truncated:!0}:{}},binding_state:"unbound",raw_extraction:{mxf_probe:e},metadata:{}}},async extract(t){await l();let r=t.parts[0],e=JSON.parse(await O(w(r),r.fileSize));return e.length===0?null:{v:1,container:"mxf",codec:"mxf",frame_count:N(e),granularity:"frame",segments:e}},async sparsify(t,r){let e=t.parts[0],n=await K(e,r.items,r.handles);return[{filename:e.filename,fileSize:n.fileSize,structuralRanges:n.structuralRanges,essenceRanges:n.essenceRanges,trimInputs:n.trimInputs,wholeFileFallback:n.wholeFileFallback}]},async trim(t,r){let e=t.parts[0];return q(e,r.items,r.handles)},async decode(t,r,e){await l();let n=t.parts[0],a=w(n),i=await ee(t),o=e.detail==="coarse",s;if(i==="arriraw")s=await S(a,n.fileSize,r,o?"preview:4":"full");else if(i==="arriraw-alev3")s=await B(a,n.fileSize,r,o?"preview:4":"full");else if(i==="dnxhr")s=await M(a,n.fileSize,r,o?"preview":"full");else if(i==="xocn")s=await P(a,n.fileSize,r,o?"preview":"full");else if(i==="prores")s=await k(a,n.fileSize,r,o?"preview":"full");else throw new Error(`mxf decode: no decoder for inner codec '${i}'`);let c=new DataView(s.buffer,s.byteOffset,8);return{width:c.getUint32(0,!0),height:c.getUint32(4,!0),rgba:s.slice(8)}},async decode16(t,r){await l();let e=t.parts[0],n=w(e),a=await ee(t),i;try{if(a==="arriraw"){let o=await ue(t,r);if(o)return o;i=await S(n,e.fileSize,r,"rgb16")}else if(a==="dnxhr")i=await M(n,e.fileSize,r,"rgb16");else if(a==="xocn")i=await P(n,e.fileSize,r,"rgb16");else throw new Error(`mxf decode16: no decoder for inner codec '${a}'`)}catch(o){throw fe(o,a)}return J(i)}};function fe(t,r){let e=typeof t=="string"?t:t instanceof Error?t.message:"";return/has no 16-bit decoder|no rgb16 tier/.test(e)?new Error(`mxf ${r}: has no 16-bit decoder \u2014 ${e}`):t}var X=new WeakMap;async function ue(t,r){if(!!0)return null;try{let e=await import("./arriraw-GZ63YMLZ.js");if(!await e.arrirawGpuAvailable())return null;let{parseArrirawGpuPayload:n,arrirawFrameToRgb16:a}=await import("./clip-state-B6JOX3JE.js"),i=t.parts[0],o=X.get(t)??null,s=await U(w(i),i.fileSize,r,o?.key),c=n(s,o);if(!c)return null;X.set(t,{key:c.key,state:c.state});let f=await e.decodeArrirawFrameGpu(c.essence,c.state);return f?{width:f.width,height:f.height,rgb16:a(f)}:null}catch{return null}}var Y=new WeakMap;async function ee(t){let r=Y.get(t);if(r)return r;await l();let e=t.parts[0],n=w(e),a="mxf";return await T(n,e.fileSize)?a="arriraw":await D(n,e.fileSize)?a="arriraw-alev3":await E(n,e.fileSize)?a="dnxhr":await L(n,e.fileSize)?a="xocn":await C(n,e.fileSize)&&(a="prores"),Y.set(t,a),a}export{Me as mxfFormat};
|
|
@@ -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,b,c,d,e,f,g,h,i}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-IG2X534U.js";import"./chunk-PSANHDZM.js";export{c as CoverageMissError,e as DeliveryCoverageMissError,a as INTENTS,f as asDeliveryCoverageMiss,h as extract,i as mediaOp,d as parseDeliveryCoverageMiss,g as resolveFormat,b as unpackFrame16};
|
|
@@ -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{H as b,P as $,b as m,ba as o,g as c,j as p,o as f,u as d}from"./chunk-
|
|
3
|
+
import{H as b,P as $,b as m,ba as o,g as c,j as p,o as f,u as d}from"./chunk-GTPTZRO6.js";import"./chunk-PSANHDZM.js";import{dirname as g}from"node:path";import{fileURLToPath as P}from"node:url";import x from"node:process";var a="ColorMatchProbe.ofx.bundle",R="http://127.0.0.1:9876",u="/Library/OFX/Plugins";async function v(){let r=x.execPath;for(let t of[m("CONFORM_RESOLVE_PROBE"),o(g(r),"..","Resources","resolve-probe",a),o(g(P(import.meta.url)),"..","..","..","resolve_hook","build",a)])if(t&&await d(o(t,"Contents","MacOS","ColorMatchProbe.ofx")))return t;return null}async function k(){let r=c()==="darwin"&&p()==="arm64",t=await d(o(u,a)),n=await fetch(R+"/",{signal:AbortSignal.timeout(500)}).then(i=>i.ok).catch(()=>!1),s=!!await v();return{installed:t,loaded:n,shipped:s,supported:r,next:r?n?"running: the Color page selection and the selected node are read live":t?"installed; restart Resolve to load it":s?"host_setup host=resolve action=install_probe (asks for an administrator), then restart Resolve":"not in this build":"the probe runs on Apple silicon Macs only"}}async function C(){if(c()!=="darwin"||p()!=="arm64")throw new Error("the probe runs on Apple silicon Macs only");let r=await v();if(!r)throw new Error("this build does not carry the probe (resolve_hook/build.sh makes it)");return await O(r,u,a),await b(o(f(),"Library","Application Support","Blackmagic Design","DaVinci Resolve","OFXPluginCacheV2.xml")).catch(()=>{}),{path:o(u,a),restart_required:!0}}var e=r=>`'${r.replace(/'/g,"'\\''")}'`;async function O(r,t,n){let s=o(t,n),l=o(t,`.${n}.staging`),i=o(t,`.${n}.previous`),w=[`mkdir -p ${e(t)}`,`rm -rf ${e(l)} ${e(i)}`,`cp -R ${e(r)} ${e(l)}`,`if [ -e ${e(s)} ]; then mv ${e(s)} ${e(i)}; fi`,`mv ${e(l)} ${e(s)} || { [ -e ${e(i)} ] && mv ${e(i)} ${e(s)}; exit 1; }`,`rm -rf ${e(i)}`].join(" && "),h=await $("osascript",["-e",`do shell script ${JSON.stringify(w)} with administrator privileges`]);if(!h.success)throw new Error(`installing into ${t} needs an administrator, and that was refused or failed: ${h.stderr.trim()}`)}export{a as PROBE_BUNDLE,R as PROBE_URL,C as installProbe,k as probeStatus};
|
|
@@ -1,6 +1,6 @@
|
|
|
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 e1}from"./chunk-7D7H6VFW.js";import{Ia as r1,ya as n1}from"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";var t1=new Uint32Array([327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,458759,458759,458759,458759,458759,458759,458759,458759,524296,524296,524296,524296,589839,589839,655376,655377,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,458764,458764,458764,458764,458764,458764,458764,458764,458766,458766,458766,458766,458766,458766,458766,458766,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154]),a1=new Uint32Array([393223,393224,327686,327686,262149,262149,262149,262149,196609,196609,196609,196609,196609,196609,196609,196609,262146,262146,262146,262146,262147,262147,262147,262147,196612,196612,196612,196612,196612,196612,196612,196612,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536]),i1=new Uint32Array([131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,196610,196610,196610,196610,196610,196610,196610,196610,196611,196611,196611,196611,196611,196611,196611,196611,196612,196612,196612,196612,196612,196612,196612,196612,262149,262149,262149,262149,262150,262150,262150,262150,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073]),u1=new Uint32Array([0,1,5,6,14,15,27,28,44,45,65,66,90,91,119,120,2,4,7,13,16,26,29,43,46,64,67,89,92,118,121,150,3,8,12,17,25,30,42,47,63,68,88,93,117,122,149,151,9,11,18,24,31,41,48,62,69,87,94,116,123,148,152,177,10,19,23,32,40,49,61,70,86,95,115,124,147,153,176,178,20,22,33,39,50,60,71,85,96,114,125,146,154,175,179,200,21,34,38,51,59,72,84,97,113,126,145,155,174,180,199,201,35,37,52,58,73,83,98,112,127,144,156,173,181,198,202,219,36,53,57,74,82,99,111,128,143,157,172,182,197,203,218,220,54,56,75,81,100,110,129,142,158,171,183,196,204,217,221,234,55,76,80,101,109,130,141,159,170,184,195,205,216,222,233,235,77,79,102,108,131,140,160,169,185,194,206,215,223,232,236,245,78,103,107,132,139,161,168,186,193,207,214,224,231,237,244,246,104,106,133,138,162,167,187,192,208,213,225,230,238,243,247,252,105,134,137,163,166,188,191,209,212,226,229,239,242,248,251,253,135,136,164,165,189,190,210,211,227,228,240,241,249,250,254,255]),z=new Int32Array([2048,2882,2841,2772,2676,2554,2408,2239,2048,1837,1609,1365,1108,841,565,284,2048,2772,2408,1837,1108,284,-565,-1365,-2048,-2554,-2841,-2882,-2676,-2239,-1609,-841,2048,2554,1609,284,-1108,-2239,-2841,-2772,-2048,-841,565,1837,2676,2882,2408,1365,2048,2239,565,-1365,-2676,-2772,-1609,284,2048,2882,2408,841,-1108,-2554,-2841,-1837,2048,1837,-565,-2554,-2676,-841,1609,2882,2048,-284,-2408,-2772,-1108,1365,2841,2239,2048,1365,-1609,-2882,-1108,1837,2841,841,-2048,-2772,-565,2239,2676,284,-2408,-2554,2048,841,-2408,-2239,1108,2882,565,-2554,-2048,1365,2841,284,-2676,-1837,1609,2772,2048,284,-2841,-841,2676,1365,-2408,-1837,2048,2239,-1609,-2554,1108,2772,-565,-2882,2048,-284,-2841,841,2676,-1365,-2408,1837,2048,-2239,-1609,2554,1108,-2772,-565,2882,2048,-841,-2408,2239,1108,-2882,565,2554,-2048,-1365,2841,-284,-2676,1837,1609,-2772,2048,-1365,-1609,2882,-1108,-1837,2841,-841,-2048,2772,-565,-2239,2676,-284,-2408,2554,2048,-1837,-565,2554,-2676,841,1609,-2882,2048,284,-2408,2772,-1108,-1365,2841,-2239,2048,-2239,565,1365,-2676,2772,-1609,-284,2048,-2882,2408,-841,-1108,2554,-2841,1837,2048,-2554,1609,-284,-1108,2239,-2841,2772,-2048,841,565,-1837,2676,-2882,2408,-1365,2048,-2772,2408,-1837,1108,-284,-565,1365,-2048,2554,-2841,2882,-2676,2239,-1609,841,2048,-2882,2841,-2772,2676,-2554,2408,-2239,2048,-1837,1609,-1365,1108,-841,565,-284]),s1={m16:931135616,lg_a:1098061119,lg_b:1125906863,lg_c:1046850094,lg_pa:1008981770,gc_k:1064554302,gc_p:1101529087,gc_t:1028443341,sd_eps:953267991,inv273:997199617,rr_c13:956301440,rr_c16:931135616,rr_c18:914358400,bil_sg:973078528,bil_srb:975874731,sobel_sc:931135616,bil_t7_0:1032826803,bil_t7_1:1040595071,bil_t7_2:1044597305,bil_t7_3:1046301409,bil_t7_4:1044597305,bil_t7_5:1040595071,bil_t7_6:1032826803,bil_t9_0:1031861895,bil_t9_1:1035879338,bil_t9_2:1039871874,bil_t9_3:1041522383,bil_t9_4:1042077871,bil_t9_5:1041522383,bil_t9_6:1039871874,bil_t9_7:1035879338,bil_t9_8:1031861895,gauss55_00:1065353216,gauss55_01:1082130432,gauss55_02:1088421888,gauss55_03:1082130432,gauss55_04:1065353216,gauss55_10:1082130432,gauss55_11:1098907648,gauss55_12:1104150528,gauss55_13:1098907648,gauss55_14:1082130432,gauss55_20:1088421888,gauss55_21:1104150528,gauss55_22:1109655552,gauss55_23:1104150528,gauss55_24:1088421888,gauss55_30:1082130432,gauss55_31:1098907648,gauss55_32:1104150528,gauss55_33:1098907648,gauss55_34:1082130432,gauss55_40:1065353216,gauss55_41:1082130432,gauss55_42:1088421888,gauss55_43:1082130432,gauss55_44:1065353216};function E(n,r){return(n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3])>>>0}function w(n,r){return n[r]<<8|n[r+1]}function q(n){let r=Math.min(n.length,65536),e=-1;for(let u=16;u+6<=r;u+=2){if(w(n,u)!==259)continue;let g=w(n,u+2),p=w(n,u+4);if(g<256||g>8192||p<128||p>8192)continue;let y=u-16;if(E(n,y+4)!==0||E(n,y+8)!==0)continue;let P=E(n,y);if(!(P<65536||y+P>n.length+8192)){e=y;break}}if(e<0)throw new Error("RED codestream container not found");let i=e,t=i+12,a=[];for(let u=0;u<8;u++)a.push(w(n,t+4+2*u));let o=i+28;if(o+512>n.length)throw new Error("R3D container table truncated");let b=a[1],m=a[2],f=i+540,v=v1(n,f,a[4],b);if(b%2!==0)throw new Error(`odd R3D canvas width ${b}`);return{canvasW:b,canvasH:m,rawFields:a,table512:n.subarray(o,o+512),streamOff:f,segments:v}}function v1(n,r,e,i){let t=Math.ceil(i/128),a=r;for(;(w(n,a)&4095)<256;)if(a+=2,a+2>n.length)throw new Error("R3D segment stream truncated");a+=1;let o=a,b=n[a-1],m=[];for(let f=0;f<e;f++){if(o+8>n.length)throw new Error("R3D segment header past essence end");let v=[w(n,o),w(n,o+2),w(n,o+4),w(n,o+6)],u=v.map(h=>h+7>>3),g=o+8,p=u[0]+u[1]+u[2]+u[3];if(g+p>n.length)throw new Error("R3D segment body past essence end");let y=g,P=v.map((h,x)=>{let C={off:y,bitLength:h,byteLength:u[x]};return y+=u[x],C});m.push({x:f%t*128,y:Math.floor(f/t)*16,quant:b,subbands:P}),b=n[g+p]??0,o=g+p+1}return m}function o1(n){let r=new Uint32Array(n.segments.length*4*8),e=0;for(let i of n.segments)for(let t=0;t<4;t++){let a=i.subbands[t];r[e]=a.off,r[e+1]=a.bitLength,r[e+2]=a.byteLength,r[e+3]=i.x,r[e+4]=i.y,r[e+5]=i.quant,r[e+6]=t,r[e+7]=0,e+=8}return r}function k(n){return x1[0]=n>>>0,h1[0]}var c1=new ArrayBuffer(4),x1=new Uint32Array(c1),h1=new Float32Array(c1),w1=1112556626;function B1(n){if(n.length<140)return null;let r=new DataView(n.buffer,n.byteOffset,n.byteLength);if(r.getUint32(0,!0)!==w1||r.getUint32(4,!0)!==1)return null;let e=r.getUint32(8,!0),i=12,t=[];for(let f=0;f<4;f++,i+=4)t.push(r.getUint32(i,!0));let a=[];for(let f=0;f<26;f++,i+=4)a.push(r.getUint32(i,!0));let o=r.getUint32(i,!0);i+=4;let b=r.getUint32(i,!0);if(i+=4,i+b>n.length)return null;let m=new TextDecoder().decode(n.subarray(i,i+b));return{wbBits:t,smatrixBits:a,exposureBits:o,fixFlashers:(e&2)!==0,model:m}}async function M(n){try{return await r1(),B1(n1(n??new Uint8Array(0)))}catch{return null}}var l1=`// R3D KOMODO entropy decode (kernel 1 of 2). One invocation per (segment, subband) job.
|
|
3
|
+
import{a as n1}from"./chunk-7D7H6VFW.js";import{Ha as Z,ya as Q}from"./chunk-QNF4NMIW.js";import"./chunk-PSANHDZM.js";var r1=new Uint32Array([327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,327683,458759,458759,458759,458759,458759,458759,458759,458759,524296,524296,524296,524296,589839,589839,655376,655377,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,393227,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262148,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,262146,458764,458764,458764,458764,458764,458764,458764,458764,458766,458766,458766,458766,458766,458766,458766,458766,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,393229,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,327686,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,131081,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,196609,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262149,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154,262154]),e1=new Uint32Array([393223,393224,327686,327686,262149,262149,262149,262149,196609,196609,196609,196609,196609,196609,196609,196609,262146,262146,262146,262146,262147,262147,262147,262147,196612,196612,196612,196612,196612,196612,196612,196612,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536,65536]),t1=new Uint32Array([131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,196610,196610,196610,196610,196610,196610,196610,196610,196611,196611,196611,196611,196611,196611,196611,196611,196612,196612,196612,196612,196612,196612,196612,196612,262149,262149,262149,262149,262150,262150,262150,262150,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073,131073]),a1=new Uint32Array([0,1,5,6,14,15,27,28,44,45,65,66,90,91,119,120,2,4,7,13,16,26,29,43,46,64,67,89,92,118,121,150,3,8,12,17,25,30,42,47,63,68,88,93,117,122,149,151,9,11,18,24,31,41,48,62,69,87,94,116,123,148,152,177,10,19,23,32,40,49,61,70,86,95,115,124,147,153,176,178,20,22,33,39,50,60,71,85,96,114,125,146,154,175,179,200,21,34,38,51,59,72,84,97,113,126,145,155,174,180,199,201,35,37,52,58,73,83,98,112,127,144,156,173,181,198,202,219,36,53,57,74,82,99,111,128,143,157,172,182,197,203,218,220,54,56,75,81,100,110,129,142,158,171,183,196,204,217,221,234,55,76,80,101,109,130,141,159,170,184,195,205,216,222,233,235,77,79,102,108,131,140,160,169,185,194,206,215,223,232,236,245,78,103,107,132,139,161,168,186,193,207,214,224,231,237,244,246,104,106,133,138,162,167,187,192,208,213,225,230,238,243,247,252,105,134,137,163,166,188,191,209,212,226,229,239,242,248,251,253,135,136,164,165,189,190,210,211,227,228,240,241,249,250,254,255]),j=new Int32Array([2048,2882,2841,2772,2676,2554,2408,2239,2048,1837,1609,1365,1108,841,565,284,2048,2772,2408,1837,1108,284,-565,-1365,-2048,-2554,-2841,-2882,-2676,-2239,-1609,-841,2048,2554,1609,284,-1108,-2239,-2841,-2772,-2048,-841,565,1837,2676,2882,2408,1365,2048,2239,565,-1365,-2676,-2772,-1609,284,2048,2882,2408,841,-1108,-2554,-2841,-1837,2048,1837,-565,-2554,-2676,-841,1609,2882,2048,-284,-2408,-2772,-1108,1365,2841,2239,2048,1365,-1609,-2882,-1108,1837,2841,841,-2048,-2772,-565,2239,2676,284,-2408,-2554,2048,841,-2408,-2239,1108,2882,565,-2554,-2048,1365,2841,284,-2676,-1837,1609,2772,2048,284,-2841,-841,2676,1365,-2408,-1837,2048,2239,-1609,-2554,1108,2772,-565,-2882,2048,-284,-2841,841,2676,-1365,-2408,1837,2048,-2239,-1609,2554,1108,-2772,-565,2882,2048,-841,-2408,2239,1108,-2882,565,2554,-2048,-1365,2841,-284,-2676,1837,1609,-2772,2048,-1365,-1609,2882,-1108,-1837,2841,-841,-2048,2772,-565,-2239,2676,-284,-2408,2554,2048,-1837,-565,2554,-2676,841,1609,-2882,2048,284,-2408,2772,-1108,-1365,2841,-2239,2048,-2239,565,1365,-2676,2772,-1609,-284,2048,-2882,2408,-841,-1108,2554,-2841,1837,2048,-2554,1609,-284,-1108,2239,-2841,2772,-2048,841,565,-1837,2676,-2882,2408,-1365,2048,-2772,2408,-1837,1108,-284,-565,1365,-2048,2554,-2841,2882,-2676,2239,-1609,841,2048,-2882,2841,-2772,2676,-2554,2408,-2239,2048,-1837,1609,-1365,1108,-841,565,-284]),i1={m16:931135616,lg_a:1098061119,lg_b:1125906863,lg_c:1046850094,lg_pa:1008981770,gc_k:1064554302,gc_p:1101529087,gc_t:1028443341,sd_eps:953267991,inv273:997199617,rr_c13:956301440,rr_c16:931135616,rr_c18:914358400,bil_sg:973078528,bil_srb:975874731,sobel_sc:931135616,bil_t7_0:1032826803,bil_t7_1:1040595071,bil_t7_2:1044597305,bil_t7_3:1046301409,bil_t7_4:1044597305,bil_t7_5:1040595071,bil_t7_6:1032826803,bil_t9_0:1031861895,bil_t9_1:1035879338,bil_t9_2:1039871874,bil_t9_3:1041522383,bil_t9_4:1042077871,bil_t9_5:1041522383,bil_t9_6:1039871874,bil_t9_7:1035879338,bil_t9_8:1031861895,gauss55_00:1065353216,gauss55_01:1082130432,gauss55_02:1088421888,gauss55_03:1082130432,gauss55_04:1065353216,gauss55_10:1082130432,gauss55_11:1098907648,gauss55_12:1104150528,gauss55_13:1098907648,gauss55_14:1082130432,gauss55_20:1088421888,gauss55_21:1104150528,gauss55_22:1109655552,gauss55_23:1104150528,gauss55_24:1088421888,gauss55_30:1082130432,gauss55_31:1098907648,gauss55_32:1104150528,gauss55_33:1098907648,gauss55_34:1082130432,gauss55_40:1065353216,gauss55_41:1082130432,gauss55_42:1088421888,gauss55_43:1082130432,gauss55_44:1065353216};function T(n,r){return(n[r]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3])>>>0}function w(n,r){return n[r]<<8|n[r+1]}function z(n){let r=Math.min(n.length,65536),e=-1;for(let u=16;u+6<=r;u+=2){if(w(n,u)!==259)continue;let g=w(n,u+2),p=w(n,u+4);if(g<256||g>8192||p<128||p>8192)continue;let y=u-16;if(T(n,y+4)!==0||T(n,y+8)!==0)continue;let P=T(n,y);if(!(P<65536||y+P>n.length+8192)){e=y;break}}if(e<0)throw new Error("RED codestream container not found");let i=e,t=i+12,a=[];for(let u=0;u<8;u++)a.push(w(n,t+4+2*u));let o=i+28;if(o+512>n.length)throw new Error("R3D container table truncated");let b=a[1],m=a[2],f=i+540,v=v1(n,f,a[4],b);if(b%2!==0)throw new Error(`odd R3D canvas width ${b}`);return{canvasW:b,canvasH:m,rawFields:a,table512:n.subarray(o,o+512),streamOff:f,segments:v}}function v1(n,r,e,i){let t=Math.ceil(i/128),a=r;for(;(w(n,a)&4095)<256;)if(a+=2,a+2>n.length)throw new Error("R3D segment stream truncated");a+=1;let o=a,b=n[a-1],m=[];for(let f=0;f<e;f++){if(o+8>n.length)throw new Error("R3D segment header past essence end");let v=[w(n,o),w(n,o+2),w(n,o+4),w(n,o+6)],u=v.map(h=>h+7>>3),g=o+8,p=u[0]+u[1]+u[2]+u[3];if(g+p>n.length)throw new Error("R3D segment body past essence end");let y=g,P=v.map((h,x)=>{let C={off:y,bitLength:h,byteLength:u[x]};return y+=u[x],C});m.push({x:f%t*128,y:Math.floor(f/t)*16,quant:b,subbands:P}),b=n[g+p]??0,o=g+p+1}return m}function u1(n){let r=new Uint32Array(n.segments.length*4*8),e=0;for(let i of n.segments)for(let t=0;t<4;t++){let a=i.subbands[t];r[e]=a.off,r[e+1]=a.bitLength,r[e+2]=a.byteLength,r[e+3]=i.x,r[e+4]=i.y,r[e+5]=i.quant,r[e+6]=t,r[e+7]=0,e+=8}return r}function k(n){return x1[0]=n>>>0,h1[0]}var s1=new ArrayBuffer(4),x1=new Uint32Array(s1),h1=new Float32Array(s1),w1=1112556626;function B1(n){if(n.length<140)return null;let r=new DataView(n.buffer,n.byteOffset,n.byteLength);if(r.getUint32(0,!0)!==w1||r.getUint32(4,!0)!==1)return null;let e=r.getUint32(8,!0),i=12,t=[];for(let f=0;f<4;f++,i+=4)t.push(r.getUint32(i,!0));let a=[];for(let f=0;f<26;f++,i+=4)a.push(r.getUint32(i,!0));let o=r.getUint32(i,!0);i+=4;let b=r.getUint32(i,!0);if(i+=4,i+b>n.length)return null;let m=new TextDecoder().decode(n.subarray(i,i+b));return{wbBits:t,smatrixBits:a,exposureBits:o,fixFlashers:(e&2)!==0,model:m}}async function E(n){try{return await Z(),B1(Q(n??new Uint8Array(0)))}catch{return null}}var o1=`// R3D KOMODO entropy decode (kernel 1 of 2). One invocation per (segment, subband) job.
|
|
4
4
|
// Faithful port of decode_subband_raw in rust/media-core/src/r3d/entropy.rs.
|
|
5
5
|
// Writes RAW coefficients (scan order) straight into coeff[job*2048 ..] \u2014 the buffer must be
|
|
6
6
|
// zero-initialized; only nonzero decoded positions are written (deterministic across reruns).
|
|
@@ -333,7 +333,7 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
|
|
333
333
|
if (!(rbc + rbyc * 8 < bitLen)) { break; }
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
`;var
|
|
336
|
+
`;var c1=`// R3D KOMODO descan + dequant + 16x16 integer basis transform + scatter (kernel 2 of 2).
|
|
337
337
|
// Cooperative: ONE WORKGROUP (256 threads) per (job, subblock); deq/tmp live in shared memory,
|
|
338
338
|
// each thread computes one element of each pass. Mirrors decode_subband + scatter_subband.
|
|
339
339
|
// Dispatch is 2D; block index = wid.x + wid.y * num_workgroups.x.
|
|
@@ -407,7 +407,7 @@ fn main(@builtin(workgroup_id) wid: vec3<u32>,
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
`;var
|
|
410
|
+
`;var l1=`// R3D IPP2 develop chain (stages 1-15 of rust/media-core/src/r3d/develop.rs) on WebGPU.
|
|
411
411
|
// Production port of experiments/prores-wgsl-spike/r3d-develop/r3d-develop.wgsl with two
|
|
412
412
|
// changes: _d0 compands the entropy-lane channel planes directly (the spike read a
|
|
413
413
|
// pre-built u16 raw_pre buffer that shipping code no longer constructs \u2014 see
|
|
@@ -1009,7 +1009,7 @@ fn _d16(@builtin(global_invocation_id) g: vec3<u32>) {
|
|
|
1009
1009
|
let b = out16(3u * i + 2u) >> 8u;
|
|
1010
1010
|
outR[i] = r | (gg << 8u) | (b << 16u) | 0xFF000000u;
|
|
1011
1011
|
}
|
|
1012
|
-
`;var A1=1,P1=4,B=8,
|
|
1012
|
+
`;var A1=1,P1=4,B=8,q=64,S=128,k1=1,f1=!1;function W(n,r){return f1||(f1=!0,console.warn(`[media/gpu/r3d] GPU lane disabled after failure at ${n}; falling back to CPU:`,r)),null}var _=Math.fround;function V(n){let r=Number(n).toString();return/[.e]/.test(r)||(r+=".0"),r}function A(n){let r=_(n),e=_(n-r);return`vec2<f32>(${V(r)}, ${V(e)})`}function V1(){let n={};for(let[i,t]of Object.entries(i1))n[i]=k(t);let r="",e=(i,t)=>{r+=`const ${i}: f32 = ${V(t)};
|
|
1013
1013
|
`};e("M16",n.m16),e("LG_A",n.lg_a),e("LG_B",n.lg_b),e("LG_C",n.lg_c),e("LG_PA",n.lg_pa),e("GC_K",n.gc_k),e("GC_P",n.gc_p),e("GC_T",n.gc_t),e("SD_EPS",n.sd_eps),e("INV273",n.inv273),e("RR_C13",n.rr_c13),e("RR_C16",n.rr_c16),e("RR_C18",n.rr_c18),e("BIL_SG",n.bil_sg),e("BIL_SRB",n.bil_srb),e("SOBEL_SC",n.sobel_sc),e("RC_P",_(.1)),e("SD_STRENGTH",_(.1)),e("SD_OMS",_(1-_(.1))),e("C_1_9",_(1/9)),e("C_1_11",_(1/11)),e("C_1_13",_(1/13)),e("C_1_15",_(1/15)),e("C_1_17",_(1/17)),e("C_1_19",_(1/19)),e("C_1_21",_(1/21)),e("C_1_24",_(1/24)),e("C_1_120",_(1/120)),e("C_1_720",_(1/720)),r+=`const T7 = array<f32,7>(${Array.from({length:7},(i,t)=>V(n[`bil_t7_${t}`])).join(", ")});
|
|
1014
1014
|
`,r+=`const T9 = array<f32,9>(${Array.from({length:9},(i,t)=>V(n[`bil_t9_${t}`])).join(", ")});
|
|
1015
1015
|
`;{let i=[];for(let t=0;t<5;t++)for(let a=0;a<5;a++)i.push(V(n[`gauss55_${t}${a}`]));r+=`const GAUSS = array<f32,25>(${i.join(", ")});
|
|
@@ -1022,4 +1022,4 @@ const DD_INVLN10 = ${A(1/Math.log(10))};
|
|
|
1022
1022
|
`,r+=`const DD_INVLN2 = ${A(1/Math.log(2))};
|
|
1023
1023
|
const DD_LN2 = ${A(Math.log(2))};
|
|
1024
1024
|
`,r+=`const EXP2TAB = array<vec2<f32>,16>(${Array.from({length:16},(i,t)=>A(Math.pow(2,t/16))).join(", ")});
|
|
1025
|
-
`,
|
|
1025
|
+
`,l1.replace("//__CONSTS__",r)}var F=[{entry:"_d0",binds:{1:"PL",4:"B0"},checkpoint:null},{entry:"_d1",binds:{1:"B0",4:"B1"},checkpoint:{name:"s0",buf:"B1",words:n=>4*n}},{entry:"_d2",binds:{1:"B1",4:"B0"},checkpoint:{name:"s1",buf:"B0",words:n=>4*n}},{entry:"_d3",binds:{1:"B0",4:"SOB"},checkpoint:{name:"s2",buf:"SOB",words:n=>2*n}},{entry:"_d4",binds:{1:"B0",2:"SOB",4:"B1"},checkpoint:{name:"s3",buf:"B1",words:n=>4*n}},{entry:"_d5",binds:{1:"B1",4:"B2"},checkpoint:{name:"s4",buf:"B2",words:n=>4*n}},{entry:"_d6",binds:{1:"B2",4:"B0"},checkpoint:{name:"s5",buf:"B0",words:n=>4*n}},{entry:"_d7",binds:{1:"B0",5:"B2"},checkpoint:{name:"s6",buf:"B2",words:n=>2*n}},{entry:"_d8",binds:{1:"B1",2:"SOB",3:"B2",4:"B0"},checkpoint:{name:"s7",buf:"B0",words:n=>4*n}},{entry:"_d9",binds:{1:"B0",4:"B1"},checkpoint:{name:"s8",buf:"B1",words:n=>4*n}},{entry:"_d10",binds:{1:"B1",4:"B0"},checkpoint:{name:"s9",buf:"B0",words:n=>3*n}},{entry:"_d11",binds:{1:"B0",5:"B2"},checkpoint:null},{entry:"_d12",binds:{3:"B2",5:"SOB"},checkpoint:{name:"s10",buf:"SOB",words:n=>n}},{entry:"_d13",binds:{1:"B0",3:"SOB",4:"B1"},checkpoint:null},{entry:"_d14",binds:{1:"B1",4:"B0"},checkpoint:null},{entry:"_d15",binds:{1:"B0",7:"OUT"},checkpoint:{name:"s11",buf:"OUT",words:n=>3*n>>1},halfW:!0},{entry:"_d16",binds:{7:"OUT",8:"RGBA"},checkpoint:{name:"s12",buf:"RGBA",words:n=>n}}],N=class n{constructor(r,e,i,t,a){this.essenceBuf=null;this.essenceCap=0;this.jobsBuf=null;this.jobsCap=0;this.coeffBuf=null;this.coeffCap=0;this.frames=new Map;this.queueTail=Promise.resolve();this.device=r,this.vldPipe=e,this.xfPipe=i,this.developPipes=t,this.tabBuf=a}static async create(r){let e=async(g,p)=>{let y=r.createShaderModule({code:g}),h=(await y.getCompilationInfo()).messages.filter(x=>x.type==="error");if(h.length)throw new Error(`${p}: ${h.map(x=>`${x.lineNum}:${x.linePos} ${x.message}`).join(" | ")}`);return y},i=await e(o1,"r3d-vld"),t=await e(c1,"r3d-xform"),a=await e(V1(),"r3d-develop"),o=(g,p)=>r.createComputePipelineAsync({layout:"auto",compute:{module:g,entryPoint:p}}),[b,m,...f]=await Promise.all([o(i,"main"),o(t,"main"),...F.map(g=>o(a,g.entry))]),v=r.createBuffer({size:1920*4,usage:S|B}),u=new Uint32Array(1920);return u.set(r1,0),u.set(e1,1024),u.set(t1,1088),u.set(a1,1152),u.set(new Uint32Array(j.buffer,j.byteOffset,256),1408),r.queue.writeBuffer(v,0,u),new n(r,b,m,f,v)}run(r,e){let i=this.queueTail.then(()=>this.decodeInner(r,e),()=>this.decodeInner(r,e));return this.queueTail=i.catch(()=>{}),i}frameBuffers(r){let e=`${r.canvasW}x${r.canvasH}`,i=this.frames.get(e);if(i)return i;let t=this.device,a=r.canvasW*r.canvasH,o=(m,f=0)=>t.createBuffer({size:m,usage:S|P1|B|f}),b={w:r.canvasW,h:r.canvasH,n:a,PL:o(4*a*4),B0:o(4*a*4),B1:o(4*a*4),B2:o(4*a*4),SOB:o(2*a*4),OUT:o(3*a*2),RGBA:o(a*4),uni:t.createBuffer({size:112,usage:q|B}),params1:t.createBuffer({size:16,usage:q|B}),params2:t.createBuffer({size:16,usage:q|B}),developBinds:[],flashCopy:{src:null,dst:null,bytes:4*a*4}};return b.flashCopy.src=b.B1,b.flashCopy.dst=b.B0,b.developBinds=F.map((m,f)=>{let v=[{binding:0,resource:{buffer:b.uni}}];for(let[u,g]of Object.entries(m.binds))v.push({binding:Number(u),resource:{buffer:b[g]}});return t.createBindGroup({layout:this.developPipes[f].getBindGroupLayout(0),entries:v})}),this.frames.set(e,b),b}growEssence(r){return(!this.essenceBuf||this.essenceCap<r)&&(this.essenceBuf?.destroy?.(),this.essenceCap=Math.max(r,this.essenceCap*2),this.essenceBuf=this.device.createBuffer({size:this.essenceCap,usage:S|B})),this.essenceBuf}growJobs(r){return(!this.jobsBuf||this.jobsCap<r)&&(this.jobsBuf?.destroy?.(),this.jobsCap=Math.max(r,this.jobsCap*2),this.jobsBuf=this.device.createBuffer({size:this.jobsCap,usage:S|B})),this.jobsBuf}growCoeff(r){return(!this.coeffBuf||this.coeffCap<r)&&(this.coeffBuf?.destroy?.(),this.coeffCap=Math.max(r,this.coeffCap*2),this.coeffBuf=this.device.createBuffer({size:this.coeffCap,usage:S|B})),this.coeffBuf}async decodeInner(r,e){let i=performance.now(),t=this.device,a=z(r),o=a.canvasW*a.canvasH,m=(t.limits??{}).maxStorageBufferBindingSize??128*1024*1024,f=a.segments.length*4,v=f*2048*4;if(4*o*4>m||v>m||r.length+16>m)throw new Error(`frame exceeds storage binding limit (${a.canvasW}x${a.canvasH}, ${f} jobs)`);let u=this.frameBuffers(a),g=new Uint32Array(256);for(let s=0;s<256;s++)g[s]=a.table512[s];t.queue.writeBuffer(this.tabBuf,1664*4,g);let p=new Uint8Array(r.length+8+3&-4);p.set(r);let y=this.growEssence(p.length);t.queue.writeBuffer(y,0,p.buffer,0,p.length),p.length<this.essenceCap&&t.queue.writeBuffer(y,p.length,new Uint8Array(Math.min(this.essenceCap-p.length,16)));let P=u1(a),h=this.growJobs(P.byteLength);t.queue.writeBuffer(h,0,P);let x=this.growCoeff(v),C=f*8;t.queue.writeBuffer(u.params1,0,new Uint32Array([f,a.canvasW,a.canvasH,o])),t.queue.writeBuffer(u.params2,0,new Uint32Array([C,a.canvasW,a.canvasH,o]));let R=e.paramsBits;{let s=new ArrayBuffer(112),c=new Uint32Array(s),l=new Float32Array(s);c[0]=a.canvasW,c[1]=a.canvasH,c[2]=o,c[3]=0,l[4]=0,l[5]=1,l[6]=k(R.exposureBits),l[7]=0;for(let d=0;d<4;d++)l[8+d]=k(R.wbBits[d]);for(let d=0;d<3;d++)l[12+d]=k(R.smatrixBits[12+d]);l[15]=0;for(let d=0;d<12;d++)l[16+d]=k(R.smatrixBits[d]);t.queue.writeBuffer(u.uni,0,s)}let g1=t.createBindGroup({layout:this.vldPipe.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:u.params1}},{binding:1,resource:{buffer:y}},{binding:2,resource:{buffer:h}},{binding:3,resource:{buffer:this.tabBuf}},{binding:4,resource:{buffer:x}}]}),p1=t.createBindGroup({layout:this.xfPipe.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:u.params2}},{binding:1,resource:{buffer:h}},{binding:2,resource:{buffer:this.tabBuf}},{binding:3,resource:{buffer:x}},{binding:4,resource:{buffer:u.PL}}]});t.pushErrorScope("out-of-memory"),t.pushErrorScope("validation");{let s=t.createCommandEncoder();s.clearBuffer(x,0,v);let c=s.beginComputePass();c.setPipeline(this.vldPipe),c.setBindGroup(0,g1),c.dispatchWorkgroups(Math.ceil(f/64)),c.end();let l=s.beginComputePass();l.setPipeline(this.xfPipe),l.setBindGroup(0,p1),l.dispatchWorkgroups(Math.ceil(C/16),16),l.end(),t.queue.submit([s.finish()])}let m1=Math.ceil(a.canvasW/16),_1=Math.ceil(a.canvasH/16),y1=Math.ceil(a.canvasW/2/16),O={},D=[],G=(s,c,l,d)=>{let Y=t.createBuffer({size:l,usage:B|A1});d.copyBufferToBuffer(c,0,Y,0,l),D.push({name:s,buf:c,bytes:l,stage:Y})},$=e.captureOnly?new Set(e.captureOnly):null,L=s=>e.captureStages===!0&&($===null||$.has(s));{let s=t.createCommandEncoder();L("planes")&&G("planes",u.PL,4*o*4,s);for(let c=0;c<F.length;c++){let l=F[c];if(!(l.entry==="_d16"&&!e.wantRgba&&!L("s12"))){if(l.entry==="_d2"&&!R.fixFlashers)s.copyBufferToBuffer(u.flashCopy.src,0,u.flashCopy.dst,0,u.flashCopy.bytes);else{let d=s.beginComputePass();d.setPipeline(this.developPipes[c]),d.setBindGroup(0,u.developBinds[c]),d.dispatchWorkgroups(l.halfW?y1:m1,_1),d.end()}l.checkpoint&&L(l.checkpoint.name)&&G(l.checkpoint.name,u[l.checkpoint.buf],l.checkpoint.words(o)*4,s)}}e.wantLog16&&G("out_log16",u.OUT,3*o*2,s),e.wantRgba&&G("out_rgba",u.RGBA,o*4,s),t.queue.submit([s.finish()])}let H=await t.popErrorScope(),K=await t.popErrorScope();if(H||K){for(let s of D)s.stage.destroy?.();throw new Error(`GPU error: ${(H??K).message}`)}let U=null,I=null,J=null;for(let s of D){await s.stage.mapAsync(k1);let c=s.stage.getMappedRange().slice(0);s.stage.unmap(),s.stage.destroy?.(),s.name==="out_log16"?U=new Uint16Array(c):s.name==="out_rgba"?I=new Uint8Array(c):s.name==="planes"?(J=new Int32Array(c),O.planes=c):O[s.name]=c}let X=s=>{if(!s)return!1;let c=new Uint32Array(s),l=Math.max(1,Math.floor(c.length/4096));for(let d=0;d<c.length;d+=l)if(c[d]!==0)return!1;return!0};if(X(U?.buffer??null)||X(I?.buffer??null))throw new Error("GPU output came back unwritten (dispatch killed?)");return{width:a.canvasW,height:a.canvasH,log16:U,rgba:I,stages:O,planes:J,wallMs:performance.now()-i}}},M=null;function d1(){return M||(M=(async()=>{try{let n=await n1();return n?await N.create(n):null}catch(n){return W("engine init",n),null}})()),M}function b1(n){return E(n)}async function M1(n,r){let e=await d1();if(!e)return null;let i=await b1(r);if(!i)return null;try{let t=await e.run(n,{paramsBits:i,wantLog16:!1,wantRgba:!0});return t?.rgba?{width:t.width,height:t.height,rgba:t.rgba}:null}catch(t){return W("rgba decode",t)}}async function N1(n,r){let e=await d1();if(!e)return null;let i=await b1(r);if(!i)return null;try{let t=await e.run(n,{paramsBits:i,wantLog16:!0,wantRgba:!1});return t?.log16?{width:t.width,height:t.height,rgb16:t.log16.subarray(0,t.width*t.height*3)}:null}catch(t){return W("rgb16 decode",t)}}export{N1 as decodeR3dRgb16Gpu,M1 as decodeR3dRgbaGpu,E as developParamsBits,z as parseR3dFrame};
|
|
@@ -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{c as l}from"./chunk-IG2X534U.js";import{Aa as v,Ba as F,H as _,Ha as f,I as S,J as P,ja as b,ka as R,xa as w}from"./chunk-QNF4NMIW.js";import"./chunk-PSANHDZM.js";var g=class{constructor(e=[]){this.ranges=[];for(let[r,n]of e)this.add(r,n)}add(e,r){if(r<=e)return;let n=[],[s,o]=[e,r];for(let[i,a]of this.ranges)a<s||i>o?n.push([i,a]):(s=Math.min(s,i),o=Math.max(o,a));n.push([s,o]),n.sort((i,a)=>i[0]-a[0]),this.ranges=n}has(e,r){return r<=e?!0:this.ranges.some(([n,s])=>n<=e&&s>=r)}missing(e,r){if(r<=e)return[];let n=[],s=e;for(let[o,i]of this.ranges)if(!(i<=s)&&(o>=r||(o>s&&n.push([s,Math.min(o,r)]),s=Math.max(s,i),s>=r)))break;return s<r&&n.push([s,r]),n}count(){return this.ranges.reduce((e,[r,n])=>e+(n-r),0)}toJSON(){return this.ranges.map(([e,r])=>[e,r])}};function N(t,e){let r=new g;for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value,i=Math.max(0,Math.max(0,Math.floor(s))-e),a=Math.floor(s+o)+e;a>i&&r.add(i,a)}return r.toJSON()}function O(t,e,r){let n=N(e,r),s=a=>n.some(([c,u])=>a>=c&&a<u),o=new Map,i=a=>{let c=o.get(a);return c||(c={part:a,structuralRanges:[],essenceRanges:[]},o.set(a,c)),c};for(let a of t.segments){let c=a.part??0;a.kind==="structural"?i(c).structuralRanges.push({offset:a.offset,length:a.length}):(a.kind==="frame"||a.kind==="gop")&&a.frame_in!=null&&s(a.frame_in)&&i(c).essenceRanges.push({offset:a.offset,length:a.length})}return[...o.values()].sort((a,c)=>a.part-c.part)}async function A(t,e){if(!!0)return null;try{let n=await(await import("./r3d-DDOTSYZH.js")).decodeR3dRgbaGpu(t,e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function p(t){return(e,r,n)=>t.parts[e].read(r,n)}function d(t){return JSON.stringify(t.parts.map(e=>({name:e.filename,size:e.fileSize})))}function L(t,e){let r=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value;r.push({frame_in:Math.max(0,Math.floor(s)),frame_out:Math.floor(s+o),handles:e})}return JSON.stringify(r)}var k=16,h=new WeakMap,J=new WeakMap;function x(t){let e=J.get(t);return e||(e=t.parts[0].read(0,Math.min(16*1024,t.parts[0].fileSize)),J.set(t,e)),e}async function D(t){let e=h.get(t);return e||(await f(),e=JSON.parse(await b(p(t),d(t))),h.set(t,e)),e}async function G(t){await f();let e=await b(p(t),d(t));return h.set(t,JSON.parse(e)),e}function B(t,e){h.set(t,JSON.parse(e))}async function C(t,e){let r=JSON.parse(await R(p(t),d(t)));return{v:1,container:"r3d",codec:"redcode",frame_count:e.frame_count,granularity:"frame",...t.parts.length>1?{part_names:t.parts.map(n=>n.filename.split(/[/\\]/).pop()??n.filename)}:{},segments:r}}var V={async inspect(t){await f();let e=await w(p(t),d(t)),r=JSON.parse(e);if(!r||r.frame_count===0)return null;let n=t.parts[0],s=r.timecode??null,o=s&&s.fps_denominator>0?s.fps_numerator/s.fps_denominator:null,i=r.width??null,a=r.height??null;return{id:n.filename,kind:"external",target_url:n.filename,available_range:o&&r.frame_count?{start:{value:0,rate:o},duration:{value:r.frame_count,rate:o}}:null,reel_name:r.reel??null,source_timecode:s?.display??null,source_fps:o,source_resolution_w:i,source_resolution_h:a,container:"r3d",codec:"redcode",size_bytes:r.file_size,streams:[{kind:"video",codec:"redcode",width:i??void 0,height:a??void 0,rate:o??void 0,bit_depth:k,codec_specific:{fourcc:r.codec_fourcc??"REDCODE"}}],decode_provenance:r.decode_provenance??null,vendor_metadata:{frame_count:r.frame_count,...s?{drop_frame:s.drop_frame}:{}},binding_state:"unbound",raw_extraction:{r3d_probe:r},metadata:{}}},async extract(t){await f();let e=JSON.parse(await w(p(t),d(t)));return!e||e.frame_count===0?null:C(t,e)},async sparsify(t,e){await f();let r=JSON.parse(await R(p(t),d(t))),n={v:1,container:"r3d",codec:"redcode",frame_count:r.filter(o=>o.kind==="frame").length,granularity:"frame",segments:r},s=new Map;for(let o of r)o.kind==="frame"&&s.set(o.part??0,(s.get(o.part??0)??0)+1);return O(n,e.items,e.handles).map(o=>({filename:t.parts[o.part].filename,fileSize:t.parts[o.part].fileSize,structuralRanges:o.structuralRanges,essenceRanges:o.essenceRanges,frameCount:s.get(o.part)??0,keptFrames:o.essenceRanges.length}))},async trim(t,e){await f();let r=t.parts.some(a=>a.dataRanges!==void 0),n=r?JSON.stringify(t.parts.map(a=>a.dataRanges??[])):"[]",s=r?"[]":L(e.items,e.handles),o=await F(p(t),d(t),s,n);return JSON.parse(o).parts.map(a=>a.trim_plan)},async decode(t,e,r){await f();let n=await D(t);if(e<0||e>=n.length)throw new l(e,n.length);let s=n[e],o=s.part??0,i=t.parts[o];if(!i)throw new l(e,n.length);let a=await i.read(s.essenceOffset,s.essenceLength),c=2,u=await x(t),m;if(r.detail==="coarse")m=_(a,u,0);else if(v(a))m=_(a,u,c);else{let y=await A(a,u);if(y)return y;m=P(a,u)}let M=new DataView(m.buffer,m.byteOffset,8);return{width:M.getUint32(0,!0),height:M.getUint32(4,!0),rgba:m.slice(8)}},async decode16(t,e){await f();let r=await D(t);if(e<0||e>=r.length)throw new l(e,r.length);let n=r[e],s=t.parts[n.part??0];if(!s)throw new l(e,r.length);let o=await s.read(n.essenceOffset,n.essenceLength),i=S(o),a=new DataView(i.buffer,i.byteOffset,8),c=a.getUint32(0,!0),u=a.getUint32(4,!0),m=i.slice(8);return{width:c,height:u,rgb16:new Uint16Array(m.buffer,m.byteOffset,c*u*3)}}};export{G as listR3dFramesJson,V as r3dFormat,B as seedR3dFramesJson};
|
|
@@ -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,f}from"./chunk-S5AOIOTT.js";import"./chunk-ROGMKTND.js";import"./chunk-GTPTZRO6.js";import"./chunk-PSANHDZM.js";export{b as APPLIED,a as BACKUP_SUFFIX,e as applyPatch,c as patchFolders,d as planPatch,f as undoPatch};
|
|
@@ -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,b,c,d,e,f}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f}from"./chunk-VFXMP7IF.js";import"./chunk-BBCQMZQN.js";import"./chunk-PSANHDZM.js";export{c as formatForFile,b as partFromByteSource,a as partFromFile,d as sourceFromFile,e as sourceFromFiles,f as sourceFromParts};
|
|
@@ -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 l,f as o,g as m}from"./chunk-JV7TZDKJ.js";import{a as s}from"./chunk-
|
|
3
|
+
import{a as l,f as o,g as m}from"./chunk-JV7TZDKJ.js";import{a as s}from"./chunk-BBCQMZQN.js";import"./chunk-PSANHDZM.js";var h=e=>{let t=e.split(/[/\\]/).pop()??"",i=t.lastIndexOf(".");return i>0?t.slice(i+1).toLowerCase():""};async function f(e,t){try{if(e==="dpx"){let r=await(await import("./dpx-wasm-OQVTNGOB.js")).inspectDpxWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="exr"){let r=await(await import("./exr-wasm-72YZFOME.js")).inspectExrWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="dng"){let r=await(await import("./dng-wasm-5RQBGYAK.js")).inspectDngWasm(t);return r?{width:r.width,height:r.height}:null}if(e==="cr3"){let r=await(await import("./cr3-wasm-VUEEZYKQ.js")).inspectCr3Wasm(t);return r?{width:r.width,height:r.height}:null}if(e==="tif"||e==="tiff"){let r=await(await import("./tiff-wasm-6APT7FYP.js")).inspectTiffWasm(t);return r?{width:r.width,height:r.height}:null}let i=await import("./still-wasm-6YLI6NQQ.js"),n=await i.inspectPhotoRawWasm(e,t);if(n)return{width:n.width,height:n.height};let a=await i.decodeStillWasm(e,t);return a?{width:a.width,height:a.height}:null}catch{}return null}async function p(e){if(typeof createImageBitmap!="function"||typeof Blob>"u")return null;try{let t=await createImageBitmap(new Blob([e])),i={width:t.width,height:t.height};return t.close?.(),i.width>0&&i.height>0?i:null}catch{return null}}async function c(e){let t=h(e.filename),i=await m(t,o(e));if(i)return i;let n=s(t);if(n===null||n==="none")return null;let a;try{a=await e.read(0,e.fileSize)}catch{return null}return n==="wasm-decoder"?await f(t,a):await p(a)}function u(e){let t=l(e);return t==="jpg"?"jpeg":t==="tif"?"tiff":t||"still"}var R={async inspect(e){let t=e.parts[0],i=await c(t);return{id:t.filename,kind:"external",content_kind:"still",target_url:t.filename,available_range:null,reel_name:null,source_timecode:null,container:l(t.filename)||"still",codec:u(t.filename),size_bytes:t.fileSize,bitrate_bps:null,source_resolution_w:i?.width??null,source_resolution_h:i?.height??null,source_pixel_aspect:i?1:null,streams:[],vendor_metadata:{},binding_state:"unbound",raw_extraction:{},metadata:{}}},async extract(e){let t=e.parts.map((i,n)=>({kind:"frame",part:n,offset:0,length:i.fileSize,frame_in:n,frame_out:n}));return t.length===0?null:{v:1,container:l(e.parts[0].filename)||"still",codec:u(e.parts[0].filename),frame_count:t.length,granularity:"frame",segments:t,...e.parts.length>1?{part_names:e.parts.map(i=>i.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{R as stillFormat};
|
|
@@ -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 s}from"./chunk-
|
|
3
|
+
import{a as s}from"./chunk-OSUIS4JU.js";import{Ga as i,Ha as a}from"./chunk-QNF4NMIW.js";import"./chunk-PSANHDZM.js";var u={dpx:"dpx",tif:"tiff",tiff:"tiff",exr:"exr",j2c:"j2k",j2k:"j2k",jp2:"j2k",jph:"j2k",dng:"dng",cr3:"cr3",cr2:"cr2",arw:"arw",psd:"psd",tga:"tga",heic:"heic",heif:"heic",png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",bmp:"bmp",webp:"webp"};function l(e){return Object.prototype.hasOwnProperty.call(u,(e??"").toLowerCase())}var d=e=>{let n=i[e];return typeof n=="function"?n:void 0};async function g(e,n){let r=e.toLowerCase();if(r!=="arw"&&r!=="cr2")return null;await a();let t=i[`inspect_${r}`];if(typeof t!="function")return null;let o=t(n);return o==="null"?null:JSON.parse(o)}async function m(e,n,r=1){let t=u[e.toLowerCase()];if(!t)return null;await a();try{let o=r>1?d(`decode_${t}_preview`):void 0;if(o)return s(o(n,r));let c=d(`decode_${t}_rgba`);return c?s(c(n)):null}catch{return null}}export{u as STILL_WASM_BASE,m as decodeStillWasm,l as hasStillWasm,g as inspectPhotoRawWasm};
|
|
@@ -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 a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-
|
|
3
|
+
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-CRMGV32N.js";import"./chunk-JTRM2JCE.js";import"./chunk-NN444GPH.js";import"./chunk-ROGMKTND.js";import"./chunk-GTPTZRO6.js";import"./chunk-PSANHDZM.js";export{a as createSession,g as getExtra,c as getSession,b as lastSessionId,e as listSessions,f as saveExtra,d as updateSession};
|
|
@@ -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}from"./chunk-RITYQNOO.js";import"./chunk-QNF4NMIW.js";import"./chunk-PSANHDZM.js";export{b as decodeTiffWasm,a as inspectTiffWasm};
|
|
@@ -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{$b as l,Qb as a,Rb as b,Sb as c,Tb as d,Ub as e,Vb as f,Wb as g,Xb as h,Yb as i,Zb as j,_b as k,ac as m,bc as n,cc as o,dc as p,ec as q,fc as r,gc as s,hc as t}from"./chunk-VCBLWNQR.js";import"./chunk-IN6XVTUS.js";import"./chunk-P4PCSGEH.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-TWHNQFKI.js";import"./chunk-UBWUED67.js";import"./chunk-73RFYAVG.js";import"./chunk-STGGRRYM.js";import"./chunk-MVQ5RGZB.js";import"./chunk-RITYQNOO.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-MTAXVOHK.js";import"./chunk-YGAAGTLE.js";import"./chunk-IG2X534U.js";import"./chunk-T7S2UBNN.js";import"./chunk-M5CEBOLK.js";import"./chunk-LVGGCRDW.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-QNF4NMIW.js";import"./chunk-CRMGV32N.js";import"./chunk-JTRM2JCE.js";import"./chunk-NN444GPH.js";import"./chunk-ROGMKTND.js";import"./chunk-GTPTZRO6.js";import"./chunk-PSANHDZM.js";export{j as OPERATION_KINDS,a as READ_FORMATS,k as applyOperation,m as applyOperationWithSources,s as consolidate,b as detectFormat,d as detectTimelineFormat,t as judge,r as linkText,g as listClips,i as listFlags,h as listMedia,e as readTimeline,n as resolveTarget,q as routesText,c as sniffFormat,f as summarize,l as trackIndex,p as writeDestination,o as writeTimeline};
|
|
@@ -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{Ha as u,ba as _,la as f,sa as d,va as g}from"./chunk-QNF4NMIW.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.6.
|
|
3
|
+
"version": "0.6.17",
|
|
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",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"conformtools-darwin-arm64": "0.6.
|
|
48
|
-
"conformtools-darwin-x64": "0.6.
|
|
49
|
-
"conformtools-linux-x64": "0.6.
|
|
50
|
-
"conformtools-windows-x64": "0.6.
|
|
47
|
+
"conformtools-darwin-arm64": "0.6.17",
|
|
48
|
+
"conformtools-darwin-x64": "0.6.17",
|
|
49
|
+
"conformtools-linux-x64": "0.6.17",
|
|
50
|
+
"conformtools-windows-x64": "0.6.17"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/dist/bridge-UPSJ7F3S.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{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-HOACOBAY.js";import"./chunk-RVZQ3Y6N.js";import"./chunk-X527E5VI.js";import"./chunk-PSANHDZM.js";export{c as BridgeError,g as HostBridge,e as PANEL_PREFIX,b as PORTS,a as PROTOCOL,h as hostBridge,d as pairingPath,f as panelOrigins,i as resetHostBridge};
|
package/dist/chunk-DKGGJM6Z.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
|
-
function a(e){if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint32(0,!0),r=t.getUint32(4,!0),u=n*r*4;return e.length<8+u?null:{width:n,height:r,rgba:new Uint8ClampedArray(e.subarray(8,8+u))}}function i(e,t){let n=e[t];return typeof n=="function"?n:void 0}export{a,i as b};
|
package/dist/chunk-DLF5AKXT.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as R}from"./chunk-PFZVET7S.js";import{b as he,c as be,f as ge}from"./chunk-6V4OEOOX.js";import{f as K,h as fe}from"./chunk-XDI6CPPV.js";import{a as pe}from"./chunk-UKXSKFL3.js";import{i as D}from"./chunk-4RA57LTJ.js";import{b as M,d as z,f as F}from"./chunk-NU3X7P4N.js";import{Ia as de,ea as se,fa as ae,ja as ce,oa as le,wa as ue,xa as me}from"./chunk-DPA26AOI.js";import{a as ie}from"./chunk-ROGMKTND.js";import{$ as y,B as W,G as L,M as v,N as C,O as ne,R as oe,_ as b,aa as J,b as O,ba as _,c as Z,d as Q,g as q,k as ee,l as re,s as H,t as B,v as te,w as A,z as j}from"./chunk-X527E5VI.js";var V=!1;var P=8,Pe=0,Ee=3,N=2;async function Oe(e){let t=new Uint8Array(await e.slice(0,16).arrayBuffer()),o=s=>String.fromCharCode(t[s],t[s+1],t[s+2],t[s+3]);if(t[0]===6&&t[1]===14&&t[2]===43&&t[3]===52)return"mxf";if(o(4)==="RED1"||o(4)==="RED2")return"r3d";let r=t[0]<<24|t[1]<<16|t[2]<<8|t[3],i=o(4);return/^[A-Za-z0-9 ]{4}$/.test(i)&&(r>=8||r===1)&&r<=e.size?"isobmff":null}function Ae(e){let t=e.toLowerCase();return t.endsWith(".braw")?"braw":t.endsWith(".crm")?"crm":"mov"}function Ce(e){return async(t,o)=>new Uint8Array(await e.slice(t,Math.min(t+o,e.size)).arrayBuffer())}function we(e){let t=e.timecode;return!t||!t.fps_denominator?null:t.fps_numerator/t.fps_denominator}async function ir(e){return await de(),_e?_e.clip(e,V?"rec709":"",()=>ye(e)):ye(e)}var _e=null;async function ye(e){let t=await Oe(e),o=[];if(t==="r3d"){let r=e,i=r.parts&&r.bases?r.parts:[{name:e.name,size:e.size}],n=r.bases??[0],s=async(m,u,d)=>{let f=n[m]+u;return new Uint8Array(await e.slice(f,Math.min(f+d,n[m]+i[m].size)).arrayBuffer())},a=JSON.stringify(i.map(m=>({name:m.name,size:m.size}))),c=JSON.parse(await me(s,a)),l=JSON.parse(await ce(s,a));return i.length===1&&/_\d{3}\.r3d$/i.test(e.name)&&!/_001\.r3d$/i.test(e.name)&&o.push("spanned R3D part \u2014 only this part's frames are indexed"),{frames:l.map(m=>({offset:n[m.part??0]+m.essenceOffset,size:m.essenceLength})),w:c.width??0,h:c.height??0,fps:we(c),startFrame:c.timecode?.start_frame??0,dropFrame:c.timecode?.drop_frame??!1,label:"R3D",spec:{codec:"r3d",subbands:Pe},geometrySpec:{codec:"r3d",subbands:Ee},index:null,warnings:o}}if(t==="mxf"){let r=Ce(e),i=JSON.parse(await ue(r,e.size));if(!i)throw new Error(`${e.name}: MXF index unreadable`);let n=JSON.parse(await le(r,e.size)),s=[];for(let f=0;f<n.frame_count;f++)s.push({offset:n.frames[f*2],size:n.frames[f*2+1]});let a=s.filter(f=>f.size===0).length;a&&o.push(`${a} frame(s) had no locatable picture KLV`);let c=i.width??0,l=i.height??0,m=(i.inner_codec??"").toLowerCase(),u=null,d="MXF";return m==="arriraw"?(u={codec:"arriraw",w:c,h:l,scale:P},d="ARRIRAW"):m==="xocn"?(u={codec:"xocn",scale:P,...V?{display:"rec709"}:{}},d="X-OCN"):await ae(r,e.size)?(u={codec:"vc3",scale:P},d="DNxHR"):await se(r,e.size)?(u={codec:"prores"},d="ProRes"):o.push(`MXF inner codec ${m||"unknown"} not wired to the fingerprint pool`),{frames:u?s:[],w:c,h:l,fps:we(i),startFrame:i.timecode?.start_frame??0,dropFrame:i.timecode?.drop_frame??!1,label:d,spec:u,geometrySpec:u&&u.codec==="arriraw"?{...u,scale:N}:u&&u.codec==="xocn"?{codec:"xocn",scale:N,...V?{display:"rec709"}:{}}:u&&u.codec==="vc3"?{codec:"vc3",scale:N}:null,index:null,warnings:o}}if(t==="isobmff"){let r=await fe(e),i=Ae(e.name);if(r.kind==="prores")return{frames:r.offs,w:r.w,h:r.h,fps:r.fps,startFrame:r.startFrame,dropFrame:r.dropFrame,label:K(r.kind),spec:{codec:"prores"},geometrySpec:null,index:r,warnings:o};if(r.kind==="h264"||r.kind==="hevc")return{frames:r.offs,w:r.w,h:r.h,fps:r.fps,startFrame:r.startFrame,dropFrame:r.dropFrame,label:K(r.kind),spec:null,geometrySpec:null,index:r,warnings:o};let n=i==="braw"?{codec:"braw",scale:P}:r.codec==="aprh"||r.codec==="aprn"?{codec:"proresraw",scale:P}:null;return n||o.push(`codec ${r.codec} not wired to the fingerprint pool`),{frames:n?r.offs:[],w:r.w,h:r.h,fps:r.fps,startFrame:r.startFrame,dropFrame:r.dropFrame,label:n?i==="braw"?"BRAW":"ProRes RAW":`unsupported (${r.codec})`,spec:n,geometrySpec:n?{...n,scale:N}:null,index:r,warnings:o}}throw new Error(`${e.name}: unrecognised container`)}var De=Number(O("CONFORM_DECODERS")??0)||Math.max(2,Math.min(Math.floor(Q()/2),Math.floor(Z()/2**31))),X=0,xe=[],ze=async(...e)=>{X>=De?await new Promise(t=>xe.push(t)):X++;try{return await oe(...e)}finally{let t=xe.shift();t?t():X--}};async function Ne(){let e=q()==="win32"?"conformtools-decode.exe":"conformtools-decode",t=[O("CONFORM_NATIVE_DECODE"),ee(e),H(new URL(`./${e}`,import.meta.url)),H(new URL(`../../rust/target/release/${e}`,import.meta.url))].filter(Boolean);for(let o of t)if(await te(o))return o;return null}var $=class extends Error{constructor(o,r){super(r);this.why=o}};function Pr(e){let t=null;try{t=JSON.parse(e.trim().split(`
|
|
4
|
-
`).pop())}catch{}if(t?.why==="not_entitled")throw new ie("not_entitled",t.detail??"this machine is not licensed");return t?.detail??e.trim()}function Te(e,t){try{let o=JSON.parse(e.trim().split(`
|
|
5
|
-
`).pop()??"");return new $(o.why,o.detail)}catch{return new $("decoder",`the native decoder exited ${t}: ${e.trim().slice(-300)}`)}}function Ue(e){let t=e.reduce((i,n)=>i+n.length,0),o=new Uint8Array(t),r=0;for(let i of e)o.set(i,r),r+=i.length;return o}async function $e(e,t,o,r,i){let n=await Ne();if(!n)throw new $("missing",re("the native decoder (conformtools-decode)"));let s=null,a=[],c=0,l=d=>{let f=new Uint8Array(d),h=0;for(;h<d;){let p=a[0],g=Math.min(p.length,d-h);f.set(p.subarray(0,g),h),h+=g,g===p.length?a.shift():a[0]=p.subarray(g)}return c-=d,f},m=[e,t,"--width",String(i.width??32768)];i.from!=null&&m.push("--from",String(i.from)),i.count!=null&&m.push("--count",String(i.count)),i.range&&m.push("--range",i.range);let u=await ze(n,m,d=>{if(a.push(d),c+=d.length,!s){let h=Ue(a.splice(0));a.push(h);let p=h.indexOf(10);if(p<0)return;s=JSON.parse(new TextDecoder().decode(h.subarray(0,p))),l(p+1),o(s)}let f=4+s.w*s.h*(s.bpp??(e==="rgb16"?6:4));for(;c>=f;){let h=l(f);r(new DataView(h.buffer).getUint32(0,!0),h.subarray(4))}},{signal:i.signal});if(u.code!==0||!s)throw Te(u.stderr,u.code)}function ve(e,t,o,r={}){return $e("bgra",e,t,o,r)}function Se(e,t,o,r={}){return $e("rgb16",e,t,(i,n)=>o(i,new Uint16Array(n.buffer,n.byteOffset,n.length>>1)),r)}var ke=["none","rle","zips","zip","piz","pxr24","b44","b44a","dwaa","dwab","htj2k"],T=e=>(e>>4)*10+(e&15);function Ie(e){let t=T(e&63),o=T(e>>>8&127),r=T(e>>>16&127),i=T(e>>>24&63),n=s=>String(s).padStart(2,"0");return`${n(i)}:${n(r)}:${n(o)}${e&64?";":":"}${n(t)}`}function He(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.length<8||t.getUint32(0,!0)!==20000630)return null;let o={fps:null,timecode:null,width:0,height:0,display:null,compression:null,attributes:[]},r=8,i=()=>{let s=r;for(;r<e.length&&e[r]!==0;)r++;let a=new TextDecoder().decode(e.subarray(s,r));return r++,a},n=s=>({width:t.getInt32(s+8,!0)-t.getInt32(s,!0)+1,height:t.getInt32(s+12,!0)-t.getInt32(s+4,!0)+1});for(;r<e.length;){let s=i();if(!s)break;let a=i();if(r+4>e.length)return null;let c=t.getInt32(r,!0);if(r+=4,c<0||r+c>e.length)return null;if(o.attributes.push(`${s}:${a}`),s==="framesPerSecond"&&a==="rational"&&c>=8){let l=t.getInt32(r,!0),m=t.getUint32(r+4,!0);o.fps=m?l/m:null}else s==="timeCode"&&a==="timecode"&&c>=8?o.timecode=Ie(t.getUint32(r,!0)):s==="dataWindow"&&a==="box2i"&&c>=16?{width:o.width,height:o.height}=n(r):s==="displayWindow"&&a==="box2i"&&c>=16?o.display=n(r):s==="compression"&&c>=1&&(o.compression=ke[e[r]]??`type ${e[r]}`);r+=c}return o}async function Be(e){let t=e,o=null,r=/^(.*?)\[(\d+)-(\d+)\](.*)$/.exec(b(e));if(await A(e))o=/^(.*?)(\d+)(\.exr)$/i;else{t=y(e);let n=r?[null,r[1],r[2],r[4]]:/^(.*?)(\d+)(\.exr)$/i.exec(b(e));if(!n)return{frames:[e],numbers:[]};let s=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");o=new RegExp(`^${s(n[1])}(\\d{${n[2].length}})${s(n[3])}$`,"i")}let i=[];for await(let n of v(t)){let s=n.isFile?o.exec(n.name):null;s&&i.push({n:Number(s[s.length===4?2:1]),f:_(t,n.name)})}return i.sort((n,s)=>n.n-s.n),{frames:i.map(n=>n.f),numbers:i.map(n=>n.n)}}async function Re(e){let t=await Be(e),o=t.frames[0];if(!o)throw new Error(`no .exr frames for '${b(e)}'`);let r=await C(o),i;try{i=He(await r.readAt(0,Math.min(r.size,1<<20)))}finally{await r.close()}if(!i)throw new Error(`'${b(o)}' is not an OpenEXR file`);let n=Math.max(1,t.frames.length),s=t.numbers.length>1?t.numbers[t.numbers.length-1]-t.numbers[0]+1-t.numbers.length:0,a=i.fps??0;return{id:b(o),kind:"external",target_url:o,local_path:o,content_kind:n>1?"video":"still",source_fps:i.fps??void 0,source_timecode:i.timecode??void 0,source_resolution_w:i.width,source_resolution_h:i.height,available_range:{start:{value:0,rate:a},duration:{value:n,rate:a}},streams:[{kind:"video",codec:"exr",width:i.width,height:i.height,rate:i.fps??void 0,codec_specific:{compression:i.compression}}],vendor_metadata:{exr:{frames:n,first_frame:t.numbers[0]??null,last_frame:t.numbers[t.numbers.length-1]??null,missing_frames:s,display_window:i.display,attributes:i.attributes,fps_source:i.fps!=null?"header framesPerSecond":"not in the header",timecode_source:i.timecode?"header timeCode (first frame)":"not in the header"}}}}var G=new Set([".mov",".mp4",".m4v",".mxf",".wav",".braw",".crm",".r3d",".aif",".aiff"]);async function je(e){let t=await C(e);return{path:e,file:t,size:t.size}}function We(e){return(t,o)=>e.file.readAt(t,o)}async function Le(e){let t=R(b(e));if(!t)return[e];let o=y(e),r=[];for await(let i of v(o)){if(!i.isFile)continue;let n=R(i.name);n&&n.clipBase===t.clipBase&&r.push({n:n.partNumber,p:_(o,i.name)})}return r.sort((i,n)=>i.n-n.n).map(i=>i.p)}async function Y(e){if(await A(e)){let n=[];for await(let s of v(e))s.isFile&&R(s.name)&&n.push(_(e,s.name));if(!n.length)throw new Error(`'${b(e)}' is a folder with no .R3D parts`);e=n.sort()[0]}let t=be(b(e));if(!t)throw new Error(`unsupported media file '${b(e)}' (supported: ${[...G].join(" ")})`);let o=await Le(e),r=await Promise.all(o.map(je));return{source:ge(t,r.map(n=>he(b(n.path),{fileSize:n.size,read:We(n)}))),parts:r,format:t,anchor:o[0],close:()=>r.forEach(n=>n.file.close())}}async function Je(e,t,o,r){if(!/h264|avc|hevc|h265/.test(o)){let i=null,n=await Y(e);try{return await D(n.source,{verb:"decode",index:t,intent:"park"})}catch(s){i=s}finally{n.close()}try{return await Me(e,t,r)}catch(s){throw/no decoder/.test(String(i))?s:i instanceof Error?i:new Error(String(i))}}return Me(e,t,r)}async function Hr(e,t,o,r={}){if(/\.mxf$/i.test(e)&&(!o||/h264|avc|mxf/.test(o))){let a=null,c=null;try{await Se(e,l=>{a=l},(l,m)=>{l===t&&(c=m.slice())},{from:t,count:1,range:r.range})}catch(l){if(!(l instanceof $)||!/unsupported|missing/.test(l.why))throw l}if(c&&a){let l=a;return{rgb:c,width:l.w,height:l.h,bits:l.bit_depth??16,decoder:"media-core",full_range:l.full_range??null}}}let i=await Je(e,t,o),n=i.width*i.height,s=new Uint16Array(n*3);for(let a=0;a<n;a++)s[a*3]=i.rgba[a*4]*257,s[a*3+1]=i.rgba[a*4+1]*257,s[a*3+2]=i.rgba[a*4+2]*257;return{rgb:s,width:i.width,height:i.height,bits:8,decoder:"8-bit",full_range:null}}async function Me(e,t,o){t=Math.round(t);let r=0,i=0,n=null;if(await ve(e,a=>{r=a.w,i=a.h},(a,c)=>{a===t&&(n=c)},{from:t,count:1,width:o}),!n)throw new Error(`the OS decoder returned no frame ${t} of ${b(e)}`);let s=n;for(let a=0;a<s.length;a+=4){let c=s[a];s[a]=s[a+2],s[a+2]=c}return{rgba:s,width:r,height:i}}async function E(e){if(/\.exr$/i.test(e))return Re(e);let t=await Y(e);try{let o=await D(t.source,{verb:"inspect"});if(!o)throw new Error(`could not read '${b(e)}' as ${t.format}`);return o.target_url=t.anchor,o.local_path=t.anchor,o.id=o.id||b(t.anchor),t.parts.length>1&&((o.vendor_metadata??={}).spanned_parts=t.parts.map(r=>b(r.path))),o.size_bytes=t.parts.reduce((r,i)=>r+i.size,0),o}finally{t.close()}}function Ke(e,t,o,r){let i=Math.abs(r*1001-Math.round(r*1001/1e3)*1e3)<1?Math.round(r)*1e3/1001:r,n=Math.floor(e*i/t+1e-6);return{tc:M(n,r),frames:Math.round(o*i/t)}}var Ve=e=>String(Math.round(e*1e3)/1e3);function Br(e,t){let o=e.streams?.find(u=>u.kind==="video"),r=e.streams?.filter(u=>u.kind==="audio")??[],i=e.vendor_metadata?.bext;if(!o&&e.available_range&&r[0]?.rate){let u=r[0].rate,d=e.available_range.duration.value,h=(t?[t]:[24e3/1001,24]).map(p=>{let g=Ke(i?.time_reference??0,i?.sample_rate||u,d,p);return`${i?`start TC ${g.tc}, `:""}${g.frames} frames @ ${Ve(p)} fps`});return[e.target_url??"",`audio only; ${d} samples (${(d/u).toFixed(3)} s)${i?`; BWF time_reference ${i.time_reference}`:"; no BWF timecode"}`,...h,...t?[]:["(pass fps for the project's rate)"],...r.map((p,g)=>`audio ${r.length>1?`${g+1}: `:""}${p.codec??"pcm"} ${p.channels??"?"}ch ${p.rate} Hz ${p.bit_depth??"?"}-bit`)].join(`
|
|
6
|
-
`)}let n=e.available_range?.duration?.value??e.declared_duration?.value??null,s=e.source_fps??o?.rate??null,a=e.size_bytes,c=e.vendor_metadata?.spanned_parts,l=o?.codec_specific??{},m=[l.profile?`${l.profile} (${l.fourcc})`:l.fourcc,l.pixel_format,o?.bit_depth?`${o.bit_depth}-bit`:null,l.colr?`color ${l.colr.primaries}/${l.colr.transfer}/${l.colr.matrix} (primaries/transfer/matrix)`:null].filter(Boolean).join(", ");return[e.target_url??"",o?`${o.codec??"?"} ${o.width??"?"}x${o.height??"?"}${s?` @ ${Math.round(s*1e3)/1e3} fps`:""}${m?`; ${m}`:""}`:"no video track",`start TC ${e.source_timecode??"none"}; ${n!=null?`${n} frames`:"length unknown"}${n!=null&&s?` (${(n/s).toFixed(2)} s)`:""}`,r.length?r.map((u,d)=>{let f=u.codec_specific?.channel_layout;return`audio ${r.length>1?`${d+1}: `:""}${u.codec??"pcm"} ${u.channels??"?"}ch${f?` (${f})`:""} ${u.rate??"?"} Hz ${u.bit_depth??"?"}-bit`}).join(`
|
|
7
|
-
`):"no audio",`${e.reel_name?`reel ${e.reel_name}; `:""}${a!=null?`${(a/1e6).toFixed(1)} MB`:""}${c?`; spanned ${c.length} parts`:""}`].join(`
|
|
8
|
-
`)}var Xe=8*1024*1024,U=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0));async function Ge(e,t,o){if(e.executable_locally===!1)throw new Error("this trim plan is server-side only");let r=new Map(t.parts.map(n=>[b(n.path),n]));await W(y(o));let i=await ne(o);try{await i.truncate(e.total_size),await i.writeAt(0,U(e.dest_header_bytes_base64));for(let n of e.src_byte_ranges){let s=n.src_file_name?r.get(b(n.src_file_name)):t.parts[0];if(!s)throw new Error(`plan references unknown source part '${n.src_file_name}'`);let a=0;for(;a<n.length;){let c=Math.min(Xe,n.length-a),l=await s.file.readAt(n.offset+a,c);if(l.length<c)throw new Error(`short read in ${b(s.path)} at ${n.offset+a}`);await i.writeAt(n.write_to_dest_offset+a,l),a+=c}}e.dest_footer_bytes_base64&&e.dest_footer_offset!=null&&await i.writeAt(e.dest_footer_offset,U(e.dest_footer_bytes_base64));for(let n of e.dest_patches??[])await i.writeAt(n.offset,U(n.bytes_base64))}finally{await i.close()}for(let n of e.dest_sidecar_writes??[])await j(_(y(o),n.name),U(n.bytes_base64))}function Ye(e,t){let o=[];for(let r of e){if(r.kind!=="clip"||!r.source_range)continue;let i=r.source_range.start.value,n=r.source_range.duration.value,s=Math.max(0,Math.floor(i)-t),a=Math.floor(i+n-1)+t;a>=s&&o.push({first_frame:s,last_frame:a})}return pe(o)}async function Ze(e,t,o,r,i){let n=await Y(e);try{let s=Ye(t,o);if(!s.length)throw new Error("no usable frame ranges (items need kind=clip with source_range)");let a=await D(n.source,{verb:"trim",selection:{items:t,handles:o}}),c=J(n.anchor),l=n.format==="r3d",m=l?R(b(n.anchor))?.clipBase??b(n.anchor,c):b(n.anchor,c),u=[];for(let[d,f]of a.entries()){let h=f.output_clip_number??(s.length>1?d+1:void 0),p=s[(h??1)-1]??s[0],g=h&&(f.output_clip_count??s.length)>1?`_S${String(h).padStart(3,"0")}`:"",w;if(l){let x=f.output_part_number??d+1;w=_(r,`${m}${g}.RDC`,`${m}_${String(x).padStart(3,"0")}.R3D`),u.push({path:w,bytes:f.total_size,island:p,part:x,clip:h})}else{let x=i&&a.length===1?i:`${m}${g||`_trim_${p.first_frame}-${p.last_frame}`}${c}`;w=_(r,x),u.push({path:w,bytes:f.total_size,island:p,clip:h})}await Ge(f,n,w)}return l||await Qe(e,u,!!i&&a.length===1),{outputs:u,islands:s,format:n.format}}finally{n.close()}}async function Qe(e,t,o){let r=await E(e).catch(()=>null),i=r?.source_fps??r?.streams?.find(n=>n.kind==="video")?.rate??null;if(!(!r?.source_timecode||!i))for(let n of t){if(!n.island)continue;let s=await E(n.path).catch(()=>null),a=s?.available_range?.duration?.value??s?.declared_duration?.value;if(!s?.source_timecode||!a)continue;let c=F(s.source_timecode,i,r.source_timecode);if(c===n.island.first_frame&&c+a-1===n.island.last_frame||(n.island={first_frame:c,last_frame:c+a-1},o))continue;let l=n.path.replace(/_trim_\d+-\d+(\.[^./\\]+)$/,`_trim_${c}-${c+a-1}$1`);l!==n.path&&(await L(n.path,l),n.path=l)}}async function jr(e){let t=await E(e.path),o=t.source_fps??t.streams?.find(g=>g.kind==="video")?.rate??null,r=t.available_range?.duration?.value??t.declared_duration?.value??null;if(!o)throw new Error("cannot trim: no frame rate / timecode track on this file");let i=F(e.in,o,t.source_timecode??null),n=F(e.out,o,t.source_timecode??null);e.out_exclusive&&(n-=1);let s=t.source_timecode??"00:00:00:00",a=r!=null?M((z(s,o)??0)+r-1,o,!!t.vendor_metadata?.drop_frame):null;if(n<i)throw new Error(`out ${e.out} is before in ${e.in}`);if(i<0)throw new Error(`in ${e.in} is before the file starts (${s}, frame 0)`);if(r!=null&&n>r-1)throw new Error(`out ${e.out} is past the end of the file (last frame ${a}, frame ${r-1})`);let c={id:"trim",kind:"clip",source_range:{start:{value:i,rate:o},duration:{value:n-i+1,rate:o}}},l=y(e.path),m;if(e.out_path)try{(await B(e.out_path)).isDirectory?l=e.out_path:(l=y(e.out_path),m=b(e.out_path))}catch{l=y(e.out_path),m=b(e.out_path)}let u=await Ze(e.path,[c],Math.max(0,Math.floor(e.handles??0)),l,m),d=u.islands[0],f=u.outputs.length===1&&u.outputs[0].island?u.outputs[0].island:d,h=f.first_frame,p=f.last_frame;return{outputs:u.outputs,first_frame:h,last_frame:p,frames:p-h+1,fps:o,facts:t,...h!==d.first_frame||p!==d.last_frame?{asked:{first_frame:d.first_frame,last_frame:d.last_frame}}:{}}}function Fe(e){let t=[...G].map(o=>o.slice(1)).join("|");return e.toLowerCase().replace(new RegExp(`\\.(${t})(?=[._\\s-]|$)`,"g"),"").replace(/[^a-z0-9]/g,"")}function qe(e,t){let o=Fe(e),r=Fe(t);if(r&&o.includes(r))return"name";let i=t.toLowerCase().split(/[^a-z0-9]+/).filter(n=>/\d/.test(n)&&n.length>=3);return i.length&&i.every(n=>o.includes(n))?"id":null}async function Wr(e,t,o){let r=[],i=0,n=null,s=Date.now()+o.time_limit_s*1e3,a=async(c,l)=>{try{for await(let m of v(c)){if(n&&!n.startsWith("folders"))return;if(++i>o.max_entries){n=`stopped after ${o.max_entries} entries (max_entries)`;return}if(Date.now()>s){n=`stopped after ${o.time_limit_s} s (time_limit_s)`;return}if(m.name.startsWith("."))continue;let u=_(c,m.name);if(m.isDirectory)l<o.max_depth?await a(u,l+1):n??=`folders deeper than max_depth=${o.max_depth} not searched (e.g. ${u})`;else if(m.isFile&&G.has(J(m.name).toLowerCase())){let d=qe(m.name,t);d&&r.push({path:u,match:d,size:(await B(u).catch(()=>({size:0}))).size})}}}catch{}};if(await a(e,0),o.probe)for(let c=0;c<r.length;c+=8)await Promise.all(r.slice(c,c+8).map(async l=>{try{l.facts=await E(l.path)}catch(m){l.error=m.message}}));return r.sort((c,l)=>c.path.localeCompare(l.path)),{hits:r,scanned:i,truncated:n}}function er(e){let t=e.streams?.find(a=>a.kind==="video"),o=e.source_fps??t?.rate??null,r=e.available_range?.duration?.value??e.declared_duration?.value??null,i=t?.codec_specific??{},n=e.source_timecode&&o?z(e.source_timecode,o):null,s=n!=null&&r!=null&&o?M((n+r)%(Math.round(o)*86400),o,e.source_timecode.includes(";")):null;return`${t?`${t.codec??"?"}${i.profile?` ${i.profile}`:""} ${t.width??"?"}x${t.height??"?"}`:"no video"}${o?` @ ${Math.round(o*1e3)/1e3} fps`:""}; TC ${e.source_timecode??"none"}${s?`\u2013${s}`:""}; ${r??"?"} fr${r!=null&&o?` (${(r/o).toFixed(2)} s)`:""}`}function Lr(e,t,o,r){let i=e.hits.slice(0,r),n=[];e.truncated&&n.push(`TRUNCATED: ${e.truncated} \u2014 the search did NOT cover all of ${t}; the matches below may be incomplete.`),e.hits.length>i.length&&n.push(`TRUNCATED: showing ${i.length} of ${e.hits.length} matches. Pass limit=${e.hits.length} or narrow the query.`),n.push(`${e.hits.length} file${e.hits.length===1?"":"s"} match "${o}" under ${t} (${e.scanned} entries scanned)`);let s=new Map;for(let c of e.hits)s.set(b(c.path).toLowerCase(),(s.get(b(c.path).toLowerCase())??0)+1);let a=[...s].filter(([,c])=>c>1);a.length&&n.push(`same name in several folders: ${a.map(([c,l])=>`${c} \xD7${l}`).join(", ")} \u2014 they can be DIFFERENT clips; match by TC + duration, never by name alone`);for(let c of i)n.push(`- ${c.path}${c.match==="id"?" (id match)":""}
|
|
9
|
-
${c.facts?er(c.facts):c.error?`probe failed: ${c.error}`:`${(c.size/1e6).toFixed(1)} MB`}`);return n.join(`
|
|
10
|
-
`)}async function Jr(e,t,o=0){let r=await E(e),i=r.source_fps??r.streams?.find(d=>d.kind==="video")?.rate??null,n=r.available_range?.duration?.value??r.declared_duration?.value??null;if(!i||n==null)throw new Error(`cannot check coverage: ${b(e)} has no frame rate or length`);let s=Math.round(i)*86400,a=r.source_timecode?z(r.source_timecode,i)??0:0,c=!!r.source_timecode?.includes(";"),l=d=>{let f=F(d,i,r.source_timecode??null);return typeof d=="number"||/^\d+$/.test(d.trim())?f:f<-s/2?f+s:f>s/2?f-s:f},m=d=>M(((a+d)%s+s)%s,i,c),u=t.map((d,f)=>{let h=l(d.in),p=l(d.out),g=h,w=n-p,x=g>=0&&w>=0&&p>h,k=Math.max(0,-g),I=Math.max(0,-w),S=[];return p<=h?S.push("out is not after in"):x?S.push(`covered; handles head ${g} / tail ${w} fr`):S.push(`NOT covered: short ${[k?`${k} fr at head`:"",I?`${I} fr at tail`:""].filter(Boolean).join(", ")}`),x&&o&&(g<o||w<o)&&S.push(`handles short of ${o}: ${[g<o?`head by ${o-g}`:"",w<o?`tail by ${o-w}`:""].filter(Boolean).join(", ")}`),{label:d.label??`range ${f+1}`,in_tc:m(h),out_tc:m(p),frames:p-h,covered:x,head:g,tail:w,short_head:k,short_tail:I,note:S.join("; ")}});return{facts:r,rows:u}}export{ir as a,Ne as b,Pr as c,ve as d,Be as e,G as f,Le as g,Y as h,Je as i,Hr as j,E as k,Ke as l,Br as m,Ye as n,Ze as o,jr as p,Fe as q,qe as r,Wr as s,er as t,Lr as u,Jr as v};
|
package/dist/chunk-EEDLRRKU.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{a as c,b as m}from"./chunk-DKGGJM6Z.js";import{Ga as u,Ia as t,Y as s,q as d}from"./chunk-DPA26AOI.js";async function h(r){await t();let e=s(r);return e==="null"?null:JSON.parse(e)}async function g(r){await t();let e;try{e=d(r)}catch{return null}if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(0,!0),a=n.getUint32(4,!0),o=i*a*4;return e.length<8+o?null:{width:i,height:a,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await t();let n=m(u,"decode_dng_preview");if(!n)return g(r);try{return c(n(r,e))}catch{return null}}export{h as a,g as b,y as c};
|
package/dist/chunk-IDJIOKXA.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 r,d as t}from"./chunk-6V4OEOOX.js";import{i as n}from"./chunk-4RA57LTJ.js";async function d(e){if(!r(e.name))return null;try{return await n(t(e),{verb:"inspect"})}catch(i){return console.warn(`[probeMedia] ${e.name} probe failed:`,i),null}}export{d as a};
|
package/dist/chunk-ISKNIQVO.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{a as s,b as m}from"./chunk-DKGGJM6Z.js";import{Ga as d,Ia as n,Z as c,r as u}from"./chunk-DPA26AOI.js";async function x(r){await n();let e=c(r);return e==="null"?null:JSON.parse(e)}async function p(r){await n();let e;try{e=u(r)}catch{return null}if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t.getUint32(0,!0),i=t.getUint32(4,!0),o=a*i*4;return e.length<8+o?null:{width:a,height:i,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await n();let t=m(d,"decode_dpx_preview");if(!t)return p(r);try{return s(t(r,e))}catch{return null}}export{x as a,p as b,y as c};
|
package/dist/chunk-JKOB3U54.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{a as m,b as l}from"./chunk-DKGGJM6Z.js";import{Ga as u,Ia as n,_ as c,s}from"./chunk-DPA26AOI.js";async function g(r){await n();let e=c(r);return e==="null"?null:JSON.parse(e)}async function d(r){await n();let e;try{e=s(r)}catch{return null}if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t.getUint32(0,!0),i=t.getUint32(4,!0),o=a*i*4;return e.length<8+o?null:{width:a,height:i,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await n();let t=l(u,"decode_exr_preview");if(!t)return d(r);try{return m(t(r,e))}catch{return null}}export{g as a,d as b,y as c};
|
package/dist/chunk-OWWXUNJF.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as ee}from"./chunk-VETHR2O7.js";import{a as f}from"./chunk-ROGMKTND.js";import{A as I,B as U,C as H,D as S,E as q,M as V,P as Z,T as W,U as Q,b as c,ba as s,g,h as z,n as p,o as h,u as Y,y as d}from"./chunk-X527E5VI.js";var te=["align","reconform","conform-reference"],he={transferGB:2e3},l={payg:{id:"payg",name:"Pay As You Go",monthly:0,yearly:0,stripe:{},includes:{web:!0,mcp:!1,app:!1,studio_tools:!1}},web:{id:"web",name:"Indie",monthly:10,yearly:100,unlisted:!0,stripe:{},includes:{web:!0,mcp:!1,app:!1,studio_tools:!1},allowance:{transferGB:50}},indie:{id:"indie",name:"Pro",monthly:50,yearly:500,popular:!0,stripe:{monthly:"price_1T5XDXJ5lnla0aaLasKq49tm",yearly:"price_1T5XDXJ5lnla0aaL2MdMSuI9"},includes:{web:!0,mcp:!0,app:!0,studio_tools:!1},allowance:{transferGB:250}},pro:{id:"pro",name:"Studio",monthly:100,yearly:1e3,stripe:{monthly:"price_1T5X8oJ5lnla0aaLyNJa93H0",yearly:"price_1T5X8oJ5lnla0aaL3dh7b1el"},extraSeat:{monthly:75,yearly:750},includes:{web:!0,mcp:!0,app:!0,studio_tools:!0},allowance:{transferGB:1e3}},studio:{id:"studio",name:"Enterprise",monthly:"custom",yearly:"custom",stripe:{monthly:"price_1T5X7xJ5lnla0aaLoeE1aBlL",yearly:"price_1T5X7xJ5lnla0aaLeBiYo3Di"},includes:{web:!0,mcp:!0,app:!0,studio_tools:!0},allowance:he}},ne={web:!0,mcp:!0,app:!0,studio_tools:!0};var je=Object.fromEntries(Object.values(l).flatMap(e=>Object.values(e.stripe).map(t=>[t,e.id])));import{createPrivateKey as Ge,createPublicKey as _e,sign as Fe,verify as ye}from"node:crypto";import{Buffer as _}from"node:buffer";var we="CONFORMTOOLS_LICENSE_V1",re=/^[0-9A-F]{8}(-[0-9A-F]{8}){3}$/,ae=e=>JSON.stringify({dev_mode:e.dev_mode??!1,email:e.email,expires_at:e.expires_at,features:e.features,issued_at:e.issued_at,machine_fingerprint:e.machine_fingerprint,tier:e.tier});function ie(e){let t=e.split(/\r?\n/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")&&!r.startsWith("-----")).join(""),n=JSON.parse(_.from(t,"base64").toString("utf8"));if(n?.magic!==we||!n.payload?.data)throw new Error("not a conform.tools licence");return n.payload}function oe(e,t){let n=_.from(e.signature,"base64"),r=_.from(ae(e.data));return n.length!==64?!1:t.some(a=>ye(null,r,_e({key:_.concat([_.from("302a300506032b6570032100","hex"),_.from(a)]),format:"der",type:"spki"}),n))}var be=["cMwVBrEYKMzlG6pC7FF2lNKIoEqGz2xB5yph6clNnTg=","qnheqkkDU09l1oI6h2CFh4uQ97bY/hkTA5niGKH0+X8="],xe=be.map(e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)));function E(){let e=c("CONFORM_RECORDS_DIR");if(e)return e;let t=h(),n=g()==="darwin"?s(t,"Library/Application Support"):g()==="win32"?c("LOCALAPPDATA")??s(t,"AppData/Local"):c("XDG_DATA_HOME")??s(t,".local/share");return s(n,"conform.tools")}var Se=()=>c("CONFORM_LICENSE_PATH")??s(E(),"license.lic"),N=()=>s(E(),"grant.lic"),ve=null;function T(){return ve??=(async()=>{let e=await ee();if(!e)return[];let t=await Z(e,["machine"],{timeoutMs:15e3}).catch(()=>null);try{return JSON.parse(t?.stdout??"").machines.filter(n=>re.test(n))}catch{return[]}})()}function ke(e,t,n=Date.now()){if(!oe(e,xe))return{ok:!1,reason:"invalid licence signature"};let r=Date.parse(e.data.expires_at);return!Number.isFinite(r)||r<n?{ok:!1,reason:`licence expired ${e.data.expires_at}`}:[t??[]].flat().includes(e.data.machine_fingerprint)?{ok:!0,data:e.data}:{ok:!1,reason:"licence is for another machine"}}async function se(){let e;try{e=await d(Se())}catch{return null}try{return ke(ie(e),await T())}catch(t){return{ok:!1,reason:t.message}}}var Oe={production:{supabaseUrl:"https://sttpwvjbpsetzbhrkohl.supabase.co",anonKey:"sb_publishable_cyuIPsrQa5Ye7lqFxjnknQ_ozDuwwzp",appBase:"https://conform.tools"},staging:{supabaseUrl:"https://slxggvbvgzkiwojcgykx.supabase.co",anonKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNseGdndmJ2Z3praXdvamNneWt4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzEyODUzMTksImV4cCI6MjA4Njg2MTMxOX0.b18iDsWftny0k9VmOCcbN6kLlyZsZ7GULn_jRH9CE9I",appBase:"https://beta.conform.tools"}};function i(){let e=c("CONFORM_ENV")==="staging"?"staging":"production",t=Oe[e];return{env:e,supabaseUrl:c("CONFORM_SUPABASE_URL")??t.supabaseUrl,anonKey:c("CONFORM_SUPABASE_ANON_KEY")??t.anonKey,appBase:c("CONFORM_APP_BASE")??t.appBase}}var Ae=600*1e3,ce=72*3600*1e3,Le=300*1e3,w=()=>s(p(),i().env==="production"?"auth.json":`auth-${i().env}.json`);async function O(){for(let e of new Set([w(),s(p(),"auth.json")]))try{let t=JSON.parse(await d(e));if(t.env===i().env&&t.access_token)return t}catch{}return await Ie()}var Pe=()=>{let e=g()==="win32"?c("APPDATA")??s(h(),"AppData","Roaming"):g()==="darwin"?s(h(),"Library","Application Support"):c("XDG_CONFIG_HOME")??s(h(),".config");return s(e,"conform-tools","kv-store.json")};async function Ie(){let e=Pe();try{let t=JSON.parse(await d(e)),n=JSON.parse(t["ct-supabase-auth"]??"null");if(!n?.access_token||!n.refresh_token)return null;let r=n.access_token.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");if(JSON.parse(atob(r+"=".repeat(-r.length&3))).iss!==`${i().supabaseUrl}/auth/v1`)return null;let o={env:i().env,access_token:n.access_token,refresh_token:n.refresh_token,expires_at:n.expires_at??0};return await $(o),delete t["ct-supabase-auth"],await I(e,JSON.stringify(t)),o}catch{return null}}async function Ee(){try{for await(let e of V(p())){if(!/^auth(?:-(\w+))?\.json$/.exec(e.name))continue;let n=JSON.parse(await d(s(p(),e.name)));if(n.access_token&&n.env&&n.env!==i().env)return{other_env:n.env}}}catch{}return{}}async function $(e){await U(p()),await I(w(),JSON.stringify(e)),await q(w(),384)}var j=6e3,A=0,B=()=>Date.now()<A,ue=()=>{A=Date.now()+6e4};function tt(){A=0}var pe=e=>e.expires_at-60>Date.now()/1e3;async function R(e){let t=await O();return t&&t.refresh_token!==e.refresh_token&&Object.assign(e,t),pe(e)}async function J(e){if(pe(e))return e.access_token;if(B())return null;if(await R(e))return e.access_token;let t=await H(`${w()}.lock`);try{if(await R(e))return e.access_token;let n=i(),r=await fetch(`${n.supabaseUrl}/auth/v1/token?grant_type=refresh_token`,{method:"POST",headers:{apikey:n.anonKey,"content-type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token}),signal:AbortSignal.timeout(j)}).catch(o=>{throw ue(),o});if(!r.ok)return r.status!==400&&r.status!==401?null:await R(e)?e.access_token:"";let a=await r.json();return e.access_token=a.access_token,a.refresh_token&&(e.refresh_token=a.refresh_token),e.expires_at=a.expires_at??Math.floor(Date.now()/1e3)+(a.expires_in??3600),await $(e),e.access_token}catch{return null}finally{await t()}}async function nt(){let e=await O();return e&&await J(e)||null}var y=null;function le(e,t){return{signed_in:!0,entitled:e.entitled,env:i().env,email:e.email,access:e.access,tier:e.tier,trial_days_remaining:e.trial_days_remaining,source:t,...e.entitled?{}:{reason:"not_entitled"},...e.invite_only?{invite_only:!0}:{}}}async function de(e={}){let t=await se();if(t?.ok)return{signed_in:!!await O().catch(()=>null),entitled:!0,env:i().env,email:t.data.email,access:"licence",tier:t.data.tier,source:"licence"};let n=await Ne(e);return t&&!n.entitled?{...n,licence_error:t.reason}:n}async function Ne(e){if(!e.force&&y&&Date.now()-y.at<Ae)return{...y.status,source:"cache"};let t=i(),n=await O();if(!n)return{signed_in:!1,entitled:!1,env:t.env,reason:"not_signed_in",...await Ee()};let r=await J(n);if(r==="")return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(r&&!B())try{let a=(await T())[0],o=await fetch(`${t.supabaseUrl}/functions/v1/v1-billing/v1/billing/entitlement${a?`?machine=${a}`:""}`,{headers:{authorization:`Bearer ${r}`,apikey:t.anonKey},signal:AbortSignal.timeout(j)}).catch(u=>{throw ue(),u});if(o.status===401||o.status===403)return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(o.ok){let{grant:u,...L}=(await o.json()).data;a&&await Te(u),n.last_entitlement=L,n.last_entitlement_at=Date.now(),await $(n);let P=le(L,"live");return y={at:Date.now(),status:P},P}}catch{}if(n.last_entitlement&&n.last_entitlement_at&&Date.now()-n.last_entitlement_at<ce){let a=ce-(Date.now()-n.last_entitlement_at);return{...le(n.last_entitlement,"grace"),grace_remaining_h:Math.round(a/36e4)/10}}return{signed_in:!0,entitled:!1,env:t.env,reason:"offline_grace_expired"}}async function Te(e){try{if(!e)return await S(N());await U(E()),await I(N(),e)}catch{}}function $e(e){return e.source==="licence"?`${e.email} \xB7 machine licence (${e.tier}) \u2014 runs offline, no account check`:De(e)+(e.licence_error?`
|
|
4
|
-
(the machine licence was not used: ${e.licence_error})`:"")}function De(e){let t=i();if(!e.signed_in)return`not signed in (${t.env})${e.other_env?`; you are signed in to ${e.other_env} only (each server keeps its own sign-in)`:""}. Run the account_login tool, or \`npx -y conformtools@latest login\` in a terminal.`;if(e.reason==="auth_rejected")return"signed-in session was rejected (expired or revoked) \u2014 sign in again with account_login.";if(e.reason==="offline_grace_expired")return"offline for more than 72 h since the last account check \u2014 reconnect and run account_status.";let n=`${e.email??"(unknown email)"} \xB7 ${t.env}`;if(!e.entitled&&e.invite_only)return`${n}
|
|
5
|
-
the conform.tools engine (the MCP and the app) is invite-only for now, and ${e.email??"this account"} is not on the list. If that is the wrong Google account, run account_logout, then account_login with the invited one.`;if(!e.entitled)return`${n}
|
|
6
|
-
no active plan on ${e.email??"this account"}: the MCP is in the ${l.indie.name} plan and up (the one free Timeline Exchange is on the web only). If that is the wrong Google account, run account_logout, then account_login and pick the account with the plan; otherwise choose a plan at ${t.appBase}/pricing, then run account_status.`;let r=e.access==="trial"?`trial, ${e.trial_days_remaining??"?"} day(s) left`:e.access==="allowlist"?"invited (early access)":`subscribed${e.tier?` (${G(e.tier)})`:""}`,a=D(e),o=a?` \xB7 includes ${[a.web&&"the web tools",a.mcp&&"the MCP",a.app&&"the app"].filter(Boolean).join(", ")||"the web tools"}`:"";return`${n}
|
|
7
|
-
${r}${o}${e.source==="grace"?` \u2014 offline, using the last check (${e.grace_remaining_h} h of grace left)`:""}`}function G(e){return l[e.toLowerCase()]?.name??e}function D(e){if(e.access==="trial")return ne;let t=(e.tier??"").toLowerCase();return(t==="enterprise"?l.studio:l[t])?.includes??null}var fe=()=>de();function rt(e){fe=e}async function me(){let e=await fe();if(e.entitled)return e;let t=e.signed_in&&e.reason==="not_entitled"?"not_entitled":"not_signed_in";throw new f(t,$e(e),{account:e})}async function at(){let e=await me();if(e.source==="licence"||D(e)?.mcp!==!1)return e;throw new f("not_entitled",`The conform.tools MCP is in the ${l.indie.name} plan ($${l.indie.monthly}/mo) and up. ${e.access==="trial"?"Your trial":`Your plan${e.tier?` (${G(e.tier)})`:""}`} includes Timeline Exchange and Conform Connect on ${i().appBase}, but not the engine on this machine. Upgrade at ${i().appBase}/pricing, then run account_status.`,{account:e,needs:"mcp"})}async function Ce(){let e=await me();if(e.source==="licence")return e;if(!D(e)?.app)throw new f("not_entitled",`The conform.tools app is in the ${l.indie.name} plan ($${l.indie.monthly}/mo) and up. ${e.access==="trial"?"Your trial":`Your plan${e.tier?` (${G(e.tier)})`:""}`} does not include the app. Upgrade at ${i().appBase}/pricing, then reopen the app.`,{account:e,needs:"app"});let t=await Ue();if(t)throw new f("seat_in_use",`This seat is in use on ${t}. Each seat runs the app on one computer at a time: quit the app there (or sign out), or wait 15 minutes after it last ran, then reopen it here.`,{account:e,needs:"seat",in_use_by:t});return e}async function it(e){if(!te.includes(e))return;let t=await Ce();if(!(t.source==="licence"||D(t)?.studio_tools!==!1))throw new f("not_entitled",`This tool is in the ${l.pro.name} plan ($${l.pro.monthly}/mo a seat). Upgrade at ${i().appBase}/pricing.`,{account:t,needs:"studio_tools"})}var Me=240*1e3,k=null;async function Ue(){if(k&&Date.now()-k.at<Me)return k.busy;let e=await ge("POST").catch(()=>null);return k={at:Date.now(),busy:e},e}async function ge(e){let t=i(),n=await O(),r=(await T())[0],a=n&&await J(n);if(!a||!r||B())return null;let o=await fetch(`${t.supabaseUrl}/functions/v1/v1-billing/v1/billing/seat`,{method:e,headers:{authorization:`Bearer ${a}`,apikey:t.anonKey,"content-type":"application/json"},body:JSON.stringify({machine:r,name:z()}),signal:AbortSignal.timeout(j)});return o.status===409?(await o.json()).in_use_by??"another computer":null}var v=null;function ot(e={}){if(v)return v;let t=i(),n=crypto.randomUUID().replaceAll("-","");return v=new Promise((r,a)=>{let o=!1,u=b=>{o||(o=!0,clearTimeout(P),setTimeout(()=>L.close(),250),v=null,b())},L=Q({hostname:"127.0.0.1",port:0,onListen:async b=>{let x=`${t.appBase}/plugin-auth?client=engine&port=${b}&state=${n}`,m=await W(x);e.onUrl?.(x,m)}},async b=>{let x=new URL(b.url);if(x.pathname!=="/callback")return new Response("not found",{status:404});let m=x.searchParams,F=m.get("access_token")??"",K=m.get("refresh_token")??"",C=!!F&&!!K&&m.get("state")===n;if(C){let X=Number(m.get("expires_at"));await $({env:t.env,access_token:F,refresh_token:K,expires_at:X>0?X:Math.floor(Date.now()/1e3)+3600}),y=null,A=0,de({force:!0}).then(M=>u(()=>r(M)),M=>u(()=>a(M)))}return new Response(Re(C),{status:C?200:400,headers:{"content-type":"text/html; charset=utf-8"}})}),P=setTimeout(()=>u(()=>a(new f("not_signed_in","sign-in was not completed within 5 minutes"))),e.timeoutMs??Le)}),v}async function st(){await ge("DELETE").catch(()=>{}),k=null,y=null,A=0,await Y(w())&&await S(w()),await S(N()).catch(()=>{});let e=s(p(),"auth.json");try{JSON.parse(await d(e)).env===i().env&&await S(e)}catch{}}function Re(e){let[t,n]=e?["Connected","You're signed in \u2014 you can close this tab."]:["Sign-in failed","Please try again."];return`<!doctype html><meta charset=utf-8><title>conform.tools</title><body style='font:16px -apple-system,Helvetica,Arial,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f5f5f7;color:#1d1d1f'><div style='text-align:center'><div style='font-size:22px;font-weight:700'>conform<span style='color:#ff3c00'>.tools</span></div><div style='margin-top:14px;font-size:20px;font-weight:600'>${t}</div><div style='margin-top:6px;color:#6e6e73'>${n}</div></div></body>`}export{i as a,Pe as b,j as c,tt as d,nt as e,de as f,$e as g,D as h,rt as i,me as j,at as k,Ce as l,it as m,ot as n,st as o};
|
package/dist/chunk-PFZVET7S.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
|
-
var i=/^(.+)_(\d{3})\.R3D$/i;function o(n){let r=(n.split(/[/\\]/).pop()??n).match(i);return r?{clipBase:r[1],partNumber:parseInt(r[2],10)}:null}function u(n){return o(n)!==null}function p(n,a){let r=o(n);if(!r)return[];let s=[];for(let t of a){let e=o(t);e&&e.clipBase===r.clipBase&&s.push({name:t,n:e.partNumber})}return s.sort((t,e)=>t.n-e.n),s.map(t=>t.name)}export{o as a,u as b,p as c};
|
package/dist/chunk-QH5DTYSE.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{a as F}from"./chunk-ROGMKTND.js";import{A as _,B as m,D as v,F as R,G as g,H as D,M as $,_ as k,ba as i,n as b,t as x,u as p,y as S}from"./chunk-X527E5VI.js";var A="_originalframes",y="zAPPLIED_PATCHES",u=t=>t.replace(/[\\/][^\\/]+[\\/]?$/,""),T=()=>i(b(),"move-undo");async function P(t){let n=[];for await(let a of $(t))a.isFile&&!a.name.startsWith(".")&&n.push(a.name);return n.sort()}async function O(t){let n=[];for await(let a of $(u(t)))a.isDirectory&&/patch/i.test(a.name)&&a.name!==y&&n.push(a.name);return n.sort()}async function C(t,n){let a=new Set(await P(t)),e=[];for(let r of n){let s=i(u(t),r);if(await p(s))for(let w of await P(s))e.push({file:w,folder:r,replaces:a.has(w)})}return e}async function j(t,n,a){if(!await p(t)||!(await x(t)).isDirectory)throw new F("invalid_args",`not a folder: ${t}`);let e=u(t),r=[],s=[];for(let o of await C(t,n)){if(a&&!a.has(`${o.folder}/${o.file}`))continue;if(!o.replaces){r.push(`${o.file}: not in the sequence`);continue}let f=i(t,o.file),c=i(e,o.folder,o.file),l=`${t}${A}`,d=i(l,o.file);for(let h=1;await p(d);h++)d=i(`${t}${A}${String(h).padStart(2,"0")}`,o.file);await m(u(d));try{await g(f,d)}catch(h){r.push(`${o.file}: ${h.message}`);continue}try{await R(c,f)}catch(h){await g(d,f).catch(()=>{}),r.push(`${o.file}: ${h.message}`);continue}s.push({file:o.file,backup:d,patch_src:c,applied:c,folder:o.folder}),l=""}let w=[];if(s.length){let o=i(e,y);await m(o);for(let f of new Set(s.map(c=>c.folder))){let c=i(o,f);for(let l=1;await p(c);l++)c=i(o,`${f}_${l}`);try{await g(i(e,f),c),w.push({from:i(e,f),to:c});for(let l of s)l.folder===f&&(l.applied=i(c,l.file))}catch(l){r.push(`${f}: not filed under ${y} (${l.message})`)}}}if(!s.length)return{patched:0,errors:r};let E=`files-${Date.now().toString(36)}`;return await m(T()),await _(i(T(),`${E}.json`),JSON.stringify({patch:!0,sequence:t,entries:s.map(({folder:o,...f})=>f),folders:w})),{patched:s.length,errors:r,undo_id:E}}async function J(t){let n=[];for(let e of t.folders)await p(e.to)&&!await p(e.from)&&await g(e.to,e.from).catch(r=>n.push({path:e.to,error:r.message}));let a=0;for(let e of t.entries){let r=i(t.sequence,e.file);if(await p(e.backup))try{await p(r)&&await v(r),await g(e.backup,r),a++}catch(s){n.push({path:r,error:s.message})}}for(let e of new Set([...t.entries.map(r=>u(r.backup)),...t.folders.map(r=>u(r.to))]))if(await p(e)&&!(await P(e)).length){let r=!0;for await(let s of $(e)){r=!1;break}r&&await D(e).catch(()=>{})}return{restored:a,failed:n}}var L=t=>k(t),U=async t=>JSON.parse(await S(t));export{A as a,y as b,O as c,C as d,j as e,J as f,L as g,U as h};
|
package/dist/chunk-RVZQ3Y6N.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{b as s}from"./chunk-X527E5VI.js";var l="0.6.16";function a(t,i){let n=t.split("-")[0].split(".").map(Number),o=i.split("-")[0].split(".").map(Number);for(let e=0;e<Math.max(n.length,o.length);e++){let r=(n[e]||0)-(o[e]||0);if(r)return r>0}return!1}var u=null;function p(){return s("CONFORM_UPDATE_CHECK")==="off"?Promise.resolve(null):u??=fetch("https://registry.npmjs.org/conformtools/latest",{signal:AbortSignal.timeout(2e3)}).then(t=>t.ok?t.json():null).then(t=>typeof t?.version=="string"?t.version:null).catch(()=>null)}var c="run npx -y conformtools@latest setup claude (or setup codex) once: it registers the server so every new session runs the newest version (npx --prefer-online), then restart the MCP client; if an old global install is shadowing it: npm rm -g conformtools";async function f(){let t=await p();return`conformtools ${l}`+(t&&a(t,l)?` \u2014 update available: ${t} \u2192 ${c}`:"")}export{l as a,a as b,p as c,c as d,f as e};
|
package/dist/chunk-X527E5VI.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{readFile as S,writeFile as H,appendFile as q,stat as W,readdir as G,mkdir as _,open as U,copyFile as Y,mkdtemp as K,rm as P,chmod as X,rename as B,cp as Q,statfs as V,realpath as Z}from"node:fs/promises";import{execFile as ee,spawn as j}from"node:child_process";import{createHash as te}from"node:crypto";import{createReadStream as re,chmodSync as ne,cpSync as oe,existsSync as E,statSync as M}from"node:fs";import{homedir as se,hostname as ie,tmpdir as ae,platform as ce,release as le,arch as ue,totalmem as de,availableParallelism as me}from"node:os";import{fileURLToPath as F}from"node:url";import fe from"node:http";import pe from"node:http2";import f from"node:process";import{Buffer as $}from"node:buffer";import{basename as ge,dirname as ye,join as b,resolve as C,sep as v}from"node:path";import{createRequire as we}from"node:module";import{basename as St,dirname as Ut,extname as Ft,join as Dt,relative as Ot,resolve as Tt}from"node:path";{let e=globalThis.fetch,t=typeof globalThis.Deno<"u";e&&!t&&(globalThis.fetch=(async(n,o)=>{let r=typeof n=="string"?n:n instanceof URL?n.href:n.url;if(r.startsWith("file:")){let s=await S(F(r)),i=r.endsWith(".wasm")?"application/wasm":"application/octet-stream";return new Response(s,{status:200,headers:{"content-type":i}})}return e(n,o)}))}var h=e=>f.env[e],Ce=()=>Number(h("CONFORM_MEMORY_GB")??0)*2**30||de(),Ie=()=>me(),Ne=()=>f.argv.slice(2),He=e=>f.exit(e),be=()=>f.platform,We=()=>ie(),_e=()=>h("CONFORM_PYTHON")??(be()==="win32"?"python":"python3"),Be=()=>f.arch,z=()=>`${f.platform}-${f.arch}`;function je(e){try{return b(ye(we(import.meta.url).resolve(`${he(z())}/package.json`)),e)}catch{return null}}var he=e=>`conformtools-${e==="win32-x64"?"windows-x64":e}`,ze=e=>`${e} is not in this package for ${z()} (conform.tools builds it for darwin-arm64, darwin-x64, linux-x64 and win32-x64)`;function Le(){let e=f.versions.deno;return{platform:`${ce()} ${le()} ${ue()}`,runtime:e?`deno ${e}`:`node ${f.version}`}}var xe=()=>h("CONFORM_MCP_HOME")??b(A(),".conform-mcp"),A=()=>h("HOME")??se();function Je(e){let t=e.trim();if(t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),/^file:\/\//i.test(t))try{t=F(t)}catch{}return t==="~"?t=A():(t.startsWith("~/")||t.startsWith("~\\"))&&(t=b(A(),t.slice(2))),t&&C(t)+(/[\\/]$/.test(t)&&!/[\\/]$/.test(C(t))?v:"")}async function qe(e,t){let n=await import("node:sqlite").catch(()=>null);if(n?.DatabaseSync){let r=new n.DatabaseSync(e,{readOnly:!0});try{let s=r.prepare(t);return s.setReadBigInts(!0),s.all().map(i=>Object.fromEntries(Object.entries(i).map(([c,l])=>[c,typeof l=="bigint"?Number(l):l])))}finally{r.close()}}let o=await D("sqlite3",["-readonly","-json",e,t]);if(!o.success)throw new Error(`sqlite3 ${ge(e)}: ${o.stderr.trim()||o.stdout.trim()}`);return o.stdout.trim()?JSON.parse(o.stdout):[]}var Ge=(e,t)=>e?`${e.replace(/[\\/]+$/,"")}${e.includes("\\")&&!e.includes("/")?"\\":"/"}${t}`:t;function Ye(e){let t=F(e),n=t.indexOf(`${v}deno-compile-`);if(n<0||!E(t))return t;let o=t.slice(n+1).split(v).slice(1).join(v),r=b(xe(),"bin",o);try{let s=M(t),i=E(r)?M(r):null;return(!i||s.isFile()&&(i.size!==s.size||i.mtimeMs<s.mtimeMs))&&(oe(t,r,{recursive:!0,force:!0}),s.isFile()&&ne(r,493)),r}catch{return t}}var I=null;var x=e=>I?.owns(e)?I:null;async function N(e){let t=await W(e);return{isFile:t.isFile(),isDirectory:t.isDirectory(),size:t.size,mtimeMs:t.mtimeMs}}function R(e){return x(e)?.stat(e,()=>N(e))??N(e)}async function Ke(e){try{return await R(e),!0}catch{return!1}}async function Xe(e){try{return(await R(e)).isFile}catch{return!1}}async function Qe(e){try{return(await R(e)).isDirectory}catch{return!1}}async function Ve(e){x(e)?.guard(e,"read whole file");let t=await S(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Ze=e=>S(e,"utf8"),et=(e,t)=>H(e,t),tt=(e,t,n)=>n?.append?q(e,t):H(e,t);async function rt(e){await _(e,{recursive:!0})}async function nt(e,t={}){let n=Date.now()+(t.timeoutMs??5e3),o=t.staleMs??15e3;for(;;)try{await _(e);break}catch(r){if(r.code!=="EEXIST")throw r;try{if(Date.now()-(await R(e)).mtimeMs>o){await P(e,{recursive:!0,force:!0});continue}}catch{}if(Date.now()>n)break;await new Promise(s=>setTimeout(s,25))}return()=>P(e,{recursive:!0,force:!0}).catch(()=>{})}var ot=e=>P(e,{force:!0}),st=(e,t)=>X(e,t).catch(()=>{}),it=(e,t)=>Y(e,t),at=(e,t)=>B(e,t),ct=e=>P(e,{recursive:!0,force:!0}),lt=(e,t)=>Q(e,t,{recursive:!0,verbatimSymlinks:!0});async function ut(e){try{let t=await V(e);return Number(t.bavail)*Number(t.bsize)}catch{return null}}async function dt(e){try{return await Z(e)}catch{return null}}var mt=(e="conform-")=>K(b(ae(),e));async function*ft(e){let t=async()=>(await G(e,{withFileTypes:!0})).map(n=>({name:n.name,isFile:n.isFile(),isDirectory:n.isDirectory()}));yield*await(x(e)?.readDir(e,t)??t())}async function pt(e){x(e)?.guard(e,"read bytes");let t=await U(e,"r"),n=(await t.stat()).size;return{path:e,size:n,async readAt(o,r){let s=new Uint8Array(r),i=0;for(;i<r;){let{bytesRead:c}=await t.read(s,i,r-i,o+i);if(!c)break;i+=c}return i===r?s:s.subarray(0,i)},close:()=>t.close()}}async function gt(e){let t=await U(e,"w");return{async writeAt(n,o){let r=0;for(;r<o.length;){let{bytesWritten:s}=await t.write(o,r,o.length-r,n+r);r+=s}},truncate:n=>t.truncate(n),close:()=>t.close()}}var L=(e,t)=>{for(let n of t)x(n)?.guard(n,`${e.split(/[\\/]/).pop()} ${t[0]}`)};function D(e,t,n={}){return L(e,t),new Promise(o=>{ee(e,t,{maxBuffer:1<<30,env:n.env?{...f.env,...n.env}:void 0,timeout:n.timeoutMs},(r,s,i)=>{let c=r?.code??0;o({success:!r,code:c,stdout:String(s),stderr:String(i)})})})}var ve="[Console]::OutputEncoding=[Text.Encoding]::UTF8;$t=@{};Get-Process|?{$_.MainWindowTitle}|%{$t[$_.Id]=$_.MainWindowTitle};ConvertTo-Json -Compress -InputObject @(Get-CimInstance Win32_Process|%{[pscustomobject]@{pid=[int]$_.ProcessId;exe=$_.ExecutablePath;cmd=$_.CommandLine;title=$t[[int]$_.ProcessId]}})";async function yt(){let e=await D("powershell.exe",["-NoProfile","-NonInteractive","-Command",ve],{timeoutMs:3e4});return Pe(e.stdout)}function Pe(e){let t;try{t=JSON.parse(e.replace(/^/,"").trim()||"[]")}catch{return[]}return(Array.isArray(t)?t:[t]).flatMap(n=>{let o=n??{},r=Number(o.pid);return!Number.isInteger(r)||r<=0?[]:[{pid:r,args:String(o.cmd||o.exe||""),title:typeof o.title=="string"?o.title:""}]})}function wt(e,t,n,o={}){return L(e,t),new Promise((r,s)=>{let i=j(e,t,{env:o.env?{...f.env,...o.env}:void 0,stdio:["ignore","pipe","pipe"]}),c="";i.stdout.on("data",l=>n(l)),i.stderr.on("data",l=>{c+=new TextDecoder().decode(l)}),i.on("error",s),i.on("close",l=>r({code:l,stderr:c})),o.signal?.addEventListener("abort",()=>i.kill(),{once:!0})})}function bt(e,t,n,o,r={}){let s=j(e,t,{stdio:["pipe","pipe","pipe"],env:r.env?{...f.env,...r.env}:void 0});s.stdin.on("error",()=>{}),s.stdout.on("data",a=>n(a)),s.stderr.on("data",a=>o?.(new TextDecoder().decode(a)));let i=new Promise(a=>{s.on("close",u=>a(u)),s.on("error",()=>a(null))}),c=[s,s.stdout,s.stderr,s.stdin],l=a=>{for(let u of c)(a?u.ref:u.unref)?.call(u)};return l(!1),{write:a=>new Promise((u,p)=>{s.stdin.write(a,m=>m?p(m):u())}),hold:l,close:()=>{try{s.stdin.end(),s.kill()}catch{}},exited:i}}async function ht(e){if(h("CONFORM_NO_BROWSER"))return!1;let[t,n]=f.platform==="darwin"?["open",[e]]:f.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];return(await D(t,n)).success}function xt(e,t){let n=fe.createServer(async(o,r)=>{try{let s=[];if(o.method!=="GET"&&o.method!=="HEAD")for await(let p of o)s.push(p);let i=s.length>0,c=new Headers;for(let[p,m]of Object.entries(o.headers))m!=null&&c.set(p,Array.isArray(m)?m.join(", "):m);let l=`http://${o.headers.host??`${e.hostname}:${e.port}`}${o.url??"/"}`,a=new AbortController;r.on("close",()=>{r.writableEnded||a.abort()});let u=await t(new Request(l,{method:o.method,headers:c,body:i?$.concat(s):void 0,signal:a.signal}));if(r.statusCode=u.status,u.headers.forEach((p,m)=>r.setHeader(m,p)),u.body&&u.headers.get("content-type")?.startsWith("text/event-stream")){r.flushHeaders();let p=u.body.getReader();for(a.signal.addEventListener("abort",()=>void p.cancel(),{once:!0});;){let{value:m,done:g}=await p.read();if(g)break;r.write(m)}r.end();return}r.end($.from(await u.arrayBuffer()))}catch(s){r.statusCode=500,r.end(JSON.stringify({ok:!1,code:"internal",message:s instanceof Error?s.message:String(s)}))}});return n.listen(e.port,e.hostname,()=>{let o=n.address();e.onListen?.(typeof o=="object"&&o?o.port:e.port)}),{close:()=>n.close()}}var y=class extends Error{constructor(n,o,r){super(o);this.code=n;this.grpcStatus=r}};function vt(e,t,n,o,r){return new Promise((s,i)=>{let c=pe.connect(`http://${e}:${t}`),l=!1,a=(d,J)=>{l||(l=!0,clearTimeout(p),c.destroy(),d?i(d):s(J))},u=!1;c.on("connect",()=>{u=!0});let p=setTimeout(()=>a(u?new y("deadline",`no answer from ${e}:${t} in ${r} ms`):new y("unavailable",`${e}:${t}: no connection in ${r} ms`)),r);c.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`)));let m=$.alloc(5+o.length);m.writeUInt32BE(o.length,1),m.set(o,5);let g=c.request({":method":"POST",":path":n,"content-type":"application/grpc",te:"trailers"}),O=[],w,k="",T=d=>{d["grpc-status"]!=null&&(w=String(d["grpc-status"]),k=decodeURIComponent(String(d["grpc-message"]??"")))};g.on("response",T),g.on("trailers",T),g.on("data",d=>O.push(d)),g.on("error",d=>a(new y("unavailable",`${e}:${t}: ${d.message}`))),g.on("end",()=>{if(w!=="0")return a(new y("grpc",`grpc-status ${w??"missing"}${k?`: ${k}`:""}`,w==null?void 0:Number(w)));let d=$.concat(O);if(d.length<5||d[0]!==0)return a(new y("grpc","reply is not one uncompressed gRPC message"));a(null,new Uint8Array(d.subarray(5,5+d.readUInt32BE(1))))}),g.end(m)})}async function Pt(e){let t=te("sha256");for await(let n of re(e))t.update(n);return t.digest("hex")}async function $t(e,t,n){let o=`${t}.part`;for(let r=0;;r++){let s=0;try{s=(await W(o)).size}catch{}try{let i=await fetch(e,{headers:s?{Range:`bytes=${s}-`}:{}});if(i.status===416)break;if(!i.ok||!i.body)throw new Error(`${e} answered ${i.status}`);s&&i.status!==206&&(s=0);let c=s+Number(i.headers.get("content-length")??0),l=await U(o,s?"a":"w");try{let a=s;for await(let u of i.body)await l.write(u),a+=u.length,n?.(a,c)}finally{await l.close()}break}catch(i){if(r>=4)throw i;await new Promise(c=>setTimeout(c,2e3*(r+1)))}}await B(o,t)}function Rt(e){let t="";for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}export{F as a,h as b,Ce as c,Ie as d,Ne as e,He as f,be as g,We as h,_e as i,Be as j,je as k,ze as l,Le as m,xe as n,A as o,Je as p,qe as q,Ge as r,Ye as s,R as t,Ke as u,Xe as v,Qe as w,Ve as x,Ze as y,et as z,tt as A,rt as B,nt as C,ot as D,st as E,it as F,at as G,ct as H,lt as I,ut as J,dt as K,mt as L,ft as M,pt as N,gt as O,D as P,yt as Q,wt as R,bt as S,ht as T,xt as U,y as V,vt as W,Pt as X,$t as Y,Rt as Z,St as _,Ut as $,Ft as aa,Dt as ba,Ot as ca,Tt as da};
|
package/dist/chunk-YUO3UWPH.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{a as c,b as m}from"./chunk-DKGGJM6Z.js";import{Ga as u,Ia as n,K as f,aa as s}from"./chunk-DPA26AOI.js";async function y(r){await n();let e=s(r);return e==="null"?null:JSON.parse(e)}async function d(r){await n();let e;try{e=f(r)}catch{return null}if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t.getUint32(0,!0),a=t.getUint32(4,!0),o=i*a*4;return e.length<8+o?null:{width:i,height:a,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function b(r,e=8){await n();let t=m(u,"decode_tiff_preview");if(!t)return d(r);try{return c(t(r,e))}catch{return null}}export{y as a,d as b,b as c};
|
|
@@ -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{a,b,c}from"./chunk-EEDLRRKU.js";import"./chunk-DKGGJM6Z.js";import"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";export{c as decodeDngPreviewWasm,b as decodeDngWasm,a as inspectDngWasm};
|
|
@@ -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{a,b,c}from"./chunk-ISKNIQVO.js";import"./chunk-DKGGJM6Z.js";import"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";export{c as decodeDpxPreviewWasm,b as decodeDpxWasm,a as inspectDpxWasm};
|
|
@@ -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{a,b,c}from"./chunk-JKOB3U54.js";import"./chunk-DKGGJM6Z.js";import"./chunk-DPA26AOI.js";import"./chunk-PSANHDZM.js";export{c as decodeExrPreviewWasm,b as decodeExrWasm,a as inspectExrWasm};
|
package/dist/framing-QYRCUEB5.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{jc as a,kc as b,lc as c,mc as d,nc as e,oc as f,pc as g,qc as h,rc as i,sc as j,tc as k,uc as l,vc as m,wc as n}from"./chunk-VWFEMXYZ.js";import"./chunk-IN6XVTUS.js";import"./chunk-DLF5AKXT.js";import"./chunk-PFZVET7S.js";import"./chunk-6V4OEOOX.js";import"./chunk-RVZQ3Y6N.js";import"./chunk-ISKNIQVO.js";import"./chunk-JKOB3U54.js";import"./chunk-EEDLRRKU.js";import"./chunk-WJ5EWXP2.js";import"./chunk-YUO3UWPH.js";import"./chunk-DKGGJM6Z.js";import"./chunk-JV7TZDKJ.js";import"./chunk-RGMTLNMF.js";import"./chunk-XDI6CPPV.js";import"./chunk-UKXSKFL3.js";import"./chunk-4RA57LTJ.js";import"./chunk-FLLB6UZJ.js";import"./chunk-UAURERD3.js";import"./chunk-LVGGCRDW.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-DPA26AOI.js";import"./chunk-JL454FFL.js";import"./chunk-OWWXUNJF.js";import"./chunk-VETHR2O7.js";import"./chunk-ROGMKTND.js";import"./chunk-X527E5VI.js";import"./chunk-PSANHDZM.js";export{j as ASPECTS,a as INPUT_SCALING,f as SIZING_TARGETS,i as alignText,h as alignTimeline,k as aspectOf,l as blankingForAspect,m as blankingQc,n as blankingText,c as inputFitRatio,g as offlineLane,d as resolveProps,b as scalingOf,e as underRef};
|
package/dist/hosted-2XACQY7J.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{a,b,c,d}from"./chunk-UAURERD3.js";import"./chunk-LVGGCRDW.js";import"./chunk-C2ESM27Z.js";import"./chunk-OWWXUNJF.js";import"./chunk-VETHR2O7.js";import"./chunk-ROGMKTND.js";import"./chunk-X527E5VI.js";import"./chunk-PSANHDZM.js";export{a as HOSTED_READ_KEYS,b as readHosted,d as shareOriginal,c as writeHosted};
|