hyperframes 0.8.157 → 0.8.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-XKIJJAC6.js → add-VBBOJ3RB.js} +5 -5
- package/dist/{asset-TEWIJMG5.js → asset-3MLXYJCT.js} +2 -2
- package/dist/{auth-ERW6EOVW.js → auth-RJCTHSMH.js} +1 -1
- package/dist/{autoUpdate-IHYT5BQF.js → autoUpdate-VD6R34HF.js} +2 -2
- package/dist/{backgroundChecks-DTKZTDHN.js → backgroundChecks-CWWIZDTW.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-AE4ZKJ3I.js → beats-6CN4BEXJ.js} +6 -5
- package/dist/{benchmark-Q3YSQVWW.js → benchmark-4QSNJZXI.js} +5 -5
- package/dist/{browser-IRRLG5FG.js → browser-H7PRFBJV.js} +3 -3
- package/dist/{capture-MVH3XNAE.js → capture-GZSY7LZJ.js} +1 -1
- package/dist/{capture-ANATPLOS.js → capture-IEEQTPAS.js} +11 -1
- package/dist/{catalog-5BJJW3G4.js → catalog-PD25CVG3.js} +5 -5
- package/dist/{catch-up-DU2O72RS.js → catch-up-2TGBK342.js} +4 -4
- package/dist/{check-P5D3YU2H.js → check-HFNJEV3O.js} +18 -17
- package/dist/{checkBrowser-RNIDFQZZ.js → checkBrowser-767LAZKF.js} +14 -13
- package/dist/{chunk-XRRZZFGI.js → chunk-2XUQPJ3W.js} +1 -1
- package/dist/{chunk-ZY4A2R7C.js → chunk-3MQBIZHG.js} +2 -2
- package/dist/{chunk-25IXEZXH.js → chunk-3UMNI4XZ.js} +2 -2
- package/dist/{chunk-UGIIDY6C.js → chunk-4R6OZQGX.js} +2 -2
- package/dist/{chunk-EYNN5DJG.js → chunk-7FGHFHWD.js} +1 -1
- package/dist/{chunk-TQ62EMUI.js → chunk-DCQCGE2W.js} +2 -2
- package/dist/{chunk-ZFZNPLRJ.js → chunk-DISITOR6.js} +3 -2
- package/dist/{chunk-6B6G3QMQ.js → chunk-EDEFAJI5.js} +5 -5
- package/dist/{chunk-SMPG26EL.js → chunk-EY6ISRP3.js} +1 -1
- package/dist/{chunk-HQG7B5ZE.js → chunk-H6BWNY56.js} +1 -1
- package/dist/{chunk-WK375PPO.js → chunk-J4SSEVRU.js} +1 -1
- package/dist/{chunk-WZBGU46C.js → chunk-L6AJC7UQ.js} +1 -1
- package/dist/{chunk-CA7IDB4Z.js → chunk-LAAGHMRC.js} +12 -1
- package/dist/{chunk-YBKIAQNU.js → chunk-LAPUMJOC.js} +2 -2
- package/dist/{chunk-LZ7C6CXD.js → chunk-NNQP5TNO.js} +2 -2
- package/dist/{chunk-NIT2ZCNI.js → chunk-PKHDQELW.js} +5 -5
- package/dist/{chunk-O4ZB2LUC.js → chunk-QH2PL6J4.js} +1 -1
- package/dist/{chunk-ZTUZDPHE.js → chunk-RU6AIVON.js} +2 -2
- package/dist/{chunk-SWRIMG46.js → chunk-SHEVPNUR.js} +1 -1
- package/dist/{chunk-OGJFYVRC.js → chunk-W2SNLHKF.js} +1 -1
- package/dist/{chunk-BPTKOTF2.js → chunk-Y6E2PW7Z.js} +1 -1
- package/dist/{chunk-QAWCWGQG.js → chunk-YVD5M26L.js} +2 -2
- package/dist/{chunk-DRT6ZQI2.js → chunk-Z347DFOL.js} +1 -1
- package/dist/{clean-4WDZ3TFN.js → clean-FQUVFH6H.js} +5 -5
- package/dist/cli.js +48 -48
- package/dist/{cloud-FL6VP6IU.js → cloud-BHAYVT6F.js} +4 -4
- package/dist/{compare-MXZ7QKBN.js → compare-2FRBIK5Z.js} +11 -10
- package/dist/{component-XKBA5ON2.js → component-DRKXJVXB.js} +3 -3
- package/dist/{compositions-2LUY6RQW.js → compositions-D3SN64J3.js} +5 -5
- package/dist/{delete-OBAOZCXI.js → delete-NA5WC2IR.js} +2 -2
- package/dist/{doctor-BLXWRHAE.js → doctor-VXCMPOY3.js} +3 -3
- package/dist/{events-V4LYF3MW.js → events-QAHWXFFG.js} +2 -2
- package/dist/{events-LSJDXTXK.js → events-ZJEPMUWT.js} +3 -3
- package/dist/{feedback-LMDNGTYB.js → feedback-UGOQ57TU.js} +4 -4
- package/dist/{figma-BXHFTYCT.js → figma-YO2MJZDP.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-2ZKWMYCG.js → get-WMJAYRNF.js} +2 -2
- package/dist/{grade-compare-F7JNDXGF.js → grade-compare-QZ7BG2AP.js} +10 -10
- package/dist/{help-WGANCPIE.js → help-AR4MX2AH.js} +1 -1
- package/dist/{history-FILLGPWB.js → history-NF764OFQ.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-QQJ7C6SO.js → info-476ERK4G.js} +5 -5
- package/dist/{init-BQYTOLTG.js → init-M6YUOBBZ.js} +16 -11
- package/dist/{inspect-BTBKTW5W.js → inspect-QYPUG3UZ.js} +13 -12
- package/dist/{keyframes-Y5QDNXST.js → keyframes-MTZRE34W.js} +6 -6
- package/dist/{layout-HITFK2H5.js → layout-DLX4HQFL.js} +13 -12
- package/dist/{lint-6HH5X4NJ.js → lint-OQ5QWCHZ.js} +6 -6
- package/dist/{list-KBERMLPP.js → list-AZ6OIOIK.js} +2 -2
- package/dist/{login-MZNDV73I.js → login-DJPYT4YZ.js} +4 -4
- package/dist/{media-treatment-YACCPVXX.js → media-treatment-4YKC4LGB.js} +5 -5
- package/dist/{motionShot-CRQTWUJB.js → motionShot-KEHC5AMK.js} +4 -3
- package/dist/{normalize-audio-Z7UQTZ5J.js → normalize-audio-ATAQGUPX.js} +4 -4
- package/dist/{open-GM2J5QEA.js → open-4DXBEX2U.js} +4 -4
- package/dist/{play-JGMRZO6G.js → play-SKTSHZM5.js} +8 -8
- package/dist/{present-SI7ZE6IB.js → present-KSQ5GASH.js} +8 -8
- package/dist/{preview-PZOQHOIO.js → preview-TDD3QDR3.js} +5 -5
- package/dist/{publish-UT3L777Q.js → publish-5TZIKVLW.js} +1 -1
- package/dist/{render-SFIX3O3B.js → render-ADBL3C7S.js} +7 -7
- package/dist/{render-6CJXA7UA.js → render-KJCDJEGI.js} +5 -5
- package/dist/skills/hyperframes/SKILL.md +1 -1
- package/dist/skills/hyperframes/references/frame-worker-core.md +1 -1
- package/dist/skills/hyperframes/references/intent-interview.md +2 -2
- package/dist/skills/hyperframes/references/production-loop.md +11 -11
- package/dist/skills/hyperframes/references/review-loop.md +6 -6
- package/dist/skills/hyperframes/references/storyboard-format.md +1 -1
- package/dist/skills/hyperframes-cli/SKILL.md +1 -1
- package/dist/{skills-G26XO2BY.js → skills-E75DFHGG.js} +5 -5
- package/dist/{skillsUpdateCheck-ZNDQSDB4.js → skillsUpdateCheck-EPTKOBR6.js} +3 -3
- package/dist/{snapshot-SN7I7O7I.js → snapshot-Z6T4I5TE.js} +12 -12
- package/dist/{staticProjectServer-TTC3LYHO.js → staticProjectServer-ITNEQNQ7.js} +4 -4
- package/dist/studio/assets/{hyperframes-player-D3ufdOJ_.js → hyperframes-player-DX8LgKgb.js} +1 -1
- package/dist/studio/assets/{index-DYk4U8BS.js → index-7Ljcoa9s.js} +4 -4
- package/dist/studio/assets/{index-CALVHgsJ.js → index-BdnuQ7ta.js} +1 -1
- package/dist/studio/assets/{index-7oKTFwYd.js → index-DB0YwjiT.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-TVIDDUZG.js → studio-api-JMWUSAG7.js} +2 -2
- package/dist/{studioServer-WBV2Q3SH.js → studioServer-MWZNMAVJ.js} +8 -8
- package/dist/{telemetry-RVFKZEOH.js → telemetry-D6A2TRK6.js} +3 -3
- package/dist/{timeline-BUYUBI5X.js → timeline-VIF4G3IT.js} +7 -7
- package/dist/{tokens-PUA5FQKP.js → tokens-ORS6MFMG.js} +2 -2
- package/dist/{transcribe-L2QHSNHO.js → transcribe-DNRG7OGE.js} +3 -3
- package/dist/{updateCheck-PULEO7CW.js → updateCheck-YY4BPYNT.js} +2 -2
- package/dist/{upgrade-UJJIVNHJ.js → upgrade-CUDVTTF5.js} +2 -2
- package/dist/{validate-DJAZMEQB.js → validate-CQCQVHUX.js} +11 -10
- package/package.json +1 -1
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
trackRenderPreflightRejected,
|
|
32
32
|
trackSkillsInstallSkipped,
|
|
33
33
|
trackTranscribeUnavailable
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-2XUQPJ3W.js";
|
|
35
|
+
import "./chunk-H6BWNY56.js";
|
|
36
36
|
import "./chunk-VWG7OQKU.js";
|
|
37
37
|
import "./chunk-QWQ6GQTI.js";
|
|
38
38
|
import "./chunk-54HJ63Q2.js";
|
|
@@ -42,7 +42,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
42
42
|
import "./chunk-XUXGIA7H.js";
|
|
43
43
|
import "./chunk-WERLJGIC.js";
|
|
44
44
|
import "./chunk-ISN5GRYI.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-RU6AIVON.js";
|
|
46
46
|
import "./chunk-XT6MXC7A.js";
|
|
47
47
|
import "./chunk-JYVGYKXG.js";
|
|
48
48
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getDoctorSummary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3UMNI4XZ.js";
|
|
10
10
|
import {
|
|
11
11
|
getPublishApiBaseUrl,
|
|
12
12
|
publishProjectArchive
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
trackCatalogSearchMiss,
|
|
21
21
|
trackFeedbackComment,
|
|
22
22
|
trackRenderFeedback
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2XUQPJ3W.js";
|
|
24
24
|
import {
|
|
25
25
|
shouldTrack
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-H6BWNY56.js";
|
|
27
27
|
import "./chunk-VWG7OQKU.js";
|
|
28
28
|
import "./chunk-QWQ6GQTI.js";
|
|
29
29
|
import {
|
|
@@ -53,7 +53,7 @@ import "./chunk-WERLJGIC.js";
|
|
|
53
53
|
import "./chunk-ISN5GRYI.js";
|
|
54
54
|
import {
|
|
55
55
|
VERSION
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-RU6AIVON.js";
|
|
57
57
|
import "./chunk-XT6MXC7A.js";
|
|
58
58
|
import "./chunk-JYVGYKXG.js";
|
|
59
59
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -49,9 +49,9 @@ ${c.dim("either) \u2014 use the /figma skill in a Claude session for those.")}
|
|
|
49
49
|
var figma_default = defineCommand({
|
|
50
50
|
meta: { name: "figma", description: "Import figma assets, tokens, and components (REST)" },
|
|
51
51
|
subCommands: {
|
|
52
|
-
asset: () => import("./asset-
|
|
53
|
-
tokens: () => import("./tokens-
|
|
54
|
-
component: () => import("./component-
|
|
52
|
+
asset: () => import("./asset-3MLXYJCT.js").then((m) => m.default),
|
|
53
|
+
tokens: () => import("./tokens-ORS6MFMG.js").then((m) => m.default),
|
|
54
|
+
component: () => import("./component-DRKXJVXB.js").then((m) => m.default)
|
|
55
55
|
},
|
|
56
56
|
async run({ args }) {
|
|
57
57
|
if (!args._?.[0]) console.log(HELP);
|
package/dist/fontLocalizeCli.js
CHANGED
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
} from "./chunk-ZTZA4UWZ.js";
|
|
24
24
|
import {
|
|
25
25
|
withMeta
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QH2PL6J4.js";
|
|
27
27
|
import "./chunk-K4WIOZFP.js";
|
|
28
28
|
import "./chunk-XUXGIA7H.js";
|
|
29
29
|
import "./chunk-WERLJGIC.js";
|
|
30
30
|
import "./chunk-ISN5GRYI.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-RU6AIVON.js";
|
|
32
32
|
import "./chunk-BXCMXMJQ.js";
|
|
33
33
|
import "./chunk-EOVYQ3IG.js";
|
|
34
34
|
import "./chunk-OFQWTKPW.js";
|
|
@@ -11,23 +11,23 @@ import {
|
|
|
11
11
|
} from "./chunk-ZKDMAOFU.js";
|
|
12
12
|
import {
|
|
13
13
|
serveStaticProjectHtml
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4R6OZQGX.js";
|
|
15
15
|
import "./chunk-XUHOIDKG.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-J4SSEVRU.js";
|
|
17
17
|
import "./chunk-X7MTZ4T2.js";
|
|
18
18
|
import {
|
|
19
19
|
openSettledCompositionPage,
|
|
20
20
|
runFfmpegOnce
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7FGHFHWD.js";
|
|
22
22
|
import "./chunk-FH7WODJH.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-LAAGHMRC.js";
|
|
24
24
|
import "./chunk-J7WFHOCW.js";
|
|
25
25
|
import "./chunk-WPNE5NEP.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-DCQCGE2W.js";
|
|
27
27
|
import "./chunk-56QTFOWH.js";
|
|
28
28
|
import "./chunk-C6TPGUWD.js";
|
|
29
29
|
import "./chunk-6PIGOKTE.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-DISITOR6.js";
|
|
31
31
|
import "./chunk-FFDC5OWV.js";
|
|
32
32
|
import "./chunk-K2FLNJVB.js";
|
|
33
33
|
import "./chunk-YB26LWR2.js";
|
|
@@ -45,8 +45,8 @@ import "./chunk-GMECXFAN.js";
|
|
|
45
45
|
import "./chunk-5CS4T6C6.js";
|
|
46
46
|
import {
|
|
47
47
|
trackCompareSheet
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-2XUQPJ3W.js";
|
|
49
|
+
import "./chunk-H6BWNY56.js";
|
|
50
50
|
import "./chunk-VWG7OQKU.js";
|
|
51
51
|
import "./chunk-QWQ6GQTI.js";
|
|
52
52
|
import {
|
|
@@ -64,12 +64,12 @@ import "./chunk-EOOEC32M.js";
|
|
|
64
64
|
import "./chunk-TJSTGSAW.js";
|
|
65
65
|
import {
|
|
66
66
|
withMeta
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-QH2PL6J4.js";
|
|
68
68
|
import "./chunk-K4WIOZFP.js";
|
|
69
69
|
import "./chunk-XUXGIA7H.js";
|
|
70
70
|
import "./chunk-WERLJGIC.js";
|
|
71
71
|
import "./chunk-ISN5GRYI.js";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-RU6AIVON.js";
|
|
73
73
|
import "./chunk-EOVYQ3IG.js";
|
|
74
74
|
import {
|
|
75
75
|
findFFmpeg
|
|
@@ -12,22 +12,22 @@ import {
|
|
|
12
12
|
withOwner,
|
|
13
13
|
withReader,
|
|
14
14
|
writeTurn
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z347DFOL.js";
|
|
16
16
|
import {
|
|
17
17
|
HistoryBusyError,
|
|
18
18
|
HistoryIdError,
|
|
19
19
|
START
|
|
20
20
|
} from "./chunk-6PIGOKTE.js";
|
|
21
21
|
import "./chunk-FFDC5OWV.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-L6AJC7UQ.js";
|
|
23
23
|
import "./chunk-K2FLNJVB.js";
|
|
24
24
|
import {
|
|
25
25
|
AmbiguousPreviewServerError
|
|
26
26
|
} from "./chunk-DQBY7FRR.js";
|
|
27
27
|
import {
|
|
28
28
|
trackHistoryAction
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-2XUQPJ3W.js";
|
|
30
|
+
import "./chunk-H6BWNY56.js";
|
|
31
31
|
import "./chunk-VWG7OQKU.js";
|
|
32
32
|
import "./chunk-QWQ6GQTI.js";
|
|
33
33
|
import {
|
|
@@ -41,12 +41,12 @@ import "./chunk-ZTZA4UWZ.js";
|
|
|
41
41
|
import "./chunk-EOOEC32M.js";
|
|
42
42
|
import {
|
|
43
43
|
withMeta
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-QH2PL6J4.js";
|
|
45
45
|
import "./chunk-K4WIOZFP.js";
|
|
46
46
|
import "./chunk-XUXGIA7H.js";
|
|
47
47
|
import "./chunk-WERLJGIC.js";
|
|
48
48
|
import "./chunk-ISN5GRYI.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-RU6AIVON.js";
|
|
50
50
|
import "./chunk-EOVYQ3IG.js";
|
|
51
51
|
import "./chunk-XT6MXC7A.js";
|
|
52
52
|
import "./chunk-JYVGYKXG.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var We=Object.defineProperty;var Jn=Object.getOwnPropertyDescriptor;var Zn=Object.getOwnPropertyNames;var Qn=Object.prototype.hasOwnProperty;var ei=(n,e)=>{for(var t in e)We(n,t,{get:e[t],enumerable:!0})},ti=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Zn(e))!Qn.call(n,r)&&r!==t&&We(n,r,{get:()=>e[r],enumerable:!(i=Jn(e,r))||i.enumerable});return n};var ni=n=>ti(We({},"__esModule",{value:!0}),n);var zr={};ei(zr,{HyperframesPlayer:()=>He,SPEED_PRESETS:()=>ut,formatSpeed:()=>ae,formatTime:()=>Ie});var Ct=n=>n!==null&&Number.isFinite(n)&&n>0;function _e(n){let e=n.clipEndsSeconds.filter(i=>i===null).length;if(Ct(n.authoredDurationSeconds))return{seconds:n.authoredDurationSeconds,source:"authored",pendingClips:e};let t=n.clipEndsSeconds.filter(Ct);return t.length>0?{seconds:Math.max(...t),source:"derived",pendingClips:e}:{seconds:null,source:"unresolved",pendingClips:e,reason:e>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var ii="http://www.w3.org/1999/xhtml";function Dt(n){return n!=null&&n.nodeType===1}function Ge(n){return Dt(n)&&n.namespaceURI===ii}function Be(n,e){return Ge(n)&&n.localName===e}function ri(n){return Be(n,"video")}function oi(n){return Be(n,"audio")}function M(n){return ri(n)||oi(n)}function $e(n){return Be(n,"img")}function ye(n){if(n==null||n.trim()==="")return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function ve(n=document){let e=n.querySelector('[data-composition-id][data-root="true"]');return Ge(e)?e:n.querySelector("[data-composition-id]")}var V=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),Jr=Object.freeze([V.start,V.duration,V.trackIndex]),Zr=Object.freeze([V.derivedEnd]),Qr=Object.freeze([V.derivedEnd,V.legacyTrack]);function ze(n){if(n==null||n.trim()==="")return null;let e=Number(n);return Number.isFinite(e)?e:null}var Nt=n=>{let e=ze(n);return e!==null&&e>=0?e:null};function Ae(n){return Nt(n("data-playback-start"))??Nt(n("data-media-start"))??0}var X=.1,K=10;function je(n){return Number.isFinite(n)&&n>0?Math.max(X,Math.min(K,n)):1}function Pt(n,e=1){let t=Number.parseFloat(n("data-playback-rate")??"");return je(Number.isFinite(t)&&t>0?t:e)}function qe(n){let e=ze(n("data-duration"));return e!==null&&e>0?e:null}function Lt(n,e){let t=qe(n);if(t!==null)return t;let i=ze(n("data-end"));return i!==null?i-e:null}var ai=3;function Ye(n,e,t){return Number.isFinite(n)?Math.max(0,n-e)/je(t):null}function Xe(n){let{tag:e,authoredDurationSeconds:t,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=n;if(t!==null&&t>0)return{seconds:t,source:"authored"};if(e==="img")return{seconds:ai,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Ye(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var Ft="data-fx-chain",to=Ft.slice(5);var J=(n="frequency",e="Frequency",t=1e3,i=20,r=2e4)=>({kind:"number",key:n,label:e,unit:"Hz",min:i,max:r,step:1,default:t,scale:"log",automatable:!0}),Ke=(n=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:n,scale:"log",automatable:!0,hint:e}),Se=(n=-40,e=40,t=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:n,max:e,step:.1,default:t,automatable:!0}),Ot={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},Vt=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Se(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[J("frequency","Frequency",1e3),Se(-40,40,0),Ke(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[J("frequency","Frequency",200,20,2e3),Se(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[J("frequency","Frequency",4e3,500,2e4),Se(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies: the usual fix for rumble on a voice.",params:[J("frequency","Cutoff",300,20,2e4),Ke(.707),Ot],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[J("frequency","Cutoff",8e3,100,2e4),Ke(.707),Ot],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Peak limiter that follows the signal's level. It has no lookahead, so a fast peak or an inter-sample peak can pass the ceiling; use the true-peak limiter for a delivery limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"truepeak",label:"True-peak limiter",group:"dynamics",description:"Lookahead limiter that holds a 4x estimate of the inter-sample peak at a dBTP ceiling; full-band noise can land up to about 1.7 dB above it. Adds lookahead plus about 0.3 ms of latency.",params:[{kind:"number",key:"ceiling",label:"Ceiling",unit:"dBTP",min:-24,max:0,step:.1,default:-1,hint:"Target true peak, measured on a 4x oversampled signal. Dense full-band sound can end up to about 1.7 dB above it."},{kind:"number",key:"lookahead",label:"Lookahead",unit:"ms",min:.5,max:10,step:.1,default:3,hint:"How far ahead the gain starts falling. Longer is smoother and adds the same latency."},{kind:"number",key:"release",label:"Release",unit:"ms",min:10,max:2e3,step:1,default:80,scale:"log"}],web:"worklet-truepeak"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times, a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],no=new Map(Vt.map(n=>[n.id,n]));var io=Vt.map(n=>n.id);function si(n){return 10**(n/20)}var Ut=si(12);var Ze="data-automation",po=Ze.slice(5),Je=1,ui=512,I=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Ee="volume",Te="rate";function Ht(n){if(n===Ee)return{kind:"volume"};if(n===Te)return{kind:"rate"};let e=n.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===li){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,t,i]=e;return!t||!i?null:{kind:"fx",nodeId:t,param:i}}var li="preset";var di={min:0,max:Ut,step:.01,unit:"",label:"Volume",scale:"linear",default:1},ci={min:X,max:K,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function Z(n){if(typeof n=="number")return Number.isFinite(n)?n:null;if(typeof n=="string"&&n.trim()!==""){let e=Number(n);return Number.isFinite(e)?e:null}return null}function mi(n){let e=Z(n);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Wt(n,e){let t=Z(n),i=Z(e);if(t===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(t),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function pi(n){let e=mi(n?.curve),t=Wt(n?.viaX,n?.viaY);return{...e?{curve:e}:{},...t?{viaX:t.x,viaY:t.y}:{}}}function fi(n,e){let t=Z(n?.t),i=Z(n?.v);if(t===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,t),v:r,...pi(n)}}function hi(n,e){let t=n.map(r=>fi(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of t)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,ui)}function bi(n){let e=[];for(let t of n.lanes){if(!Ht(t.target))continue;let i=t.target===Ee?di:t.target===Te?ci:null,r=hi(t.points??[],i);r.length>0&&e.push({target:t.target,points:r})}return{version:Je,lanes:e}}function Gt(n){let e;try{e=JSON.parse(n)}catch(r){throw new I(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new I("Automation must be a JSON object.");let t=e;if(t.version!==Je)throw new I(`Unsupported automation version: ${String(t.version)}`);if(!Array.isArray(t.lanes))throw new I("Automation is missing a `lanes` array.");let i=t.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new I(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!Ht(a.target))throw new I(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new I(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return bi({version:Je,lanes:i})}function gi(n,e){return e?Math.pow(n,Math.pow(2,2*e)):n}function _i(n,e){let t=n-.5,i=e-.5,r=.999,o=1e6,a=t>0?t/(r-n):t<0?-t/(n-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,u=Math.min(o,Math.max(1,a,s));return{cx:n+t/u,cy:e+i/u,w:u}}function yi(n,e,t){let{cx:i,cy:r,w:o}=_i(e,t),a=2-2*o,s=n*a-1+2*o*i,u=-n*a-2*o*i,d=vi(s,u,n),m=1-d,g=m*m+2*o*d*m+d*d;return g>0?(2*o*r*d*m+d*d)/g:n}function vi(n,e,t){if(Math.abs(n)<1e-12)return Math.abs(e)<1e-12?t:-t/e;let i=Math.sqrt(Math.max(0,e*e-4*n*t)),r=(-e+i)/(2*n),o=(-e-i)/(2*n),a=s=>s>=-1e-9&&s<=1+1e-9;return a(r)?Math.min(1,Math.max(0,r)):a(o)?Math.min(1,Math.max(0,o)):t}function Ai(n,e){let t=Wt(e.viaX,e.viaY);return t?yi(Math.min(1,Math.max(0,n)),t.x,t.y):gi(n,e.curve)}function Si(n,e,t,i){return i==="log"&&n>0&&e>0?Math.exp(Math.log(n)+(Math.log(e)-Math.log(n))*t):n+(e-n)*t}function Re(n,e,t="linear"){let i=n.points;if(i.length===0)return 0;let r=i[0];if(e<=r.t)return r.v;let o=i[i.length-1];if(e>=o.t)return o.v;let a=0,s=i.length-1;for(;s-a>1;){let g=a+s>>1;i[g].t<=e?a=g:s=g}let u=i[a],d=i[s],m=d.t-u.t;return m<=0?d.v:Si(u.v,d.v,Ai((e-u.t)/m,u),t)}var xe=new Map,Ei=64;function Bt(n,e=Ee){let t=`${e}\0${n}`,i=xe.get(t);if(i!==void 0)return i;let r=null;try{r=Gt(n).lanes.find(o=>o.target===e)??null}catch{r=null}return xe.size>Ei&&xe.clear(),xe.set(t,r),r}var $t=48,zt=new WeakMap;function Ti(n){let e=n.points,t=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=u=>{let d=r[r.length-1];if(u<=d)return;let m=Re(n,d,"log");r.push(u),o.push(o[o.length-1]+(m+Re(n,u,"log"))/2*(u-d))},s=Math.max(0,e[0].t);a(s);for(let u=1;u<e.length;u+=1){let d=e[u-1].t,m=e[u].t;if(!(m<=0))for(let g=1;g<=$t;g+=1)a(Math.max(d,0)+(m-d)*g/$t)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:t,lastRate:i}}function Ri(n){let e=zt.get(n);return e||(e=Ti(n),zt.set(n,e)),e}function xi(n){return typeof n!="number"&&n.points.length>0}function wi(n,e,t){let i=0,r=n.length-1;for(;r-i>1;){let o=i+r>>1;n[o]<=t?i=o:r=o}return e[i]+(e[r]-e[i])*(t-n[i])/(n[r]-n[i])}function Qe(n,e){if(typeof n=="number")return e/n;if(!xi(n))return e;let{ts:t,ss:i,firstRate:r,lastRate:o}=Ri(n),a=t.length-1;return e<=0?e/r:e>=i[a]?t[a]+(e-i[a])/o:wi(i,t,e)}function ki(n){return n?Bt(n,Te):null}function jt(n,e){return ki(n)??e}var vo=[{id:"montage",label:"Montage",points:[[0,.9],[.15,.3],[.5,2.5],[.85,.3],[1,.9]]},{id:"hero",label:"Hero",points:[[0,1],[.25,1.6],[.5,.25],[.75,1.6],[1,1]]},{id:"bullet",label:"Bullet",points:[[0,3],[.4,3],[.5,.15],[.6,3],[1,3]]},{id:"jump-cut",label:"Jump cut",points:[[0,.5],[.24,.5],[.26,3],[.5,3],[.52,.5],[.74,.5],[.76,3],[1,3]]},{id:"flash-in",label:"Flash in",points:[[0,.3],[.6,.6],[1,5]]},{id:"flash-out",label:"Flash out",points:[[0,5],[.4,.6],[1,.3]]},{id:"ramp-in",label:"Ramp in",points:[[0,.5],[1,1]]},{id:"ramp-out",label:"Ramp out",points:[[0,1],[1,.5]]},{id:"slowmo-middle",label:"Slow-mo middle",points:[[0,1],[1/3,.35],[2/3,.35],[1,1]]}];var v=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),So=Object.freeze([v.start,v.duration,v.trackIndex]),Eo=Object.freeze([v.derivedEnd]),To=Object.freeze([v.derivedEnd,v.legacyTrack]);function C(n){if(n==null||n.trim()==="")return null;let e=Number(n);return Number.isFinite(e)?e:null}var Xt=/^[A-Za-z0-9_.:-]+$/;function Kt(n,e){let t=n.charCodeAt(e);return t>=48&&t<=57}function qt(n,e){let t=e;for(;t>=0&&Kt(n,t);)t--;return t}function Mi(n,e){let t=e;for(;t>=0&&(n[t]??"").trim()==="";)t--;return t}function Ii(n){let e=n.length-1;if(!Kt(n,e))return null;let t=qt(n,e);return n[t]==="."&&(t=qt(n,t-1)),t+1}function Ci(n){let e=Ii(n);if(e==null)return null;let t=Mi(n,e-1),i=n[t];if(i!=="+"&&i!=="-")return null;let r=n.slice(0,t).trim();if(!Xt.test(r))return null;let o=Number(n.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function Q(n){let e=(n??"").trim();if(!e)return null;let t=C(e);if(t!=null)return{kind:"absolute",value:t};if(Xt.test(e))return{kind:"reference",refId:e,offset:0};let i=Ci(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function T(n,e,t,i){n.push({code:e,attribute:t,value:i})}function Di(n,e,t,i){if(e==null||e.trim()==="")return t.defaultStart===void 0?0:t.defaultStart;if(!n)return T(i,"invalid-start",v.start,e),null;if(n.kind==="absolute")return Math.max(0,n.value);let r=t.resolveReferenceEnd?.(n.refId);return r==null||!Number.isFinite(r)?(T(i,"unresolved-start-reference",v.start,e),null):Math.max(0,r+n.offset)}var Ni=1e-9;function Pi(n,e){return Math.abs(n-e)<=Ni}function Li(n,e,t){let i=C(n);if(i==null){T(t,"deprecated-end",v.derivedEnd,n),T(t,"invalid-end",v.derivedEnd,n);return}if(e==null){T(t,"deprecated-end",v.derivedEnd,n);return}Pi(i,e)||(T(t,"deprecated-end",v.derivedEnd,n),T(t,"conflicting-end",v.derivedEnd,n))}function Oi(n,e,t){let i=C(n);return i==null||i<0?(T(t,"invalid-duration",v.duration,n),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Fi(n,e,t){T(t,"deprecated-end",v.derivedEnd,n);let i=C(n);return i==null?(T(t,"invalid-end",v.derivedEnd,n),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(T(t,"end-before-start",v.derivedEnd,n),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Vi(n,e,t){let i=n.getAttribute(v.duration),r=n.getAttribute(v.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Fi(r,e,t);let o=Oi(i,e,t);return r!=null&&Li(r,o.end,t),o}function Yt(n,e,t,i){let r=C(n);return r==null||!Number.isInteger(r)?(T(i,"invalid-track-index",e,n),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:t}}function Ui(n,e){let t=n.getAttribute(v.trackIndex),i=n.getAttribute(v.legacyTrack);if(t==null&&i==null)return{trackIndex:0,trackSource:"default"};if(t==null&&i!=null)return T(e,"deprecated-layer",v.legacyTrack,i),Yt(i,v.legacyTrack,"legacy-layer",e);let r=Yt(t??"",v.trackIndex,"track-index",e);if(i==null)return r;T(e,"deprecated-layer",v.legacyTrack,i);let o=C(i);return o!=null&&o!==r.trackIndex&&T(e,"conflicting-layer",v.legacyTrack,i),r}function et(n,e={}){let t=[],i=n.getAttribute(v.start),r=Q(i),o=Di(r,i,e,t),a=Vi(n,o,t),s=Ui(n,t);return{startExpression:r,start:o,...a,...s,diagnostics:t}}function P(n){return C(n)}function ee(n){return Pt(e=>n.getAttribute(e),M(n)?n.defaultPlaybackRate:1)}function tt(n){return jt(n.getAttribute("data-automation"),ee(n))}function nt(n){return Ae(e=>n.getAttribute(e))}function U(n,e){return Hi(e,nt(n),tt(n))}function it(n){let e=Xe({tag:"video",authoredDurationSeconds:qe(t=>n.getAttribute(t)),sourceDurationSeconds:Number.isFinite(n.duration)?n.duration:null,mediaStartSeconds:nt(n),playbackRate:ee(n)});return e.source==="media"?U(n,n.duration):e.seconds}function we(n,e=0){return!$e(n)||!n.hasAttribute("data-start")&&!n.hasAttribute("data-track-index")?null:Xe({tag:"img",authoredDurationSeconds:Lt(t=>n.getAttribute(t),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function Hi(n,e,t){return typeof t=="number"?Ye(n,e,t):Number.isFinite(n)?Qe(t,Math.max(0,n-e)):null}function Jt(){return globalThis}function te(n,e){if(typeof window>"u")return;let t=Jt(),i=t.__hf?.onSwallowed;if(i)try{i({label:n,error:e})}catch(r){}(t.__hfDebug||t.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${n} swallowed:`,e)}function ne(n){try{if(typeof n?.duration!="function")return null;let e=Number(n.duration());return Number.isFinite(e)?e:null}catch(e){return te("runtime.timelineDuration",e),null}}var Zt="data-hf-authored-duration",Qt="data-hf-authored-end";function ie(n){if(n==null||typeof n=="string"&&n.trim()==="")return null;let e=typeof n=="number"?n:Number(n);return Number.isFinite(e)?e:null}function ke(n){let e=ie(n.start);if(e==null)return null;let t=Math.max(0,e),i=ie(n.duration),r=ie(n.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:t,duration:o,end:t+o};let a=ie(n.end),s=ie(n.authoredEnd),u=a!=null&&a>t?a:s!=null&&s>t?s:null;return{start:t,duration:u==null?null:u-t,end:u}}var en="data-hf-media-start-basis";function tn(n){return n?.trim().toLowerCase()==="global"?"global":"local"}function Wi(n){return tn(n.basis)==="global"?n.authoredStart:n.hostStart+n.authoredStart}function nn(n){return on(n)?Wi({authoredStart:n.authoredStart,hostStart:n.hostStart,basis:n.basis}):n.ordinaryStart()}function rn(n){return on(n)&&tn(n.basis)==="global"}function on(n){return!n.hasAutoStart&&n.authoredStart!=null&&n.hostStart!==0}function rt(n){return Ae(e=>n.getAttribute(e))}function an(n,e){return n-rt(e)}function H(n){let e=n.timelineRegistry??{},t=n.includeAuthoredTimingAttrs??!1,i=n.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=l=>{let f=i.getElementById(l);return f||(Array.from(i.querySelectorAll("[data-composition-id]")).find(_=>_.getAttribute("data-composition-id")===l)??null)},u=(l,f)=>t?l.getAttribute(f):null,d=l=>ke({start:0,duration:l.getAttribute("data-duration"),authoredDuration:u(l,"data-hf-authored-duration")})?.duration??ke({start:R(l,0),end:l.getAttribute("data-end"),authoredEnd:u(l,"data-hf-authored-end")})?.duration??null,m=l=>l!=null&&Number.isFinite(l)&&l>0?l:null,g=l=>{let f=l.getAttribute("data-composition-id");return f?m(ne(e[f])):null},y=l=>{let f=o.get(l);if(f!==void 0)return f;let _=d(l)??m(M(l)?U(l,l.duration):null)??m(we(l))??g(l);return o.set(l,_),_},h=l=>l.hasAttribute("data-composition-src")||l.hasAttribute("data-composition-id")||l.hasAttribute("data-composition-file"),A=l=>{let f=l.parentElement;return!f||!l.hasAttribute("data-composition-id")||Q(l.getAttribute("data-start"))?null:h(f)?f:null},b=(l,f)=>an(R(l,f),A(l)??l),S=(l,f)=>{let _=l.hasAttribute("data-composition-id")?l.parentElement?.closest("[data-composition-id]"):l.closest("[data-composition-id]");return _?b(_,f):0},D=(l,f)=>{let _=Q(l.getAttribute("data-start"));if(!_){let Y=A(l);return Y?R(Y,f):f}if(_.kind==="absolute")return S(l,f)+Math.max(0,_.value);let w=s(_.refId);if(!w)return f;let L=R(w,0),fe=y(w)??0,he=Math.min(0,S(l,0));return Math.max(he,L+fe+_.offset)},R=(l,f)=>{let _=r.get(l);if(_!==void 0)return _??f;if(a.has(l))return f;a.add(l);try{let w=D(l,f);return r.set(l,w),w}finally{a.delete(l)}},k=l=>{let f=l.closest("[data-composition-id]");return{authoredStart:P(l.getAttribute("data-start")),hostStart:f?b(f,0):0,hasAutoStart:l.hasAttribute("data-hf-auto-start"),basis:l.getAttribute(en)}};return{resolveStartForElement:(l,f=0)=>R(l,Math.max(0,f)),resolveDurationForElement:l=>y(l),resolveMediaStartForElement:l=>{let f=k(l);return nn({...f,ordinaryStart:()=>R(l,f.hostStart)})},resolveHostStartForElement:l=>S(l,0),resolveHostSlotsForElement:l=>{let f=[];for(let _=l.parentElement;_;_=_.parentElement){if(!h(_)||A(_)||rt(_)<=0)continue;let w=R(_,0),L=d(_);f.push({start:w,end:L?w+L:1/0})}return f},isRootGlobalMediaStartForElement:l=>M(l)&&rn(k(l))}}function sn(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var un=7200,ot=1/60,re=n=>n!==null&&n>ot?n:null;function Gi(n){return{width:ye(n.getAttribute("data-width")),height:ye(n.getAttribute("data-height"))}}function Bi(n,e){let t=[];for(let i of n.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);o==null||o<=ot||t.push(Math.max(0,r)+o)}return re(_e({authoredDurationSeconds:null,clipEndsSeconds:t}).seconds)}function $i(n,e){let t=[];for(let r of n.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==n)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||t.push(Math.max(0,o)+a)}let i=P(n.getAttribute("data-duration"));return re(_e({authoredDurationSeconds:null,clipEndsSeconds:[i,...t]}).seconds)}var zi=n=>n.hasAttribute("data-composition-id")||n.hasAttribute("data-composition-src");function ji(n,e,{unregisteredLottie:t}){let i=[];for(let o of n.querySelectorAll("[data-start]")){let a=e.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=e.resolveDurationForElement(o);s!=null?i.push(Math.max(0,a)+s):(M(o)||zi(o))&&i.push(null)}(t||n.querySelector("[data-lottie-src]"))&&i.push(null);let r=_e({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function qi(n){if(n.declared!==null&&Number.isFinite(n.declared)&&n.declared>0)return n.declared;let e=re(n.timeline()),t=Math.max(0,...n.floors().map(u=>u??0)),i=Number.isFinite(n.fallback)&&n.fallback>ot?n.fallback:0,r=Math.max(t,i),a=e!==null&&e>=un&&re(r)!==null?null:e,s;return a!==null?s=Math.max(a,r):re(t)!==null?s=r:i>0?s=i:s=n.derived(),s>0?s:0}function ln(n){let e=ve(n);if(!e)return null;let t=H({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:n}),i=qi({declared:P(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[Bi(n,{mediaStart:t.resolveMediaStartForElement,mediaDuration:it}),$i(e,t)],fallback:0,derived:()=>ji(e,t,{unregisteredLottie:!1}).seconds??0});return{...Gi(e),fps:sn().canonicalFps,durationSeconds:i}}var dn="hyperframes-studio-preview";var cn="__hfPreviewErrors";function mn(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function W(n){return typeof n=="object"&&n!==null}function pn(n){return W(n)&&typeof n.getDuration=="function"}function fn(n){return W(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var G="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.157/dist/hyperframe.runtime.iife.js";function oe(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function Yi(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=oe(e.getAttribute("data-width")),i=oe(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}function Xi(n){return Array.isArray(n)?n.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Me=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;_runtimeScript=null;_failure=null;get failed(){return this._failure!==null&&this._failure.document===this._iframe.contentDocument}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._failure=null,this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;let t=null;try{t=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(t={kind:"error",message:i instanceof Error?i.message:String(i)})}if(t){this.stop(),t.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(t.message)):this._callbacks.onReady(t.result);return}e>=40&&(this.stop(),this._failure={document:this._iframe.contentDocument},this._callbacks.onError("Composition timeline not found after 8s"))},200)}_poll(e){let t=this._iframe.contentWindow;if(!t)return null;let i=Xi(Reflect.get(t,cn));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(t,"__timelines"),a=this.hasRuntimeBridge(t);if(mn({hasRuntime:a,hasTimelines:W(o)&&Object.keys(o).length>0,hasNestedCompositions:!!r?.querySelector("[data-composition-src]"),runtimeInjected:this._runtimeInjected,attempts:e}))return this._injectRuntime(),null;if(this._runtimeInjected&&!a)return null;let s=this._resolveReadyResult(t,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,t){let i=this._resolvePlaybackDurationAdapter(e)??{kind:"document",getDuration:()=>0},r=i.getDuration();if(!Number.isFinite(r)||r<=0){if(i.kind==="direct-timeline")return null;r=t?ln(t)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:Yi(t)}}stop(){this._runtimeScript&&(this._runtimeScript.onerror=null,this._runtimeScript=null),this.failed||(this._failure=null),this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return W(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=this._callbacks.resolveRuntimeUrl?.()??G,this._runtimeScript=t,t.onerror=()=>{this._runtimeScript!==t||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+t.src))},(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!W(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return fn(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(pn(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var hn=`
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var We=Object.defineProperty;var Jn=Object.getOwnPropertyDescriptor;var Zn=Object.getOwnPropertyNames;var Qn=Object.prototype.hasOwnProperty;var ei=(n,e)=>{for(var t in e)We(n,t,{get:e[t],enumerable:!0})},ti=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Zn(e))!Qn.call(n,r)&&r!==t&&We(n,r,{get:()=>e[r],enumerable:!(i=Jn(e,r))||i.enumerable});return n};var ni=n=>ti(We({},"__esModule",{value:!0}),n);var zr={};ei(zr,{HyperframesPlayer:()=>He,SPEED_PRESETS:()=>ut,formatSpeed:()=>ae,formatTime:()=>Ie});var Ct=n=>n!==null&&Number.isFinite(n)&&n>0;function _e(n){let e=n.clipEndsSeconds.filter(i=>i===null).length;if(Ct(n.authoredDurationSeconds))return{seconds:n.authoredDurationSeconds,source:"authored",pendingClips:e};let t=n.clipEndsSeconds.filter(Ct);return t.length>0?{seconds:Math.max(...t),source:"derived",pendingClips:e}:{seconds:null,source:"unresolved",pendingClips:e,reason:e>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var ii="http://www.w3.org/1999/xhtml";function Dt(n){return n!=null&&n.nodeType===1}function Ge(n){return Dt(n)&&n.namespaceURI===ii}function Be(n,e){return Ge(n)&&n.localName===e}function ri(n){return Be(n,"video")}function oi(n){return Be(n,"audio")}function M(n){return ri(n)||oi(n)}function $e(n){return Be(n,"img")}function ye(n){if(n==null||n.trim()==="")return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function ve(n=document){let e=n.querySelector('[data-composition-id][data-root="true"]');return Ge(e)?e:n.querySelector("[data-composition-id]")}var V=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),Jr=Object.freeze([V.start,V.duration,V.trackIndex]),Zr=Object.freeze([V.derivedEnd]),Qr=Object.freeze([V.derivedEnd,V.legacyTrack]);function ze(n){if(n==null||n.trim()==="")return null;let e=Number(n);return Number.isFinite(e)?e:null}var Nt=n=>{let e=ze(n);return e!==null&&e>=0?e:null};function Ae(n){return Nt(n("data-playback-start"))??Nt(n("data-media-start"))??0}var X=.1,K=10;function je(n){return Number.isFinite(n)&&n>0?Math.max(X,Math.min(K,n)):1}function Pt(n,e=1){let t=Number.parseFloat(n("data-playback-rate")??"");return je(Number.isFinite(t)&&t>0?t:e)}function qe(n){let e=ze(n("data-duration"));return e!==null&&e>0?e:null}function Lt(n,e){let t=qe(n);if(t!==null)return t;let i=ze(n("data-end"));return i!==null?i-e:null}var ai=3;function Ye(n,e,t){return Number.isFinite(n)?Math.max(0,n-e)/je(t):null}function Xe(n){let{tag:e,authoredDurationSeconds:t,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=n;if(t!==null&&t>0)return{seconds:t,source:"authored"};if(e==="img")return{seconds:ai,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Ye(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var Ft="data-fx-chain",to=Ft.slice(5);var J=(n="frequency",e="Frequency",t=1e3,i=20,r=2e4)=>({kind:"number",key:n,label:e,unit:"Hz",min:i,max:r,step:1,default:t,scale:"log",automatable:!0}),Ke=(n=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:n,scale:"log",automatable:!0,hint:e}),Se=(n=-40,e=40,t=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:n,max:e,step:.1,default:t,automatable:!0}),Ot={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},Vt=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Se(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[J("frequency","Frequency",1e3),Se(-40,40,0),Ke(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[J("frequency","Frequency",200,20,2e3),Se(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[J("frequency","Frequency",4e3,500,2e4),Se(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies: the usual fix for rumble on a voice.",params:[J("frequency","Cutoff",300,20,2e4),Ke(.707),Ot],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[J("frequency","Cutoff",8e3,100,2e4),Ke(.707),Ot],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Peak limiter that follows the signal's level. It has no lookahead, so a fast peak or an inter-sample peak can pass the ceiling; use the true-peak limiter for a delivery limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"truepeak",label:"True-peak limiter",group:"dynamics",description:"Lookahead limiter that holds a 4x estimate of the inter-sample peak at a dBTP ceiling; full-band noise can land up to about 1.7 dB above it. Adds lookahead plus about 0.3 ms of latency.",params:[{kind:"number",key:"ceiling",label:"Ceiling",unit:"dBTP",min:-24,max:0,step:.1,default:-1,hint:"Target true peak, measured on a 4x oversampled signal. Dense full-band sound can end up to about 1.7 dB above it."},{kind:"number",key:"lookahead",label:"Lookahead",unit:"ms",min:.5,max:10,step:.1,default:3,hint:"How far ahead the gain starts falling. Longer is smoother and adds the same latency."},{kind:"number",key:"release",label:"Release",unit:"ms",min:10,max:2e3,step:1,default:80,scale:"log"}],web:"worklet-truepeak"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times, a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],no=new Map(Vt.map(n=>[n.id,n]));var io=Vt.map(n=>n.id);function si(n){return 10**(n/20)}var Ut=si(12);var Ze="data-automation",po=Ze.slice(5),Je=1,ui=512,I=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Ee="volume",Te="rate";function Ht(n){if(n===Ee)return{kind:"volume"};if(n===Te)return{kind:"rate"};let e=n.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===li){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,t,i]=e;return!t||!i?null:{kind:"fx",nodeId:t,param:i}}var li="preset";var di={min:0,max:Ut,step:.01,unit:"",label:"Volume",scale:"linear",default:1},ci={min:X,max:K,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function Z(n){if(typeof n=="number")return Number.isFinite(n)?n:null;if(typeof n=="string"&&n.trim()!==""){let e=Number(n);return Number.isFinite(e)?e:null}return null}function mi(n){let e=Z(n);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Wt(n,e){let t=Z(n),i=Z(e);if(t===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(t),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function pi(n){let e=mi(n?.curve),t=Wt(n?.viaX,n?.viaY);return{...e?{curve:e}:{},...t?{viaX:t.x,viaY:t.y}:{}}}function fi(n,e){let t=Z(n?.t),i=Z(n?.v);if(t===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,t),v:r,...pi(n)}}function hi(n,e){let t=n.map(r=>fi(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of t)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,ui)}function bi(n){let e=[];for(let t of n.lanes){if(!Ht(t.target))continue;let i=t.target===Ee?di:t.target===Te?ci:null,r=hi(t.points??[],i);r.length>0&&e.push({target:t.target,points:r})}return{version:Je,lanes:e}}function Gt(n){let e;try{e=JSON.parse(n)}catch(r){throw new I(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new I("Automation must be a JSON object.");let t=e;if(t.version!==Je)throw new I(`Unsupported automation version: ${String(t.version)}`);if(!Array.isArray(t.lanes))throw new I("Automation is missing a `lanes` array.");let i=t.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new I(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!Ht(a.target))throw new I(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new I(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return bi({version:Je,lanes:i})}function gi(n,e){return e?Math.pow(n,Math.pow(2,2*e)):n}function _i(n,e){let t=n-.5,i=e-.5,r=.999,o=1e6,a=t>0?t/(r-n):t<0?-t/(n-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,u=Math.min(o,Math.max(1,a,s));return{cx:n+t/u,cy:e+i/u,w:u}}function yi(n,e,t){let{cx:i,cy:r,w:o}=_i(e,t),a=2-2*o,s=n*a-1+2*o*i,u=-n*a-2*o*i,d=vi(s,u,n),m=1-d,g=m*m+2*o*d*m+d*d;return g>0?(2*o*r*d*m+d*d)/g:n}function vi(n,e,t){if(Math.abs(n)<1e-12)return Math.abs(e)<1e-12?t:-t/e;let i=Math.sqrt(Math.max(0,e*e-4*n*t)),r=(-e+i)/(2*n),o=(-e-i)/(2*n),a=s=>s>=-1e-9&&s<=1+1e-9;return a(r)?Math.min(1,Math.max(0,r)):a(o)?Math.min(1,Math.max(0,o)):t}function Ai(n,e){let t=Wt(e.viaX,e.viaY);return t?yi(Math.min(1,Math.max(0,n)),t.x,t.y):gi(n,e.curve)}function Si(n,e,t,i){return i==="log"&&n>0&&e>0?Math.exp(Math.log(n)+(Math.log(e)-Math.log(n))*t):n+(e-n)*t}function Re(n,e,t="linear"){let i=n.points;if(i.length===0)return 0;let r=i[0];if(e<=r.t)return r.v;let o=i[i.length-1];if(e>=o.t)return o.v;let a=0,s=i.length-1;for(;s-a>1;){let g=a+s>>1;i[g].t<=e?a=g:s=g}let u=i[a],d=i[s],m=d.t-u.t;return m<=0?d.v:Si(u.v,d.v,Ai((e-u.t)/m,u),t)}var xe=new Map,Ei=64;function Bt(n,e=Ee){let t=`${e}\0${n}`,i=xe.get(t);if(i!==void 0)return i;let r=null;try{r=Gt(n).lanes.find(o=>o.target===e)??null}catch{r=null}return xe.size>Ei&&xe.clear(),xe.set(t,r),r}var $t=48,zt=new WeakMap;function Ti(n){let e=n.points,t=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=u=>{let d=r[r.length-1];if(u<=d)return;let m=Re(n,d,"log");r.push(u),o.push(o[o.length-1]+(m+Re(n,u,"log"))/2*(u-d))},s=Math.max(0,e[0].t);a(s);for(let u=1;u<e.length;u+=1){let d=e[u-1].t,m=e[u].t;if(!(m<=0))for(let g=1;g<=$t;g+=1)a(Math.max(d,0)+(m-d)*g/$t)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:t,lastRate:i}}function Ri(n){let e=zt.get(n);return e||(e=Ti(n),zt.set(n,e)),e}function xi(n){return typeof n!="number"&&n.points.length>0}function wi(n,e,t){let i=0,r=n.length-1;for(;r-i>1;){let o=i+r>>1;n[o]<=t?i=o:r=o}return e[i]+(e[r]-e[i])*(t-n[i])/(n[r]-n[i])}function Qe(n,e){if(typeof n=="number")return e/n;if(!xi(n))return e;let{ts:t,ss:i,firstRate:r,lastRate:o}=Ri(n),a=t.length-1;return e<=0?e/r:e>=i[a]?t[a]+(e-i[a])/o:wi(i,t,e)}function ki(n){return n?Bt(n,Te):null}function jt(n,e){return ki(n)??e}var vo=[{id:"montage",label:"Montage",points:[[0,.9],[.15,.3],[.5,2.5],[.85,.3],[1,.9]]},{id:"hero",label:"Hero",points:[[0,1],[.25,1.6],[.5,.25],[.75,1.6],[1,1]]},{id:"bullet",label:"Bullet",points:[[0,3],[.4,3],[.5,.15],[.6,3],[1,3]]},{id:"jump-cut",label:"Jump cut",points:[[0,.5],[.24,.5],[.26,3],[.5,3],[.52,.5],[.74,.5],[.76,3],[1,3]]},{id:"flash-in",label:"Flash in",points:[[0,.3],[.6,.6],[1,5]]},{id:"flash-out",label:"Flash out",points:[[0,5],[.4,.6],[1,.3]]},{id:"ramp-in",label:"Ramp in",points:[[0,.5],[1,1]]},{id:"ramp-out",label:"Ramp out",points:[[0,1],[1,.5]]},{id:"slowmo-middle",label:"Slow-mo middle",points:[[0,1],[1/3,.35],[2/3,.35],[1,1]]}];var v=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),So=Object.freeze([v.start,v.duration,v.trackIndex]),Eo=Object.freeze([v.derivedEnd]),To=Object.freeze([v.derivedEnd,v.legacyTrack]);function C(n){if(n==null||n.trim()==="")return null;let e=Number(n);return Number.isFinite(e)?e:null}var Xt=/^[A-Za-z0-9_.:-]+$/;function Kt(n,e){let t=n.charCodeAt(e);return t>=48&&t<=57}function qt(n,e){let t=e;for(;t>=0&&Kt(n,t);)t--;return t}function Mi(n,e){let t=e;for(;t>=0&&(n[t]??"").trim()==="";)t--;return t}function Ii(n){let e=n.length-1;if(!Kt(n,e))return null;let t=qt(n,e);return n[t]==="."&&(t=qt(n,t-1)),t+1}function Ci(n){let e=Ii(n);if(e==null)return null;let t=Mi(n,e-1),i=n[t];if(i!=="+"&&i!=="-")return null;let r=n.slice(0,t).trim();if(!Xt.test(r))return null;let o=Number(n.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function Q(n){let e=(n??"").trim();if(!e)return null;let t=C(e);if(t!=null)return{kind:"absolute",value:t};if(Xt.test(e))return{kind:"reference",refId:e,offset:0};let i=Ci(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function T(n,e,t,i){n.push({code:e,attribute:t,value:i})}function Di(n,e,t,i){if(e==null||e.trim()==="")return t.defaultStart===void 0?0:t.defaultStart;if(!n)return T(i,"invalid-start",v.start,e),null;if(n.kind==="absolute")return Math.max(0,n.value);let r=t.resolveReferenceEnd?.(n.refId);return r==null||!Number.isFinite(r)?(T(i,"unresolved-start-reference",v.start,e),null):Math.max(0,r+n.offset)}var Ni=1e-9;function Pi(n,e){return Math.abs(n-e)<=Ni}function Li(n,e,t){let i=C(n);if(i==null){T(t,"deprecated-end",v.derivedEnd,n),T(t,"invalid-end",v.derivedEnd,n);return}if(e==null){T(t,"deprecated-end",v.derivedEnd,n);return}Pi(i,e)||(T(t,"deprecated-end",v.derivedEnd,n),T(t,"conflicting-end",v.derivedEnd,n))}function Oi(n,e,t){let i=C(n);return i==null||i<0?(T(t,"invalid-duration",v.duration,n),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Fi(n,e,t){T(t,"deprecated-end",v.derivedEnd,n);let i=C(n);return i==null?(T(t,"invalid-end",v.derivedEnd,n),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(T(t,"end-before-start",v.derivedEnd,n),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Vi(n,e,t){let i=n.getAttribute(v.duration),r=n.getAttribute(v.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Fi(r,e,t);let o=Oi(i,e,t);return r!=null&&Li(r,o.end,t),o}function Yt(n,e,t,i){let r=C(n);return r==null||!Number.isInteger(r)?(T(i,"invalid-track-index",e,n),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:t}}function Ui(n,e){let t=n.getAttribute(v.trackIndex),i=n.getAttribute(v.legacyTrack);if(t==null&&i==null)return{trackIndex:0,trackSource:"default"};if(t==null&&i!=null)return T(e,"deprecated-layer",v.legacyTrack,i),Yt(i,v.legacyTrack,"legacy-layer",e);let r=Yt(t??"",v.trackIndex,"track-index",e);if(i==null)return r;T(e,"deprecated-layer",v.legacyTrack,i);let o=C(i);return o!=null&&o!==r.trackIndex&&T(e,"conflicting-layer",v.legacyTrack,i),r}function et(n,e={}){let t=[],i=n.getAttribute(v.start),r=Q(i),o=Di(r,i,e,t),a=Vi(n,o,t),s=Ui(n,t);return{startExpression:r,start:o,...a,...s,diagnostics:t}}function P(n){return C(n)}function ee(n){return Pt(e=>n.getAttribute(e),M(n)?n.defaultPlaybackRate:1)}function tt(n){return jt(n.getAttribute("data-automation"),ee(n))}function nt(n){return Ae(e=>n.getAttribute(e))}function U(n,e){return Hi(e,nt(n),tt(n))}function it(n){let e=Xe({tag:"video",authoredDurationSeconds:qe(t=>n.getAttribute(t)),sourceDurationSeconds:Number.isFinite(n.duration)?n.duration:null,mediaStartSeconds:nt(n),playbackRate:ee(n)});return e.source==="media"?U(n,n.duration):e.seconds}function we(n,e=0){return!$e(n)||!n.hasAttribute("data-start")&&!n.hasAttribute("data-track-index")?null:Xe({tag:"img",authoredDurationSeconds:Lt(t=>n.getAttribute(t),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function Hi(n,e,t){return typeof t=="number"?Ye(n,e,t):Number.isFinite(n)?Qe(t,Math.max(0,n-e)):null}function Jt(){return globalThis}function te(n,e){if(typeof window>"u")return;let t=Jt(),i=t.__hf?.onSwallowed;if(i)try{i({label:n,error:e})}catch(r){}(t.__hfDebug||t.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${n} swallowed:`,e)}function ne(n){try{if(typeof n?.duration!="function")return null;let e=Number(n.duration());return Number.isFinite(e)?e:null}catch(e){return te("runtime.timelineDuration",e),null}}var Zt="data-hf-authored-duration",Qt="data-hf-authored-end";function ie(n){if(n==null||typeof n=="string"&&n.trim()==="")return null;let e=typeof n=="number"?n:Number(n);return Number.isFinite(e)?e:null}function ke(n){let e=ie(n.start);if(e==null)return null;let t=Math.max(0,e),i=ie(n.duration),r=ie(n.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:t,duration:o,end:t+o};let a=ie(n.end),s=ie(n.authoredEnd),u=a!=null&&a>t?a:s!=null&&s>t?s:null;return{start:t,duration:u==null?null:u-t,end:u}}var en="data-hf-media-start-basis";function tn(n){return n?.trim().toLowerCase()==="global"?"global":"local"}function Wi(n){return tn(n.basis)==="global"?n.authoredStart:n.hostStart+n.authoredStart}function nn(n){return on(n)?Wi({authoredStart:n.authoredStart,hostStart:n.hostStart,basis:n.basis}):n.ordinaryStart()}function rn(n){return on(n)&&tn(n.basis)==="global"}function on(n){return!n.hasAutoStart&&n.authoredStart!=null&&n.hostStart!==0}function rt(n){return Ae(e=>n.getAttribute(e))}function an(n,e){return n-rt(e)}function H(n){let e=n.timelineRegistry??{},t=n.includeAuthoredTimingAttrs??!1,i=n.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=l=>{let f=i.getElementById(l);return f||(Array.from(i.querySelectorAll("[data-composition-id]")).find(_=>_.getAttribute("data-composition-id")===l)??null)},u=(l,f)=>t?l.getAttribute(f):null,d=l=>ke({start:0,duration:l.getAttribute("data-duration"),authoredDuration:u(l,"data-hf-authored-duration")})?.duration??ke({start:R(l,0),end:l.getAttribute("data-end"),authoredEnd:u(l,"data-hf-authored-end")})?.duration??null,m=l=>l!=null&&Number.isFinite(l)&&l>0?l:null,g=l=>{let f=l.getAttribute("data-composition-id");return f?m(ne(e[f])):null},y=l=>{let f=o.get(l);if(f!==void 0)return f;let _=d(l)??m(M(l)?U(l,l.duration):null)??m(we(l))??g(l);return o.set(l,_),_},h=l=>l.hasAttribute("data-composition-src")||l.hasAttribute("data-composition-id")||l.hasAttribute("data-composition-file"),A=l=>{let f=l.parentElement;return!f||!l.hasAttribute("data-composition-id")||Q(l.getAttribute("data-start"))?null:h(f)?f:null},b=(l,f)=>an(R(l,f),A(l)??l),S=(l,f)=>{let _=l.hasAttribute("data-composition-id")?l.parentElement?.closest("[data-composition-id]"):l.closest("[data-composition-id]");return _?b(_,f):0},D=(l,f)=>{let _=Q(l.getAttribute("data-start"));if(!_){let Y=A(l);return Y?R(Y,f):f}if(_.kind==="absolute")return S(l,f)+Math.max(0,_.value);let w=s(_.refId);if(!w)return f;let L=R(w,0),fe=y(w)??0,he=Math.min(0,S(l,0));return Math.max(he,L+fe+_.offset)},R=(l,f)=>{let _=r.get(l);if(_!==void 0)return _??f;if(a.has(l))return f;a.add(l);try{let w=D(l,f);return r.set(l,w),w}finally{a.delete(l)}},k=l=>{let f=l.closest("[data-composition-id]");return{authoredStart:P(l.getAttribute("data-start")),hostStart:f?b(f,0):0,hasAutoStart:l.hasAttribute("data-hf-auto-start"),basis:l.getAttribute(en)}};return{resolveStartForElement:(l,f=0)=>R(l,Math.max(0,f)),resolveDurationForElement:l=>y(l),resolveMediaStartForElement:l=>{let f=k(l);return nn({...f,ordinaryStart:()=>R(l,f.hostStart)})},resolveHostStartForElement:l=>S(l,0),resolveHostSlotsForElement:l=>{let f=[];for(let _=l.parentElement;_;_=_.parentElement){if(!h(_)||A(_)||rt(_)<=0)continue;let w=R(_,0),L=d(_);f.push({start:w,end:L?w+L:1/0})}return f},isRootGlobalMediaStartForElement:l=>M(l)&&rn(k(l))}}function sn(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var un=7200,ot=1/60,re=n=>n!==null&&n>ot?n:null;function Gi(n){return{width:ye(n.getAttribute("data-width")),height:ye(n.getAttribute("data-height"))}}function Bi(n,e){let t=[];for(let i of n.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);o==null||o<=ot||t.push(Math.max(0,r)+o)}return re(_e({authoredDurationSeconds:null,clipEndsSeconds:t}).seconds)}function $i(n,e){let t=[];for(let r of n.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==n)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||t.push(Math.max(0,o)+a)}let i=P(n.getAttribute("data-duration"));return re(_e({authoredDurationSeconds:null,clipEndsSeconds:[i,...t]}).seconds)}var zi=n=>n.hasAttribute("data-composition-id")||n.hasAttribute("data-composition-src");function ji(n,e,{unregisteredLottie:t}){let i=[];for(let o of n.querySelectorAll("[data-start]")){let a=e.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=e.resolveDurationForElement(o);s!=null?i.push(Math.max(0,a)+s):(M(o)||zi(o))&&i.push(null)}(t||n.querySelector("[data-lottie-src]"))&&i.push(null);let r=_e({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function qi(n){if(n.declared!==null&&Number.isFinite(n.declared)&&n.declared>0)return n.declared;let e=re(n.timeline()),t=Math.max(0,...n.floors().map(u=>u??0)),i=Number.isFinite(n.fallback)&&n.fallback>ot?n.fallback:0,r=Math.max(t,i),a=e!==null&&e>=un&&re(r)!==null?null:e,s;return a!==null?s=Math.max(a,r):re(t)!==null?s=r:i>0?s=i:s=n.derived(),s>0?s:0}function ln(n){let e=ve(n);if(!e)return null;let t=H({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:n}),i=qi({declared:P(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[Bi(n,{mediaStart:t.resolveMediaStartForElement,mediaDuration:it}),$i(e,t)],fallback:0,derived:()=>ji(e,t,{unregisteredLottie:!1}).seconds??0});return{...Gi(e),fps:sn().canonicalFps,durationSeconds:i}}var dn="hyperframes-studio-preview";var cn="__hfPreviewErrors";function mn(n){return n.hasRuntime||n.runtimeInjected?!1:!!(n.hasNestedCompositions||n.hasTimelines&&n.attempts>=5)}function W(n){return typeof n=="object"&&n!==null}function pn(n){return W(n)&&typeof n.getDuration=="function"}function fn(n){return W(n)&&typeof n.duration=="function"&&typeof n.time=="function"&&typeof n.seek=="function"&&typeof n.play=="function"&&typeof n.pause=="function"}var G="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.158/dist/hyperframe.runtime.iife.js";function oe(n){if(n===null)return null;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>0?e:null}function Yi(n){let e=n?.querySelector("[data-composition-id][data-width][data-height]")??n?.querySelector("[data-width][data-height]");if(!e)return null;let t=oe(e.getAttribute("data-width")),i=oe(e.getAttribute("data-height"));return t!==null&&i!==null?{width:t,height:i}:null}function Xi(n){return Array.isArray(n)?n.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Me=class{constructor(e,t){this._iframe=e;this._callbacks=t}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;_runtimeScript=null;_failure=null;get failed(){return this._failure!==null&&this._failure.document===this._iframe.contentDocument}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._failure=null,this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;let t=null;try{t=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(t={kind:"error",message:i instanceof Error?i.message:String(i)})}if(t){this.stop(),t.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(t.message)):this._callbacks.onReady(t.result);return}e>=40&&(this.stop(),this._failure={document:this._iframe.contentDocument},this._callbacks.onError("Composition timeline not found after 8s"))},200)}_poll(e){let t=this._iframe.contentWindow;if(!t)return null;let i=Xi(Reflect.get(t,cn));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(t,"__timelines"),a=this.hasRuntimeBridge(t);if(mn({hasRuntime:a,hasTimelines:W(o)&&Object.keys(o).length>0,hasNestedCompositions:!!r?.querySelector("[data-composition-src]"),runtimeInjected:this._runtimeInjected,attempts:e}))return this._injectRuntime(),null;if(this._runtimeInjected&&!a)return null;let s=this._resolveReadyResult(t,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,t){let i=this._resolvePlaybackDurationAdapter(e)??{kind:"document",getDuration:()=>0},r=i.getDuration();if(!Number.isFinite(r)||r<=0){if(i.kind==="direct-timeline")return null;r=t?ln(t)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:Yi(t)}}stop(){this._runtimeScript&&(this._runtimeScript.onerror=null,this._runtimeScript=null),this.failed||(this._failure=null),this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return W(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=this._callbacks.resolveRuntimeUrl?.()??G,this._runtimeScript=t,t.onerror=()=>{this._runtimeScript!==t||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+t.src))},(e.head||e.documentElement).appendChild(t),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let t=Reflect.get(e,"__timelines");if(!W(t))return null;let i=Object.keys(t);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in t?r:i[i.length-1],a=t[o];return fn(a)?a:null}_resolvePlaybackDurationAdapter(e){let t=Reflect.get(e,"__player");if(pn(t))return{kind:"runtime",getDuration:()=>t.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var hn=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L6AJC7UQ.js";
|
|
10
10
|
import {
|
|
11
11
|
formatBytes,
|
|
12
12
|
label
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ensureDOMParser
|
|
16
16
|
} from "./chunk-442JNXRM.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-2XUQPJ3W.js";
|
|
18
|
+
import "./chunk-H6BWNY56.js";
|
|
19
19
|
import "./chunk-VWG7OQKU.js";
|
|
20
20
|
import "./chunk-QWQ6GQTI.js";
|
|
21
21
|
import {
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
} from "./chunk-ZTZA4UWZ.js";
|
|
29
29
|
import {
|
|
30
30
|
withMeta
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QH2PL6J4.js";
|
|
32
32
|
import "./chunk-K4WIOZFP.js";
|
|
33
33
|
import "./chunk-XUXGIA7H.js";
|
|
34
34
|
import "./chunk-WERLJGIC.js";
|
|
35
35
|
import "./chunk-ISN5GRYI.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-RU6AIVON.js";
|
|
37
37
|
import "./chunk-XT6MXC7A.js";
|
|
38
38
|
import "./chunk-JYVGYKXG.js";
|
|
39
39
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
gateRegistryItemsCompatibility
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EY6ISRP3.js";
|
|
10
10
|
import "./chunk-XT7X6QCP.js";
|
|
11
11
|
import {
|
|
12
12
|
writeNewFileSync
|
|
@@ -25,8 +25,8 @@ import "./chunk-P6LJ4Y32.js";
|
|
|
25
25
|
import "./chunk-GMECXFAN.js";
|
|
26
26
|
import {
|
|
27
27
|
trackInitTemplate
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-2XUQPJ3W.js";
|
|
29
|
+
import "./chunk-H6BWNY56.js";
|
|
30
30
|
import "./chunk-VWG7OQKU.js";
|
|
31
31
|
import "./chunk-QWQ6GQTI.js";
|
|
32
32
|
import {
|
|
@@ -59,7 +59,7 @@ import "./chunk-WERLJGIC.js";
|
|
|
59
59
|
import "./chunk-ISN5GRYI.js";
|
|
60
60
|
import {
|
|
61
61
|
VERSION
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-RU6AIVON.js";
|
|
63
63
|
import {
|
|
64
64
|
initialModelForLanguage
|
|
65
65
|
} from "./chunk-ZZ3ZWTOI.js";
|
|
@@ -299,7 +299,7 @@ function resolveScaffoldTemplateId(exampleFlag, hasMediaFile) {
|
|
|
299
299
|
if (hasMediaFile) return "from-file";
|
|
300
300
|
return "blank";
|
|
301
301
|
}
|
|
302
|
-
var WEB_CODECS = /* @__PURE__ */ new Set(["h264", "vp8", "vp9", "av1"
|
|
302
|
+
var WEB_CODECS = /* @__PURE__ */ new Set(["h264", "vp8", "vp9", "av1"]);
|
|
303
303
|
var DEFAULT_META = {
|
|
304
304
|
durationSeconds: 5,
|
|
305
305
|
width: 1920,
|
|
@@ -525,7 +525,7 @@ async function patchTranscript(dir, transcriptPath) {
|
|
|
525
525
|
if (words.length === 0) return;
|
|
526
526
|
patchCaptionHtml(dir, words);
|
|
527
527
|
}
|
|
528
|
-
async function handleVideoFile(videoPath, destDir, interactive) {
|
|
528
|
+
async function handleVideoFile(videoPath, destDir, interactive, keepOriginal) {
|
|
529
529
|
const probed = probeVideo(videoPath);
|
|
530
530
|
let meta = { ...DEFAULT_META };
|
|
531
531
|
let localVideoName = basename(videoPath);
|
|
@@ -544,7 +544,7 @@ async function handleVideoFile(videoPath, destDir, interactive) {
|
|
|
544
544
|
console.log(c.warn(msg));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
if (probed && !isWebCompatible(probed.videoCodec)) {
|
|
547
|
+
if (probed && !keepOriginal && !isWebCompatible(probed.videoCodec)) {
|
|
548
548
|
if (interactive) {
|
|
549
549
|
R.warn(
|
|
550
550
|
c.warn(`Video codec "${probed.videoCodec}" is not supported by web browsers.`)
|
|
@@ -698,7 +698,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
async function keepSkillsCurrent(destDir) {
|
|
701
|
-
const { updateSkills } = await import("./skills-
|
|
701
|
+
const { updateSkills } = await import("./skills-E75DFHGG.js");
|
|
702
702
|
console.log();
|
|
703
703
|
console.log(c.bold("Checking AI coding skills against GitHub..."));
|
|
704
704
|
try {
|
|
@@ -763,6 +763,10 @@ var init_default = defineCommand({
|
|
|
763
763
|
type: "boolean",
|
|
764
764
|
description: "Skip whisper transcription"
|
|
765
765
|
},
|
|
766
|
+
"keep-original": {
|
|
767
|
+
type: "boolean",
|
|
768
|
+
description: "Copy the --video file as is, without converting it to H.264 MP4"
|
|
769
|
+
},
|
|
766
770
|
model: {
|
|
767
771
|
type: "string",
|
|
768
772
|
description: "Whisper model for transcription (e.g. tiny.en, base.en, small.en, medium.en, large)"
|
|
@@ -820,6 +824,7 @@ var init_default = defineCommand({
|
|
|
820
824
|
const videoFlag = args.video;
|
|
821
825
|
const audioFlag = args.audio;
|
|
822
826
|
const skipTranscribe = args["skip-transcribe"] === true;
|
|
827
|
+
const keepOriginal = args["keep-original"] === true;
|
|
823
828
|
const skipSkills = process.env.HYPERFRAMES_SKIP_SKILLS === "1";
|
|
824
829
|
const skipSkillsFlagIgnored = args["skip-skills"] === true && !skipSkills;
|
|
825
830
|
const tailwind = args.tailwind === true;
|
|
@@ -884,7 +889,7 @@ var init_default = defineCommand({
|
|
|
884
889
|
let sourceFilePath2;
|
|
885
890
|
if (videoPath) {
|
|
886
891
|
sourceFilePath2 = videoPath;
|
|
887
|
-
const result = await handleVideoFile(videoPath, destDir2, false);
|
|
892
|
+
const result = await handleVideoFile(videoPath, destDir2, false, keepOriginal);
|
|
888
893
|
localVideoName2 = result.localVideoName;
|
|
889
894
|
videoHasAudio2 = result.meta.hasAudio;
|
|
890
895
|
videoDuration2 = result.meta.durationSeconds;
|
|
@@ -1039,7 +1044,7 @@ var init_default = defineCommand({
|
|
|
1039
1044
|
}
|
|
1040
1045
|
mkdirSync(destDir, { recursive: true });
|
|
1041
1046
|
sourceFilePath = videoPath;
|
|
1042
|
-
const result = await handleVideoFile(videoPath, destDir, true);
|
|
1047
|
+
const result = await handleVideoFile(videoPath, destDir, true, keepOriginal);
|
|
1043
1048
|
localVideoName = result.localVideoName;
|
|
1044
1049
|
videoHasAudio = result.meta.hasAudio;
|
|
1045
1050
|
videoDuration = result.meta.durationSeconds;
|
|
@@ -1163,7 +1168,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
1163
1168
|
}
|
|
1164
1169
|
R.info("Opening studio preview...");
|
|
1165
1170
|
try {
|
|
1166
|
-
const previewCmd = await import("./preview-
|
|
1171
|
+
const previewCmd = await import("./preview-TDD3QDR3.js").then((m) => m.default);
|
|
1167
1172
|
await runCommand(previewCmd, { rawArgs: [destDir] });
|
|
1168
1173
|
} catch {
|
|
1169
1174
|
}
|
|
@@ -6,23 +6,23 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
createInspectCommand
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-EDEFAJI5.js";
|
|
10
|
+
import "./chunk-4R6OZQGX.js";
|
|
11
11
|
import "./chunk-XUHOIDKG.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-J4SSEVRU.js";
|
|
13
13
|
import "./chunk-X7MTZ4T2.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7FGHFHWD.js";
|
|
15
15
|
import "./chunk-FH7WODJH.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-LAAGHMRC.js";
|
|
17
17
|
import "./chunk-J7WFHOCW.js";
|
|
18
18
|
import "./chunk-WPNE5NEP.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-DCQCGE2W.js";
|
|
20
20
|
import "./chunk-56QTFOWH.js";
|
|
21
21
|
import "./chunk-C6TPGUWD.js";
|
|
22
22
|
import "./chunk-6PIGOKTE.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-DISITOR6.js";
|
|
24
24
|
import "./chunk-FFDC5OWV.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-L6AJC7UQ.js";
|
|
26
26
|
import "./chunk-K2FLNJVB.js";
|
|
27
27
|
import "./chunk-YB26LWR2.js";
|
|
28
28
|
import "./chunk-442JNXRM.js";
|
|
@@ -37,8 +37,8 @@ import "./chunk-AWDFDFI3.js";
|
|
|
37
37
|
import "./chunk-P6LJ4Y32.js";
|
|
38
38
|
import "./chunk-GMECXFAN.js";
|
|
39
39
|
import "./chunk-5CS4T6C6.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-2XUQPJ3W.js";
|
|
41
|
+
import "./chunk-H6BWNY56.js";
|
|
42
42
|
import "./chunk-VWG7OQKU.js";
|
|
43
43
|
import "./chunk-QWQ6GQTI.js";
|
|
44
44
|
import "./chunk-S3S4TGEH.js";
|
|
@@ -48,12 +48,12 @@ import "./chunk-ZTZA4UWZ.js";
|
|
|
48
48
|
import "./chunk-KLIKCX6Q.js";
|
|
49
49
|
import "./chunk-EOOEC32M.js";
|
|
50
50
|
import "./chunk-TJSTGSAW.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-QH2PL6J4.js";
|
|
52
52
|
import "./chunk-K4WIOZFP.js";
|
|
53
53
|
import "./chunk-XUXGIA7H.js";
|
|
54
54
|
import "./chunk-WERLJGIC.js";
|
|
55
55
|
import "./chunk-ISN5GRYI.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-RU6AIVON.js";
|
|
57
57
|
import "./chunk-EOVYQ3IG.js";
|
|
58
58
|
import "./chunk-XT6MXC7A.js";
|
|
59
59
|
import "./chunk-IRRRH66M.js";
|
|
@@ -82,6 +82,7 @@ import "./chunk-SDYDNHEE.js";
|
|
|
82
82
|
import "./chunk-TYXH3EKP.js";
|
|
83
83
|
import "./chunk-IXLUTE6N.js";
|
|
84
84
|
import "./chunk-KNU5COPB.js";
|
|
85
|
+
import "./chunk-KGPLIH7B.js";
|
|
85
86
|
import "./chunk-3GXQPCJC.js";
|
|
86
87
|
import "./chunk-M2WBOQ2Q.js";
|
|
87
88
|
|
|
@@ -6,13 +6,13 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L6AJC7UQ.js";
|
|
10
10
|
import "./chunk-K2FLNJVB.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureDOMParser
|
|
13
13
|
} from "./chunk-442JNXRM.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2XUQPJ3W.js";
|
|
15
|
+
import "./chunk-H6BWNY56.js";
|
|
16
16
|
import "./chunk-VWG7OQKU.js";
|
|
17
17
|
import "./chunk-QWQ6GQTI.js";
|
|
18
18
|
import {
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
} from "./chunk-ZTZA4UWZ.js";
|
|
26
26
|
import {
|
|
27
27
|
withMeta
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QH2PL6J4.js";
|
|
29
29
|
import "./chunk-K4WIOZFP.js";
|
|
30
30
|
import "./chunk-XUXGIA7H.js";
|
|
31
31
|
import "./chunk-WERLJGIC.js";
|
|
32
32
|
import "./chunk-ISN5GRYI.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-RU6AIVON.js";
|
|
34
34
|
import "./chunk-XT6MXC7A.js";
|
|
35
35
|
import "./chunk-JYVGYKXG.js";
|
|
36
36
|
import "./chunk-7KDQAD2W.js";
|
|
@@ -2515,7 +2515,7 @@ function printOnionShotSaved(saved, elementCount) {
|
|
|
2515
2515
|
console.log();
|
|
2516
2516
|
}
|
|
2517
2517
|
async function runOnionShot(comps, allComps, projectDir, entryFile, args) {
|
|
2518
|
-
const { captureMotionPathShot } = await import("./motionShot-
|
|
2518
|
+
const { captureMotionPathShot } = await import("./motionShot-KEHC5AMK.js");
|
|
2519
2519
|
const requests = collectShotSelectors(args.selector ? allComps : comps);
|
|
2520
2520
|
const guardError = onionShotGuardError(projectDir, requests, args.ghost ?? false);
|
|
2521
2521
|
if (guardError) {
|