/**
 * Browser-side runtime script embedded into the generated HTML.
 * Implements window.__hf.seek(t) and effect application.
 * Kept as a string template so it can be embedded inline without a bundler.
 */
export declare const RUNTIME_SCRIPT = "\n(function () {\n  var CLIPS = /*CLIPS_JSON*/[];\n\n  function interpolate(kfs, t) {\n    if (!kfs || kfs.length === 0) return null;\n    if (kfs.length === 1) return kfs[0].values;\n    var prev = kfs[0], next = kfs[kfs.length - 1];\n    for (var i = 0; i < kfs.length - 1; i++) {\n      if (t >= kfs[i].time && t <= kfs[i + 1].time) { prev = kfs[i]; next = kfs[i + 1]; break; }\n    }\n    if (t <= prev.time) return prev.values;\n    if (t >= next.time) return next.values;\n    var raw = (t - prev.time) / (next.time - prev.time);\n    var e = prev.easing || 'linear';\n    var p = e === 'easeIn' ? raw * raw\n           : e === 'easeOut' ? raw * (2 - raw)\n           : e === 'easeInOut' ? (raw < 0.5 ? 2 * raw * raw : -1 + (4 - 2 * raw) * raw)\n           : raw;\n    var out = {};\n    for (var k in prev.values) {\n      var a = +prev.values[k], b = +next.values[k];\n      out[k] = isNaN(a) || isNaN(b) ? prev.values[k] : a + (b - a) * p;\n    }\n    return out;\n  }\n\n  function applyEffects(el, effects, clipTime) {\n    var opacity = 1;\n    var filters = [];\n    for (var i = 0; i < effects.length; i++) {\n      var fx = effects[i];\n      var t = clipTime - fx.startTime;\n      if (t < 0 || t > fx.duration) continue;\n      var vals = (fx.keyframes && fx.keyframes.length > 0)\n        ? interpolate(fx.keyframes, t)\n        : fx.params;\n      if (!vals) continue;\n      switch (fx.type) {\n        case 'fadeIn':\n          opacity = Math.min(opacity, t / fx.duration * (+(vals.intensity || 1))); break;\n        case 'fadeOut':\n          opacity = Math.min(opacity, (1 - t / fx.duration) * (+(vals.intensity || 1))); break;\n        case 'blur':\n          filters.push('blur(' + (+vals.radius || 0) + 'px)'); break;\n        case 'brightness':\n          filters.push('brightness(' + (+vals.value || 1) + ')'); break;\n        case 'contrast':\n          filters.push('contrast(' + (+vals.value || 1) + ')'); break;\n        case 'saturation':\n          filters.push('saturate(' + (+vals.value || 1) + ')'); break;\n      }\n    }\n    el.style.opacity = String(opacity);\n    if (filters.length > 0) el.style.filter = filters.join(' ');\n    else el.style.filter = '';\n  }\n\n  window.__hf = {\n    duration: /*DURATION*/0,\n    media: /*MEDIA_JSON*/[],\n    seek: function (t) {\n      for (var i = 0; i < CLIPS.length; i++) {\n        var c = CLIPS[i];\n        var el = document.getElementById(c.id);\n        if (!el) continue;\n        var active = t >= c.startTime && t < c.startTime + c.duration;\n        el.style.display = active ? 'block' : 'none';\n        if (active) applyEffects(el, c.effects, t - c.startTime);\n      }\n    }\n  };\n})();\n";
