conformtools 0.6.10 → 0.6.12
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 +54 -22
- package/dist/{account-GFIQC77T.js → account-IUWNSDG5.js} +1 -1
- package/dist/{analysis-engine-4K5K6L53.js → analysis-engine-M7W32RRC.js} +1 -1
- package/dist/bridge-6NCHJWE6.js +3 -0
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-56EEBHP2.js → chunk-2CY2OOOJ.js} +1 -1
- package/dist/chunk-3XQI5SIV.js +3 -0
- package/dist/chunk-5YULBQJX.js +3 -0
- package/dist/chunk-64X5DLH5.js +6 -0
- package/dist/{chunk-XJNWAQON.js → chunk-6NLB5TZ2.js} +1 -1
- package/dist/chunk-B77ADB26.js +3 -0
- package/dist/chunk-DFQWQ3EA.js +10 -0
- package/dist/{chunk-JXTRQ3UG.js → chunk-F4PHKOAS.js} +1 -1
- package/dist/chunk-G3SZDPDS.js +3 -0
- package/dist/chunk-IN6XVTUS.js +3 -0
- package/dist/{chunk-NQNS4Y2B.js → chunk-LVGGCRDW.js} +1 -1
- package/dist/chunk-LYM757KG.js +158 -0
- package/dist/chunk-N34DQ6MH.js +14 -0
- package/dist/chunk-NMH62JSC.js +5 -0
- package/dist/chunk-NXJZXXC2.js +20 -0
- package/dist/{chunk-6HZP2OJA.js → chunk-OMPYIH6F.js} +1 -1
- package/dist/{chunk-DGXZB7MO.js → chunk-P3XI63Q2.js} +1 -1
- package/dist/chunk-QTA36RVO.js +502 -0
- package/dist/chunk-QTFFVLVJ.js +8 -0
- package/dist/{chunk-E5ENIKNR.js → chunk-SJ56EEFP.js} +2 -2
- package/dist/chunk-THVX57I3.js +4 -0
- package/dist/chunk-UUXHJNQA.js +8 -0
- package/dist/chunk-VJN4UXFJ.js +8 -0
- package/dist/chunk-XF3YMBI7.js +3 -0
- package/dist/chunk-XVRTAKDK.js +6 -0
- package/dist/chunk-YU3SUSK3.js +3 -0
- package/dist/claude-setup-REU4AOKX.js +13 -0
- package/dist/cli.js +8 -8
- package/dist/emscripten-module-Q67P5WYC-HW3D2R5O.js +2161 -0
- package/dist/engine-6ACEWA4S.js +5 -0
- package/dist/ffi-7KTOX2T4.js +3 -0
- package/dist/framing-CVJM5TT3.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-B2TLLEMI.js → h264-5OGRVYUF.js} +1 -1
- package/dist/{h264-mxf-3GED5PBT.js → h264-mxf-FTHNCK4B.js} +1 -1
- package/dist/host-relink-ZP33BK53.js +10 -0
- package/dist/hosted-BWAYLJXR.js +3 -0
- package/dist/hosts-H3IKRZF2.js +3 -0
- package/dist/http.js +3 -3
- package/dist/{inspect-D3WEYL2W.js → inspect-BJYIDVDN.js} +2 -2
- package/dist/{isobmff-C5A2EFKH.js → isobmff-DN6MCHEK.js} +1 -1
- package/dist/{mc-video-ARKIHPA7.js → mc-video-TF3MD7LN.js} +1 -1
- package/dist/mcp.js +8 -7
- package/dist/{media-3YMIZSSF.js → media-MJKEKCPN.js} +1 -1
- package/dist/module-ES6BEMUI-L6VQ7K3J.js +3 -0
- package/dist/module-asyncify-2EFITU5U-Z4EEM6X7.js +3 -0
- package/dist/{mxf-CQSI6H5T.js → mxf-Q5723GPD.js} +1 -1
- package/dist/{ops-BCTGDBXT.js → ops-B2OA7VXN.js} +1 -1
- package/dist/{probe-COWUTQGN.js → probe-72QZKMCC.js} +1 -1
- package/dist/{r3d-FX7V4BIE.js → r3d-7OOZMPWH.js} +1 -1
- package/dist/{sequence-patch-JVEZW24V.js → sequence-patch-CN4VC5W3.js} +1 -1
- package/dist/store-4WZQF6YD.js +3 -0
- package/dist/timeline-ZP5H4YDQ.js +3 -0
- package/package.json +10 -1
- package/dist/bridge-73XMEZLH.js +0 -3
- package/dist/chunk-2MJAQROY.js +0 -5
- package/dist/chunk-7QUSVHO2.js +0 -10
- package/dist/chunk-CJYLQ3UM.js +0 -5
- package/dist/chunk-DFDXSIMI.js +0 -39
- package/dist/chunk-DNS4ZYIO.js +0 -3
- package/dist/chunk-GM262EDM.js +0 -8
- package/dist/chunk-JHTMYXJM.js +0 -20
- package/dist/chunk-QHXX5GDD.js +0 -440
- package/dist/chunk-TDIY4NRQ.js +0 -3
- package/dist/chunk-UGVGRL5M.js +0 -3
- package/dist/chunk-Y2QHZUGL.js +0 -5
- package/dist/chunk-YC7QDS5U.js +0 -19
- package/dist/chunk-ZVUKOFUX.js +0 -6
- package/dist/claude-setup-OKOPPDMB.js +0 -5
- package/dist/conformtools-analyze +0 -0
- package/dist/conformtools-decode +0 -0
- package/dist/engine-274GQLUB.js +0 -5
- package/dist/framing-BKTUEUZO.js +0 -3
- package/dist/host-relink-PTV44KXF.js +0 -10
- package/dist/hosts-D3TR2QEV.js +0 -3
- package/dist/i2o-transfer +0 -0
- package/dist/store-SZKXADGI.js +0 -3
- package/dist/timeline-PEUC3G7K.js +0 -3
- /package/dist/{still-WUCFH2WX.js → still-SX6RJ7O6.js} +0 -0
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ npx -y conformtools@latest whoami # shows the account and plan it found
|
|
|
24
24
|
**Claude Code**
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
claude mcp add -s user conformtools -- npx -y conformtools@latest mcp
|
|
27
|
+
claude mcp add -s user conformtools -- npx -y --prefer-online conformtools@latest mcp
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**Claude Desktop** — Settings → Developer → Edit Config, then add:
|
|
@@ -32,12 +32,17 @@ claude mcp add -s user conformtools -- npx -y conformtools@latest mcp
|
|
|
32
32
|
```json
|
|
33
33
|
{
|
|
34
34
|
"mcpServers": {
|
|
35
|
-
"conformtools": { "command": "npx", "args": ["-y", "conformtools@latest", "mcp"] }
|
|
35
|
+
"conformtools": { "command": "npx", "args": ["-y", "--prefer-online", "conformtools@latest", "mcp"] }
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Cursor, Codex and other MCP clients take the same command: `npx -y conformtools@latest mcp`.
|
|
40
|
+
Cursor, Codex and other MCP clients take the same command: `npx -y --prefer-online conformtools@latest mcp`.
|
|
41
|
+
|
|
42
|
+
**Updates are automatic.** `--prefer-online` makes npx ask npm for the newest conformtools each time your app starts
|
|
43
|
+
the server, so every new session runs the latest release (offline, it runs the copy it has). A session already open
|
|
44
|
+
keeps its version until the app restarts it. Set it up earlier without `--prefer-online`? Run
|
|
45
|
+
`npx -y conformtools@latest setup claude` (or `setup codex`) once, and it switches your registration over.
|
|
41
46
|
|
|
42
47
|
Then just ask:
|
|
43
48
|
|
|
@@ -113,28 +118,49 @@ writing timelines use conform.tools, exactly as the website does: the engine sen
|
|
|
113
118
|
edit's structure and gets the finished timeline back. Tools that do this are marked
|
|
114
119
|
"(on conform.tools)" in `conformtools --list`, and need an internet connection.
|
|
115
120
|
|
|
121
|
+
## Scripts (`script_run`, `script_read`)
|
|
122
|
+
|
|
123
|
+
For a job of many steps (probe every file in a folder, QC every clip of a cut), the AI writes one
|
|
124
|
+
short TypeScript script that calls the tools as functions, `await ct.media_probe({ path })`, and
|
|
125
|
+
runs it with `script_run`. Only what the script returns goes back to the AI, not every step's
|
|
126
|
+
output: fewer round trips, fewer tokens. The script runs on this machine in a sandbox (QuickJS)
|
|
127
|
+
with no file, network or process access except through the conformtools tools themselves, so
|
|
128
|
+
every call goes through the same checks as a direct tool call. `save_as` keeps a script in the
|
|
129
|
+
project's `scripts/` folder; run it again with `path`, or from a terminal:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
conformtools script_run '{"path":"~/.conform-mcp/projects/local/scripts/check-audio.ts"}'
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`script_read` is the same, but its scripts can call only the tools that change nothing (probe,
|
|
136
|
+
inspect, QC). It is marked read-only, so apps that ask before a tool changes anything run it
|
|
137
|
+
without asking, and apps that never ask (Codex running unattended) run it at all.
|
|
138
|
+
|
|
116
139
|
## Feedback and privacy
|
|
117
140
|
|
|
118
|
-
When
|
|
119
|
-
|
|
141
|
+
When a tool fails, or you tell the AI a result was wrong, nothing needs filing: the outcome
|
|
142
|
+
telemetry below records it with the run (the error, with every name replaced, and which system
|
|
143
|
+
it ran on), so we see every failure, not only the ones someone reported.
|
|
120
144
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
(which tool ran, in what order, how long it took, whether it failed and the error), with every
|
|
127
|
-
folder path cut down to the file name:
|
|
128
|
-
`/Volumes/CLIENT/secret/A001.mov` is sent as `A001.mov`
|
|
145
|
+
When you or the AI want to tell us a lesson or a suggestion (nothing broke), the `report` tool
|
|
146
|
+
sends it and gives you a report id. A note contains the words the AI wrote, the conformtools
|
|
147
|
+
version, whether timelines were read on this machine or on conform.tools, your OS and Node.js
|
|
148
|
+
version, and the signed-in account. Folder paths are cut to the file name:
|
|
149
|
+
`/Volumes/CLIENT/secret/A001.mov` is sent as `A001.mov`.
|
|
129
150
|
|
|
130
|
-
When
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
know which tool to build next. File names at most, never folder paths.
|
|
151
|
+
When no conformtools tool fits what you asked, the AI looks one up first (`find_verb`). When
|
|
152
|
+
nothing fits, that lookup is how we learn which tool to build next: it is recorded with the
|
|
153
|
+
outcome telemetry below, as a one-line summary with every name replaced.
|
|
134
154
|
|
|
135
|
-
|
|
155
|
+
No note ever sends media, file contents or timeline files. A copy of each one,
|
|
136
156
|
exactly as sent, is kept in `~/.conform-mcp/reports/`.
|
|
137
157
|
|
|
158
|
+
**Conversions are checked.** Reading and writing timelines run on conform.tools (the same engine as the
|
|
159
|
+
website). The timeline's structure goes there to be converted, and the converted file comes back. The original
|
|
160
|
+
timeline file (the `.prproj`, `.drt`, `.aaf`…, never media) is kept with that conversion the same way a website
|
|
161
|
+
conversion keeps it, so our checks can compare what we wrote against it with each host's own rules. It is kept as
|
|
162
|
+
long as your plan keeps conversions, and `conformtools telemetry off` stops it along with the telemetry below.
|
|
163
|
+
|
|
138
164
|
**Outcome telemetry is on unless you turn it off.** It is how we find where the tools fail
|
|
139
165
|
an AI and fix them, and it never carries your material.
|
|
140
166
|
|
|
@@ -142,14 +168,20 @@ an AI and fix them, and it never carries your material.
|
|
|
142
168
|
conformtools telemetry off # or on, or status
|
|
143
169
|
```
|
|
144
170
|
|
|
145
|
-
It records, for each tool run: the tool's name, whether it worked (or the error code
|
|
171
|
+
It records, for each tool run: the tool's name, whether it worked (or the error code and, for
|
|
172
|
+
a failure, the error message with every name and path replaced by a placeholder), how
|
|
146
173
|
long it took, the conformtools version, local or conform.tools, counts such as the number of
|
|
147
174
|
clips, files, or matched and unmatched references (numbers only), the names of the arguments
|
|
148
175
|
the AI gave (never their values), and the call's place in the conversation (a random id and a
|
|
149
|
-
number, so we can see that a call was retried or followed by the wrong tool)
|
|
176
|
+
number, so we can see that a call was retried or followed by the wrong tool), and the system
|
|
177
|
+
it ran on: OS and version, chip (Apple silicon, Intel), Node.js version, memory and CPU count, and a random
|
|
178
|
+
install id made on first use (so your laptop and your suite can be told apart; never a name, serial or address). For a call
|
|
150
179
|
the AI got wrong (missing or invalid arguments) it records the tool's name and the names of
|
|
151
|
-
the arguments, never their values.
|
|
152
|
-
|
|
180
|
+
the arguments, never their values. For each request you make, it also records the AI's own
|
|
181
|
+
one-line summary of it with every show, person, clip, reel, scene and path written as a
|
|
182
|
+
placeholder ("relink {reel} to the camera originals"), scrubbed again on your machine and on
|
|
183
|
+
arrival, and whether the AI found the request before solved. It never records paths, file or
|
|
184
|
+
clip names, timeline contents, project notes, your own words or media. Events are sent in batches at most every 15 minutes, a failed send never
|
|
153
185
|
slows a tool down, and turning it off deletes anything not yet sent. `CONFORM_TELEMETRY=off`
|
|
154
186
|
forces it off on a machine.
|
|
155
187
|
|
|
@@ -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,j,k,l,m}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-6NLB5TZ2.js";import"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{b as NET_TIMEOUT_MS,c as _forgetOffline,d as accessToken,e as accountStatus,a as config,g as includesOf,l as login,m as logout,k as requireApp,i as requireEntitled,j as requireMcp,h as setAccountGate,f as statusText};
|
|
@@ -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}from"./chunk-
|
|
3
|
+
import{a,b,c,d}from"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{a as analysisEnginePath,c as analysisOp,d as startAnalysisEngine,b as startAnalysisJob};
|
|
@@ -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 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-NXJZXXC2.js";import"./chunk-B77ADB26.js";import"./chunk-G3SZDPDS.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};
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{
|
|
3
|
+
import{$ as r,A as O,E as A,F as R,G as q,J as F,K as N,N as f,b as _,g as m,i as L,n as x,r as T,s as U,t as $,u as P,v as E,x as k,y as V}from"./chunk-G3SZDPDS.js";var H="7145B29C33684D8AA1C7E5126F9B405D",w="conform.tools.dvcp.bundle",J="https://raw.githubusercontent.com/tbdpost/conformtools-public/main/plugin/manifest.json";function z(t=m()){return t==="win32"?{system:`${_("PROGRAMDATA")??"C:\\ProgramData"}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`,user:`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`}:t==="linux"?{system:"/opt/resolve/IOPlugins",user:r(x(),".local/share/DaVinciResolve/IOPlugins")}:{system:"/Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins",user:r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins")}}function W(t=m()){return t==="win32"?`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\logs\\ResolveDebug.txt`:t==="linux"?r(x(),".local/share/DaVinciResolve/logs/ResolveDebug.txt"):r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/logs/ResolveDebug.txt")}function j(t=m(),e=L()){return t==="darwin"?{key:"darwin-universal",binary:"Contents/MacOS/conform.tools.dvcp"}:t==="linux"&&/x86_64|x64/.test(e)?{key:"linux-x86_64",binary:"Contents/Linux-x86-64/conform.tools.dvcp"}:t==="win32"?{key:"windows-x86_64",binary:"Contents/Win64/conform.tools.dvcp"}:null}async function M(t){let e=r(t,"Contents/Resources/VERSION");if(await P(e))return(await k(e)).trim()||null;let n=r(t,"Contents/Info.plist");return await P(n)?/<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)</.exec(await k(n))?.[1]??null:null}function K(t,e){let n=t.split(`
|
|
4
4
|
`),s=n.find(l=>l.includes("Running DaVinci Resolve"));if(!s)return null;let i=/(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}),(\d{3})/.exec(s);if(!i)return null;let u=new Date(`${i[1]}T${i[2]}.${i[3]}`),a=n.some(l=>/plugin repository/i.test(l)&&l.toUpperCase().includes(`LOADED PLUGIN [${H}]`));return{launched_at:u.toISOString(),loaded:a,installed_after_launch:e!==void 0&&e>u.getTime()}}async function tt(t=m()){let e=j(t),n=z(t),s=r(n.system,w),i=e?await E(s)&&await $(r(s,e.binary)):!1,u=i?await M(s):null,a=r(n.user,w),l=await E(a)?{path:a,version:await M(a)}:void 0,c=null;try{let D=i&&e?(await U(r(s,e.binary))).mtimeMs:void 0;c=K(await k(W(t)),D)}catch{}let p=e?i?c?c.loaded&&!c.installed_after_launch?"ready":"needs-restart":"unknown":"plugin-missing":"unsupported-platform",g={ready:"The plugin is installed and loaded.","plugin-missing":l?`Only a per-user copy exists (${a}); Resolve loads I/O plugins only from ${n.system}. Install it with host_setup action=install_renderplugin.`:"Install it with host_setup action=install_renderplugin, then restart Resolve.","needs-restart":"Restart Resolve: it loads I/O plugins only at launch.","unsupported-platform":"There is no build of the plugin for this platform.",unknown:"Start Resolve once so its log says whether it loaded the plugin."}[p];return{platform:e?.key??null,installed:i,path:s,version:u,...l?{shadowed:l}:{},resolve:c,readiness:p,next:g}}async function et(){for(let t of["./presets/conform.tools.xml","./resolve-presets/conform.tools.xml"]){let e=T(new URL(t,import.meta.url));if(await P(e))return e}throw new Error("resolve: the conform.tools render preset is missing from this install")}async function X(t){let e=new Uint8Array(await crypto.subtle.digest("SHA-256",t));return Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}async function G(t,e=3){for await(let n of N(t)){if(!n.isDirectory)continue;let s=r(t,n.name);if(n.name===w)return s;if(e>0&&!n.name.startsWith("__MACOSX")){let i=await G(s,e-1);if(i)return i}}return null}var Q=async t=>{let e=await fetch(t,{signal:AbortSignal.timeout(12e4)});if(!e.ok)throw new Error(`download failed: ${t} answered ${e.status}`);return new Uint8Array(await e.arrayBuffer())};async function nt(t={}){let e=t.os??m(),n=j(e);if(!n)throw new Error("there is no build of the plugin for this platform");let s=t.fetcher??Q,i=JSON.parse(new TextDecoder().decode(await s(t.manifest_url??J))),u=i.platforms?.[n.key]??(e==="darwin"&&i.bundle_url?{bundle_url:i.bundle_url,sha256:i.sha256??""}:void 0);if(!u)throw new Error(`plugin ${i.version} has no ${n.key} build`);let a=await s(u.bundle_url),l=await X(a);if(l!==u.sha256.toLowerCase())throw new Error(`the downloaded plugin failed its checksum (got ${l}, the manifest says ${u.sha256}); nothing was installed`);let c=await F("conform-plugin-"),p=r(c,"plugin.zip");await V(p,a);let g=r(c,"x");await O(g);let D=e==="darwin"?await f("ditto",["-x","-k",p,g]):e==="win32"?await f("powershell",["-NoProfile","-Command",`Expand-Archive -LiteralPath '${p}' -DestinationPath '${g}' -Force`]):await f("unzip",["-q",p,"-d",g]);if(!D.success)throw new Error(`could not unpack the plugin: ${D.stderr.trim()}`);let b=await G(g);if(!b||!await $(r(b,n.binary)))throw new Error(`the ${n.key} download does not contain ${n.binary}`);let h=t.targetDir??z(e).system,d=r(h,w),I=r(h,`.${w}.staging`),y=r(h,`.${w}.previous`),C=[],S=!1;try{await O(h),await R(I),await q(b,I),await R(y),await $(d)&&await A(d,y);try{await A(I,d)}catch(v){throw await $(y)&&await A(y,d),v}await R(y)}catch(v){let B=v.code;if(B!=="EACCES"&&B!=="EPERM")throw v;S=!0,await Y(e,b,h)}return e==="darwin"&&((await f(S?"osascript":"xattr",S?["-e",`do shell script "xattr -dr com.apple.quarantine ${o(d)}" with administrator privileges`]:["-dr","com.apple.quarantine",d])).success||C.push("could not clear the quarantine flag; if Resolve refuses the plugin, run: xattr -dr com.apple.quarantine "+d)),await R(c),{version:i.version,path:d,elevated:S,restart_required:!0,notes:C}}var o=t=>`'${t.replace(/'/g,"'\\''")}'`;async function Y(t,e,n,s=w){let i=r(n,s),u=r(n,`.${s}.staging`),a=r(n,`.${s}.previous`),l=[`mkdir -p ${o(n)}`,`rm -rf ${o(u)} ${o(a)}`,`cp -R ${o(e)} ${o(u)}`,`if [ -e ${o(i)} ]; then mv ${o(i)} ${o(a)}; fi`,`mv ${o(u)} ${o(i)} || { [ -e ${o(a)} ] && mv ${o(a)} ${o(i)}; exit 1; }`,`rm -rf ${o(a)}`].join(" && "),c=t==="darwin"?await f("osascript",["-e",`do shell script ${JSON.stringify(l)} with administrator privileges`]):t==="linux"?await f("pkexec",["sh","-c",l]):{success:!1,stderr:"run this from an administrator prompt",stdout:"",code:1};if(!c.success)throw new Error(`installing into ${n} needs an administrator, and that was refused or failed: ${c.stderr.trim()}`)}export{tt as a,et as b,nt as c,Y as d};
|
|
@@ -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{Vc as d}from"./chunk-LYM757KG.js";import{$ as f,A as p,C as m,m as c,x as u,z as l}from"./chunk-G3SZDPDS.js";import o from"node:process";import{readFileSync as g,rmSync as h}from"node:fs";import{createConnection as w}from"node:net";var x=new Set(["tool_run","app","tool"]),s=()=>f(c(),"engine.json");async function I(e,r){await p(c()),await l(s(),JSON.stringify({port:e,token:r||void 0,pid:o.pid})),await m(s(),384);for(let t of["SIGINT","SIGTERM"])o.on(t,()=>o.exit(0));o.on("exit",()=>{try{JSON.parse(g(s(),"utf8")).pid===o.pid&&h(s())}catch{}})}function S(e,r=1500){return new Promise(t=>{let n=w({host:"127.0.0.1",port:e}),i=y=>{clearTimeout(a),n.destroy(),t(y)},a=setTimeout(()=>i(!1),r);n.once("connect",()=>i(!0)).once("error",()=>i(!1))})}async function O(e,r){if(!x.has(e))return null;let t;try{t=JSON.parse(await u(s()))}catch{return null}if(t.pid===o.pid||!await S(t.port))return null;let n;try{n=await fetch(`http://127.0.0.1:${t.port}/verbs/${e}`,{method:"POST",body:JSON.stringify(r),headers:{"content-type":"application/json","x-conform-client":d()??"mcp",...t.token?{authorization:`Bearer ${t.token}`}:{}}})}catch{return null}if(n.status===401||n.status===404)return null;let{text:i,...a}=await n.json();return{content:[{type:"text",text:i??""}],structuredContent:a,isError:!n.ok}}export{I as a,O as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
var o=Object.defineProperty,p=(e,r,i)=>r in e?o(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,_=(e,r,i)=>(p(e,typeof r!="symbol"?r+"":r,i),i);export{_ as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{a as E}from"./chunk-PHAMF4JF.js";import{Q as x,b as y,f as g,g as f,j as w,k as h,r as p,u as b}from"./chunk-G3SZDPDS.js";async function k(){let e=f()==="win32"?"conformtools-analyze.exe":"conformtools-analyze",r=[y("CONFORM_ANALYZE"),w(e),p(new URL(`./${e}`,import.meta.url)),p(new URL(`../../rust/target/release/${e}`,import.meta.url))].filter(Boolean);for(let n of r)if(await b(n))return n;return null}var R=e=>e.code==="not_entitled"?new E("not_entitled",String(e.why)):void 0;async function A(e){let r=await P(),n=await r.ask({op:"job",reference:e.reference,clips:e.clips,lite:e.lite??!0,display:!!e.display});if(!n.ok)throw r.close(),R(n)??new Error(`analysis engine: ${n.why}`);return r}async function N(e,r,n){let i=await P(),t=()=>i.close();n?.addEventListener("abort",t);let s;try{s=await i.ask(e,r)}finally{n?.removeEventListener("abort",t),i.close()}if(n?.aborted)throw new Error("cancelled");if(!s.ok)throw R(s)??new Error(s.why??`the analysis engine could not run ${e.op}`);return s}async function P(){let e=await k();if(!e)throw new Error(h("the analysis engine (conformtools-analyze)"));let r="",n=null,i=[],t=x(e,["serve"],o=>{r+=new TextDecoder().decode(o);let a;for(;(a=r.indexOf(`
|
|
4
|
+
`))>=0;){let c=r.slice(0,a);r=r.slice(a+1);let l=JSON.parse(c);if(l.progress){n?.progress?.(l.progress[0],l.progress[1],l.phase??"");continue}let d=n;n=null,d?.done(l)}},o=>{console.error(o.trimEnd()),i=[...i,...o.split(`
|
|
5
|
+
`).filter(a=>a.trim())].slice(-3)}),s=null;t.exited.then(o=>{s={ok:!1,why:`the analysis engine exited${o==null?"":` (code ${o})`}${i.length?`: ${i.join(" | ").slice(0,400)}`:""}`},n?.done(s)});let m=Promise.resolve();return{ask:(o,a)=>{let c=m.then(async()=>{t.hold(!0);try{if(s)return s;let l=new Promise(v=>{n={done:v,progress:a}}),u=await t.write(new TextEncoder().encode(JSON.stringify(o)+`
|
|
6
|
+
`)).then(()=>!0,()=>!1)?await l:await Promise.race([l,t.exited.then(()=>s??{ok:!1,why:"the analysis engine exited"})]);return u.miss&&(console.error(`[mirror] MISS \u2014 ${u.miss} is not in the mirror. Replay never reads the source drive; record this case again with the drive mounted (CONFORM_MIRROR_MODE=record).`),g(75)),u}finally{t.hold(!1)}});return m=c.catch(()=>{}),c},close:()=>t.close()}}export{k as a,A as b,N as c,P as d};
|
|
@@ -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 z}from"./chunk-
|
|
3
|
+
import{a as z}from"./chunk-64X5DLH5.js";import{a as w}from"./chunk-PHAMF4JF.js";import{$ as o,A as C,B as y,C as G,K as F,N as J,R as K,S as X,b as s,g as E,m as u,n as B,t as j,x as d,z as N}from"./chunk-G3SZDPDS.js";var Y={transferGB:2e3},f={payg:{id:"payg",name:"Pay As You Go",monthly:0,yearly:0,stripe:{},includes:{web:!0,mcp:!1,app:!1}},web:{id:"web",name:"Web",monthly:10,yearly:100,stripe:{},includes:{web:!0,mcp:!1,app:!1},allowance:{transferGB:50}},indie:{id:"indie",name:"MCP",monthly:49,yearly:490,stripe:{monthly:"price_1T5XDXJ5lnla0aaLasKq49tm",yearly:"price_1T5XDXJ5lnla0aaL2MdMSuI9"},includes:{web:!0,mcp:!0,app:!1},allowance:{transferGB:250}},pro:{id:"pro",name:"App",monthly:199,yearly:1990,stripe:{monthly:"price_1T5X8oJ5lnla0aaLyNJa93H0",yearly:"price_1T5X8oJ5lnla0aaL3dh7b1el"},includes:{web:!0,mcp:!0,app:!0},allowance:Y},studio:{id:"studio",name:"Studio",monthly:"custom",yearly:"custom",stripe:{monthly:"price_1T5X7xJ5lnla0aaLoeE1aBlL",yearly:"price_1T5X7xJ5lnla0aaLeBiYo3Di"},includes:{web:!0,mcp:!0,app:!0},allowance:Y}};var H={web:!0,mcp:!1,app:!1};var Ie=Object.fromEntries(Object.values(f).flatMap(e=>Object.values(e.stripe).map(t=>[t,e.id])));import{createPrivateKey as Oe,createPublicKey as le,sign as Ee,verify as ue}from"node:crypto";import{Buffer as m}from"node:buffer";var pe="CONFORMTOOLS_LICENSE_V1",q=/^[0-9A-F]{8}(-[0-9A-F]{8}){3}$/,V=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 Z(e){let t=e.split(/\r?\n/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")&&!r.startsWith("-----")).join(""),n=JSON.parse(m.from(t,"base64").toString("utf8"));if(n?.magic!==pe||!n.payload?.data)throw new Error("not a conform.tools licence");return n.payload}function W(e,t){let n=m.from(e.signature,"base64"),r=m.from(V(e.data));return n.length!==64?!1:t.some(i=>ue(null,r,le({key:m.concat([m.from("302a300506032b6570032100","hex"),m.from(i)]),format:"der",type:"spki"}),n))}var de=["cMwVBrEYKMzlG6pC7FF2lNKIoEqGz2xB5yph6clNnTg=","qnheqkkDU09l1oI6h2CFh4uQ97bY/hkTA5niGKH0+X8="],fe=de.map(e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)));function L(){let e=s("CONFORM_RECORDS_DIR");if(e)return e;let t=B(),n=E()==="darwin"?o(t,"Library/Application Support"):E()==="win32"?s("LOCALAPPDATA")??o(t,"AppData/Local"):s("XDG_DATA_HOME")??o(t,".local/share");return o(n,"conform.tools")}var me=()=>s("CONFORM_LICENSE_PATH")??o(L(),"license.lic"),I=()=>o(L(),"grant.lic"),ge=null;function T(){return ge??=(async()=>{let e=await z();if(!e)return[];let t=await J(e,["machine"],{timeoutMs:15e3}).catch(()=>null);try{return JSON.parse(t?.stdout??"").machines.filter(n=>q.test(n))}catch{return[]}})()}function he(e,t,n=Date.now()){if(!W(e,fe))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 Q(){let e;try{e=await d(me())}catch{return null}try{return he(Z(e),await T())}catch(t){return{ok:!1,reason:t.message}}}var _e={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 a(){let e=s("CONFORM_ENV")==="staging"?"staging":"production",t=_e[e];return{env:e,supabaseUrl:s("CONFORM_SUPABASE_URL")??t.supabaseUrl,anonKey:s("CONFORM_SUPABASE_ANON_KEY")??t.anonKey,appBase:s("CONFORM_APP_BASE")??t.appBase}}var ye=600*1e3,ee=72*3600*1e3,we=300*1e3,x=()=>o(u(),a().env==="production"?"auth.json":`auth-${a().env}.json`);async function $(){for(let e of new Set([x(),o(u(),"auth.json")]))try{let t=JSON.parse(await d(e));if(t.env===a().env&&t.access_token)return t}catch{}return null}async function be(){try{for await(let e of F(u())){if(!/^auth(?:-(\w+))?\.json$/.exec(e.name))continue;let n=JSON.parse(await d(o(u(),e.name)));if(n.access_token&&n.env&&n.env!==a().env)return{other_env:n.env}}}catch{}return{}}async function D(e){await C(u()),await N(x(),JSON.stringify(e)),await G(x(),384)}var ne=6e3,v=0,re=()=>Date.now()<v,ie=()=>{v=Date.now()+6e4};function Fe(){v=0}async function ae(e){if(e.expires_at-60>Date.now()/1e3)return e.access_token;if(re())return null;let t=a();try{let n=await fetch(`${t.supabaseUrl}/auth/v1/token?grant_type=refresh_token`,{method:"POST",headers:{apikey:t.anonKey,"content-type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token}),signal:AbortSignal.timeout(ne)}).catch(i=>{throw ie(),i});if(!n.ok)return n.status===400||n.status===401?"":null;let r=await n.json();return e.access_token=r.access_token,r.refresh_token&&(e.refresh_token=r.refresh_token),e.expires_at=r.expires_at??Math.floor(Date.now()/1e3)+(r.expires_in??3600),await D(e),e.access_token}catch{return null}}async function Je(){let e=await $();return e&&await ae(e)||null}var g=null;function te(e,t){return{signed_in:!0,entitled:e.entitled,env:a().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 oe(e={}){let t=await Q();if(t?.ok)return{signed_in:!!await $().catch(()=>null),entitled:!0,env:a().env,email:t.data.email,access:"licence",tier:t.data.tier,source:"licence"};let n=await xe(e);return t&&!n.entitled?{...n,licence_error:t.reason}:n}async function xe(e){if(!e.force&&g&&Date.now()-g.at<ye)return{...g.status,source:"cache"};let t=a(),n=await $();if(!n)return{signed_in:!1,entitled:!1,env:t.env,reason:"not_signed_in",...await be()};let r=await ae(n);if(r==="")return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(r&&!re())try{let i=(await T())[0],c=await fetch(`${t.supabaseUrl}/functions/v1/v1-billing/v1/billing/entitlement${i?`?machine=${i}`:""}`,{headers:{authorization:`Bearer ${r}`,apikey:t.anonKey},signal:AbortSignal.timeout(ne)}).catch(l=>{throw ie(),l});if(c.status===401||c.status===403)return{signed_in:!0,entitled:!1,env:t.env,reason:"auth_rejected"};if(c.ok){let{grant:l,...S}=(await c.json()).data;i&&await ve(l),n.last_entitlement=S,n.last_entitlement_at=Date.now(),await D(n);let A=te(S,"live");return g={at:Date.now(),status:A},A}}catch{}if(n.last_entitlement&&n.last_entitlement_at&&Date.now()-n.last_entitlement_at<ee){let i=ee-(Date.now()-n.last_entitlement_at);return{...te(n.last_entitlement,"grace"),grace_remaining_h:Math.round(i/36e4)/10}}return{signed_in:!0,entitled:!1,env:t.env,reason:"offline_grace_expired"}}async function ve(e){try{if(!e)return await y(I());await C(L()),await N(I(),e)}catch{}}function Se(e){return e.source==="licence"?`${e.email} \xB7 machine licence (${e.tier}) \u2014 runs offline, no account check`:Ae(e)+(e.licence_error?`
|
|
4
4
|
(the machine licence was not used: ${e.licence_error})`:"")}function Ae(e){let t=a();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
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
6
|
no active plan on ${e.email??"this account"}: the trial has ended and there is no subscription. 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?` (${e.tier})`:""}`,i=P(e),c=i?` \xB7 includes ${[i.web&&"the web tools",i.mcp&&"the MCP",i.app&&"the app"].filter(Boolean).join(", ")||"the web tools"}`:"";return`${n}
|
|
@@ -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 s}from"./chunk-G3SZDPDS.js";var l="0.6.12";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};
|
|
@@ -0,0 +1,10 @@
|
|
|
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 J,h as fe}from"./chunk-XDI6CPPV.js";import{a as pe}from"./chunk-P3XI63Q2.js";import{i as C}from"./chunk-F4PHKOAS.js";import{b as D,d as K,f as M}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-PHAMF4JF.js";import{$ as _,A as j,E as W,K as v,L as A,M as ne,P as oe,Y as b,Z as y,_ as L,b as E,c as Z,d as Q,g as q,j as ee,k as re,r as I,s as H,u as te,v as O,y as B}from"./chunk-G3SZDPDS.js";var V=!1;var F=8,Pe=0,Ee=3,z=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(u,m,d)=>{let f=n[u]+m;return new Uint8Array(await e.slice(f,Math.min(f+d,n[u]+i[u].size)).arrayBuffer())},a=JSON.stringify(i.map(u=>({name:u.name,size:u.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(u=>({offset:n[u.part??0]+u.essenceOffset,size:u.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,u=(i.inner_codec??"").toLowerCase(),m=null,d="MXF";return u==="arriraw"?(m={codec:"arriraw",w:c,h:l,scale:F},d="ARRIRAW"):u==="xocn"?(m={codec:"xocn",scale:F,...V?{display:"rec709"}:{}},d="X-OCN"):await ae(r,e.size)?(m={codec:"vc3",scale:F},d="DNxHR"):await se(r,e.size)?(m={codec:"prores"},d="ProRes"):o.push(`MXF inner codec ${u||"unknown"} not wired to the fingerprint pool`),{frames:m?s:[],w:c,h:l,fps:we(i),startFrame:i.timecode?.start_frame??0,dropFrame:i.timecode?.drop_frame??!1,label:d,spec:m,geometrySpec:m&&m.codec==="arriraw"?{...m,scale:z}:m&&m.codec==="xocn"?{codec:"xocn",scale:z,...V?{display:"rec709"}:{}}:m&&m.codec==="vc3"?{codec:"vc3",scale:z}: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:J(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:J(r.kind),spec:null,geometrySpec:null,index:r,warnings:o};let n=i==="braw"?{codec:"braw",scale:F}:r.codec==="aprh"||r.codec==="aprn"?{codec:"proresraw",scale:F}: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:z}:null,index:r,warnings:o}}throw new Error(`${e.name}: unrecognised container`)}var De=Number(E("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=[E("CONFORM_NATIVE_DECODE"),ee(e),I(new URL(`./${e}`,import.meta.url)),I(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),p=0;for(;p<d;){let h=a[0],g=Math.min(h.length,d-p);f.set(h.subarray(0,g),p),p+=g,g===h.length?a.shift():a[0]=h.subarray(g)}return c-=d,f},u=[e,t,"--width",String(i.width??32768)];i.from!=null&&u.push("--from",String(i.from)),i.count!=null&&u.push("--count",String(i.count)),i.range&&u.push("--range",i.range);let m=await ze(n,u,d=>{if(a.push(d),c+=d.length,!s){let p=Ue(a.splice(0));a.push(p);let h=p.indexOf(10);if(h<0)return;s=JSON.parse(new TextDecoder().decode(p.subarray(0,h))),l(h+1),o(s)}let f=4+s.w*s.h*(s.bpp??(e==="rgb16"?6:4));for(;c>=f;){let p=l(f);r(new DataView(p.buffer).getUint32(0,!0),p.subarray(4))}},{signal:i.signal});if(m.code!==0||!s)throw Te(m.stderr,m.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"],N=e=>(e>>4)*10+(e&15);function Ie(e){let t=N(e&63),o=N(e>>>8&127),r=N(e>>>16&127),i=N(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),u=t.getUint32(r+4,!0);o.fps=u?l/u: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 O(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 A(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 A(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 O(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 C(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,u)=>{l===t&&(c=u.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 P(e){if(/\.exr$/i.test(e))return Re(e);let t=await Y(e);try{let o=await C(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:D(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(m=>m.kind==="video"),r=e.streams?.filter(m=>m.kind==="audio")??[],i=e.vendor_metadata?.bext;if(!o&&e.available_range&&r[0]?.rate){let m=r[0].rate,d=e.available_range.duration.value,p=(t?[t]:[24e3/1001,24]).map(h=>{let g=Ke(i?.time_reference??0,i?.sample_rate||m,d,h);return`${i?`start TC ${g.tc}, `:""}${g.frames} frames @ ${Ve(h)} fps`});return[e.target_url??"",`audio only; ${d} samples (${(d/m).toFixed(3)} s)${i?`; BWF time_reference ${i.time_reference}`:"; no BWF timecode"}`,...p,...t?[]:["(pass fps for the project's rate)"],...r.map((h,g)=>`audio ${r.length>1?`${g+1}: `:""}${h.codec??"pcm"} ${h.channels??"?"}ch ${h.rate} Hz ${h.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??{},u=[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`:""}${u?`; ${u}`:""}`:"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((m,d)=>{let f=m.codec_specific?.channel_layout;return`audio ${r.length>1?`${d+1}: `:""}${m.codec??"pcm"} ${m.channels??"?"}ch${f?` (${f})`:""} ${m.rate??"?"} Hz ${m.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,T=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 j(y(o));let i=await ne(o);try{await i.truncate(e.total_size),await i.writeAt(0,T(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,T(e.dest_footer_bytes_base64));for(let n of e.dest_patches??[])await i.writeAt(n.offset,T(n.bytes_base64))}finally{await i.close()}for(let n of e.dest_sidecar_writes??[])await B(_(y(o),n.name),T(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 C(n.source,{verb:"trim",selection:{items:t,handles:o}}),c=L(n.anchor),l=n.format==="r3d",u=l?R(b(n.anchor))?.clipBase??b(n.anchor,c):b(n.anchor,c),m=[];for(let[d,f]of a.entries()){let p=f.output_clip_number??(s.length>1?d+1:void 0),h=s[(p??1)-1]??s[0],g=p&&(f.output_clip_count??s.length)>1?`_S${String(p).padStart(3,"0")}`:"",w;if(l){let x=f.output_part_number??d+1;w=_(r,`${u}${g}.RDC`,`${u}_${String(x).padStart(3,"0")}.R3D`),m.push({path:w,bytes:f.total_size,island:h,part:x,clip:p})}else{let x=i&&a.length===1?i:`${u}${g||`_trim_${h.first_frame}-${h.last_frame}`}${c}`;w=_(r,x),m.push({path:w,bytes:f.total_size,island:h,clip:p})}await Ge(f,n,w)}return l||await Qe(e,m,!!i&&a.length===1),{outputs:m,islands:s,format:n.format}}finally{n.close()}}async function Qe(e,t,o){let r=await P(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 P(n.path).catch(()=>null),a=s?.available_range?.duration?.value??s?.declared_duration?.value;if(!s?.source_timecode||!a)continue;let c=M(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 W(n.path,l),n.path=l)}}async function jr(e){let t=await P(e.path),o=t.source_fps??t.streams?.find(p=>p.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=M(e.in,o,t.source_timecode??null),n=M(e.out,o,t.source_timecode??null);if(e.out_exclusive&&(n-=1),n<i)throw new Error(`out (${n}) is before in (${i})`);if(i<0)throw new Error(`in (${i}) is before the file start (TC ${t.source_timecode})`);if(r!=null&&n>r-1)throw new Error(`out (${n}) is past the last frame (${r-1})`);let s={id:"trim",kind:"clip",source_range:{start:{value:i,rate:o},duration:{value:n-i+1,rate:o}}},a=y(e.path),c;if(e.out_path)try{(await H(e.out_path)).isDirectory?a=e.out_path:(a=y(e.out_path),c=b(e.out_path))}catch{a=y(e.out_path),c=b(e.out_path)}let l=await Ze(e.path,[s],Math.max(0,Math.floor(e.handles??0)),a,c),u=l.islands[0],m=l.outputs.length===1&&l.outputs[0].island?l.outputs[0].island:u,d=m.first_frame,f=m.last_frame;return{outputs:l.outputs,first_frame:d,last_frame:f,frames:f-d+1,fps:o,facts:t,...d!==u.first_frame||f!==u.last_frame?{asked:{first_frame:u.first_frame,last_frame:u.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 u 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(u.name.startsWith("."))continue;let m=_(c,u.name);if(u.isDirectory)l<o.max_depth?await a(m,l+1):n??=`folders deeper than max_depth=${o.max_depth} not searched (e.g. ${m})`;else if(u.isFile&&G.has(L(u.name).toLowerCase())){let d=qe(u.name,t);d&&r.push({path:m,match:d,size:(await H(m).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 P(l.path)}catch(u){l.error=u.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?K(e.source_timecode,o):null,s=n!=null&&r!=null&&o?D((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 P(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?K(r.source_timecode,i)??0:0,c=!!r.source_timecode?.includes(";"),l=d=>{let f=M(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},u=d=>D(((a+d)%s+s)%s,i,c),m=t.map((d,f)=>{let p=l(d.in),h=l(d.out),g=p,w=n-h,x=g>=0&&w>=0&&h>p,U=Math.max(0,-g),k=Math.max(0,-w),S=[];return h<=p?S.push("out is not after in"):x?S.push(`covered; handles head ${g} / tail ${w} fr`):S.push(`NOT covered: short ${[U?`${U} fr at head`:"",k?`${k} 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:u(p),out_tc:u(h),frames:h-p,covered:x,head:g,tail:w,short_head:U,short_tail:k,note:S.join("; ")}});return{facts:r,rows:m}}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,P 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};
|
|
@@ -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
|
-
var s={scrub:{output:"rgba8",detail:"coarse"},thumbnail:{output:"rgba8",detail:"coarse"},park:{output:"rgba8",detail:"exact"},render:{output:"rgba8",detail:"exact"},transcode:{output:"rgb16",detail:"exact"}};function p(e){let t=new DataView(e.buffer,e.byteOffset,8),r=t.getUint32(0,!0),n=t.getUint32(4,!0),o=e.slice(8);return{width:r,height:n,rgb16:new Uint16Array(o.buffer,o.byteOffset,r*n*3)}}var a=class extends Error{constructor(r,n){super(`COVERAGE_MISS: frame ${r} not in linked media (${n} frames)`);this.index=r;this.frameCount=n;this.name="CoverageMissError"}},m=/(?:[A-Z0-9]+_)?COVERAGE_MISS\s+(\{[\s\S]*\})/;function d(e){let r=(e instanceof Error?e.message:String(e??"")).match(m);if(!r)return null;try{return JSON.parse(r[1])}catch{return{reason:"coverage_miss"}}}var i=class extends Error{constructor(r){super(`DELIVERY_COVERAGE_MISS: ${r.reason}`+(r.cut_in!=null?` cut [${r.cut_in}..${r.cut_out}] file_frames ${r.file_frames}`:""));this.detail=r;this.name="DeliveryCoverageMissError"}};function l(e){return e instanceof i?e.detail:d(e)}var u={mov:()=>import("./isobmff-
|
|
3
|
+
var s={scrub:{output:"rgba8",detail:"coarse"},thumbnail:{output:"rgba8",detail:"coarse"},park:{output:"rgba8",detail:"exact"},render:{output:"rgba8",detail:"exact"},transcode:{output:"rgb16",detail:"exact"}};function p(e){let t=new DataView(e.buffer,e.byteOffset,8),r=t.getUint32(0,!0),n=t.getUint32(4,!0),o=e.slice(8);return{width:r,height:n,rgb16:new Uint16Array(o.buffer,o.byteOffset,r*n*3)}}var a=class extends Error{constructor(r,n){super(`COVERAGE_MISS: frame ${r} not in linked media (${n} frames)`);this.index=r;this.frameCount=n;this.name="CoverageMissError"}},m=/(?:[A-Z0-9]+_)?COVERAGE_MISS\s+(\{[\s\S]*\})/;function d(e){let r=(e instanceof Error?e.message:String(e??"")).match(m);if(!r)return null;try{return JSON.parse(r[1])}catch{return{reason:"coverage_miss"}}}var i=class extends Error{constructor(r){super(`DELIVERY_COVERAGE_MISS: ${r.reason}`+(r.cut_in!=null?` cut [${r.cut_in}..${r.cut_out}] file_frames ${r.file_frames}`:""));this.detail=r;this.name="DeliveryCoverageMissError"}};function l(e){return e instanceof i?e.detail:d(e)}var u={mov:()=>import("./isobmff-DN6MCHEK.js").then(e=>e.isobmffFormat),crm:()=>import("./isobmff-DN6MCHEK.js").then(e=>e.isobmffFormat),braw:()=>import("./isobmff-DN6MCHEK.js").then(e=>e.isobmffFormat),wav:()=>import("./wav-HSCUCY4U.js").then(e=>e.wavFormat),mxf:()=>import("./mxf-Q5723GPD.js").then(e=>e.mxfFormat),r3d:()=>import("./r3d-7OOZMPWH.js").then(e=>e.r3dFormat),still:()=>import("./still-SX6RJ7O6.js").then(e=>e.stillFormat),avc1:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),avc3:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),h264:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),hvc1:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),hev1:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),hevc:()=>import("./h264-5OGRVYUF.js").then(e=>e.h264Format),h264_mxf:()=>import("./h264-mxf-FTHNCK4B.js").then(e=>e.h264MxfFormat),mcvideo:()=>import("./mc-video-TF3MD7LN.js").then(e=>e.mcVideoFormat)};async function c(e){let t=u[e];return t?await t():null}async function f(e){let t=await c(e.format);if(!t)throw new Error(`extract: no handler for format '${e.format}'`);return t.extract(e)}async function b(e,t){let r=await c(e.format);if(!r){if(t.verb==="inspect")return null;throw new Error(`mediaOp: no handler for format '${e.format}' (verb ${t.verb})`)}switch(t.verb){case"inspect":{let n=await r.inspect(e);return n&&(n.source_facts_origin="probed"),n}case"sparsify":return r.sparsify(e,t.selection);case"trim":return r.trim(e,t.selection);case"decode":{let{output:n,detail:o}=s[t.intent];if(n==="rgb16"){if(!r.decode16)throw new Error(`mediaOp: format '${e.format}' has no 16-bit decoder (intent '${t.intent}')`);return r.decode16(e,t.index)}if(!r.decode)throw new Error(`mediaOp: format '${e.format}' has no decoder (no viewer)`);return r.decode(e,t.index,{detail:o})}}}export{s as a,p as b,a as c,d,i as e,l as f,c as g,f as h,b as i};
|
|
@@ -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{readFile as A,writeFile as N,appendFile as J,stat as W,readdir as q,mkdir as G,open as k,copyFile as Y,mkdtemp as K,rm as M,chmod as Q,rename as _,cp as V,statfs as X,realpath as Z}from"node:fs/promises";import{execFile as ee,spawn as B}from"node:child_process";import{createHash as te}from"node:crypto";import{createReadStream as re,chmodSync as ne,cpSync as oe,existsSync as D,statSync as E}from"node:fs";import{homedir as se,tmpdir as ie,platform as ae,release as ce,arch as le,totalmem as ue,availableParallelism as de}from"node:os";import{fileURLToPath as S}from"node:url";import me from"node:http";import fe from"node:http2";import f from"node:process";import{Buffer as P}from"node:buffer";import{basename as pe,dirname as ge,join as b,resolve as C,sep as v}from"node:path";import{createRequire as ye}from"node:module";import{basename as Rt,dirname as At,extname as kt,join as St,relative as Ut,resolve as Ft}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 A(S(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||ue(),He=()=>de(),Ie=()=>f.argv.slice(2),Ne=e=>f.exit(e),we=()=>f.platform,We=()=>h("CONFORM_PYTHON")??(we()==="win32"?"python":"python3"),Me=()=>f.arch,j=()=>`${f.platform}-${f.arch}`;function _e(e){try{return b(ge(ye(import.meta.url).resolve(`${be(j())}/package.json`)),e)}catch{return null}}var be=e=>`conformtools-${e==="win32-x64"?"windows-x64":e}`,Be=e=>`${e} is not in this package for ${j()} (conform.tools builds it for darwin-arm64, darwin-x64, linux-x64 and win32-x64)`;function je(){let e=f.versions.deno;return{platform:`${ae()} ${ce()} ${le()}`,runtime:e?`deno ${e}`:`node ${f.version}`}}var he=()=>h("CONFORM_MCP_HOME")??b(R(),".conform-mcp"),R=()=>h("HOME")??se();function ze(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=S(t)}catch{}return t==="~"?t=R():(t.startsWith("~/")||t.startsWith("~\\"))&&(t=b(R(),t.slice(2))),t&&C(t)+(/[\\/]$/.test(t)&&!/[\\/]$/.test(C(t))?v:"")}async function Le(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,a])=>[c,typeof a=="bigint"?Number(a):a])))}finally{r.close()}}let o=await F("sqlite3",["-readonly","-json",e,t]);if(!o.success)throw new Error(`sqlite3 ${pe(e)}: ${o.stderr.trim()||o.stdout.trim()}`);return o.stdout.trim()?JSON.parse(o.stdout):[]}var Je=(e,t)=>e?`${e.replace(/[\\/]+$/,"")}${e.includes("\\")&&!e.includes("/")?"\\":"/"}${t}`:t;function qe(e){let t=S(e),n=t.indexOf(`${v}deno-compile-`);if(n<0||!D(t))return t;let o=t.slice(n+1).split(v).slice(1).join(v),r=b(he(),"bin",o);try{let s=E(t),i=D(r)?E(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 H=null;var x=e=>H?.owns(e)?H:null;async function I(e){let t=await W(e);return{isFile:t.isFile(),isDirectory:t.isDirectory(),size:t.size,mtimeMs:t.mtimeMs}}function U(e){return x(e)?.stat(e,()=>I(e))??I(e)}async function Ge(e){try{return await U(e),!0}catch{return!1}}async function Ye(e){try{return(await U(e)).isFile}catch{return!1}}async function Ke(e){try{return(await U(e)).isDirectory}catch{return!1}}async function Qe(e){x(e)?.guard(e,"read whole file");let t=await A(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var Ve=e=>A(e,"utf8"),Xe=(e,t)=>N(e,t),Ze=(e,t,n)=>n?.append?J(e,t):N(e,t);async function et(e){await G(e,{recursive:!0})}var tt=e=>M(e,{force:!0}),rt=(e,t)=>Q(e,t).catch(()=>{}),nt=(e,t)=>Y(e,t),ot=(e,t)=>_(e,t),st=e=>M(e,{recursive:!0,force:!0}),it=(e,t)=>V(e,t,{recursive:!0,verbatimSymlinks:!0});async function at(e){try{let t=await X(e);return Number(t.bavail)*Number(t.bsize)}catch{return null}}async function ct(e){try{return await Z(e)}catch{return null}}var lt=(e="conform-")=>K(b(ie(),e));async function*ut(e){let t=async()=>(await q(e,{withFileTypes:!0})).map(n=>({name:n.name,isFile:n.isFile(),isDirectory:n.isDirectory()}));yield*await(x(e)?.readDir(e,t)??t())}async function dt(e){x(e)?.guard(e,"read bytes");let t=await k(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 mt(e){let t=await k(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 z=(e,t)=>{for(let n of t)x(n)?.guard(n,`${e.split(/[\\/]/).pop()} ${t[0]}`)};function F(e,t,n={}){return z(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 xe="[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 ft(){let e=await F("powershell.exe",["-NoProfile","-NonInteractive","-Command",xe],{timeoutMs:3e4});return ve(e.stdout)}function ve(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 pt(e,t,n,o={}){return z(e,t),new Promise((r,s)=>{let i=B(e,t,{env:o.env?{...f.env,...o.env}:void 0,stdio:["ignore","pipe","pipe"]}),c="";i.stdout.on("data",a=>n(a)),i.stderr.on("data",a=>{c+=new TextDecoder().decode(a)}),i.on("error",s),i.on("close",a=>r({code:a,stderr:c})),o.signal?.addEventListener("abort",()=>i.kill(),{once:!0})})}function gt(e,t,n,o){let r=B(e,t,{stdio:["pipe","pipe","pipe"]});r.stdin.on("error",()=>{}),r.stdout.on("data",a=>n(a)),r.stderr.on("data",a=>o?.(new TextDecoder().decode(a)));let s=new Promise(a=>{r.on("close",l=>a(l)),r.on("error",()=>a(null))}),i=[r,r.stdout,r.stderr,r.stdin],c=a=>{for(let l of i)(a?l.ref:l.unref)?.call(l)};return c(!1),{write:a=>new Promise((l,d)=>{r.stdin.write(a,m=>m?d(m):l())}),hold:c,close:()=>{try{r.stdin.end(),r.kill()}catch{}},exited:s}}async function yt(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 F(t,n)).success}function wt(e,t){let n=me.createServer(async(o,r)=>{try{let s=[];if(o.method!=="GET"&&o.method!=="HEAD")for await(let m of o)s.push(m);let i=s.length>0,c=new Headers;for(let[m,p]of Object.entries(o.headers))p!=null&&c.set(m,Array.isArray(p)?p.join(", "):p);let a=`http://${o.headers.host??`${e.hostname}:${e.port}`}${o.url??"/"}`,l=new AbortController;r.on("close",()=>{r.writableEnded||l.abort()});let d=await t(new Request(a,{method:o.method,headers:c,body:i?P.concat(s):void 0,signal:l.signal}));if(r.statusCode=d.status,d.headers.forEach((m,p)=>r.setHeader(p,m)),d.body&&d.headers.get("content-type")?.startsWith("text/event-stream")){r.flushHeaders();let m=d.body.getReader();for(l.signal.addEventListener("abort",()=>void m.cancel(),{once:!0});;){let{value:p,done:g}=await m.read();if(g)break;r.write(p)}r.end();return}r.end(P.from(await d.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 bt(e,t,n,o,r){return new Promise((s,i)=>{let c=fe.connect(`http://${e}:${t}`),a=!1,l=(u,L)=>{a||(a=!0,clearTimeout(m),c.destroy(),u?i(u):s(L))},d=!1;c.on("connect",()=>{d=!0});let m=setTimeout(()=>l(d?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",u=>l(new y("unavailable",`${e}:${t}: ${u.message}`)));let p=P.alloc(5+o.length);p.writeUInt32BE(o.length,1),p.set(o,5);let g=c.request({":method":"POST",":path":n,"content-type":"application/grpc",te:"trailers"}),O=[],w,$="",T=u=>{u["grpc-status"]!=null&&(w=String(u["grpc-status"]),$=decodeURIComponent(String(u["grpc-message"]??"")))};g.on("response",T),g.on("trailers",T),g.on("data",u=>O.push(u)),g.on("error",u=>l(new y("unavailable",`${e}:${t}: ${u.message}`))),g.on("end",()=>{if(w!=="0")return l(new y("grpc",`grpc-status ${w??"missing"}${$?`: ${$}`:""}`,w==null?void 0:Number(w)));let u=P.concat(O);if(u.length<5||u[0]!==0)return l(new y("grpc","reply is not one uncompressed gRPC message"));l(null,new Uint8Array(u.subarray(5,5+u.readUInt32BE(1))))}),g.end(p)})}async function ht(e){let t=te("sha256");for await(let n of re(e))t.update(n);return t.digest("hex")}async function xt(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),a=await k(o,s?"a":"w");try{let l=s;for await(let d of i.body)await a.write(d),l+=d.length,n?.(l,c)}finally{await a.close()}break}catch(i){if(r>=4)throw i;await new Promise(c=>setTimeout(c,2e3*(r+1)))}}await _(o,t)}function vt(e){let t="";for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}export{S as a,h as b,Ce as c,He as d,Ie as e,Ne as f,we as g,We as h,Me as i,_e as j,Be as k,je as l,he as m,R as n,ze as o,Le as p,Je as q,qe as r,U as s,Ge as t,Ye as u,Ke as v,Qe as w,Ve as x,Xe as y,Ze as z,et as A,tt as B,rt as C,nt as D,ot as E,st as F,it as G,at as H,ct as I,lt as J,ut as K,dt as L,mt as M,F as N,ft as O,pt as P,gt as Q,yt as R,wt as S,y as T,bt as U,ht as V,xt as W,vt as X,Rt as Y,At as Z,kt as _,St as $,Ut as aa,Ft as ba};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
var e={reelName:!1,fileName:!0,fileNameMode:"loose",fileExtensions:"",totalDuration:!1,resolution:!1,bitDepth:!1,fileFormat:!1,codec:!1,mediaUmid:!1};export{e as a};
|
|
@@ -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{G as
|
|
3
|
+
import{G as g,S as f}from"./chunk-C2ESM27Z.js";var m={prproj:"prproj","resolve-drt":"drt",aaf:"aaf",avb:"avb",otio:"otio",capcut:"capcut","flame-archive":"flame","resolve-fcpxml":"fcpxml","finalcut-fcpxml":"fcpxml","fcp-xml":"xmeml","premiere-xml":"xmeml","resolve-xml":"xmeml","baselight-blscene":"blscene"};function R(e){return e in m}var l=null;function c(){return l||(l=b()),l}async function b(){let e=await import("./timeline_core-ZKQQHUA2.js"),r=(await import("./timeline_core_bg-JW42YM3G.js")).default;return await e.default({module_or_path:r}),e}async function S(e,r){let o=m[r];if(!o)throw new Error(`timelineInspect: no Rust engine for format '${r}'`);let n=await c(),s=e.name.replace(/\.[^.]+$/,""),t=(y,..._)=>n[y](..._),i;switch(o){case"prproj":i=t("inspect_prproj_json",await a(e));break;case"aaf":i=t("inspect_aaf_json",await a(e));break;case"avb":i=t("inspect_avb_json",await a(e));break;case"flame":i=t("inspect_flame_json",await a(e),s);break;case"drt":i=t("inspect_drt_json",await w(e));break;case"otio":i=t("inspect_otio_json",await e.text(),s);break;case"capcut":i=t("inspect_capcut_json",await e.text(),s);break;case"fcpxml":i=t("inspect_fcpxml_json",await e.text(),s);break;case"xmeml":i=t("inspect_xmeml_json",await e.text(),s);break;case"blscene":i=t("inspect_blscene_json",await a(e),s);break}return v(i)}var d=12*1024*1024,p=!1;function j(e){p=e}var x=null,h=8e3;async function I(){!x||p||await Promise.race([x,new Promise(e=>setTimeout(e,h))])}function u(e,r,o){if(p||e.length<=d)return e;let n=(e.length/1048576).toFixed(0),s=o?.length??0;throw s===1?new Error(`This ${r.toUpperCase()} timeline extracts to ${n} MB, past what our conversion server can hold in one pass (the ceiling is ours, not your file \u2014 a single long timeline can exceed it on its own). Get in touch and we will convert it for you while we lift the limit.`):new Error(`This ${r.toUpperCase()} selection${s?` (${s} sequences)`:""} extracts to ${n} MB, past what our conversion server can hold in one pass. Convert a few sequences at a time \u2014 one long timeline is usually about ${(d/1048576).toFixed(0)} MB. If a single timeline still will not go through, get in touch and we will convert it for you.`)}async function W(e,r,o){let n=m[r];if(!n)throw new Error(`timelineExtract: no Rust engine for format '${r}'`);switch(await I(),n){case"otio":case"capcut":case"fcpxml":case"xmeml":return{fmt:n,extract:await e.text()};case"blscene":{let t=(await c()).extract_blscene_json(await a(e));return{fmt:n,extract:u(t,n,o)}}case"drt":{let t=(await c()).extract_drt_json(await w(e));return{fmt:n,extract:u(t,n,o)}}case"prproj":{let s=await c(),t=JSON.stringify(o??[]),i=s.extract_prproj_json(await a(e),t);return{fmt:n,extract:u(i,n,o)}}case"avb":{let s=await c(),t=JSON.stringify(o??[]),i=s.extract_avb_json(await a(e),t);return{fmt:n,extract:u(i,n,o)}}case"aaf":case"flame":{let t=(await c())[`extract_${n}_json`](await a(e));return{fmt:n,extract:u(t,n,o)}}}}async function a(e){return new Uint8Array(await e.arrayBuffer())}async function w(e){let r=f(await a(e)),o={};for(let[n,s]of Object.entries(r))n.toLowerCase().endsWith(".xml")&&(o[n]=g(s));return JSON.stringify(o)}function v(e){let r=JSON.parse(e),o=Array.isArray(r)?r:r?.timelines??r?.sequences??[],n=o.filter(t=>typeof t=="object"&&t!==null),s=o.map(t=>{if(typeof t=="string")return t;let i=t;return i?.name??i?.title??i?.id??""}).filter(t=>!!t);return{names:Array.from(new Set(s)),timelines:n}}async function A(e){let r=await c();return JSON.parse(r.drx_grade_tree(e))}var T="X-Write-Issues";var C=8*1024;function U(e){if(!e)return[];try{let r=JSON.parse(decodeURIComponent(e));return Array.isArray(r)?r:[]}catch{return[]}}export{R as a,S as b,j as c,W as d,A as e,T as f,U as g};
|