hyperframes 0.8.228 → 0.8.229
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-5BRVXGZV.js → add-YJS4LRAZ.js} +5 -5
- package/dist/api.js +8 -8
- package/dist/{asset-P7AMFWJH.js → asset-WSOL4NMK.js} +2 -2
- package/dist/{audio-SJ2FVL2U.js → audio-LANYADHD.js} +8 -8
- package/dist/{auth-HKMZPPR7.js → auth-YYGXDZF2.js} +4 -4
- package/dist/{autoUpdate-LL3OOBWP.js → autoUpdate-KSRU7EZH.js} +2 -2
- package/dist/{backgroundChecks-XQO65DJE.js → backgroundChecks-TB7CC2D6.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-3IGHLEBF.js → beats-IDTXCXIG.js} +4 -4
- package/dist/{benchmark-IW6RD4YW.js → benchmark-IPKHN37F.js} +5 -5
- package/dist/{billing-WNOAP6KO.js → billing-FFWAEIQ6.js} +3 -3
- package/dist/{browser-H53R7G4S.js → browser-OVOXZLNV.js} +3 -3
- package/dist/{catalog-T35EYURG.js → catalog-GRKDVE2L.js} +5 -5
- package/dist/{catch-up-5ADD6TS2.js → catch-up-EEQHBX7W.js} +4 -4
- package/dist/{check-I2O6NZY4.js → check-KN2TFSLV.js} +12 -12
- package/dist/{checkBrowser-IBLU6INC.js → checkBrowser-VSOGYBDG.js} +8 -8
- package/dist/{chunk-QFXT2ZJ4.js → chunk-2KQE627O.js} +2 -2
- package/dist/{chunk-M2WUVR6S.js → chunk-3MJIP7L3.js} +1 -1
- package/dist/{chunk-4EZVX3S4.js → chunk-5657GBGJ.js} +41 -17
- package/dist/{chunk-4RUY7VE4.js → chunk-65CJV3HG.js} +2 -2
- package/dist/{chunk-ELECXYY6.js → chunk-6IPIEPGY.js} +1 -1
- package/dist/{chunk-OVMEEYHH.js → chunk-6UOTC4U7.js} +2 -2
- package/dist/{chunk-PTIDUVWP.js → chunk-AX34M43B.js} +1 -1
- package/dist/{chunk-MSCU7EGT.js → chunk-BS23JBCT.js} +2 -2
- package/dist/{chunk-CKS7JLWO.js → chunk-C54QOVBO.js} +1 -1
- package/dist/{chunk-FZUHMD3I.js → chunk-DBCQ45W4.js} +10 -10
- package/dist/{chunk-DRIXZXHR.js → chunk-E7CVWOG6.js} +1 -1
- package/dist/{chunk-HZ7QD54G.js → chunk-EDUWHB7E.js} +2 -2
- package/dist/{chunk-53ZOVLGJ.js → chunk-FZM6E4S4.js} +1 -1
- package/dist/{chunk-V4SD6HQ6.js → chunk-GOPJLAMZ.js} +21 -19
- package/dist/{chunk-MXZXPXHQ.js → chunk-IXDFHVYK.js} +1 -1
- package/dist/{chunk-CK4PLF77.js → chunk-KQO3UIAP.js} +1 -1
- package/dist/{chunk-D3OWJKJC.js → chunk-LCRVATH2.js} +3 -3
- package/dist/{chunk-TFJSU4IV.js → chunk-M5NZ7GKA.js} +2 -2
- package/dist/{chunk-KP2YSOJ5.js → chunk-MS3HCZGU.js} +2 -2
- package/dist/{chunk-W6RA5HVS.js → chunk-O7M3IGR4.js} +2 -2
- package/dist/{chunk-VUDMPRZN.js → chunk-OHWVSTNO.js} +2 -2
- package/dist/{chunk-TIRQAJTW.js → chunk-OLUL6BOC.js} +2 -2
- package/dist/{chunk-3ZWUNOTS.js → chunk-QEQEKBL7.js} +1 -1
- package/dist/{chunk-OOM4KSV6.js → chunk-QMHENMOT.js} +1 -1
- package/dist/{chunk-RUKYGXUW.js → chunk-RSFLI6E6.js} +1 -1
- package/dist/{chunk-DUMEO6NK.js → chunk-SCVDE65J.js} +1 -1
- package/dist/{chunk-7THO7IAN.js → chunk-SWBOZCM7.js} +1 -1
- package/dist/{chunk-MD4ITN4F.js → chunk-TYJQUMPE.js} +2 -2
- package/dist/{chunk-AHCAIKBH.js → chunk-URICPFYV.js} +1 -1
- package/dist/{chunk-CPFOW5I3.js → chunk-VPCKLVUT.js} +1 -1
- package/dist/{chunk-QSWUM7WR.js → chunk-WTUIK6Y4.js} +1 -1
- package/dist/{chunk-XOFJZ3UG.js → chunk-ZDQEVQHB.js} +1 -1
- package/dist/{clean-XD6Y2WR3.js → clean-EBLROVPZ.js} +3 -3
- package/dist/cli.js +53 -53
- package/dist/{cloud-XDAV4XVD.js → cloud-VHV4JR6S.js} +4 -4
- package/dist/{compare-C33OVRPA.js → compare-ADKP4OZQ.js} +4 -4
- package/dist/{component-JG435H3P.js → component-4DZS7LRH.js} +3 -3
- package/dist/{compositions-URALETMD.js → compositions-U6AILJYT.js} +5 -5
- package/dist/{curve-X3AVF7X7.js → curve-UJYH6TCN.js} +3 -3
- package/dist/{cuts-6PSTVWG4.js → cuts-4AMR7G23.js} +3 -3
- package/dist/{delete-CNAUU4A5.js → delete-2WACGCZO.js} +5 -5
- package/dist/{deploy-QHVNI6OC.js → deploy-6D752FSZ.js} +1 -1
- package/dist/{diff-QOPUPZDJ.js → diff-NDK55Z7J.js} +9 -9
- package/dist/{doctor-ZYY3SUPX.js → doctor-6YKL5FHE.js} +3 -3
- package/dist/{energy-ANNB2G7X.js → energy-ZEGRDGJK.js} +3 -3
- package/dist/{events-S6WZTCOM.js → events-LFLG2NA4.js} +3 -3
- package/dist/{events-2WUPYUDV.js → events-LFUAHTKC.js} +4 -4
- package/dist/{events-XBOXT3LK.js → events-WCD2Z2HV.js} +2 -2
- package/dist/{extract-RQBPKZ3L.js → extract-3MIHGXDX.js} +4 -4
- package/dist/{face-T2657W3M.js → face-JWRUZSZT.js} +3 -3
- package/dist/{feedback-WTK3BR2G.js → feedback-7GKEQSNR.js} +8 -8
- package/dist/{figma-PZNTF4W4.js → figma-QQPOSC6N.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{frames-2PY32Z4T.js → frames-JUGYOXXB.js} +3 -3
- package/dist/{generate-53UW2CER.js → generate-U5GGGI7G.js} +8 -8
- package/dist/{get-N4IILPTB.js → get-KQRDF6LW.js} +5 -5
- package/dist/{grade-compare-AOWOOIO5.js → grade-compare-EVFXFOYV.js} +4 -4
- package/dist/{help-ZHUXAQZV.js → help-XUSQUMOX.js} +1 -1
- package/dist/{history-54QWLPEE.js → history-LLJEG3KB.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-6K5JUWRP.js → info-TM2S6RVA.js} +5 -5
- package/dist/{init-5TCIBSKP.js → init-ABJ7VDQV.js} +6 -6
- package/dist/{ink-XX5RM2CD.js → ink-TFN2A4RE.js} +3 -3
- package/dist/{inspect-3V2V3KL2.js → inspect-OIXXKBEP.js} +6 -6
- package/dist/{keyframes-GCS2X7TX.js → keyframes-GDYO4HII.js} +5 -5
- package/dist/{lambda-6JUZYXME.js → lambda-SGAG3ET2.js} +1 -1
- package/dist/{layout-2G4GEINC.js → layout-IDN2INXZ.js} +6 -6
- package/dist/{lint-JE2VSIGZ.js → lint-VXDG3OVR.js} +6 -6
- package/dist/{list-MV3PLJDW.js → list-V5ZA6YH3.js} +5 -5
- package/dist/{login-R4Q7Q64M.js → login-ZHZBLYD6.js} +20 -8
- package/dist/{logout-6CEIH4HW.js → logout-B6H5F5YP.js} +2 -2
- package/dist/{look-BGDLDBVW.js → look-43IS7IVT.js} +3 -3
- package/dist/{measure-ZTOIX5EH.js → measure-OYIH5M4K.js} +11 -11
- package/dist/{media-treatment-BL5JCBJ6.js → media-treatment-U6QA2YV2.js} +5 -5
- package/dist/{media-use-AUAF4NW6.js → media-use-Q25W5P26.js} +2 -2
- package/dist/{normalize-audio-RH556PEC.js → normalize-audio-HIPTTGNT.js} +4 -4
- package/dist/{open-JMC3AM42.js → open-7VKL24QP.js} +4 -4
- package/dist/{play-HRBMMSTB.js → play-DLP7TMRY.js} +4 -4
- package/dist/{present-G4ASOHGK.js → present-PPIXSHJO.js} +4 -4
- package/dist/{preview-E76EMLHL.js → preview-RS25TO6I.js} +5 -5
- package/dist/{probe-ZAHTMJ4K.js → probe-LSVMXNWS.js} +3 -3
- package/dist/{publish-NCKCQFU3.js → publish-DV3JALTW.js} +4 -4
- package/dist/{refresh-MQTO43RB.js → refresh-T6JLFCS4.js} +2 -2
- package/dist/{render-K4SN2VZ2.js → render-CH265MNE.js} +11 -11
- package/dist/{render-MPERU2AI.js → render-GNBMXGA4.js} +8 -8
- package/dist/{run-OJ2GBYKB.js → run-A46NUKCV.js} +3 -3
- package/dist/{skills-ZG2QPQYG.js → skills-2OSBIIXY.js} +5 -5
- package/dist/{skillsUpdateCheck-GVYAPPEI.js → skillsUpdateCheck-GBISX7YN.js} +3 -3
- package/dist/{snapshot-YCHIYLWT.js → snapshot-SSS7UVPI.js} +7 -7
- package/dist/{status-6WAZ5EBM.js → status-Z5BPMROD.js} +4 -4
- package/dist/studio/assets/{hyperframes-player-Cf70g7g5.js → hyperframes-player-CtwXT8nW.js} +1 -1
- package/dist/studio/assets/{index-Ds4bLp7M.js → index-CNO8BPjF.js} +1 -1
- package/dist/studio/assets/{index-KTleZEQO.js → index-CrRO-B3w.js} +112 -112
- package/dist/studio/index.html +1 -1
- package/dist/{studioServer-MZNEVHXX.js → studioServer-QUBL75RC.js} +5 -5
- package/dist/{sync-NLO3YATC.js → sync-ILC4CCNG.js} +3 -3
- package/dist/{telemetry-K5HV7W2M.js → telemetry-TJI5LGLQ.js} +3 -3
- package/dist/{timeline-QRSILS6F.js → timeline-X2HQ6SWI.js} +5 -5
- package/dist/{tokens-D6PLMRPT.js → tokens-7MKCWG3Y.js} +2 -2
- package/dist/{transcribe-A6ZABVDW.js → transcribe-QCEDFMMB.js} +8 -8
- package/dist/{updateCheck-V4G5IV43.js → updateCheck-ZCRXVYWB.js} +2 -2
- package/dist/{upgrade-OS7M65CJ.js → upgrade-HQ4XGPMT.js} +2 -2
- package/dist/{validate-BYDGTD6L.js → validate-PTSOIX2X.js} +6 -6
- package/dist/warmCheck.js +12 -12
- package/package.json +1 -1
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
withOwner,
|
|
13
13
|
withReader,
|
|
14
14
|
writeTurn
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6IPIEPGY.js";
|
|
16
16
|
import "./chunk-X7MTZ4T2.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-3MJIP7L3.js";
|
|
18
18
|
import {
|
|
19
19
|
HistoryBusyError,
|
|
20
20
|
HistoryIdError,
|
|
@@ -30,8 +30,8 @@ import "./chunk-5LOZWO2M.js";
|
|
|
30
30
|
import "./chunk-A4ZTSQLW.js";
|
|
31
31
|
import {
|
|
32
32
|
trackHistoryAction
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-AX34M43B.js";
|
|
34
|
+
import "./chunk-SCVDE65J.js";
|
|
35
35
|
import "./chunk-PXVQOMKL.js";
|
|
36
36
|
import "./chunk-MCDNAIFF.js";
|
|
37
37
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -50,7 +50,7 @@ import "./chunk-LAGZGKKN.js";
|
|
|
50
50
|
import "./chunk-FBN2M2HK.js";
|
|
51
51
|
import {
|
|
52
52
|
withMeta
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-VPCKLVUT.js";
|
|
54
54
|
import "./chunk-BR2JQQC5.js";
|
|
55
55
|
import "./chunk-BLBMPEBX.js";
|
|
56
56
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-66W5IWLO.js";
|
|
63
63
|
import "./chunk-J3RXEDR2.js";
|
|
64
64
|
import "./chunk-QBXDU24O.js";
|
|
65
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-MS3HCZGU.js";
|
|
66
66
|
import "./chunk-E63BDV4Z.js";
|
|
67
67
|
import "./chunk-G7VEYUZ2.js";
|
|
68
68
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var ze=Object.defineProperty;var di=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var mi=Object.prototype.hasOwnProperty;var pi=(t,e)=>{for(var n in e)ze(t,n,{get:e[n],enumerable:!0})},fi=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ci(e))!mi.call(t,r)&&r!==n&&ze(t,r,{get:()=>e[r],enumerable:!(i=di(e,r))||i.enumerable});return t};var hi=t=>fi(ze({},"__esModule",{value:!0}),t);var mo={};pi(mo,{HyperframesPlayer:()=>Ge,SPEED_PRESETS:()=>ct,formatSpeed:()=>W,formatTime:()=>De});var Nt=t=>t!==null&&Number.isFinite(t)&&t>0;function je(t){let e=t.clipEndsSeconds.filter(i=>i===null).length;if(Nt(t.authoredDurationSeconds))return{seconds:t.authoredDurationSeconds,source:"authored",pendingClips:e};let n=t.clipEndsSeconds.filter(Nt);return n.length>0?{seconds:Math.max(...n),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 bi="http://www.w3.org/1999/xhtml";function Ot(t){return t!=null&&t.nodeType===1}function qe(t){return Ot(t)&&t.namespaceURI===bi}function Ye(t,e){return qe(t)&&t.localName===e}function gi(t){return Ye(t,"video")}function _i(t){return Ye(t,"audio")}function P(t){return gi(t)||_i(t)}function Ft(t){return Ye(t,"img")}function Ae(t){if(t==null||t.trim()==="")return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function ee(t=document){let e=t.querySelector('[data-composition-id][data-root="true"]');return qe(e)?e:t.querySelector("[data-composition-id]")}var G=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),_o=Object.freeze([G.start,G.duration,G.trackIndex]),yo=Object.freeze([G.derivedEnd]),vo=Object.freeze([G.derivedEnd,G.legacyTrack]);function Xe(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Ut=t=>{let e=Xe(t);return e!==null&&e>=0?e:null};function Ee(t){return Ut(t("data-playback-start"))??Ut(t("data-media-start"))??0}var te=.1,ne=10;function Ke(t){return Number.isFinite(t)&&t>0?Math.max(te,Math.min(ne,t)):1}function Ht(t,e=1){let n=Number.parseFloat(t("data-playback-rate")??"");return Ke(Number.isFinite(n)&&n>0?n:e)}function Ze(t){let e=Xe(t("data-duration"));return e!==null&&e>0?e:null}function Vt(t,e){let n=Ze(t);if(n!==null)return n;let i=Xe(t("data-end"));return i!==null?i-e:null}var yi=3;function Je(t,e,n){return Number.isFinite(t)?Math.max(0,t-e)/Ke(n):null}function Qe(t){let{tag:e,authoredDurationSeconds:n,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=t;if(n!==null&&n>0)return{seconds:n,source:"authored"};if(e==="img")return{seconds:yi,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Je(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var vi="data-fx-chain",Ao=vi.slice(5);var ie=(t="frequency",e="Frequency",n=1e3,i=20,r=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:i,max:r,step:1,default:n,scale:"log",automatable:!0}),et=(t=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),Te=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Wt={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."},Bt=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Te(-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:[ie("frequency","Frequency",1e3),Te(-40,40,0),et(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[ie("frequency","Frequency",200,20,2e3),Te(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[ie("frequency","Frequency",4e3,500,2e4),Te(-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:[ie("frequency","Cutoff",300,20,2e4),et(.707),Wt],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[ie("frequency","Cutoff",8e3,100,2e4),et(.707),Wt],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"}],Eo=new Map(Bt.map(t=>[t.id,t]));var To=Bt.map(t=>t.id);function Si(t){return 10**(t/20)}var $t=Si(12);var Gt="data-automation",No=Gt.slice(5),tt=1,Ai=512,L=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Re="volume",xe="rate";function zt(t){if(t===Re)return{kind:"volume"};if(t===xe)return{kind:"rate"};let e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===Ei){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,n,i]=e;return!n||!i?null:{kind:"fx",nodeId:n,param:i}}var Ei="preset";var Ti={min:0,max:$t,step:.01,unit:"",label:"Volume",scale:"linear",default:1};var Ri={min:te,max:ne,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function re(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function xi(t){let e=re(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function jt(t,e){let n=re(t),i=re(e);if(n===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(n),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function wi(t){let e=xi(t?.curve),n=jt(t?.viaX,t?.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function ki(t,e){let n=re(t?.t),i=re(t?.v);if(n===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,n),v:r,...wi(t)}}function Mi(t,e){let n=t.map(r=>ki(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of n)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,Ai)}function Ci(t){let e=[];for(let n of t.lanes){if(!zt(n.target))continue;let i=n.target===Re?Ti:n.target===xe?Ri:null,r=Mi(n.points??[],i);r.length>0&&e.push({target:n.target,points:r})}return{version:tt,lanes:e}}function qt(t){let e;try{e=JSON.parse(t)}catch(r){throw new L(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new L("Automation must be a JSON object.");let n=e;if(n.version!==tt)throw new L(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new L("Automation is missing a `lanes` array.");let i=n.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new L(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!zt(a.target))throw new L(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new L(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return Ci({version:tt,lanes:i})}function Ii(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Di(t,e){let n=t-.5,i=e-.5,r=.999,o=1e6,a=n>0?n/(r-t):n<0?-n/(t-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,l=Math.min(o,Math.max(1,a,s));return{cx:t+n/l,cy:e+i/l,w:l}}function Pi(t,e,n){let{cx:i,cy:r,w:o}=Di(e,n),a=2-2*o,s=t*a-1+2*o*i,l=-t*a-2*o*i,u=Li(s,l,t),c=1-u,f=c*c+2*o*u*c+u*u;return f>0?(2*o*r*u*c+u*u)/f:t}function Li(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;let i=Math.sqrt(Math.max(0,e*e-4*t*n)),r=(-e+i)/(2*t),o=(-e-i)/(2*t),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)):n}function Ni(t,e){let n=jt(e.viaX,e.viaY);return n?Pi(Math.min(1,Math.max(0,t)),n.x,n.y):Ii(t,e.curve)}function Oi(t,e,n,i){return i==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function we(t,e,n="linear"){let i=t.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 f=a+s>>1;i[f].t<=e?a=f:s=f}let l=i[a],u=i[s],c=u.t-l.t;return c<=0?u.v:Oi(l.v,u.v,Ni((e-l.t)/c,l),n)}var ke=new Map,Fi=64;function Yt(t,e=Re){let n=`${e}\0${t}`,i=ke.get(n);if(i!==void 0)return i;let r=null;try{r=qt(t).lanes.find(o=>o.target===e)??null}catch{r=null}return ke.size>Fi&&ke.clear(),ke.set(n,r),r}var Xt=48,Kt=new WeakMap;function Ui(t){let e=t.points,n=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=l=>{let u=r[r.length-1];if(l<=u)return;let c=we(t,u,"log");r.push(l),o.push(o[o.length-1]+(c+we(t,l,"log"))/2*(l-u))},s=Math.max(0,e[0].t);a(s);for(let l=1;l<e.length;l+=1){let u=e[l-1].t,c=e[l].t;if(!(c<=0))for(let f=1;f<=Xt;f+=1)a(Math.max(u,0)+(c-u)*f/Xt)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:n,lastRate:i}}function Hi(t){let e=Kt.get(t);return e||(e=Ui(t),Kt.set(t,e)),e}function Vi(t){return typeof t!="number"&&t.points.length>0}function Wi(t,e,n){let i=0,r=t.length-1;for(;r-i>1;){let o=i+r>>1;t[o]<=n?i=o:r=o}return e[i]+(e[r]-e[i])*(n-t[i])/(t[r]-t[i])}function Zt(t,e){if(typeof t=="number")return e/t;if(!Vi(t))return e;let{ts:n,ss:i,firstRate:r,lastRate:o}=Hi(t),a=n.length-1;return e<=0?e/r:e>=i[a]?n[a]+(e-i[a])/o:Wi(i,n,e)}function Bi(t){return t?Yt(t,xe):null}function Jt(t,e){return Bi(t)??e}var Bo=[{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 y=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),Go=Object.freeze([y.start,y.duration,y.trackIndex]),zo=Object.freeze([y.derivedEnd]),jo=Object.freeze([y.derivedEnd,y.legacyTrack]);function N(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var tn=/^[A-Za-z0-9_.:-]+$/;function nn(t,e){let n=t.charCodeAt(e);return n>=48&&n<=57}function Qt(t,e){let n=e;for(;n>=0&&nn(t,n);)n--;return n}function $i(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function Gi(t){let e=t.length-1;if(!nn(t,e))return null;let n=Qt(t,e);return t[n]==="."&&(n=Qt(t,n-1)),n+1}function zi(t){let e=Gi(t);if(e==null)return null;let n=$i(t,e-1),i=t[n];if(i!=="+"&&i!=="-")return null;let r=t.slice(0,n).trim();if(!tn.test(r))return null;let o=Number(t.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function oe(t){let e=(t??"").trim();if(!e)return null;let n=N(e);if(n!=null)return{kind:"absolute",value:n};if(tn.test(e))return{kind:"reference",refId:e,offset:0};let i=zi(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function x(t,e,n,i){t.push({code:e,attribute:n,value:i})}function ji(t,e,n,i){if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return x(i,"invalid-start",y.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);let r=n.resolveReferenceEnd?.(t.refId);return r==null||!Number.isFinite(r)?(x(i,"unresolved-start-reference",y.start,e),null):Math.max(0,r+t.offset)}var qi=1e-9;function Yi(t,e){return Math.abs(t-e)<=qi}function Xi(t,e,n){let i=N(t);if(i==null){x(n,"deprecated-end",y.derivedEnd,t),x(n,"invalid-end",y.derivedEnd,t);return}if(e==null){x(n,"deprecated-end",y.derivedEnd,t);return}Yi(i,e)||(x(n,"deprecated-end",y.derivedEnd,t),x(n,"conflicting-end",y.derivedEnd,t))}function Ki(t,e,n){let i=N(t);return i==null||i<0?(x(n,"invalid-duration",y.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Zi(t,e,n){x(n,"deprecated-end",y.derivedEnd,t);let i=N(t);return i==null?(x(n,"invalid-end",y.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(x(n,"end-before-start",y.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Ji(t,e,n){let i=t.getAttribute(y.duration),r=t.getAttribute(y.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Zi(r,e,n);let o=Ki(i,e,n);return r!=null&&Xi(r,o.end,n),o}function en(t,e,n,i){let r=N(t);return r==null||!Number.isInteger(r)?(x(i,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:n}}function Qi(t,e){let n=t.getAttribute(y.trackIndex),i=t.getAttribute(y.legacyTrack);if(n==null&&i==null)return{trackIndex:0,trackSource:"default"};if(n==null&&i!=null)return x(e,"deprecated-layer",y.legacyTrack,i),en(i,y.legacyTrack,"legacy-layer",e);let r=en(n??"",y.trackIndex,"track-index",e);if(i==null)return r;x(e,"deprecated-layer",y.legacyTrack,i);let o=N(i);return o!=null&&o!==r.trackIndex&&x(e,"conflicting-layer",y.legacyTrack,i),r}function nt(t,e={}){let n=[],i=t.getAttribute(y.start),r=oe(i),o=ji(r,i,e,n),a=Ji(t,o,n),s=Qi(t,n);return{startExpression:r,start:o,...a,...s,diagnostics:n}}function V(t){return N(t)}function it(t){return Ht(e=>t.getAttribute(e),P(t)?t.defaultPlaybackRate:1)}function er(t){return Jt(t.getAttribute("data-automation"),it(t))}function rt(t){return Ee(e=>t.getAttribute(e))}function ae(t,e){return tr(e,rt(t),er(t))}function ot(t){let e=Qe({tag:"video",authoredDurationSeconds:Ze(n=>t.getAttribute(n)),sourceDurationSeconds:Number.isFinite(t.duration)?t.duration:null,mediaStartSeconds:rt(t),playbackRate:it(t)});return e.source==="media"?ae(t,t.duration):e.seconds}function Me(t,e=0){return!Ft(t)||!t.hasAttribute("data-start")&&!t.hasAttribute("data-track-index")?null:Qe({tag:"img",authoredDurationSeconds:Vt(n=>t.getAttribute(n),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function tr(t,e,n){return typeof n=="number"?Je(t,e,n):Number.isFinite(t)?Zt(n,Math.max(0,t-e)):null}function rn(){return globalThis}function at(t,e){if(typeof window>"u")return;let n=rn(),i=n.__hf?.onSwallowed;if(i)try{i({label:t,error:e})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${t} swallowed:`,e)}var nr=t=>t.paused?.()===!0?(t.startTime?.()??0)+(t.totalDuration?.()??0)/Math.abs(t.timeScale?.()||1):0;function se(t){try{if(typeof t?.duration!="function")return null;let e=t.getChildren?.(!1,!1,!0),n=Array.isArray(e)?e:[],i=Math.max(Number(t.duration()),...n.map(nr));return Number.isFinite(i)?i:null}catch(e){return at("runtime.timelineDuration",e),null}}var on="data-hf-authored-duration",an="data-hf-authored-end";function le(t){if(t==null||typeof t=="string"&&t.trim()==="")return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}function Ce(t){let e=le(t.start);if(e==null)return null;let n=Math.max(0,e),i=le(t.duration),r=le(t.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=le(t.end),s=le(t.authoredEnd),l=a!=null&&a>n?a:s!=null&&s>n?s:null;return{start:n,duration:l==null?null:l-n,end:l}}var z=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),sa=Object.freeze([z.start,z.duration,z.trackIndex]),la=Object.freeze([z.derivedEnd]),ua=Object.freeze([z.derivedEnd,z.legacyTrack]);function ir(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var sn=t=>{let e=ir(t);return e!==null&&e>=0?e:null};function rr(t){return sn(t("data-playback-start"))??sn(t("data-media-start"))??0}var ln="data-hf-media-start-basis";function un(t){return t?.trim().toLowerCase()==="global"?"global":"local"}function or(t){return un(t.basis)==="global"?t.authoredStart:t.hostStart+t.authoredStart}function dn(t){return mn(t)?or({authoredStart:t.authoredStart,hostStart:t.hostStart,basis:t.basis}):t.ordinaryStart()}function cn(t){return mn(t)&&un(t.basis)==="global"}function mn(t){return!t.hasAutoStart&&t.authoredStart!=null&&t.hostStart!==0}function st(t){return rr(e=>t.getAttribute(e))}function pn(t,e){return t-st(e)}function ue(t){let e=t.timelineRegistry??{},n=t.includeAuthoredTimingAttrs??!1,i=t.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=d=>(d.hasAttribute("data-composition-id")?d.parentElement:d)?.closest("[data-composition-id]")??null,l=(d,h)=>{let g=s(h);if(g){for(let k of g.querySelectorAll(`[id="${d}"]`))if(s(k)===g)return k}let R=i.getElementById(d);return R||(Array.from(i.querySelectorAll("[data-composition-id]")).find(k=>k.getAttribute("data-composition-id")===d)??null)},u=(d,h)=>n?d.getAttribute(h):null,c=d=>Ce({start:0,duration:d.getAttribute("data-duration"),authoredDuration:u(d,"data-hf-authored-duration")})?.duration??Ce({start:T(d,0),end:d.getAttribute("data-end"),authoredEnd:u(d,"data-hf-authored-end")})?.duration??null,f=d=>d!=null&&Number.isFinite(d)&&d>0?d:null,v=d=>{let h=d.getAttribute("data-composition-id");return h?f(se(e[h])):null},b=d=>{let h=o.get(d);if(h!==void 0)return h;let g=c(d)??f(P(d)?ae(d,d.duration):null)??f(Me(d))??v(d);return o.set(d,g),g},S="[data-composition-src], [data-composition-id], [data-composition-file]",_=d=>d.matches(S),A=d=>!d.hasAttribute("data-composition-id")||oe(d.getAttribute("data-start"))?null:d.parentElement?.closest(`[data-start], ${S}`)??null,C=(d,h)=>pn(T(d,h),A(d)??d),M=(d,h)=>{let g=d.hasAttribute("data-composition-id")?d.parentElement?.closest("[data-composition-id]"):d.closest("[data-composition-id]");return g?C(g,h):0},I=(d,h)=>{let g=oe(d.getAttribute("data-start"));if(!g){let H=A(d);return H?T(H,h):h}if(g.kind==="absolute")return M(d,h)+Math.max(0,g.value);let R=l(g.refId,d);if(!R)return h;let k=T(R,0),ve=b(R)??0,Se=Math.min(0,M(d,0));return Math.max(Se,k+ve+g.offset)},T=(d,h)=>{let g=r.get(d);if(g!==void 0)return g??h;if(a.has(d))return h;a.add(d);try{let R=I(d,h);return r.set(d,R),R}finally{a.delete(d)}},U=d=>{let h=d.closest("[data-composition-id]");return{authoredStart:V(d.getAttribute("data-start")),hostStart:h?C(h,0):0,hasAutoStart:d.hasAttribute("data-hf-auto-start"),basis:d.getAttribute(ln)}};return{resolveStartForElement:(d,h=0)=>T(d,Math.max(0,h)),resolveDurationForElement:d=>b(d),resolveMediaStartForElement:d=>{let h=U(d);return dn({...h,ordinaryStart:()=>T(d,h.hostStart)})},resolveHostStartForElement:d=>M(d,0),resolveHostSlotsForElement:d=>{let h=[];for(let g=d.parentElement;g;g=g.parentElement){if(!_(g)||A(g)||st(g)<=0)continue;let R=T(g,0),k=c(g);h.push({start:R,end:k?R+k:1/0})}return h},isRootGlobalMediaStartForElement:d=>P(d)&&cn(U(d))}}function fn(){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 hn=7200,lt=1/60,de=t=>t!==null&&t>lt?t:null;function ar(t){return{width:Ae(t.getAttribute("data-width")),height:Ae(t.getAttribute("data-height"))}}function sr(t,e){let n=null;for(let i of t.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);if(o==null||o<=lt)continue;let a=Math.max(0,r)+o;(!n||a>n.seconds)&&(n={seconds:a,element:i})}return n&&de(n.seconds)!==null?n:null}function lr(t,e){return sr(t,e)?.seconds??null}function ur(t,e){let n=[];for(let r of t.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==t)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let i=V(t.getAttribute("data-duration"));return de(je({authoredDurationSeconds:null,clipEndsSeconds:[i,...n]}).seconds)}var dr=t=>t.hasAttribute("data-composition-id")||t.hasAttribute("data-composition-src");function cr(t,e,{unregisteredLottie:n}){let i=[];for(let o of t.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):(P(o)||dr(o))&&i.push(null)}(n||t.querySelector("[data-lottie-src]"))&&i.push(null);let r=je({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function mr(t){return pr(t).seconds}function pr(t){if(t.declared!==null&&Number.isFinite(t.declared)&&t.declared>0)return{seconds:t.declared,from:"declared",floorIndex:null};let e=de(t.timeline()),n=t.floors().map(f=>f??0),i=Math.max(0,...n),r=Number.isFinite(t.fallback)&&t.fallback>lt?t.fallback:0,o=Math.max(i,r),s=e!==null&&e>=hn&&de(o)!==null?null:e,l=i>=r,u=f=>({seconds:f,from:l?"floor":"fallback",floorIndex:l?n.indexOf(i):null});if(s!==null)return s>=o?{seconds:s,from:"timeline",floorIndex:null}:u(o);if(de(i)!==null)return u(o);if(r>0)return{seconds:r,from:"fallback",floorIndex:null};let c=t.derived();return{seconds:c>0?c:0,from:"derived",floorIndex:null}}function bn(t){let e=ee(t);if(!e)return null;let n=ue({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:t}),i=mr({declared:V(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[lr(t,{mediaStart:n.resolveMediaStartForElement,mediaDuration:ot}),ur(e,n)],fallback:0,derived:()=>cr(e,n,{unregisteredLottie:!1}).seconds??0});return{...ar(e),fps:fn().canonicalFps,durationSeconds:i}}var gn="hyperframes-studio-preview";var _n="__hfPreviewErrors";function yn(t){return t.hasRuntime||t.runtimeInjected?!1:!!(t.hasNestedCompositions||t.hasTimelines&&t.attempts>=5)}function j(t){return typeof t=="object"&&t!==null}function vn(t){return j(t)&&typeof t.getDuration=="function"}function Sn(t){return j(t)&&typeof t.duration=="function"&&typeof t.time=="function"&&typeof t.seek=="function"&&typeof t.play=="function"&&typeof t.pause=="function"}var q="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.228/dist/hyperframe.runtime.iife.js";function ce(t){if(t===null)return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function fr(t){let e=t?.querySelector("[data-composition-id][data-width][data-height]")??t?.querySelector("[data-width][data-height]");if(!e)return null;let n=ce(e.getAttribute("data-width")),i=ce(e.getAttribute("data-height"));return n!==null&&i!==null?{width:n,height:i}:null}function hr(t){return Array.isArray(t)?t.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Ie=class{constructor(e,n){this._iframe=e;this._callbacks=n}_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 n=null;try{n=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(n={kind:"error",message:i instanceof Error?i.message:String(i)})}n??=this._deadlineOutcome(e),n&&(this.stop(),n.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(n.message)):this._callbacks.onReady(n.result))},200)}_deadlineOutcome(e){return e<40||this._callbacks.hostOwnsDeadline?.()?null:{kind:"error",message:"Composition timeline not found after 8s"}}_poll(e){let n=this._iframe.contentWindow;if(!n)return null;let i=hr(Reflect.get(n,_n));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(n,"__timelines"),a=this.hasRuntimeBridge(n);if(yn({hasRuntime:a,hasTimelines:j(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(n,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,n){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=n?bn(n)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:fr(n)}}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 j(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let n=e.createElement("script");n.src=this._callbacks.resolveRuntimeUrl?.()??q,this._runtimeScript=n,n.onerror=()=>{this._runtimeScript!==n||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+n.src))},(e.head||e.documentElement).appendChild(n),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let n=Reflect.get(e,"__timelines");if(!j(n))return null;let i=Object.keys(n);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in n?r:i[i.length-1],a=n[o];return Sn(a)?a:null}_resolvePlaybackDurationAdapter(e){let n=Reflect.get(e,"__player");if(vn(n))return{kind:"runtime",getDuration:()=>n.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var An=`
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var ze=Object.defineProperty;var di=Object.getOwnPropertyDescriptor;var ci=Object.getOwnPropertyNames;var mi=Object.prototype.hasOwnProperty;var pi=(t,e)=>{for(var n in e)ze(t,n,{get:e[n],enumerable:!0})},fi=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ci(e))!mi.call(t,r)&&r!==n&&ze(t,r,{get:()=>e[r],enumerable:!(i=di(e,r))||i.enumerable});return t};var hi=t=>fi(ze({},"__esModule",{value:!0}),t);var mo={};pi(mo,{HyperframesPlayer:()=>Ge,SPEED_PRESETS:()=>ct,formatSpeed:()=>W,formatTime:()=>De});var Nt=t=>t!==null&&Number.isFinite(t)&&t>0;function je(t){let e=t.clipEndsSeconds.filter(i=>i===null).length;if(Nt(t.authoredDurationSeconds))return{seconds:t.authoredDurationSeconds,source:"authored",pendingClips:e};let n=t.clipEndsSeconds.filter(Nt);return n.length>0?{seconds:Math.max(...n),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 bi="http://www.w3.org/1999/xhtml";function Ot(t){return t!=null&&t.nodeType===1}function qe(t){return Ot(t)&&t.namespaceURI===bi}function Ye(t,e){return qe(t)&&t.localName===e}function gi(t){return Ye(t,"video")}function _i(t){return Ye(t,"audio")}function P(t){return gi(t)||_i(t)}function Ft(t){return Ye(t,"img")}function Ae(t){if(t==null||t.trim()==="")return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function ee(t=document){let e=t.querySelector('[data-composition-id][data-root="true"]');return qe(e)?e:t.querySelector("[data-composition-id]")}var G=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),_o=Object.freeze([G.start,G.duration,G.trackIndex]),yo=Object.freeze([G.derivedEnd]),vo=Object.freeze([G.derivedEnd,G.legacyTrack]);function Xe(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Ut=t=>{let e=Xe(t);return e!==null&&e>=0?e:null};function Ee(t){return Ut(t("data-playback-start"))??Ut(t("data-media-start"))??0}var te=.1,ne=10;function Ke(t){return Number.isFinite(t)&&t>0?Math.max(te,Math.min(ne,t)):1}function Ht(t,e=1){let n=Number.parseFloat(t("data-playback-rate")??"");return Ke(Number.isFinite(n)&&n>0?n:e)}function Ze(t){let e=Xe(t("data-duration"));return e!==null&&e>0?e:null}function Vt(t,e){let n=Ze(t);if(n!==null)return n;let i=Xe(t("data-end"));return i!==null?i-e:null}var yi=3;function Je(t,e,n){return Number.isFinite(t)?Math.max(0,t-e)/Ke(n):null}function Qe(t){let{tag:e,authoredDurationSeconds:n,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=t;if(n!==null&&n>0)return{seconds:n,source:"authored"};if(e==="img")return{seconds:yi,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Je(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var vi="data-fx-chain",Ao=vi.slice(5);var ie=(t="frequency",e="Frequency",n=1e3,i=20,r=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:i,max:r,step:1,default:n,scale:"log",automatable:!0}),et=(t=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),Te=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Wt={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."},Bt=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Te(-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:[ie("frequency","Frequency",1e3),Te(-40,40,0),et(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[ie("frequency","Frequency",200,20,2e3),Te(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[ie("frequency","Frequency",4e3,500,2e4),Te(-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:[ie("frequency","Cutoff",300,20,2e4),et(.707),Wt],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[ie("frequency","Cutoff",8e3,100,2e4),et(.707),Wt],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"}],Eo=new Map(Bt.map(t=>[t.id,t]));var To=Bt.map(t=>t.id);function Si(t){return 10**(t/20)}var $t=Si(12);var Gt="data-automation",No=Gt.slice(5),tt=1,Ai=512,L=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Re="volume",xe="rate";function zt(t){if(t===Re)return{kind:"volume"};if(t===xe)return{kind:"rate"};let e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===Ei){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,n,i]=e;return!n||!i?null:{kind:"fx",nodeId:n,param:i}}var Ei="preset";var Ti={min:0,max:$t,step:.01,unit:"",label:"Volume",scale:"linear",default:1};var Ri={min:te,max:ne,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function re(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function xi(t){let e=re(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function jt(t,e){let n=re(t),i=re(e);if(n===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(n),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function wi(t){let e=xi(t?.curve),n=jt(t?.viaX,t?.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function ki(t,e){let n=re(t?.t),i=re(t?.v);if(n===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,n),v:r,...wi(t)}}function Mi(t,e){let n=t.map(r=>ki(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of n)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,Ai)}function Ci(t){let e=[];for(let n of t.lanes){if(!zt(n.target))continue;let i=n.target===Re?Ti:n.target===xe?Ri:null,r=Mi(n.points??[],i);r.length>0&&e.push({target:n.target,points:r})}return{version:tt,lanes:e}}function qt(t){let e;try{e=JSON.parse(t)}catch(r){throw new L(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new L("Automation must be a JSON object.");let n=e;if(n.version!==tt)throw new L(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new L("Automation is missing a `lanes` array.");let i=n.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new L(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!zt(a.target))throw new L(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new L(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return Ci({version:tt,lanes:i})}function Ii(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Di(t,e){let n=t-.5,i=e-.5,r=.999,o=1e6,a=n>0?n/(r-t):n<0?-n/(t-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,l=Math.min(o,Math.max(1,a,s));return{cx:t+n/l,cy:e+i/l,w:l}}function Pi(t,e,n){let{cx:i,cy:r,w:o}=Di(e,n),a=2-2*o,s=t*a-1+2*o*i,l=-t*a-2*o*i,u=Li(s,l,t),c=1-u,f=c*c+2*o*u*c+u*u;return f>0?(2*o*r*u*c+u*u)/f:t}function Li(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;let i=Math.sqrt(Math.max(0,e*e-4*t*n)),r=(-e+i)/(2*t),o=(-e-i)/(2*t),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)):n}function Ni(t,e){let n=jt(e.viaX,e.viaY);return n?Pi(Math.min(1,Math.max(0,t)),n.x,n.y):Ii(t,e.curve)}function Oi(t,e,n,i){return i==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function we(t,e,n="linear"){let i=t.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 f=a+s>>1;i[f].t<=e?a=f:s=f}let l=i[a],u=i[s],c=u.t-l.t;return c<=0?u.v:Oi(l.v,u.v,Ni((e-l.t)/c,l),n)}var ke=new Map,Fi=64;function Yt(t,e=Re){let n=`${e}\0${t}`,i=ke.get(n);if(i!==void 0)return i;let r=null;try{r=qt(t).lanes.find(o=>o.target===e)??null}catch{r=null}return ke.size>Fi&&ke.clear(),ke.set(n,r),r}var Xt=48,Kt=new WeakMap;function Ui(t){let e=t.points,n=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=l=>{let u=r[r.length-1];if(l<=u)return;let c=we(t,u,"log");r.push(l),o.push(o[o.length-1]+(c+we(t,l,"log"))/2*(l-u))},s=Math.max(0,e[0].t);a(s);for(let l=1;l<e.length;l+=1){let u=e[l-1].t,c=e[l].t;if(!(c<=0))for(let f=1;f<=Xt;f+=1)a(Math.max(u,0)+(c-u)*f/Xt)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:n,lastRate:i}}function Hi(t){let e=Kt.get(t);return e||(e=Ui(t),Kt.set(t,e)),e}function Vi(t){return typeof t!="number"&&t.points.length>0}function Wi(t,e,n){let i=0,r=t.length-1;for(;r-i>1;){let o=i+r>>1;t[o]<=n?i=o:r=o}return e[i]+(e[r]-e[i])*(n-t[i])/(t[r]-t[i])}function Zt(t,e){if(typeof t=="number")return e/t;if(!Vi(t))return e;let{ts:n,ss:i,firstRate:r,lastRate:o}=Hi(t),a=n.length-1;return e<=0?e/r:e>=i[a]?n[a]+(e-i[a])/o:Wi(i,n,e)}function Bi(t){return t?Yt(t,xe):null}function Jt(t,e){return Bi(t)??e}var Bo=[{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 y=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),Go=Object.freeze([y.start,y.duration,y.trackIndex]),zo=Object.freeze([y.derivedEnd]),jo=Object.freeze([y.derivedEnd,y.legacyTrack]);function N(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var tn=/^[A-Za-z0-9_.:-]+$/;function nn(t,e){let n=t.charCodeAt(e);return n>=48&&n<=57}function Qt(t,e){let n=e;for(;n>=0&&nn(t,n);)n--;return n}function $i(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function Gi(t){let e=t.length-1;if(!nn(t,e))return null;let n=Qt(t,e);return t[n]==="."&&(n=Qt(t,n-1)),n+1}function zi(t){let e=Gi(t);if(e==null)return null;let n=$i(t,e-1),i=t[n];if(i!=="+"&&i!=="-")return null;let r=t.slice(0,n).trim();if(!tn.test(r))return null;let o=Number(t.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function oe(t){let e=(t??"").trim();if(!e)return null;let n=N(e);if(n!=null)return{kind:"absolute",value:n};if(tn.test(e))return{kind:"reference",refId:e,offset:0};let i=zi(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function x(t,e,n,i){t.push({code:e,attribute:n,value:i})}function ji(t,e,n,i){if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return x(i,"invalid-start",y.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);let r=n.resolveReferenceEnd?.(t.refId);return r==null||!Number.isFinite(r)?(x(i,"unresolved-start-reference",y.start,e),null):Math.max(0,r+t.offset)}var qi=1e-9;function Yi(t,e){return Math.abs(t-e)<=qi}function Xi(t,e,n){let i=N(t);if(i==null){x(n,"deprecated-end",y.derivedEnd,t),x(n,"invalid-end",y.derivedEnd,t);return}if(e==null){x(n,"deprecated-end",y.derivedEnd,t);return}Yi(i,e)||(x(n,"deprecated-end",y.derivedEnd,t),x(n,"conflicting-end",y.derivedEnd,t))}function Ki(t,e,n){let i=N(t);return i==null||i<0?(x(n,"invalid-duration",y.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Zi(t,e,n){x(n,"deprecated-end",y.derivedEnd,t);let i=N(t);return i==null?(x(n,"invalid-end",y.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(x(n,"end-before-start",y.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Ji(t,e,n){let i=t.getAttribute(y.duration),r=t.getAttribute(y.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Zi(r,e,n);let o=Ki(i,e,n);return r!=null&&Xi(r,o.end,n),o}function en(t,e,n,i){let r=N(t);return r==null||!Number.isInteger(r)?(x(i,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:n}}function Qi(t,e){let n=t.getAttribute(y.trackIndex),i=t.getAttribute(y.legacyTrack);if(n==null&&i==null)return{trackIndex:0,trackSource:"default"};if(n==null&&i!=null)return x(e,"deprecated-layer",y.legacyTrack,i),en(i,y.legacyTrack,"legacy-layer",e);let r=en(n??"",y.trackIndex,"track-index",e);if(i==null)return r;x(e,"deprecated-layer",y.legacyTrack,i);let o=N(i);return o!=null&&o!==r.trackIndex&&x(e,"conflicting-layer",y.legacyTrack,i),r}function nt(t,e={}){let n=[],i=t.getAttribute(y.start),r=oe(i),o=ji(r,i,e,n),a=Ji(t,o,n),s=Qi(t,n);return{startExpression:r,start:o,...a,...s,diagnostics:n}}function V(t){return N(t)}function it(t){return Ht(e=>t.getAttribute(e),P(t)?t.defaultPlaybackRate:1)}function er(t){return Jt(t.getAttribute("data-automation"),it(t))}function rt(t){return Ee(e=>t.getAttribute(e))}function ae(t,e){return tr(e,rt(t),er(t))}function ot(t){let e=Qe({tag:"video",authoredDurationSeconds:Ze(n=>t.getAttribute(n)),sourceDurationSeconds:Number.isFinite(t.duration)?t.duration:null,mediaStartSeconds:rt(t),playbackRate:it(t)});return e.source==="media"?ae(t,t.duration):e.seconds}function Me(t,e=0){return!Ft(t)||!t.hasAttribute("data-start")&&!t.hasAttribute("data-track-index")?null:Qe({tag:"img",authoredDurationSeconds:Vt(n=>t.getAttribute(n),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function tr(t,e,n){return typeof n=="number"?Je(t,e,n):Number.isFinite(t)?Zt(n,Math.max(0,t-e)):null}function rn(){return globalThis}function at(t,e){if(typeof window>"u")return;let n=rn(),i=n.__hf?.onSwallowed;if(i)try{i({label:t,error:e})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${t} swallowed:`,e)}var nr=t=>t.paused?.()===!0?(t.startTime?.()??0)+(t.totalDuration?.()??0)/Math.abs(t.timeScale?.()||1):0;function se(t){try{if(typeof t?.duration!="function")return null;let e=t.getChildren?.(!1,!1,!0),n=Array.isArray(e)?e:[],i=Math.max(Number(t.duration()),...n.map(nr));return Number.isFinite(i)?i:null}catch(e){return at("runtime.timelineDuration",e),null}}var on="data-hf-authored-duration",an="data-hf-authored-end";function le(t){if(t==null||typeof t=="string"&&t.trim()==="")return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}function Ce(t){let e=le(t.start);if(e==null)return null;let n=Math.max(0,e),i=le(t.duration),r=le(t.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=le(t.end),s=le(t.authoredEnd),l=a!=null&&a>n?a:s!=null&&s>n?s:null;return{start:n,duration:l==null?null:l-n,end:l}}var z=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),sa=Object.freeze([z.start,z.duration,z.trackIndex]),la=Object.freeze([z.derivedEnd]),ua=Object.freeze([z.derivedEnd,z.legacyTrack]);function ir(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var sn=t=>{let e=ir(t);return e!==null&&e>=0?e:null};function rr(t){return sn(t("data-playback-start"))??sn(t("data-media-start"))??0}var ln="data-hf-media-start-basis";function un(t){return t?.trim().toLowerCase()==="global"?"global":"local"}function or(t){return un(t.basis)==="global"?t.authoredStart:t.hostStart+t.authoredStart}function dn(t){return mn(t)?or({authoredStart:t.authoredStart,hostStart:t.hostStart,basis:t.basis}):t.ordinaryStart()}function cn(t){return mn(t)&&un(t.basis)==="global"}function mn(t){return!t.hasAutoStart&&t.authoredStart!=null&&t.hostStart!==0}function st(t){return rr(e=>t.getAttribute(e))}function pn(t,e){return t-st(e)}function ue(t){let e=t.timelineRegistry??{},n=t.includeAuthoredTimingAttrs??!1,i=t.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=d=>(d.hasAttribute("data-composition-id")?d.parentElement:d)?.closest("[data-composition-id]")??null,l=(d,h)=>{let g=s(h);if(g){for(let k of g.querySelectorAll(`[id="${d}"]`))if(s(k)===g)return k}let R=i.getElementById(d);return R||(Array.from(i.querySelectorAll("[data-composition-id]")).find(k=>k.getAttribute("data-composition-id")===d)??null)},u=(d,h)=>n?d.getAttribute(h):null,c=d=>Ce({start:0,duration:d.getAttribute("data-duration"),authoredDuration:u(d,"data-hf-authored-duration")})?.duration??Ce({start:T(d,0),end:d.getAttribute("data-end"),authoredEnd:u(d,"data-hf-authored-end")})?.duration??null,f=d=>d!=null&&Number.isFinite(d)&&d>0?d:null,v=d=>{let h=d.getAttribute("data-composition-id");return h?f(se(e[h])):null},b=d=>{let h=o.get(d);if(h!==void 0)return h;let g=c(d)??f(P(d)?ae(d,d.duration):null)??f(Me(d))??v(d);return o.set(d,g),g},S="[data-composition-src], [data-composition-id], [data-composition-file]",_=d=>d.matches(S),A=d=>!d.hasAttribute("data-composition-id")||oe(d.getAttribute("data-start"))?null:d.parentElement?.closest(`[data-start], ${S}`)??null,C=(d,h)=>pn(T(d,h),A(d)??d),M=(d,h)=>{let g=d.hasAttribute("data-composition-id")?d.parentElement?.closest("[data-composition-id]"):d.closest("[data-composition-id]");return g?C(g,h):0},I=(d,h)=>{let g=oe(d.getAttribute("data-start"));if(!g){let H=A(d);return H?T(H,h):h}if(g.kind==="absolute")return M(d,h)+Math.max(0,g.value);let R=l(g.refId,d);if(!R)return h;let k=T(R,0),ve=b(R)??0,Se=Math.min(0,M(d,0));return Math.max(Se,k+ve+g.offset)},T=(d,h)=>{let g=r.get(d);if(g!==void 0)return g??h;if(a.has(d))return h;a.add(d);try{let R=I(d,h);return r.set(d,R),R}finally{a.delete(d)}},U=d=>{let h=d.closest("[data-composition-id]");return{authoredStart:V(d.getAttribute("data-start")),hostStart:h?C(h,0):0,hasAutoStart:d.hasAttribute("data-hf-auto-start"),basis:d.getAttribute(ln)}};return{resolveStartForElement:(d,h=0)=>T(d,Math.max(0,h)),resolveDurationForElement:d=>b(d),resolveMediaStartForElement:d=>{let h=U(d);return dn({...h,ordinaryStart:()=>T(d,h.hostStart)})},resolveHostStartForElement:d=>M(d,0),resolveHostSlotsForElement:d=>{let h=[];for(let g=d.parentElement;g;g=g.parentElement){if(!_(g)||A(g)||st(g)<=0)continue;let R=T(g,0),k=c(g);h.push({start:R,end:k?R+k:1/0})}return h},isRootGlobalMediaStartForElement:d=>P(d)&&cn(U(d))}}function fn(){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 hn=7200,lt=1/60,de=t=>t!==null&&t>lt?t:null;function ar(t){return{width:Ae(t.getAttribute("data-width")),height:Ae(t.getAttribute("data-height"))}}function sr(t,e){let n=null;for(let i of t.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);if(o==null||o<=lt)continue;let a=Math.max(0,r)+o;(!n||a>n.seconds)&&(n={seconds:a,element:i})}return n&&de(n.seconds)!==null?n:null}function lr(t,e){return sr(t,e)?.seconds??null}function ur(t,e){let n=[];for(let r of t.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==t)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let i=V(t.getAttribute("data-duration"));return de(je({authoredDurationSeconds:null,clipEndsSeconds:[i,...n]}).seconds)}var dr=t=>t.hasAttribute("data-composition-id")||t.hasAttribute("data-composition-src");function cr(t,e,{unregisteredLottie:n}){let i=[];for(let o of t.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):(P(o)||dr(o))&&i.push(null)}(n||t.querySelector("[data-lottie-src]"))&&i.push(null);let r=je({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function mr(t){return pr(t).seconds}function pr(t){if(t.declared!==null&&Number.isFinite(t.declared)&&t.declared>0)return{seconds:t.declared,from:"declared",floorIndex:null};let e=de(t.timeline()),n=t.floors().map(f=>f??0),i=Math.max(0,...n),r=Number.isFinite(t.fallback)&&t.fallback>lt?t.fallback:0,o=Math.max(i,r),s=e!==null&&e>=hn&&de(o)!==null?null:e,l=i>=r,u=f=>({seconds:f,from:l?"floor":"fallback",floorIndex:l?n.indexOf(i):null});if(s!==null)return s>=o?{seconds:s,from:"timeline",floorIndex:null}:u(o);if(de(i)!==null)return u(o);if(r>0)return{seconds:r,from:"fallback",floorIndex:null};let c=t.derived();return{seconds:c>0?c:0,from:"derived",floorIndex:null}}function bn(t){let e=ee(t);if(!e)return null;let n=ue({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:t}),i=mr({declared:V(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[lr(t,{mediaStart:n.resolveMediaStartForElement,mediaDuration:ot}),ur(e,n)],fallback:0,derived:()=>cr(e,n,{unregisteredLottie:!1}).seconds??0});return{...ar(e),fps:fn().canonicalFps,durationSeconds:i}}var gn="hyperframes-studio-preview";var _n="__hfPreviewErrors";function yn(t){return t.hasRuntime||t.runtimeInjected?!1:!!(t.hasNestedCompositions||t.hasTimelines&&t.attempts>=5)}function j(t){return typeof t=="object"&&t!==null}function vn(t){return j(t)&&typeof t.getDuration=="function"}function Sn(t){return j(t)&&typeof t.duration=="function"&&typeof t.time=="function"&&typeof t.seek=="function"&&typeof t.play=="function"&&typeof t.pause=="function"}var q="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.229/dist/hyperframe.runtime.iife.js";function ce(t){if(t===null)return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function fr(t){let e=t?.querySelector("[data-composition-id][data-width][data-height]")??t?.querySelector("[data-width][data-height]");if(!e)return null;let n=ce(e.getAttribute("data-width")),i=ce(e.getAttribute("data-height"));return n!==null&&i!==null?{width:n,height:i}:null}function hr(t){return Array.isArray(t)?t.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Ie=class{constructor(e,n){this._iframe=e;this._callbacks=n}_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 n=null;try{n=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(n={kind:"error",message:i instanceof Error?i.message:String(i)})}n??=this._deadlineOutcome(e),n&&(this.stop(),n.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(n.message)):this._callbacks.onReady(n.result))},200)}_deadlineOutcome(e){return e<40||this._callbacks.hostOwnsDeadline?.()?null:{kind:"error",message:"Composition timeline not found after 8s"}}_poll(e){let n=this._iframe.contentWindow;if(!n)return null;let i=hr(Reflect.get(n,_n));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(n,"__timelines"),a=this.hasRuntimeBridge(n);if(yn({hasRuntime:a,hasTimelines:j(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(n,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,n){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=n?bn(n)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:fr(n)}}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 j(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let n=e.createElement("script");n.src=this._callbacks.resolveRuntimeUrl?.()??q,this._runtimeScript=n,n.onerror=()=>{this._runtimeScript!==n||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+n.src))},(e.head||e.documentElement).appendChild(n),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let n=Reflect.get(e,"__timelines");if(!j(n))return null;let i=Object.keys(n);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in n?r:i[i.length-1],a=n[o];return Sn(a)?a:null}_resolvePlaybackDurationAdapter(e){let n=Reflect.get(e,"__player");if(vn(n))return{kind:"runtime",getDuration:()=>n.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var An=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-ZBAF6L74.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3MJIP7L3.js";
|
|
13
13
|
import {
|
|
14
14
|
formatBytes,
|
|
15
15
|
label
|
|
16
16
|
} from "./chunk-5LOZWO2M.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-AX34M43B.js";
|
|
18
|
+
import "./chunk-SCVDE65J.js";
|
|
19
19
|
import "./chunk-PXVQOMKL.js";
|
|
20
20
|
import "./chunk-MCDNAIFF.js";
|
|
21
21
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -55,7 +55,7 @@ import "./chunk-WC4MTXGN.js";
|
|
|
55
55
|
import "./chunk-FBN2M2HK.js";
|
|
56
56
|
import {
|
|
57
57
|
withMeta
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-VPCKLVUT.js";
|
|
59
59
|
import "./chunk-BR2JQQC5.js";
|
|
60
60
|
import "./chunk-BLBMPEBX.js";
|
|
61
61
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -63,7 +63,7 @@ import "./chunk-ADVVQX4I.js";
|
|
|
63
63
|
import "./chunk-66W5IWLO.js";
|
|
64
64
|
import "./chunk-J3RXEDR2.js";
|
|
65
65
|
import "./chunk-QBXDU24O.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-MS3HCZGU.js";
|
|
67
67
|
import "./chunk-E63BDV4Z.js";
|
|
68
68
|
import "./chunk-G7VEYUZ2.js";
|
|
69
69
|
import "./chunk-XT6MXC7A.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-URICPFYV.js";
|
|
10
10
|
import {
|
|
11
11
|
copyDirSync
|
|
12
12
|
} from "./chunk-CIWX5UKC.js";
|
|
@@ -62,8 +62,8 @@ import "./chunk-T2WJO4XM.js";
|
|
|
62
62
|
import "./chunk-A4ZTSQLW.js";
|
|
63
63
|
import {
|
|
64
64
|
trackInitTemplate
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-AX34M43B.js";
|
|
66
|
+
import "./chunk-SCVDE65J.js";
|
|
67
67
|
import "./chunk-PXVQOMKL.js";
|
|
68
68
|
import "./chunk-MCDNAIFF.js";
|
|
69
69
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -136,7 +136,7 @@ import {
|
|
|
136
136
|
import "./chunk-QBXDU24O.js";
|
|
137
137
|
import {
|
|
138
138
|
VERSION
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-MS3HCZGU.js";
|
|
140
140
|
import "./chunk-E63BDV4Z.js";
|
|
141
141
|
import "./chunk-G7VEYUZ2.js";
|
|
142
142
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -741,7 +741,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
async function keepSkillsCurrent(destDir) {
|
|
744
|
-
const { updateSkills } = await import("./skills-
|
|
744
|
+
const { updateSkills } = await import("./skills-2OSBIIXY.js");
|
|
745
745
|
console.log();
|
|
746
746
|
console.log(c.bold("Checking AI coding skills against GitHub..."));
|
|
747
747
|
try {
|
|
@@ -1199,7 +1199,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
1199
1199
|
}
|
|
1200
1200
|
R.info("Opening studio preview...");
|
|
1201
1201
|
try {
|
|
1202
|
-
const previewCmd = await import("./preview-
|
|
1202
|
+
const previewCmd = await import("./preview-RS25TO6I.js").then((m) => m.default);
|
|
1203
1203
|
await runCommand(previewCmd, { rawArgs: [destDir] });
|
|
1204
1204
|
} catch {
|
|
1205
1205
|
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
runMeasure,
|
|
15
15
|
videoAndRoi,
|
|
16
16
|
videoArg
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SWBOZCM7.js";
|
|
18
18
|
import {
|
|
19
19
|
Fix,
|
|
20
20
|
readFrameAt
|
|
@@ -57,7 +57,7 @@ import "./chunk-2RY2LWAA.js";
|
|
|
57
57
|
import "./chunk-EPQC3FGZ.js";
|
|
58
58
|
import "./chunk-WC4MTXGN.js";
|
|
59
59
|
import "./chunk-FBN2M2HK.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-VPCKLVUT.js";
|
|
61
61
|
import "./chunk-BR2JQQC5.js";
|
|
62
62
|
import "./chunk-BLBMPEBX.js";
|
|
63
63
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -65,7 +65,7 @@ import "./chunk-ADVVQX4I.js";
|
|
|
65
65
|
import "./chunk-66W5IWLO.js";
|
|
66
66
|
import "./chunk-J3RXEDR2.js";
|
|
67
67
|
import "./chunk-QBXDU24O.js";
|
|
68
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-MS3HCZGU.js";
|
|
69
69
|
import "./chunk-E63BDV4Z.js";
|
|
70
70
|
import "./chunk-G7VEYUZ2.js";
|
|
71
71
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -6,9 +6,9 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
createInspectCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-65CJV3HG.js";
|
|
10
10
|
import "./chunk-TQBQYO4L.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3MJIP7L3.js";
|
|
12
12
|
import "./chunk-WIK27NBN.js";
|
|
13
13
|
import "./chunk-X7MTZ4T2.js";
|
|
14
14
|
import "./chunk-UOJSQZBR.js";
|
|
@@ -45,8 +45,8 @@ import "./chunk-5LOZWO2M.js";
|
|
|
45
45
|
import "./chunk-V76CLMWJ.js";
|
|
46
46
|
import "./chunk-EHZESMRB.js";
|
|
47
47
|
import "./chunk-A4ZTSQLW.js";
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-AX34M43B.js";
|
|
49
|
+
import "./chunk-SCVDE65J.js";
|
|
50
50
|
import "./chunk-PXVQOMKL.js";
|
|
51
51
|
import "./chunk-MCDNAIFF.js";
|
|
52
52
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -90,7 +90,7 @@ import "./chunk-2RY2LWAA.js";
|
|
|
90
90
|
import "./chunk-EPQC3FGZ.js";
|
|
91
91
|
import "./chunk-WC4MTXGN.js";
|
|
92
92
|
import "./chunk-FBN2M2HK.js";
|
|
93
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-VPCKLVUT.js";
|
|
94
94
|
import "./chunk-BR2JQQC5.js";
|
|
95
95
|
import "./chunk-BLBMPEBX.js";
|
|
96
96
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -98,7 +98,7 @@ import "./chunk-ADVVQX4I.js";
|
|
|
98
98
|
import "./chunk-66W5IWLO.js";
|
|
99
99
|
import "./chunk-J3RXEDR2.js";
|
|
100
100
|
import "./chunk-QBXDU24O.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-MS3HCZGU.js";
|
|
102
102
|
import "./chunk-E63BDV4Z.js";
|
|
103
103
|
import "./chunk-G7VEYUZ2.js";
|
|
104
104
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-ZBAF6L74.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3MJIP7L3.js";
|
|
13
13
|
import "./chunk-5LOZWO2M.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-AX34M43B.js";
|
|
15
|
+
import "./chunk-SCVDE65J.js";
|
|
16
16
|
import "./chunk-PXVQOMKL.js";
|
|
17
17
|
import "./chunk-MCDNAIFF.js";
|
|
18
18
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import "./chunk-FBN2M2HK.js";
|
|
44
44
|
import {
|
|
45
45
|
withMeta
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-VPCKLVUT.js";
|
|
47
47
|
import "./chunk-BR2JQQC5.js";
|
|
48
48
|
import "./chunk-BLBMPEBX.js";
|
|
49
49
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -51,7 +51,7 @@ import "./chunk-ADVVQX4I.js";
|
|
|
51
51
|
import "./chunk-66W5IWLO.js";
|
|
52
52
|
import "./chunk-J3RXEDR2.js";
|
|
53
53
|
import "./chunk-QBXDU24O.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-MS3HCZGU.js";
|
|
55
55
|
import "./chunk-E63BDV4Z.js";
|
|
56
56
|
import "./chunk-G7VEYUZ2.js";
|
|
57
57
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -285,7 +285,7 @@ var lambda_default = defineCommand({
|
|
|
285
285
|
}
|
|
286
286
|
switch (subcommand) {
|
|
287
287
|
case "deploy": {
|
|
288
|
-
const { runDeploy } = await import("./deploy-
|
|
288
|
+
const { runDeploy } = await import("./deploy-6D752FSZ.js");
|
|
289
289
|
const { parseReservedConcurrency } = await import("./sam-EGFXZF56.js");
|
|
290
290
|
await runDeploy({
|
|
291
291
|
stackName,
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
layout_default,
|
|
11
11
|
loadBrowserScript,
|
|
12
12
|
parseAt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-65CJV3HG.js";
|
|
14
14
|
import "./chunk-TQBQYO4L.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-3MJIP7L3.js";
|
|
16
16
|
import "./chunk-WIK27NBN.js";
|
|
17
17
|
import "./chunk-X7MTZ4T2.js";
|
|
18
18
|
import "./chunk-UOJSQZBR.js";
|
|
@@ -49,8 +49,8 @@ import "./chunk-5LOZWO2M.js";
|
|
|
49
49
|
import "./chunk-V76CLMWJ.js";
|
|
50
50
|
import "./chunk-EHZESMRB.js";
|
|
51
51
|
import "./chunk-A4ZTSQLW.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-AX34M43B.js";
|
|
53
|
+
import "./chunk-SCVDE65J.js";
|
|
54
54
|
import "./chunk-PXVQOMKL.js";
|
|
55
55
|
import "./chunk-MCDNAIFF.js";
|
|
56
56
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -94,7 +94,7 @@ import "./chunk-2RY2LWAA.js";
|
|
|
94
94
|
import "./chunk-EPQC3FGZ.js";
|
|
95
95
|
import "./chunk-WC4MTXGN.js";
|
|
96
96
|
import "./chunk-FBN2M2HK.js";
|
|
97
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-VPCKLVUT.js";
|
|
98
98
|
import "./chunk-BR2JQQC5.js";
|
|
99
99
|
import "./chunk-BLBMPEBX.js";
|
|
100
100
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -102,7 +102,7 @@ import "./chunk-ADVVQX4I.js";
|
|
|
102
102
|
import "./chunk-66W5IWLO.js";
|
|
103
103
|
import "./chunk-J3RXEDR2.js";
|
|
104
104
|
import "./chunk-QBXDU24O.js";
|
|
105
|
-
import "./chunk-
|
|
105
|
+
import "./chunk-MS3HCZGU.js";
|
|
106
106
|
import "./chunk-E63BDV4Z.js";
|
|
107
107
|
import "./chunk-G7VEYUZ2.js";
|
|
108
108
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-X5EOH44V.js";
|
|
10
10
|
import {
|
|
11
11
|
trackLintRun
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O7M3IGR4.js";
|
|
13
13
|
import {
|
|
14
14
|
isUnderCompositions,
|
|
15
15
|
resolveLintTarget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3MJIP7L3.js";
|
|
17
17
|
import "./chunk-5LOZWO2M.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-AX34M43B.js";
|
|
19
|
+
import "./chunk-SCVDE65J.js";
|
|
20
20
|
import "./chunk-PXVQOMKL.js";
|
|
21
21
|
import "./chunk-MCDNAIFF.js";
|
|
22
22
|
import "./chunk-6NJVSTSY.js";
|
|
@@ -51,7 +51,7 @@ import "./chunk-WC4MTXGN.js";
|
|
|
51
51
|
import "./chunk-FBN2M2HK.js";
|
|
52
52
|
import {
|
|
53
53
|
withMeta
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VPCKLVUT.js";
|
|
55
55
|
import "./chunk-BR2JQQC5.js";
|
|
56
56
|
import "./chunk-BLBMPEBX.js";
|
|
57
57
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./chunk-66W5IWLO.js";
|
|
65
65
|
import "./chunk-J3RXEDR2.js";
|
|
66
66
|
import "./chunk-QBXDU24O.js";
|
|
67
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-MS3HCZGU.js";
|
|
68
68
|
import "./chunk-E63BDV4Z.js";
|
|
69
69
|
import "./chunk-G7VEYUZ2.js";
|
|
70
70
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
createCloudClient,
|
|
12
12
|
reportApiError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZDQEVQHB.js";
|
|
14
14
|
import "./chunk-6A45RKAK.js";
|
|
15
15
|
import {
|
|
16
16
|
parseIntFlag
|
|
17
17
|
} from "./chunk-FPR57WRR.js";
|
|
18
18
|
import "./chunk-NO6F7CLR.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-QEQEKBL7.js";
|
|
20
|
+
import "./chunk-GOPJLAMZ.js";
|
|
21
21
|
import {
|
|
22
22
|
errorBox
|
|
23
23
|
} from "./chunk-5LOZWO2M.js";
|
|
@@ -34,7 +34,7 @@ import "./chunk-YWRUQ7XZ.js";
|
|
|
34
34
|
import "./chunk-OFQWTKPW.js";
|
|
35
35
|
import {
|
|
36
36
|
withMeta
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VPCKLVUT.js";
|
|
38
38
|
import "./chunk-BR2JQQC5.js";
|
|
39
39
|
import "./chunk-BLBMPEBX.js";
|
|
40
40
|
import "./chunk-ISN5GRYI.js";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./chunk-66W5IWLO.js";
|
|
45
45
|
import "./chunk-J3RXEDR2.js";
|
|
46
46
|
import "./chunk-QBXDU24O.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-MS3HCZGU.js";
|
|
48
48
|
import "./chunk-E63BDV4Z.js";
|
|
49
49
|
import "./chunk-G7VEYUZ2.js";
|
|
50
50
|
import "./chunk-XT6MXC7A.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isUserInfoEmpty,
|
|
10
10
|
saveUserInfo,
|
|
11
11
|
userDisplayName
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FZM6E4S4.js";
|
|
13
13
|
import {
|
|
14
14
|
AuthClient,
|
|
15
15
|
assertOAuthConfiguredOrExit,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
startAuthorizationCodeFlow,
|
|
24
24
|
startDeviceAuthorizationFlow,
|
|
25
25
|
writeStore
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GOPJLAMZ.js";
|
|
27
27
|
import {
|
|
28
28
|
telemetryIdentity
|
|
29
29
|
} from "./chunk-PXVQOMKL.js";
|
|
@@ -39,7 +39,8 @@ import {
|
|
|
39
39
|
} from "./chunk-2GICKZ3I.js";
|
|
40
40
|
import {
|
|
41
41
|
failCommand,
|
|
42
|
-
failUsage
|
|
42
|
+
failUsage,
|
|
43
|
+
requestCliExit
|
|
43
44
|
} from "./chunk-66W5IWLO.js";
|
|
44
45
|
import {
|
|
45
46
|
envFlagEnabled,
|
|
@@ -127,7 +128,7 @@ function assertAttendedDeviceFlow() {
|
|
|
127
128
|
async function runDeviceLogin() {
|
|
128
129
|
assertAttendedDeviceFlow();
|
|
129
130
|
assertOAuthConfiguredOrExit();
|
|
130
|
-
const { trackAuthLoginStarted, trackAuthLoginCompleted, trackAuthLoginFailed, identifyUser } = await import("./telemetry-
|
|
131
|
+
const { trackAuthLoginStarted, trackAuthLoginCompleted, trackAuthLoginFailed, identifyUser } = await import("./telemetry-TJI5LGLQ.js");
|
|
131
132
|
trackAuthLoginStarted("device");
|
|
132
133
|
let tokens;
|
|
133
134
|
try {
|
|
@@ -194,21 +195,32 @@ async function revokeDeviceTokens(tokens) {
|
|
|
194
195
|
}
|
|
195
196
|
async function runOAuthLogin() {
|
|
196
197
|
assertOAuthConfiguredOrExit();
|
|
197
|
-
const { trackAuthLoginStarted, trackAuthLoginFailed } = await import("./telemetry-
|
|
198
|
+
const { trackAuthLoginStarted, trackAuthLoginFailed } = await import("./telemetry-TJI5LGLQ.js");
|
|
198
199
|
trackAuthLoginStarted("oauth");
|
|
200
|
+
const recordCancel = () => {
|
|
201
|
+
trackAuthLoginFailed("oauth", "aborted");
|
|
202
|
+
requestCliExit(130);
|
|
203
|
+
};
|
|
204
|
+
process.once("SIGINT", recordCancel);
|
|
199
205
|
let tokens;
|
|
200
206
|
try {
|
|
201
207
|
({ tokens } = await startAuthorizationCodeFlow());
|
|
202
208
|
} catch (err) {
|
|
203
209
|
const message = err.message ?? "";
|
|
204
|
-
|
|
210
|
+
const timedOut = /timed out/i.test(message);
|
|
211
|
+
trackAuthLoginFailed("oauth", timedOut ? "flow_timeout" : "flow_error");
|
|
205
212
|
console.error(c.error(`Sign-in failed: ${message}`));
|
|
213
|
+
if (timedOut) {
|
|
214
|
+
console.error("Run `hyperframes auth login` again.");
|
|
215
|
+
}
|
|
206
216
|
failCommand();
|
|
217
|
+
} finally {
|
|
218
|
+
process.off("SIGINT", recordCancel);
|
|
207
219
|
}
|
|
208
220
|
await reportIdentity(issuedCredential(tokens));
|
|
209
221
|
}
|
|
210
222
|
async function reportIdentity(credential) {
|
|
211
|
-
const { trackAuthLoginCompleted, identifyUser } = await import("./telemetry-
|
|
223
|
+
const { trackAuthLoginCompleted, identifyUser } = await import("./telemetry-TJI5LGLQ.js");
|
|
212
224
|
const client = new AuthClient({
|
|
213
225
|
onUnauthenticatedRefresh: async (rt) => await refreshTokens(rt)
|
|
214
226
|
});
|
|
@@ -256,7 +268,7 @@ async function clearUserInfoBestEffort() {
|
|
|
256
268
|
}
|
|
257
269
|
}
|
|
258
270
|
async function runApiKeyLogin(inlineKey) {
|
|
259
|
-
const { trackAuthLoginStarted, trackAuthLoginCompleted, trackAuthLoginFailed, identifyUser } = await import("./telemetry-
|
|
271
|
+
const { trackAuthLoginStarted, trackAuthLoginCompleted, trackAuthLoginFailed, identifyUser } = await import("./telemetry-TJI5LGLQ.js");
|
|
260
272
|
trackAuthLoginStarted("api_key");
|
|
261
273
|
let key;
|
|
262
274
|
try {
|