Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
feat(skills): add bgm-to-video skill
Miao Yangd596379e5253
diff --git a/skills/bgm-to-video/SKILL.md b/skills/bgm-to-video/SKILL.mdnew file mode 100644index 0000000000..9702855a06--- /dev/null+++ b/skills/bgm-to-video/SKILL.md@@ -0,0 +1,191 @@+---+name: bgm-to-video+description: >+ Use when the user has a BGM / background-music track (audio file, or a video to pull+ audio from) and wants a music-grounded, beat-synced HyperFrames video. This is the+ template-driven path: a deterministic analyzer reads the beat, a Music Reader classifies+ the track into sections and marks where each could be cut finer (beat type + mood, no+ content), then a Director decides each section's groups (it alone sees the templates) and+ matches each to a reverse-engineered Group Template from a catalog and adapts+ it (binding copy, palette, and timing), falling back to free creative-coding when no+ template fits, and a Builder realizes it as one paused-GSAP HyperFrames composition.+ V1 is asset-free: typography, generative shader/geometry backgrounds, code-native+ motion. "template" names the method (match-and-adapt), not a fixed look.+metadata:+ {+ "tags": "bgm, music, beat-sync, templates, group-template, creative-coding, typography, gsap, hyperframes, visual-plan",+ }+---++# bgm-to-video — template-driven, music-grounded video++Input is a **BGM track**. Output is a beat-synced HyperFrames video where **music is the+spine; the visual for each group is chosen by matching a reverse-engineered template**,+not invented from scratch each time. When nothing matches, the Director free-composes —+the catalog is a head start, not a cage.++## Two layers++| Layer | Artifact | What it is | Used by |+| -------------------------- | --------------------------------- | ----------------------------------------------------------------------------- | -------- |+| **L0 · Motion Primitives** | `references/motion-primitives.md` | atoms: one anchor → one GSAP micro-move | Builder |+| **L1 · Group Templates** | `templates/<id>/` | a whole-group archetype (roles + timing + stop rule + exit), composed from L0 | Director |++The linchpin: the **Music Reader's per-group output** and a **template's match-face** are+the same schema — `GroupSignature` (`references/signature-schema.md`). Matching is then+mechanical.++## How templates get into the catalog++Templates are **reverse-engineered from golden-sample videos** by the+`bgm-golden_sample_reverse` skill (`reverse-to-template.md`): slice a group → beatgrid+(signature) → Gemini video analysis (roles/motion/transition) → a `card.json` (+ a+parameterized reference `index.html`), promoted into `templates/<id>/`.++## Pipeline++| # | Phase | Exec | Artifact | Detail |+| --- | ---------- | -------- | ------------------- | ------------------------------------------------------------------------------------------------------------------- |+| 0 | init | Bash | `assets/bgm.mp3` | create project, place/extract BGM |+| 1 | analyze | Python | `audiomap.json` | deterministic beat / energy / roll / hard-stop analysis |+| 2 | read music | subagent | `music-read.json` | Music Reader → `sections[]` (a `GroupSignature` each) + `cut_candidates[]` (classify only; no group-count decision) |+| 3 | plan | subagent | `visual-plan.json` | Director → subdivide sections into groups (catalog-aware) + match a template per group + adapt; else free-compose |+| 4 | build | subagent | `index.html` | Builder → mount each group (fork template impl, or author from L0) on one timeline |+| 5 | verify | Bash | gate | lint + validate + inspect |+| 6 | render | Bash | `renders/video.mp4` | muxed video with BGM |+| 7 | finalize | subagent | repaired output | snapshot QA + one repair loop |++`SKILL_DIR` = this skill directory. `PROJECT_DIR` = `videos/<project-name>/`.++## Step 0 — Init project + place BGM++```bash+mkdir -p "$PROJECT_DIR/assets" "$PROJECT_DIR/renders"+cp "<user-music>" "$PROJECT_DIR/assets/bgm.mp3" # extract from video first if needed+```++Optional style files at the project root: `frame.md`, `design.md` / `DESIGN.md`.++## Step 1 — Analyze the music++```bash+python3 <SKILL_DIR>/scripts/analyze-beatgrid.py "$PROJECT_DIR/assets/bgm.mp3" \+ -o "$PROJECT_DIR/audiomap.json" --print+```++Writes the canonical timing source. Sections are NOT baked in.++## Step 2 — Read music (Music Reader → music-read.json)++Dispatch one subagent. Prompt = full contents of [`agents/music-reader.md`](agents/music-reader.md) + dispatch context:++```text+SKILL_DIR: <absolute path>+PROJECT_DIR: <absolute path>+AudioMap: <PROJECT_DIR>/audiomap.json+Signature schema: <SKILL_DIR>/references/signature-schema.md+Write music read to: <PROJECT_DIR>/music-read.json+```++The Music Reader **only classifies**: it cuts the track into **sections** (musical+macro-structure), writes a `GroupSignature` per section, and lists each section's+**`cut_candidates`** — the musically-legal places it _could_ be cut finer. It does **not**+decide how many groups a section becomes (that needs the catalog, which it can't see). No+copy, no fonts, no colors, no layout.++## Step 3 — Plan (Director → visual-plan.json)++Dispatch one subagent. Prompt = full contents of [`agents/director.md`](agents/director.md) + dispatch context:++```text+SKILL_DIR: <absolute path>+PROJECT_DIR: <absolute path>+User request / brief: <user's request and supplied copy>+AudioMap: <PROJECT_DIR>/audiomap.json+MusicRead: <PROJECT_DIR>/music-read.json+Template catalog: read EVERY <SKILL_DIR>/templates/*/card.json (status:"promoted")+Signature schema: <SKILL_DIR>/references/signature-schema.md+Template definition: <SKILL_DIR>/references/template-definition.md+Transition catalog: <SKILL_DIR>/references/transition-catalog.md+Visual plan contract: <SKILL_DIR>/references/visual-plan-contract.md+Motion primitives (for free-compose): <SKILL_DIR>/references/motion-primitives.md+Style files to read if present: <PROJECT_DIR>/frame.md, design.md, DESIGN.md+Write visual plan to: <PROJECT_DIR>/visual-plan.json+```++The Director first **subdivides each section into groups** by acting on its+`cut_candidates` (catalog-aware: keep a section whole when one template fits, split it when+a template would be stretched or it spans multiple gestures), then matches each group to a+promoted template, binds the template's params (copy it writes from the brief, palette from+mood, anchors from this group's beats), reconciles the stop rule to the group boundary,+plans `fast_cut` transitions, and free-composes any group with no match. It does **not**+write HTML/GSAP.++## Step 4 — Build (Builder → index.html)++Dispatch one subagent. Prompt = full contents of [`agents/builder.md`](agents/builder.md) + dispatch context:++```text+SKILL_DIR: <absolute path>+PROJECT_DIR: <absolute path>+AudioMap: <PROJECT_DIR>/audiomap.json+VisualPlan: <PROJECT_DIR>/visual-plan.json+Template reference impls: for each group with a templateRef, <SKILL_DIR>/templates/<templateRef>/index.html+Visual plan contract: <SKILL_DIR>/references/visual-plan-contract.md+Template definition: <SKILL_DIR>/references/template-definition.md+Motion primitives: <SKILL_DIR>/references/motion-primitives.md+Builder contract: <SKILL_DIR>/references/builder-contract.md+BGM path for HTML: assets/bgm.mp3+Write composition to: <PROJECT_DIR>/index.html+```++The Builder mounts each group as a gated sub-scene on ONE paused timeline: fork the+group's template reference impl and re-host its tweens at the group's absolute audio+seconds (or author from L0 primitives when free-composed), then apply the group→group+transitions.++## Step 5 — Verify gates++```bash+( cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes validate . )+( cd "$PROJECT_DIR" && npx hyperframes inspect . )+```++Inspect: t=0, each group's `span_sec` start, each transition `at`, the final frame. On+failure → Step 7.++## Step 6 — Render++```bash+( cd "$PROJECT_DIR" && npx hyperframes render . -q draft -o renders/video.mp4 --fps 30 )+```++Expect video + audio, duration == `audiomap.audio.duration_sec`.++## Step 7 — Finalize / repair++Dispatch one subagent. Prompt = full contents of [`agents/finalize.md`](agents/finalize.md) + the contracts above + the verbatim gate-failure output. Finalize edits `index.html` only; if the plan is creatively wrong, return to Step 3.++## Resume table++| You have | Continue from |+| --------------------- | ------------- |+| `assets/bgm.mp3` only | Step 1 |+| `audiomap.json` | Step 2 |+| `music-read.json` | Step 3 |+| `visual-plan.json` | Step 4 |+| `index.html` | Step 5 |+| gates passed | Step 6 |+| a gate failed | Step 7 |++## Directory layout++```+bgm-to-video/+ SKILL.md+ agents/ music-reader.md · director.md · builder.md · finalize.md+ references/ signature-schema.md · template-definition.md · transition-catalog.md+ visual-plan-contract.md · motion-primitives.md (L0) · builder-contract.md+ scripts/ analyze-beatgrid.py+ templates/ <id>/ { card.json · index.html · README.md } ← the L1 catalog+```diff --git a/skills/bgm-to-video/agents/builder.md b/skills/bgm-to-video/agents/builder.mdnew file mode 100644index 0000000000..1099b459eb--- /dev/null+++ b/skills/bgm-to-video/agents/builder.md@@ -0,0 +1,72 @@+# Builder (template-driven) — mount groups on one timeline++Turn `visual-plan.json` + `audiomap.json` into one renderable HyperFrames `index.html`.+Each group is a **gated sub-scene**: for a `templateRef` group, fork the template's+reference impl and re-host it; for a `free_design` group, author from L0 primitives. All+groups share **one paused GSAP timeline** at absolute audio seconds.++## Inputs++- `visual-plan.json` — groups (templateRef + params + role_bindings, or free_design) + transitions.+- `audiomap.json` — timing truth.+- **Template reference impls** — `templates/<templateRef>/index.html` for each matched group.+- `references/template-definition.md`, `visual-plan-contract.md`, `motion-primitives.md`,+ `builder-contract.md`. Read `builder-contract.md` — the HyperFrames mechanics+ (root `#stage`, the `<audio>` tag, the one paused timeline, the forbidden list,+ seek-safety) are non-negotiable and unchanged.++Output: a single-file composition at the requested `index.html`.++## The core method: each group is a gated sub-scene++The whole video is ONE composition with ONE `#stage` and ONE paused timeline. Build it+group by group:++1. **One container per group** inside `#stage`:+ `<div class="group" id="g1" style="position:absolute; inset:0;">…</div>`. Stable id.+2. **Gate visibility by the group's span.** A group is only visible during its+ `span_sec`. Use 0ms `fast_cut` sets on the master timeline:+ `tl.set("#g1",{autoAlpha:1},start); tl.set("#g1",{autoAlpha:0},end);` (and start hidden+ at t=0 unless it's the first group). The transition between groups IS this hard cut.+3. **Re-host each group's animation at an OFFSET.** A template reference impl is a+ standalone composition (its own 0-based timeline). You **inline its DOM + CSS + shader+ into the group container** and **re-create its tweens on the master timeline shifted by+ the group's `start`**: a tween the impl placed at `t` goes at `start + t`. Map the+ impl's local reveal/hold/exit onto the group's real `role_bindings` seconds (e.g.+ reveal on `role_bindings.message.reveal_at`, field breath on `field.surge_at`). Set the+ group's element ids/uniform var names with a `g1_` prefix so multiple groups don't+ collide.+4. **Fill the template's params.** Apply `visual-plan.json` `params` as the concrete+ values (text content, palette → CSS vars / shader uniforms, flowSpeed, duration). You+ may pass them as the impl's composition-variables OR hard-code them into the inlined+ group — either way the rendered values must equal `params`.+5. **Free-design groups:** author the container from `motion-primitives.md` recipes, same+ gating + offset rules.++> WebGL templates: give each group its own `<canvas>` + renderer inside its container; a+> continuous render loop is fine (the reference impls already do this and explain why it+> stays deterministic — all _visible_ state comes from timeline-driven uniforms). Gate the+> container with `autoAlpha`, not by tearing down the renderer.++## Transitions++`visual-plan.json.transitions` are all `fast_cut`: realize each as the 0ms visibility+swap at `at` (hide the outgoing group, show the incoming one on the same frame). No+crossfade, no tween. The cut is the transition.++## Timeline discipline (from builder-contract.md)++- Exactly one `gsap.timeline({ paused:true })`; register `window.__timelines["<compositionId>"] = tl;`; end with `tl.seek(0);`.+- All tween positions are absolute audio seconds from `audiomap.json` (offset per group as above).+- Hard hits / cuts / palette flips are 0ms `tl.set(...)`. Eased entrances 300–500ms. Lead a move that must _land_ on a beat by ~40–190ms.+- No `stagger`, timers, `requestAnimationFrame` for visual _state_, `Math.random`, `Date.now`, remote assets/fonts, infinite repeats, render-critical callbacks. Fake them deterministically (see builder-contract.md).++## Self-Check++- Passes `npx hyperframes lint .` and `npx hyperframes validate .`.+- `#stage` + `<audio id="bgm" data-timeline-role="music" ...>`; one paused timeline; duration == `audiomap.audio.duration_sec`.+- Each group is visible exactly across its `span_sec` and hidden outside it; t=0 is not accidentally blank.+- Each group's rendered text/palette equals its `visual-plan.json` `params`.+- Group→group cuts are 0ms and land on the `transitions[].at` second.+- Group ids/var names are namespaced; no two groups' elements or uniforms collide.+- Final frame is intentional; main text readable, not colliding.diff --git a/skills/bgm-to-video/agents/director.md b/skills/bgm-to-video/agents/director.mdnew file mode 100644index 0000000000..cd3c7e9cd2--- /dev/null+++ b/skills/bgm-to-video/agents/director.md@@ -0,0 +1,121 @@+# Director (template-driven) — match, adapt, transition++Turn the brief + `music-read.json` into `visual-plan.json`. For each **section**, decide+how finely to split it into **groups** (you own this call — you alone see the catalog),+then for each group **match a promoted Group Template and adapt it**; free-compose only+when nothing fits.++Your mantra: **music is the spine; a template is a head start, not a cage.**++## Inputs++- User brief / supplied copy — topic, mood, exact words to keep.+- `music-read.json` — `sections[]`: each is a `GroupSignature` over its whole span **plus**+ a `cut_candidates[]` menu of musically-legal internal cut points. **There are no groups+ yet — you create them** by choosing which candidates to act on.+- `audiomap.json` — timing truth (anchor seconds).+- **Template catalog** — read EVERY `templates/*/card.json` with `status:"promoted"`.+- `references/signature-schema.md`, `template-definition.md`, `transition-catalog.md`,+ `visual-plan-contract.md`, `motion-primitives.md` (for free-compose).+- Style files if present: `frame.md` → `design.md` → `DESIGN.md`.++Read the contracts before writing. Output: one valid `visual-plan.json`, no commentary.++## Per section: decide its groups (subdivide)++You decide how many groups each section becomes, because the right granularity depends on+the **template native spans** in the catalog — which only you can see. A group's native+span ≈ the length of a card's `examples[].span_sec`.++1. **Try the section whole first.** Treat the section as one group (its `GroupSignature` is+ already in `music-read.json`) and run the match below.+2. **Subdivide only if the whole-section fit is bad**, cutting at the section's+ `cut_candidates[]`:+ - **Pacing** — the best-matching card's native span is much shorter than the section+ (the template would be stretched / leave dead air). Cut so each group ≈ a matchable+ native span.+ - **Gesture** — the section spans parts no single template or thesis covers well (e.g. a+ busy opener + a closing lockup). Cut at the candidate(s) that separate them.+3. **How to cut.** Pick the **fewest, strongest** `cut_candidates` that fix the above; each+ group's `span_sec` = consecutive cut points (plus the section ends). Keep every group+ **≥ ~1 bar**. Derive each group's `GroupSignature` over its slice (signature-schema+ derivation table) and **re-classify `structural_type` on that slice** — it may differ+ from the section's.+4. **Don't over-cut.** If one template already fits the whole section's pacing, keep it+ whole. A `void_breath` / `sustained_hold` / `hard_stop_freeze` section has no candidates+ — never split it. Multiple templates across a section's groups are fine; cohesion is the+ brand spine, not reuse.++## Per group: match → select → adapt++Run this on each group you produced above (the section itself when you kept it whole).++1. **Match.** Keep promoted cards where+ `card.match.structural_type == group.structural_type`+ **and** the group's `GroupSignature` satisfies **every** `card.match.requires`+ predicate **and** `group.mood` overlaps `card.match.mood_fit`.+2. **Rank & select.** Order survivors by signature closeness to the card's `examples[]`+ (and example count as a tiebreak); take the top → `templateRef`. If **no card+ survives**, set `templateRef:null` and write a `free_design` (one visual thesis for the+ group, built from `motion-primitives.md` — pick a density topology, name the+ primitives).+3. **Adapt (bind the template).**+ - Fill `params` (keys exactly from the card) — **copy you wrote** into the text slots,+ **palette** from the brand spine, `flowSpeed`/etc. to taste, `duration` = the group's+ span length.+ - Fill `role_bindings` with this group's **real anchor seconds** (entry downbeat, surge+ time, …) from its slice of the AudioMap — not the card's example times.+ - **Reconcile the stop rule:** if the card's `exit_trigger` and the group's `span_sec`+ end disagree, snap the boundary to the nearest AudioMap anchor and use that.++## Brand spine (unify the groups)++Set one `style`: one type family, a ≤4–6 swatch palette, ≤2 accents per frame, from the+brief's mood. Different templates per group are expected — the spine is what makes them+read as one piece. Pick the palette once; every group's `params.palette` draws from it.++## Write the copy (you own the words)++- Keep exact user words; else invent with taste, on the brief's mood.+- **Message vs texture:** a readable word holds ≥1 beat (headline 3–8, sentence 4–10),+ stable + focal; a word held <1 beat is texture (strobe/grid/ticks). Never force a+ message onto a sub-beat — demote it to texture.+- Place copy into the matched template's text params, or (free groups) onto the group's+ anchors. Declare anchor + accumulate/stagger intent; leave micro-timing to the Builder.+- A closing `logo`/CTA lands on the final hit / hard stop and holds through trailing+ silence.++## Transitions++One `transitions[]` entry per adjacent group pair. **`transition` is always `"fast_cut"`**+for now (decision #4): a 0ms hard cut at the boundary second. Do not emit richer+transitions yet (the interface exists for later — see `transition-catalog.md`).++## Direction stance++- **You own group count.** `music-read.json` gives sections + legal `cut_candidates`, not+ groups — subdivide each section yourself (see above), because only you know the template+ native spans. Keep a section whole when one template fits it; split it when a template+ would otherwise be stretched or when it spans gestures no single template covers. Groups+ in one section may use **different templates** — no reuse constraint; the brand spine+ unifies them.+- One template (or one free thesis) per group — but the visual **system may change** at+ each boundary; the brand spine unifies them.+- Trust the match: a `sustained_hold` group wants the held-message template's stillness,+ not invented motion. Don't over-design a group the template already solves.+- Free-compose is a real fallback, not a failure — use it whenever the catalog has no+ honest match, and write it as carefully as a matched group.++## Self-Check++- Every section became ≥1 group; each group entry carries its `section_id`, `span_sec`+ drawn from the section's `cut_candidates` (or the whole section span), all groups in+ order tiling `duration_s`. No group is < ~1 bar; no cut lands inside a roll.+- Each group's `GroupSignature` is derived over its own slice (or inherited from the+ section when kept whole); its `structural_type` may differ from the section's.+- Every group has a `templateRef` (promoted, exists) **or** a `free_design`.+- For each `templateRef`: `match.requires` is actually satisfied by the group's signature;+ `params` keys == the card's `params`; `role_bindings` use real AudioMap seconds.+- `style` brand spine is set and every `params.palette` is drawn from it.+- One `fast_cut` transition per boundary.+- `duration_s == audiomap.audio.duration_sec`.diff --git a/skills/bgm-to-video/agents/finalize.md b/skills/bgm-to-video/agents/finalize.mdnew file mode 100644index 0000000000..87adab158f--- /dev/null+++ b/skills/bgm-to-video/agents/finalize.md@@ -0,0 +1,39 @@+# Finalize / Repair (template-driven)++Use after lint, validate, inspect, or render fails. You may edit `index.html` only.++## Inputs++- `audiomap.json`+- `visual-plan.json`+- current `index.html`+- `references/visual-plan-contract.md`+- `references/template-definition.md`+- `references/builder-contract.md`+- `references/motion-primitives.md`+- lint / validate / inspect / render output (verbatim)+- render quality target++Read the relevant contracts before repairing.++## Flow++1. Read the failure output first. Separate contract failures from visual issues.+2. Inspect important times: `t=0`, every group's `span_sec` start, every+ `transitions[].at`, and the final frame.+3. Repair narrowly: blank/empty frames; a group visible outside its `span_sec` (or hidden+ inside it); elements or uniforms colliding between groups (namespacing); invisible+ elements; bad attrs; missing timeline registration; forbidden GSAP; obvious timing+ misses; a group whose rendered text/palette doesn't match its `params`.+4. Re-run `npx hyperframes lint .`, `npx hyperframes validate .`, and inspect.+5. Render when gates pass.++## Rules++- Do not change duration or audio timing to hide sync issues.+- Do not redesign the concept during repair. If the plan is creatively wrong (wrong+ template matched, wrong copy), return to the Director (Step 3) — don't patch around it.+- Keep each group's visibility gated to its `span_sec`; keep group→group cuts 0ms on the+ `transitions[].at` second.+- Do not add remote assets, network fetches, timers, or nondeterminism.+- Prefer small CSS/GSAP fixes over structural rewrites.diff --git a/skills/bgm-to-video/agents/music-reader.md b/skills/bgm-to-video/agents/music-reader.mdnew file mode 100644index 0000000000..12f1881bc7--- /dev/null+++ b/skills/bgm-to-video/agents/music-reader.md@@ -0,0 +1,128 @@+# Music Reader (template-driven) — classify only++Turn `audiomap.json` into `music-read.json`: cut the track into **sections** (musical+macro-structure), write a `GroupSignature` for each section, and list the musically-legal+**cut candidates** inside each (the internal anchors the Director _may_ subdivide on). You+**classify and surface facts**; you do not design, and **you do not decide group count** —+how finely a section is split is the Director's call, because only the Director sees the+template catalog.++You are not choosing visuals, copy, fonts, colors, layout, or motifs. You answer, per+section: _what kind of beat is this_, _what mood_, and _where could this legally be cut+finer_. Everything else is the Director's job.++## Inputs++- `audiomap.json` — factual music data.+- `references/signature-schema.md` — the `GroupSignature` schema + controlled vocab ++ derivation formulas + the `structural_type` classification rubric. **Read it first.**++## Output++Write exactly one valid JSON file to the requested path: `music-read.json`. No markdown,+no commentary.++```jsonc+{+ "duration_s": 7.198, // == audiomap.audio.duration_sec+ "bpm": 129.2,+ "one_line": "A held recap card that breaks into a per-onset typography hit.",+ "sections": [+ {+ // a section IS a GroupSignature over its whole span (so the Director can match it+ // as one group if it chooses not to subdivide) + the legal cut points inside it.+ "id": "s1",+ "span_sec": [0.0, 7.198], // snapped to AudioMap anchors; sections tile the track+ "structural_type": "per_onset_sequential", // the section's dominant archetype+ "mood": ["hype"],+ /* …every other GroupSignature field per references/signature-schema.md+ (energy_level, density, onset_rate, onset_gap_bars, has_roll, entry, exit_trigger, …),+ derived over the WHOLE section span … */+ "cut_candidates": [+ // internal anchors the Director MAY cut on — musically legal only. Empty for a+ // single-gesture section. NEVER a point inside a rolls[] run.+ { "time": 3.692, "kind": "key_moment", "strength": "strong" },+ { "time": 5.759, "kind": "phrase", "strength": "medium" },+ ],+ },+ ],+}+```++`sections[]` is an ordered list whose `span_sec` tile the whole track with no gaps or+overlaps (first starts at 0, last ends at `duration_s`). Each section is a full+`GroupSignature` (derived over its span) **plus** a `cut_candidates[]` menu. **There is no+`groups[]` here** — the Director creates groups in `visual-plan.json` by choosing which+cut candidates to act on.++## How to read (pipeline — run in order)++1. **Gestalt.** From `summary` / `tempo` / `audio.duration_sec` + the drum histogram ++ roll count, write the `one_line` and note the density arc.+2. **Segment into sections.** Walk `energy_phases[]` in order and split the track where the+ music genuinely changes state — at `hard_stops[]`, `SURGE`/`DROP` `key_moments`, the+ start/end of a `rolls[]` run, an **onset desert** (a long gap in `events[]`), or a big+ energy-level jump. Collapse adjacent phases that are really one gesture. Expect ~1–6+ sections; a short clip may be one. **Snap every boundary to an AudioMap anchor**+ (downbeat / hard_stop / phrase / key_moment / energy-phase edge), then **re-snap to the+ nearest `beats_sec`** (key_moments / energy-phase edges are 1-second-resolution facts;+ the beat grid is precise — tolerance ≤ ½ beat).+3. **Per section, build the `GroupSignature`** over the whole section span. Use the+ derivation table in `signature-schema.md` for every objective field (`energy_level`,+ `density`, `onset_rate`, `onset_gap_bars`, `has_steady_grid`, `span_bars`, `entry`),+ classify `structural_type` (rubric, top-down first-match; `unclassified` + a `note` if+ nothing fits), tag `mood` (1–3), and set `exit_trigger`. All from the audiomap — never+ invented.+4. **Per section, list `cut_candidates[]`** — the internal anchors the Director _may_ cut+ on. This is a **menu of musical facts, not a decision**: you do not pick how many groups,+ only where a cut would be legal.+ - **Include** each anchor that lies strictly inside the span: an internal `key_moment`+ (mini SURGE/DROP), a mid-section `hard_stop`, the edge of a partial `rolls[]` run, a+ `phrases[]` edge, or a clear onset-cluster gap (≥ ~1 bar between consecutive+ `events[]`). Tag each `{time, kind, strength}` and snap its `time` to the nearest beat.+ - **Exclude (illegal cuts):** any point **inside** a `rolls[]` run (a roll is one+ cascade), and any candidate that would leave a fragment **< ~1 bar**.+ - **Emit an empty list** for a single-gesture section (`void_breath` / `sustained_hold` /+ `hard_stop_freeze`) — it must never be subdivided.++> The Director reads the catalog (template native spans + what matches) and decides which+> of these candidates to act on; an unused candidate costs nothing. Detecting where a cut+> is _legal_ is musical (yours); deciding where a cut is _useful_ is catalog-aware (theirs).++## Worked example — a section + its cut candidates++Section `s_final` = `[19.412, 30.0]`, `per_onset_sequential`, ~4.6 bars @ 103.4 bpm, with+a `hard_stop` at ~24s and a `SURGE` at ~26s inside it. You emit it as **one section**+carrying its whole-span `GroupSignature` plus:++```jsonc+"cut_candidates": [+ { "time": 23.963, "kind": "hard_stop", "strength": "strong" }, // snapped to the downbeat+ { "time": 26.215, "kind": "surge", "strength": "strong" },+]+```++You do **not** decide whether this becomes 1, 2, or 3 groups. The Director may keep it+whole (if one template fits), or cut at one/both candidates (e.g. a per-onset opener + a+closing lockup) — that is its catalog-aware call.++## Section boundaries are proposals++You propose section `span_sec`; the Director may nudge a boundary to fit a chosen+template's stop rule, then reconcile to the nearest anchor (decision #2). Because both of+you derive from the same audiomap, this rarely moves anything — but write the most+defensible audio boundary, not a guess.++## Self-Check++- `duration_s == audiomap.audio.duration_sec`; `sections[].span_sec` tile it with no+ gap/overlap (first at 0, last at `duration_s`).+- Every section carries a full `GroupSignature` (every field traces to an audiomap value or+ a span of it) **plus** a `cut_candidates[]` list (possibly empty).+- Every `cut_candidates[].time` sits on an AudioMap anchor re-snapped to the nearest beat;+ none is inside a `rolls[]` run; none would leave a sub-1-bar fragment; single-gesture+ sections (`void_breath` / `sustained_hold` / `hard_stop_freeze`) have an empty list.+- `structural_type`, `mood`, `exit_trigger.type` are controlled-vocab (or `unclassified`+ with a note).+- **No `groups[]` and no group-count decision** anywhere — that is the Director's.+- No content, no fonts, no colors, no layout, no copy anywhere in the output.diff --git a/skills/bgm-to-video/references/builder-contract.md b/skills/bgm-to-video/references/builder-contract.mdnew file mode 100644index 0000000000..0adff19d75--- /dev/null+++ b/skills/bgm-to-video/references/builder-contract.md@@ -0,0 +1,143 @@+# Builder Contract++This is the complete implementation contract for LLM-first BGM compositions. Builder+and Finalize must read it before editing `index.html`.++The timeline is seekable sheet music: one paused GSAP timeline, absolute audio-second+positions, deterministic elements, no browser-play-only tricks.++## Root Composition++The root is a real stage element, not `<html>`:++```html+<div+ id="stage"+ data-composition-id="bgm"+ data-start="0"+ data-duration="23.005"+ data-width="1920"+ data-height="1080"+></div>+```++- `data-composition-id` must equal the `window.__timelines` key.+- Use `data-duration`, not `data-composition-duration`.+- `data-width` / `data-height` define the frame.+- Root CSS must set explicit pixel `width` and `height`.+- Landscape 1920x1080 is default unless `visual-plan.json.canvas` requests otherwise.++## Audio++```html+<audio+ id="bgm"+ data-timeline-role="music"+ src="assets/bgm.mp3"+ data-start="0"+ data-duration="23.005"+ data-media-start="0"+ data-volume="1.0"+></audio>+```++- Source HTML uses `data-duration`; emitting raw `data-end` triggers lint warnings.+- `data-timeline-role="music"` marks the BGM track.+- The file must exist beside `index.html` at `assets/bgm.mp3`.++## Timeline++- Exactly one render-critical `gsap.timeline({ paused: true })`.+- Register it: `window.__timelines["<compositionId>"] = tl;`.+- End the script with `tl.seek(0);`.+- Tween positions are absolute audio seconds from `audiomap.json`.+- Percentage keyframes only live inside a single tween's `keyframes`.+- `easeEach` belongs inside `keyframes`, never as a sibling tween prop.++## Timing Discipline++- Group-level cuts land on `visual-plan.json` `groups[].span_sec` boundaries (= the+ `transitions[].at` seconds), snapped to nearby downbeats.+- Phrase moves use `audiomap.phrases[]`.+- Word entries and layout changes prefer `grid.downbeats_sec[]`.+- Micro accents use `grid.beats_sec[]` or selected `events[].t`.+- Rolls use `rolls[].start/end` and should feel continuous or cascading.+- Hard stops use `hard_stops[].t` and should visibly freeze, cut, or hold.++## Layout Before Animation++Build the most important static frame first:++- A scene container fills the stage.+- Use CSS grid/flex/padding for content layout.+- Use absolute positioning for decorative systems, overlays, masks, and generated+ geometry.+- Keep title-safe padding. Do not let hero text touch the frame edge.+- Use `vmin`, `clamp`, or measured CSS to keep type readable across aspect choices.++Animate from hidden/offscreen states into the CSS end-state. The CSS end-state is the+truth.++## Seek-Safe Reveal++- Delayed elements are hidden until entrance and visible after seeking.+- Initial hidden state may be inline CSS or `gsap.set(..., {autoAlpha:0})` at time 0.+- Reveal with `fromTo` or paired `set` + motion tweens.+- Finite repeats only.++## Forbidden++`tl.play()`, `setTimeout`, `setInterval`, `requestAnimationFrame`, runtime network,+remote assets, remote fonts, `Math.random`, `Date.now`, `new Date`, `ScrollTrigger`,+`repeat:-1`, render-critical callbacks, `.call()`, `.addLabel()`, `.addPause()`.++## Discouraged++- `stagger:` does not serialize cleanly; expand multi-element moves into explicit+ per-element tweens with offset positions.+- Google Fonts links fail in offline/sandboxed renders. Use system-safe stacks or+ local `@font-face`.+- Out-of-alias font family names can trigger lint warnings.++## Faking the forbidden patterns++The bans still leave you every move the music wants — do them deterministically:++- **Instead of `stagger`:** schedule explicit per-element work at `t + i*step` — either+ `delay: i*0.04` on each tween, or one `tl.set(el[i], props, eventTime[i])` per onset.+ This serialises cleanly and lands each element on its own beat.+- **Instead of `Math.random`:** derive variation from the index —+ `palette[(i*7 + step*3) % palette.length]`, a fixed coordinate/rotation table, or a+ hand-keyed scrambled-string array. Looks random, stays seek-deterministic.+- **Instant text / number swaps:** `tl.set(el, { textContent: "…" }, T)` is allowed and is+ the workhorse percussive move. Give the node `width: max-content` (or a fixed width) and+ centre it so a longer word does not reflow the layout.++## CSS Values++Complex CSS strings for `clipPath`, `filter`, or transforms should be valid CSS in the+HTML source. If a serializer path requires raw passthrough, use the repo convention:+`"__raw:'inset(0 0% 0 0)'"`.++## Visual QA++- `t=0` is not blank unless intentional silence is specified.+- The first meaningful visual appears during the first section.+- Drop / surge has a visible hit within about 0.15s of the intended anchor.+- Dense sections show visual density, not just a single static word.+- Hard stop creates a readable hold or freeze.+- Final frame is intentional.+- Main text is readable and not colliding.+- Palette is coherent; define colors once through CSS variables or one palette block.++## Inspect Targets++When running `hyperframes inspect`, include:++- `0`+- every `visual-plan.json` `groups[].span_sec` start+- every `transitions[].at`+- strongest `DROP` / `SURGE` key moments+- every `hard_stops[].t`+- start/end of major `rolls[]`+- `duration - 0.2`diff --git a/skills/bgm-to-video/references/motion-primitives.md b/skills/bgm-to-video/references/motion-primitives.mdnew file mode 100644index 0000000000..be704f2fc7--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives.md@@ -0,0 +1,123 @@+# Motion Primitives — recipe catalog for Builder++The atomic layer: one anchor → one micro-move. Group Templates (L1) are composed from+these; the Builder also reaches here directly when a group is free-composed. **Not a+fixed API** — they are creative-coding recipes.++One flat catalog. The **recipe** column tells you what to lift:++- **✓** — a runnable, lint-clean composition at `motion-primitives/<id>/index.html`. Open+ it and lift the relevant tweens.+- **≈ `<id>`** — no separate file; use that existing recipe, it's the same idea.+- **—** — no standalone file. Implement it inline from the description + `builder-contract.md`;+ these are one-liners (e.g. a 0ms `tl.set`) or moves a template realizes internally.++## Timing & latency (applies to every primitive)++Quantified from frame-accurate reverse engineering of beat-synced reels:++- **Hard hits are 0ms.** Cuts, palette flips, content swaps, freezes are `tl.set(...)`+ with no duration — the percussion _is_ the motion. Easing a hit kills it.+- **Lead the anchor.** A move that must _land_ on a beat (a wipe covering the frame, a+ count-up locking, two blocks colliding to centre) should **start ~40–190ms early** so it+ completes ON the anchor. Reactive entrances — something appearing _because_ of the hit —+ fire 0–45ms after.+- **Eased entrances: 300–500ms** (scale punch, slides, camera pushes). **Macro builds:+ 800–2000ms** spanning a whole roll / silence.+- **Magnitudes:** scale-punch entrance 0→1; weight pulse 1→1.06; hero fill up to 1→5;+ chromatic split ~20px, resolve clean in ≤150ms.+- **Per-bar caps:** one accumulating element per audio hit (not a burst); a camera move at+ most once per phrase, never per beat; a dense flip/strobe system runs ≤2–3s.+- **Tension-builds lock.** A count-up / sequential build / morph must _resolve on_ a+ downbeat or hard_stop, never trail off mid-bar.++## Catalog++Each runnable recipe is self-contained and lint-clean: showcase chrome stripped,+system-font fallback, shared `../assets/gsap.min.js`, one paused timeline on+`window.__timelines["main"]`. To use one, read its `index.html` and lift the tweens.++| id | anchor | what it does | recipe |+| ------------------------ | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |+| `01-hypercut_whip` | beat / hard_stop | fast whip-pan hard cut between frames | ✓ |+| `02-kinetic_letter_in` | downbeat / phrase | per-letter kinetic entrance | ✓ |+| `03-braam_punch` | drop / surge | big "braam" impact — scale + weight slam | ✓ |+| `04-chromatic_split` | snare / glitch / surge | RGB channel split / glitch on a word | ✓ |+| `05-mask_reveal` | section_start / downbeat | clip-path mask wipe reveal | ✓ |+| `07-screen_shake` | drop / crash / kick | camera/screen shake jitter | ✓ |+| `08-binary_decrypt` | roll / build | scramble→decode text (binary → word) | ✓ |+| `09-dolly_zoom` | phrase / build | vertigo dolly-zoom (scale vs perspective) | ✓ |+| `10-iris_open` | section_start / reveal | circular iris-open reveal | ✓ |+| `11-electric_arc` | accent / glitch | electric arc / lightning accent | ✓ |+| `12-neon_flicker` | hold / texture | neon-sign flicker | ✓ |+| `13-chrome_sweep` | downbeat / reveal | metallic specular sweep across text | ✓ |+| `15-slot_machine_reveal` | roll → downbeat | slot-machine spin-to-land character reveal | ✓ |+| `16-liquid_morph` | phrase / transition | liquid / blob morph | ✓ |+| `17-gooey_metaball` | build / drop | gooey metaball merge field | ✓ |+| `18-3d_card_flip` | downbeat / swap | 3D card flip (rotateY) | ✓ |+| `19-crash_zoom_in` | drop / surge | violent crash zoom-in | ✓ |+| `20-spotlight_sweep` | reveal / hold | spotlight / gradient sweep over text | ✓ |+| `21-outline_to_fill` | downbeat / reveal | stroke outline → solid fill | ✓ |+| `22-counting_punch` | roll → downbeat | number count-up that punches & locks | ✓ |+| `24-particle_burst` | drop / crash | particle explosion burst | ✓ |+| `25-radial_burst_lines` | drop / surge | radial speed-lines burst | ✓ |+| `26-pixel_dissolve` | transition / hard_stop | pixelated dissolve | ✓ |+| `27-datamosh_smear` | glitch / transition | datamosh / motion smear | ✓ |+| `28-text_wave_distort` | hold / texture | wavy text distortion | ✓ |+| `bg_flow_field` | energy / whole span (bed) | generative WebGL curl-noise flow-field **background bed** — palette-driven, breathes on the energy envelope; run it underneath and compose any foreground move over it | ✓ |+| `blur_resolve` | stop / final hold | blur-in to crisp focus, then blur-out on the cut | ✓ |+| `chromatic_pressure` | snare / glitch | RGB split / digital tension on a transient | ≈ `04-chromatic_split` |+| `color_grid_shuffle` | onset | grid of cells recoloured by a deterministic index per onset | — |+| `content_swap` | beat | 0ms swap of stacked nodes — the workhorse percussive move | ≈ `15-slot_machine_reveal` |+| `directional_fill` | beat / reveal | directional wipe-fill (scaleX) sweeping across bars | ✓ |+| `flash_cut` | drop / crash | full-frame flash masking a word/colour state change | ✓ |+| `freeze_hold` | hard_stop | freeze the moving system and hold it (desaturate + vignette) | — |+| `hard_cut` | beat / hard_stop | sample-accurate 0ms colour-block + word cut | ✓ |+| `mosaic_pack` | beat / build | scattered tiles fly in and pack into a grid | ✓ |+| `negative_space_hold` | silence / hard_stop / final hold | kill busy layers, hold one readable mark in empty space | — |+| `overlay_pop` | accent | badge / lower-third overlay pops in over a base | — |+| `palette_flip` | section change | same layout re-skins via 0ms palette-variable flips | ✓ |+| `staggered_exit` | phrase / transition | ordered cascade-out clearing the frame | ✓ |+| `staggered_reveal` | build | ordered cascade-in of a stack / list | — |+| `system_replace` | drop / regime change | hard-cut the entire visual system, then boot the new one | — |+| `text_spectral_rays` | phrase / sweep (hero text) | volumetric spectral light-rays cast by a wordmark toward a sweeping light cursor — grain + RGB-split; **WebGL hero-text system** | ✓ |+| `tile_mosaic` | build / reveal | grid of tiles revealed in a diagonal sweep, assembling a poster | ✓ |+| `typewriter_reveal` | roll / build | char/word type-on, explicit per-span set (no `stagger`) + caret | ✓ |+| `value_counter` | roll → downbeat | count-up that locks on a downbeat / hard_stop | ≈ `22-counting_punch` |+| `word_grid_burst` | onsets → downbeat | grid of words revealed per onset, refocus one on a downbeat | ✓ |++> **Template-private verbs.** Some templates declare motion verbs realized only inside their+> own impl — e.g. `held_lockup`, `anchor_pop_in`, `word_slot_cycle`, `per_line_color`,+> `scene_palette_flip`, `beat_jitter_shake`, `box_zoom_wipe` (split-anchor-word-slot),+> `motion-blur` (logo-split). Those live in the template's own `index.html` / README, not+> here. Promote one into this catalog only when a second template needs it.++## How to combine++- One dominant system per group; layer at most one texture recipe over one structural recipe.+- Structure on strong beats (cuts, camera, system_replace → downbeat / phrase / section_start);+ texture on weak / syncopated hits (content_swap, typewriter letters, chromatic accents).+- A roll is an accumulation container — build during it, hard-cut to a clean layout on the+ downbeat that ends it.+- `drop` ≠ `downbeat`: a downbeat is a cut within the regime; a drop is a regime change+ (`system_replace`, total clear, element-count jump).+- Let silence remove density (`negative_space_hold`).+- **Background beds are a layer, not a move.** A bed (e.g. `bg_flow_field`) runs the whole+ span on the **energy / phrase** channel, leaving the **beat anchors** free for the+ foreground — so it composes cleanly _under_ any discrete primitive (text `content_swap`,+ `hard_cut`, a held mark…). One bed at a time; when mounting into a group, merge the bed's+ uniform tweens onto the group's master timeline (don't run a second timeline), bundle a+ local `three`/WebGL (no CDN), and repaint via the timeline's `onUpdate` (no rAF).+- **WebGL "system" primitives come in two roles:** a **bed** (`bg_flow_field`, behind+ everything) and a **hero-text treatment** (`text_spectral_rays`, which rasterizes the+ wordmark and _is_ the hero). Use at most one of each; feed text/raster locally (no CDN+ fonts), repaint via `onUpdate`.+- **`text_spectral_rays` renders its OWN wordmark — never give the word a second source.**+ It draws the solid letters AND the rays from one glyph mask (perfectly registered). Do NOT+ use it as a "rays-only" layer behind a separate DOM logo (or stack `content_swap` /+ `chromatic_pressure` on the same word): the two fonts/positions won't match and you get a+ doubled / ghosted wordmark — and deleting the shader's letter terms does not fix it (the+ ray mask is still the second, misaligned copy). Let the shader be the wordmark; hide any+ DOM logo (keep it only as an invisible layout spacer). If you move the word off+ frame-center, move the light cursor's `y` by the same amount. Full recipe:+ [`motion-primitives/text_spectral_rays/USAGE.md`](motion-primitives/text_spectral_rays/USAGE.md).diff --git a/skills/bgm-to-video/references/motion-primitives/01-hypercut_whip/index.html b/skills/bgm-to-video/references/motion-primitives/01-hypercut_whip/index.htmlnew file mode 100644index 0000000000..853e56bd2b--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/01-hypercut_whip/index.html@@ -0,0 +1,79 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>01 · hypercut_whip</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, filter;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage"><div class="hero" id="hero">HYPERCUT</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set("#hero", { x: 0, filter: "blur(0px)" }, 0);+ tl.to("#hero", { x: 1800, filter: "blur(30px)", duration: 0.18, ease: "power4.in" }, 1.65);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/02-kinetic_letter_in/index.html b/skills/bgm-to-video/references/motion-primitives/02-kinetic_letter_in/index.htmlnew file mode 100644index 0000000000..5fd91a2629--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/02-kinetic_letter_in/index.html@@ -0,0 +1,92 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>02 · kinetic_letter_in</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .char {+ display: inline-block;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="hero" id="hero">+ <span class="char">K</span><span class="char">I</span><span class="char">N</span+ ><span class="char">E</span><span class="char">T</span><span class="char">I</span+ ><span class="char">C</span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.from(+ ".char",+ { y: 80, opacity: 0, stagger: 0.045, ease: "back.out(2)", duration: 0.55 },+ 0.05,+ );+ tl.to("#hero", { letterSpacing: "0.04em", duration: 0.6, ease: "power2.out" }, 0.7);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/03-braam_punch/index.html b/skills/bgm-to-video/references/motion-primitives/03-braam_punch/index.htmlnew file mode 100644index 0000000000..c4d9676c12--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/03-braam_punch/index.html@@ -0,0 +1,135 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>03 · braam_punch</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, text-shadow;+ }+ .glow-ring {+ position: absolute;+ width: 900px;+ height: 900px;+ border-radius: 50%;+ background: radial-gradient(circle, rgba(124, 58, 237, 0.55) 0%, rgba(124, 58, 237, 0) 65%);+ filter: blur(20px);+ will-change: transform, opacity;+ opacity: 0;+ }+ .flash {+ position: absolute;+ inset: 0;+ background: #fff;+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="glow-ring"></div>+ <div class="hero" id="hero">BRAAM</div>+ </div>+ <div class="flash"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set("#hero", { scale: 0.92, opacity: 0 }, 0);+ tl.set(".glow-ring", { scale: 0.6, opacity: 0 }, 0);+ tl.to("#hero", { opacity: 1, duration: 0.18, ease: "power2.out" }, 0.05);+ tl.to(".glow-ring", { scale: 1.2, opacity: 1, duration: 0.45, ease: "power3.out" }, 0.05);+ tl.to(+ "#hero",+ {+ scale: 1.18,+ textShadow: "0 0 60px rgba(168,85,247,0.9)",+ duration: 0.12,+ ease: "power4.out",+ },+ 0.25,+ );+ tl.to(+ "#hero",+ {+ scale: 1.0,+ textShadow: "0 0 0px rgba(168,85,247,0)",+ duration: 0.7,+ ease: "elastic.out(1, 0.5)",+ },+ 0.37,+ );+ tl.fromTo(+ ".flash",+ { opacity: 0 },+ { opacity: 0.85, duration: 0.06, ease: "power4.out" },+ 0.25,+ );+ tl.to(".flash", { opacity: 0, duration: 0.35, ease: "power3.in" }, 0.31);+ tl.to(+ ".glow-ring",+ { scale: 1.45, opacity: 0.4, duration: 1.0, ease: "power2.out", overwrite: "auto" },+ 0.55,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/04-chromatic_split/index.html b/skills/bgm-to-video/references/motion-primitives/04-chromatic_split/index.htmlnew file mode 100644index 0000000000..0357054383--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/04-chromatic_split/index.html@@ -0,0 +1,146 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>04 · chromatic_split</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .stack {+ position: relative;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .layer {+ position: absolute;+ top: 0;+ left: 0;+ mix-blend-mode: screen;+ will-change: transform;+ }+ .layer.r {+ color: #ff2a4a;+ }+ .layer.g {+ color: #2afff0;+ }+ .layer.b {+ color: #b56dff;+ }+ .spacer {+ color: transparent;+ }+ .scanlines {+ position: absolute;+ inset: 0;+ background: repeating-linear-gradient(+ 0deg,+ rgba(255, 255, 255, 0) 0px,+ rgba(255, 255, 255, 0) 3px,+ rgba(255, 255, 255, 0.04) 3px,+ rgba(255, 255, 255, 0.04) 4px+ );+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="stack">+ <span class="spacer">GLITCH</span>+ <span class="layer r">GLITCH</span>+ <span class="layer g">GLITCH</span>+ <span class="layer b">GLITCH</span>+ </div>+ </div>+ <div class="scanlines"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".stack",+ { opacity: 0, scale: 0.95 },+ { opacity: 1, scale: 1, duration: 0.25, ease: "power2.out" },+ 0.05,+ );+ tl.set(".layer.r", { x: -2 }, 0);+ tl.set(".layer.g", { x: 2 }, 0);+ tl.set(".layer.b", { x: 0 }, 0);+ tl.to(".layer.r", { x: -14, duration: 0.06, ease: "steps(1)" }, 0.35);+ tl.to(".layer.g", { x: 14, duration: 0.06, ease: "steps(1)" }, 0.35);+ tl.to(".layer.r", { x: -4, duration: 0.06, ease: "steps(1)" }, 0.5);+ tl.to(".layer.g", { x: 4, duration: 0.06, ease: "steps(1)" }, 0.5);+ tl.to(".layer.r", { x: -22, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.g", { x: 22, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.b", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.r", { x: -6, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.g", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.b", { x: -2, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.r", { x: -3, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.to(".layer.g", { x: 3, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.to(".layer.b", { x: 0, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.fromTo(+ ".scanlines",+ { opacity: 0 },+ { opacity: 0.85, duration: 0.06, ease: "steps(1)" },+ 0.35,+ );+ tl.to(".scanlines", { opacity: 0.25, duration: 0.5, ease: "power2.out" }, 1.0);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/05-mask_reveal/index.html b/skills/bgm-to-video/references/motion-primitives/05-mask_reveal/index.htmlnew file mode 100644index 0000000000..d3692be51e--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/05-mask_reveal/index.html@@ -0,0 +1,109 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>05 · mask_reveal</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .mask-wrap {+ position: relative;+ overflow: hidden;+ padding: 0 60px;+ }+ .mask-clip {+ clip-path: inset(0 100% 0 0);+ will-change: clip-path;+ }+ .sweep {+ position: absolute;+ top: 0;+ bottom: 0;+ width: 8px;+ background: var(--hg-violet);+ box-shadow:+ 0 0 40px var(--hg-violet),+ 0 0 80px var(--hg-violet);+ left: 0;+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="mask-wrap">+ <div class="hero mask-clip">REVEAL</div>+ <div class="sweep"></div>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".mask-clip", { clipPath: "inset(0 100% 0 0)" }, 0);+ tl.set(".sweep", { x: 0, opacity: 0 }, 0);+ tl.to(".sweep", { opacity: 1, duration: 0.08, ease: "power2.out" }, 0.1);+ tl.to(".sweep", { x: 1300, duration: 0.75, ease: "expo.out" }, 0.15);+ tl.to(".mask-clip", { clipPath: "inset(0 0% 0 0)", duration: 0.75, ease: "expo.out" }, 0.18);+ tl.to(".sweep", { opacity: 0, duration: 0.3, ease: "power2.in" }, 0.85);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/07-screen_shake/index.html b/skills/bgm-to-video/references/motion-primitives/07-screen_shake/index.htmlnew file mode 100644index 0000000000..7047a67a90--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/07-screen_shake/index.html@@ -0,0 +1,113 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>07 · screen_shake</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .shake-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ will-change: transform;+ }+ .impact-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(circle at 50% 50%, rgba(255, 42, 74, 0.18) 0%, transparent 60%);+ opacity: 0;+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="impact-bg"></div>+ <div class="shake-stage"><div class="hero">IMPACT</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".hero",+ { scale: 0.6, opacity: 0 },+ { scale: 1, opacity: 1, duration: 0.15, ease: "power4.out" },+ 0.3,+ );+ tl.fromTo(+ ".impact-bg",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.3,+ );+ tl.to(".impact-bg", { opacity: 0, duration: 0.6, ease: "power2.in" }, 0.4);++ const shakeStart = 0.32;+ const shakeAmps = [28, -24, 20, -22, 16, -18, 14, -14, 10, -8, 6, -5, 3, -2];+ shakeAmps.forEach((amp, i) => {+ tl.to(+ ".shake-stage",+ { x: amp, y: amp * 0.7 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },+ shakeStart + i * 0.03,+ );+ });+ tl.to(+ ".shake-stage",+ { x: 0, y: 0, duration: 0.1, ease: "power2.out" },+ shakeStart + shakeAmps.length * 0.03,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/08-binary_decrypt/index.html b/skills/bgm-to-video/references/motion-primitives/08-binary_decrypt/index.htmlnew file mode 100644index 0000000000..1a4fe364f0--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/08-binary_decrypt/index.html@@ -0,0 +1,120 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>08 · binary_decrypt</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .crypt {+ font-family: "JetBrains Mono", monospace;+ font-weight: 700;+ font-size: 200px;+ letter-spacing: 0.02em;+ color: var(--hg-cyan);+ text-shadow: 0 0 30px rgba(42, 255, 240, 0.5);+ }+ .crypt .char {+ display: inline-block;+ min-width: 1ch;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="crypt">+ <span class="char" data-target="D">_</span><span class="char" data-target="E">_</span+ ><span class="char" data-target="C">_</span><span class="char" data-target="R">_</span+ ><span class="char" data-target="Y">_</span><span class="char" data-target="P">_</span+ ><span class="char" data-target="T">_</span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const SCRAMBLE = "01█▓▒░▀▄■◆◇▪▫";+ function scrambleChar(charIdx, phase) {+ const tick = Math.floor(phase * 60);+ const i = (charIdx * 7 + tick * 13 + 3) % SCRAMBLE.length;+ return SCRAMBLE.charAt(i);+ }+ const cryptState = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];+ cryptState.forEach((state, idx) => {+ tl.to(+ state,+ {+ p: 1,+ duration: 0.85,+ delay: idx * 0.05,+ ease: "power2.out",+ onUpdate: function () {+ const spans = document.querySelectorAll(".crypt .char");+ const span = spans[idx];+ if (!span) return;+ const target = span.getAttribute("data-target");+ if (state.p >= 0.72) {+ span.textContent = target;+ span.style.color = "var(--hg-fg)";+ span.style.textShadow = "0 0 30px rgba(168, 85, 247, 0.8)";+ } else {+ span.textContent = scrambleChar(idx, state.p);+ }+ },+ },+ 0.15,+ );+ });++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/09-dolly_zoom/index.html b/skills/bgm-to-video/references/motion-primitives/09-dolly_zoom/index.htmlnew file mode 100644index 0000000000..3b7f10beed--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/09-dolly_zoom/index.html@@ -0,0 +1,137 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>09 · dolly_zoom</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .layers {+ position: absolute;+ inset: 0;+ overflow: hidden;+ }+ .bg-far,+ .bg-mid,+ .bg-near {+ position: absolute;+ inset: 0;+ will-change: transform, filter;+ }+ .bg-far {+ background:+ radial-gradient(2px 2px at 20% 30%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(2px 2px at 70% 80%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 45% 60%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 85% 25%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(2px 2px at 10% 75%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 60% 15%, var(--hg-dim) 50%, transparent 51%);+ background-size: 400px 400px;+ filter: blur(2px);+ }+ .bg-mid {+ background:+ linear-gradient(90deg, transparent 49.7%, rgba(168, 85, 247, 0.25) 50%, transparent 50.3%)+ 0 0 / 200px 200px,+ linear-gradient(+ 180deg,+ transparent 49.7%,+ rgba(168, 85, 247, 0.15) 50%,+ transparent 50.3%+ )+ 0 0 / 200px 200px;+ }+ .bg-near {+ background:+ radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.4) 0%, transparent 25%),+ radial-gradient(circle at 85% 50%, rgba(124, 58, 237, 0.4) 0%, transparent 25%);+ }+ .subject {+ position: relative;+ z-index: 5;+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 180px;+ letter-spacing: -0.02em;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="layers">+ <div class="bg-far"></div>+ <div class="bg-mid"></div>+ <div class="bg-near"></div>+ </div>+ <div class="stage"><div class="subject">subject.</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".bg-far",+ { scale: 1, filter: "blur(2px)" },+ { scale: 1.6, filter: "blur(4px)", duration: 1.8, ease: "power2.inOut" },+ 0.1,+ );+ tl.fromTo(".bg-mid", { scale: 1 }, { scale: 1.4, duration: 1.8, ease: "power2.inOut" }, 0.1);+ tl.fromTo(".bg-near", { scale: 1 }, { scale: 1.2, duration: 1.8, ease: "power2.inOut" }, 0.1);+ tl.fromTo(+ ".subject",+ { opacity: 0, scale: 1.1 },+ { opacity: 1, scale: 1, duration: 0.6, ease: "power3.out" },+ 0.15,+ );+ tl.to(".layers", { skewY: -0.5, duration: 1.8, ease: "power2.inOut" }, 0.1);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/10-iris_open/index.html b/skills/bgm-to-video/references/motion-primitives/10-iris_open/index.htmlnew file mode 100644index 0000000000..185f998096--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/10-iris_open/index.html@@ -0,0 +1,104 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>10 · iris_open</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .iris-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ clip-path: circle(0% at 50% 50%);+ will-change: clip-path;+ background: linear-gradient(135deg, #1a0033 0%, #0a0a0f 60%);+ }+ .iris-stage .hero {+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .iris-ring {+ position: absolute;+ border-radius: 50%;+ border: 2px solid var(--hg-violet);+ box-shadow: 0 0 40px var(--hg-violet);+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="iris-stage">+ <div class="iris-ring" style="width: 200px; height: 200px"></div>+ <div class="hero">IRIS</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".iris-stage", { clipPath: "circle(0% at 50% 50%)" }, 0);+ tl.fromTo(+ ".iris-ring",+ { scale: 0, opacity: 0.9 },+ { scale: 9, opacity: 0, duration: 0.85, ease: "expo.out" },+ 0.2,+ );+ tl.to(+ ".iris-stage",+ { clipPath: "circle(75% at 50% 50%)", duration: 0.9, ease: "expo.out" },+ 0.3,+ );+ tl.from(".iris-stage .hero", { y: 40, opacity: 0, duration: 0.6, ease: "power3.out" }, 0.6);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/11-electric_arc/index.html b/skills/bgm-to-video/references/motion-primitives/11-electric_arc/index.htmlnew file mode 100644index 0000000000..b2300236b1--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/11-electric_arc/index.html@@ -0,0 +1,144 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>11 · electric_arc</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .arc-svg {+ position: absolute;+ inset: 0;+ }+ .arc-path {+ fill: none;+ stroke: var(--hg-fg);+ stroke-width: 3;+ stroke-linecap: round;+ filter: drop-shadow(0 0 8px var(--hg-cyan)) drop-shadow(0 0 16px var(--hg-cyan));+ stroke-dasharray: 1200;+ stroke-dashoffset: 1200;+ will-change: stroke-dashoffset, opacity;+ }+ .arc-flash {+ position: absolute;+ inset: 0;+ background: radial-gradient(circle at 50% 50%, rgba(42, 255, 240, 0.3) 0%, transparent 40%);+ opacity: 0;+ will-change: opacity;+ }+ .arc-label {+ font-weight: 900;+ font-size: 240px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ position: relative;+ z-index: 2;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <svg class="arc-svg" viewBox="0 0 1920 1080" preserveAspectRatio="none">+ <path+ class="arc-path"+ id="arc1"+ d="M 200 540 L 380 480 L 440 580 L 620 500 L 720 600 L 880 510 L 960 540"+ />+ <path+ class="arc-path"+ id="arc2"+ d="M 1720 540 L 1540 600 L 1480 500 L 1300 580 L 1200 480 L 1040 570 L 960 540"+ />+ <path+ class="arc-path"+ id="arc3"+ d="M 960 200 L 920 360 L 1040 420 L 940 520 L 960 540"+ />+ </svg>+ <div class="arc-flash"></div>+ <div class="arc-label">CHARGE</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".arc-label",+ { opacity: 0, scale: 0.9 },+ { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },+ 0.5,+ );+ const arcs = ["#arc1", "#arc2", "#arc3"];+ arcs.forEach((p, i) => {+ tl.fromTo(+ p,+ { strokeDashoffset: 1200, opacity: 0 },+ { strokeDashoffset: 0, opacity: 1, duration: 0.18, ease: "power4.out" },+ 0.15 + i * 0.05,+ );+ });+ tl.to(arcs.join(","), { opacity: 0.3, duration: 0.04, ease: "steps(1)" }, 0.55);+ tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.6);+ tl.to(arcs.join(","), { opacity: 0.5, duration: 0.04, ease: "steps(1)" }, 0.7);+ tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.78);+ tl.fromTo(+ ".arc-flash",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.5,+ );+ tl.to(".arc-flash", { opacity: 0, duration: 0.5, ease: "power2.out" }, 0.6);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/12-neon_flicker/index.html b/skills/bgm-to-video/references/motion-primitives/12-neon_flicker/index.htmlnew file mode 100644index 0000000000..bbda52d6fb--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/12-neon_flicker/index.html@@ -0,0 +1,108 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>12 · neon_flicker</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .neon {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.02em;+ color: #ff64a0;+ text-shadow:+ 0 0 8px #ff64a0,+ 0 0 24px #ff64a0,+ 0 0 60px #ff1a7a,+ 0 0 120px #ff1a7a;+ will-change: opacity, text-shadow;+ }+ .neon-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle at 50% 50%,+ rgba(255, 26, 122, 0.12) 0%,+ transparent 60%+ );+ opacity: 0;+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="neon-bg"></div>+ <div class="stage"><div class="neon">neon</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".neon", { opacity: 0 }, 0);+ const neonPattern = [+ { t: 0.2, o: 1 },+ { t: 0.26, o: 0 },+ { t: 0.3, o: 1 },+ { t: 0.38, o: 0.3 },+ { t: 0.42, o: 1 },+ { t: 0.5, o: 0.5 },+ { t: 0.55, o: 1 },+ ];+ neonPattern.forEach((p) => {+ tl.to(".neon", { opacity: p.o, duration: 0.02, ease: "steps(1)" }, p.t);+ });+ tl.to(".neon-bg", { opacity: 1, duration: 0.4, ease: "power2.out" }, 0.5);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/13-chrome_sweep/index.html b/skills/bgm-to-video/references/motion-primitives/13-chrome_sweep/index.htmlnew file mode 100644index 0000000000..7f7334bf13--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/13-chrome_sweep/index.html@@ -0,0 +1,103 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>13 · chrome_sweep</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .chrome {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ background: linear-gradient(+ 110deg,+ #404048 0%,+ #b4b4be 20%,+ #ffffff 45%,+ #ffffff 50%,+ #d8d8e0 60%,+ #5a5a64 85%,+ #ffffff 100%+ );+ background-size: 250% 100%;+ background-position: 200% 0;+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ color: transparent;+ will-change: background-position;+ filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4));+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage"><div class="chrome">CHROME</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".chrome",+ { opacity: 0, scale: 0.96 },+ { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },+ 0.2,+ );+ tl.fromTo(+ ".chrome",+ { backgroundPosition: "200% 0" },+ { backgroundPosition: "-100% 0", duration: 1.4, ease: "power2.inOut" },+ 0.3,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/15-slot_machine_reveal/index.html b/skills/bgm-to-video/references/motion-primitives/15-slot_machine_reveal/index.htmlnew file mode 100644index 0000000000..14e9d76f18--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/15-slot_machine_reveal/index.html@@ -0,0 +1,130 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>15 · slot_machine_reveal</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .slot {+ font-family: "JetBrains Mono", monospace;+ font-weight: 700;+ font-size: 280px;+ letter-spacing: 0.04em;+ color: var(--hg-fg);+ display: flex;+ gap: 30px;+ }+ .slot .digit {+ display: inline-block;+ min-width: 1ch;+ text-shadow: 0 0 40px rgba(168, 85, 247, 0.6);+ }+ .slot-label {+ position: absolute;+ bottom: 30%;+ left: 50%;+ transform: translateX(-50%);+ font-family: "JetBrains Mono", monospace;+ font-size: 22px;+ color: var(--hg-dim);+ letter-spacing: 0.4em;+ text-transform: uppercase;+ opacity: 0;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="slot">+ <span class="digit" data-target="5">0</span>+ <span class="digit" data-target=".">0</span>+ <span class="digit" data-target="5">0</span>+ <span class="digit" data-target="x">0</span>+ </div>+ </div>+ <div class="slot-label">FINAL VERSION</div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const DIGITS = "0123456789";+ const slotStates = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];+ slotStates.forEach((state, idx) => {+ tl.to(+ state,+ {+ p: 1,+ duration: 1.0,+ delay: idx * 0.08,+ ease: "power3.out",+ onUpdate: function () {+ const spans = document.querySelectorAll(".slot .digit");+ const span = spans[idx];+ if (!span) return;+ const target = span.getAttribute("data-target");+ if (state.p >= 0.85) {+ span.textContent = target;+ span.style.color = "var(--hg-violet-2)";+ } else {+ const tick = Math.floor(state.p * 80 + idx * 3);+ span.textContent = DIGITS.charAt(tick % 10);+ }+ },+ },+ 0.15,+ );+ });+ tl.to(".slot-label", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.2);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/16-liquid_morph/index.html b/skills/bgm-to-video/references/motion-primitives/16-liquid_morph/index.htmlnew file mode 100644index 0000000000..7d6860fd40--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/16-liquid_morph/index.html@@ -0,0 +1,131 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>16 · liquid_morph</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .blob-wrap {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .blob {+ position: absolute;+ width: 1100px;+ height: 800px;+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ clip-path: polygon(+ 50% 5%,+ 65% 8%,+ 78% 16%,+ 88% 30%,+ 92% 50%,+ 88% 70%,+ 78% 84%,+ 65% 92%,+ 50% 95%,+ 35% 92%,+ 22% 84%,+ 12% 70%,+ 8% 50%,+ 12% 30%,+ 22% 16%,+ 35% 8%+ );+ will-change: clip-path, transform;+ filter: blur(0.5px);+ }+ .hero {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ white-space: nowrap;+ position: relative;+ z-index: 2;+ mix-blend-mode: difference;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="blob-wrap"><div class="blob"></div></div>+ <div class="stage"><div class="hero">liquid</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const BLOB_A =+ "polygon(50% 5%, 65% 8%, 78% 16%, 88% 30%, 92% 50%, 88% 70%, 78% 84%, 65% 92%, 50% 95%, 35% 92%, 22% 84%, 12% 70%, 8% 50%, 12% 30%, 22% 16%, 35% 8%)";+ const BLOB_B =+ "polygon(38% 10%, 58% 4%, 75% 14%, 90% 28%, 95% 46%, 86% 60%, 80% 78%, 62% 88%, 46% 94%, 30% 86%, 16% 74%, 6% 58%, 10% 40%, 20% 22%, 30% 14%, 38% 10%)";+ const BLOB_C =+ "polygon(46% 8%, 62% 10%, 80% 20%, 92% 36%, 90% 52%, 92% 70%, 76% 86%, 58% 90%, 44% 94%, 28% 88%, 14% 76%, 10% 60%, 12% 44%, 18% 26%, 30% 12%, 38% 8%)";++ tl.set(".blob", { clipPath: BLOB_A, scale: 0.95 }, 0);+ tl.to(".blob", { clipPath: BLOB_B, scale: 1.05, duration: 0.7, ease: "power2.inOut" }, 0.2);+ tl.to(".blob", { clipPath: BLOB_C, scale: 1.0, duration: 0.7, ease: "power2.inOut" }, 0.9);+ tl.fromTo(+ ".hero",+ { opacity: 0, y: 30 },+ { opacity: 1, y: 0, duration: 0.6, ease: "power3.out" },+ 0.4,+ );+ tl.to(".blob", { rotation: 6, duration: 1.5, ease: "sine.inOut" }, 0.2);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/17-gooey_metaball/index.html b/skills/bgm-to-video/references/motion-primitives/17-gooey_metaball/index.htmlnew file mode 100644index 0000000000..c247a50368--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/17-gooey_metaball/index.html@@ -0,0 +1,241 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>17 · gooey_metaball</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .hero {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ z-index: 5;+ pointer-events: none;+ }+ .gooey-stage {+ position: absolute;+ inset: 0;+ filter: url(#gooey-filter);+ }+ .ball {+ position: absolute;+ border-radius: 50%;+ background: var(--hg-violet-2);+ top: 50%;+ left: 50%;+ will-change: transform;+ opacity: 0;+ }+ .ball.a {+ width: 280px;+ height: 280px;+ background: #7c3aed;+ }+ .ball.b {+ width: 240px;+ height: 240px;+ background: #a855f7;+ }+ .ball.c {+ width: 200px;+ height: 200px;+ background: #d946ef;+ }+ .ball.d {+ width: 320px;+ height: 320px;+ background: #8b5cf6;+ }+ .ball.e {+ width: 180px;+ height: 180px;+ background: #c084fc;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <svg style="position: absolute; width: 0; height: 0">+ <defs>+ <filter id="gooey-filter">+ <feGaussianBlur in="SourceGraphic" stdDeviation="20" result="blur" />+ <feColorMatrix+ in="blur"+ mode="matrix"+ values="+ 1 0 0 0 0+ 0 1 0 0 0+ 0 0 1 0 0+ 0 0 0 22 -10"+ result="gooey"+ />+ <feComposite in="SourceGraphic" in2="gooey" operator="atop" />+ </filter>+ </defs>+ </svg>++ <div class="gooey-stage">+ <div class="ball a" id="ballA"></div>+ <div class="ball b" id="ballB"></div>+ <div class="ball c" id="ballC"></div>+ <div class="ball d" id="ballD"></div>+ <div class="ball e" id="ballE"></div>+ </div>++ <div class="hero">GOOEY</div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Initial: all balls collapsed at center+ ["#ballA", "#ballB", "#ballC", "#ballD", "#ballE"].forEach((id) => {+ tl.set(id, { xPercent: -50, yPercent: -50, scale: 0, opacity: 0 }, 0);+ });+ // Spawn outward+ tl.to(+ "#ballA",+ {+ xPercent: -50 - 120,+ yPercent: -50 + 20,+ scale: 1,+ opacity: 1,+ duration: 0.5,+ ease: "back.out(1.6)",+ },+ 0.15,+ );+ tl.to(+ "#ballB",+ {+ xPercent: -50 + 100,+ yPercent: -50 + 50,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.2,+ );+ tl.to(+ "#ballC",+ {+ xPercent: -50 + 30,+ yPercent: -50 - 80,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.25,+ );+ tl.to(+ "#ballD",+ {+ xPercent: -50 - 50,+ yPercent: -50 - 30,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.3,+ );+ tl.to(+ "#ballE",+ {+ xPercent: -50 + 80,+ yPercent: -50 - 40,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.18,+ );++ // Idle drift+ tl.to(+ "#ballA",+ { xPercent: "+=20", yPercent: "+=12", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballB",+ { xPercent: "-=18", yPercent: "-=10", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballC",+ { xPercent: "-=15", yPercent: "+=20", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballD",+ { xPercent: "+=25", yPercent: "+=8", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballE",+ { xPercent: "-=22", yPercent: "+=18", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );++ // Reveal text behind+ tl.fromTo(+ ".hero",+ { opacity: 0, scale: 0.95 },+ { opacity: 1, scale: 1, duration: 0.5, ease: "power3.out" },+ 0.6,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/18-3d_card_flip/index.html b/skills/bgm-to-video/references/motion-primitives/18-3d_card_flip/index.htmlnew file mode 100644index 0000000000..0c4b88e3b9--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/18-3d_card_flip/index.html@@ -0,0 +1,154 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>18 · 3d_card_flip</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .card-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ perspective: 2400px;+ }+ .card {+ position: relative;+ width: 1000px;+ height: 580px;+ transform-style: preserve-3d;+ will-change: transform;+ }+ .face {+ position: absolute;+ inset: 0;+ backface-visibility: hidden;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 200px;+ letter-spacing: -0.04em;+ border-radius: 24px;+ box-shadow:+ 0 40px 80px rgba(0, 0, 0, 0.5),+ 0 0 0 1px rgba(255, 255, 255, 0.08) inset;+ }+ .face.front {+ background: linear-gradient(135deg, #1e1b3a 0%, #0a0a0f 100%);+ color: var(--hg-fg);+ }+ .face.back {+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ color: var(--hg-fg);+ transform: rotateY(180deg);+ }+ .face .meta {+ position: absolute;+ top: 36px;+ left: 40px;+ font-family: "JetBrains Mono", monospace;+ font-weight: 600;+ font-size: 18px;+ letter-spacing: 0.16em;+ opacity: 0.6;+ }+ .card-shadow {+ position: absolute;+ left: 50%;+ bottom: 22%;+ width: 1000px;+ height: 80px;+ background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);+ transform: translateX(-50%);+ filter: blur(12px);+ will-change: opacity, transform;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="card-shadow"></div>+ <div class="card-stage">+ <div class="card" id="card">+ <div class="face front">+ <div class="meta">v4 · CURRENT</div>+ PRODUCT+ </div>+ <div class="face back">+ <div class="meta">v5 · LAUNCH</div>+ v5.0+ </div>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ "#card",+ { rotateY: 0, scale: 0.92, opacity: 0 },+ { rotateY: 0, scale: 1, opacity: 1, duration: 0.45, ease: "power3.out" },+ 0.15,+ );++ // Hold then flip+ tl.to("#card", { rotateY: 180, duration: 1.0, ease: "power3.inOut" }, 0.7);++ // Shadow squishes mid-flip+ tl.to(+ ".card-shadow",+ { scaleX: 0.6, opacity: 0.4, duration: 0.5, ease: "power2.inOut" },+ 0.7,+ );+ tl.to(".card-shadow", { scaleX: 1, opacity: 0.7, duration: 0.5, ease: "power2.inOut" }, 1.2);++ // Tiny landing settle+ tl.to("#card", { scale: 1.02, duration: 0.12, ease: "power2.out" }, 1.68);+ tl.to("#card", { scale: 1, duration: 0.3, ease: "elastic.out(1, 0.5)" }, 1.8);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/19-crash_zoom_in/index.html b/skills/bgm-to-video/references/motion-primitives/19-crash_zoom_in/index.htmlnew file mode 100644index 0000000000..ddbfc06e67--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/19-crash_zoom_in/index.html@@ -0,0 +1,155 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>19 · crash_zoom_in</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .zoom-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ will-change: transform;+ }+ .radial-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle at center,+ rgba(168, 85, 247, 0.18) 0%,+ transparent 35%,+ rgba(0, 0, 0, 0.6) 80%+ );+ opacity: 0;+ will-change: opacity, transform;+ }+ .speed-lines {+ position: absolute;+ inset: 0;+ background: repeating-radial-gradient(+ circle at 50% 50%,+ transparent 0px,+ transparent 6px,+ rgba(255, 255, 255, 0.08) 7px,+ transparent 8px+ );+ opacity: 0;+ will-change: opacity;+ mix-blend-mode: screen;+ }+ .hero {+ font-weight: 900;+ font-size: 360px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, filter;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="radial-bg"></div>+ <div class="speed-lines"></div>+ <div class="zoom-stage"><div class="hero">CRASH</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Hold black for tension+ tl.set(".hero", { scale: 0.03, filter: "blur(20px)", opacity: 0 }, 0);++ const CRASH = 0.45;++ // The crash itself+ tl.to(+ ".hero",+ { scale: 1.0, filter: "blur(0px)", opacity: 1, duration: 0.32, ease: "expo.in" },+ CRASH,+ );++ // Background swoosh in same window+ tl.fromTo(+ ".radial-bg",+ { opacity: 0, scale: 0.4 },+ { opacity: 1, scale: 1, duration: 0.32, ease: "expo.in" },+ CRASH,+ );+ tl.fromTo(+ ".speed-lines",+ { opacity: 0, scale: 0.2 },+ { opacity: 1, scale: 1.4, duration: 0.32, ease: "expo.in" },+ CRASH,+ );++ // Landing settle+ const LAND = CRASH + 0.32;+ tl.to(".hero", { scale: 0.96, duration: 0.08, ease: "power3.out" }, LAND);+ tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.55)" }, LAND + 0.08);++ // Quick landing shake+ const sh = [9, -7, 5, -4, 2, -1];+ sh.forEach((amp, i) => {+ tl.to(+ ".zoom-stage",+ { x: amp, y: amp * 0.5 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },+ LAND + i * 0.03,+ );+ });+ tl.to(+ ".zoom-stage",+ { x: 0, y: 0, duration: 0.1, ease: "power2.out" },+ LAND + sh.length * 0.03,+ );++ // Speed lines fade+ tl.to(".speed-lines", { opacity: 0, duration: 0.4, ease: "power2.out" }, LAND + 0.05);+ // Radial settles+ tl.to(".radial-bg", { opacity: 0.5, duration: 0.5, ease: "power2.out" }, LAND);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/20-spotlight_sweep/index.html b/skills/bgm-to-video/references/motion-primitives/20-spotlight_sweep/index.htmlnew file mode 100644index 0000000000..f1e34acf90--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/20-spotlight_sweep/index.html@@ -0,0 +1,137 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>20 · spotlight_sweep</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .dim-layer {+ position: absolute;+ inset: 0;+ background: #03030a;+ }+ .hero-bright,+ .hero-dim {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ white-space: nowrap;+ }+ .hero-dim {+ color: rgba(245, 245, 250, 0.06);+ }+ .hero-bright {+ color: var(--hg-fg);+ text-shadow:+ 0 0 30px rgba(168, 85, 247, 0.4),+ 0 0 80px rgba(168, 85, 247, 0.2);+ -webkit-mask-image: radial-gradient(+ circle 360px at -400px 50%,+ #000 0%,+ rgba(0, 0, 0, 0.6) 60%,+ transparent 80%+ );+ mask-image: radial-gradient(+ circle 360px at -400px 50%,+ #000 0%,+ rgba(0, 0, 0, 0.6) 60%,+ transparent 80%+ );+ will-change: mask-image;+ }+ .spotlight-glow {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle 380px at -400px 50%,+ rgba(168, 85, 247, 0.18) 0%,+ transparent 60%+ );+ will-change: background;+ mix-blend-mode: screen;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="dim-layer"></div>+ <div class="hero-dim">DISCOVER</div>+ <div class="hero-bright" id="bright">DISCOVER</div>+ <div class="spotlight-glow" id="glow"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Animate the spotlight x position via mask-image (use a proxy + onUpdate for smoothness)+ const state = { x: -400 };+ tl.to(+ state,+ {+ x: 2300,+ duration: 1.4,+ ease: "power2.inOut",+ onUpdate: function () {+ const m = `radial-gradient(circle 360px at ${state.x}px 50%, #000 0%, rgba(0,0,0,0.6) 60%, transparent 80%)`;+ const g = `radial-gradient(circle 380px at ${state.x}px 50%, rgba(168, 85, 247, 0.18) 0%, transparent 60%)`;+ const bright = document.getElementById("bright");+ const glow = document.getElementById("glow");+ if (bright) {+ bright.style.maskImage = m;+ bright.style.webkitMaskImage = m;+ }+ if (glow) glow.style.background = g;+ },+ },+ 0.3,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/21-outline_to_fill/index.html b/skills/bgm-to-video/references/motion-primitives/21-outline_to_fill/index.htmlnew file mode 100644index 0000000000..ae9235bacd--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/21-outline_to_fill/index.html@@ -0,0 +1,117 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>21 · outline_to_fill</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .outline-stack {+ position: relative;+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .stroke-layer {+ position: absolute;+ top: 0;+ left: 0;+ color: transparent;+ -webkit-text-stroke: 3px var(--hg-violet-2);+ text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);+ will-change:+ opacity,+ -webkit-text-stroke;+ }+ .fill-layer {+ position: relative;+ color: var(--hg-fg);+ clip-path: inset(100% 0 0 0);+ will-change: clip-path;+ }+ .spacer {+ color: transparent;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="outline-stack">+ <span class="spacer">Premium</span>+ <span class="stroke-layer">Premium</span>+ <span class="fill-layer">Premium</span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Stroke draws in+ tl.fromTo(+ ".stroke-layer",+ { opacity: 0, scale: 1.04 },+ { opacity: 1, scale: 1, duration: 0.45, ease: "power3.out" },+ 0.15,+ );++ // Fill rises from bottom+ tl.set(".fill-layer", { clipPath: "inset(100% 0 0 0)" }, 0);+ tl.to(".fill-layer", { clipPath: "inset(0% 0 0 0)", duration: 1.0, ease: "expo.out" }, 0.55);++ // Stroke recedes once fill arrives+ tl.to(".stroke-layer", { opacity: 0.35, duration: 0.6, ease: "power2.out" }, 1.0);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/22-counting_punch/index.html b/skills/bgm-to-video/references/motion-primitives/22-counting_punch/index.htmlnew file mode 100644index 0000000000..6f693c3e9b--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/22-counting_punch/index.html@@ -0,0 +1,154 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>22 · counting_punch</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 30px;+ }+ .counter {+ font-weight: 900;+ font-size: 360px;+ letter-spacing: -0.04em;+ font-variant-numeric: tabular-nums;+ color: var(--hg-fg);+ will-change: transform, text-shadow;+ line-height: 1;+ }+ .caption {+ font-family: "JetBrains Mono", monospace;+ font-size: 28px;+ color: var(--hg-dim);+ letter-spacing: 0.3em;+ text-transform: uppercase;+ opacity: 0;+ }+ .underline {+ height: 4px;+ background: var(--hg-violet-2);+ width: 0;+ box-shadow: 0 0 20px var(--hg-violet);+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="counter" id="counter">0</div>+ <div class="underline" id="underline"></div>+ <div class="caption" id="caption">USERS THIS WEEK</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const TARGET = 12847;+ const counter = { v: 0 };+ let lastShown = 0;++ function format(n) {+ return Math.floor(n).toLocaleString("en-US");+ }++ tl.to(+ counter,+ {+ v: TARGET,+ duration: 1.15,+ ease: "expo.out",+ onUpdate: function () {+ const el = document.getElementById("counter");+ if (!el) return;+ const cur = Math.floor(counter.v);+ if (cur !== lastShown) {+ el.textContent = format(cur);+ // tiny scale tick on each digit change+ el.style.transform = "scale(1.045)";+ el.style.textShadow = "0 0 40px rgba(168, 85, 247, 0.6)";+ // browser will paint, then this resets via the next onUpdate+ }+ lastShown = cur;+ },+ },+ 0.15,+ );++ // Big settle punch at landing+ tl.to(+ "#counter",+ {+ scale: 1.12,+ textShadow: "0 0 80px rgba(168, 85, 247, 0.9)",+ duration: 0.1,+ ease: "power4.out",+ },+ 1.3,+ );+ tl.to(+ "#counter",+ {+ scale: 1.0,+ textShadow: "0 0 20px rgba(168, 85, 247, 0.4)",+ duration: 0.6,+ ease: "elastic.out(1, 0.55)",+ },+ 1.4,+ );++ // Underline draws+ tl.to("#underline", { width: 420, duration: 0.6, ease: "expo.out" }, 1.35);+ tl.to("#caption", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.55);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/24-particle_burst/index.html b/skills/bgm-to-video/references/motion-primitives/24-particle_burst/index.htmlnew file mode 100644index 0000000000..d80800afa5--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/24-particle_burst/index.html@@ -0,0 +1,141 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>24 · particle_burst</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, opacity;+ position: relative;+ z-index: 10;+ }+ .particle-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ .particle {+ position: absolute;+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--hg-violet-2);+ box-shadow: 0 0 12px var(--hg-violet-2);+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="particle-stage" id="particles"></div>+ <div class="stage"><div class="hero">SPARK</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Build N particles deterministically+ const N = 36;+ const container = document.getElementById("particles");+ const particles = [];+ for (let i = 0; i < N; i++) {+ const p = document.createElement("div");+ p.className = "particle";+ // Vary size per particle for visual interest+ const sz = 4 + (i % 4) * 3;+ p.style.width = sz + "px";+ p.style.height = sz + "px";+ // Slight color variation+ const hue = ((i * 17) % 60) - 30;+ p.style.filter = `hue-rotate(${hue}deg)`;+ container.appendChild(p);+ particles.push(p);+ }++ // Hero punch + flash entry+ tl.fromTo(+ ".hero",+ { scale: 0.85, opacity: 0 },+ { scale: 1, opacity: 1, duration: 0.3, ease: "power4.out" },+ 0.3,+ );++ // Particles burst out+ particles.forEach((p, i) => {+ const angle = (i / N) * Math.PI * 2 + i * 0.137; // golden-angle jitter+ const radius = 500 + (i % 5) * 90 + (i % 3) * 40;+ const tx = Math.cos(angle) * radius;+ const ty = Math.sin(angle) * radius;+ const dur = 1.1 + (i % 5) * 0.08;+ tl.fromTo(+ p,+ { x: 0, y: 0, scale: 1, opacity: 1 },+ { x: tx, y: ty, scale: 0, opacity: 0, duration: dur, ease: "expo.out" },+ 0.35 + (i % 6) * 0.012,+ );+ });++ // Hero settle wobble+ tl.to(".hero", { scale: 1.04, duration: 0.1, ease: "power3.out" }, 0.35);+ tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.5)" }, 0.45);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/25-radial_burst_lines/index.html b/skills/bgm-to-video/references/motion-primitives/25-radial_burst_lines/index.htmlnew file mode 100644index 0000000000..d04dc2bb82--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/25-radial_burst_lines/index.html@@ -0,0 +1,160 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>25 · radial_burst_lines</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ position: relative;+ z-index: 10;+ will-change: transform;+ }+ .burst-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ .line {+ position: absolute;+ width: 5px;+ height: 180px;+ background: linear-gradient(to top, transparent 0%, var(--hg-fg) 50%, transparent 100%);+ transform-origin: bottom center;+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="burst-stage" id="bursts"></div>+ <div class="stage"><div class="hero">BAM</div></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Build 20 lines+ const N = 20;+ const container = document.getElementById("bursts");+ const lines = [];+ for (let i = 0; i < N; i++) {+ const l = document.createElement("div");+ l.className = "line";+ const angle = (i / N) * 360;+ const innerRadius = 220;+ // Rotate around center, push outward via transform-origin trick.+ // Easier: use translate then rotate+ l.style.transform = `rotate(${angle}deg) translateY(-${innerRadius}px) scaleY(0)`;+ container.appendChild(l);+ lines.push({ el: l, angle });+ }++ // Hero punch+ tl.fromTo(+ ".hero",+ { scale: 0.7, opacity: 0 },+ { scale: 1.1, opacity: 1, duration: 0.15, ease: "power4.out" },+ 0.3,+ );+ tl.to(".hero", { scale: 1.0, duration: 0.4, ease: "elastic.out(1, 0.5)" }, 0.45);++ // Burst lines expand+ lines.forEach((l, i) => {+ const innerRadius = 220 + (i % 3) * 30; // vary radius+ const len = 200 + (i % 4) * 40; // vary length+ const ang = l.angle;+ tl.set(+ l.el,+ {+ rotation: ang,+ x: 0,+ y: 0,+ scaleY: 0,+ opacity: 0,+ transformOrigin: "center bottom",+ },+ 0,+ );+ // GSAP transforms compose, so we set the rotation + translate via separate properties+ // Use a custom transform string approach+ tl.to(+ l.el,+ {+ scaleY: 1,+ opacity: 1,+ duration: 0.18,+ ease: "power4.out",+ onUpdate: function () {+ const p = this.progress();+ const t = -innerRadius - len * p * 0.2;+ l.el.style.transform = `rotate(${ang}deg) translateY(${t}px) scaleY(${p})`;+ l.el.style.opacity = (p > 0.7 ? 1 - (p - 0.7) / 0.3 : 1).toString();+ },+ },+ 0.32 + (i % 5) * 0.018,+ );+ });++ // Hold then fade+ tl.to(".line", { opacity: 0, duration: 0.4, ease: "power2.out" }, 0.9);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/26-pixel_dissolve/index.html b/skills/bgm-to-video/references/motion-primitives/26-pixel_dissolve/index.htmlnew file mode 100644index 0000000000..913983517d--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/26-pixel_dissolve/index.html@@ -0,0 +1,121 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>26 · pixel_dissolve</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ color: transparent;+ }+ .grid {+ position: absolute;+ inset: 0;+ display: grid;+ will-change: contents;+ pointer-events: none;+ }+ .cell {+ background: var(--hg-bg);+ will-change: opacity, transform;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage"><div class="hero">DISSOLVE</div></div>+ <div class="grid" id="grid"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const COLS = 24;+ const ROWS = 14;+ const grid = document.getElementById("grid");+ grid.style.gridTemplateColumns = `repeat(${COLS}, 1fr)`;+ grid.style.gridTemplateRows = `repeat(${ROWS}, 1fr)`;++ const cells = [];+ for (let i = 0; i < COLS * ROWS; i++) {+ const c = document.createElement("div");+ c.className = "cell";+ grid.appendChild(c);+ cells.push(c);+ }++ // Deterministic shuffle: hash function based on i+j+ function hash(i) {+ return ((i * 9301 + 49297) % 233280) / 233280;+ }+ const order = cells.map((c, i) => ({ c, i, h: hash(i) })).sort((a, b) => a.h - b.h);++ // All cells start visible (covering hero), fade out in shuffled order+ const TOTAL = 0.85;+ order.forEach((o, k) => {+ const t = 0.35 + (k / order.length) * TOTAL;+ tl.to(o.c, { opacity: 0, duration: 0.06, ease: "steps(1)" }, t);+ });++ // After dissolve, gentle hero scale settle (it was always visible, now exposed)+ tl.fromTo(".hero", { scale: 1.03 }, { scale: 1.0, duration: 0.5, ease: "power2.out" }, 1.0);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/27-datamosh_smear/index.html b/skills/bgm-to-video/references/motion-primitives/27-datamosh_smear/index.htmlnew file mode 100644index 0000000000..37126f3cb4--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/27-datamosh_smear/index.html@@ -0,0 +1,166 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>27 · datamosh_smear</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-magenta: #ff2a4a;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .smear-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .smear-hero {+ position: relative;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .smear-layer {+ position: absolute;+ top: 0;+ left: 0;+ mix-blend-mode: screen;+ will-change: transform, opacity, filter;+ }+ .smear-layer.l1 {+ color: #ff2a4a;+ }+ .smear-layer.l2 {+ color: #2afff0;+ }+ .smear-layer.l3 {+ color: #b56dff;+ }+ .smear-layer.l4 {+ color: #ffd166;+ }+ .smear-layer.l5 {+ color: #f5f5fa;+ }+ .spacer {+ color: transparent;+ }+ .scan-noise {+ position: absolute;+ inset: 0;+ background:+ repeating-linear-gradient(+ 0deg,+ rgba(255, 255, 255, 0) 0px,+ rgba(255, 255, 255, 0) 2px,+ rgba(255, 255, 255, 0.07) 3px+ ),+ repeating-linear-gradient(+ 90deg,+ rgba(0, 0, 0, 0) 0px,+ rgba(0, 0, 0, 0) 4px,+ rgba(0, 0, 0, 0.15) 5px+ );+ opacity: 0;+ will-change: opacity;+ pointer-events: none;+ mix-blend-mode: overlay;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="smear-stage">+ <div class="smear-hero">+ <span class="spacer">SMEAR</span>+ <span class="smear-layer l1">SMEAR</span>+ <span class="smear-layer l2">SMEAR</span>+ <span class="smear-layer l3">SMEAR</span>+ <span class="smear-layer l4">SMEAR</span>+ <span class="smear-layer l5">SMEAR</span>+ </div>+ </div>+ <div class="scan-noise"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // All layers start far right, stagger-lag in, then settle near center+ const layers = [+ ".smear-layer.l1",+ ".smear-layer.l2",+ ".smear-layer.l3",+ ".smear-layer.l4",+ ".smear-layer.l5",+ ];++ layers.forEach((sel, i) => {+ tl.fromTo(+ sel,+ { x: 360, opacity: 0, filter: "blur(20px)" },+ { x: 0, opacity: 0.85, filter: "blur(0px)", duration: 0.7, ease: "expo.out" },+ 0.2 + i * 0.08,+ );+ });++ // Final settle: pull layers into proper offset+ const finalX = [-6, -2, 0, 2, 4];+ layers.forEach((sel, i) => {+ tl.to(sel, { x: finalX[i], duration: 0.4, ease: "power2.out" }, 1.1);+ });++ // Scan noise pulses+ tl.fromTo(+ ".scan-noise",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.2,+ );+ tl.to(".scan-noise", { opacity: 0.25, duration: 0.8, ease: "power2.out" }, 0.6);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/28-text_wave_distort/index.html b/skills/bgm-to-video/references/motion-primitives/28-text_wave_distort/index.htmlnew file mode 100644index 0000000000..07be8e253f--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/28-text_wave_distort/index.html@@ -0,0 +1,136 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>28 · text_wave_distort</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .wave-hero {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.02em;+ white-space: nowrap;+ text-shadow: 0 0 40px rgba(168, 85, 247, 0.5);+ }+ .wave-hero .char {+ display: inline-block;+ will-change: transform;+ }+ /* per-char solid colors marching across a violet→cyan ramp */+ .wave-hero .char:nth-child(1) {+ color: #7c3aed;+ }+ .wave-hero .char:nth-child(2) {+ color: #a855f7;+ }+ .wave-hero .char:nth-child(3) {+ color: #d946ef;+ }+ .wave-hero .char:nth-child(4) {+ color: #ec4899;+ }+ .wave-hero .char:nth-child(5) {+ color: #2afff0;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="wave-hero" id="hero">+ <span class="char">f</span><span class="char">l</span><span class="char">u</span+ ><span class="char">i</span><span class="char">d</span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Explicit fromTo entry — safer than .from() in paused/seek mode+ tl.fromTo(+ "#hero .char",+ { y: 60, opacity: 0 },+ { y: 0, opacity: 1, stagger: 0.06, ease: "back.out(1.8)", duration: 0.5 },+ 0.1,+ );++ // Continuous wave: phase 0→4 cycles over 1.5s, amplitude envelope rise→settle+ const state = { phase: 0 };+ tl.to(+ state,+ {+ phase: 4,+ duration: 1.5,+ ease: "none",+ onUpdate: function () {+ const chars = document.querySelectorAll("#hero .char");+ const p = state.phase / 4;+ let amp;+ if (p < 0.35) amp = (p / 0.35) * 24;+ else if (p < 0.7)+ amp = 24 - ((p - 0.35) / 0.35) * 12; // 24 → 12+ else amp = 12 - ((p - 0.7) / 0.3) * 4; // 12 → 8+ chars.forEach((c, i) => {+ const y = amp * Math.sin(state.phase * Math.PI * 2 + i * 0.45);+ // Use gsap.set so it cooperates with GSAP's transform tracking+ gsap.set(c, { y });+ });+ },+ },+ 0.65,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/assets/gsap.min.js b/skills/bgm-to-video/references/motion-primitives/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/references/motion-primitives/bg_flow_field/index.html b/skills/bgm-to-video/references/motion-primitives/bg_flow_field/index.htmlnew file mode 100644index 0000000000..9a650cc8be--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/bg_flow_field/index.html@@ -0,0 +1,326 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Page background", "default":"#050507"},+ {"id":"colorLow", "type":"color", "label":"Flow — shadow tone", "default":"#0a1430"},+ {"id":"colorMid", "type":"color", "label":"Flow — mid tone", "default":"#6a6f9e"},+ {"id":"colorHigh", "type":"color", "label":"Flow — highlight tone", "default":"#e8f0ff"},+ {"id":"accentColor","type":"color", "label":"Core / glow accent", "default":"#aee4ff"},+ {"id":"flowSpeed", "type":"number", "label":"Flow speed", "default":1, "min":0.1, "max":3, "step":0.1}+ ]'+>+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>bg_flow_field</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #050507;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .field {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ display: block;+ }+ .label {+ position: absolute;+ left: 48px;+ bottom: 40px;+ font-size: 22px;+ font-weight: 600;+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.7);+ mix-blend-mode: screen;+ pointer-events: none;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="4"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="4" data-track-index="1">+ <canvas class="field" width="1920" height="1080"></canvas>+ <div class="label">bg_flow_field</div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // ── Variables (palette + speed); falls back to defaults standalone ──+ const defaults = {+ bgColor: "#050507",+ colorLow: "#0a1430",+ colorMid: "#6a6f9e",+ colorHigh: "#e8f0ff",+ accentColor: "#aee4ff",+ flowSpeed: 1,+ };+ const vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // sRGB hex -> linear-light [r,g,b] (shader works in linear, gamma-encodes at end)+ function hexLin(hex) {+ let h = String(hex).replace("#", "").trim();+ if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];+ const r = parseInt(h.substr(0, 2), 16) / 255;+ const g = parseInt(h.substr(2, 2), 16) / 255;+ const b = parseInt(h.substr(4, 2), 16) / 255;+ const lin = (c) => Math.pow(c, 2.2);+ return [lin(r), lin(g), lin(b)];+ }++ const canvas = document.querySelector(".field");+ const gl = canvas.getContext("webgl", {+ antialias: false,+ alpha: false,+ preserveDrawingBuffer: true,+ });++ const VERT = [+ "attribute vec2 position;",+ "varying vec2 vUv;",+ "void main(){",+ " vUv = position * 0.5 + 0.5;",+ " gl_Position = vec4(position, 0.0, 1.0);",+ "}",+ ].join("\n");++ // Curl-noise flow field — ported verbatim from the held-message-living-field+ // template's "living field" background. All visible state comes from uniforms.+ const FRAG = [+ "precision highp float;",+ "varying vec2 vUv;",+ "uniform float uTime;",+ "uniform float uPhase;",+ "uniform float uReveal;",+ "uniform float uChromAb;",+ "uniform float uVignette;",+ "uniform float uIntensity;",+ "uniform float uSpeed;",+ "uniform vec2 uResolution;",+ "uniform vec3 uColLow;",+ "uniform vec3 uColMid;",+ "uniform vec3 uColHigh;",+ "uniform vec3 uAccent;",+ "float hash21(vec2 p){",+ " p = fract(p * vec2(123.34, 456.21));",+ " p += dot(p, p + 45.32);",+ " return fract(p.x * p.y);",+ "}",+ "float noise2(vec2 p){",+ " vec2 i = floor(p);",+ " vec2 f = fract(p);",+ " vec2 u = f * f * (3.0 - 2.0 * f);",+ " float a = hash21(i);",+ " float b = hash21(i + vec2(1.0, 0.0));",+ " float c = hash21(i + vec2(0.0, 1.0));",+ " float d = hash21(i + vec2(1.0, 1.0));",+ " return mix(mix(a,b,u.x), mix(c,d,u.x), u.y);",+ "}",+ "float fbm(vec2 p){",+ " float v = 0.0;",+ " float a = 0.5;",+ " for(int i=0;i<5;i++){",+ " v += a * noise2(p);",+ " p *= 2.02;",+ " a *= 0.5;",+ " }",+ " return v;",+ "}",+ "vec2 curl(vec2 p, float t){",+ " float e = 0.6;",+ " float n1 = fbm(p + vec2(0.0, e) + t*0.18);",+ " float n2 = fbm(p + vec2(0.0, -e) + t*0.18);",+ " float n3 = fbm(p + vec2( e, 0.0) + t*0.18);",+ " float n4 = fbm(p + vec2(-e, 0.0) + t*0.18);",+ " return vec2(n1 - n2, -(n3 - n4));",+ "}",+ "vec3 palette(float t){",+ " t = clamp(t, 0.0, 1.0);",+ " vec3 lowMid = mix(uColLow, uColMid, smoothstep(0.0, 0.5, t));",+ " return mix(lowMid, uColHigh, smoothstep(0.5, 1.0, t));",+ "}",+ "vec3 sampleField(vec2 uv, float t, float energy){",+ " vec2 p = (uv - 0.5) * vec2(uResolution.x/uResolution.y, 1.0) * 2.4;",+ " vec2 c = curl(p * 0.9, t);",+ " vec2 q = p + c * (0.45 + 0.55 * energy);",+ " float flow = fbm(q * 1.6 + vec2(t * 0.11, -t * 0.07));",+ " float bands = sin(flow * 14.0 + t * 1.1);",+ " bands = smoothstep(0.0, 1.0, 0.5 + 0.5 * bands);",+ " float r = length(p);",+ " float core = smoothstep(1.5, 0.05, r) * (0.6 + 0.4 * energy);",+ " float glow = exp(-r * 1.6) * (0.55 + 0.45 * energy);",+ " float k = clamp(flow * 0.85 + 0.15 * bands + 0.25 * core + 0.6 * glow, 0.0, 1.4);",+ " vec3 col = palette(k * 0.9 + 0.1 * sin(t * 0.4));",+ " col *= 0.7 + 0.6 * energy;",+ " col += uAccent * core * 0.55;",+ " return col;",+ "}",+ "void main(){",+ " vec2 uv = vUv;",+ " float t = uTime * uSpeed;",+ " float e = uIntensity;",+ " vec2 dir = normalize(uv - 0.5 + 1e-6);",+ " float ca = uChromAb * (0.004 + 0.012 * length(uv - 0.5));",+ " vec3 cR = sampleField(uv + dir * ca, t, e);",+ " vec3 cG = sampleField(uv, t, e);",+ " vec3 cB = sampleField(uv - dir * ca, t, e);",+ " vec3 col = vec3(cR.r, cG.g, cB.b);",+ " float lum = dot(col, vec3(0.299, 0.587, 0.114));",+ " col = mix(vec3(lum), col, 1.05);",+ " float rev = uReveal;",+ " float sweep = smoothstep(0.0, 0.6, rev) * (1.0 - smoothstep(0.6, 1.0, rev));",+ " col += uColHigh * sweep * 0.35;",+ " vec3 phaseTint = mix(vec3(0.85, 0.92, 1.05), vec3(1.05, 0.95, 0.85), uPhase);",+ " col *= phaseTint;",+ " float v = length(uv - 0.5);",+ " col *= 1.0 - smoothstep(0.45, 0.95, v) * uVignette;",+ " col = col / (col + 1.0);",+ " col = pow(col, vec3(1.0/2.2));",+ " gl_FragColor = vec4(col, 1.0);",+ "}",+ ].join("\n");++ function compile(type, src) {+ const s = gl.createShader(type);+ gl.shaderSource(s, src);+ gl.compileShader(s);+ return s;+ }+ const prog = gl.createProgram();+ gl.attachShader(prog, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(prog, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(prog);+ gl.useProgram(prog);++ // full-screen triangle+ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);+ const posLoc = gl.getAttribLocation(prog, "position");+ gl.enableVertexAttribArray(posLoc);+ gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);+ gl.viewport(0, 0, 1920, 1080);++ const L = (n) => gl.getUniformLocation(prog, n);+ const uLoc = {+ uTime: L("uTime"),+ uPhase: L("uPhase"),+ uReveal: L("uReveal"),+ uChromAb: L("uChromAb"),+ uVignette: L("uVignette"),+ uIntensity: L("uIntensity"),+ uSpeed: L("uSpeed"),+ uResolution: L("uResolution"),+ uColLow: L("uColLow"),+ uColMid: L("uColMid"),+ uColHigh: L("uColHigh"),+ uAccent: L("uAccent"),+ };++ // animated uniform state (GSAP tweens these .value fields)+ const u = {+ uTime: { value: 0 },+ uPhase: { value: 0.1 },+ uReveal: { value: 0 },+ uChromAb: { value: 0 },+ uVignette: { value: 0 },+ uIntensity: { value: 0.3 },+ };+ const speed = Number(vars.flowSpeed) || 1;+ const cLow = hexLin(vars.colorLow);+ const cMid = hexLin(vars.colorMid);+ const cHigh = hexLin(vars.colorHigh);+ const cAcc = hexLin(vars.accentColor);++ function render() {+ gl.uniform1f(uLoc.uTime, u.uTime.value);+ gl.uniform1f(uLoc.uPhase, u.uPhase.value);+ gl.uniform1f(uLoc.uReveal, u.uReveal.value);+ gl.uniform1f(uLoc.uChromAb, u.uChromAb.value);+ gl.uniform1f(uLoc.uVignette, u.uVignette.value);+ gl.uniform1f(uLoc.uIntensity, u.uIntensity.value);+ gl.uniform1f(uLoc.uSpeed, speed);+ gl.uniform2f(uLoc.uResolution, 1920, 1080);+ gl.uniform3fv(uLoc.uColLow, cLow);+ gl.uniform3fv(uLoc.uColMid, cMid);+ gl.uniform3fv(uLoc.uColHigh, cHigh);+ gl.uniform3fv(uLoc.uAccent, cAcc);+ gl.drawArrays(gl.TRIANGLES, 0, 3);+ }+ render(); // initial frame so a seek to 0 / first paint is correct++ // ── Energy-envelope drive (the "living field" breath): all repaint is via+ // onUpdate, so the field is fully determined by the timeline position — no+ // requestAnimationFrame, seek-safe. ──+ tl.eventCallback("onUpdate", render);++ tl.to(u.uTime, { value: 4, duration: 4, ease: "none" }, 0);++ // energy: settle-in → breathe → SURGE → settle dark for the hold+ tl.to(u.uIntensity, { value: 0.6, duration: 1.2, ease: "sine.inOut" }, 0);+ tl.to(u.uIntensity, { value: 1.0, duration: 0.7, ease: "power2.in" }, 1.3);+ tl.to(u.uIntensity, { value: 0.35, duration: 2.0, ease: "power2.out" }, 2.0);++ // chromatic light-leak: light at entry, spikes on the surge, then settles+ tl.fromTo(u.uChromAb, { value: 0 }, { value: 0.4, duration: 1.2, ease: "sine.in" }, 0);+ tl.to(u.uChromAb, { value: 1.4, duration: 0.5, ease: "power3.in" }, 1.4);+ tl.to(u.uChromAb, { value: 0.2, duration: 1.6, ease: "power2.out" }, 1.9);++ // a brief highlight sweep across the surge+ tl.fromTo(u.uReveal, { value: 0 }, { value: 1, duration: 0.7, ease: "none" }, 1.3);+ tl.set(u.uReveal, { value: 0 }, 2.0);++ // colour-temperature drift+ tl.to(u.uPhase, { value: 0.6, duration: 2.2, ease: "sine.inOut" }, 0.6);++ // black mask settles the field to near-black + central glow for the hold+ tl.to(u.uVignette, { value: 0.85, duration: 1.6, ease: "power2.out" }, 1.9);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/blur_resolve/index.html b/skills/bgm-to-video/references/motion-primitives/blur_resolve/index.htmlnew file mode 100644index 0000000000..aa07db7098--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/blur_resolve/index.html@@ -0,0 +1,95 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>blur_resolve</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: filter, transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="hero" id="hero">FOCUS</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Resolve: heavy blur + scaled-up + dim settles into perfect crisp focus.+ tl.fromTo(+ "#hero",+ { filter: "blur(36px)", scale: 1.08, opacity: 0.25 },+ { filter: "blur(0px)", scale: 1, opacity: 1, duration: 0.7, ease: "power2.out" },+ 0.05,+ );++ // Hold crisp through the middle (no keys needed — state persists to ~1.5).++ // Blur-out near the end: brief defocus + dim, a cut-away that loops seamlessly.+ tl.to(+ "#hero",+ { filter: "blur(24px)", opacity: 0.25, duration: 0.25, ease: "power2.in" },+ 1.7,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/directional_fill/index.html b/skills/bgm-to-video/references/motion-primitives/directional_fill/index.htmlnew file mode 100644index 0000000000..00d45b61fa--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/directional_fill/index.html@@ -0,0 +1,133 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>directional_fill</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 36px;+ }+ .bar {+ position: relative;+ width: 1040px;+ height: 188px;+ border: 3px solid var(--hg-dim);+ border-radius: 12px;+ overflow: hidden;+ display: flex;+ align-items: center;+ padding: 0 56px;+ }+ .fill {+ position: absolute;+ inset: 0;+ transform: scaleX(0);+ will-change: transform;+ }+ .fill.a {+ background: var(--hg-violet);+ transform-origin: left center;+ }+ .fill.b {+ background: var(--hg-violet-2);+ transform-origin: right center;+ }+ .fill.c {+ background: #2afff0;+ transform-origin: left center;+ }+ .label {+ position: relative;+ z-index: 1;+ font-weight: 900;+ font-size: 96px;+ letter-spacing: -0.03em;+ line-height: 1;+ color: var(--hg-fg);+ will-change: color;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="1.8"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="1.8" data-track-index="1">+ <div class="stage">+ <div class="bar">+ <div class="fill a"></div>+ <span class="label" id="l1">READY</span>+ </div>+ <div class="bar">+ <div class="fill b"></div>+ <span class="label" id="l2">SET</span>+ </div>+ <div class="bar">+ <div class="fill c"></div>+ <span class="label" id="l3">FILL</span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Bar 1 — sweeps left -> right, landing on the beat at ~0.55s.+ tl.to(".fill.a", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.2);+ tl.set("#l1", { color: "var(--hg-bg)" }, 0.55);++ // Bar 2 — sweeps right -> left, landing at ~0.85s.+ tl.to(".fill.b", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.5);+ tl.set("#l2", { color: "var(--hg-bg)" }, 0.85);++ // Bar 3 — sweeps left -> right, landing at ~1.15s.+ tl.to(".fill.c", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.8);+ tl.set("#l3", { color: "var(--hg-bg)" }, 1.15);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/flash_cut/index.html b/skills/bgm-to-video/references/motion-primitives/flash_cut/index.htmlnew file mode 100644index 0000000000..fad3ae2293--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/flash_cut/index.html@@ -0,0 +1,132 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>flash_cut</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .word {+ position: absolute;+ font-weight: 900;+ font-size: 260px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ color: var(--hg-fg);+ will-change: opacity;+ }+ .accent {+ position: absolute;+ bottom: 360px;+ width: 220px;+ height: 14px;+ border-radius: 999px;+ background: var(--hg-violet);+ will-change: background, transform;+ }+ .flash {+ position: absolute;+ inset: 0;+ background: #ffffff;+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="1.8"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="1.8" data-track-index="1">+ <div class="stage">+ <div class="accent" id="accent"></div>+ <div class="word" id="w0">READY</div>+ <div class="word" id="w1">IMPACT</div>+ <div class="word" id="w2">DONE</div>+ </div>+ <div class="flash" id="flash"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Initial state: first word visible, others hidden, accent violet.+ tl.set("#w0", { opacity: 1 }, 0);+ tl.set("#w1", { opacity: 0 }, 0);+ tl.set("#w2", { opacity: 0 }, 0);+ tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 0);+ tl.set("#flash", { opacity: 0 }, 0);++ // Two hits; during each white frame, swap underlying word + accent colour.+ const hits = [+ { t: 0.5, from: "#w0", to: "#w1", color: "#a855f7", scaleX: 1.45 },+ { t: 1.2, from: "#w1", to: "#w2", color: "#f5f5fa", scaleX: 0.7 },+ ];++ hits.forEach((h) => {+ // Instant full-frame white flash on the hit.+ tl.set("#flash", { opacity: 1 }, h.t);+ // While white (~2 frames at 30fps), swap the revealed state.+ tl.set(h.from, { opacity: 0 }, h.t + 0.03);+ tl.set(h.to, { opacity: 1 }, h.t + 0.03);+ tl.set("#accent", { backgroundColor: h.color, scaleX: h.scaleX }, h.t + 0.03);+ // Snap the flash back out within ~3 frames.+ tl.set("#flash", { opacity: 0 }, h.t + 0.06);+ });++ // Graceful loop: dip back to white at the very end and restore the start+ // state so the cycle re-enters cleanly on the next pass.+ tl.set("#flash", { opacity: 1 }, 1.74);+ tl.set("#w2", { opacity: 0 }, 1.77);+ tl.set("#w0", { opacity: 1 }, 1.77);+ tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 1.77);+ tl.set("#flash", { opacity: 0 }, 1.8);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/hard_cut/index.html b/skills/bgm-to-video/references/motion-primitives/hard_cut/index.htmlnew file mode 100644index 0000000000..b306c657b3--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/hard_cut/index.html@@ -0,0 +1,117 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>hard_cut</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ }+ .panel {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ opacity: 0;+ will-change: opacity;+ }+ .word {+ font-weight: 900;+ font-size: 340px;+ letter-spacing: -0.05em;+ line-height: 0.9;+ text-transform: uppercase;+ white-space: nowrap;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage" id="stage"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic palette + word list. Variation is derived from index only.+ const BG = ["#7c3aed", "#0a0a0f", "#ff2a4a", "#2afff0", "#a855f7", "#f5f5fa", "#0a0a0f"];+ const FG = ["#f5f5fa", "#a855f7", "#0a0a0f", "#0a0a0f", "#0a0a0f", "#7c3aed", "#f5f5fa"];+ const WORDS = ["CUT", "NOW", "HARD", "SNAP", "STOP", "GO", "CUT"];+ const STEP = 0.28; // beat interval+ const N = WORDS.length;++ // Build one full-frame panel per cut, all hidden but the first.+ const stage = document.getElementById("stage");+ for (let i = 0; i < N; i++) {+ const panel = document.createElement("div");+ panel.className = "panel";+ panel.id = "p" + i;+ panel.style.background = BG[i];+ panel.style.opacity = i === 0 ? "1" : "0";+ const word = document.createElement("div");+ word.className = "word";+ word.style.color = FG[i];+ word.textContent = WORDS[i];+ panel.appendChild(word);+ stage.appendChild(panel);+ }++ // Sample-accurate 0ms cuts: at each beat, hide current panel, show next.+ // tl.set has no duration and no ease — brutal instant switching.+ for (let i = 1; i < N; i++) {+ const t = i * STEP;+ tl.set("#p" + (i - 1), { opacity: 0 }, t);+ tl.set("#p" + i, { opacity: 1 }, t);+ }++ // Loop gracefully: snap back to the first panel before the clip ends so a+ // re-entry starts clean on the same color/word it began with.+ tl.set("#p" + (N - 1), { opacity: 0 }, N * STEP);+ tl.set("#p0", { opacity: 1 }, N * STEP);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/mosaic_pack/index.html b/skills/bgm-to-video/references/motion-primitives/mosaic_pack/index.htmlnew file mode 100644index 0000000000..b33fbc358f--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/mosaic_pack/index.html@@ -0,0 +1,124 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>mosaic_pack</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .grid {+ display: grid;+ grid-template-columns: repeat(6, 200px);+ grid-template-rows: repeat(4, 200px);+ gap: 18px;+ }+ .tile {+ border-radius: 14px;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2.4"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">+ <div class="stage">+ <div class="grid" id="grid"></div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic palette + grid build (6x4 = 24 cells).+ const PALETTE = ["#7c3aed", "#a855f7", "#f5f5fa", "#2a2a3a", "#b56dff", "#6b6b78"];+ const COLS = 6;+ const ROWS = 4;+ const COUNT = COLS * ROWS;+ const grid = document.getElementById("grid");+ const tiles = [];+ for (let i = 0; i < COUNT; i++) {+ const tile = document.createElement("div");+ tile.className = "tile";+ tile.style.background = PALETTE[i % PALETTE.length];+ grid.appendChild(tile);+ tiles.push(tile);+ }++ // Scatter each tile from a deterministic offset/rotation, then pack into place.+ // Land order ripples diagonally (col + row) for a deterministic "assembling" feel.+ const STEP = 0.07;+ for (let i = 0; i < COUNT; i++) {+ const col = i % COLS;+ const row = Math.floor(i / COLS);+ const dx = (((i * 53) % 200) - 100) * 9; // far-flung scatter X+ const dy = (((i * 89) % 200) - 100) * 7; // far-flung scatter Y+ const rot = ((i * 37) % 80) - 40; // deterministic tilt+ const order = col + row; // diagonal land sequence+ tl.fromTo(+ tiles[i],+ { x: dx, y: dy, rotation: rot, scale: 0.6, autoAlpha: 0.15 },+ {+ x: 0,+ y: 0,+ rotation: 0,+ scale: 1,+ autoAlpha: 1,+ duration: 0.6,+ ease: "back.out(1.6)",+ },+ 0.1 + order * STEP,+ );+ }++ // Settle the packed poster with a tiny breath so the loop seats cleanly.+ tl.to("#grid", { scale: 1.02, duration: 0.18, ease: "power2.out" }, 1.9);+ tl.to("#grid", { scale: 1, duration: 0.32, ease: "power2.inOut" }, 2.08);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/palette_flip/index.html b/skills/bgm-to-video/references/motion-primitives/palette_flip/index.htmlnew file mode 100644index 0000000000..3535268dfc--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/palette_flip/index.html@@ -0,0 +1,132 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>palette_flip</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ }+ .kicker {+ font-weight: 700;+ font-size: 38px;+ letter-spacing: 0.42em;+ text-transform: uppercase;+ margin-bottom: 40px;+ }+ .word {+ font-weight: 900;+ font-size: 300px;+ letter-spacing: -0.05em;+ line-height: 0.9;+ white-space: nowrap;+ }+ .bars {+ display: flex;+ gap: 26px;+ margin-top: 56px;+ }+ .bar {+ width: 220px;+ height: 26px;+ border-radius: 4px;+ }+ .bar.b2 {+ width: 140px;+ }+ .bar.b3 {+ width: 90px;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2.6"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2.6" data-track-index="1">+ <div class="stage">+ <div class="kicker" id="kicker">REGIME</div>+ <div class="word" id="word">REGIME</div>+ <div class="bars">+ <div class="bar b1"></div>+ <div class="bar b2"></div>+ <div class="bar b3"></div>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Four distinct palette regimes — same layout, re-skinned on each flip.+ const regimes = [+ { bg: "#0a0a0f", fg: "#f5f5fa", accent: "#7c3aed", kicker: "#a855f7" }, // dark / violet+ { bg: "#f4ead8", fg: "#1a1410", accent: "#ff5a47", kicker: "#c4452f" }, // cream / coral+ { bg: "#08222b", fg: "#eafaf6", accent: "#1fd1b0", kicker: "#7fe3d2" }, // navy / teal+ { bg: "#000000", fg: "#ffce3a", accent: "#ffce3a", kicker: "#7a6010" }, // black / amber+ ];++ const beat = 0.6;+ const scene = "#scene";+ const word = "#word";+ const kicker = "#kicker";+ const bars = ".bar";++ // Instant 0ms flips on every beat — cycle through the regimes deterministically.+ // The motion IS the colour change; layout never moves.+ const flips = 5;+ for (let i = 0; i < flips; i++) {+ const p = regimes[i % regimes.length];+ const t = i * beat;+ tl.set(scene, { backgroundColor: p.bg }, t);+ tl.set(word, { color: p.fg }, t);+ tl.set(kicker, { color: p.kicker }, t);+ tl.set(bars, { backgroundColor: p.accent }, t);+ }++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/staggered_exit/index.html b/skills/bgm-to-video/references/motion-primitives/staggered_exit/index.htmlnew file mode 100644index 0000000000..cd8db889f8--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/staggered_exit/index.html@@ -0,0 +1,117 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>staggered_exit</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .grid {+ display: grid;+ grid-template-columns: repeat(4, 320px);+ grid-template-rows: repeat(2, 320px);+ gap: 36px;+ }+ .card {+ display: flex;+ align-items: center;+ justify-content: center;+ border-radius: 28px;+ background: linear-gradient(135deg, var(--hg-violet), var(--hg-violet-2));+ color: var(--hg-fg);+ font-weight: 900;+ font-size: 72px;+ letter-spacing: -0.02em;+ box-shadow: 0 24px 60px rgba(124, 58, 237, 0.35);+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">+ <div class="stage">+ <div class="grid">+ <div class="card">NORTH</div>+ <div class="card">EAST</div>+ <div class="card">SOUTH</div>+ <div class="card">WEST</div>+ <div class="card">PEAK</div>+ <div class="card">EDGE</div>+ <div class="card">CORE</div>+ <div class="card">FLUX</div>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const cards = gsap.utils.toArray(".card");+ const hold = 0.4; // fully visible hold before the cascade begins+ const step = 0.11; // per-element offset+ const exitDur = 0.45;++ // start fully visible+ tl.set(cards, { autoAlpha: 1, y: 0 }, 0);++ // ordered exit: each card slides down + fades, one after another+ for (let i = 0; i < cards.length; i++) {+ tl.to(+ cards[i],+ { y: 80, autoAlpha: 0, duration: exitDur, ease: "power3.in" },+ hold + i * step,+ );+ }++ // snap all back to the visible start state so the next loop begins full+ tl.set(cards, { autoAlpha: 1, y: 0 }, 1.95);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.md b/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.mdnew file mode 100644index 0000000000..bbe7c89cd8--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/USAGE.md@@ -0,0 +1,42 @@+# Using `text_spectral_rays` — it OWNS its wordmark++`text_spectral_rays` is a **self-contained WebGL hero-text renderer**. From ONE rasterized+glyph mask it draws **both** the solid wordmark **and** the spectral rays that emanate from+it. Letters and rays share the same mask, so they are always perfectly registered.++## The one trap: never give the word a second source++The ghost / doubled-wordmark artifact comes from splitting the word across two sources:++- ❌ **Wrong** — use the shader as a "rays-only background" and draw the visible letters+ with a **separate DOM element** (or stack a second text move like `content_swap` /+ `chromatic_pressure` on the same word). The DOM font (e.g. Inter) and the shader's raster+ font (Arial Black / Impact fallback) differ in width, shape, and position, so the ray+ edges never line up with the DOM letters → a misregistered ghost. **Deleting the shader's+ letter terms does NOT fix it** — the ray mask itself is still the second, misaligned copy+ of the word.++- ✅ **Right** — let the shader render the wordmark. There is exactly ONE source, so a+ ghost is structurally impossible.++## Integrate in one pass++1. **It IS the wordmark.** Hide any DOM logo for that word (keep it only as an invisible+ layout spacer if a tagline/CTA below depends on its box). Never stack a discrete text+ move on the same word.+2. **One timeline.** Merge its `progress` / `effectMix` state tweens onto the group's master+ timeline and repaint via `tl.eventCallback("onUpdate", render)` — no second timeline, no+ `requestAnimationFrame`.+3. **Align the cursor to the word.** `mouse.y` must equal the mask's vertical center. If you+ move the rasterized word off frame-center (e.g. up, to leave room for a tagline), shift+ the cursor's `y` by the same amount — otherwise the rays cast at the wrong angle.+4. **Local raster only.** Rasterize the word with a bundled / system font (no CDN font);+ upload the mask + colour canvases as textures.+5. **Entrance.** Slam the whole canvas (autoAlpha + a scale punch, `transform-origin` on the+ word's optical center) on the hit; let `effectMix` bloom the rays just after. The solid+ letters are present the instant the canvas reveals.++## Pairs with++A background bed (`bg_flow_field`) or **separate** supporting elements (tagline, CTA, rule)+— never a second treatment of its own word.diff --git a/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/index.html b/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/index.htmlnew file mode 100644index 0000000000..ed3292d6e4--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/text_spectral_rays/index.html@@ -0,0 +1,313 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"text", "type":"string", "label":"Wordmark", "default":"SPECTRAL"},+ {"id":"textColor", "type":"color", "label":"Wordmark fill", "default":"#f6ff7a"},+ {"id":"bgColor", "type":"color", "label":"Stage background", "default":"#000000"},+ {"id":"sweepSpeed", "type":"number", "label":"Light sweep speed", "default":1, "min":0.2, "max":3, "step":0.1}+ ]'+>+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>text_spectral_rays</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #000000;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: #000;+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ background: #000;+ }+ .vfx-canvas {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ display: block;+ }+ .label {+ position: absolute;+ left: 48px;+ bottom: 40px;+ font-size: 22px;+ font-weight: 600;+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.6);+ mix-blend-mode: screen;+ pointer-events: none;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="4"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="4" data-track-index="1">+ <canvas class="vfx-canvas" width="1920" height="1080" aria-hidden="true"></canvas>+ <div class="label">text_spectral_rays</div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ (function () {+ const W = 1920;+ const H = 1080;++ const defaults = {+ text: "SPECTRAL",+ textColor: "#f6ff7a",+ bgColor: "#000000",+ sweepSpeed: 1,+ };+ const vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ const canvas = document.querySelector(".vfx-canvas");+ const gl = canvas.getContext("webgl", {+ premultipliedAlpha: false,+ preserveDrawingBuffer: true,+ });++ // animated state — GSAP tweens these; mouse (the light cursor) is derived+ const state = { progress: 0, effectMix: 0 };+ const mouse = { x: 0, y: H * 0.5 };+ const speed = Number(vars.sweepSpeed) || 1;++ // ── Rasterize the wordmark into a white MASK + a coloured SRC canvas ──+ function drawWord(ctx, fill) {+ ctx.clearRect(0, 0, W, H);+ let fs = 340;+ const stack = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';+ ctx.font = stack;+ const maxW = 1600;+ const measured = ctx.measureText(vars.text).width || 1;+ if (measured > maxW) {+ fs = Math.floor((fs * maxW) / measured);+ ctx.font = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';+ }+ ctx.textAlign = "center";+ ctx.textBaseline = "middle";+ ctx.fillStyle = fill;+ ctx.fillText(vars.text, W * 0.5, H * 0.5);+ }+ const maskCanvas = document.createElement("canvas");+ maskCanvas.width = W;+ maskCanvas.height = H;+ drawWord(maskCanvas.getContext("2d"), "#ffffff");+ const colorCanvas = document.createElement("canvas");+ colorCanvas.width = W;+ colorCanvas.height = H;+ drawWord(colorCanvas.getContext("2d"), vars.textColor);++ // ── WebGL fallback: flat fill (keeps the timeline registered) ──+ if (!gl) {+ const ctx = canvas.getContext("2d");+ ctx.fillStyle = vars.bgColor;+ ctx.fillRect(0, 0, W, H);+ tl.to(state, { progress: 1, duration: 3.6, ease: "none" }, 0.2);+ window.__timelines["main"] = tl;+ return;+ }++ const VERT = [+ "attribute vec2 position;",+ "varying vec2 vUv;",+ "void main(){",+ " vUv = position * 0.5 + 0.5;",+ " gl_Position = vec4(position, 0.0, 1.0);",+ "}",+ ].join("\n");++ // Volumetric spectral light-rays cast by the text mask toward a moving+ // light cursor — ported from the vfx-text-cursor golden sample, made+ // generic (reads any text mask/colour). All state from uniforms.+ const FRAG = [+ "precision highp float;",+ "varying vec2 vUv;",+ "uniform vec2 resolution;",+ "uniform vec2 mouse;",+ "uniform float maskY;",+ "uniform float maskScale;",+ "uniform float effectMix;",+ "uniform sampler2D src;",+ "uniform sampler2D colorSrc;",+ "#define PI 3.141593",+ "#define SAMPLES 112.0",+ "float hash(vec2 p){ return fract(sin(dot(p, vec2(489.0,589.0))) * 492.0) * 2.0 - 1.0; }",+ "float hash(vec3 p){ return fract(sin(dot(p, vec3(489.0,589.0,58.0))) * 492.0) * 2.0 - 1.0; }",+ "vec2 hash2(vec3 p){ return vec2(hash(p), hash(p + 1.0)); }",+ "vec4 readMask(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(src, uv); }",+ "vec4 readColor(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(colorSrc, uv); }",+ "vec3 spectrum(float x){ return cos((x - vec3(0.0,0.5,1.0)) * vec3(0.6,1.0,0.5) * PI); }",+ "void main(){",+ " vec2 uv = vUv;",+ " vec2 center = vec2(0.5, 0.5);",+ " vec2 maskUv = (uv - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",+ " float mask = readMask(maskUv).r;",+ " vec4 col0 = readColor(maskUv);",+ " vec2 p = uv * 2.0 - 1.0;",+ " p.x *= resolution.x / resolution.y;",+ " vec2 mp = mouse / resolution;",+ " mp.y = 1.0 - mp.y;",+ " mp = mp * 2.0 - 1.0;",+ " mp.x *= resolution.x / resolution.y;",+ " vec2 rp = p;",+ " vec2 d = (mp - p) / SAMPLES;",+ " float acc = 0.0;",+ " for(float i = 0.0; i < SAMPLES; i++){",+ " rp += d;",+ " rp += hash2(vec3(rp, i)) * 0.5 / SAMPLES;",+ " vec2 uv2 = rp;",+ " uv2.x /= resolution.x / resolution.y;",+ " uv2 = uv2 * 0.5 + 0.5;",+ " vec2 rayUv = (uv2 - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",+ " acc += readMask(rayUv).r / SAMPLES;",+ " }",+ " vec4 c = vec4(0.0, 0.0, 0.0, 1.0);",+ " c -= acc * 0.24;",+ " c += vec4(spectrum(cos(acc * 4.9)), 1.0) * acc * 3.65;",+ " c.rgb = max(c.rgb - 0.035, 0.0);",+ " c.rgb *= 1.16;",+ " float cursorX = mouse.x / resolution.x;",+ " float sweep = exp(-pow((uv.x - cursorX) * 6.2, 2.0));",+ " float textProximity = smoothstep(0.006, 0.34, acc);",+ " float longRay = smoothstep(0.004, 0.18, acc);",+ " vec3 sweepColor = vec3(0.14, 0.65, 0.85) + spectrum(cursorX * 1.8) * 0.28;",+ " c.rgb += sweepColor * sweep * (0.34 + textProximity * 2.35);",+ " c.rgb += spectrum(cursorX + acc * 2.0) * longRay * 0.58;",+ " c.rgb += col0.rgb * acc * 1.18;",+ " c.rgb += col0.rgb * sweep * mask * 0.92;",+ " c.rgb *= effectMix;",+ " c.rgb = mix(c.rgb, col0.rgb, smoothstep(0.02, 0.75, col0.a));",+ " c.rgb += vec3(1.0) * smoothstep(0.04, 0.38, mask) * 0.12 * effectMix;",+ " float grain = hash(vec3(uv.xyy + mouse.x * 0.0007));",+ " float dust = smoothstep(0.02, 0.38, acc) + smoothstep(0.03, 0.22, mask);",+ " c.rgb += grain * 0.07 * (0.42 + dust) * effectMix;",+ " c.rgb += spectrum(grain + cursorX) * abs(grain) * 0.045 * smoothstep(0.02, 0.5, acc) * effectMix;",+ " c.a = 1.0;",+ " gl_FragColor = c;",+ "}",+ ].join("\n");++ function compile(type, source) {+ const s = gl.createShader(type);+ gl.shaderSource(s, source);+ gl.compileShader(s);+ return s;+ }+ const program = gl.createProgram();+ gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(program);+ gl.useProgram(program);++ function createTexture(source) {+ const t = gl.createTexture();+ gl.bindTexture(gl.TEXTURE_2D, t);+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);+ return t;+ }+ const maskTex = createTexture(maskCanvas);+ const colorTex = createTexture(colorCanvas);++ const buffer = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]),+ gl.STATIC_DRAW,+ );+ const posLoc = gl.getAttribLocation(program, "position");+ const L = (n) => gl.getUniformLocation(program, n);+ const uRes = L("resolution");+ const uMouse = L("mouse");+ const uMaskY = L("maskY");+ const uMaskScale = L("maskScale");+ const uMix = L("effectMix");+ const uSrc = L("src");+ const uColorSrc = L("colorSrc");++ function render() {+ mouse.x = state.progress * W;+ mouse.y = H * 0.5;+ gl.viewport(0, 0, W, H);+ gl.clearColor(0, 0, 0, 1);+ gl.clear(gl.COLOR_BUFFER_BIT);+ gl.useProgram(program);+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);+ gl.enableVertexAttribArray(posLoc);+ gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);+ gl.activeTexture(gl.TEXTURE0);+ gl.bindTexture(gl.TEXTURE_2D, maskTex);+ gl.uniform1i(uSrc, 0);+ gl.activeTexture(gl.TEXTURE1);+ gl.bindTexture(gl.TEXTURE_2D, colorTex);+ gl.uniform1i(uColorSrc, 1);+ gl.uniform2f(uRes, W, H);+ gl.uniform2f(uMouse, mouse.x, mouse.y);+ gl.uniform1f(uMaskY, 0);+ gl.uniform1f(uMaskScale, 1);+ gl.uniform1f(uMix, state.effectMix);+ gl.drawArrays(gl.TRIANGLES, 0, 6);+ }+ render(); // initial frame (seek-to-0 correctness)++ // All repaint via the timeline's onUpdate — fully seek-safe, no rAF.+ tl.eventCallback("onUpdate", render);++ // effect punches in, the light cursor sweeps L→R across the wordmark,+ // then fades for a clean loop.+ tl.set(state, { progress: 0, effectMix: 0 }, 0);+ tl.to(state, { effectMix: 1, duration: 0.45, ease: "power3.out" }, 0.15);+ tl.to(state, { progress: 1, duration: 3.4 / speed, ease: "none" }, 0.2);+ tl.to(state, { effectMix: 0, duration: 0.4, ease: "power2.in" }, 3.6);++ window.__timelines["main"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/tile_mosaic/index.html b/skills/bgm-to-video/references/motion-primitives/tile_mosaic/index.htmlnew file mode 100644index 0000000000..a8c95340cd--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/tile_mosaic/index.html@@ -0,0 +1,144 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>tile_mosaic</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .mosaic {+ position: relative;+ display: grid;+ grid-template-columns: repeat(6, 1fr);+ grid-template-rows: repeat(4, 1fr);+ gap: 6px;+ width: 1440px;+ height: 960px;+ }+ .tile {+ border-radius: 4px;+ will-change: transform, opacity;+ }+ .title {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 220px;+ letter-spacing: -0.03em;+ color: var(--hg-fg);+ text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);+ will-change: transform, opacity;+ pointer-events: none;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2.4"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">+ <div class="stage">+ <div class="mosaic" id="mosaic"></div>+ <div class="title" id="title">MOSAIC</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const COLS = 6;+ const ROWS = 4;+ const STEP = 0.06;+ // Deterministic palette; tile colour chosen by index, no randomness.+ const PALETTE = [+ "#7c3aed",+ "#a855f7",+ "#6d28d9",+ "#c084fc",+ "#5b21b6",+ "#8b5cf6",+ "#9333ea",+ "#4c1d95",+ ];++ const mosaic = document.getElementById("mosaic");+ const tiles = [];+ for (let i = 0; i < COLS * ROWS; i++) {+ const row = Math.floor(i / COLS);+ const col = i % COLS;+ const cell = document.createElement("div");+ cell.className = "tile";+ const a = PALETTE[(row + col) % PALETTE.length];+ const b = PALETTE[(row + col + 3) % PALETTE.length];+ cell.style.background = "linear-gradient(135deg, " + a + " 0%, " + b + " 100%)";+ mosaic.appendChild(cell);+ tiles.push({ el: cell, diag: row + col });+ }++ // Diagonal sweep: reveal order governed by (row + col), explicit per-tile timing.+ for (const t of tiles) {+ tl.fromTo(+ t.el,+ { autoAlpha: 0, scale: 0.6 },+ { autoAlpha: 1, scale: 1, duration: 0.4, ease: "back.out(1.7)" },+ t.diag * STEP,+ );+ }++ // Title settles over the finished, dense mosaic.+ tl.fromTo(+ "#title",+ { autoAlpha: 0, scale: 1.12 },+ { autoAlpha: 1, scale: 1, duration: 0.45, ease: "power2.out" },+ 1.7,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/typewriter_reveal/index.html b/skills/bgm-to-video/references/motion-primitives/typewriter_reveal/index.htmlnew file mode 100644index 0000000000..1c5432ff97--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/typewriter_reveal/index.html@@ -0,0 +1,122 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>typewriter_reveal</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .line {+ display: flex;+ align-items: baseline;+ font-family: "JetBrains Mono", ui-monospace, monospace;+ font-weight: 800;+ font-size: 200px;+ letter-spacing: 0.02em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .char {+ display: inline-block;+ opacity: 0;+ will-change: opacity;+ }+ .char.space {+ width: 0.4em;+ }+ .caret {+ display: inline-block;+ width: 0.09em;+ height: 0.86em;+ margin-left: 0.06em;+ background: var(--hg-violet-2);+ will-change: opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2.4"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">+ <div class="stage">+ <div class="line" id="line">+ <span class="char">S</span><span class="char">Y</span><span class="char">S</span+ ><span class="char">T</span><span class="char">E</span><span class="char">M</span+ ><span class="char space"> </span><span class="char">O</span+ ><span class="char">N</span><span class="char">L</span><span class="char">I</span+ ><span class="char">N</span><span class="char">E</span+ ><span class="caret" id="caret"></span>+ </div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const chars = gsap.utils.toArray(".char");+ const step = 0.07;++ // Explicit per-character reveal: one set() per char at time i * step.+ chars.forEach((char, i) => {+ tl.set(char, { opacity: 1 }, i * step);+ });++ const lastT = (chars.length - 1) * step;++ // Caret rides just past the last revealed char and blinks a finite number+ // of times (no repeat:-1), then the phrase locks crisp.+ tl.set("#caret", { opacity: 1 }, 0);+ tl.to(+ "#caret",+ { opacity: 0, duration: 0.09, ease: "steps(1)", repeat: 8, yoyo: true },+ lastT + step,+ );+ tl.set("#caret", { opacity: 0 }, 2.32);++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/motion-primitives/word_grid_burst/index.html b/skills/bgm-to-video/references/motion-primitives/word_grid_burst/index.htmlnew file mode 100644index 0000000000..fe56320f05--- /dev/null+++ b/skills/bgm-to-video/references/motion-primitives/word_grid_burst/index.html@@ -0,0 +1,126 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>word_grid_burst</title>+ <script src="../assets/gsap.min.js"></script>+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ margin: 0;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--hg-bg);+ font-family: "Inter", system-ui, sans-serif;+ color: var(--hg-fg);+ -webkit-font-smoothing: antialiased;+ }+ #scene {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: grid;+ grid-template-columns: repeat(5, 1fr);+ grid-template-rows: repeat(3, 1fr);+ align-items: center;+ justify-items: center;+ padding: 140px 120px;+ gap: 24px;+ }+ .cell {+ font-weight: 900;+ font-size: 92px;+ letter-spacing: -0.03em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="main"+ data-start="0"+ data-duration="2.8"+ data-width="1920"+ data-height="1080"+ >+ <div id="scene" class="clip" data-start="0" data-duration="2.8" data-track-index="1">+ <div class="stage">+ <div class="cell">PULSE</div>+ <div class="cell">FORGE</div>+ <div class="cell">SURGE</div>+ <div class="cell">VOLT</div>+ <div class="cell">CORE</div>+ <div class="cell">FLUX</div>+ <div class="cell">SPARK</div>+ <div class="cell">DRIVE</div>+ <div class="cell">BLAZE</div>+ <div class="cell">WAVE</div>+ <div class="cell">SHIFT</div>+ <div class="cell">BOLT</div>+ <div class="cell">RUSH</div>+ <div class="cell">PEAK</div>+ <div class="cell">IGNITE</div>+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic reveal order: scatter sequence across the 15-cell grid.+ const order = [7, 0, 12, 4, 9, 2, 14, 6, 11, 1, 8, 3, 13, 5, 10];+ const cells = gsap.utils.toArray(".cell");+ const step = 0.13;+ const FOCUS = 7; // chosen focal cell ("DRIVE")++ // Each cell pops in on its own "onset" — explicit per-cell timing.+ order.forEach((idx, i) => {+ tl.fromTo(+ cells[idx],+ { autoAlpha: 0, scale: 0.8 },+ { autoAlpha: 1, scale: 1, duration: 0.22, ease: "back.out(1.8)" },+ i * step,+ );+ });++ // Downbeat refocus (~2.3s): dim the whole grid, pop the focal word.+ tl.to(".cell", { autoAlpha: 0.25, duration: 0.18, ease: "power2.out" }, 2.3);+ tl.to(+ cells[FOCUS],+ {+ autoAlpha: 1,+ scale: 1.25,+ color: "var(--hg-violet-2)",+ duration: 0.22,+ ease: "back.out(2)",+ },+ 2.32,+ );++ window.__timelines["main"] = tl;+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/references/signature-schema.md b/skills/bgm-to-video/references/signature-schema.mdnew file mode 100644index 0000000000..eecf08f1d2--- /dev/null+++ b/skills/bgm-to-video/references/signature-schema.md@@ -0,0 +1,195 @@+# GroupSignature — the shared schema (linchpin)++One schema, three producers:++- the **Music Reader** emits one `GroupSignature` per **section** (over its whole span);+- the **Director** derives one per **group** when it subdivides a section;+- a **template's match-face** declares which `GroupSignature`s it fits.++Because all speak this vocabulary, matching a group to a template is mechanical. **Do not+let them drift.** Every field here is derived from `audiomap.json` (fact) — never invented+— so it holds at runtime with no video.++## Two levels: sections → groups++Segmentation is split across two stages by who knows what:++1. **Sections** (Music Reader, catalog-blind) — the musical macro-structure: runs of one+ gesture, snapped to real state-changes. Each section is a full `GroupSignature` over its+ whole span **plus** a `cut_candidates[]` menu — the musically-legal internal anchors a+ finer cut could land on. The Music Reader does **not** decide how many groups a section+ becomes.+2. **Groups** (Director, catalog-aware) — the treatment units a template actually binds to.+ The Director subdivides each section by acting on zero or more of its `cut_candidates`,+ because the right granularity depends on template native spans only it can see. A+ section kept whole is one group (== itself); a long / multi-gesture section becomes+ several. The Director derives each group's `GroupSignature` over its own slice.++`sections[]` (in `music-read.json`) tile the **whole track** (first at 0, last at+`duration_s`, no gaps/overlaps). The Director's `groups[]` (in `visual-plan.json`) tile it+too; every group carries the `section_id` it came from, and a section's groups tile that+section's span.++A **template matches a `group`** (which may be a whole section) — the match-face below is+unchanged. **Multiple templates inside one section are fine** (the brand spine unifies+them, not template reuse).++```jsonc+"sections": [+ {+ // a GroupSignature over the whole section span (every field below) + a cut menu+ "id": "s1",+ "span_sec": [19.412, 30.0], // [start,end], snapped to AudioMap anchors (re-snapped to nearest beat)+ "structural_type": "per_onset_sequential",+ "mood": ["dark", "cinematic"],+ // …all other GroupSignature fields, derived over the whole span…+ "cut_candidates": [+ // musically-legal internal cut points the Director MAY use; empty for a single+ // gesture; NEVER inside a rolls[] run; never leaving a sub-1-bar fragment.+ { "time": 23.963, "kind": "hard_stop", "strength": "strong" },+ { "time": 26.215, "kind": "surge", "strength": "strong" },+ ],+ },+]+```++## The object++```jsonc+{+ "id": "g1", // group id within the track+ "section_id": "s1", // the section this group lives in (its groups tile the section span)+ "span_sec": [0.0, 4.017], // [start, end], snapped to AudioMap anchors+ "span_bars": 2, // length in bars (rounded)++ "structural_type": "sustained_hold", // controlled vocab — see rubric below+ "mood": ["warm", "cinematic"], // controlled vocab, 1–3 tags++ // ── objective audio facts (straight from audiomap) ──+ "energy_level": "HIGH", // VOID | LOW | MEDIUM | HIGH (dominant phase)+ "energy": 0.8, // 0–1, mean of the dominant phase+ "density": "sparse", // sparse | medium | dense (audiomap fact)+ "onset_rate": 1.0, // onsets / sec over the span+ "onset_gap_bars": 2.05, // longest onset desert, in bars (key discriminator)+ "has_steady_grid": true, // stable bpm + ≥2 downbeats present+ "bpm": 129.2,++ // ── roll lane (from audiomap rolls[] overlapping the span; false/null if none) ──+ "has_roll": false, // any rolls[] entry overlaps the group+ "roll_kind": null, // dominant roll kind: fill | accel-roll | sustained-fill+ "roll_rate_per_min": 0, // hits/min of the dominant (longest) overlapping roll+ "roll_count": 0, // rolls[] entries overlapping the span++ // ── boundaries ──+ "entry": { "anchor": "downbeat", "time": 0.093 },+ "exit_trigger": { "type": "first_onset_reentry", "time": 4.017 },+}+```++## Field derivation (from audiomap — make this automatic)++| field | how to compute |+| --------------------------------- | -------------------------------------------------------------------------------------------- |+| `span_sec` | the group's [start,end]; snap each to nearest `downbeats_sec` / `hard_stops` / `phrase` edge |+| `span_bars` | `round((end-start) / bar_dur)`, where `bar_dur = beats_per_bar * 60/bpm` |+| `energy_level` / `energy` | the `energy_phases[]` block covering most of the span → its `level` / `energy` |+| `density` | dominant `energy_phases[].density` over the span |+| `onset_rate` | `count(events in span) / (end-start)` |+| `onset_gap_bars` | `max gap between consecutive events[].t inside the span` ÷ `bar_dur` |+| `has_steady_grid` | `tempo.n_bars >= 2` and bpm stable |+| `has_roll` / `roll_count` | any / count of `rolls[]` overlapping the span |+| `roll_kind` / `roll_rate_per_min` | `kind` / `rate_per_min` of the dominant (longest) overlapping roll |+| `entry` | first anchor at/after `start` (prefer `downbeat`) |+| `exit_trigger` | see exit-trigger rule below |++Worked example (group_1): max onset gap `3.971 − 0.163 = 3.808s`; `bar_dur =+4·(60/129.2) = 1.858s`; `onset_gap_bars = 3.808/1.858 = 2.05`. ✓++## exit_trigger rule (also the group boundary)++Pick the first that applies, snap its time to the nearest downbeat:++1. longest onset gap ≥ ~1.5 bars **and** an onset follows it → `first_onset_reentry`+ (the held section ends when rhythm re-enters — group_1).+2. a terminal `hard_stops[]` in the span → `hard_stop`.+3. a `SURGE` into a denser phase at the end → `surge`.+4. otherwise → `downbeat` (next bar) or `end` (track end).++> Per decision #2: the Music Reader proposes the boundary; when a chosen template's+> stop rule disagrees, the **Director reconciles** to the nearest AudioMap anchor.+> They rarely conflict because both come from these same facts.++## Controlled vocabularies (SEED — grows as we reverse)++These lists are the dictionary both sides must use. Adding a value is a deliberate+catalog change, not an ad-hoc string.++### `structural_type`++| value | the music | seen in |+| ---------------------- | ----------------------------------------------------------- | ------------------ |+| `sustained_hold` | energy present but few/no onsets — a held pad/riser | group_1 |+| `per_onset_sequential` | discrete onsets drive one reveal each (typing/word-by-word) | group_2 (expected) |+| `roll_cascade` | a `rolls[]` run → continuous cascade / multiply | — |+| `dense_multiply` | HIGH + dense, no single message → field/grid/strobe | — |+| `void_breath` | VOID / silence dominant → clear & hold | — |+| `hard_stop_freeze` | terminal hard stop → freeze to negative space | — |+| `drop_regime_change` | SURGE into dense → system replace | — |++> `dense_multiply` is currently a **broad bucket** — three promoted templates live under+> it (`roll-flipbook-word-cycle`, `held-text-strobe-burst`, `poster-tile-mosaic`),+> disambiguated by their `match.requires` (a fast `sustained-fill` roll vs a tiny+> `onset_gap_bars` strobe vs a tessellating tile program). Candidate future subtypes:+> `held_strobe`, `tile_mosaic_program`. Split them out when a 4th example forces it.++### `structural_type` classification rubric (decision tree)++Run top-down, first match wins:++1. VOID dominant & `onset_rate ≈ 0` → `void_breath`+2. terminal `hard_stop` + freeze, little after → `hard_stop_freeze`+3. `rolls[]` spans most of the group → `roll_cascade`+4. `energy_level ≥ MEDIUM` & `density == sparse` & `onset_gap_bars ≥ 1.5` → `sustained_hold`+5. `density == dense` & `energy_level == HIGH` & no dominant readable mark → `dense_multiply`+6. onsets present, discrete, each plausibly one reveal → `per_onset_sequential`+7. `SURGE` into a denser phase → `drop_regime_change`+8. none fit cleanly → leave `structural_type: "unclassified"` and flag for a NEW type.++### `mood` (1–3 tags)++`warm` · `dark` · `hype` · `elegant` · `glitch` · `cinematic` · `playful` · `tense` ·+`dreamy` · `aggressive`. Derive from `energy_phases[].feel` (warm/heavy/bright/sparse)++- energy + the Gemini read's genre cues.++### `exit_trigger.type`++`first_onset_reentry` · `hard_stop` · `surge` · `downbeat` · `end`.++### role kinds (used by templates, see template-definition.md)++`message` (readable text) · `background` (field/texture) · `camera` · `asset` ·+`overlay` (grain/vignette/chrome).++### motion verbs (per role; each maps to an L0 primitive or a custom phrase)++`freeze_after_reveal` · `energy_envelope_breath` · `per_onset_pop` · `cascade` ·+`strobe` · `camera_push` · `hold` · `font_shuffle` (cycle typefaces on the beat) ·+`flipbook` (0ms word/glyph swap per 16th over a roll) · `scramble_decode` (scrambled →+locked phrase). Link the L0 id in the template's `uses_primitives`; a verb with no L0 id+is a custom phrase the impl defines.++> **Meta-templates** (a base + a program of beat-synced _operations_, e.g.+> `poster-tile-mosaic`) may declare an `operations` / `engine` block instead of role+> `motion` verbs — see template-definition.md extension fields.++## Self-check++- Every field traces to an `audiomap.json` value or a span of it.+- `structural_type`, `mood`, `exit_trigger.type`, role kinds, motion verbs are all from+ the controlled vocab (or explicitly flagged as a proposed new value).+- `sections[]` (music-read) and the Director's `groups[]` (visual-plan) each tile the whole+ track; every group's `section_id` names an existing section; a section's groups tile its+ `span_sec`.+- The same object validates whether it came from the Music Reader (a section), the Director+ (a group), or a template example.diff --git a/skills/bgm-to-video/references/template-definition.md b/skills/bgm-to-video/references/template-definition.mdnew file mode 100644index 0000000000..d3dbdb8020--- /dev/null+++ b/skills/bgm-to-video/references/template-definition.md@@ -0,0 +1,156 @@+# Template definition — what a Group Template IS++A Group Template is a reverse-engineered, reusable archetype for **one whole group** of+a BGM track. It lives at `templates/<id>/` and has three parts:++```+templates/<id>/+ card.json ← the spec: match-face + build-face (this doc)+ index.html ← the reference implementation (parameterized, asset-free)+ README.md ← human notes + provenance + the source frames+```++A card has **two faces**:++- **match-face** — small, structured, in `GroupSignature` vocab. The Director reads it+ to decide _does this template fit this group?_ Keep it concise (decision: simple).+- **build-face** — richer. Tells the Builder _how to realize it_: roles, fillable+ params, the reference impl, the primitives used, the exit transition.++## `card.json` schema++```jsonc+{+ // ── identity ──+ "id": "held-message-living-field",+ "name": "Held Message / Living Field",+ "one_line": "A readable mark held dead still over a soft, color-shifting blurred field.",+ "status": "draft", // draft (in reverse workspace) → promoted (in catalog)++ // ── MATCH FACE (GroupSignature predicates — see signature-schema.md) ──+ "match": {+ "structural_type": "sustained_hold",+ "requires": {+ // predicates over a group's GroupSignature+ "energy_level": ">=MEDIUM",+ "density": "sparse",+ "onset_gap_bars": ">=1.5",+ "has_steady_grid": true,+ },+ "mood_fit": ["warm", "dark", "elegant", "cinematic"],+ "span_bars": [2, 8], // typical extent+ "exit_trigger": ["first_onset_reentry", "hard_stop"],+ },++ // examples = real reversed groups this template was mined from. Auto-filled from each+ // sample's audiomap. More examples → more trustworthy `requires` thresholds.+ "examples": [+ {+ "sample": "bgm_test_2",+ "group": "g1",+ "bpm": 129.2,+ "energy": 0.8,+ "density": "sparse",+ "onset_gap_bars": 2.05,+ "span_sec": [0.0, 4.017],+ },+ ],++ // ── BUILD FACE ──+ "roles": {+ "message": {+ "kind": "message",+ "motion": "freeze_after_reveal", // reveal on entry, then dead still+ "anchor": "entry.downbeat",+ "notes": "readable ≥ whole span; no per-element motion (there are no onsets)",+ },+ "field": {+ "kind": "background",+ "motion": "energy_envelope_breath", // brightness/chroma track the energy envelope+ "anchor": "energy",+ "notes": "the ONLY thing moving; peaks at the SURGE; settles dark for the hold",+ },+ // optional: "camera", "asset", "overlay"+ },++ "params": {+ // fillable slots = composition-variables in index.html+ "text": { "type": "string", "maps_to": "message.content" },+ "palette": { "type": "object", "keys": ["bg", "colorLow", "colorMid", "colorHigh", "accent"] },+ "flowSpeed": { "type": "number", "default": 1 },+ "duration": { "type": "number", "from": "group.span_sec length" },+ },++ "reference_impl": "index.html",+ "uses_primitives": ["blur_resolve", "negative_space_hold", "chromatic_pressure"],++ // group→group exit. Default fast_cut for everything now (decision #4); the observed+ // transition is recorded for later.+ "transition_out": { "default": "fast_cut", "observed": "anticipation_glitch_cut" },++ // ── provenance ──+ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_1"],+ "created": "fill at promotion time", // scripts can't call Date.now(); stamp by hand+}+```++### Required fields++`id`, `name`, `one_line`, `status`, `match` (`structural_type` + `requires` ++`mood_fit` + `exit_trigger`), `examples[]` (≥1), `roles` (≥1), `params`,+`reference_impl`, `transition_out`, `reversed_from`.++## Rules for each face++**match-face — keep it minimal.**++- `requires` predicates use simple operators: `">=X"`, `"<=X"`, `"==X"`, a literal, or a+ list (any-of). Only constrain fields that actually distinguish this template.+- Don't encode creative taste here — that's the build-face. The match-face answers one+ question: _does this group's signature fit?_++**build-face — whole-group, roles declared separately (decisions #1, #2).**++- One template covers the whole group (background + text together), but every moving+ thing is its own `role` with its own `motion` + `anchor`, so roles can be factored+ into composable role-templates later without rewriting cards.+- Each `role.motion` is a verb from the signature schema; each verb resolves to an L0+ primitive id listed in `uses_primitives` (or a custom phrase the Builder can implement).+- `params` are exactly the composition-variables the reference impl exposes (so the+ Builder fills them by passing `--variables`, no code edit needed for content/palette).++## Reference implementation (`index.html`)++- A HyperFrames composition (one paused GSAP timeline, deterministic, asset-free, passes+ `lint` + `validate`).+- Exposes `params` as `data-composition-variables` (text + palette + speed + duration).+- A template may **bundle local assets** under `assets/` when its look genuinely needs+ them (e.g. `held-text-strobe-burst` ships texture-mask PNGs + a local `gsap.min.js`).+ Local bundled assets are allowed; remote assets / remote fonts are not.++## Extension fields (allowed beyond the required set)++Cards may carry extra fields when a template needs them. Promoted examples use:++- `beat_map` — script-side musical timing constants the impl reads (onset / roll seconds,+ font / flip steps). Content lives in `params`; musical _timing_ lives here.+- `bundled_assets` — a note on what the impl ships under `assets/`.+- `base_template` / `operations` / `engine` / `program_format` / `program_data` —+ **meta-templates**: one base look + a data-driven _program_ of beat-synced operations+ (e.g. `poster-tile-mosaic`). The `program` param is the compose-by-data surface; the+ operator code is fixed. Such a card may omit the standard `roles` motion-verbs.+- `provenance` — the source video / audiomap / video-read the template was reversed from.+- `examples[]` entries may carry extra audio facts (`roll`, `bursts_sec`,+ `downbeats_sec`, …) beyond the required signature fields.++## Status lifecycle++`draft` (produced in the reverse workspace) → reviewed → `promoted` (copied into+`templates/<id>/`, added to the catalog). The Director only matches `promoted` cards.++## Worked example++The catalog ships five promoted templates (`held-message-living-field`,+`typewriter-phrase-keyword-shuffle`, `roll-flipbook-word-cycle`,+`held-text-strobe-burst`, `poster-tile-mosaic`) — each a real reversed group. Read any+`templates/<id>/card.json` for a filled-in reference.diff --git a/skills/bgm-to-video/references/transition-catalog.md b/skills/bgm-to-video/references/transition-catalog.mdnew file mode 100644index 0000000000..b05a5f4f72--- /dev/null+++ b/skills/bgm-to-video/references/transition-catalog.md@@ -0,0 +1,54 @@+# Transition Catalog (group → group)++Transitions between groups are L1 patterns, just like Group Templates. This catalog is+the interface; the Director picks a transition for each group boundary.++> **Decision #4: keep the interface, default EVERYTHING to `fast_cut` for now.** The+> reverse pipeline still _records_ the real observed transition on each template+> (`transition_out.observed`) so we can activate richer ones later — but the Director+> emits `fast_cut` for every boundary until we say otherwise.++## Entry schema++```jsonc+{+ "id": "fast_cut",+ "one_line": "Instant hard cut on the boundary downbeat. 0ms.",+ "anchor": "boundary.downbeat", // which audio moment it lands on+ "duration_ms": 0,+ "mechanism": "tl.set(): kill group A, show group B on the same frame — no tween.",+ "uses_primitives": ["hard_cut"], // L0 ids (bgm-motion-vocabulary.md)+ "status": "active", // active | recorded (known but not yet emitted)+}+```++## Active++### `fast_cut` — DEFAULT for all boundaries++- **Anchor:** the boundary downbeat (the group's `exit_trigger.time`, snapped).+- **Mechanism:** 0ms `tl.set()` — hide group A, reveal group B on the same frame. No+ crossfade, no tween. The cut _is_ the transition.+- **Why default:** zero-asset, never wrong, reads as decisive editing; lets us ship the+ template pipeline before investing in bespoke transitions.+- **Primitives:** `hard_cut`.++## Recorded (known from reverses, NOT emitted yet)++These come out of the reverse pipeline as `transition_out.observed`. Kept here as the+backlog to activate once fast_cut-everything is working.++### `anticipation_glitch_cut` _(observed: group_1 → group_2)_++- A few-frame chromatic/noise glitch on the **pre-beat** (the onset just before the+ boundary downbeat), impact landing on the downbeat. A "spring" that amplifies the+ next group's entrance. Primitives: `chromatic_pressure` + `hard_cut`.+- Status: `recorded`. To activate: add `"status":"active"` and let the Director choose+ it when a boundary's `exit_trigger.type == "first_onset_reentry"`.++## How the Director uses it (target)++For each adjacent group pair, set `transitions[]` entry `{ from, to, transition:+"fast_cut", at: boundary_time }`. Until further notice, `transition` is always+`fast_cut`. A template's `transition_out.observed` is metadata for the future, not an+instruction.diff --git a/skills/bgm-to-video/references/visual-plan-contract.md b/skills/bgm-to-video/references/visual-plan-contract.mdnew file mode 100644index 0000000000..9627e9561f--- /dev/null+++ b/skills/bgm-to-video/references/visual-plan-contract.md@@ -0,0 +1,158 @@+# Visual Plan Contract (template-driven)++The Director writes `visual-plan.json`. It is a build spec, not code. Unlike the+scene-based plan, this one is **group-driven**: the Director **creates the groups** by+subdividing each `music-read.json` section at its `cut_candidates` (catalog-aware — see+director.md), then writes one entry per group, each either bound to a **promoted Group+Template** or **free-composed**, plus the group→group transitions.++## Output shape++```jsonc+{+ "compositionId": "bgm",+ "duration_s": 7.198, // == audiomap.audio.duration_sec, exactly+ "canvas": { "w": 1920, "h": 1080, "fps": 30 },++ // ── brand spine: ONE identity across all groups, so different templates still read+ // as one piece. The Director sets this from the brief's mood. ──+ "style": {+ "name": "warm cinematic recap",+ "mood": "warm / cinematic",+ "palette": ["#040406", "#100a2e", "#d23b5e", "#ffd9c2", "#ffb27a"],+ "font": "system-safe stack or local @font-face",+ "texture": "grain / light-leak",+ },++ // echoed from music-read.json (the source sections + cut_candidates the Director split).+ // Groups that share a section may use DIFFERENT templates — no reuse rule; the brand+ // spine unifies them.+ "sections": [+ {+ "id": "s1",+ "span_sec": [0.0, 7.198],+ "structural_type": "sustained_hold",+ "mood": ["warm", "cinematic"],+ },+ ],++ "groups": [+ {+ "id": "g1",+ "section_id": "s1", // the section this group was cut from+ "span_sec": [0.0, 4.017], // Director-chosen: between cut_candidates (or the whole section), reconciled to the stop rule+ "structural_type": "sustained_hold",+ "mood": ["warm", "cinematic"],++ "templateRef": "held-message-living-field", // a promoted template id, or null++ // params = the template's composition-variables, filled. Keys MUST match the+ // template card's `params`. (Omitted when templateRef is null.)+ "params": {+ "kickerText": "PREVIOUSLY ON",+ "heroText": "DUCKLIFE",+ "palette": {+ "bgColor": "#040406",+ "colorLow": "#100a2e",+ "colorMid": "#d23b5e",+ "colorHigh": "#ffd9c2",+ "accentColor": "#ffb27a",+ },+ "flowSpeed": 1,+ "duration": 4.017,+ },++ // bind each template role to this group's real anchors (absolute audio seconds)+ "role_bindings": {+ "message": { "reveal_at": 0.093, "motion": "freeze_after_reveal" },+ "field": { "drive": "energy_envelope", "surge_at": 1.0 },+ },++ // when templateRef is null, describe the free composition instead (uses L0):+ "free_design": null,+ // e.g. { "dominant_system": "per-onset typography", "layout": "...",+ // "primitives": ["content_swap","scale_punch"], "density_topology": "accumulate" }+ },+ ],++ "transitions": [+ { "from": "g1", "to": "g2", "transition": "fast_cut", "at": 4.017 }, // default fast_cut+ ],++ // the Director owns the words (see Copy rules). Texture vs message decided per item.+ "copy": {+ "headline": "DUCKLIFE",+ "kickers": ["PREVIOUSLY ON"],+ "taglineWords": [],+ "keywords": [],+ "ctaWords": [],+ "logo": null,+ },++ "build_notes": ["one paused GSAP timeline", "no remote assets", "grain over every group"],+ "avoid": ["generic slideshow", "tiny unreadable hero text"],+}+```++Required fields: `compositionId`, `duration_s`, `canvas`, `style`, `groups[]`,+`transitions[]`, `copy`, `build_notes[]`. Echo `sections[]` from music-read for+traceability; each group carries its `section_id`.++## Group rules++- **The Director creates groups by subdividing sections** (director.md): each group's+ `span_sec` runs between chosen `cut_candidates` (or is the whole section), then is+ **reconciled** to the chosen template's stop rule (snap to the nearest AudioMap anchor —+ decision #2). Groups are in audio order; adjacent `span_sec` tile the timeline with no+ gaps/overlaps; the last ends at `duration_s`; no group is < ~1 bar.+- **Each group carries its `section_id`** (the section it was cut from). Groups that share a+ section may use **different templates** — match each independently; cohesion comes from+ the brand spine, not template reuse.+- **Every group is either `templateRef` (a promoted id) or `free_design`** — never both,+ never neither.+- **`params` keys must match the referenced card's `params`** exactly, so the Builder can+ pass them straight to the reference impl's composition-variables.+- **`role_bindings` use real anchor seconds** from this group's slice of the AudioMap, not+ the template's example times.++## Matching (how the Director picks a template — see template-definition.md)++For each group: keep promoted cards where `card.match.structural_type == group.structural_type`+**and** the group's `GroupSignature` satisfies every `card.match.requires` predicate+**and** `mood` overlaps `card.match.mood_fit`. Rank survivors by signature closeness /+example count; take the top. If none survive → `templateRef:null` + `free_design`+(compose from `motion-primitives.md`, one thesis for the group).++## Transitions++One entry per adjacent pair. **`transition` is always `"fast_cut"` for now**+(decision #4) — a 0ms hard cut at `at` (the boundary, = the earlier group's+`exit_trigger` time, snapped). The catalog interface allows richer transitions later; do+not emit them yet.++## Copy rules (Director owns the words)++- Keep any exact words the user supplied; otherwise invent with taste, on the brief's mood.+- **Message vs texture:** a word that must be read holds ≥1 beat, stable and focal; a word+ held <1 beat is texture (strobe/ticks). Never force a message onto a sub-beat.+- Copy fills template `params` (or, for free groups, rides the group's anchors). Do not+ hand-place every word's millisecond — declare the anchor + accumulate/stagger intent and+ leave micro-timing to the Builder.++## Brand spine++One type family, a ≤4–6 swatch palette, ≤2 accents per frame, applied across every group.+Different templates per group are fine — the spine is what unifies them.++## Self-check++- `duration_s == audiomap.audio.duration_sec`; groups tile it exactly; no group < ~1 bar;+ no group boundary lands inside a `rolls[]` run.+- Each group carries a `section_id` present in `sections[]`; its `span_sec` came from that+ section's `cut_candidates` (or is the whole section); groups in one section may use+ different templates.+- Every group resolves to a promoted `templateRef` **or** a `free_design`.+- Every `templateRef` exists under `templates/` and its `match.requires` is satisfied by+ the group's signature.+- `params` keys == the card's `params`; `role_bindings` use real AudioMap seconds.+- One `transitions[]` entry per boundary, all `fast_cut`.diff --git a/skills/bgm-to-video/scripts/analyze-beatgrid.py b/skills/bgm-to-video/scripts/analyze-beatgrid.pynew file mode 100644index 0000000000..6205ed7bd7--- /dev/null+++ b/skills/bgm-to-video/scripts/analyze-beatgrid.py@@ -0,0 +1,531 @@+#!/usr/bin/env python3+"""Beat-grid + drum/event analysis engine for bgm-to-video (Brain A).++Turns a BGM track directly into a deterministic `audiomap.json` — the music skeleton+that the Director and Builder hang visuals on. It merges:++ - a reliable tempo + beat grid + downbeat (librosa beat tracker),+ - metrical position per event (strong / weak / syncopated / off-grid) over a 16th-note bar grid,+ - drum-element classification (kick / snare / hihat / perc) via band-split,+ - special audio events (riser / glitch / crash-impact / hard-stop silence),+ - an energy narrative (audio-driven energy phases + builds + key moments; the Music+ Reader names the sections — no fixed Intro/Build/Drop/Outro template),+ - a phrase layer + per-section density budgets for visual planning.++Output is the canonical `audiomap.json` documented in the skill.++Usage:+ python3 analyze-beatgrid.py track.mp3 -o audiomap.json+ python3 analyze-beatgrid.py track.mp3 --print # also print a readable brief++Deps: ffmpeg/ffprobe on PATH + librosa, numpy, soundfile (band-split heuristics,+no learned models / no madmom).+"""++from __future__ import annotations++import argparse+import json+import subprocess+import sys+import tempfile+from pathlib import Path++import librosa+import numpy as np+import soundfile as sf++SR = 22050+HOP = 512 # ~23 ms frames+AUDIOMAP_VERSION = 2+++# ── decode ────────────────────────────────────────────────────────────────+def load_audio(path: str) -> tuple[np.ndarray, int, float]:+ """Decode any ffmpeg-readable file to mono float32 @ SR via a temp wav."""+ with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as tmp:+ wav = tmp.name+ subprocess.run(+ ["ffmpeg", "-y", "-i", path, "-ac", "1", "-ar", str(SR), wav],+ capture_output=True, check=True,+ )+ y, sr = sf.read(wav, dtype="float32")+ Path(wav).unlink(missing_ok=True)+ if y.ndim > 1:+ y = y.mean(axis=1)+ return y, sr, len(y) / sr+++# ── tempo + beat grid + downbeat phase ──────────────────────────────────────+def beat_grid(y: np.ndarray, sr: int) -> dict:+ tempo, beat_frames = librosa.beat.beat_track(y=y, sr=sr, hop_length=HOP, units="frames")+ beats = librosa.frames_to_time(beat_frames, sr=sr, hop_length=HOP)+ return {"bpm": float(np.atleast_1d(tempo)[0]), "beats": beats, "beat_frames": beat_frames}+++def _norm_flux(band: np.ndarray) -> np.ndarray:+ """Positive first-difference (onset flux) of a band-energy curve, normalized."""+ flux = np.maximum(0.0, np.diff(np.sqrt(band), prepend=band[:1]))+ return flux / (flux.max() + 1e-9)+++def band_energy_curves(y: np.ndarray, sr: int) -> dict:+ """Per-frame band energy + per-band normalized onset flux (for drum typing)."""+ S = np.abs(librosa.stft(y, hop_length=HOP)) ** 2+ freqs = librosa.fft_frequencies(sr=sr)+ # Tight drum bands: kick fundamental, snare body, hihat sizzle. Narrow bands+ # keep one drum's transient from leaking into another's flux on a full mix.+ low = (freqs < 150) # kick+ mid = (freqs >= 150) & (freqs < 900) # snare body+ high = (freqs >= 5000) # hihat / cymbal+ e_low, e_mid, e_high = S[low].sum(axis=0), S[mid].sum(axis=0), S[high].sum(axis=0)+ return {+ "S": S,+ "low": e_low, "mid": e_mid, "high": e_high,+ "total": S.sum(axis=0) + 1e-9,+ "flux_low": _norm_flux(e_low), "flux_mid": _norm_flux(e_mid), "flux_high": _norm_flux(e_high),+ "flatness": librosa.feature.spectral_flatness(S=np.sqrt(S))[0],+ "centroid": librosa.feature.spectral_centroid(S=np.sqrt(S), sr=sr)[0],+ "n": S.shape[1],+ }+++def downbeat_phase(beat_frames: np.ndarray, bc: dict, beats_per_bar: int = 4) -> int:+ """Pick the bar phase whose beats carry the most KICK (low-band) energy."""+ kick = bc["low"] / bc["total"]+ best_p, best_score = 0, -1.0+ for p in range(beats_per_bar):+ idx = [bf for i, bf in enumerate(beat_frames) if (i - p) % beats_per_bar == 0]+ idx = [min(f, bc["n"] - 1) for f in idx]+ score = float(np.sum([kick[f] for f in idx])) if idx else 0.0+ if score > best_score:+ best_p, best_score = p, score+ return best_p+++# ── metrical position: strong / weak / syncopated / off-grid ─────────────────+# 16-step bar grid (4 beats x 4 sixteenths). Strength by metrical weight.+GRID_CLASS = {0: "strong", 8: "strong", 4: "weak", 12: "weak",+ 2: "weak", 6: "weak", 10: "weak", 14: "weak"} # else (odd 16ths) -> syncopated+++def classify_metric(t: float, beats: np.ndarray, phase: int, bpb: int = 4) -> tuple:+ """Return (grid_class, bar, beat_in_bar, step16) for a time t."""+ if len(beats) < 2:+ return "off-grid", -1, -1, -1+ i = int(np.searchsorted(beats, t) - 1)+ i = max(0, min(i, len(beats) - 2))+ beat_dur = beats[i + 1] - beats[i]+ frac = (t - beats[i]) / max(beat_dur, 1e-6) # 0..1 within the beat+ sixteenth = int(round(frac * 4)) % 4 # nearest 16th in beat+ carry = 1 if round(frac * 4) >= 4 else 0+ beat_idx = i + carry+ beat_in_bar = (beat_idx - phase) % bpb # 0..3+ bar = (beat_idx - phase) // bpb+ step16 = beat_in_bar * 4 + sixteenth # 0..15+ # distance to the nearest 16th line (in seconds) → off-grid test+ nearest = beats[i] + (round(frac * 4) / 4) * beat_dur+ if abs(t - nearest) > 0.5 * (beat_dur / 4):+ return "off-grid", bar, beat_in_bar + 1, step16+ return GRID_CLASS.get(step16, "syncopated"), bar, beat_in_bar + 1, step16+++# ── drum classification (band-split heuristic) ──────────────────────────────+def frame_at(t: float, sr: int, n: int) -> int:+ return min(int(round(t * sr / HOP)), n - 1)+++def classify_drum(t: float, bc: dict, sr: int) -> tuple:+ """(drum_type, energy_norm, feel): which band's onset TRANSIENT dominates.++ Uses per-band normalized flux (relative transient strength), the standard+ way to separate kick (low) / snare (mid+noise) / hihat (high). Falls back to+ glitch for noisy non-harmonic bursts and perc when no band clearly leads.+ """+ f = frame_at(t, sr, bc["n"])+ win = slice(max(0, f - 1), min(bc["n"], f + 2))+ fl = float(bc["flux_low"][win].max())+ fm = float(bc["flux_mid"][win].max())+ fh = float(bc["flux_high"][win].max())+ lo = float(bc["low"][win].mean()); md = float(bc["mid"][win].mean())+ hi = float(bc["high"][win].mean()); tot = float(bc["total"][win].mean())+ flat = float(bc["flatness"][win].mean())+ lr, mr, hr = lo / tot, md / tot, hi / tot++ fluxes = {"kick": fl, "snare": fm, "hihat": fh}+ lead = max(fluxes, key=fluxes.get)+ lead_val = fluxes[lead]+ if lead_val < 0.06: # no real transient → texture/perc+ drum = "glitch" if flat > 0.30 else "perc"+ elif lead == "snare" and flat > 0.30 and mr < 0.30:+ drum = "glitch" # mid-band but noisy & thin → scratch/glitch+ else:+ drum = lead+ # feel (frequency character)+ has_bot, has_top, has_mid = lr > 0.30, hr > 0.20, mr > 0.30+ feel = ("full" if has_bot and has_top and has_mid else+ "heavy" if has_bot and not has_top else+ "bright" if has_top and not has_bot else+ "intimate" if has_mid else "sparse")+ return drum, tot, feel+++# ── energy structure (RMS @1s) + sections + key moments + builds ────────────+def energy_structure(y: np.ndarray, sr: int, dur: float, first_onset: float = 0.0) -> dict:+ rms = librosa.feature.rms(y=y, hop_length=sr)[0] # ~1s frames+ rms = rms / (rms.max() + 1e-9)+ norms = rms.tolist()++ def lvl(n):+ return "VOID" if n < 0.2 else "LOW" if n < 0.4 else "MEDIUM" if n < 0.65 else "HIGH"++ phases, cur, cs = [], None, 0+ for i, n in enumerate(norms):+ l = lvl(n)+ if l != cur:+ if cur:+ phases.append({"s": cs, "e": i, "lvl": cur})+ cur, cs = l, i+ if cur:+ phases.append({"s": cs, "e": len(norms), "lvl": cur})++ moments = []+ for i in range(1, len(norms)):+ d = norms[i] - norms[i - 1]+ if abs(d) > 0.12:+ moments.append({"t": i, "kind": "DROP" if d < 0 else "SURGE", "delta": round(d, 2)})+ moments.sort(key=lambda m: abs(m["delta"]), reverse=True)++ # hard stop: a HIGH→low cliff (a sudden stop) in the back third+ hard_stops = [m for m in moments if m["kind"] == "DROP" and m["t"] > dur * 0.6 and m["delta"] < -0.25]++ # NO forced Intro/Build/Drop/Outro template. The energy phases (audio-driven runs of+ # one energy level, variable count) are the raw structural blocks. The Music Reader+ # (LLM) decides the actual sections — count, boundaries, and free-form names — from+ # these phases + key_moments + rolls + hard_stops + phrases. Sections are+ # interpretation; only the timing they snap to is fact.+ phases_sec = []+ for p in phases:+ seg = norms[p["s"]:max(p["s"] + 1, p["e"])]+ phases_sec.append({+ "start": float(p["s"]),+ "end": float(min(p["e"], round(dur, 1))),+ "level": p["lvl"],+ "energy": round(float(np.mean(seg)) if seg else 0.0, 2),+ })++ return {"norms": [round(n, 2) for n in norms], "phases": phases_sec,+ "moments": moments[:8], "hard_stops": hard_stops}+++# ── rolls / fills (localized rapid-onset runs) ───────────────────────────────+# A roll is where choreography should switch from discrete hits to a continuous /+# cascading visual (per-letter cascade, stagger). Derived straight from the onset+# stream — runs never overlap, so no dedup is needed (unlike a band-energy detector).+ROLL_MIN_HITS = 4+ROLL_CONT = 0.55 # × beat_dur: gap up to ~half a beat still keeps a run alive+ROLL_ACCEPT = 0.42 # × beat_dur: mean spacing denser than an 8th note counts+ROLL_DEDUP = 0.08 # seconds: merge onsets closer than a 32nd (double-trigger)+++def detect_rolls(events: list, beat_dur: float) -> list:+ """Runs of >=4 onsets whose MEAN spacing is denser than an 8th note. Tuned so a+ full hihat/snare roll is captured as ONE span (not fragmented down to its tail),+ while a sparse groove stays out — validated against the golden 7.5-9.5s roll.+ The linear scan means runs never overlap (no LEGACY-style double-counting)."""+ cont = beat_dur * ROLL_CONT # max gap that keeps a run alive+ accept = beat_dur * ROLL_ACCEPT # max MEAN gap for a run to count+ # collapse onset double-triggers (two onsets < a 32nd apart = one hit) so a+ # held/sparse passage can't masquerade as a roll on a duplicated transient.+ ev = []+ for e in events:+ if ev and e["t"] - ev[-1]["t"] <= ROLL_DEDUP:+ if e.get("energy", 0) > ev[-1].get("energy", 0):+ ev[-1] = e+ continue+ ev.append(e)+ times = [e["t"] for e in ev]+ n = len(times)+ rolls, i = [], 0+ while i < n - 1:+ j = i+ while j + 1 < n and (times[j + 1] - times[j]) <= cont:+ j += 1+ if j - i + 1 >= ROLL_MIN_HITS:+ gaps = [times[k + 1] - times[k] for k in range(i, j)]+ if sum(gaps) / len(gaps) <= accept:+ t0, t1 = times[i], times[j]+ half = len(gaps) // 2+ accel = (half >= 1 and+ sum(gaps[half:]) / (len(gaps) - half) <+ sum(gaps[:half]) / half * 0.85)+ dcount: dict[str, int] = {}+ for e in ev[i:j + 1]:+ dcount[e["drum"]] = dcount.get(e["drum"], 0) + 1+ rolls.append({+ "start": round(t0, 3), "end": round(t1, 3),+ "dur_sec": round(t1 - t0, 3),+ "hits": j - i + 1,+ "rate_per_min": round((j - i) / max(t1 - t0, 1e-6) * 60),+ "kind": "accel-roll" if accel else ("sustained-fill" if t1 - t0 > 1.2 else "fill"),+ "drum": max(dcount, key=dcount.get),+ })+ i = j + 1+ return rolls+++# ── per-section spectral character (sustained "feel") ────────────────────────+# Coarse, reliable bands for how a SECTION sounds (not the noisy per-second dump).+# Distinct from a per-event `feel`, which is the transient color of a single hit.+FEEL_BANDS = [("sub", 0, 60), ("bass", 60, 250), ("low_mid", 250, 800),+ ("mid", 800, 2500), ("presence", 2500, 6000), ("air", 6000, 1e9)]+++def annotate_section_feel(bc: dict, sr: int, sections: list) -> None:+ """Attach {character, bands} to each energy phase from its sustained band balance."""+ S, n = bc["S"], bc["n"]+ freqs = librosa.fft_frequencies(sr=sr)+ fps = sr / HOP+ masks = [(name, (freqs >= lo) & (freqs < hi)) for name, lo, hi in FEEL_BANDS]+ for s in sections:+ f0 = int(s["start"] * fps)+ f1 = min(max(f0 + 1, int(s["end"] * fps)), n)+ seg = S[:, f0:f1]+ if seg.shape[1] == 0 or s.get("energy", 0) < 0.15:+ s["feel"] = {"character": "sparse", "bands": []}+ continue+ en = {name: float(seg[m].sum()) for name, m in masks}+ tot = sum(en.values()) + 1e-9+ ratios = {name: en[name] / tot for name in en}+ present = sorted([bn for bn, r in ratios.items() if r > 0.12],+ key=lambda bn: -ratios[bn])+ lo = ratios["sub"] + ratios["bass"]+ hi = ratios["presence"] + ratios["air"]+ mid = ratios["low_mid"] + ratios["mid"]+ char = ("heavy" if lo > 0.5 else "bright" if hi > 0.45 else+ "full" if lo > 0.25 and hi > 0.25 else+ "warm" if mid > 0.5 else "sparse")+ s["feel"] = {"character": char, "bands": present}+++# ── audiomap enrichment: phrase layer + section density budgets ─────────────+def round3(n: float) -> float:+ return round(float(n), 3)+++def derive_phrases(downbeats: list[float], phrase_bars: int, duration_sec: float) -> list:+ """Group downbeats into phrase spans of `phrase_bars` bars."""+ phrases = []+ if not downbeats:+ return phrases+ index = 0+ for i in range(0, len(downbeats), phrase_bars):+ start = downbeats[i]+ next_idx = i + phrase_bars+ end = downbeats[next_idx] if next_idx < len(downbeats) else duration_sec+ phrases.append({+ "index": index,+ "start": round3(start),+ "end": round3(end),+ "bars": min(phrase_bars, len(downbeats) - i),+ })+ index += 1+ return phrases+++def count_in(times: list[float], start: float, end: float) -> int:+ return sum(1 for t in times if t >= start - 1e-6 and t < end - 1e-6)+++def derive_phase_budgets(timeline: dict) -> list:+ """Attach an objective density read to each energy phase.++ Density is a fact (onsets-per-second + rolls). It is a hint for how much visual+ content a span can hold; it does not set timing or sections. The Music Reader uses+ these phases to decide the actual sections.+ """+ phases = timeline.get("energy_phases", [])+ onset_times = [e["t"] for e in timeline.get("events", [])]+ rolls = timeline.get("rolls", [])+ hard_stops = timeline.get("hard_stops", [])++ out = []+ for s in phases:+ span = max(1e-6, float(s.get("end", 0)) - float(s.get("start", 0)))+ onsets = count_in(onset_times, s["start"], s["end"])+ ph_rolls = [+ {"start": r["start"], "end": r["end"], "kind": r["kind"], "drum": r["drum"]}+ for r in rolls+ if r["start"] < s["end"] - 1e-6 and r["end"] > s["start"] + 1e-6+ ]+ ph_stops = [+ h["t"]+ for h in hard_stops+ if h["t"] >= s["start"] - 1e-6 and h["t"] < s["end"] + 1e-6+ ]++ if s.get("energy", 0) < 0.2 or onsets < 6:+ density = "sparse"+ elif onsets >= 18 or ph_rolls:+ density = "dense"+ else:+ density = "medium"++ enriched = dict(s)+ enriched["onsets"] = onsets+ enriched["onsetRate"] = round(onsets / span, 1)+ enriched["rolls"] = ph_rolls+ enriched["hardStops"] = ph_stops+ enriched["density"] = density+ out.append(enriched)+ return out+++def finalize_audiomap(timeline: dict, phrase_bars: int = 4) -> dict:+ downbeats = timeline.get("grid", {}).get("downbeats_sec", [])+ duration_sec = timeline.get("audio", {}).get("duration_sec", 0)+ energy_phases = derive_phase_budgets(timeline)+ phrases = derive_phrases(downbeats, phrase_bars, duration_sec)+ return {+ "version": AUDIOMAP_VERSION,+ "phraseBars": phrase_bars,+ **timeline,+ "energy_phases": energy_phases,+ "phrases": phrases,+ }+++# ── main ────────────────────────────────────────────────────────────────────+def analyze(path: str, phrase_bars: int = 4) -> dict:+ y, sr, dur = load_audio(path)+ bg = beat_grid(y, sr)+ bc = band_energy_curves(y, sr)+ phase = downbeat_phase(bg["beat_frames"], bc)+ beats = bg["beats"]+ downbeats = [float(beats[i]) for i in range(len(beats)) if (i - phase) % 4 == 0]++ # onsets → events+ onset_t = librosa.onset.onset_detect(+ y=y, sr=sr, hop_length=HOP, units="time", backtrack=True+ )+ en_at = bc["total"]+ en_max = float(en_at.max()) + 1e-9+ events = []+ for t in onset_t:+ gclass, bar, bib, step16 = classify_metric(float(t), beats, phase)+ drum, energy, feel = classify_drum(float(t), bc, sr)+ f = frame_at(float(t), sr, bc["n"])+ events.append({+ "t": round(float(t), 3),+ "bar": int(bar), "beat_in_bar": int(bib), "step16": int(step16),+ "grid": gclass, "drum": drum,+ "energy": round(float(en_at[f]) / en_max, 2), "feel": feel,+ "special": None,+ })++ first_onset = next((float(t) for t in onset_t if t >= 2.0), 0.0)+ es = energy_structure(y, sr, dur, first_onset)++ # tag specials onto nearby events+ for hs in es["hard_stops"]:+ for e in events:+ if abs(e["t"] - hs["t"]) < 0.6:+ e["special"] = "hard_stop"+ # riser: events inside a 1.5s+ rising-energy run that precedes a SURGE+ surges = [m["t"] for m in es["moments"] if m["kind"] == "SURGE"]+ for st in surges:+ for e in events:+ if st - 2.0 <= e["t"] < st and e["special"] is None and e["drum"] in ("perc", "glitch"):+ e["special"] = "riser"++ # rolls / fills + whether each leads straight into a surge/drop (cascade cue)+ beat_dur = float(np.median(np.diff(beats))) if len(beats) > 1 else 60.0 / max(bg["bpm"], 1e-6)+ rolls = detect_rolls(events, beat_dur)+ for r in rolls:+ r["leads_to"] = next((m["kind"] for m in es["moments"]+ if 0 <= m["t"] - r["end"] <= 1.2), None)+ # near-silent windows (= VOID energy phases) — convenience for "hold / breathe"+ silences = [{"start": p["start"], "end": p["end"]}+ for p in es["phases"] if p["level"] == "VOID"]+ # per-phase sustained spectral character (how each energy block FEELS)+ annotate_section_feel(bc, sr, es["phases"])++ n_drum = {}+ for e in events:+ n_drum[e["drum"]] = n_drum.get(e["drum"], 0) + 1+ n_grid = {}+ for e in events:+ n_grid[e["grid"]] = n_grid.get(e["grid"], 0) + 1++ summary = (f"{bg['bpm']:.0f} BPM · {len(beats)} beats / {len(downbeats)} bars · "+ f"{len(events)} events ({n_drum}) · {len(rolls)} rolls · "+ f"{len(es['phases'])} energy phases · {dur:.1f}s")++ timeline = {+ "summary": summary,+ "audio": {"path": path, "duration_sec": round(dur, 3), "sr": sr},+ "tempo": {"bpm": round(bg["bpm"], 1), "beats_per_bar": 4,+ "downbeat_phase": phase, "n_beats": len(beats), "n_bars": len(downbeats)},+ "grid": {"beats_sec": [round(float(b), 3) for b in beats],+ "downbeats_sec": [round(b, 3) for b in downbeats]},+ "energy_phases": es["phases"],+ "key_moments": es["moments"],+ "hard_stops": es["hard_stops"],+ "rolls": rolls,+ "silences": silences,+ "stats": {"drum_counts": n_drum, "grid_counts": n_grid},+ "events": events,+ }+ return finalize_audiomap(timeline, phrase_bars)+++def print_brief(d: dict) -> None:+ print(f"\n{d['summary']}\n{'='*70}")+ print("ENERGY PHASES (audio-driven blocks; the Music Reader names the sections)")+ for s in d.get("energy_phases", []):+ feel = s.get("feel", {})+ bands = ",".join(feel.get("bands", []))+ print(f" {s['start']:5.1f}-{s['end']:5.1f}s {s.get('level', ''):6s} energy={s.get('energy')} "+ f"{feel.get('character', ''):6s} [{bands}] {s.get('density', '?')}")+ print("PHRASES")+ for p in d.get("phrases", []):+ print(f" #{p['index']} {p['start']:5.2f}-{p['end']:5.2f}s bars={p['bars']}")+ print("KEY MOMENTS")+ for m in d["key_moments"]:+ print(f" {m['t']:3d}s {m['kind']:5s} Δ{m['delta']:+.2f}")+ print(f"HARD STOPS: {[h['t'] for h in d['hard_stops']]}")+ print("ROLLS / FILLS")+ for r in d.get("rolls", []):+ lead = f" → {r['leads_to']}" if r.get("leads_to") else ""+ print(f" {r['start']:6.2f}-{r['end']:5.2f}s {r['hits']:2d} hits @ {r['rate_per_min']:4d}/min "+ f"{r['kind']:10s} ({r['drum']}){lead}")+ print(f"SILENCES: {[(s['start'], s['end']) for s in d.get('silences', [])]}")+ print(f"DRUM COUNTS: {d['stats']['drum_counts']} GRID: {d['stats']['grid_counts']}")+ print(f"\nEVENTS ({len(d['events'])}) [t · bar:beat · grid · drum · energy · special]")+ for e in d["events"]:+ sp = f" <{e['special']}>" if e["special"] else ""+ print(f" {e['t']:6.2f}s b{e['bar']}:{e['beat_in_bar']} {e['grid']:3s} "+ f"{e['drum']:6s} e={e['energy']:.2f} {e['feel']:8s}{sp}")+++def main() -> None:+ ap = argparse.ArgumentParser()+ ap.add_argument("audio")+ ap.add_argument("-o", "--out", default=None)+ ap.add_argument("--phrase-bars", type=int, default=4)+ ap.add_argument("--print", action="store_true", dest="do_print")+ a = ap.parse_args()+ d = analyze(a.audio, phrase_bars=a.phrase_bars)+ if a.out:+ Path(a.out).write_text(json.dumps(d, ensure_ascii=False, indent=2))+ dens = " ".join(f"{s.get('level', '?')}:{s.get('density', '?')}" for s in d.get("energy_phases", []))+ print(+ f"[analyze-beatgrid] wrote audiomap {a.out} · {len(d.get('energy_phases', []))} phases · density [{dens}]",+ file=sys.stderr,+ )+ if a.do_print or not a.out:+ print_brief(d)+++if __name__ == "__main__":+ main()diff --git a/skills/bgm-to-video/templates/card-flyby/README.md b/skills/bgm-to-video/templates/card-flyby/README.mdnew file mode 100644index 0000000000..58503e870d--- /dev/null+++ b/skills/bgm-to-video/templates/card-flyby/README.md@@ -0,0 +1,128 @@+# Card Flyby · accelerating 3D deck cascade — `card-flyby`++A depth column of **N cards** rolls **forward** through perspective. On each landing+beat the next card **tumbles up into the front slot** and **wipes in** its solid colored+face (angled clip-path), the previous front card **tumbles forward + falls toward the+camera** on exit, and the cards behind **advance one slot**. Dwells **shrink card-to-card**,+so the deck reads as an **accelerating rush** into a **held final card**.++> **Origin — sandbox, not a golden-sample reverse.** Unlike the other catalog templates,+> this one was authored from the **`card-flyby` sandbox** composition (a Shader-Deck-style+> flyby), so there is **no source `audiomap.json` / Gemini read**. The match-face is a+> **hypothesis** about which music the look fits, and `card.json → examples[].synthetic`+> flags its cadence as design-intent. The first time this template is matched to a real+> reversed group, add that group as a real `examples[]` entry and tighten `requires`.++## Files++```+card-flyby/+ card.json ← the spec (match-face + build-face) · status: promoted+ index.html ← reference impl (parameterized GSAP; data-driven deck)+ program.json ← the default 6-card deck + landing schedule (standalone, editable)+ assets/gsap.min.js ← bundled GSAP (offline-safe)+ renders/recreate.mp4 ← rendered proof @30fps (the default deck)+```++No fonts are bundled — the look uses a system grotesque stack (`"Inter", "Helvetica+Neue", Arial`). The original sandbox pulled Inter from Google Fonts + GSAP from a CDN+and used a grab-bag of clashing per-card hexes; this promoted impl **drops the remote+deps** (offline), makes the formerly-hardcoded deck **data-driven**, and replaces the+ad-hoc colors with a cohesive **`theme` palette system**.++## How it moves++The scene carries a **static yaw** (side tilt); the cards' own **`rotateX`** drives the+tumble. Depth comes from **perspective (Z translation)** plus aggressive `rotateX` on the+cards behind — the rear card lies almost flat (~84°), each step closer rotates more+upright, the front card is level (0°) and face-on. On exit a card continues _past_+upright into a face-down tumble (`rotX → -88°`) while dropping down + toward the lens.++| slot | role | rotX | what it is |+| --------- | ------- | ------- | ------------------------------------------------------- |+| `far` | back | 84° | a card just entered the column (invisible, opacity 0) |+| `s3`→`s1` | depth | 66°→22° | the rolling-forward column (opacity ramps in) |+| `s0` | front | 0° | upright, face-on — **wipes in its solid face here** |+| `exit` | leaving | −88° | tumbles forward + falls down + toward camera, fades out |++A card's pose is a pure function of how many slots it sits **behind the current front+card** (`poseForRel(rel)`), so the column stays correctly depth-sorted and **any card+count just works** (z-index is set instantly at each swap — CSS can't depth-sort+non-intersecting planes). The default deck is 6 cards over 6.0s.++## Timing (`beat_map` in `card.json` / `landings`)++Content lives in `cards`; musical **timing** lives in `landings` — **one beat per card**,+absolute audio seconds. The default schedule `[0.40, 1.70, 2.70, 3.45, 4.00, 4.40]`+**accelerates** (gaps `1.30 → 1.00 → 0.75 → 0.55 → 0.40`); the final card lands early+enough to hold ~1.6s before the cut. Each landing tween **leads its beat** by its own+duration (`dur_i = clamp(0.32 · gap_into_i, 0.12, 0.42)`) so the card arrives _on_ the+hit; the face wipe runs over the last ~85% of that window.++Omit `landings` and an accelerating schedule is **auto-derived** from the card count ++duration (geometric ~0.78× gap decay) — so a 3- or 9-card deck cascades correctly with+no hand timing.++## Themes (the look knob)++`theme` picks a **cohesive palette** — one temperature/saturation family, so any card+count reads as a _designed_ set (the deck cycles the ramp in order; each face also gets a+gentle top→bottom tonal gradient for depth). White-on-card stays AA at the card type+sizes. Set `theme` and you have a whole new look in one knob.++| `theme` | family |+| -------------------- | --------------------------------------------------------------------- |+| `aurora` _(default)_ | cool jewel arc — teal → ocean → indigo → violet → plum, on blue-black |+| `ember` | warm sunset arc — wine → brick → rust → amber → ochre → bronze |+| `mono` | sleek monochrome blue staircase (dark → mid) |+| `slate` | muted cool slate-grays — understated / editorial |++Add a palette by appending to the `THEMES` table in `index.html` (`bg` + `ink` + a+`colors[]` ramp).++## Parameters (swap freely)++- `theme` — palette preset: `aurora` | `ember` | `mono` | `slate` (default `aurora`).+- `bgColor` — override the radial field base. Empty → the theme's bg.+- `cards` — **JSON array** of `{ title, color? }`; `title` is the big centered hero (the+ only copy on each card). Its length sets the deck depth. `color` is **optional** — omit+ it and the card takes the next color from the theme ramp (cohesive by default); set it+ to override one card. Empty → the built-in 6-card demo deck. (See `program.json`.)+- `landings` — **JSON array** of land beats (abs seconds), one per card. Empty → derived.+- `yaw` — static scene side-tilt in degrees (default `−12`; `0` = face-on).++Fill them with `--variables` (read inside the comp via `window.__hyperframes.getVariables()`):++```bash+npx hyperframes render card-flyby -f 30 --strict-variables \+ --variables '{"theme":"ember","cards":"[{\"title\":\"BLACKOUT\"},{\"title\":\"THE HEIST\"}]","yaw":-8}'+```++## Match (when the Director should reach for it)++`structural_type: per_onset_sequential` — a **stream of discrete onsets that+accelerate** (a build into a downbeat) where you want to flash a **sequence of whole+cards** (titles / projects / posters / video tiles), one per hit, climaxing on a held+card. Discriminated from the typewriter / logo-sting `per_onset_sequential` templates by+revealing **whole cards** (not letters/words of one message) and by the **accelerating+cadence**. Put the card you want held longest on the strongest final hit. If the grid+goes quiet (`onset_gap_bars ≥ ~1.5`) this is the wrong template — use a hold template.++> Candidate finer `structural_type`: an `accel-roll` flavor of `roll_cascade` (the+> shrinking-dwell build) — flagged in `card.json` for catalog review, not yet a vocab+> value. Proposed motion verbs `deck_advance` / `wipe_reveal` / `tumble_fall` are+> likewise flagged.++## Verify++```bash+npx hyperframes lint card-flyby # clean (1 inherent window.__timelines note)+npx hyperframes validate card-flyby # no console errors · text passes WCAG AA+npx hyperframes render card-flyby -f 30+```++## Status++`promoted` — in the catalog, matchable by the Director. Because it is sandbox-origin (no+golden-sample provenance), the next reviewer pass should attach a **real reversed group**+as an `examples[]` entry and tighten `match.requires` against it.diff --git a/skills/bgm-to-video/templates/card-flyby/assets/gsap.min.js b/skills/bgm-to-video/templates/card-flyby/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/card-flyby/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/card-flyby/card.json b/skills/bgm-to-video/templates/card-flyby/card.jsonnew file mode 100644index 0000000000..e6a62a4628--- /dev/null+++ b/skills/bgm-to-video/templates/card-flyby/card.json@@ -0,0 +1,158 @@+{+ "id": "card-flyby",+ "name": "Card Flyby · accelerating 3D deck cascade",+ "one_line": "A depth column of N cards rolls forward through perspective: on each landing beat the next card tumbles up into the front slot and WIPES in its solid colored face (angled clip-path), the previous front card tumbles forward + falls toward the camera on exit, and the cards behind advance one slot — dwells shrink card-to-card so the deck reads as an accelerating rush into a held final card.",+ "status": "promoted",+ "created": "2026-06-17",++ "base_template": {+ "primitive": "depth_card_column",+ "notes": "A 3D deck of N cards stacked in a perspective depth column (slots s0=front … s3 + far=back, plus an exit pose). Each card is a CSS wireframe (always present, opacity tracks its slot) over a solid face — a gentle top→bottom tonal gradient (--c1/--c2) — revealed by an angled clip-path wipe (--wipe 0→1). The scene carries a static yaw; the cards' own rotateX drives the tumble. N is DATA (the `cards` array) — the slot engine is rel-based (a card's pose is a pure function of how many slots it sits behind the current front card), so 3 / 6 / 9 cards all 'just work'. COLOR is a `theme` (a cohesive palette ramp cycled across the deck), per-card overridable. Asset-free: wireframe + solid cards + system type, bundled GSAP."+ },++ "themes": {+ "_": "Cohesive palette presets (the `theme` param). Each is ONE temperature/saturation family so any card count reads as a designed set — the deck cycles the ramp in order. White-on-card stays AA at the card type sizes. Per-card `color` still overrides.",+ "aurora": "cool jewel arc — teal → ocean → indigo → violet → plum, on blue-black (DEFAULT)",+ "ember": "warm sunset arc — wine → brick → rust → amber → ochre → bronze, on warm near-black",+ "mono": "sleek monochrome blue staircase (dark → mid), on blue-black",+ "slate": "muted cool slate-grays — understated / editorial, on cool charcoal"+ },++ "match": {+ "structural_type": "per_onset_sequential",+ "requires": {+ "energy_level": ">=MEDIUM",+ "has_steady_grid": true,+ "density": ["medium", "dense"],+ "onset_gap_bars": "<1.0"+ },+ "mood_fit": ["hype", "bold", "elegant", "cinematic", "playful"],+ "span_bars": [2, 6],+ "exit_trigger": ["surge", "downbeat", "hard_stop", "end"],+ "notes": "Reach for this when a section has a STREAM of discrete onsets that ACCELERATE (gaps shrinking / a build into a downbeat) and you want to flash a SEQUENCE of items — a deck of titles, projects, posters, video tiles — one per hit, climaxing on a held card. Each card lands on one onset (per_onset_sequential), so it shares the structural_type with the typewriter / logo-sting templates; it is discriminated by being a SEQUENCE OF WHOLE CARDS (not letters/words of one message) and by the accelerating cadence. The strongest hit (final downbeat / surge) should carry the card you want held longest. Candidate finer type: an `accel-roll` flavor of `roll_cascade` (the shrinking-dwell build) — flagged for catalog review, not yet a vocab value. If the grid goes quiet (onset_gap_bars >= ~1.5) this is the wrong template — use a hold template."+ },++ "examples": [+ {+ "sample": "sandbox",+ "group": "card-flyby-sandbox",+ "synthetic": true,+ "structural_type": "per_onset_sequential",+ "energy_level": "HIGH",+ "density": "dense",+ "cards": 6,+ "span_sec": [0.0, 6.0],+ "landings_sec": [0.4, 1.7, 2.7, 3.45, 4.0, 4.4],+ "landing_gaps_sec": [1.3, 1.0, 0.75, 0.55, 0.4],+ "cadence": "accelerating (gaps shrink ~0.78× each card); final card holds ~1.6s",+ "exit_trigger": { "type": "end", "time": 6.0 },+ "note": "NOT reversed from a golden sample. This template was authored from the `card-flyby` SANDBOX composition (a Shader-Deck-style flyby), so these audio facts are the DESIGN-INTENT cadence (the hand-tuned landing schedule), not values derived from an `audiomap.json`. When this template is matched to a real group, `landings` is bound from that group's onset times (one per card) and the schedule re-derives — see beat_map."+ }+ ],++ "roles": {+ "deck_card": {+ "kind": "asset",+ "motion": "deck_advance",+ "anchor": "landings[]",+ "notes": "Each of the N cards. On every landing beat the whole column advances one slot toward the front (far→s3→s2→s1→s0). A card's pose is a pure function of its slot-distance behind the front card (rel), so the deck stays correctly depth-sorted for any N. PROPOSED verb 'deck_advance' (per-onset one-slot forward roll of a stacked depth column; ~content_swap promoted to a 3D column)."+ },+ "front_face": {+ "kind": "message",+ "motion": "wipe_reveal",+ "anchor": "landings[] + ~15% lead",+ "notes": "As the landing card rolls into s0 (upright, rotX 0), its SOLID colored face — a big CENTERED hero title + a small play glyph — is revealed by an angled clip-path wipe sweeping upper-left→lower-right (--wipe 0→1, ~0.72° diagonal). The title is the only copy on the face (no eyebrow tag / no meta footer). ~05-mask_reveal."+ },+ "exit_card": {+ "kind": "asset",+ "motion": "tumble_fall",+ "anchor": "landings[] (the OUTGOING front card)",+ "notes": "When a new card lands, the previous front card continues FORWARD past upright into a face-down tumble (rotX → -88°) while dropping DOWN and toward the camera (y +620, z +420, scale 1.10) and fading out. PROPOSED verb 'tumble_fall' (forward over-rotate + fall toward lens). Reverse of the incoming roll."+ },+ "field": {+ "kind": "background",+ "motion": "hold",+ "anchor": "none",+ "notes": "A static radial-gradient field behind the deck (default near-black #06070d). Dead still the whole span; the only motion is the deck. negative_space_hold."+ }+ },++ "params": {+ "theme": {+ "type": "string",+ "maps_to": "palette (see themes)",+ "default": "aurora",+ "notes": "Palette preset: aurora | ember | mono | slate. Sets the field bg + the cohesive card-color ramp the deck cycles + the ink. The fastest knob for a whole new look."+ },+ "bgColor": {+ "type": "color",+ "maps_to": "field.color (radial gradient base)",+ "default": "",+ "notes": "Override the field background. Empty = the theme's bg. The radial centre/edge are derived from it."+ },+ "cards": {+ "type": "string",+ "maps_to": "deck (engine.cards)",+ "default": "",+ "notes": "JSON array of card objects { title, color? }. `title` is the big centered hero (the only required field). Its length sets N (the deck depth). `color` is OPTIONAL — omit it and the card takes the next color from the theme ramp (cohesive by default); set it to override one card. Empty = the built-in 6-card demo deck. THIS is the compose-by-data surface for content: add / drop / reorder cards — no code edit."+ },+ "landings": {+ "type": "string",+ "maps_to": "beat_map.landings (engine.landings)",+ "default": "",+ "notes": "JSON array of absolute audio seconds — ONE landing beat per card (length must equal `cards` length). Empty = an accelerating schedule auto-derived from the card count + duration. Bind these from the matched group's onset times so each card lands on a hit."+ },+ "yaw": {+ "type": "number",+ "maps_to": "scene.rotateY (deg)",+ "default": -12,+ "notes": "Static side-tilt of the whole deck. 0 = face-on; negative = scene rotated so the deck reads from the left."+ }+ },++ "beat_map": {+ "comment": "Musical TIMING lives here; content lives in `cards`. All times are ABSOLUTE audio seconds. One landing per card; per-card transition duration is derived from the gap into each landing (faster as the cadence accelerates).",+ "landings": [0.4, 1.7, 2.7, 3.45, 4.0, 4.4],+ "landings_notes": "one per card, in deck order. Bind from the matched group's onset times. The schedule should ACCELERATE (gaps shrinking) for the signature build; the final card lands early enough to HOLD a beat before the cut. If omitted at build time, an accelerating schedule is generated from card count + duration.",+ "transition_dur_rule": "dur_i = clamp(0.32 * gap_into_i, 0.12, 0.42); each landing tween starts at landing - dur (leads the beat) so the card arrives ON the hit; the face wipe runs over the last ~85% of that window.",+ "duration": 6.0,+ "exit_note": "the final card rolls in and HOLDS front-and-center to the end (6.0s); the source then hard-cuts to the next group (fast_cut)."+ },++ "engine": {+ "model": "data deck + rel-based slot column. The deck (`cards`) and the landing beats (`landings`) are DATA; the slot poses (s0..far + exit) and the per-landing orchestration are fixed code. `poseForRel(rel)` maps a card's slot-distance behind the current front card to a pose, so the column is always correctly depth-sorted and any N works. z-index is set instantly at each swap (CSS can't depth-sort non-intersecting planes). Compose by editing the `cards` / `landings` DATA — never the slot/orchestration code.",+ "compose_by": ["theme", "cards", "landings", "yaw", "bgColor"],+ "extend": "recolor the whole deck via `theme` (cohesive ramp) or one card via its `color`; more cards = more `cards` entries (+ matching `landings`); change the read angle via `yaw`. Add a palette = add an entry to the THEMES table (bg + ink + a colors[] ramp). To change the deck LOOK (slot depths, card size, wipe angle) edit the SLOT table / CSS, not the program."+ },++ "program_format": {+ "_": "`cards` is a JSON array of card objects; `landings` is a JSON array of absolute audio seconds, one per card (same length as `cards`).",+ "card": {+ "title": "string — the big CENTERED hero title (the only copy on the face)",+ "color": "string? — OPTIONAL solid face color (CSS color). Omit = next color from the theme ramp."+ },+ "landings": "number[] — abs seconds, one landing beat per card, in deck order (accelerating cadence recommended)"+ },++ "reference_impl": "index.html",+ "program_data": "program.json (the default 6-card deck + landing schedule as standalone, agent-editable data)",+ "uses_primitives": [+ "18-3d_card_flip",+ "05-mask_reveal",+ "09-dolly_zoom",+ "content_swap",+ "negative_space_hold"+ ],+ "uses_primitives_notes": "deck_advance / wipe_reveal / tumble_fall are PROPOSED custom phrases the impl defines (a per-onset one-slot forward roll of a stacked 3D depth column; an angled clip-path face reveal; a forward over-rotate + fall toward the lens). 18-3d_card_flip (#18) backs the 3D card transforms; 05-mask_reveal (#05) backs the angled clip-path wipe; 09-dolly_zoom (#09) is the perspective/depth feel; content_swap is the per-onset advance generalized to a depth column; negative_space_hold backs the static field.",++ "bundled_assets": "assets/gsap.min.js (offline GSAP). No fonts bundled — uses a system grotesque stack ('Inter', 'Helvetica Neue', Arial). No remote assets.",++ "transition_out": { "default": "fast_cut", "observed": "fast_cut" },++ "reversed_from": [],+ "origin": "sandbox",+ "provenance": {+ "source": "bgm-golden-sample-reverse/gorup-by-group/card-flyby (Shader-Deck-style horizontal card-flyby SANDBOX)",+ "note": "Hand-authored design study, NOT reverse-engineered from a golden-sample group — there is no source audiomap / Gemini read. The match-face is therefore a HYPOTHESIS (which music this look fits), not a measured signature; `examples[].synthetic = true` flags the cadence as design-intent. The original sandbox is asset-free but used remote Google-Fonts Inter + a CDN GSAP AND a grab-bag of clashing per-card hexes; this promoted impl drops the remote deps (system fonts + bundled GSAP), makes the deck data-driven (`cards` / `landings`), and replaces the ad-hoc colors with a cohesive `theme` palette system (per-card color optional). Promote-time review should add a REAL example (and tighten `requires`) the first time this template is matched to an actual reversed group."+ }+}diff --git a/skills/bgm-to-video/templates/card-flyby/index.html b/skills/bgm-to-video/templates/card-flyby/index.htmlnew file mode 100644index 0000000000..faf0d23865--- /dev/null+++ b/skills/bgm-to-video/templates/card-flyby/index.html@@ -0,0 +1,527 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"theme", "type":"string", "label":"Palette theme — aurora | ember | mono | slate", "default":"aurora"},+ {"id":"bgColor", "type":"color", "label":"Stage background override (empty = theme bg)", "default":""},+ {"id":"cards", "type":"string", "label":"Deck JSON — array of {tag,title,meta,color?}", "default":""},+ {"id":"landings", "type":"string", "label":"Landing beats JSON — abs seconds, one per card", "default":""},+ {"id":"yaw", "type":"number", "label":"Scene yaw (deg, side tilt of the whole deck)", "default":-12}+ ]'+>+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Card Flyby · accelerating 3D deck cascade — reference impl</title>+ <script src="./assets/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ width: 1920px;+ height: 1080px;+ background: #06070d;+ overflow: hidden;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ background: radial-gradient(1300px 820px at 50% 52%, #0d1018 0%, #06070d 70%, #04050a 100%);+ overflow: hidden;+ font-family: "Inter", "Helvetica Neue", Arial, sans-serif;+ }+ /* .stage carries the perspective; .scene carries the static yaw. The cards' own+ rotateX drives the tumble-forward — the scene only holds the side tilt. */+ .stage {+ position: absolute;+ left: 0;+ top: 0;+ width: 1920px;+ height: 1080px;+ perspective: 2400px;+ perspective-origin: 50% 55%;+ }+ .scene {+ position: absolute;+ left: 0;+ top: 0;+ width: 1920px;+ height: 1080px;+ transform-style: preserve-3d;+ transform: rotateY(-12deg);+ }+ .card {+ position: absolute;+ left: calc(50% - 700px);+ top: calc(50% - 395px);+ width: 1400px;+ height: 790px;+ border-radius: 32px;+ will-change: transform, opacity;+ --wipe: 0;+ --color: #444;+ transform-origin: 50% 50%;+ }+ /* Wireframe (always present, opacity tracks the slot). */+ .wire {+ position: absolute;+ inset: 0;+ border-radius: 28px;+ border: 1.5px solid rgba(255, 255, 255, 0.42);+ box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);+ background: rgba(255, 255, 255, 0.012);+ overflow: hidden;+ }+ .wire .wire-label {+ position: absolute;+ left: 68px;+ top: 60px;+ font-size: 26px;+ font-weight: 500;+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.5);+ }+ .wire .wire-corner {+ position: absolute;+ right: 68px;+ top: 60px;+ width: 34px;+ height: 34px;+ border: 1.5px solid rgba(255, 255, 255, 0.32);+ border-radius: 50%;+ }+ .wire .wire-bar {+ position: absolute;+ left: 68px;+ right: 68px;+ bottom: 68px;+ height: 1.5px;+ background: rgba(255, 255, 255, 0.22);+ }+ /* Solid colored face — revealed via an angled clip-path wipe driven by --wipe.+ Polygon sweeps upper-left → lower-right at ~72°. wipe=0 collapsed off-element,+ wipe=1 covers the full card. */+ .solid {+ position: absolute;+ inset: 0;+ border-radius: 28px;+ /* gentle top→bottom tonal gradient (theme-derived shades) for depth */+ background: linear-gradient(+ 158deg,+ var(--c1, var(--color)) 0%,+ var(--c2, var(--color)) 100%+ );+ box-shadow:+ 0 34px 100px rgba(0, 0, 0, 0.55),+ inset 0 1px 0 rgba(255, 255, 255, 0.14);+ overflow: hidden;+ /* the title is the hero — centered in the card */+ display: flex;+ align-items: center;+ justify-content: center;+ padding: 90px 104px;+ clip-path: polygon(+ 0% 0%,+ calc(var(--wipe) * 200% - 30%) 0%,+ calc(var(--wipe) * 200% - 80%) 100%,+ 0% 100%+ );+ }+ .solid::before {+ content: "";+ position: absolute;+ inset: 0;+ border-radius: 28px;+ background: linear-gradient(+ 135deg,+ rgba(255, 255, 255, 0.13) 0%,+ rgba(255, 255, 255, 0.03) 40%,+ rgba(0, 0, 0, 0.14) 100%+ );+ pointer-events: none;+ }+ .solid .title {+ font-size: 184px;+ font-weight: 800;+ letter-spacing: -0.035em;+ line-height: 0.92;+ color: var(--ink, #ffffff);+ text-align: center;+ max-width: 100%;+ overflow-wrap: break-word;+ text-wrap: balance;+ }+ .solid .play {+ position: absolute;+ right: 68px;+ bottom: 70px;+ width: 80px;+ height: 80px;+ border-radius: 50%;+ background: rgba(0, 0, 0, 0.28);+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .solid .play::after {+ content: "";+ width: 0;+ height: 0;+ border-left: 22px solid #ffffff;+ border-top: 14px solid transparent;+ border-bottom: 14px solid transparent;+ margin-left: 5px;+ }+ </style>+ </head>+ <body>+ <!-- duration 6.0s = a 6-card accelerating cascade (1 card lands per beat, dwells shrinking) -->+ <div+ data-hf-id="hf-cf-root"+ id="root"+ data-composition-id="card-flyby"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="6.0"+ data-root="true"+ >+ <div data-hf-id="hf-cf-stage" class="stage">+ <div data-hf-id="hf-cf-scene" class="scene" id="scene"></div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════════+ // CARD FLYBY · accelerating 3D deck cascade+ // ────────────────────────────────────────────────────────────────────+ // A depth column of N cards rolls FORWARD. On each landing beat the next+ // card tumbles up into the front slot (s0) and WIPES in its solid colored+ // face (angled clip-path), the previous front card tumbles forward + falls+ // down toward the camera on exit, and every card behind advances one slot.+ // Dwells shrink card-to-card → the deck reads as an accelerating rush into+ // a held final card. Asset-free: wireframe + solid CSS cards, system fonts.+ //+ // COMPOSE BY DATA — `cards` (the deck) and `landings` (one beat per card)+ // are the two data surfaces. Card count is data: 3/6/9 cards all "just+ // work"; landings default to an accelerating schedule derived from count.+ // ════════════════════════════════════════════════════════════════════++ window.__timelines = window.__timelines || {};+ // force3D is set per card tween/set below (NOT a global default — a global+ // would leak onto the plain-object padding tween and warn). It keeps a 3D+ // matrix on every transform so cards never collapse to 2D: a card whose+ // rotX/Y/Z all hit 0 (the front s0 pose) would otherwise drop out of the 3D+ // stacking context and paint in DOM order, letting back cards render on top.++ // ── 1. Variables ──────────────────────────────────────────────────────+ var defaults = { theme: "aurora", bgColor: "", cards: "", landings: "", yaw: -12 };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // ── Palette themes — each is a COHESIVE ramp (one temperature/saturation+ // family) so any card count reads as a designed set. card.color still+ // overrides per card. White-on-card stays AA at the card type sizes. ──+ var THEMES = {+ // cool jewel arc: teal → ocean → indigo → violet → plum+ aurora: {+ bg: "#06060e",+ ink: "#ffffff",+ colors: ["#0e5f63", "#15517e", "#283f86", "#4a3a83", "#6a3380", "#8a2e63"],+ },+ // warm sunset arc: wine → brick → rust → amber → ochre → bronze+ ember: {+ bg: "#0e0805",+ ink: "#fff6ee",+ colors: ["#5c2030", "#7e2828", "#9c3b1c", "#a9551a", "#8a5a1c", "#5f4626"],+ },+ // sleek monochrome blue staircase (dark → mid)+ mono: {+ bg: "#060912",+ ink: "#ffffff",+ colors: ["#11243f", "#16314f", "#1b3d63", "#214a78", "#27568d", "#2d63a2"],+ },+ // muted cool slate — understated / editorial+ slate: {+ bg: "#0b0e12",+ ink: "#eef2f6",+ colors: ["#232a33", "#2b3540", "#33414e", "#3b4c5c", "#43576a", "#4b6278"],+ },+ };+ var TH = THEMES[String(vars.theme || "").trim()] || THEMES.aurora;++ // tiny hex helpers (deterministic, no deps) — derive shades + soft ink.+ function parseHex(h) {+ h = String(h || "")+ .trim()+ .replace(/^#/, "");+ if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];+ if (h.length !== 6) return null;+ var n = parseInt(h, 16);+ return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255 };+ }+ function clamp8(v) {+ return Math.max(0, Math.min(255, Math.round(v)));+ }+ function toHex(c) {+ return (+ "#" ++ [c.r, c.g, c.b]+ .map(function (v) {+ return clamp8(v).toString(16).padStart(2, "0");+ })+ .join("")+ );+ }+ function mix(hex, t, amt) {+ var c = parseHex(hex);+ if (!c) return hex;+ return toHex({+ r: c.r + (t.r - c.r) * amt,+ g: c.g + (t.g - c.g) * amt,+ b: c.b + (t.b - c.b) * amt,+ });+ }+ var BLACK = { r: 0, g: 0, b: 0 },+ WHITE = { r: 255, g: 255, b: 255 };+ function darken(hex, amt) {+ return mix(hex, BLACK, amt);+ }+ function lighten(hex, amt) {+ return mix(hex, WHITE, amt);+ }++ var DEFAULT_CARDS = [+ { title: "FADEGLOW" },+ { title: "SAUL BASS" },+ { title: "EULER" },+ { title: "HERMÈS" },+ { title: "DOSSIER" },+ { title: "BLACK HOLES" },+ ];+ // landings tuned by hand on the sandbox: accelerating dwells, final card holds ~1.6s.+ var DEFAULT_LANDINGS = [0.4, 1.7, 2.7, 3.45, 4.0, 4.4];++ var DUR = 6.0; // matches data-duration+ var YAW = Number(vars.yaw);+ if (!isFinite(YAW)) YAW = -12;++ function parseJSON(v) {+ if (!v) return null;+ if (typeof v !== "string") return v;+ try {+ return JSON.parse(v);+ } catch (e) {+ return null;+ }+ }++ var CARDS = parseJSON(vars.cards);+ if (!CARDS || !CARDS.length) CARDS = DEFAULT_CARDS;+ var N = CARDS.length;++ // ── 2. Landing schedule (accelerating cascade) ─────────────────────────+ // gaps between landings shrink geometrically; the final card lands early+ // enough to hold a beat before the cut.+ function genLandings(n, total) {+ var start = 0.4;+ var hold = Math.min(1.6, total * 0.27);+ var end = Math.max(start + 0.3, total - hold);+ if (n <= 1) return [start];+ var ratio = 0.78,+ weights = [],+ sum = 0,+ i;+ for (i = 0; i < n - 1; i++) {+ var w = Math.pow(ratio, i);+ weights.push(w);+ sum += w;+ }+ var span = end - start,+ acc = start,+ times = [start];+ for (i = 0; i < n - 1; i++) {+ acc += (span * weights[i]) / sum;+ times.push(acc);+ }+ return times;+ }+ var LANDED = parseJSON(vars.landings);+ if (!LANDED || LANDED.length !== N) {+ LANDED = N === DEFAULT_CARDS.length ? DEFAULT_LANDINGS.slice() : genLandings(N, DUR);+ }+ // per-card transition duration derived from the gap into it (faster as we accelerate).+ function transDur(i) {+ var gap = i === 0 ? (N > 1 ? LANDED[1] - LANDED[0] : 0.4) : LANDED[i] - LANDED[i - 1];+ return Math.max(0.12, Math.min(0.42, gap * 0.32));+ }++ // ── 3. Build the deck DOM from data ────────────────────────────────────+ var scene = document.getElementById("scene");+ scene.style.transform = "rotateY(" + YAW + "deg)";+ // bg: explicit bgColor override wins; else the theme's field color. The radial+ // lifts the centre slightly and sinks the edges, both derived from the bg.+ var BG = vars.bgColor && String(vars.bgColor).trim() ? vars.bgColor : TH.bg;+ document.documentElement.style.background = BG;+ document.body.style.background = BG;+ var rootEl = document.getElementById("root");+ rootEl.style.background =+ "radial-gradient(1300px 820px at 50% 52%, " ++ lighten(BG, 0.1) ++ " 0%, " ++ BG ++ " 70%, " ++ darken(BG, 0.4) ++ " 100%)";++ function el(cls, parent) {+ var d = document.createElement("div");+ d.className = cls;+ if (parent) parent.appendChild(d);+ return d;+ }+ var cardEls = [];+ for (var i = 0; i < N; i++) {+ var c = CARDS[i] || {};+ var card = el("card", scene);+ card.id = "card-" + i;+ // color: per-card override, else cycle the cohesive theme ramp. A gentle+ // top→bottom shade pair (--c1/--c2) gives each face tonal depth.+ var col = c.color || TH.colors[i % TH.colors.length];+ card.style.setProperty("--color", col);+ card.style.setProperty("--c1", lighten(col, 0.05));+ card.style.setProperty("--c2", darken(col, 0.22));+ card.style.setProperty("--ink", TH.ink);++ var wire = el("wire", card);+ var label = el("wire-label", wire);+ label.textContent = String(i + 1).padStart(3, "0");+ el("wire-corner", wire);+ el("wire-bar", wire);++ var solid = el("solid", card);+ var title = el("title", solid);+ title.textContent = c.title || "";+ el("play", solid);++ cardEls.push(card);+ }++ // ── 4. SLOT poses ───────────────────────────────────────────────────────+ // rotX is the key. Cards behind tilt BACK (top edge away, +rotX); the front+ // is upright (rotX 0); on exit a card continues forward into a face-down+ // tumble (-rotX) while dropping down + toward camera. Depth from perspective+ // (Z) + the cards' rotateX, not a camera move.+ var SLOT = {+ far: { x: 360, y: 380, z: -1080, rotX: 84, scale: 0.74, opacity: 0, zi: 60 },+ s3: { x: 280, y: 290, z: -820, rotX: 66, scale: 0.8, opacity: 0.32, zi: 70 },+ s2: { x: 195, y: 200, z: -560, rotX: 46, scale: 0.86, opacity: 0.58, zi: 80 },+ s1: { x: 105, y: 105, z: -290, rotX: 22, scale: 0.93, opacity: 0.85, zi: 90 },+ s0: { x: 0, y: 0, z: 0, rotX: 0, scale: 1.0, opacity: 1.0, zi: 100 },+ exit: { x: -90, y: 620, z: 420, rotX: -88, scale: 1.1, opacity: 0, zi: 110 },+ };+ // pose for a card whose index is `rel` slots behind the current front card+ // (rel 0 = front, +ve = behind, -ve = already exiting / gone).+ function poseForRel(rel) {+ if (rel <= -1) return SLOT.exit;+ if (rel === 0) return SLOT.s0;+ if (rel === 1) return SLOT.s1;+ if (rel === 2) return SLOT.s2;+ if (rel === 3) return SLOT.s3;+ return SLOT.far;+ }++ var tl = gsap.timeline({ paused: true });++ function poseTween(idx, slot, t, dur, ease) {+ // z-index is set instantly at the swap start so paint order matches the+ // slot — CSS can't reliably depth-sort non-intersecting planes.+ tl.set("#card-" + idx, { zIndex: slot.zi }, t);+ tl.to(+ "#card-" + idx,+ {+ x: slot.x,+ y: slot.y,+ z: slot.z,+ rotationX: slot.rotX,+ scale: slot.scale,+ opacity: slot.opacity,+ force3D: true,+ duration: dur,+ ease: ease || "power2.inOut",+ },+ t,+ );+ }++ // ── 5. Initial pose (front index = -1: nothing landed yet) ─────────────+ // card j sits at rel = j + 1, so card0 starts at s1, card1 at s2, etc. Apply+ // via gsap.set (so the paused render at t=0 shows the staged stack) AND via+ // tl.set at 0 (so scrubbing back to 0 restores it).+ for (var j = 0; j < N; j++) {+ var s = poseForRel(j + 1);+ var props = {+ x: s.x,+ y: s.y,+ z: s.z,+ rotationX: s.rotX,+ scale: s.scale,+ opacity: s.opacity,+ zIndex: s.zi,+ force3D: true,+ "--wipe": 0,+ };+ gsap.set("#card-" + j, props);+ tl.set("#card-" + j, props, 0);+ }++ // ── 6. Per-landing orchestration ───────────────────────────────────────+ // On landing i, card i becomes front. Tween the live window [i-1 .. i+4]:+ // i-1 tumbles to exit, i rolls into s0 (+ wipe), the rest advance toward+ // the front. Cards outside the window are already at rest (far / gone).+ for (var L = 0; L < N; L++) {+ var dur = transDur(L);+ var t = Math.max(0, LANDED[L] - dur);++ for (var k = L - 1; k <= L + 4; k++) {+ if (k < 0 || k >= N) continue;+ var rel = k - L;+ var ease = rel === 0 ? "power3.out" : rel < 0 ? "power2.in" : "power2.inOut";+ poseTween(k, poseForRel(rel), t, dur, ease);+ }++ // the landing card wipes in its solid face as it rolls up.+ tl.to(+ "#card-" + L,+ {+ "--wipe": 1,+ duration: dur * 0.85,+ ease: "power2.inOut",+ },+ t + dur * 0.15,+ );+ }++ // pad the timeline so duration() >= data-duration.+ tl.to({}, { duration: DUR }, 0);+ tl.seek(0);++ window.__timelines["card-flyby"] = tl;+ })();+ </script>+ </div>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/card-flyby/program.json b/skills/bgm-to-video/templates/card-flyby/program.jsonnew file mode 100644index 0000000000..be751265a7--- /dev/null+++ b/skills/bgm-to-video/templates/card-flyby/program.json@@ -0,0 +1,13 @@+{+ "_": "Default card-flyby program. `theme` picks a cohesive palette; `cards` is the deck (each card = a big centered title; `color` is OPTIONAL — omit it and the card takes the next color from the theme ramp); `landings` is one onset per card (accelerating cadence; omit to auto-derive). Pass these as the matching composition-variables; empty vars fall back to these values.",+ "theme": "aurora",+ "cards": [+ { "title": "FADEGLOW" },+ { "title": "SAUL BASS" },+ { "title": "EULER" },+ { "title": "HERMÈS" },+ { "title": "DOSSIER" },+ { "title": "BLACK HOLES" }+ ],+ "landings": [0.4, 1.7, 2.7, 3.45, 4.0, 4.4]+}diff --git a/skills/bgm-to-video/templates/held-message-living-field/README.md b/skills/bgm-to-video/templates/held-message-living-field/README.mdnew file mode 100644index 0000000000..bf8fa36863--- /dev/null+++ b/skills/bgm-to-video/templates/held-message-living-field/README.md@@ -0,0 +1,51 @@+# Held Message / Living Field++The first promoted Group Template. Reverse-engineered from **group_1** of the golden+sample `bgm_test_2` (the "PREVIOUSLY ON / DUCKLIFE" recap card). Chinese name the user+uses: 静止文字 · 活背景.++In `visual-plan-contract.md` / motion terms it is the **macro-stable + micro-volatile+hold**: the message is frozen, the blurred field carries all the motion.++## When the Director picks it (match-face)++A group whose `GroupSignature` is **heavy-but-sparse with an onset desert**:+`energy_level >= MEDIUM`, `density == sparse`, `onset_gap_bars >= 1.5`, steady grid.+Mood fit: warm / dark / elegant / cinematic. See `card.json`.++The hold ends at the **first onset re-entry** (or a hard stop), snapped to the next+downbeat — that is both the group boundary and the template's stop rule.++## What it renders (build-face)++- **message** (text) — `freeze_after_reveal`: a held title block (mark + title ++ tagline). Reveal (blur+scale settle, brief per-letter entrance) then dead still for the+ whole span. Three slots: `markText` (big) + `titleText` + `tagText`.+- **field** (background) — `energy_envelope_breath`: a real-time WebGL flow field+ (fbm + curl noise). Colorful chromatic light-leak at entry, breathes up on the SURGE,+ then settles dark with a central glow for the hold.++## Files++- `card.json` — the spec (match-face + build-face).+- `index.html` — the **generic `webgl-textures-playground`** reference implementation+ (asset-free, CDN three.js + GSAP, one paused timeline; passes lint + validate).+ Composition-variables == the card's `params`: `markText`, `titleText`, `tagText`,+ `bgColor/colorLow/colorMid/colorHigh/accentColor`, `flowSpeed`. The group_1 DUCKLIFE+ recap (kicker + hero, the warm light-leak settle) is one parameterization of this engine.++## Params → recolor / re-text++```bash+npx hyperframes render --variables '{+ "markText":"DUCKLIFE","titleText":"PREVIOUSLY ON","tagText":"",+ "colorLow":"#100a2e","colorMid":"#d23b5e","colorHigh":"#ffd9c2","accentColor":"#ffb27a"+}'+```++## Provenance++Reversed via `skills/bgm-golden_sample_reverse/reverse-to-template.md` from+`bgm-golden-sample-reverse/gorup-by-group/group_1` (audiomap + Gemini analysis). The+reference impl here is the generic `group_1/webgl-textures-playground` (the user's chosen+canonical impl); the DUCKLIFE-specific `recreate-webgl` was an earlier parameterization.diff --git a/skills/bgm-to-video/templates/held-message-living-field/card.json b/skills/bgm-to-video/templates/held-message-living-field/card.jsonnew file mode 100644index 0000000000..ef5dbc4cfd--- /dev/null+++ b/skills/bgm-to-video/templates/held-message-living-field/card.json@@ -0,0 +1,66 @@+{+ "id": "held-message-living-field",+ "name": "Held Message / Living Field",+ "one_line": "A readable mark held dead still over a soft, color-shifting blurred field.",+ "status": "promoted",+ "created": "2026-06-17",++ "match": {+ "structural_type": "sustained_hold",+ "requires": {+ "energy_level": ">=MEDIUM",+ "density": "sparse",+ "onset_gap_bars": ">=1.5",+ "has_steady_grid": true+ },+ "mood_fit": ["warm", "dark", "elegant", "cinematic"],+ "span_bars": [2, 8],+ "exit_trigger": ["first_onset_reentry", "hard_stop"]+ },++ "examples": [+ {+ "sample": "bgm_test_2",+ "group": "g1",+ "bpm": 129.2,+ "energy": 0.8,+ "density": "sparse",+ "onset_gap_bars": 2.05,+ "span_sec": [0.0, 4.017]+ }+ ],++ "roles": {+ "message": {+ "kind": "message",+ "motion": "freeze_after_reveal",+ "anchor": "entry.downbeat",+ "notes": "a held title block (mark + title + tagline); reveal (blur+scale settle, brief per-letter entrance) then dead still for the whole span — no ongoing motion, there are no onsets"+ },+ "field": {+ "kind": "background",+ "motion": "energy_envelope_breath",+ "anchor": "energy",+ "notes": "the only thing moving; colorful chromatic light-leak at entry, breathes up on the SURGE, then a black mask settles it to near-black with a central glow for the hold"+ }+ },++ "params": {+ "markText": { "type": "string", "maps_to": "message.mark", "default": "HF" },+ "titleText": { "type": "string", "maps_to": "message.title", "default": "HYPERFRAMES" },+ "tagText": { "type": "string", "maps_to": "message.tag", "default": "HTML · SHADERS · MP4" },+ "palette": {+ "type": "object",+ "keys": ["bgColor", "colorLow", "colorMid", "colorHigh", "accentColor"]+ },+ "flowSpeed": { "type": "number", "default": 1 },+ "duration": { "type": "number", "from": "group.span length" }+ },++ "reference_impl": "index.html (generic webgl-textures-playground; the group_1 DUCKLIFE recreate is one parameterization)",+ "uses_primitives": ["blur_resolve", "negative_space_hold", "chromatic_pressure", "hard_cut"],++ "transition_out": { "default": "fast_cut", "observed": "anticipation_glitch_cut" },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_1"]+}diff --git a/skills/bgm-to-video/templates/held-message-living-field/index.html b/skills/bgm-to-video/templates/held-message-living-field/index.htmlnew file mode 100644index 0000000000..3099681f06--- /dev/null+++ b/skills/bgm-to-video/templates/held-message-living-field/index.html@@ -0,0 +1,485 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Page background", "default":"#050507"},+ {"id":"colorLow", "type":"color", "label":"Flow — shadow tone", "default":"#0a1430"},+ {"id":"colorMid", "type":"color", "label":"Flow — mid tone", "default":"#6a6f9e"},+ {"id":"colorHigh", "type":"color", "label":"Flow — highlight tone", "default":"#e8f0ff"},+ {"id":"accentColor","type":"color", "label":"Core / glow accent", "default":"#aee4ff"},+ {"id":"markText", "type":"string", "label":"Monogram", "default":"HF"},+ {"id":"titleText", "type":"string", "label":"Title", "default":"HYPERFRAMES"},+ {"id":"tagText", "type":"string", "label":"Tagline", "default":"HTML · SHADERS · MP4"},+ {"id":"flowSpeed", "type":"number", "label":"Flow speed", "default":1, "min":0.1, "max":3, "step":0.1}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>WebGL Textures Playground — Template</title>+ <link+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap"+ rel="stylesheet"+ />+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ /* --bg / --mark-top / --mark-bottom / --line are set from variables in JS */+ html,+ body {+ background: var(--bg, #050507);+ overflow: hidden;+ font-family: "Inter", system-ui, sans-serif;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--bg, #050507);+ }+ .sf-stage {+ position: absolute;+ inset: 0;+ }+ .sf-canvas {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ display: block;+ }+ .sf-overlay {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 28px;+ color: #fff;+ text-align: center;+ mix-blend-mode: screen;+ pointer-events: none;+ }+ .sf-mark {+ font-size: 280px;+ font-weight: 800;+ letter-spacing: -18px;+ line-height: 1;+ display: flex;+ gap: 0;+ opacity: 0;+ filter: drop-shadow(0 0 60px rgba(180, 220, 255, 0.4));+ }+ .sf-mark-letter {+ display: inline-block;+ background: linear-gradient(+ 180deg,+ var(--mark-top, #ffffff) 0%,+ var(--mark-bottom, #8aa9ff) 100%+ );+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ transform: translateY(0);+ }+ .sf-rule {+ width: 0;+ height: 2px;+ background: linear-gradient(+ 90deg,+ transparent 0%,+ var(--line, rgba(255, 255, 255, 0.9)) 50%,+ transparent 100%+ );+ opacity: 0;+ }+ .sf-title {+ font-size: 64px;+ font-weight: 700;+ letter-spacing: 18px;+ opacity: 0;+ clip-path: inset(0 100% 0 0);+ text-transform: uppercase;+ }+ .sf-tag {+ font-size: 18px;+ font-weight: 500;+ letter-spacing: 8px;+ color: rgba(255, 255, 255, 0.65);+ opacity: 0;+ text-transform: uppercase;+ }+ .sf-grain {+ position: absolute;+ inset: 0;+ pointer-events: none;+ opacity: 0.06;+ mix-blend-mode: overlay;+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");+ }+ </style>+ </head>+ <body>+ <div+ data-hf-id="hf-a0d4"+ id="root"+ data-composition-id="webgl-textures-playground"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="12"+ data-root="true"+ >+ <div data-hf-id="hf-clsq" class="sf-stage">+ <canvas data-hf-id="hf-yk51" class="sf-canvas" width="1920" height="1080"></canvas>+ <div data-hf-id="hf-7z0g" class="sf-overlay">+ <div data-hf-id="hf-yo0z" class="sf-mark"><!-- letters injected from markText --></div>+ <div data-hf-id="hf-nig2" class="sf-rule"></div>+ <div data-hf-id="hf-gjx6" class="sf-title"></div>+ <div data-hf-id="hf-e7y8" class="sf-tag"></div>+ </div>+ <div data-hf-id="hf-ku55" class="sf-grain"></div>+ </div>+ </div>++ <script>+ (function () {+ // ── 1. Resolve variables (read ONCE during init) ──────────────────+ var defaults = {+ bgColor: "#050507",+ colorLow: "#0a1430",+ colorMid: "#6a6f9e",+ colorHigh: "#e8f0ff",+ accentColor: "#aee4ff",+ markText: "HF",+ titleText: "HYPERFRAMES",+ tagText: "HTML · SHADERS · MP4",+ flowSpeed: 1,+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // sRGB hex -> linear-light vec3 (the shader works in linear space and+ // gamma-encodes at the end, so converting here makes the picked color+ // land close to what a color picker shows).+ function hexToLinear(hex) {+ var h = String(hex).replace("#", "").trim();+ if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];+ var r = parseInt(h.substr(0, 2), 16) / 255;+ var g = parseInt(h.substr(2, 2), 16) / 255;+ var b = parseInt(h.substr(4, 2), 16) / 255;+ var lin = function (c) {+ return Math.pow(c, 2.2);+ };+ return new THREE.Vector3(lin(r), lin(g), lin(b));+ }++ var root = document.getElementById("root");+ var canvas = root.querySelector(".sf-canvas");+ var W = 1920;+ var H = 1080;++ // ── 2. Apply text + CSS-driven colors ─────────────────────────────+ var docEl = document.documentElement;+ docEl.style.setProperty("--bg", vars.bgColor);+ docEl.style.setProperty("--mark-top", vars.colorHigh);+ docEl.style.setProperty("--mark-bottom", vars.colorMid);+ docEl.style.setProperty("--line", vars.colorHigh);++ var markEl = root.querySelector(".sf-mark");+ markEl.innerHTML = "";+ String(vars.markText)+ .split("")+ .forEach(function (ch) {+ var span = document.createElement("span");+ span.className = "sf-mark-letter";+ span.textContent = ch;+ markEl.appendChild(span);+ });+ root.querySelector(".sf-title").textContent = vars.titleText;+ root.querySelector(".sf-tag").textContent = vars.tagText;++ // ── 3. WebGL flow field ───────────────────────────────────────────+ var renderer = new THREE.WebGLRenderer({+ canvas: canvas,+ antialias: false,+ alpha: false,+ preserveDrawingBuffer: true,+ });+ renderer.setPixelRatio(1);+ renderer.setSize(W, H, false);++ var scene = new THREE.Scene();+ var camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ var uniforms = {+ uTime: { value: 0.0 },+ uPhase: { value: 0.0 },+ uReveal: { value: 0.0 },+ uChromAb: { value: 0.0 },+ uVignette: { value: 0.0 },+ uIntensity: { value: 0.0 },+ uResolution: { value: new THREE.Vector2(W, H) },+ uSpeed: { value: Number(vars.flowSpeed) || 1.0 },+ // ── COLOR CONTROLS (driven by the composition variables) ──+ uColLow: { value: hexToLinear(vars.colorLow) },+ uColMid: { value: hexToLinear(vars.colorMid) },+ uColHigh: { value: hexToLinear(vars.colorHigh) },+ uAccent: { value: hexToLinear(vars.accentColor) },+ };++ var vert = [+ "varying vec2 vUv;",+ "void main(){",+ " vUv = uv;",+ " gl_Position = vec4(position.xy, 0.0, 1.0);",+ "}",+ ].join("\n");++ var frag = [+ "precision highp float;",+ "varying vec2 vUv;",+ "uniform float uTime;",+ "uniform float uPhase;",+ "uniform float uReveal;",+ "uniform float uChromAb;",+ "uniform float uVignette;",+ "uniform float uIntensity;",+ "uniform float uSpeed;",+ "uniform vec2 uResolution;",+ "uniform vec3 uColLow;",+ "uniform vec3 uColMid;",+ "uniform vec3 uColHigh;",+ "uniform vec3 uAccent;",++ "float hash21(vec2 p){",+ " p = fract(p * vec2(123.34, 456.21));",+ " p += dot(p, p + 45.32);",+ " return fract(p.x * p.y);",+ "}",++ "float noise2(vec2 p){",+ " vec2 i = floor(p);",+ " vec2 f = fract(p);",+ " vec2 u = f * f * (3.0 - 2.0 * f);",+ " float a = hash21(i);",+ " float b = hash21(i + vec2(1.0, 0.0));",+ " float c = hash21(i + vec2(0.0, 1.0));",+ " float d = hash21(i + vec2(1.0, 1.0));",+ " return mix(mix(a,b,u.x), mix(c,d,u.x), u.y);",+ "}",++ "float fbm(vec2 p){",+ " float v = 0.0;",+ " float a = 0.5;",+ " for(int i=0;i<5;i++){",+ " v += a * noise2(p);",+ " p *= 2.02;",+ " a *= 0.5;",+ " }",+ " return v;",+ "}",++ "vec2 curl(vec2 p, float t){",+ " float e = 0.6;",+ " float n1 = fbm(p + vec2(0.0, e) + t*0.18);",+ " float n2 = fbm(p + vec2(0.0, -e) + t*0.18);",+ " float n3 = fbm(p + vec2( e, 0.0) + t*0.18);",+ " float n4 = fbm(p + vec2(-e, 0.0) + t*0.18);",+ " return vec2(n1 - n2, -(n3 - n4));",+ "}",++ // 3-stop gradient palette built from the color variables.+ // t≈0 -> shadow, t≈0.5 -> mid, t≈1 -> highlight.+ "vec3 palette(float t){",+ " t = clamp(t, 0.0, 1.0);",+ " vec3 lowMid = mix(uColLow, uColMid, smoothstep(0.0, 0.5, t));",+ " return mix(lowMid, uColHigh, smoothstep(0.5, 1.0, t));",+ "}",++ "vec3 sampleField(vec2 uv, float t, float energy){",+ " vec2 p = (uv - 0.5) * vec2(uResolution.x/uResolution.y, 1.0) * 2.4;",+ " vec2 c = curl(p * 0.9, t);",+ " vec2 q = p + c * (0.45 + 0.55 * energy);",++ " float flow = fbm(q * 1.6 + vec2(t * 0.11, -t * 0.07));",+ " float bands = sin(flow * 14.0 + t * 1.1);",+ " bands = smoothstep(0.0, 1.0, 0.5 + 0.5 * bands);",++ " float r = length(p);",+ " float core = smoothstep(1.5, 0.05, r) * (0.6 + 0.4 * energy);",+ " float glow = exp(-r * 1.6) * (0.55 + 0.45 * energy);",++ " float k = clamp(flow * 0.85 + 0.15 * bands + 0.25 * core + 0.6 * glow, 0.0, 1.4);",+ " vec3 col = palette(k * 0.9 + 0.1 * sin(t * 0.4));",+ " col *= 0.7 + 0.6 * energy;",+ " col += uAccent * core * 0.55;",+ " return col;",+ "}",++ "void main(){",+ " vec2 uv = vUv;",+ " float t = uTime * uSpeed;",+ " float e = uIntensity;",++ " vec2 dir = normalize(uv - 0.5 + 1e-6);",+ " float ca = uChromAb * (0.004 + 0.012 * length(uv - 0.5));",+ " vec3 cR = sampleField(uv + dir * ca, t, e);",+ " vec3 cG = sampleField(uv, t, e);",+ " vec3 cB = sampleField(uv - dir * ca, t, e);",+ " vec3 col = vec3(cR.r, cG.g, cB.b);",++ " float lum = dot(col, vec3(0.299, 0.587, 0.114));",+ " col = mix(vec3(lum), col, 1.05);",++ " float rev = uReveal;",+ " float sweep = smoothstep(0.0, 0.6, rev) * (1.0 - smoothstep(0.6, 1.0, rev));",+ " col += uColHigh * sweep * 0.35;",++ " vec3 phaseTint = mix(vec3(0.85, 0.92, 1.05), vec3(1.05, 0.95, 0.85), uPhase);",+ " col *= phaseTint;",++ " float v = length(uv - 0.5);",+ " col *= 1.0 - smoothstep(0.45, 0.95, v) * uVignette;",++ " col = col / (col + 1.0);",+ " col = pow(col, vec3(1.0/2.2));",++ " gl_FragColor = vec4(col, 1.0);",+ "}",+ ].join("\n");++ var mat = new THREE.ShaderMaterial({+ uniforms: uniforms,+ vertexShader: vert,+ fragmentShader: frag,+ });+ var geo = new THREE.PlaneGeometry(2, 2);+ var mesh = new THREE.Mesh(geo, mat);+ scene.add(mesh);++ function renderFrame() {+ renderer.render(scene, camera);+ }+ renderFrame();++ // Continuous loop: ensures the WebGL backbuffer always has fresh+ // pixels when puppeteer takes a screenshot. All visible state comes+ // from uniforms driven by the GSAP timeline, so output is fully+ // determined by the timeline position (deterministic across renders).+ function loop() {+ renderFrame();+ window.requestAnimationFrame(loop);+ }+ window.requestAnimationFrame(loop);++ // ── 4. Deterministic timeline (unchanged motion design) ───────────+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({+ paused: true,+ onUpdate: renderFrame,+ });++ tl.to(uniforms.uTime, { value: 12.0, duration: 12, ease: "none" }, 0);++ tl.to(uniforms.uIntensity, { value: 0.55, duration: 3.0, ease: "sine.inOut" }, 0);+ tl.to(uniforms.uIntensity, { value: 1.0, duration: 1.2, ease: "power2.in" }, 3.0);+ tl.to(uniforms.uIntensity, { value: 0.55, duration: 3.0, ease: "power2.out" }, 4.2);+ tl.to(uniforms.uIntensity, { value: 0.3, duration: 4.8, ease: "sine.inOut" }, 7.2);++ tl.fromTo(+ uniforms.uChromAb,+ { value: 0.0 },+ { value: 0.4, duration: 3.0, ease: "sine.in" },+ 0,+ );+ tl.to(uniforms.uChromAb, { value: 1.6, duration: 1.0, ease: "power3.in" }, 3.0);+ tl.to(uniforms.uChromAb, { value: 0.25, duration: 1.5, ease: "power2.out" }, 4.0);+ tl.to(uniforms.uChromAb, { value: 0.18, duration: 6.5, ease: "sine.inOut" }, 5.5);++ tl.fromTo(+ uniforms.uReveal,+ { value: 0.0 },+ { value: 1.0, duration: 1.2, ease: "none" },+ 3.4,+ );+ tl.set(uniforms.uReveal, { value: 0.0 }, 4.6);++ tl.to(uniforms.uPhase, { value: 0.6, duration: 5.0, ease: "sine.inOut" }, 1.5);+ tl.to(uniforms.uPhase, { value: 0.15, duration: 5.5, ease: "sine.inOut" }, 6.5);++ tl.to(uniforms.uVignette, { value: 0.85, duration: 3.0, ease: "power2.out" }, 4.2);++ var mark = root.querySelector(".sf-mark");+ var letters = root.querySelectorAll(".sf-mark-letter");+ var rule = root.querySelector(".sf-rule");+ var title = root.querySelector(".sf-title");+ var tag = root.querySelector(".sf-tag");++ tl.fromTo(+ mark,+ {+ opacity: 0,+ scale: 1.18,+ filter: "blur(24px) drop-shadow(0 0 60px rgba(180,220,255,0.4))",+ },+ {+ opacity: 1,+ scale: 1.0,+ filter: "blur(0px) drop-shadow(0 0 80px rgba(180,220,255,0.55))",+ duration: 0.9,+ ease: "power3.out",+ },+ 3.6,+ );+ tl.fromTo(+ letters,+ { y: 80 },+ { y: 0, duration: 1.0, ease: "expo.out", stagger: 0.08 },+ 3.6,+ );++ tl.fromTo(+ rule,+ { width: 0, opacity: 0 },+ { width: 360, opacity: 0.85, duration: 0.8, ease: "power2.out" },+ 5.1,+ );++ tl.fromTo(+ title,+ { opacity: 0, clipPath: "inset(0 100% 0 0)" },+ { opacity: 1, clipPath: "inset(0 0% 0 0)", duration: 0.95, ease: "power3.out" },+ 5.3,+ );++ tl.fromTo(+ tag,+ { opacity: 0, y: 12 },+ { opacity: 0.7, y: 0, duration: 0.8, ease: "sine.out" },+ 6.0,+ );++ tl.to(mark, { scale: 1.04, duration: 5.0, ease: "sine.inOut" }, 7.0);++ tl.to([mark, rule, title, tag], { opacity: 0, duration: 0.6, ease: "power1.in" }, 11.4);++ window.__timelines["webgl-textures-playground"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/README.md b/skills/bgm-to-video/templates/held-text-strobe-burst/README.mdnew file mode 100644index 0000000000..924573b60b--- /dev/null+++ b/skills/bgm-to-video/templates/held-text-strobe-burst/README.md@@ -0,0 +1,168 @@+# held-text-strobe-burst (group template)++A reusable HyperFrames template for the **Held Text / Strobe Burst** pattern: a word+held **dead still** in the center while its letterforms **flip through texture-filled+frames** every ~3 frames, in short bursts pinned to a drum roll / fill. The default+(and primary) look is the **Texture-Flip** technique — there is no shader and no video.+All state lives on one paused GSAP timeline → deterministic and seek-safe.++Reversed from `../gruop_4.mp4` (see `../gruop_4.bg-flicker.gemini-analysis.md`, burst 2 —+the "III" glyph whose interior style-transfers per beat). Sibling of **Held Message /+Living Field** (`webgl-textures-playground`): message holds, background carries the+motion — but here it _strobes_ in beat-quantized hits instead of breathing.++> Render at **24 fps** so the 0.125 s jumps land every 3 frames (the original cadence).++## The technique (Texture-Flip, foreground)++The word's letters are a **window**: `background-image: <solid-fill>, <texture-url>`+with `background-blend-mode: multiply`, clipped to the text (`background-clip: text`).+So each letter shows a **texture PNG tinted by a per-frame fill color**, over a solid+per-frame **background color**. N such frames are stacked as full-frame layers; the+strobe flips which one is visible (`tl.set(opacity)`, 0 ms — seek-safe). The texture+fills the whole letterform (`line-height ≥ 1` keeps the glyph inside the background-paint+box — with `line-height < 1` the cap tops/bottoms overflow it and leave untextured slivers).++A **persistent base** holds the word in a solid color on the idle (black) plate, so it+never disappears — it is the anchor. The **base-template default plan flickers+continuously across the whole clip and never stops**, so the idle base only shows if your+plan leaves gaps (e.g. the gruop_4 two-burst variant).++Three things change per beat: **texture** (material), **fill** (foreground tint),+**bg** (frame background). All snap to the strobe grid.++---++## What beat matches this template++The discriminator the Director uses — the **opposite** of a held pad (busy, not empty):++| Signature field | Strobe Burst wants | Why |+| ----------------- | ---------------------------------- | --------------------------------------------------------------- |+| `density` | **dense** | a strobe needs many hits to flip on |+| `energy_level` | **≥ MEDIUM** (≥ HIGH in the burst) | flat-out hits, not a breath |+| `onset_gap_bars` | **≤ ~0.5 bar** | no onset deserts — a hit every fraction of a beat |+| `has_rolls` | **true** | a `rolls[]` run (accel-roll → SURGE, or a fill) is the _engine_ |+| `has_steady_grid` | true | jumps must quantize to a stable grid |+| `exit_trigger` | `hard_stop` or `surge` | the burst cuts clean to black, then the next section enters |+| `span_bars` | 1–2 (each burst ~0.4–0.7 s) | a strobe that runs > 2–3 s tires the eye |++**Heuristic:** a high-hits/min roll inside a `dense` phase is a strobe-burst candidate.+Pin one burst per roll/fill; bound it by the `hard_stop` / `SURGE` that follows.++**gruop_4 facts that fired it** (from `../audiomap.json`):++- BPM 129; downbeat 1.254; grid 0.743 / 1.254 / 1.718 / 2.183.+- rolls: `0.09–0.79 accel-roll →SURGE`, `1.21–1.65 fill →DROP`, `1.93–3.00 accel-roll →SURGE`.+- `hard_stop` @ 2 s; SURGE@1 (+0.21), DROP@2 (−0.28), SURGE@3 (+0.78).+- Two bursts: **1.125–1.542 s** and **2.042–2.708 s**, jumps every 0.125 s.+- Burst 1 starts ~2 frames _before_ downbeat 1.254 (lead the anchor); burst 2 opens on+ the 2 s `hard_stop` + 1.93 accel-roll, ends 1 frame before the 2.76 snare.++---++## How to change it++Everything is a **composition variable** — fill with `--variables` (no code edit).++### 1. The word (instant)++`markText` — the held word (always on screen; box never moves). `fontStyle`:+`display` (Impact, bold condensed caps) or `serif` (Georgia italic). `markScale`+(0.3–2) sizes it.++### 2. The texture frames — `frames` (the core content)++A JSON array of texture-flip frames, cycled by strobe-step index:++```jsonc+[+ { "texture": "tiles-138", "bg": "#ff70b0", "fill": "#f0a020", "ink": "#2a0f1d" },+ { "texture": "lava", "bg": "#101127", "fill": "#ff5a2c" },+ { "texture": "onyx", "bg": "#e8e2d6", "fill": "#3a3a44" },+ // texture = file name (no .png) from assets/texture-mask-text/masks/ (66 available)+]+```++- **Replace the texture image** → change `texture` (66 masks bundled: `tiles-138`,+ `lava`, `onyx`, `marble-016`, `wood-066`, `concrete`, `metal-041-a`, `bricks-075-a`,+ `grass-005`, `snow-015`, …). List them: `ls assets/texture-mask-text/masks/ | sed 's/\.png$//'`.+- **Replace the foreground color** → change `fill` (multiplied INTO the texture inside+ the letters: light fill = bright/clear glyph, dark = moody, `#ffffff` = texture's own+ color). `ink` is optional (UI/decor color).+- **Replace the frame background** → change `bg` (solid color behind the word that beat).+- Empty `frames` → the built-in 7-frame texture-flip set.++`idleColor` / `idleInk` set the between-burst plate (default white word on black).+`decor: yes` adds the blueprint grid + crop border per frame.++### 3. Match the changes to the beat — `strobePlan` (the core timing knob)++A JSON array of bursts; the template fires a **0 ms flip** at every jump time, cycling+`frames` by a global step counter, and cuts back to the idle base at each `end` (unless+the burst runs to the composition end → no terminal black, so the default never stops).++**Default (base template): one continuous burst the whole clip** — flicker, no stops:++```jsonc+[{ "start": 0, "end": 3, "step": 0.125 }] // jump every 0.125 s, 0 → duration+```++**gruop_4-faithful variant** (two bursts pinned to the rolls, black gaps between):++```jsonc+[+ { "start": 1.125, "end": 1.542, "step": 0.125 }, // jump every 0.125 s+ {+ "start": 2.042,+ "end": 2.708,+ "jumps": [+ 2.042,+ 2.167, // OR list exact times+ 2.292,+ 2.417,+ 2.5,+ 2.625,+ ],+ },+]+```++**Building `strobePlan` from an AudioMap:**++1. **Find the roll(s).** Each `rolls[]` entry (or dense onset cluster) → one burst.+2. **Burst start = lead the anchor.** Open ~40–190 ms _before_ the kick/downbeat that+ launches the roll, so the first flip lands _on_ the hit (gruop_4 burst 1 leads 1.254+ by ~85 ms → start 1.125).+3. **Jumps = the grid the roll plays.** A 449/min hi-hat roll ≈ every 0.125 s →+ `step:0.125`. Irregular roll → list the actual `events[].t` as `jumps[]` so every+ flip sits on a real onset.+4. **Burst end = the stop.** End on the `hard_stop` / last snare / `SURGE` snapped to the+ next anchor; the template cuts to the held-word-on-black base there.+5. **Order `frames` for accents.** Put the highest-contrast texture/bg on the index that+ lands on the downbeat/kick; a near-black `bg` frame reads as a 1–2 frame blink-off.++Rule of thumb (`motion-primitives.md`): hard hits are **0 ms** (all flips are `tl.set`,+never tweened) and a dense strobe runs **≤ 2–3 s** — keep bursts short, let the+`hard_stop` clear them.++---++## Files++- `index.html` — reference implementation (Texture-Flip default + beat-matched plan).+ `lint`: 0 errors (2 cosmetic warnings — `invalid_composition_variables_declaration`,+ shared with the base template; and `Impact` font, carried from texture-flip, Arial+ fallback). `validate`: 0 errors (the 5 WCAG 1:1 warnings are intrinsic to+ `background-clip:text` — the checker can't read texture-filled glyphs).+- `assets/` — `gsap.min.js` + `texture-mask-text/masks/*.png` (66), copied from+ `../texture-flip` so the template is self-contained.+- `card.json` — draft template card. `meta.json` — name / dims / 24 fps / 3 s.+- `renders/proof.mp4` — proof render of the built-in config.++## Provenance++Reversed from `bgm-golden-sample-reverse/gorup-by-group/group_4` (`gruop_4.mp4`,+`audiomap.json`, `gruop_4.bg-flicker.gemini-analysis.md`). Texture-Flip technique ++assets from `group_4/texture-flip`. Timeline/overlay shape scaffolded on+`group_1/webgl-textures-playground`.diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/gsap.min.js b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.pngnew file mode 100644index 0000000000..e8ef7b22c8Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.pngnew file mode 100644index 0000000000..b667059512Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.pngnew file mode 100644index 0000000000..c6ef2e8dfcBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.pngnew file mode 100644index 0000000000..e5dbd85c85Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.pngnew file mode 100644index 0000000000..d93562bccfBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.pngnew file mode 100644index 0000000000..34972a7555Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.pngnew file mode 100644index 0000000000..eef6bb632bBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.pngnew file mode 100644index 0000000000..63fd6d53f9Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.pngnew file mode 100644index 0000000000..4e021bcad1Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.pngnew file mode 100644index 0000000000..1099dac002Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.pngnew file mode 100644index 0000000000..1700282474Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.pngnew file mode 100644index 0000000000..f50ea3b537Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.pngnew file mode 100644index 0000000000..f0e97a5984Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.pngnew file mode 100644index 0000000000..81ee391306Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.pngnew file mode 100644index 0000000000..801e3395e2Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.pngnew file mode 100644index 0000000000..e24cf6ae88Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.pngnew file mode 100644index 0000000000..f1096a6909Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.pngnew file mode 100644index 0000000000..b89067723cBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.pngnew file mode 100644index 0000000000..f33f1eaf1cBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.pngnew file mode 100644index 0000000000..e85e5d952fBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.pngnew file mode 100644index 0000000000..e6cdb8f466Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.pngnew file mode 100644index 0000000000..a8d017a21cBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.pngnew file mode 100644index 0000000000..21a584b4d1Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.pngnew file mode 100644index 0000000000..e04342dc7fBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.pngnew file mode 100644index 0000000000..6fff792612Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.pngnew file mode 100644index 0000000000..3de2ac6c20Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.pngnew file mode 100644index 0000000000..497a868f2bBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.pngnew file mode 100644index 0000000000..d578034f88Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.pngnew file mode 100644index 0000000000..3a1a7c6d92Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.pngnew file mode 100644index 0000000000..dadbf8775bBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.pngnew file mode 100644index 0000000000..4488d924beBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.pngnew file mode 100644index 0000000000..4df7f99988Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.pngnew file mode 100644index 0000000000..22190c06dcBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.pngnew file mode 100644index 0000000000..4f12da06f9Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.pngnew file mode 100644index 0000000000..6372c33042Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.pngnew file mode 100644index 0000000000..acb356fd5aBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.pngnew file mode 100644index 0000000000..67459b9657Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.pngnew file mode 100644index 0000000000..e6da05e0e3Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.pngnew file mode 100644index 0000000000..9489f474c7Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.pngnew file mode 100644index 0000000000..572323d18eBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.pngnew file mode 100644index 0000000000..152d0a07c3Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.pngnew file mode 100644index 0000000000..ec7ff80574Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.pngnew file mode 100644index 0000000000..53a56bca3cBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.pngnew file mode 100644index 0000000000..75274de204Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.pngnew file mode 100644index 0000000000..4b6c651f68Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.pngnew file mode 100644index 0000000000..50c4b44867Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.pngnew file mode 100644index 0000000000..f561c52dbfBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.pngnew file mode 100644index 0000000000..f7a343cf43Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.pngnew file mode 100644index 0000000000..bc75b0d643Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.pngnew file mode 100644index 0000000000..80637b21f9Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.pngnew file mode 100644index 0000000000..952556b01fBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.pngnew file mode 100644index 0000000000..a7f5700632Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.pngnew file mode 100644index 0000000000..33c5ea9f1eBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.pngnew file mode 100644index 0000000000..f7b860cdb3Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.pngnew file mode 100644index 0000000000..d61cc6a193Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.pngnew file mode 100644index 0000000000..03feeeaa54Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.pngnew file mode 100644index 0000000000..bb3460b2f6Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.pngnew file mode 100644index 0000000000..9cf0bfa38dBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.pngnew file mode 100644index 0000000000..0cd7082242Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.pngnew file mode 100644index 0000000000..cbc9d247fcBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.pngnew file mode 100644index 0000000000..b044d573e0Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.pngnew file mode 100644index 0000000000..09ddadfb98Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.pngnew file mode 100644index 0000000000..435485ed38Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.pngnew file mode 100644index 0000000000..aed6c0a230Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.pngnew file mode 100644index 0000000000..f31c6059fcBinary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.png b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.pngnew file mode 100644index 0000000000..b61caa3850Binary files /dev/null and b/skills/bgm-to-video/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.png differdiff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/card.json b/skills/bgm-to-video/templates/held-text-strobe-burst/card.jsonnew file mode 100644index 0000000000..a75177183e--- /dev/null+++ b/skills/bgm-to-video/templates/held-text-strobe-burst/card.json@@ -0,0 +1,99 @@+{+ "id": "held-text-strobe-burst",+ "name": "Held Text / Strobe Burst",+ "one_line": "A dead-still word whose letters flip through texture-filled frames (texture-clipped fill + per-frame tint + bg color) every ~3 frames, in short bursts pinned to a roll.",+ "status": "promoted",+ "created": "2026-06-17",++ "match": {+ "structural_type": "dense_multiply",+ "requires": {+ "energy_level": ">=MEDIUM",+ "density": "dense",+ "onset_gap_bars": "<=0.5",+ "has_steady_grid": true,+ "has_roll": true+ },+ "mood_fit": ["hype", "glitch", "aggressive", "playful"],+ "span_bars": [1, 2],+ "exit_trigger": ["hard_stop", "surge"],+ "notes": "Candidate dedicated structural_type `held_strobe` (held message + strobe field). Using `dense_multiply` (rubric: dense+HIGH → field/grid/strobe) until the type list grows."+ },++ "examples": [+ {+ "sample": "bgm_test_2",+ "group": "g4",+ "bpm": 129,+ "energy": 0.5,+ "density": "dense",+ "onset_gap_bars": 0.23,+ "span_sec": [0.0, 3.01],+ "bursts_sec": [+ [1.125, 1.542],+ [2.042, 2.708]+ ],+ "burst_drivers": "accel-roll 1.93-3.00 (→SURGE) + fill 1.21-1.65 (→DROP); jumps every ~0.125s (3f@24fps)"+ }+ ],++ "roles": {+ "message": {+ "kind": "message",+ "motion": "hold",+ "anchor": "entry.downbeat",+ "notes": "the held anchor: word box locked (no x/y/scale), always on screen. Its FILL flips per strobe step — each letterform is a texture PNG (background-clip:text) × a multiply tint (the foreground 'color'). Between bursts it falls back to a solid idleInk word on idle plate. This is the Texture-Flip technique reversed from gruop_4 burst 2."+ },+ "field": {+ "kind": "background",+ "motion": "strobe",+ "anchor": "roll",+ "notes": "per-frame solid bg color behind the word, hard-set (0ms) on each roll-grid subdivision via a stacked opacity flip-book. Base-template default flickers continuously across the whole clip; cuts back to idleColor (clean black) only at a burst end that is < composition end (so multi-burst plans get black gaps, the continuous default never stops)."+ }+ },++ "params": {+ "markText": { "type": "string", "maps_to": "message.content", "default": "NAMSHI" },+ "fontStyle": {+ "type": "select",+ "maps_to": "message.font",+ "options": ["display", "serif"],+ "default": "display"+ },+ "markScale": { "type": "number", "maps_to": "message.scale", "default": 1 },+ "idleColor": { "type": "color", "maps_to": "field.idle_bg", "default": "#000000" },+ "idleInk": { "type": "color", "maps_to": "message.idle_ink", "default": "#ffffff" },+ "frames": {+ "type": "string",+ "maps_to": "strobe.frames",+ "notes": "JSON [{texture,bg,fill,ink?,pos?}]; texture = file under assets/texture-mask-text/masks/ (66 available). Empty = built-in texture-flip set. Cycled by strobe-step index."+ },+ "strobePlan": {+ "type": "string",+ "maps_to": "field.plan",+ "notes": "JSON array of bursts {start,end,step|jumps[]}; built from the audiomap. Empty = built-in CONTINUOUS plan [{start:0,end:duration,step:0.125}] (base-template default: flicker the whole clip, never stop). gruop_4-faithful two-burst look = [{start:1.125,end:1.542,step:0.125},{start:2.042,end:2.708,step:0.125}]."+ },+ "decor": {+ "type": "select",+ "options": ["no", "yes"],+ "default": "no",+ "notes": "blueprint grid + crop border per frame"+ },+ "duration": { "type": "number", "from": "group.span_sec length" }+ },++ "reference_impl": "index.html",+ "bundled_assets": "assets/ (gsap.min.js + texture-mask-text/masks/*.png ×66), copied from ../texture-flip",+ "uses_primitives": [+ "content_swap",+ "hard_cut",+ "palette_flip",+ "system_replace",+ "negative_space_hold",+ "flash_cut"+ ],++ "transition_out": { "default": "fast_cut", "observed": "hard_cut_to_black" },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_4"]+}diff --git a/skills/bgm-to-video/templates/held-text-strobe-burst/index.html b/skills/bgm-to-video/templates/held-text-strobe-burst/index.htmlnew file mode 100644index 0000000000..65599a8cc5--- /dev/null+++ b/skills/bgm-to-video/templates/held-text-strobe-burst/index.html@@ -0,0 +1,302 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"markText", "type":"string", "label":"Held word", "default":"NAMSHI"},+ {"id":"fontStyle", "type":"select", "label":"Font style", "options":["display","serif"], "default":"display"},+ {"id":"markScale", "type":"number", "label":"Word size scale", "default":1, "min":0.3, "max":2, "step":0.05},+ {"id":"idleColor", "type":"color", "label":"Idle background (between bursts)", "default":"#000000"},+ {"id":"idleInk", "type":"color", "label":"Idle word color", "default":"#ffffff"},+ {"id":"frames", "type":"string", "label":"Texture frames JSON (empty=built-in)", "default":""},+ {"id":"strobePlan", "type":"string", "label":"Strobe plan JSON bursts (empty=built-in)", "default":""},+ {"id":"decor", "type":"select", "label":"Blueprint grid + crop border", "options":["no","yes"], "default":"no"}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Held Text / Strobe Burst (Texture Flip) — Template</title>+ <script src="assets/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ width: 100%;+ height: 100%;+ background: #000;+ overflow: hidden;+ }++ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: #000;+ font-family: Arial, sans-serif;+ }++ /* Persistent base: the held word on the idle plate. Always visible; the+ texture looks flip ON TOP of it during bursts, so the word reads as+ continuously held (anchor) and falls back to a solid color on black+ between bursts. */+ .base {+ position: absolute;+ inset: 0;+ background: var(--idle-bg, #000);+ }++ /* One full-frame layer per texture frame. Only opacity is toggled — a+ seek-safe flip-book (deterministic under frame-by-frame render). */+ .look {+ position: absolute;+ inset: 0;+ overflow: hidden;+ opacity: 0;+ background: var(--bg);+ }+ /* optional blueprint grid */+ .look.decor::before,+ .base.decor::before {+ content: "";+ position: absolute;+ inset: 0;+ background-image:+ linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),+ linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);+ background-size: 72px 72px;+ opacity: 0.18;+ mix-blend-mode: soft-light;+ }+ /* optional inner crop border */+ .look.decor::after,+ .base.decor::after {+ content: "";+ position: absolute;+ inset: 44px;+ border: 5px solid rgba(255, 255, 255, 0.22);+ border-radius: 4px;+ }++ .word-wrap {+ position: absolute;+ inset: 0;+ z-index: 8;+ display: flex;+ align-items: center;+ justify-content: center;+ filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.28));+ }++ /* THE technique: the word's letterforms are a window — a solid tint+ (multiply-blended) over a texture image, clipped to the text. */+ .word {+ color: transparent;+ background-color: transparent;+ background-image: var(--solid-fill), var(--texture-url);+ background-blend-mode: multiply;+ background-size:+ 100% 100%,+ var(--texture-size, 150% 150%);+ background-position: center, var(--texture-position, center);+ background-repeat: repeat;+ -webkit-background-clip: text;+ background-clip: text;+ text-align: center;+ white-space: nowrap;+ }+ /* solid-fill variant for the idle base word (no texture) */+ .word.solid {+ background-image: none;+ color: var(--ink, #fff);+ -webkit-text-fill-color: var(--ink, #fff);+ }++ .word.display {+ font-family: Impact, "Arial Black", Arial, sans-serif;+ font-size: 470px;+ font-weight: 900;+ /* line-height ≥ 1 so the background-paint box encloses the full glyph;+ with line-height < 1 the cap tops/bottoms overflow the box and the+ texture (clipped to text) leaves untextured slivers there. */+ line-height: 1.05;+ text-transform: uppercase;+ transform: scaleX(0.78);+ -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);+ }+ .word.serif {+ font-family: Georgia, "Times New Roman", serif;+ font-size: 360px;+ font-weight: 500;+ font-style: italic;+ line-height: 1.05;+ }+ </style>+ </head>+ <body>+ <div+ id="root"+ data-composition-id="held-text-strobe-burst"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="3"+ data-root="true"+ >+ <!-- .base (held word on idle plate) and .look layers are injected by JS -->+ </div>++ <script>+ (function () {+ // Built-in texture frames (texture-flip palette). texture = file name+ // (no .png) under assets/texture-mask-text/masks/.+ var BUILTIN_FRAMES =+ '[{"texture":"tiles-138","bg":"#ff70b0","fill":"#f0a020","ink":"#2a0f1d"},' ++ '{"texture":"paving-stones-150","bg":"#f0d020","fill":"#d07838","ink":"#2a2410"},' ++ '{"texture":"metal-041-a","bg":"#1050e0","fill":"#9fd0ff","ink":"#eaf2ff"},' ++ '{"texture":"lava","bg":"#101127","fill":"#ff5a2c","ink":"#ffd9c2"},' ++ '{"texture":"ground-080","bg":"#0f7a5a","fill":"#ffd27a","ink":"#04241a"},' ++ '{"texture":"onyx","bg":"#e8e2d6","fill":"#3a3a44","ink":"#1a1a22"},' ++ '{"texture":"bricks-075-a","bg":"#ff9000","fill":"#7fb0c0","ink":"#241400"}]';++ // Built-in plan: as a BASE template the default is one continuous burst+ // across the whole composition — flips every 0.125s (≈3f@24fps), never+ // stops, never cuts to idle. (For the gruop_4-faithful two-burst look,+ // pass strobePlan = [{start:1.125,end:1.542,step:.125},{start:2.042,end:2.708,step:.125}].)+ var BUILTIN_PLAN = '[{"start":0,"end":3,"step":0.125}]';++ var defaults = {+ markText: "NAMSHI",+ fontStyle: "display",+ markScale: 1,+ idleColor: "#000000",+ idleInk: "#ffffff",+ frames: "",+ strobePlan: "",+ decor: "no",+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ var root = document.getElementById("root");+ var masksDir = "assets/texture-mask-text/masks";+ var style = vars.fontStyle === "serif" ? "serif" : "display";+ var decor = vars.decor === "yes";+ var scale = Number(vars.markScale) || 1;++ function parse(str, fallback) {+ var v = str && String(str).trim() ? str : fallback;+ try {+ var p = JSON.parse(v);+ return Array.isArray(p) ? p : [];+ } catch (e) {+ return [];+ }+ }+ var frames = parse(vars.frames, BUILTIN_FRAMES);+ var plan = parse(vars.strobePlan, BUILTIN_PLAN);++ // Apply word size scale (relative to the per-style base size).+ var baseSize = style === "serif" ? 360 : 470;++ function makeWord(extraClass) {+ var word = document.createElement("div");+ word.className = "word " + style + (extraClass ? " " + extraClass : "");+ word.textContent = String(vars.markText);+ word.style.fontSize = baseSize * scale + "px";+ return word;+ }+ function wrap(word) {+ var w = document.createElement("div");+ w.className = "word-wrap";+ w.appendChild(word);+ return w;+ }++ // ── Persistent base: held word on the idle plate ──────────────────+ var base = document.createElement("div");+ base.className = "base" + (decor ? " decor" : "");+ base.style.setProperty("--idle-bg", vars.idleColor);+ var baseWord = makeWord("solid");+ baseWord.style.setProperty("--ink", vars.idleInk);+ base.appendChild(wrap(baseWord));+ root.appendChild(base);++ // ── One stacked .look per texture frame ───────────────────────────+ var looks = frames.map(function (f) {+ var look = document.createElement("div");+ look.className = "look" + (decor ? " decor" : "");+ look.style.setProperty("--bg", f.bg || "#000");+ var word = makeWord("");+ word.style.setProperty("--texture-url", 'url("' + masksDir + "/" + f.texture + '.png")');+ word.style.setProperty(+ "--solid-fill",+ "linear-gradient(" + (f.fill || "#fff") + "," + (f.fill || "#fff") + ")",+ );+ if (f.pos) word.style.setProperty("--texture-position", f.pos);+ look.appendChild(wrap(word));+ root.appendChild(look);+ return look;+ });++ // ── Deterministic, beat-quantized timeline ────────────────────────+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });+ gsap.set(looks, { opacity: 0 });+ var compDur = Number(root.getAttribute("data-duration")) || 3;++ function gridJumps(start, end, stp) {+ var s = Number(start) || 0,+ e = Number(end) || s,+ d = Number(stp) || 0.125;+ var out = [],+ n = Math.max(0, Math.floor((e - s) / d + 1e-6) + 1);+ for (var i = 0; i < n; i++) out.push(+(s + i * d).toFixed(4));+ return out;+ }++ // For each burst: flip a fresh texture look on every jump (0ms), cycling+ // frames by a global step index; clear back to the idle base at end.+ var step = 0;+ var prev = null;+ plan.forEach(function (burst) {+ var jumps =+ Array.isArray(burst.jumps) && burst.jumps.length+ ? burst.jumps.slice()+ : gridJumps(burst.start, burst.end, burst.step);+ jumps.forEach(function (t) {+ if (!looks.length) return;+ var cur = looks[step % looks.length];+ if (prev && prev !== cur) tl.set(prev, { opacity: 0 }, t);+ tl.set(cur, { opacity: 1 }, t);+ prev = cur;+ step += 1;+ });+ // clean cut back to idle base (held word on black) at burst end —+ // but NOT when the burst runs to the composition end, so the strobe+ // never blacks out / stops on the last frame.+ if (prev && burst.end < compDur - 1e-6) {+ tl.set(prev, { opacity: 0 }, burst.end);+ prev = null;+ }+ });++ // pin total duration+ tl.set({}, {}, compDur);++ window.__timelines["held-text-strobe-burst"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/README.md b/skills/bgm-to-video/templates/intro-kinetic-cascade/README.mdnew file mode 100644index 0000000000..cdaecee928--- /dev/null+++ b/skills/bgm-to-video/templates/intro-kinetic-cascade/README.md@@ -0,0 +1,96 @@+# Intro Kinetic Cascade · editorial phrase cascade with icon climax — `intro-kinetic-cascade`++A spoken / anchored line laid out as a sequence of big **editorial phrases** — each a+stacked poster with one enlarged accent **hero word** — revealed **word-by-word** on its+anchors, **hard cut-out** between phrases, climaxing on a phrase that **slides in** with a+**swappable, ringing icon** (bell / cursor / sparkle / … or any emoji / SVG).++> **Origin — a VO launch-video intro, adapted for the catalog.** Internalized from+> `act0-intro-bell` (the voiceover intro of the Timeline-Editor launch video). Its reveal+> times are **transcript word onsets**, so in origin it is **narration-driven**, not a+> beat-reversed musical group — bind `phrases[].times` to audio onsets to use it+> beat-driven. The original's Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP are+> dropped here for an **offline** build, and the bell is now a **swappable icon**.++## Files++```+intro-kinetic-cascade/+ card.json ← the spec (match-face + build-face) · status: promoted+ index.html ← reference impl (parameterized GSAP; data-driven phrases + icon)+ program.json ← the default act0 phrases + climax (standalone, editable)+ assets/gsap.min.js ← bundled GSAP (offline-safe)+ renders/recreate.mp4 ← rendered proof @30fps (default light + bell)+```++No fonts bundled — system grotesque stack (`"Inter","Helvetica Neue",Arial`); the serif+hero falls back `Playfair Display → Georgia` (drop a Playfair woff2 + `@font-face` for the+exact source face). Icons are **inline SVG** (no Lottie). No remote assets.++## How it moves++Each **phrase** is a vertically-centered, left-aligned stack of lines — a small word, a+HUGE accent **hero word**, a closing line — with per-line `size` + `x` indent for the+editorial diagonal. Words **fade in one-by-one** on their anchors, the phrase holds, then+**hard cuts out**. The finale **climax** slides in from offscreen-right and **holds**,+carrying the ringing icon.++| stage | what | anchor |+| --------------- | -------------------------------------------------------------- | ------------------- |+| phrase reveal | words fade in within a held poster (hero line big + accent) | `phrases[].times[]` |+| cut-out | phrase opacity → 0 (hard) | `out − 0.10` |+| climax slide-in | finale lockup slides x 1400→0, holds to end | `climax.in` |+| icon ring | glyph pops (scale 0.4→1) + damped wiggle + two expanding rings | `climax.iconAt` |++## The icon knob (match it to the scene)++`icon` picks the ringing climax glyph. Built-in inline-SVG library:++`bell` (timing/alerts) · `cursor` (a click/UI) · `sparkle` (AI/magic) · `bolt` (speed) ·+`play` (video) · `check` (done) · `heart` (like) · `star` (featured)++…or pass an **emoji** (`"🔔"`, `"⚡️"`), a raw **`<svg>…</svg>`** string, or `"none"` for a+pure-text climax. The pop + ring emphasis is generic, so any glyph "rings". The `{icon}`+token in `climax.text` marks where it lands.++## Themes++`theme` = `light` (default — the act0 editorial look), `dark`, or `bold`. Each is an+AA-tuned palette (field bg + ink + a hero-accent ramp incl. a `"gradient"` sweep).++## Parameters (swap freely)++- `theme` — `light` | `dark` | `bold` (default `light`).+- `icon` — climax glyph: a library name, an emoji, a raw `<svg>`, or `none` (default `bell`).+- `phrases` — **JSON array** of `{ lines:[{text,size,x,hero?,accent?,font?}], out, times? }`.+ `times` (per word, reading order) = the VO/onset anchors; omit → auto-spread across the+ phrase. Empty → the built-in 3-phrase act0 intro.+- `climax` — **JSON object** `{ text, in, iconAt, hold, size }`; `text` embeds `{icon}`.+ Empty → the built-in `timing is {icon} tricky.`++Fill with `--variables` (read via `window.__hyperframes.getVariables()`):++```bash+npx hyperframes render intro-kinetic-cascade -f 30 --strict-variables \+ --variables '{"theme":"dark","icon":"sparkle","climax":"{\"text\":\"editing just got {icon} magic.\",\"in\":3.79,\"iconAt\":4.9,\"hold\":1.3,\"size\":150}"}'+```++## Aligning to a track (VO or beat)++- Precise sync: set each phrase's `times` to the word onset seconds (a transcript for VO,+ or `audiomap` onsets for a beat). Put the key word of each phrase on the strongest hit;+ land the climax icon on a downbeat / surge.+- Quick layout: drop `times` and the engine auto-spreads each phrase's words evenly.++## Verify++```bash+npx hyperframes lint intro-kinetic-cascade # clean+npx hyperframes validate intro-kinetic-cascade # no console errors · text passes WCAG AA+npx hyperframes render intro-kinetic-cascade -f 30+```++## Status++`promoted` — in the catalog, matchable by the Director. VO-origin: when first matched to a+real musical group, add that group as an `examples[]` entry and tighten `match.requires`.diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/assets/gsap.min.js b/skills/bgm-to-video/templates/intro-kinetic-cascade/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/intro-kinetic-cascade/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/card.json b/skills/bgm-to-video/templates/intro-kinetic-cascade/card.jsonnew file mode 100644index 0000000000..2a7f56a046--- /dev/null+++ b/skills/bgm-to-video/templates/intro-kinetic-cascade/card.json@@ -0,0 +1,164 @@+{+ "id": "intro-kinetic-cascade",+ "name": "Intro Kinetic Cascade · editorial phrase cascade with icon climax",+ "one_line": "A spoken/anchored line laid out as a sequence of big editorial PHRASES — each a stacked poster with one enlarged accent HERO word — revealed word-by-word on its anchors, hard cut-out between phrases, climaxing on a phrase that SLIDES in with a swappable, ringing ICON (bell / cursor / sparkle / … or any emoji / SVG).",+ "status": "promoted",+ "created": "2026-06-17",++ "base_template": {+ "primitive": "editorial_phrase_cascade",+ "notes": "A narration/anchor-driven kinetic-typography intro. Each PHRASE is a vertically-centered, left-aligned stack of lines (small word / BIG accent hero word / closing words) with per-line size + indent for an editorial diagonal composition. Words reveal one-by-one on their anchors (VO word-times OR audio onsets), the phrase holds, then HARD cuts out before the next. The finale is a CLIMAX phrase that slides in from offscreen-right and HOLDS, carrying a swappable inline ICON that pops + rings. Phrase count, words-per-line, and the icon are all DATA, so any sentence + any scene icon 'just works'. Asset-free: system type, inline-SVG icon library, bundled GSAP."+ },++ "themes": {+ "_": "Palette presets (the `theme` param). Accents are AA-tuned on each bg. ink = body/closing words; accents[] = hero words (cycled per phrase); 'gradient' = animated sweep between gradFrom/gradTo.",+ "light": "editorial light — near-white field, near-black ink, deep green / ocean / sweep accents (DEFAULT; the act0 look)",+ "dark": "dark field, off-white ink, vivid green / cyan / sweep accents",+ "bold": "deep-navy field, white ink, amber / pink / sweep accents"+ },++ "icons": {+ "_": "The climax ICON is its own knob (`icon`) so it can match the scene. Built-in inline-SVG library (asset-free, fill follows the text color); or pass an emoji, a raw <svg>…</svg> string, or 'none' for a pure-text climax. The pop + ring + wiggle emphasis is generic, so any glyph 'rings'.",+ "library": ["bell", "cursor", "sparkle", "bolt", "play", "heart", "check", "star"],+ "examples": "bell → timing/alerts · cursor → a click/UI · sparkle → AI/magic · bolt → speed · play → video · check → done · heart → like · star → featured"+ },++ "match": {+ "structural_type": "per_onset_sequential",+ "requires": {+ "energy_level": ">=MEDIUM",+ "has_steady_grid": true,+ "density": ["medium", "dense"]+ },+ "mood_fit": ["bold", "elegant", "playful", "hype", "cinematic"],+ "span_bars": [2, 8],+ "exit_trigger": ["downbeat", "surge", "hard_stop", "end"],+ "notes": "Reach for this for an INTRO / opening statement: a short narrated or anchored line you want to land word-by-word as big editorial type, climaxing on one keyword + icon. Each word reveal lands on one anchor (per_onset_sequential), so it shares the structural_type with the typewriter / logo-sting templates; it is discriminated by laying the line out as a SEQUENCE OF WHOLE PHRASES (big mixed-size posters with a colored hero word, hard-cut between) and by a slide-in ICON climax — not one typed message, not a card deck. ORIGIN is VO-driven (reveal times come from a transcript); in a beat context bind `phrases[].times` to onset seconds instead. If there is no readable line to speak/anchor (pure abstract field) this is the wrong template."+ },++ "examples": [+ {+ "sample": "timeline-launch-video",+ "group": "act0-intro-bell",+ "vo_origin": true,+ "structural_type": "per_onset_sequential",+ "energy_level": "MEDIUM",+ "density": "medium",+ "phrases": 3,+ "span_sec": [0.0, 6.2],+ "line": "If you've EVER used AI / for VIDEO editing before, / you KNOW that / timing is 🔔 tricky.",+ "word_times_sec": [0.14, 0.3, 0.55, 0.87, 1.06, 1.36, 1.58, 1.92, 2.48, 3.06, 3.3, 3.54],+ "climax": { "text": "timing is {icon} tricky.", "in": 3.79, "iconAt": 4.9, "icon": "bell" },+ "exit_trigger": { "type": "end", "time": 6.2 },+ "note": "Reversed from the VO intro `act0-intro-bell` (golden_sample_reverse/.../timeline-launch-video). Reveal times are VO WORD onsets (a transcript), not audiomap musical onsets — so the cadence is real but its driver is narration. The original used a Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP; this promoted impl is offline (system type + bundled GSAP) and the bell is an inline-SVG library icon (now swappable per scene). Bind `times` to audio onsets to use it beat-driven."+ }+ ],++ "roles": {+ "phrase": {+ "kind": "message",+ "motion": "word_cascade_reveal",+ "anchor": "phrases[].times[]",+ "notes": "Each phrase is a stacked editorial poster, vertically centered. Its words fade in one-by-one on their anchor times (explicit `times`, else auto-spread across the phrase), the phrase holds, then HARD cuts out (opacity→0) at `out`. PROPOSED verb 'word_cascade_reveal' (per-anchor word fade within a held poster). ~typewriter_reveal."+ },+ "hero": {+ "kind": "message",+ "motion": "accent_blowup",+ "anchor": "phrases[].times[] (the hero line's word)",+ "notes": "One line per phrase is the HERO — much larger (≈500px) and colored from the theme accent ramp (cycled per phrase), optionally serif-italic ('ever') or an animated 'gradient' sweep ('know'). Carries the key word of each phrase. PROPOSED verb 'accent_blowup'."+ },+ "climax": {+ "kind": "message",+ "motion": "slide_in_lockup",+ "anchor": "climax.in",+ "notes": "The finale phrase SLIDES in from offscreen-right (x 1400→0, power3.out) and HOLDS to the end (it does NOT cut out). Mixed body + one inline icon. PROPOSED verb 'slide_in_lockup'."+ },+ "icon": {+ "kind": "asset",+ "motion": "icon_ring",+ "anchor": "climax.iconAt",+ "notes": "A swappable inline glyph in the climax (the {icon} token): pops in (scale 0.4→1, back.out), does a damped ring-wiggle (rotation), and emits two expanding rings. Resolves `icon` to a library SVG, a custom <svg>, an emoji/text glyph, or nothing. PROPOSED verb 'icon_ring'. ~radial_burst_lines for the rings."+ },+ "field": {+ "kind": "background",+ "motion": "hold",+ "anchor": "none",+ "notes": "A flat solid field (theme bg). Dead still; only the type moves. negative_space_hold."+ }+ },++ "params": {+ "theme": {+ "type": "string",+ "maps_to": "palette (see themes)",+ "default": "light",+ "notes": "Palette preset: light | dark | bold. Sets bg + ink + the hero accent ramp."+ },+ "icon": {+ "type": "string",+ "maps_to": "climax.{icon} token (see icons)",+ "default": "bell",+ "notes": "The ringing climax icon — MATCH IT TO THE SCENE. A library name (bell|cursor|sparkle|bolt|play|heart|check|star), an emoji, a raw <svg>…</svg> string, or 'none' (pure-text climax)."+ },+ "phrases": {+ "type": "string",+ "maps_to": "engine.phrases",+ "default": "",+ "notes": "JSON array of phrase objects { lines:[{text,size,x,hero?,accent?,font?}], out, times? }. `times` (per word, reading order) = the VO/onset anchors; omit to auto-spread. Empty = the built-in 3-phrase act0 intro."+ },+ "climax": {+ "type": "string",+ "maps_to": "engine.climax",+ "default": "",+ "notes": "JSON object { text, in, iconAt, hold, size }. `text` embeds {icon} where the icon rings. Empty = the built-in 'timing is {icon} tricky.'"+ }+ },++ "engine": {+ "model": "data phrases + climax + icon + theme. The phrase posters, the climax lockup, the icon library, and the palette themes are fixed code; WHAT they say + WHEN (the anchors) + WHICH icon + WHICH palette are DATA. Word anchors are explicit `times` (VO word-times or audio onsets) or auto-spread across each phrase. Compose by editing the `phrases` / `climax` / `icon` / `theme` DATA — never the engine.",+ "compose_by": ["theme", "icon", "phrases", "climax"],+ "extend": "add a palette = a THEMES entry (bg + ink + accents + gradFrom/gradTo); add an icon = an ICONS entry (an inline-SVG path); restyle a phrase via line size/x/hero/accent/font. To rebuild the motion (slide direction, ring count) edit the timeline, not the data."+ },++ "program_format": {+ "_": "`phrases` is a JSON array; `climax` is a JSON object. Times are absolute seconds (VO word onsets, or audio onsets in a beat context).",+ "phrase": {+ "lines": "[{ text, size(px), x(indent px), hero?(bool → big accent line), accent?('#hex'|'gradient'), font?('display'|'serif') }]",+ "out": "number — seconds the phrase cuts out",+ "times": "number[]? — per-WORD reveal seconds, reading order across all lines; omit → auto-spread evenly across the phrase",+ "start": "number? — first-word time when `times` omitted (default = previous phrase `out`)"+ },+ "climax": {+ "text": "string — words + a {icon} token where the icon rings",+ "in": "number — slide-in start",+ "iconAt": "number — when the icon pops + rings",+ "hold": "number — tail hold after the ring (sets total duration = iconAt + hold)",+ "size": "number — word size px (the icon scales from it)"+ }+ },++ "reference_impl": "index.html",+ "program_data": "program.json (the default act0 phrases + climax as standalone, agent-editable data)",+ "uses_primitives": [+ "typewriter_reveal",+ "content_swap",+ "kinetic_letter_in",+ "radial_burst_lines",+ "negative_space_hold"+ ],+ "uses_primitives_notes": "word_cascade_reveal / accent_blowup / slide_in_lockup / icon_ring are PROPOSED custom phrases the impl defines (per-anchor word fade in a held poster; an enlarged accent hero word; an offscreen slide-in finale; an icon pop + ring-wiggle + expanding rings). typewriter_reveal backs the per-word reveal; content_swap the hard cut-out between phrases; radial_burst_lines the rings; negative_space_hold the static field.",++ "bundled_assets": "assets/gsap.min.js (offline GSAP). No fonts bundled — system stack ('Inter','Helvetica Neue',Arial; serif hero falls back Playfair→Georgia). Icons are inline SVG (no Lottie). No remote assets.",++ "transition_out": { "default": "fast_cut", "observed": "fast_cut" },++ "reversed_from": [+ "golden_sample_reverse/templates/intro-kinetic-cascade",+ "golden_sample_reverse/hyperframes-selected/timeline-launch-video/compositions/act0-intro-bell.html"+ ],+ "origin": "vo-launch-intro",+ "provenance": {+ "source": "act0-intro-bell — the VO intro of the Timeline-Editor launch video (timeline-launch-video).",+ "note": "VO/narration-driven in origin (reveal times = transcript word onsets), NOT a beat-reversed musical group — so the match-face is a reasonable hypothesis for the BGM Director, and reveal times should be bound to audio onsets when used beat-driven. Adapted for the catalog: dropped the remote deps (Lottie bell + Google-Fonts Inter/Playfair + CDN GSAP) for an offline build (system type + bundled GSAP + inline-SVG icons), parameterized the content (phrases/climax) and palette (themes), and made the climax icon a swappable, scene-matched knob. First time it is matched to a real musical group, add that group as an example and tighten requires."+ }+}diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/index.html b/skills/bgm-to-video/templates/intro-kinetic-cascade/index.htmlnew file mode 100644index 0000000000..37955e957d--- /dev/null+++ b/skills/bgm-to-video/templates/intro-kinetic-cascade/index.html@@ -0,0 +1,512 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"theme", "type":"string", "label":"Palette — light | dark | bold", "default":"light"},+ {"id":"icon", "type":"string", "label":"Climax icon — bell|cursor|sparkle|bolt|play|heart|check|star, an emoji, <svg>, or none", "default":"bell"},+ {"id":"phrases", "type":"string", "label":"Phrases JSON (empty = built-in intro)", "default":""},+ {"id":"climax", "type":"string", "label":"Climax JSON {text,in,iconAt,hold,size} (empty = default)","default":""}+ ]'+>+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Intro Kinetic Cascade · beat-synced kinetic typography — reference impl</title>+ <script src="./assets/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: #f5f5f7;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: #f5f5f7;+ color: #1d1d1f;+ font-family: "Inter", "Helvetica Neue", Arial, sans-serif;+ }+ #stage {+ position: absolute;+ inset: 0;+ }++ /* A PHRASE = a stacked, left-aligned editorial poster, vertically centered.+ Word-by-word reveal, then a hard cut-out. */+ .phrase {+ position: absolute;+ left: 0;+ right: 0;+ top: 50%;+ transform: translateY(-50%);+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ opacity: 0;+ will-change: opacity;+ }+ .line {+ font-weight: 900;+ letter-spacing: -0.045em;+ line-height: 0.88;+ white-space: nowrap;+ }+ .line + .line {+ margin-top: -0.04em;+ }+ /* the HERO line's elegant serif-italic contrast (offline system fallback) */+ .line.serif {+ font-family: "Playfair Display", Georgia, "Times New Roman", serif;+ font-style: italic;+ letter-spacing: -0.02em;+ }+ .w {+ display: inline-block;+ opacity: 0;+ will-change: opacity;+ }+ .w.grad {+ background: var(--grad);+ background-size: 200% 100%;+ background-position: 0% 50%;+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ color: transparent;+ }++ /* The CLIMAX phrase SLIDES in, holds to the end, and may carry an inline+ animated icon (the {icon} token). */+ .climax {+ position: absolute;+ left: 50%;+ top: 50%;+ display: flex;+ align-items: center;+ gap: 0.32em;+ white-space: nowrap;+ opacity: 0;+ font-weight: 900;+ letter-spacing: -0.035em;+ line-height: 1;+ will-change: transform, opacity;+ }+ .cword {+ flex-shrink: 0;+ }+ .icon {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ position: relative;+ flex-shrink: 0;+ opacity: 0;+ overflow: visible;+ line-height: 1;+ }+ .icon-glyph {+ position: relative;+ display: flex;+ align-items: center;+ justify-content: center;+ transform-origin: 50% 14%;+ }+ .icon-glyph svg {+ display: block;+ width: 100%;+ height: 100%;+ }+ .ring {+ position: absolute;+ left: 50%;+ top: 50%;+ border-radius: 50%;+ border: 3px solid var(--ring1);+ opacity: 0;+ transform: translate(-50%, -50%) scale(0.4);+ }+ .ring.ring2 {+ border-color: var(--ring2);+ }+ </style>+ </head>+ <body>+ <div+ data-hf-id="hf-ikc-root"+ id="root"+ data-composition-id="intro-kinetic-cascade"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="7"+ data-root="true"+ >+ <div data-hf-id="hf-ikc-stage" id="stage"></div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════════+ // INTRO KINETIC CASCADE · beat-synced editorial kinetic typography+ // ────────────────────────────────────────────────────────────────────+ // A spoken/anchored line laid out as a sequence of big editorial PHRASES,+ // each revealed word-by-word on its anchors (VO word-times OR audio onsets),+ // hard cut-out between them, climaxing on a phrase that SLIDES in with a+ // swappable, ringing ICON. Asset-free: system type, inline-SVG icon library,+ // bundled GSAP. Reversed from the VO intro `act0-intro-bell`.+ //+ // COMPOSE BY DATA — `phrases` (the cascade) + `climax` (the finale) + `icon`+ // (which glyph rings) + `theme` (palette). The icon is its own knob so it can+ // match the scene: bell for timing, cursor for a click, sparkle for AI, …+ // ════════════════════════════════════════════════════════════════════++ window.__timelines = window.__timelines || {};++ // ── 1. Variables ──+ var defaults = { theme: "light", icon: "bell", phrases: "", climax: "" };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // ── 2. Palette themes (accents are AA-tuned on each bg) ──+ var THEMES = {+ light: {+ bg: "#f5f5f7",+ ink: "#1d1d1f",+ accents: ["#0b8a3e", "#0a78b4", "gradient"],+ gradFrom: "#0a78b4",+ gradTo: "#0b8a3e",+ },+ dark: {+ bg: "#0d0e12",+ ink: "#f2f3f5",+ accents: ["#3be06b", "#37c6ff", "gradient"],+ gradFrom: "#37c6ff",+ gradTo: "#3be06b",+ },+ bold: {+ bg: "#0a1228",+ ink: "#ffffff",+ accents: ["#ffd23f", "#ff5da2", "gradient"],+ gradFrom: "#ff5da2",+ gradTo: "#ffd23f",+ },+ };+ var TH = THEMES[String(vars.theme || "").trim()] || THEMES.light;++ function hexRgba(hex, a) {+ var h = String(hex).replace(/^#/, "");+ if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];+ var n = parseInt(h, 16);+ return (+ "rgba(" + ((n >> 16) & 255) + "," + ((n >> 8) & 255) + "," + (n & 255) + "," + a + ")"+ );+ }++ // ── 3. Inline-SVG icon library (asset-free; fill follows the text color) ──+ var ICONS = {+ bell: '<path d="M12 2.2a1.9 1.9 0 0 1 1.9 1.9v.7a6.2 6.2 0 0 1 4.3 5.9v3.5l1.9 2.1v1.1H3.9v-1.1l1.9-2.1V10.7a6.2 6.2 0 0 1 4.3-5.9v-.7A1.9 1.9 0 0 1 12 2.2zM9.6 19.6h4.8a2.4 2.4 0 0 1-4.8 0z"/>',+ cursor: '<path d="M5.5 2.6l13.4 7.9-5.9 1.2-1.1 5.9-6.4-15z"/>',+ sparkle: '<path d="M12 1.8l2.1 6.9 6.9 2.1-6.9 2.1L12 19.8l-2.1-6.9L3 10.8l6.9-2.1z"/>',+ bolt: '<path d="M13.2 1.8L4.4 13.6h5.6l-1.2 8.6 9.2-12.4h-5.8z"/>',+ play: '<path d="M12 2.4a9.6 9.6 0 1 0 0 19.2 9.6 9.6 0 0 0 0-19.2zm-2.1 5.1l6 4.5-6 4.5z"/>',+ heart:+ '<path d="M12 21.2S2.8 15.4 2.8 8.9C2.8 5.8 5.1 4 7.6 4c1.9 0 3.4 1.1 4.4 2.6C13 5.1 14.5 4 16.4 4c2.5 0 4.8 1.8 4.8 4.9 0 6.5-9.2 12.3-9.2 12.3z"/>',+ check: '<path d="M9.6 16.7L4.8 11.9l1.7-1.7 3.1 3.1 7.9-7.9 1.7 1.7z"/>',+ star: '<path d="M12 2.2l2.9 6.4 7 .6-5.3 4.6 1.6 6.8L12 17.4 5.8 20.6l1.6-6.8L2.1 9.2l7-.6z"/>',+ };+ function iconSVG(name) {+ return (+ '<svg viewBox="0 0 24 24" fill="currentColor" width="100%" height="100%">' ++ ICONS[name] ++ "</svg>"+ );+ }++ // ── 4. Default program (reversed from act0-intro-bell) ──+ var DEFAULT_PHRASES = [+ {+ out: 1.36,+ lines: [+ { text: "If you've", size: 220, x: 140 },+ { text: "ever", size: 520, x: 240, hero: true, font: "serif" },+ { text: "used AI", size: 280, x: 780 },+ ],+ times: [0.14, 0.3, 0.55, 0.87, 1.06],+ },+ {+ out: 3.06,+ lines: [+ { text: "for", size: 220, x: 160 },+ { text: "video", size: 500, x: 220, hero: true },+ { text: "editing before,", size: 200, x: 220 },+ ],+ times: [1.36, 1.58, 1.92, 2.48],+ },+ {+ out: 3.79,+ lines: [+ { text: "you", size: 240, x: 200 },+ { text: "know", size: 500, x: 260, hero: true, accent: "gradient" },+ { text: "that", size: 340, x: 820 },+ ],+ times: [3.06, 3.3, 3.54],+ },+ ];+ var DEFAULT_CLIMAX = {+ text: "timing is {icon} tricky.",+ in: 3.79,+ iconAt: 4.9,+ hold: 1.3,+ size: 150,+ };++ var WORD_FADE = 0.18,+ CUT = 0.1,+ SLIDE = 0.42,+ OFFSCREEN_R = 1400;++ function parseJSON(v, fallback) {+ if (!v) return fallback;+ if (typeof v !== "string") return v;+ try {+ var p = JSON.parse(v);+ return p || fallback;+ } catch (e) {+ return fallback;+ }+ }+ var PHRASES = parseJSON(vars.phrases, DEFAULT_PHRASES);+ if (!PHRASES.length) PHRASES = DEFAULT_PHRASES;+ var C = Object.assign({}, DEFAULT_CLIMAX, parseJSON(vars.climax, {}));++ var words = function (s) {+ return String(s).trim().split(/\s+/).filter(Boolean);+ };++ // ── 5. Theme the field ──+ var root = document.getElementById("root");+ var stage = document.getElementById("stage");+ root.style.background = TH.bg;+ root.style.color = TH.ink;+ document.documentElement.style.background = TH.bg;+ document.body.style.background = TH.bg;+ var GRAD =+ "linear-gradient(90deg," ++ TH.gradFrom ++ " 0%," ++ TH.gradTo ++ " 50%," ++ TH.gradFrom ++ " 100%)";++ // ── 6. Build phrase DOM, collect word spans in reading order ──+ PHRASES.forEach(function (p, pi) {+ var pEl = document.createElement("div");+ pEl.className = "phrase";+ var accent = p.accent || TH.accents[pi % TH.accents.length];+ p._spans = [];+ p._grad = [];+ p.lines.forEach(function (ln) {+ var lEl = document.createElement("div");+ lEl.className = "line" + (ln.font === "serif" ? " serif" : "");+ lEl.style.fontSize = ln.size + "px";+ lEl.style.marginLeft = (ln.x != null ? ln.x : 0) + "px";+ var heroColor = ln.hero ? ln.accent || accent : null;+ words(ln.text).forEach(function (wtext) {+ var w = document.createElement("span");+ w.className = "w";+ w.textContent = wtext;+ if (heroColor === "gradient") {+ w.classList.add("grad");+ w.style.setProperty("--grad", GRAD);+ p._grad.push(w);+ } else if (heroColor) w.style.color = heroColor;+ lEl.appendChild(w);+ lEl.appendChild(document.createTextNode(" "));+ p._spans.push(w);+ });+ pEl.appendChild(lEl);+ });+ stage.appendChild(pEl);+ p._el = pEl;+ });++ // ── 7. Build the climax (slide-in + swappable icon) ──+ var cEl = document.createElement("div");+ cEl.className = "climax";+ cEl.style.fontSize = C.size + "px";+ cEl.style.setProperty("--ring1", hexRgba(TH.ink, 0.25));+ cEl.style.setProperty("--ring2", hexRgba(TH.ink, 0.1));+ var iconPx = Math.round(C.size * 1.7);+ var iconEl = null,+ rings = [];+ var iconSpec = String(vars.icon == null ? "bell" : vars.icon).trim();++ words(C.text).forEach(function (tok) {+ if (tok === "{icon}") {+ if (!iconSpec || iconSpec === "none") return; // drop the slot → pure-text climax+ iconEl = document.createElement("span");+ iconEl.className = "icon";+ iconEl.style.width = iconPx + "px";+ iconEl.style.height = iconPx + "px";+ var r1 = document.createElement("span");+ r1.className = "ring";+ var r2 = document.createElement("span");+ r2.className = "ring ring2";+ [r1, r2].forEach(function (r) {+ var rs = Math.round(iconPx * 1.3);+ r.style.width = rs + "px";+ r.style.height = rs + "px";+ iconEl.appendChild(r);+ });+ rings = [r1, r2];+ var glyph = document.createElement("span");+ glyph.className = "icon-glyph";+ glyph.style.width = iconPx + "px";+ glyph.style.height = iconPx + "px";+ glyph.style.color = TH.ink;+ if (ICONS[iconSpec]) {+ glyph.innerHTML = iconSVG(iconSpec); // library icon+ } else if (iconSpec.slice(0, 4).toLowerCase() === "<svg") {+ glyph.innerHTML = iconSpec; // custom inline SVG+ } else {+ glyph.style.fontSize = Math.round(iconPx * 0.86) + "px"; // emoji / text glyph+ glyph.textContent = iconSpec;+ }+ iconEl.appendChild(glyph);+ cEl.appendChild(iconEl);+ } else {+ var w = document.createElement("span");+ w.className = "cword";+ w.textContent = tok;+ cEl.appendChild(w);+ }+ });+ stage.appendChild(cEl);++ // ── 8. Timeline ──+ var tl = gsap.timeline({ paused: true });++ PHRASES.forEach(function (p) {+ gsap.set(p._el, { opacity: 0 });+ gsap.set(p._spans, { opacity: 0 });+ });+ gsap.set(cEl, { xPercent: -50, yPercent: -50, x: OFFSCREEN_R, opacity: 0 });+ if (iconEl) {+ gsap.set(iconEl, { opacity: 0 });+ gsap.set(iconEl.querySelector(".icon-glyph"), { scale: 0.4, rotation: -8, opacity: 0 });+ gsap.set(rings, { opacity: 0, scale: 0.4 });+ }++ PHRASES.forEach(function (p, pi) {+ var n = p._spans.length;+ var prevOut = pi === 0 ? 0.15 : PHRASES[pi - 1].out;+ var times = p.times && p.times.length === n ? p.times : null;+ if (!times) {+ var start = p.start != null ? p.start : prevOut;+ var end = p.out - Math.max(0.25, (p.out - start) * 0.18);+ times = p._spans.map(function (_, i) {+ return n <= 1 ? start : start + ((end - start) * i) / (n - 1);+ });+ }+ tl.to(p._el, { opacity: 1, duration: 0.01, overwrite: "auto" }, times[0]);+ p._spans.forEach(function (w, i) {+ tl.to(+ w,+ { opacity: 1, duration: WORD_FADE, ease: "power2.out", overwrite: "auto" },+ times[i],+ );+ });+ if (p._grad.length) {+ tl.fromTo(+ p._grad,+ { backgroundPosition: "0% 50%" },+ {+ backgroundPosition: "-200% 50%",+ duration: Math.max(0.6, p.out - times[0]),+ ease: "none",+ },+ times[0],+ );+ }+ tl.to(+ p._el,+ { opacity: 0, duration: CUT, ease: "power2.in", overwrite: "auto" },+ p.out - CUT,+ );+ });++ // climax slide-in+ tl.to(+ cEl,+ { x: 0, opacity: 1, duration: SLIDE, ease: "power3.out", overwrite: "auto" },+ C.in,+ );++ // icon pop + ring+ if (iconEl) {+ var glyph = iconEl.querySelector(".icon-glyph");+ tl.to(+ iconEl,+ { opacity: 1, duration: 0.3, ease: "power3.out", overwrite: "auto" },+ C.iconAt,+ );+ tl.fromTo(+ glyph,+ { scale: 0.4, rotation: -8, opacity: 0 },+ {+ scale: 1,+ rotation: 0,+ opacity: 1,+ duration: 0.35,+ ease: "back.out(2.4)",+ overwrite: "auto",+ },+ C.iconAt + 0.05,+ );+ tl.to(+ glyph,+ { rotation: 13, duration: 0.1, ease: "power2.out", overwrite: "auto" },+ C.iconAt + 0.4,+ );+ tl.to(+ glyph,+ { rotation: 0, duration: 0.85, ease: "elastic.out(1, 0.25)", overwrite: "auto" },+ C.iconAt + 0.5,+ );+ [0, 0.28].forEach(function (off) {+ tl.fromTo(+ rings,+ { scale: 0.4, opacity: 0.55 },+ { scale: 1.5, opacity: 0, duration: 0.8, ease: "power2.out", stagger: 0.08 },+ C.iconAt + 0.42 + off,+ );+ });+ }++ var TOTAL = Math.round((C.iconAt + C.hold) * 100) / 100;+ tl.to({}, { duration: TOTAL }, 0);+ root.setAttribute("data-duration", String(TOTAL));+ tl.seek(0);++ window.__timelines["intro-kinetic-cascade"] = tl;+ })();+ </script>+ </div>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/intro-kinetic-cascade/program.json b/skills/bgm-to-video/templates/intro-kinetic-cascade/program.jsonnew file mode 100644index 0000000000..0c83b9553c--- /dev/null+++ b/skills/bgm-to-video/templates/intro-kinetic-cascade/program.json@@ -0,0 +1,41 @@+{+ "_": "Default intro-kinetic-cascade program (reversed from act0-intro-bell). `theme` = palette; `icon` = the ringing climax glyph (MATCH TO SCENE — bell|cursor|sparkle|bolt|play|heart|check|star, an emoji, a raw <svg>, or 'none'); `phrases` = the word-by-word cascade (each `times` = VO word onsets / audio onsets, omit to auto-spread); `climax` = the slide-in finale ({icon} marks the glyph). Pass these as the matching composition-variables; empty vars fall back to these values.",+ "theme": "light",+ "icon": "bell",+ "phrases": [+ {+ "out": 1.36,+ "lines": [+ { "text": "If you've", "size": 220, "x": 140 },+ { "text": "ever", "size": 520, "x": 240, "hero": true, "font": "serif" },+ { "text": "used AI", "size": 280, "x": 780 }+ ],+ "times": [0.14, 0.3, 0.55, 0.87, 1.06]+ },+ {+ "out": 3.06,+ "lines": [+ { "text": "for", "size": 220, "x": 160 },+ { "text": "video", "size": 500, "x": 220, "hero": true },+ { "text": "editing before,", "size": 200, "x": 220 }+ ],+ "times": [1.36, 1.58, 1.92, 2.48]+ },+ {+ "out": 3.79,+ "lines": [+ { "text": "you", "size": 240, "x": 200 },+ { "text": "know", "size": 500, "x": 260, "hero": true, "accent": "gradient" },+ { "text": "that", "size": 340, "x": 820 }+ ],+ "times": [3.06, 3.3, 3.54]+ }+ ],+ "climax": {+ "text": "timing is {icon} tricky.",+ "in": 3.79,+ "iconAt": 4.9,+ "hold": 1.3,+ "size": 150+ }+}diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.md b/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.mdnew file mode 100644index 0000000000..c1b54ec612--- /dev/null+++ b/skills/bgm-to-video/templates/logo-split-lockup-pulse/README.md@@ -0,0 +1,85 @@+# Logo Split / Lockup Pulse — `logo-split-lockup-pulse`++A short, beat-locked **logo/brand sting**. A two-part mark sits joined at center,+**splits left↔right** to open a gap, **grows a center word-lockup one word per onset**+(the key word lands on the downbeat surge), **snap-closes** on a hit, then **pulses**+with the roll/hihat bed before a fast cut.++Reversed from **group_7** of the golden sample — the **Lille — World Design Capital+2020** sting (left radial spark `☀` + `lille 2020` + right cloud `☁`, on a flat green+field).++## Files++```+group_7_template/+ card.json ← the spec (match-face + build-face) · status: draft+ index.html ← reference impl (parameterized GSAP; inlined motion-blur snippet)+ assets/gsap.min.js ← bundled GSAP (offline-safe)+ assets/fredoka-700.woff2 ← bundled heavy rounded face (@font-face "Lockup")+ renders/recreate.mp4 + renders/stills/ ← rendered proof @24fps+```++## What it covers (provenance — group_7, 24fps, BPM 92.3)++The marks move on a FEW discrete anchors only — the sustained hi-hat fill (f17–f86) is+texture, **not** a motion driver. Left + right brackets always move **together** (mirrored).++| stage | frames | time | what | beat |+| -------------- | ------- | ---------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------- |+| seed | f2 | 0.083s | joined bracket pair (full-outside / empty-middle) blooms in at center | f2 perc onset |+| split + word 1 | f3–f6 | 0.13–0.25s | brackets **glide apart** to the full lockup width (held); `lille` eases into the gap | f6 onset |+| word 2 | f24 | 1.000s | `2020` eases into the reserved space (brackets already open) | **SURGE@1s / downbeat f24-25** |+| hold | f24–f49 | 1.0–2.08s | `lille 2020` static | hi-hat fill bed (texture) |+| snap-close | f50 | 2.083s | 1-frame hard cut: words vanish, brackets weld back together (impact streak via blur) | after f47 snare |+| see-saw | f51–f63 | 2.13–2.63s | welded unit damped vertical bounce + building see-saw tilt (spark UP / cloud DOWN), settling high+tilted | **f51 / f55 / f58 / f63** (hi-hats) |+| exit | f70 | 2.917s | source hard-cuts to the next group (live footage) | `fast_cut` (near f71 kick) |++Corrections baked in vs earlier reads: the close is a **1-frame hard snap** (not a+squeeze); after it the weld does a **damped vertical bounce + a rigid see-saw tilt**+(left-spark up / right-cloud down — one rigid unit rotating, **not** a scale-pulse and+**not** per-side independent), beat-synced and decaying; the marks **pre-open to full+width** (so word1 floats in wide brackets); the marks are **big enough to wrap the text**+(~2.5–3× letter height, ~140° spark fan), each with its mass on the **outer** side.++## Silkiness (what makes the motion fluid, not stiff)++- **Velocity motion blur** (inlined registry `motion-blur` snippet) on the two brackets —+ a one-sided SVG ghost trail proportional to speed, so the fast split-glide and the+ snap-impact read smooth instead of as hard frame jumps. Clears at rest.+- **Smooth, slightly longer eases** (`expo.out` split, `power3.out` word reveals,+ `power2.out` recoil) — no poppy `back.out`/elastic. Timing anchors are unchanged.+- A **gentle hold-drift** (`sine.inOut`) so the weld isn't dead-frozen.++## Parameters (swap freely)++- `bgColor` / `markColor` / `textColor` — palette (defaults: green `#249b5f`, cream `#e7e3dd`).+- `leftMark` / `rightMark` — **inline SVG** for each side. Empty → the default spark / cloud.+ Pass **two related SVGs**, or **the two halves of one logo** (left half + right half).+ Keep each mark's mass on its **outer** side so the pair reads as brackets framing the text.+- `word1..word4` — the lockup words, revealed one per onset and accumulating. Supports+ **1, 2, or 3+ words**; put the key word on the strongest beat. Empty slots are skipped.++## Adaptivity (`beat_map` in `index.html`)++Content lives in `params`; musical **timing** lives in the `beat_map` constants+(`ENTRY`, `SPLIT`, `WORD_ONSETS[]`, `CLOSE`, `DUR`) — filled from the matched group's+`audiomap.json`. The impl **measures each word at build time** and pre-opens the brackets+to the full lockup width, so any word count / length re-centers correctly. More words →+add `WORD_ONSETS` entries. The marks deliberately do **not** animate on the hi-hat bed.++## Verify++```bash+npx hyperframes lint group_7_template # clean (1 inherent window.__timelines note)+npx hyperframes validate group_7_template # no console errors+npx hyperframes render group_7_template -f 24+```++## Status++`draft` — in the reverse workspace. Promote per `reverse-to-template.md` Step 9 (copy to+`skills/bgm-to-video/templates/logo-split-lockup-pulse/`, set+`status:"promoted"`, stamp `created`) once reviewed. Proposed new motion verbs+(`split_open`, `snap_close`, `per_onset_pulse`) and the shared `per_onset_sequential`+structural_type are flagged in `card.json` for catalog review.diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2 b/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2new file mode 100644index 0000000000..47139ea524Binary files /dev/null and b/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2 differdiff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/gsap.min.js b/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/logo-split-lockup-pulse/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.json b/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.jsonnew file mode 100644index 0000000000..836e3793e1--- /dev/null+++ b/skills/bgm-to-video/templates/logo-split-lockup-pulse/card.json@@ -0,0 +1,145 @@+{+ "id": "logo-split-lockup-pulse",+ "name": "Logo Split / Lockup Pulse",+ "one_line": "A two-part mark sits joined at center, splits left↔right to open a gap, grows a center word-lockup one word per onset (key word lands on the downbeat surge), then snap-closes on a hit and pulses with the beat.",+ "status": "promoted",++ "match": {+ "structural_type": "per_onset_sequential",+ "requires": {+ "has_steady_grid": true,+ "onset_rate": ">=2.0",+ "onset_gap_bars": "<1.0",+ "density": ["medium", "dense"],+ "has_roll": true,+ "span_bars": "<=4"+ },+ "mood_fit": ["playful", "hype", "elegant", "cinematic", "tense"],+ "span_bars": [1, 4],+ "exit_trigger": ["downbeat", "surge", "hard_stop", "end"],+ "notes": "A short logo/brand sting, not a typed sentence. Discriminated from typewriter-phrase-keyword-shuffle by density (dense, not sparse/medium-only) + has_roll:true (a sustained-fill hihat bed it consumes as a PULSE, not a cascade) + the left/right bracketing-mark roles. Reveals are still per-onset (split -> word -> word), so the structural_type is shared, but the build-face is the logo lockup, not text typing. The KEY content word should be placed on the strongest hit (downbeat / SURGE). If the grid goes quiet (onset_gap_bars >= ~1.5) this is the wrong template — use a hold template."+ },++ "examples": [+ {+ "sample": "group_7",+ "group": "g7-logo-sting",+ "bpm": 92.3,+ "structural_type": "per_onset_sequential",+ "energy_level": "HIGH",+ "energy": 0.89,+ "density": "dense",+ "onset_rate": 5.65,+ "onset_gap_bars": 0.14,+ "has_steady_grid": true,+ "has_roll": true,+ "roll_kind": "sustained-fill",+ "roll_rate_per_min": 351,+ "span_sec": [0.083, 2.917],+ "span_bars": 1,+ "entry": { "anchor": "onset", "time": 0.083 },+ "exit_trigger": { "type": "downbeat", "time": 2.917 },+ "downbeats_sec": [1.045, 3.646],+ "surge_sec": 1.0,+ "mood": ["playful", "hype", "elegant"],+ "brand": "Lille — World Design Capital 2020 (left radial spark + 'lille 2020' + right cloud)"+ }+ ],++ "roles": {+ "left_mark": {+ "kind": "asset",+ "motion": "split_open",+ "anchor": "entry.onset + split.onset",+ "notes": "Left BRACKET of the logo (group_7: a radial spark; mass on the OUTER/left side, opening toward the text — see one_line). Appears joined at center on the entry onset (f2), then GLIDES left to the FULL lockup width on the split onset (f6) — fast launch + expo.out settle, smoothed by velocity motion blur. Holds open; does NOT track each word. PROPOSED verb 'split_open' (paired symmetric translate; reverse = 'snap_close')."+ },+ "right_mark": {+ "kind": "asset",+ "motion": "split_open",+ "anchor": "entry.onset + split.onset",+ "notes": "Right BRACKET (group_7: a cloud / backwards-3 swirl; mass OUTER/right, opening toward the text). Mirrors left_mark exactly — same beats, same offset (the two always correspond / move together). Pre-opens to the full width so even word1 alone floats in wide-open brackets (faithful: the marks barely move when more words fill in)."+ },+ "lockup": {+ "kind": "message",+ "motion": "per_onset_pop",+ "anchor": "entry.word_onsets",+ "notes": "1..N words ACCUMULATING one per onset into the reserved center space (not replace). Each word eases in with a soft stretch (scaleX 0.58->1, ~0.24s power3.out — smooth, NO poppy overshoot). The KEY word sits on the downbeat/SURGE (group_7: 'lille'@0.25 then '2020'@1.0 on SURGE@1s)."+ },+ "close": {+ "kind": "asset",+ "motion": "snap_close",+ "anchor": "close.onset",+ "notes": "On a key hit (group_7: f50 / 2.083s) the lockup snap-closes: words HARD-CUT to gone (0ms, no squash) AND both brackets teleport back together in the SAME frame — the teleport reads as an impact streak through the motion blur. PROPOSED verb 'snap_close'."+ },+ "seesaw": {+ "kind": "asset",+ "motion": "seesaw_bounce",+ "anchor": "post_close.onsets",+ "notes": "After the snap the welded brackets do a DAMPED VERTICAL SPRING + a rigid SEE-SAW TILT (rotation +deg = left-spark UP / right-cloud DOWN), beat-synced to the hi-hat hits after the snap (group_7: f51 slam-down lowest, f55 up-rebound, f58 dip, f63 flick). Amplitude decays; the unit settles slightly HIGH and TILTED (spark up/cloud down) into the f70 cut. ~95% vertical translate + a building rotation. NOT a scale-pulse, NOT per-side independent — it's one rigid unit rotating. PROPOSED verb 'seesaw_bounce'."+ },+ "background": {+ "kind": "background",+ "motion": "hold",+ "anchor": "none",+ "notes": "Flat solid color, dead still the whole span (group_7: green #249b5f). No color change. Optional energy_envelope_breath add-on, not required."+ }+ },++ "params": {+ "bgColor": { "type": "color", "maps_to": "background.color", "default": "#249b5f" },+ "markColor": {+ "type": "color",+ "maps_to": "left_mark + right_mark stroke/fill",+ "default": "#e7e3dd"+ },+ "textColor": { "type": "color", "maps_to": "lockup.words color", "default": "#e7e3dd" },+ "leftMark": {+ "type": "string",+ "maps_to": "left_mark.svg",+ "notes": "inline SVG (or one half of a single logo). Empty = the default radial spark. Keep the mass on the OUTER side so it reads as a bracket."+ },+ "rightMark": {+ "type": "string",+ "maps_to": "right_mark.svg",+ "notes": "inline SVG (or the other half). Empty = the default cloud/3 swirl. Mass on the OUTER side."+ },+ "word1": {+ "type": "string",+ "maps_to": "lockup.word[0]",+ "optional": true,+ "default": "lille"+ },+ "word2": { "type": "string", "maps_to": "lockup.word[1]", "optional": true, "default": "2020" },+ "word3": { "type": "string", "maps_to": "lockup.word[2]", "optional": true, "default": "" },+ "word4": { "type": "string", "maps_to": "lockup.word[3]", "optional": true, "default": "" }+ },++ "beat_map": {+ "comment": "Script-side musical timing constants in index.html, filled from <group>.audiomap.json. Content lives in params; musical timing lives here. All times are ABSOLUTE audio seconds. The marks move on these DISCRETE anchors only — NOT on the sustained hi-hat fill (texture).",+ "entry_onset": 0.083,+ "split_onset": 0.25,+ "word_onsets": [0.25, 1.0],+ "word_onsets_notes": "one per non-empty word, in order; word_onsets[0] doubles as the split. Add more entries for 3+ words. The strongest hit (here 1.0 = SURGE@1s downbeat) should carry the key word.",+ "close_onset": 2.083,+ "seesaw_onsets": [2.125, 2.292, 2.417, 2.625],+ "seesaw_note": "f51/f55/f58/f63 — welded unit damped vertical bounce + see-saw tilt (left up/right down), decaying, settling high+tilted to the cut. These ARE beat-synced (the one place after the snap that tracks the hi-hats).",+ "duration": 2.875,+ "exit_note": "logo holds/drifts to 2.875 (f69) then the source hard-cuts to the next group at f70 (2.917, near f71 kick)"+ },++ "reference_impl": "index.html",+ "uses_primitives": [+ "radial_burst_lines",+ "kinetic_letter_in",+ "motion-blur",+ "negative_space_hold"+ ],+ "uses_primitives_notes": "split_open / snap_close / settle_drift are proposed custom phrases the impl defines (paired symmetric translate, 0ms collapse, slow drift). radial_burst_lines (#25) backs the default left spark; kinetic_letter_in (#02) backs the word stretch-pop. SILKINESS comes from the registry 'motion-blur' snippet (velocity-driven SVG ghost trail) attached to the marks + expo/power eases over longer durations — NOT from extra keyframes.",++ "bundled_assets": "assets/gsap.min.js (offline GSAP), assets/fredoka-700.woff2 (heavy rounded face for the words — declared @font-face 'Lockup'). The motion-blur snippet is inlined in index.html (no external file).",++ "transition_out": { "default": "fast_cut", "observed": "fast_cut" },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_7"],+ "created": "2026-06-17"+}diff --git a/skills/bgm-to-video/templates/logo-split-lockup-pulse/index.html b/skills/bgm-to-video/templates/logo-split-lockup-pulse/index.htmlnew file mode 100644index 0000000000..d7a13cac54--- /dev/null+++ b/skills/bgm-to-video/templates/logo-split-lockup-pulse/index.html@@ -0,0 +1,497 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Background", "default":"#249b5f"},+ {"id":"markColor", "type":"color", "label":"Logo mark color", "default":"#e7e3dd"},+ {"id":"textColor", "type":"color", "label":"Word color", "default":"#e7e3dd"},+ {"id":"leftMark", "type":"string", "label":"Left mark SVG (empty = spark)", "default":""},+ {"id":"rightMark", "type":"string", "label":"Right mark SVG (empty = cloud)", "default":""},+ {"id":"word1", "type":"string", "label":"Word 1 (opens the gap)", "default":"lille"},+ {"id":"word2", "type":"string", "label":"Word 2 (lands on the surge)", "default":"2020"},+ {"id":"word3", "type":"string", "label":"Word 3 (optional)", "default":""},+ {"id":"word4", "type":"string", "label":"Word 4 (optional)", "default":""}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Logo Split / Lockup Pulse — group_7 reference impl</title>+ <script src="./assets/gsap.min.js"></script>+ <!-- Velocity-driven directional motion blur (registry: motion-blur). Samples each+ target's GSAP x/y per seek and applies a one-sided ghost trail + top blur+ proportional to speed; clears at rest. This is what makes the fast mark moves+ (split / snap) read SILKY instead of stiff. Self-contained (SVG filters). -->+ <script>+ (function () {+ if (!window._hfMbUid) window._hfMbUid = 0;+ window.attachMotionBlur = function (selector, tl, opts) {+ opts = opts || {};+ var blurScale = opts.blurScale !== undefined ? opts.blurScale : 0.008;+ var blurMax = opts.blurMax !== undefined ? opts.blurMax : 20;+ var stretchScale = opts.stretchScale !== undefined ? opts.stretchScale : 0.0002;+ var stretchMax = opts.stretchMax !== undefined ? opts.stretchMax : 0;+ var axis = opts.axis || "both";+ var items = Array.isArray(selector) ? selector : [selector];+ var targets = items.reduce(function (acc, s) {+ if (typeof s === "string") {+ document.querySelectorAll(s).forEach(function (el) {+ acc.push(el);+ });+ } else if (s instanceof Element) {+ acc.push(s);+ }+ return acc;+ }, []);+ var ns = "http://www.w3.org/2000/svg";+ var GHOST_CFG = [+ { frac: 0.25, slope: 0.55 },+ { frac: 0.55, slope: 0.28 },+ { frac: 1.0, slope: 0.1 },+ ];+ var state = targets.map(function (el) {+ var uid = "hf-mb-" + window._hfMbUid++;+ var svg = document.createElementNS(ns, "svg");+ svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden;");+ var filter = document.createElementNS(ns, "filter");+ filter.id = uid;+ filter.setAttribute("x", "-110%");+ filter.setAttribute("y", "-25%");+ filter.setAttribute("width", "260%");+ filter.setAttribute("height", "150%");+ var ghosts = GHOST_CFG.map(function (cfg, gi) {+ var feOff = document.createElementNS(ns, "feOffset");+ feOff.setAttribute("in", "SourceGraphic");+ feOff.setAttribute("dx", "0");+ feOff.setAttribute("dy", "0");+ feOff.setAttribute("result", "go" + gi);+ var feGB = document.createElementNS(ns, "feGaussianBlur");+ feGB.setAttribute("in", "go" + gi);+ feGB.setAttribute("stdDeviation", "0 0");+ feGB.setAttribute("result", "gb" + gi);+ var feCT = document.createElementNS(ns, "feComponentTransfer");+ feCT.setAttribute("in", "gb" + gi);+ feCT.setAttribute("result", "gf" + gi);+ var feFuncA = document.createElementNS(ns, "feFuncA");+ feFuncA.setAttribute("type", "linear");+ feFuncA.setAttribute("slope", String(cfg.slope));+ feCT.appendChild(feFuncA);+ filter.appendChild(feOff);+ filter.appendChild(feGB);+ filter.appendChild(feCT);+ return { feOff: feOff, feGB: feGB, frac: cfg.frac };+ });+ var feTopBlur = document.createElementNS(ns, "feGaussianBlur");+ feTopBlur.setAttribute("in", "SourceGraphic");+ feTopBlur.setAttribute("stdDeviation", "0 0");+ feTopBlur.setAttribute("result", "top");+ filter.appendChild(feTopBlur);+ var feMerge = document.createElementNS(ns, "feMerge");+ for (var mi = GHOST_CFG.length - 1; mi >= 0; mi--) {+ var mn = document.createElementNS(ns, "feMergeNode");+ mn.setAttribute("in", "gf" + mi);+ feMerge.appendChild(mn);+ }+ var mnTop = document.createElementNS(ns, "feMergeNode");+ mnTop.setAttribute("in", "top");+ feMerge.appendChild(mnTop);+ filter.appendChild(feMerge);+ svg.appendChild(filter);+ document.body.appendChild(svg);+ return {+ el: el,+ ghosts: ghosts,+ feTopBlur: feTopBlur,+ filterId: uid,+ prevX: parseFloat(gsap.getProperty(el, "x")) || 0,+ prevY: parseFloat(gsap.getProperty(el, "y")) || 0,+ prevTime: tl.time(),+ };+ });+ var _proxy = { t: 0 };+ tl.to(+ _proxy,+ {+ t: 1,+ duration: Math.max(tl.duration(), 0.1),+ ease: "none",+ onUpdate: function () {+ var time = tl.time();+ state.forEach(function (s) {+ var x = parseFloat(gsap.getProperty(s.el, "x")) || 0;+ var y = parseFloat(gsap.getProperty(s.el, "y")) || 0;+ var dt = time - s.prevTime;+ if (dt > 0.0005) {+ var vx = axis !== "y" ? (x - s.prevX) / dt : 0;+ var vy = axis !== "x" ? (y - s.prevY) / dt : 0;+ var bx = Math.min(Math.abs(vx) * blurScale, blurMax);+ var by = Math.min(Math.abs(vy) * blurScale, blurMax);+ var bxFinal = axis !== "y" ? bx : Math.max(by * 0.08, 0.4);+ var byFinal = axis !== "x" ? by : Math.max(bx * 0.08, 0.4);+ var active = bx > 0.3 || by > 0.3;+ if (active) {+ s.el.style.filter = "url(#" + s.filterId + ")";+ s.ghosts.forEach(function (g) {+ var dx =+ axis !== "y" ? (vx >= 0 ? -bxFinal * g.frac : bxFinal * g.frac) : 0;+ var dy =+ axis !== "x" ? (vy >= 0 ? -byFinal * g.frac : byFinal * g.frac) : 0;+ g.feOff.setAttribute("dx", dx.toFixed(2));+ g.feOff.setAttribute("dy", dy.toFixed(2));+ var gbx =+ axis !== "y"+ ? (bxFinal * g.frac * 0.5).toFixed(2)+ : Math.max(byFinal * g.frac * 0.04, 0.4).toFixed(2);+ var gby =+ axis !== "x"+ ? (byFinal * g.frac * 0.5).toFixed(2)+ : Math.max(bxFinal * g.frac * 0.04, 0.4).toFixed(2);+ g.feGB.setAttribute("stdDeviation", gbx + " " + gby);+ });+ s.feTopBlur.setAttribute(+ "stdDeviation",+ (bxFinal * 0.15).toFixed(2) + " " + (byFinal * 0.15).toFixed(2),+ );+ } else {+ s.el.style.filter = "";+ s.ghosts.forEach(function (g) {+ g.feOff.setAttribute("dx", "0");+ g.feOff.setAttribute("dy", "0");+ g.feGB.setAttribute("stdDeviation", "0 0");+ });+ s.feTopBlur.setAttribute("stdDeviation", "0 0");+ }+ s.prevX = x;+ s.prevY = y;+ s.prevTime = time;+ } else if (dt < -0.0005) {+ s.el.style.filter = "";+ s.ghosts.forEach(function (g) {+ g.feOff.setAttribute("dx", "0");+ g.feOff.setAttribute("dy", "0");+ g.feGB.setAttribute("stdDeviation", "0 0");+ });+ s.feTopBlur.setAttribute("stdDeviation", "0 0");+ s.prevX = x;+ s.prevY = y;+ s.prevTime = time;+ }+ });+ },+ },+ 0,+ );+ };+ })();+ </script>+ <style>+ @font-face {+ font-family: "Lockup";+ src: url("./assets/fredoka-700.woff2") format("woff2");+ font-weight: 700;+ font-style: normal;+ font-display: block;+ }+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ background: var(--bg, #249b5f);+ overflow: hidden;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--bg, #249b5f);+ display: flex;+ align-items: center;+ justify-content: center;+ }+ /* a 0-size anchor at screen center; marks + words are positioned absolutely+ around it, and the whole group scales/translates for the pulse. */+ #lockup {+ position: relative;+ width: 0;+ height: 0;+ }+ .words {+ position: absolute;+ left: 0;+ top: 0;+ transform: translate(-50%, -50%);+ display: flex;+ align-items: center;+ gap: 34px;+ white-space: nowrap;+ color: var(--text, #e7e3dd);+ font-family: "Lockup", system-ui, sans-serif;+ font-size: 200px;+ font-weight: 700;+ letter-spacing: -0.045em;+ line-height: 0.8;+ }+ .word {+ display: none; /* revealed one per onset on the timeline */+ }+ .mark {+ position: absolute;+ top: 0;+ left: 0;+ width: 300px;+ height: 340px;+ color: var(--mark, #e7e3dd);+ }+ .mark svg {+ width: 100%;+ height: 100%;+ display: block;+ overflow: visible;+ }+ /* edge/vertical centering is set in JS via GSAP xPercent/yPercent so it+ composes with the animated x (a CSS % transform would be clobbered). */+ </style>+ </head>+ <body>+ <!-- duration = 2.875s = the green logo lifecycle (seed -> split -> lockup ->+ snap -> pulse); the source then HARD-CUTS to the next group at f70 (2.917s). -->+ <div+ data-hf-id="hf-g7rt"+ id="root"+ data-composition-id="group-seven-logo"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="2.875"+ data-root="true"+ >+ <div data-hf-id="hf-g7lk" id="lockup">+ <div data-hf-id="hf-g7ml" class="mark left" id="markLeft"></div>+ <div data-hf-id="hf-g7wd" class="words" id="words"></div>+ <div data-hf-id="hf-g7mr" class="mark right" id="markRight"></div>+ </div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════+ // LOGO SPLIT / LOCKUP PULSE · structural_type: per_onset_sequential+ // A two-part mark sits joined at center, SPLITS left<->right to open a+ // gap, GROWS a center word-lockup one word per onset (key word on the+ // surge), SNAP-CLOSES on a hit, then PULSES with the roll/hihat bed.+ // Reversed from group_7 (Lille — World Design Capital 2020 sting).+ // ════════════════════════════════════════════════════════════════++ // ── 1. Content variables (what a user changes) ─────────────────────+ var defaults = {+ bgColor: "#249b5f",+ markColor: "#e7e3dd",+ textColor: "#e7e3dd",+ leftMark: "",+ rightMark: "",+ word1: "lille",+ word2: "2020",+ word3: "",+ word4: "",+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // ── 2. DEFAULT LOGO HALVES (line-art; swap via leftMark / rightMark) ─+ // Either two related SVGs (a left + a right graphic) OR the two halves of+ // one logo. currentColor inherits --mark. Thick rounded line-art so they+ // read as a bold pair bracketing the words (matched to the Lille mark:+ // a left radial SPARK with a hollow hub, a right CLOUD/SWIRL).+ var DEFAULT_LEFT = [+ // radial SPARK: 5 rounded strokes, a tight fan up-and-left from a hollow+ // hub near the text (NOT converging to a needle — reads as a spark/shine).+ // hub at the INNER (right) edge so the spark hugs the text; 5 long strokes+ // fanning ~140 up-and-left — a big radial spark that helps wrap the lockup.+ '<svg viewBox="0 0 150 150" fill="none" stroke="currentColor"',+ ' stroke-width="16" stroke-linecap="round">',+ '<line x1="134" y1="66" x2="112" y2="6"/>',+ '<line x1="130" y1="72" x2="66" y2="16"/>',+ '<line x1="126" y1="80" x2="24" y2="42"/>',+ '<line x1="124" y1="88" x2="10" y2="84"/>',+ '<line x1="126" y1="96" x2="36" y2="136"/>',+ "</svg>",+ ].join("");+ var DEFAULT_RIGHT = [+ // CLOUD / backwards-3 SWIRL: two bold stacked lobes bulging right with a+ // left-pointing middle notch, opening to the left (the Lille cloud).+ // bold backwards-3 swirl: opening tips at the INNER (left) edge so it hugs the+ // text, bulging right (mass OUTER). Fills the box height to help wrap the lockup.+ '<svg viewBox="0 0 150 150" fill="none" stroke="currentColor"',+ ' stroke-width="16" stroke-linecap="round" stroke-linejoin="round">',+ '<path d="M14 40',+ " C50 6 128 14 122 58",+ " C120 86 80 92 54 78",+ " C86 86 128 96 122 128",+ ' C116 154 40 158 14 120"/>',+ "</svg>",+ ].join("");++ // ── 3. BEAT MAP (filled from <group>.audiomap.json — see README) ────+ // group_7.audiomap.json: BPM 92.3. ABSOLUTE audio seconds.+ // The marks move on only these DISCRETE anchors — NOT on the sustained hi-hat+ // fill (f17-f86), which is rhythmic texture, not a motion driver. Left + right+ // always move together (mirrored). After the snap the weld HOLDS dead still.+ var ENTRY = 0.083; // f2 — joined bracket pair appears at center (perc onset)+ var SPLIT = 0.25; // f6 — brackets fly apart to full width (perc onset)+ var WORD_ONSETS = [0.25, 1.0]; // one per word; 1.0 = SURGE@1s (f24) carries the key word+ var CLOSE = 2.083; // f50 — snap shut: words vanish + brackets weld back together+ var DUR = 2.875; // f69 — hold, then the source hard-cuts to the next group (f70)++ var MARK_PAD = 14; // gap between a mark's inner edge and the nearest word+ var WORD_GAP = 34; // must match .words { gap }++ // ── 4. Build content ───────────────────────────────────────────────+ document.documentElement.style.setProperty("--bg", vars.bgColor);+ document.documentElement.style.setProperty("--mark", vars.markColor);+ document.documentElement.style.setProperty("--text", vars.textColor);++ var markLeft = document.getElementById("markLeft");+ var markRight = document.getElementById("markRight");+ markLeft.innerHTML = (vars.leftMark && vars.leftMark.trim()) || DEFAULT_LEFT;+ markRight.innerHTML = (vars.rightMark && vars.rightMark.trim()) || DEFAULT_RIGHT;++ var wordsEl = document.getElementById("words");+ var wordList = [vars.word1, vars.word2, vars.word3, vars.word4].filter(function (w) {+ return w && String(w).trim() !== "";+ });+ var wordEls = wordList.map(function (w) {+ var s = document.createElement("span");+ s.className = "word";+ s.textContent = w;+ wordsEl.appendChild(s);+ return s;+ });++ // ── 5. Build the timeline once the lockup font is ready ─────────────+ // The word widths drive how far the marks open, so they MUST be measured+ // in the real (rounded) face, not a fallback. Gate the whole build on+ // document.fonts so the measurement is correct; the render engine also+ // waits for fonts before capturing.+ function build() {+ // measure each word in the loaded face, then hide them all so a hidden+ // word occupies NO layout width (the lockup truly grows as words enter).+ var widths = wordEls.map(function (el) {+ el.style.display = "inline-block";+ var w = el.offsetWidth;+ el.style.display = "none";+ return w;+ });+ function markOffsetFor(k) {+ if (k <= 0) return 0;+ var blockW = 0;+ for (var i = 0; i < k; i++) blockW += widths[i];+ blockW += WORD_GAP * (k - 1);+ return blockW / 2 + MARK_PAD;+ }++ var OFF_FULL = markOffsetFor(wordEls.length); // open width (brackets the full lockup)+ var OVL = 14; // joined position: welded brackets sit close (small center gap)++ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });++ // start state: the two brackets JOINED at center (full-outside / empty-middle),+ // invisible; words hidden. xPercent/yPercent center each mark on the anchor and+ // COMPOSE with the animated x (a CSS % transform would be clobbered by GSAP x).+ gsap.set(markLeft, { autoAlpha: 0, xPercent: -100, yPercent: -50, x: OVL, scale: 0.72 });+ gsap.set(markRight, { autoAlpha: 0, xPercent: 0, yPercent: -50, x: -OVL, scale: 0.72 });+ gsap.set("#lockup", { scale: 1, transformOrigin: "50% 50%" });++ // ── MOTION = the few DISCRETE anchors only (the hi-hat bed is texture, not+ // a motion driver). Left + right always move TOGETHER (mirrored). ──++ // f2 ENTRY — the joined bracket pair BLOOMS in at center (smooth scale-in,+ // not a 1-frame pop — the soft grow is what makes the start feel silky).+ tl.to(+ [markLeft, markRight],+ { autoAlpha: 1, scale: 1, duration: 0.16, ease: "power2.out" },+ ENTRY,+ );++ // f6 SPLIT — both brackets GLIDE apart together to the FULL lockup width in ONE+ // move: a fast launch + long settle (expo.out), and the velocity motion blur+ // (attached below) smooths the travel so it reads silky, not stiff. Then HOLD+ // — words fill the reserved center space; the marks don't track each word.+ tl.to(markLeft, { x: -OFF_FULL, duration: 0.3, ease: "expo.out" }, SPLIT);+ tl.to(markRight, { x: OFF_FULL, duration: 0.3, ease: "expo.out" }, SPLIT);++ // word reveals — each word eases in with a soft stretch on its onset (the key+ // word on the SURGE). Smooth deceleration (power3.out), NO poppy overshoot.+ wordEls.forEach(function (el, i) {+ var t =+ i < WORD_ONSETS.length+ ? WORD_ONSETS[i]+ : WORD_ONSETS[WORD_ONSETS.length - 1] + 0.3 * (i - WORD_ONSETS.length + 1);+ tl.set(el, { display: "inline-block" }, t);+ tl.fromTo(+ el,+ { autoAlpha: 0, scaleX: 0.58, scaleY: 1.09, transformOrigin: "50% 50%" },+ { autoAlpha: 1, scaleX: 1, scaleY: 1, duration: 0.24, ease: "power3.out" },+ t,+ );+ });++ // f50 SNAP-CLOSE — 1 frame: words vanish + both brackets teleport back together+ // (the teleport reads as an impact streak through the motion blur).+ tl.set(wordEls, { autoAlpha: 0, display: "none" }, CLOSE);+ tl.set(markLeft, { x: OVL }, CLOSE);+ tl.set(markRight, { x: -OVL }, CLOSE);+ tl.fromTo(+ "#lockup",+ { scale: 0.9 },+ { scale: 1, duration: 0.22, ease: "power2.out" },+ CLOSE,+ );++ // SEE-SAW BOUNCE — the welded unit does a damped vertical spring + a building+ // rigid tilt (rotation: +deg = left-spark UP / right-cloud DOWN), beat-synced to+ // the hi-hat hits after the snap: f51 slam-down (lowest), f55 up-rebound (highest),+ // f58 smaller dip, f63 final flick — amplitude decays, ending tilted to the f70 cut.+ var B1 = 2.125,+ B2 = 2.292,+ B3 = 2.417,+ B4 = 2.625; // f51 f55 f58 f63+ tl.set("#lockup", { y: 0, rotation: 0 }, CLOSE);+ tl.to("#lockup", { y: 34, rotation: -3, duration: B1 - CLOSE, ease: "power2.in" }, CLOSE);+ tl.to("#lockup", { y: -64, rotation: 10, duration: B2 - B1, ease: "power3.out" }, B1);+ tl.to("#lockup", { y: -38, rotation: 6, duration: B3 - B2, ease: "power2.inOut" }, B2);+ tl.to("#lockup", { y: -60, rotation: 10.5, duration: B4 - B3, ease: "power2.inOut" }, B3);+ tl.to("#lockup", { y: -56, rotation: 10.5, duration: DUR - B4, ease: "sine.out" }, B4);++ // pin duration, then attach velocity motion blur: the brackets (x: split + snap)+ // and the welded group (y: the ending bounce). MUST be after all tweens.+ tl.set(document.body, {}, DUR);+ attachMotionBlur([markLeft, markRight], tl, { axis: "x", blurMax: 26, blurScale: 0.011 });+ attachMotionBlur("#lockup", tl, { axis: "y", blurMax: 20, blurScale: 0.012 });++ tl.seek(0);+ window.__timelines["group-seven-logo"] = tl;+ }++ if (document.fonts && document.fonts.ready) {+ document.fonts.load('700 200px "Lockup"').then(function () {+ document.fonts.ready.then(build);+ });+ } else {+ build();+ }+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/README.md b/skills/bgm-to-video/templates/poster-tile-mosaic/README.mdnew file mode 100644index 0000000000..80895ca71c--- /dev/null+++ b/skills/bgm-to-video/templates/poster-tile-mosaic/README.md@@ -0,0 +1,190 @@+# Poster-Tile Mosaic · 3 beat-synced operations++> Reverse-engineered from **group_5** of the golden sample (the Namshi poster-grid scene).+> `structural_type: dense_multiply` · status: **draft**++**ONE base template, THREE operations.** The base is a packed **mosaic of+DIFFERENT-sized tiles** — **not** a uniform grid: tall / wide / small colored boxes+that tessellate to fill the frame **with no overlap** (thin seams only), exactly like+the source's 错落 wall. **Asset-free**: a tile is a colored box with a text label.+"Adding a box" = a new image; "changing a box color" = a new asset / recolor. Three+interchangeable, beat-synced operations act on that one mosaic:++| op | what it does | what moves | source span |+| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------- |+| **A · staggerInOut** | pop different-sized tiles in one-per-onset (top-right→bottom-left waterfall) until they pack the frame → hold on a downbeat → pop them out one-per-onset | transform + opacity (per tile) | 0.58–2.08s (f14–f50) |+| **B · holdRecolor** | snap the whole wall on at once, **lock positions**, recolor the grid as a unit on each beat | background color (per tile, 0ms) | 2.37–2.91s (f57–f70) |+| **C · snakeFill+overlay** | reveal tiles along a **snake path** to fill → recolor whole grid on the hard-stop → pop overlay "cutouts" on top, one-per-onset | reveal + one swap + overlay pops | 3.0–5.5s (f72–f137) |++```+group_5_template/+ index.html ← asset-free reference impl: mosaic + 3 operators + program runner+ program.json ← the default group_5 score as standalone, agent-editable DATA+ card.json ← the spec: base template, operators, program_format, match signature+ assets/gsap.min.js ← vendored (offline-safe lint/validate/render)+ renders/ ← group_5_recreate(.mp4 / _audio.mp4) + custom_demo.mp4 (a remixed program)+ README.md ← this file+```++This is the answer to _"is it one base template used three ways?"_ — **yes.** The+implementation makes that literal: the same `tiles[]` mosaic is built once (by a+deterministic binary-split packer) and reused by all three operations; only the+**scheduling** differs. (Gemini's pass called the three "different systems" —+frame-by-frame inspection disproved that; see `card.json` provenance.)++---++## 1. How it beat-syncs (from `group_5.audiomap.json`)++**Nothing is on a timer.** Every move is a GSAP tween/`set` at an absolute audio+second from the analysis. Track facts: **BPM 129.2**, 4/4, downbeats **1.324 (f32) /+3.181 (f76) / 5.039 (f121)**, **hard_stop @ 4.0s** (largest energy drop, Δ-0.67).++The score is the **PROGRAM** — a data array of operator steps ([`program.json`](program.json),+mirrored inline as `DEFAULT_PROGRAM` in §3):++```jsonc+[+ {+ "op": "staggerInOut", // build → hold → exit+ "enter": [0.23, 0.37, 0.46, 0.6, 0.7, 0.84, 0.91, 1.07, 1.14, 1.28], // 10 onsets → 10 tiles+ "hold": 1.324, // downbeat f32+ "exit": [1.37, 1.51, 1.62, 1.74, 1.83, 1.97, 2.07],+ }, // staggered out (ends f50)+ {+ "op": "holdRecolor",+ "on": 2.35,+ "onTheme": 1, // snap on, lock, recolor+ "recolor": [2.42, 2.53, 2.81, 2.93],+ "themes": [2, 3, 1, 2],+ "off": 2.98,+ },+ {+ "op": "snakeFillOverlay", // fill → swap → overlay+ "fill": [3.04, 3.181, 3.44, 3.65, 3.79, 3.9], // 3.181 = downbeat f76 (accel)+ "swap": 4.0,+ "swapTheme": 4, // hard_stop "一键换装"+ "overlay": [4.11, 4.34, 4.48, 4.81, 4.97, 5.25, 5.48],+ }, // 7 onsets → 7 cutouts+]+```++**The rule of thumb:** structure (the build, the downbeat hold, the hard-stop swap)+leans on the strong grid; texture (per-onset reveals, per-beat recolors) rides the+dense onset stream in between.++---++## 2. Why _this beat_ → _this template_ (the matching intuition)++Reach for the tile-wall when the audiomap shows:++1. **A steady grid** (`has_steady_grid: true`) — you need downbeats to pin the+ build/hold/swap structure to.+2. **A dense, continuous onset stream** (`onset_gap_bars ≤ 0.5`) — _a hit available+ for every tile move_. group_5 is wall-to-wall snares/hihats; that's what lets one+ tile enter (or recolor, or fill) per onset.+3. **Distinct sub-phases you want to articulate differently** — an accumulate stretch,+ a held/rolling stretch, then a fill-and-drop. The three operations map onto exactly+ that shape: **build → recolor-on-roll → fill-then-drop**.+4. **A hard-stop / big DROP** mid-section — op C uses it for the full-grid "一键换装"+ recolor (`swap`), the single most dramatic beat in the scene.++Put plainly: **"steady grid + dense onsets + 2–3 contrasting sub-phases + a hard-stop"+is the fingerprint.** When you see it, you have a hit for every box you want to place,+recolor, or stack.++---++## 3. Usage++### Render with defaults (the group_5 recreation)++```bash+cd group_5_template+npx hyperframes lint . && npx hyperframes validate .+npx hyperframes render . -f 24 -o renders/group_5_recreate.mp4+# beat-matched proof (mux the original BGM):+ffmpeg -y -i renders/group_5_recreate.mp4 -i ../group_5.wav -c:v copy -c:a aac -shortest renders/group_5_recreate_audio.mp4+```++### Change the mosaic & labels (content only — no code edit)++```bash+npx hyperframes render . --variables '{+ "tiles": 16, "bands": 4, "gap": 6,+ "labels": "NEW,DROP,SALE,40% OFF,SHOP,NOW",+ "bgColor": "#111111"+}'+```++- **tiles** = how many different-sized boxes the packer tessellates the frame into.+- **bands** = how many horizontal row-bands the snake fill (OP C) sweeps through.+- **gap** = seam thickness (0 = truly edge-to-edge, no seams).+- The waterfall enter order, the snake path, and the per-onset mappings all adapt to+ the resulting mosaic automatically.+- **labels** is a comma list, cycled across tiles. **showText:false** hides labels for+ a pure color-block look.++### Recompose freely — compose by DATA, not code (the whole point)++The three operators (`staggerInOut`, `holdRecolor`, `snakeFillOverlay`) are **pure,+parameterized, order-independent** functions over the one shared mosaic. What runs — in+what order, on which beats — is a **data PROGRAM** (an array of `{op, ...beats}` steps).+The default group_5 score lives in [`program.json`](program.json) and inline as+`DEFAULT_PROGRAM` (§3); the runner (§7) just dispatches `OPS[step.op](step)`.++So you recompose **without touching operator code** — pass a `program` JSON string:++```bash+# Run ONE operator solo (just the snake-fill + overlay)+npx hyperframes render . --variables '{"program":"[{\"op\":\"snakeFillOverlay\",\"fill\":[0.3,0.8,1.3,1.8,2.3],\"swap\":2.8,\"swapTheme\":4,\"overlay\":[3.0,3.4,3.8,4.2]}]"}'++# REORDER + retime: recolor first, then build, then fill (B → A → C)+npx hyperframes render . --variables '{"program":"[{\"op\":\"holdRecolor\",\"on\":0.3,\"onTheme\":2,\"recolor\":[0.8,1.3,1.8],\"themes\":[3,1,4],\"off\":2.1},{\"op\":\"staggerInOut\",\"enter\":[2.4,2.6,2.8,3.0,3.2,3.4],\"exit\":[3.8,4.0,4.2]},{\"op\":\"snakeFillOverlay\",\"fill\":[4.4,4.7,5.0,5.3],\"swap\":5.4,\"overlay\":[5.5,5.65]}]"}'++# REPEAT an operator (build, exit, build again)+npx hyperframes render . --variables '{"program":"[{\"op\":\"staggerInOut\",\"enter\":[0.2,0.5,0.8,1.1],\"exit\":[1.5,1.8,2.1]},{\"op\":\"staggerInOut\",\"theme\":2,\"enter\":[2.5,2.8,3.1,3.4]}]"}'+```++Each step's fields are documented in [`card.json`](card.json) → `program_format`. An+agent composes by emitting this JSON (op names + beats) — it never edits JS. Steps+combine freely, reorder, repeat, or run solo; every operator re-shows tiles from hidden+and sets its own theme, so any sequence is safe.++> **Empty `program` = the built-in group_5 score.** Keep `program.json` and+> `DEFAULT_PROGRAM` in sync — `program.json` is the canonical, copy-pasteable data.++### Re-fit the beat to a different group (the part that changes per track)++Copy the new group's `audiomap.json` onset/downbeat seconds into the step beat lists+(in `program.json` / `DEFAULT_PROGRAM`). Each list grows or shrinks freely — more onsets+→ more tile moves; `beatAt()` distributes any tile count across any beat list. For a+longer/shorter piece, also set `DUR` and the root `data-duration` to the new span.++Add palettes to `THEMES`, faces to `FONTS`, more overlay slots are auto-built from the+program's hungriest `overlay` list — every move stays keyed to an audio second, so it+renders identically every time. Want a new move? add a function + an `OPS` key (§6) and+the program can call it by name.++> **Deterministic / asset-free:** only colored boxes + generic font stacks, no remote+> assets, no `Math.random` (scatter uses a deterministic index hash), no timers.+> See `references/builder-contract.md`. Lints clean (0 errors, 0 warnings); validates+> with no console errors.++---++## 4. Provenance++- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_5/group_5.mp4`+- **Audio:** `group_5.audiomap.json` (from `scripts/analyze-beatgrid.py`)+- **Video read:** `group_5.gemini-analysis.md` (Gemini 3 Pro) **corrected by+ frame-by-frame inspection** — Gemini mislabeled op B as a zero-gap two-row _banner_+ and concluded the three phases were "different systems." Pulling real frames at each+ onset proved B is the **same tile-wall recolored as a unit** (green→blue→pink), and+ that A/B/C share one asset family and one grid paradigm — i.e. one base template,+ three operations. Trust frames over sparse sampling for per-frame detail.+- **Open question for promotion:** the source omits an intro flourish (a green "III"+ glyph transition, 0–0.58s) that this template skips; decide whether to ship it as an+ optional pre-roll role. Also consider varying the per-phase grid _gap_ (the source+ loosens the gap in op A, tightens it in B/C) as an operation parameter.diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/assets/gsap.min.js b/skills/bgm-to-video/templates/poster-tile-mosaic/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/poster-tile-mosaic/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/card.json b/skills/bgm-to-video/templates/poster-tile-mosaic/card.jsonnew file mode 100644index 0000000000..24ccd14421--- /dev/null+++ b/skills/bgm-to-video/templates/poster-tile-mosaic/card.json@@ -0,0 +1,150 @@+{+ "id": "poster-tile-mosaic",+ "name": "Poster-Tile Mosaic · 3 beat-synced operations",+ "one_line": "ONE base template — a packed MOSAIC of DIFFERENT-sized colored tiles (asset-free: color + label) that tessellate to fill the frame with no overlap — driven by three interchangeable beat-synced operations: staggered enter/exit, locked global-recolor, and snake-fill + overlay.",+ "status": "promoted",+ "created": "2026-06-17",++ "base_template": {+ "primitive": "tile_mosaic",+ "notes": "A packed mosaic of DIFFERENT-sized absolutely-positioned tiles (NOT a uniform grid): tall / wide / small boxes that tessellate to fill the frame with no overlap (thin seams only) — the source's 错落 wall. Built by a deterministic recursive binary-split packer (split the largest region along its longer side; ratio is a fixed function of the step index). A tile = a colored box + a text label (stands in for an image; no assets). 'Add a box' = a new image; 'change a box color' = a new asset / recolor. All three operations below act on this one mosaic — that is the whole point: same tiles, different rhythmic scheduling."+ },++ "operations": {+ "A_staggerInOut": {+ "intent": "build the mosaic by popping DIFFERENT-sized tiles in one-per-onset (top-right→bottom-left waterfall) until they pack the frame with no overlap, hold on a downbeat, then pop them out one-per-onset",+ "anchors": "enter[] = onsets; hold = downbeat; exit[] = onsets",+ "what_moves": "transform + opacity per tile (scatter-jitter slide-in, drop-out); tiles vary in size and tessellate — they do NOT overlap",+ "source_span_sec": [0.58, 2.08],+ "source_frames_24": [14, 50]+ },+ "B_holdRecolor": {+ "intent": "snap the whole wall on at once, LOCK positions, recolor the entire grid as one unit on each beat",+ "anchors": "on = onset; recolor[] = snares (one palette swap each); off = onset",+ "what_moves": "background color of every tile (0ms set — a recolor is a hit, not a fade). Positions never change.",+ "source_span_sec": [2.37, 2.91],+ "source_frames_24": [57, 70]+ },+ "C_snakeFillOverlay": {+ "intent": "reveal tiles along a snake path to fill the grid, recolor the whole grid on the hard-stop, then pop overlay 'cutouts' on top one-per-onset",+ "anchors": "fill[] = onsets (incl. a downbeat accel); swap = hard_stop; overlay[] = onsets",+ "snake_path": "top row L→R, then bottom row R→L, repeating per row pair",+ "what_moves": "per-tile reveal (opacity+scale) along the path; one full-grid palette swap on the hard-stop; overlay elements pop in and HOLD (no exit)",+ "source_span_sec": [3.0, 5.5],+ "source_frames_24": [72, 137]+ }+ },++ "match": {+ "structural_type": "dense_multiply",+ "requires": {+ "energy_level": ">=MEDIUM",+ "density": "dense",+ "onset_gap_bars": "<=0.5",+ "has_steady_grid": true+ },+ "mood_fit": ["hype", "playful", "fashion", "retail", "bold"],+ "span_bars": [1, 3],+ "exit_trigger": ["hard_stop", "surge", "freeze"],+ "notes": "This is a META-template: a wall + a pluggable list of operations. Reach for it when a section has many discrete, individually-placeable onsets (a hit for every tile move) AND distinct sub-phases you want to articulate differently — accumulate, hold-and-flash, then fill-and-stack. The three ops map naturally onto: build → recolor-on-roll → fill-then-drop."+ },++ "examples": [+ {+ "sample": "bgm_test_2",+ "group": "g5",+ "bpm": 129.2,+ "downbeats_sec": [1.324, 3.181, 5.039],+ "hard_stop_sec": 4.0,+ "span_sec": [0.0, 5.75],+ "program": "A_staggerInOut(0.58-2.08) → B_holdRecolor(2.37-2.91) → C_snakeFillOverlay(3.0-5.5, [email protected])"+ }+ ],++ "params": {+ "bgColor": { "type": "color", "maps_to": "stage.background", "default": "#e9e9e9" },+ "tiles": {+ "type": "number",+ "maps_to": "mosaic.tile_count",+ "default": 12,+ "notes": "number of boxes the packer tessellates the frame into"+ },+ "bands": {+ "type": "number",+ "maps_to": "mosaic.snake_bands",+ "default": 3,+ "notes": "horizontal row-bands the snake fill (OP C) sweeps through"+ },+ "gap": { "type": "number", "maps_to": "mosaic.seam_px", "default": 10 },+ "showText": { "type": "boolean", "maps_to": "tile.label_visible", "default": true },+ "labels": {+ "type": "string",+ "maps_to": "tile.labels",+ "notes": "comma list, one per tile (cycled)"+ },+ "program": {+ "type": "string",+ "maps_to": "engine.program",+ "default": "",+ "notes": "JSON array of operator steps (see program_format). Empty = built-in group_5 score. THIS is the compose-by-data surface: reorder/drop/repeat steps, no code edit."+ }+ },++ "engine": {+ "model": "operators + program-as-data. The 3 operators (§6 of index.html) are pure, parameterized, order-independent functions over ONE shared mosaic. A PROGRAM (data) lists which run, in what order, on which beats; §7 dispatches it. Compose by editing DATA (the PROGRAM array, the `program` variable, or program.json) — never the operator code. Steps combine freely, repeat, and run solo.",+ "operators": ["staggerInOut", "holdRecolor", "snakeFillOverlay"],+ "dispatch": "OPS[step.op](step) for each step in PROGRAM",+ "extend": "add an operator = add a function + an OPS key; the program can then call it by name"+ },++ "program_format": {+ "_": "A program is a JSON array of steps. Each step = { op, ...fields }. Beats are absolute audio seconds. Themes are indices into THEMES[]. order = 'waterfall' | 'snake' | 'index' | [explicit tile-index array].",+ "staggerInOut": {+ "enter": "number[] — onset per tile (distributed if count != tiles); reveal in `order`",+ "exit": "number[]? — onset per tile to drop out; omit to leave the wall standing",+ "hold": "number? — documentary downbeat the full wall lands on (no tween)",+ "theme": "number? — THEMES index dressed at reveal (default 0)",+ "order": "string|array? — reveal order (default 'waterfall' = top-right→bottom-left)"+ },+ "holdRecolor": {+ "on": "number — all tiles snap on at once here",+ "onTheme": "number? — THEMES index on snap-on (default 0)",+ "recolor": "number[]? — beats at which the WHOLE wall recolors as a unit",+ "themes": "number[]? — THEMES index applied at each recolor beat (cycled)",+ "off": "number? — clear the wall here; omit to hold it"+ },+ "snakeFillOverlay": {+ "fill": "number[] — reveal anchors; tiles distributed across them in `order`",+ "baseTheme": "number? — THEMES index for the fill (default 0)",+ "swap": "number? — beat for a full-grid recolor (the hard-stop 一键换装)",+ "swapTheme": "number? — THEMES index for the swap (default 4)",+ "overlay": "number[]? — one cutout pops per beat, holds to the end",+ "order": "string|array? — fill order (default 'snake')"+ }+ },++ "reference_impl": "index.html",+ "program_data": "program.json (the default group_5 score as standalone, agent-editable data)",+ "uses_primitives": [+ "tile_mosaic",+ "mosaic_pack",+ "staggered_reveal",+ "staggered_exit",+ "palette_flip",+ "color_grid_shuffle",+ "directional_fill",+ "system_replace",+ "content_swap",+ "overlay_pop",+ "freeze_hold"+ ],++ "transition_out": { "default": "fast_cut", "observed": ["freeze", "hold_on_final_collage"] },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_5"],+ "provenance": {+ "video": "group_5.mp4",+ "audiomap": "group_5.audiomap.json (scripts/analyze-beatgrid.py)",+ "video_read": "group_5.gemini-analysis.md (Gemini 3 Pro) corrected by frame-by-frame inspection — Gemini mislabeled op B as a zero-gap banner and called the three a 'different systems'; pulled frames proved B is the same tile-wall recolored as a unit, and all three share one asset family / grid paradigm."+ }+}diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/index.html b/skills/bgm-to-video/templates/poster-tile-mosaic/index.htmlnew file mode 100644index 0000000000..98395360e0--- /dev/null+++ b/skills/bgm-to-video/templates/poster-tile-mosaic/index.html@@ -0,0 +1,589 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Stage background", "default":"#e9e9e9"},+ {"id":"tiles", "type":"number", "label":"Tile count (mosaic)", "default":12},+ {"id":"bands", "type":"number", "label":"Snake-fill row bands", "default":3},+ {"id":"gap", "type":"number", "label":"Seam / gap (px)", "default":10},+ {"id":"showText","type":"boolean", "label":"Show tile labels", "default":true},+ {"id":"labels", "type":"string", "label":"Tile labels (comma list)", "default":"DARE TO BE BOLD,NEW DROP,WALK THE TALK,STAND OUT,PUCKER UP,SUPER SONIC,IN TECHNICOLOUR,BOLD PRINTS,NEW SCENTS,TIME TO MOVE,CRAZY FUNKY COOL,BEAUTY INSIDE"},+ {"id":"program", "type":"string", "label":"Program JSON (empty = built-in group_5 score)", "default":""}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Poster-Tile Wall · 3 beat-synced operations — group_5 reference impl</title>+ <script src="./assets/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ background: var(--bg, #e9e9e9);+ overflow: hidden;+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--bg, #e9e9e9);+ }+ /* the wall = the BASE TEMPLATE. all three operations act on this one grid. */+ #wall {+ position: absolute;+ inset: 0;+ }+ .gf-tile {+ position: absolute;+ display: flex;+ align-items: flex-end;+ overflow: hidden;+ will-change: transform, opacity;+ backface-visibility: hidden;+ }+ .gf-label {+ font-weight: 800;+ line-height: 0.95;+ letter-spacing: -0.01em;+ padding: 0.5em 0.55em;+ text-transform: uppercase;+ word-break: break-word;+ }+ /* overlay "cutouts" (phase C) — drawn, asset-free silhouette + label */+ .gf-ov {+ position: absolute;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: flex-end;+ border-radius: 6px;+ will-change: transform, opacity;+ box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);+ }+ .gf-ov .sil {+ position: relative;+ width: 60%;+ flex: 1 1 auto;+ margin-top: 14%;+ display: flex;+ align-items: flex-end;+ justify-content: center;+ }+ .gf-ov .sil::before {+ /* head */+ content: "";+ position: absolute;+ top: 0;+ width: 34%;+ padding-top: 34%;+ border-radius: 50%;+ background: currentColor;+ }+ .gf-ov .sil::after {+ /* shoulders / body */+ content: "";+ width: 100%;+ height: 56%;+ border-radius: 48% 48% 14% 14% / 60% 60% 14% 14%;+ background: currentColor;+ }+ .gf-ov .cap {+ align-self: stretch;+ text-align: center;+ font-weight: 800;+ font-size: 26px;+ letter-spacing: 0.02em;+ padding: 10px 6px;+ text-transform: uppercase;+ }+ </style>+ </head>+ <body>+ <!-- duration 5.75s = the full group_5 span (3 operations back to back, ends frozen) -->+ <div+ data-hf-id="hf-g5rt"+ id="root"+ data-composition-id="group-five-recreate"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="5.75"+ data-root="true"+ >+ <div data-hf-id="hf-g5wall" id="wall"></div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════════+ // POSTER-TILE MOSAIC · ONE base template, THREE beat-synced operations+ // ────────────────────────────────────────────────────────────────────+ // BASE : a packed MOSAIC of DIFFERENT-SIZED colored tiles (asset-free:+ // color + label). The tiles are NOT a uniform grid — they vary in+ // size (tall / wide / small) and tessellate to fill the frame with+ // no overlap (thin seams only), exactly like the source's 错落 wall.+ // "adding a box" = a new image; "changing a box color" = a new+ // asset/recolor. Everything below just schedules these tiles on+ // the beat. Reverse-engineered from group_5 of the golden sample.+ //+ // OP A staggerInOut : tiles enter staggered (top-right→bottom-left waterfall)+ // → hold on a downbeat → exit staggered. each in/out+ // lands on one onset. mixed sizes packing to full frame.+ // OP B holdRecolor : all tiles snap on at once, positions LOCKED, the+ // whole palette recolors as a unit on each beat.+ // OP C snakeFill+overlay : tiles reveal in a snake path (band by band,+ // L→R then R→L) → a full-grid recolor on the hard-stop+ // → extra "cutout" tiles pop on top, one per beat.+ //+ // ARCHITECTURE: the operators (§6) are pure, parameterized, order-independent+ // functions. A data PROGRAM (§3) lists which operators run, in what order,+ // on which beats — and §7 just dispatches it. So you compose by editing DATA+ // (the PROGRAM array, or the `program` render variable / program.json), never+ // the operator code. Combine freely, repeat, or run one solo.+ // ════════════════════════════════════════════════════════════════════++ // ── 1. Content variables (what a user changes; everything else is timing)+ var defaults = {+ bgColor: "#e9e9e9",+ tiles: 12,+ bands: 3,+ gap: 10,+ showText: true,+ labels:+ "DARE TO BE BOLD,NEW DROP,WALK THE TALK,STAND OUT,PUCKER UP," ++ "SUPER SONIC,IN TECHNICOLOUR,BOLD PRINTS,NEW SCENTS,TIME TO MOVE," ++ "CRAZY FUNKY COOL,BEAUTY INSIDE",+ program: "", // empty = built-in group_5 score (DEFAULT_PROGRAM, §3)+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );+ var N = Math.max(2, parseInt(vars.tiles, 10) || 12);+ var BANDS = Math.max(1, parseInt(vars.bands, 10) || 3);+ var GAP = Math.max(0, parseFloat(vars.gap) || 0);+ var SHOW_TEXT = vars.showText !== false && vars.showText !== "false";+ var LABELS = String(vars.labels)+ .split(",")+ .map(function (s) {+ return s.trim();+ });++ // ── 2. PALETTE LIBRARY — each THEME is a "look" the whole wall can wear.+ // A recolor (OP B) / a swap (OP C) just points the wall at another theme.+ // Tile i takes theme[i % theme.length], so one theme dresses the grid in a+ // coordinated multi-color scheme. Add themes freely — more beats, more looks.+ var THEMES = [+ ["#c8f53a", "#101010", "#ffffff", "#1d1d1d"], // 0 lime / ink (default + OP A)+ ["#b6f23c", "#0c2a14", "#ffffff", "#0c2a14"], // 1 green+ ["#2f5cff", "#dce8ff", "#0a1748", "#9fc0ff"], // 2 blue+ ["#ff5ab3", "#23d6a3", "#1a0a14", "#ffd1ec"], // 3 pink / mint+ ["#ff3b30", "#ffd60a", "#0a84ff", "#30d158"], // 4 saturated DROP look+ ];+ var FONTS = [+ // typographic variety per tile (the "字体" inside each box)+ '"Helvetica Neue", Arial, sans-serif',+ 'Georgia, "Times New Roman", serif',+ '"Arial Narrow", "Helvetica Neue", sans-serif',+ '"Courier New", Courier, monospace',+ ];+ function contrast(hex) {+ // readable text color for a given fill+ var h = hex.replace("#", "");+ var r = parseInt(h.substr(0, 2), 16),+ g = parseInt(h.substr(2, 2), 16),+ b = parseInt(h.substr(4, 2), 16);+ return 0.299 * r + 0.587 * g + 0.114 * b > 150 ? "#0b0b0b" : "#ffffff";+ }+ function themeColor(t, slot) {+ var pal = THEMES[((t % THEMES.length) + THEMES.length) % THEMES.length];+ return pal[slot % pal.length];+ }++ // ── 3. THE PROGRAM (data) — the composable surface ──────────────────────+ // An ordered list of operator steps {op, ...beats/opts}. THIS is what you+ // recompose: reorder, drop, repeat, or swap a step's beats — no operator code+ // changes. An agent can override the whole list at render time via the+ // `program` variable (a JSON string), so it composes by emitting DATA, not by+ // editing JS. Beats are absolute audio seconds from <group>.audiomap.json.+ // Mirrors program.json. group_5: 129.2 BPM · downbeats 1.324/3.181/5.039 ·+ // hard_stop 4.0s. (See card.json → program_format for each op's fields.)+ var DEFAULT_PROGRAM = [+ {+ op: "staggerInOut", // build → hold (downbeat) → exit+ theme: 0,+ enter: [0.23, 0.37, 0.46, 0.6, 0.7, 0.84, 0.91, 1.07, 1.14, 1.28],+ hold: 1.324,+ exit: [1.37, 1.51, 1.62, 1.74, 1.83, 1.97, 2.07],+ },+ {+ op: "holdRecolor", // snap on, lock, recolor per snare+ on: 2.35,+ onTheme: 1,+ recolor: [2.42, 2.53, 2.81, 2.93],+ themes: [2, 3, 1, 2],+ off: 2.98,+ },+ {+ op: "snakeFillOverlay", // snake fill → swap → overlay pops+ baseTheme: 0,+ fill: [3.04, 3.181, 3.44, 3.65, 3.79, 3.9], // 3.181 = downbeat f76 (accel)+ swap: 4.0,+ swapTheme: 4, // hard_stop "一键换装"+ overlay: [4.11, 4.34, 4.48, 4.81, 4.97, 5.25, 5.48],+ }, // 7 onsets, 1 cutout each+ ];+ var DUR = 5.75; // = root data-duration; re-timing a new track edits both + the beats++ // Resolve the active program: a non-empty `program` variable (JSON) overrides.+ var PROGRAM = DEFAULT_PROGRAM;+ if (vars.program && String(vars.program).trim()) {+ try {+ var parsed = typeof vars.program === "string" ? JSON.parse(vars.program) : vars.program;+ if (parsed && parsed.length) PROGRAM = parsed;+ } catch (e) {+ PROGRAM = DEFAULT_PROGRAM;+ } // malformed → fall back, render stays valid+ }+ // Pre-build enough overlay "cutout" elements for the hungriest step.+ var maxOverlays = 0;+ PROGRAM.forEach(function (s) {+ if (s.overlay && s.overlay.length > maxOverlays) maxOverlays = s.overlay.length;+ });++ // ── 4. Build the MOSAIC (the base template — DIFFERENT-sized packed tiles) ─+ var root = document.getElementById("root");+ document.documentElement.style.setProperty("--bg", vars.bgColor);+ var wall = document.getElementById("wall");++ var MARGIN = 56;+ var innerW = 1920 - MARGIN * 2,+ innerH = 1080 - MARGIN * 2;++ // Pack the frame into N DIFFERENT-sized rects that tessellate with NO overlap:+ // recursively split the largest region along its longer side. Deterministic —+ // the split ratio is a fixed function of the step index, so it renders the same+ // every time (no Math.random). This is the "错落 but gap-filling" look of OP A.+ function packMosaic(n, W, H) {+ var rects = [{ x: 0, y: 0, w: W, h: H }];+ while (rects.length < n) {+ var bi = 0;+ for (var i = 1; i < rects.length; i++) {+ if (rects[i].w * rects[i].h > rects[bi].w * rects[bi].h) bi = i;+ }+ var r = rects.splice(bi, 1)[0];+ var ratio = 0.4 + ((rects.length * 37) % 21) / 100; // 0.40..0.60, deterministic+ if (r.w >= r.h) {+ var w1 = Math.round(r.w * ratio);+ rects.push({ x: r.x, y: r.y, w: w1, h: r.h });+ rects.push({ x: r.x + w1, y: r.y, w: r.w - w1, h: r.h });+ } else {+ var h1 = Math.round(r.h * ratio);+ rects.push({ x: r.x, y: r.y, w: r.w, h: h1 });+ rects.push({ x: r.x, y: r.y + h1, w: r.w, h: r.h - h1 });+ }+ }+ return rects;+ }+ var rects = packMosaic(N, innerW, innerH);++ var tiles = [];+ for (var idx = 0; idx < N; idx++) {+ var R = rects[idx];+ var el = document.createElement("div");+ el.className = "gf-tile";+ el.style.left = MARGIN + R.x + GAP / 2 + "px";+ el.style.top = MARGIN + R.y + GAP / 2 + "px";+ el.style.width = Math.max(1, R.w - GAP) + "px";+ el.style.height = Math.max(1, R.h - GAP) + "px";+ el.style.backgroundColor = themeColor(0, idx);++ var lab = document.createElement("span");+ lab.className = "gf-label";+ lab.textContent = SHOW_TEXT ? LABELS[idx % LABELS.length] || "" : "";+ lab.style.color = contrast(themeColor(0, idx));+ lab.style.fontFamily = FONTS[idx % FONTS.length];+ lab.style.fontSize = Math.round(Math.min(R.w, R.h) * 0.16) + "px";+ el.appendChild(lab);++ wall.appendChild(el);+ tiles.push({+ el: el,+ label: lab,+ idx: idx,+ cx: R.x + R.w / 2,+ cy: R.y + R.h / 2,+ rect: R,+ });+ }++ // enter/exit order (OP A): top-right → bottom-left waterfall (matches source)+ var enterOrder = tiles+ .map(function (t) {+ return t.idx;+ })+ .sort(function (a, b) {+ return tiles[b].cx - tiles[b].cy - (tiles[a].cx - tiles[a].cy);+ });+ // snake order (OP C): band by band top→bottom, alternating L→R / R→L+ var bandH = innerH / BANDS;+ var snakeOrder = tiles+ .map(function (t) {+ return t.idx;+ })+ .sort(function (a, b) {+ var ba = Math.min(BANDS - 1, Math.floor(tiles[a].cy / bandH));+ var bb = Math.min(BANDS - 1, Math.floor(tiles[b].cy / bandH));+ if (ba !== bb) return ba - bb;+ return (ba % 2 === 0 ? 1 : -1) * (tiles[a].cx - tiles[b].cx);+ });++ // overlay "cutouts" (OP C) — drawn silhouettes at scattered spots+ var OV_POS = [+ // % of the inner stage+ { l: 60, t: 50 },+ { l: 14, t: 56 },+ { l: 78, t: 12 },+ { l: 38, t: 26 },+ { l: 50, t: 58 },+ { l: 70, t: 66 },+ { l: 26, t: 40 },+ ];+ var overlays = [];+ for (var k = 0; k < maxOverlays; k++) {+ var pos = OV_POS[k % OV_POS.length];+ var ov = document.createElement("div");+ ov.className = "gf-ov";+ var ow = innerW * 0.2,+ oh = innerH * 0.62;+ ov.style.width = ow + "px";+ ov.style.height = oh + "px";+ ov.style.left = MARGIN + innerW * (pos.l / 100) - ow / 2 + "px";+ ov.style.top = MARGIN + innerH * (pos.t / 100) - oh / 2 + "px";+ var fill = themeColor(4, k);+ ov.style.backgroundColor = fill;+ var sil = document.createElement("div");+ sil.className = "sil";+ sil.style.color = contrast(fill);+ var cap = document.createElement("div");+ cap.className = "cap";+ cap.textContent = SHOW_TEXT ? "MODEL " + (k + 1) : "";+ cap.style.color = contrast(fill);+ ov.appendChild(sil);+ ov.appendChild(cap);+ wall.appendChild(ov);+ overlays.push(ov);+ }++ // ── 5. Timeline + small helpers ─────────────────────────────────────────+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });++ // overwrite:"auto" lets a later move on a tile cleanly supersede an earlier+ // one (and keeps the static linter from cross-flagging dynamically-targeted tweens).+ // immediateRender:false — a from/fromTo MUST NOT bake its from-state at creation,+ // or an operator scheduled LATER (e.g. staggerInOut's jitter) would park the tiles+ // off-grid during an EARLIER operator (e.g. holdRecolor). Keeps operators order-independent.+ var POP = {+ duration: 0.12,+ ease: "back.out(1.7)",+ overwrite: "auto",+ immediateRender: false,+ };+ function setTheme(t, idx, themeIdx) {+ // 0ms recolor on the beat (a hit, not a fade)+ var col = themeColor(themeIdx, idx);+ tl.set(tiles[idx].el, { backgroundColor: col }, t);+ tl.set(tiles[idx].label, { color: contrast(col) }, t);+ }+ function jitter(i) {+ // deterministic scatter offset (no Math.random — must render identically)+ return { x: (((i * 37) % 7) - 3) * 16, y: (((i * 53) % 7) - 3) * 16 };+ }+ function beatAt(i, n, beats) {+ // distribute n items across a beat list, monotonic+ if (!beats || !beats.length) return 0;+ return beats[Math.min(beats.length - 1, Math.floor((i * beats.length) / n))];+ }+ function orderOf(name) {+ // resolve a reveal order (string preset or explicit array)+ if (Array.isArray(name)) return name;+ if (name === "snake") return snakeOrder;+ if (name === "index")+ return tiles.map(function (t) {+ return t.idx;+ });+ return enterOrder; // default = top-right→bottom-left waterfall+ }++ gsap.set(+ tiles.map(function (t) {+ return t.el;+ }),+ { autoAlpha: 0 },+ );+ if (overlays.length) gsap.set(overlays, { autoAlpha: 0 });++ // ── 6. THE THREE OPERATORS — pure, parameterized, order-independent ──────+ // Each takes ONE program step P and schedules onto `tl`. Each "shows" tiles+ // via fromTo(from hidden) and sets its own theme, so operators compose in ANY+ // order, repeat safely, and can run solo. Add a new operator = add a function+ // here + a key in OPS; the PROGRAM (§3 / the `program` var) can then call it.++ // A — staggered enter (waterfall) → hold → staggered exit. one move per beat.+ // P: { enter:[s], exit?:[s], theme?:i, order?:"waterfall"|"snake"|"index"|[idx] }+ function staggerInOut(P) {+ var order = orderOf(P.order),+ theme = P.theme || 0;+ order.forEach(function (i, k) {+ setTheme(beatAt(k, N, P.enter), i, theme);+ var d = jitter(i);+ tl.fromTo(+ tiles[i].el,+ { autoAlpha: 0, scale: 0.78, x: d.x, y: d.y },+ Object.assign({ autoAlpha: 1, scale: 1, x: 0, y: 0 }, POP),+ beatAt(k, N, P.enter),+ );+ });+ // hold = the wall simply stays put until the exit begins (no extra tween)+ if (!P.exit || !P.exit.length) return; // no exit → leave the wall standing+ order.forEach(function (i, k) {+ tl.to(+ tiles[i].el,+ {+ autoAlpha: 0,+ scale: 0.9,+ y: 46,+ duration: 0.12,+ ease: "power2.in",+ overwrite: "auto",+ },+ beatAt(k, N, P.exit),+ );+ });+ }++ // B — snap whole wall on, LOCK positions, recolor as a unit on each beat.+ // P: { on:s, recolor?:[s], themes?:[i], onTheme?:i, off?:s }+ function holdRecolor(P) {+ tiles.forEach(function (_, i) {+ setTheme(P.on, i, P.onTheme || 0);+ });+ // x:0,y:0 resets any transform a prior operator left behind → clean LOCKED grid+ tl.fromTo(+ tiles.map(function (t) {+ return t.el;+ }),+ { autoAlpha: 0, scale: 0.96, x: 0, y: 0 },+ {+ autoAlpha: 1,+ scale: 1,+ x: 0,+ y: 0,+ duration: 0.1,+ ease: "power2.out",+ overwrite: "auto",+ immediateRender: false,+ },+ P.on,+ );+ (P.recolor || []).forEach(function (t, ri) {+ var th = (P.themes || [0])[ri % (P.themes || [0]).length];+ tiles.forEach(function (_, i) {+ setTheme(t, i, th);+ });+ });+ if (P.off != null) {+ tl.to(+ tiles.map(function (t) {+ return t.el;+ }),+ { autoAlpha: 0, scale: 0.97, duration: 0.1, ease: "power2.in", overwrite: "auto" },+ P.off,+ );+ }+ }++ // C — snake reveal → optional full-grid swap → overlay cutouts pop on top.+ // P: { fill:[s], baseTheme?:i, swap?:s, swapTheme?:i, overlay?:[s], order?:… }+ function snakeFillOverlay(P) {+ var order = orderOf(P.order || "snake"),+ base = P.baseTheme || 0;+ var f0 = P.fill && P.fill.length ? P.fill[0] : 0;+ order.forEach(function (i) {+ setTheme(Math.max(0, f0 - 0.01), i, base);+ });+ order.forEach(function (i, k) {+ tl.fromTo(+ tiles[i].el,+ { autoAlpha: 0, scale: 0.85, x: 0, y: 0 }, // x/y reset → fills on the clean grid+ {+ autoAlpha: 1,+ scale: 1,+ x: 0,+ y: 0,+ duration: 0.1,+ ease: "back.out(1.6)",+ overwrite: "auto",+ immediateRender: false,+ },+ beatAt(k, N, P.fill),+ );+ });+ if (P.swap != null) {+ // hard-stop "一键换装" — recolor the whole grid at once+ tiles.forEach(function (_, i) {+ setTheme(P.swap, i, P.swapTheme != null ? P.swapTheme : 4);+ });+ }+ (P.overlay || []).forEach(function (t, i) {+ // one cutout per beat; final holds+ if (!overlays[i]) return;+ tl.fromTo(+ overlays[i],+ { autoAlpha: 0, scale: 0.6, y: 30 },+ {+ autoAlpha: 1,+ scale: 1,+ y: 0,+ duration: 0.16,+ ease: "back.out(2)",+ overwrite: "auto",+ immediateRender: false,+ },+ t,+ );+ });+ }++ var OPS = {+ staggerInOut: staggerInOut,+ holdRecolor: holdRecolor,+ snakeFillOverlay: snakeFillOverlay,+ };++ // ── 7. RUN THE PROGRAM — dispatch each step to its operator, in order ────+ PROGRAM.forEach(function (step) {+ var fn = step && OPS[step.op];+ if (fn) fn(step);+ });++ tl.to({}, { duration: 0.001 }, DUR); // pin the timeline length to the full span+ tl.seek(0);+ window.__timelines["group-five-recreate"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/poster-tile-mosaic/program.json b/skills/bgm-to-video/templates/poster-tile-mosaic/program.jsonnew file mode 100644index 0000000000..6ae1f375bf--- /dev/null+++ b/skills/bgm-to-video/templates/poster-tile-mosaic/program.json@@ -0,0 +1,25 @@+[+ {+ "op": "staggerInOut",+ "theme": 0,+ "enter": [0.23, 0.37, 0.46, 0.6, 0.7, 0.84, 0.91, 1.07, 1.14, 1.28],+ "hold": 1.324,+ "exit": [1.37, 1.51, 1.62, 1.74, 1.83, 1.97, 2.07]+ },+ {+ "op": "holdRecolor",+ "on": 2.35,+ "onTheme": 1,+ "recolor": [2.42, 2.53, 2.81, 2.93],+ "themes": [2, 3, 1, 2],+ "off": 2.98+ },+ {+ "op": "snakeFillOverlay",+ "baseTheme": 0,+ "fill": [3.04, 3.181, 3.44, 3.65, 3.79, 3.9],+ "swap": 4.0,+ "swapTheme": 4,+ "overlay": [4.11, 4.34, 4.48, 4.81, 4.97, 5.25, 5.48]+ }+]diff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.md b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.mdnew file mode 100644index 0000000000..f6148e657e--- /dev/null+++ b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/README.md@@ -0,0 +1,150 @@+# Roll-Driven Flipbook (Word Cycle → Optional Lock)++> Reverse-engineered from **gruop_3** of the golden sample (the fast word-flicker scene).+> `structural_type: dense_multiply` · status: **draft**++A general **fast word-flipbook**: a hi-hat **roll** drives a centred word that flips every+16th-note, cycling a word list to _fill the roll_. **On demand**, when a phrase is wanted,+the flicker resolves (scramble-decode) and **locks** into a final line. Background is pure+black (the original's rotating 3D shape / glitch field is an optional add-on role).++```+gruop_3_template/+ index.html ← parameterized, asset-free reference impl (1 paused GSAP timeline)+ card.json ← the spec: match-face + build-face+ README.md ← this file+```++---++## 1. How it beat-syncs++Track facts (from `gruop_3.audiomap.json`): **BPM 129.2**, 4/4. The defining audio event+is a **sustained-fill hi-hat roll** — in the source at 3.71–6.66s, 21 hits, ~407 hits/min+— i.e. roughly a hit every **16th-note** (`60/129.2/4 = 0.116s`). That roll is the+flicker's clock.++**Timing is scene-relative** (rebased so content starts at ~0 — a template carries no dead+pre-roll; the source's 3.71s offset is removed):++| phase | what happens | scene time |+| ------------------------- | ----------------------------------------------------------------------------------------------------- | -------------- |+| **A — flicker** | a centred word hard-swaps every **0.116s** (16th-note), cycling the word list, **filling** the window | `0.10 → 2.19s` |+| **— clear** | the flicker clears (negative-space breath) | `~2.2s` |+| **B — lock** _(optional)_ | a scrambled line decodes left→right and locks the phrase | `2.33 → 3.33s` |+| **— hold** | the locked phrase holds to the end | `→ 3.8s` |++The flicker rate is **roll-level**, ~4× faster than the per-onset rate — that's what makes+words _flicker_ instead of _read one at a time_.++> **Why duration isn't hard-coded.** Scene length is read from the root `data-duration`+> attribute (single source — `3.8s` here). The flicker length isn't a magic number either+> — it's `round((flipEnd − flipStart) / 16th)`, so it **auto-fills whatever window you+> give it**. Change the beat → the flipbook re-fits.++---++## 2. When you reach for this template (the matching signal)++The Music Reader emits a `GroupSignature`; **the single tell for this template is a fast+`rolls[]` entry** (`sustained-fill`, hundreds of hits/min). A roll means:++- the music is giving you a **dense grid of evenly-spaced slots** (16th-notes), and+- there's **no single readable message** to hold — it's energy/texture.++So you fill the grid with a **rapidly-cycling word flipbook** (`dense_multiply`). If a+**SURGE / downbeat follows** the roll, that's your cue to **lock** the flicker into a+final phrase (the optional resolve).++### The contrast that makes the choice mechanical++Same track, three groups, three different onset _rates_ → three different templates:++| group | audio signature | rate | → template | text behaviour |+| ------ | ------------------------------------ | --------------- | ----------------------------------- | ---------------------------- |+| g1 | onset **desert** (`gap ≥1.5 bar`) | ~0 | `held-message-living-field` | text frozen, field moves |+| g2 | **continuous onsets** (`gap <1 bar`) | ~3/s | `typewriter-phrase-keyword-shuffle` | one word **per onset** |+| **g3** | a **sustained-fill roll** | **~7/s (16th)** | **`roll-flipbook-word-cycle`** | words **flicker** (many/sec) |++Read it as a rate ladder: **no onsets → hold · onsets → type one word each · a roll →+flicker many words.** When the audiomap shows a roll, you reach for _this_ card.++---++## 3. Usage++### Render with defaults (the gruop_3 recreation)++```bash+cd gruop_3_template+npx hyperframes lint && npx hyperframes validate+npx hyperframes render -f 24 -o renders/out.mp4+```++### Change the words / lock phrase (content only — no code edit)++```bash+# flicker a different list, lock a different phrase+npx hyperframes render --variables '{+ "flipWords":"Ship,Iterate,Measure,Repeat",+ "resolveText":"build in public",+ "accentColor":"#39e6a0"+}'++# PURE FLICKER — no lock. Empty resolveText → the last cycled word just holds.+npx hyperframes render --variables '{"resolveText":""}'+```++- **`flipWords`** is cycled to fill the roll, however many you give (1 → N). More words →+ fewer repeats; fewer words → more loops. The fill count follows the beat, not the list.+- **`resolveText` empty → pure flicker** (on-demand lock: only set it when you want a+ phrase to land). `periodChar` empty → no accent dot.++### Re-fit to a different beat (the part that changes per track)++Two edits, both single-sourced. Timing is **scene-relative** — map your roll onto the+scene start (subtract the roll's absolute offset) so there's no dead pre-roll:++1. **Scene length** — set `data-duration` on `#root` in the HTML to your scene span.+2. **The `BEAT` block** at the top of the script:++```js+var BEAT = {+ bpm: <tempo.bpm>, // sets the 16th-note flip step automatically+ flipStart: 0.10, // small lead-in (keep near 0 — no dead air)+ flipEnd: 0.10 + <rollLen>, // rollLen = audiomap rolls[].end − rolls[].start+ resolveStart: flipEnd + ~0.14, // short clear; only used if a lock phrase is set+ resolveLock: resolveStart + ~1, // place just before a downbeat in your track+};+// then set data-duration ≈ resolveLock + ~0.5 (hold)+```++That's it — the number of word-swaps, the decode step count, and the final hold all+derive from these + `data-duration`. No other timing constants to touch.++---++## 4. Implementation notes (why it's built this way)++- **Everything is a 0ms `tl.set(autoAlpha)` on a pre-built node** (content*swap flipbook).+ The scramble is a \_second* flipbook whose frames are progressively-resolved strings,+ baked deterministically at build time.+- **Avoided:** GSAP `tl.set({textContent})` and tween `onUpdate` — both silently fail+ under the seek-by-frame renderer (verified: they render black). Also avoided animating+ `scale` on a `translate(-50%,-50%)`-centred node (GSAP clobbers the centering) — layers+ are **grid-centred** instead.+- **Final-frame gotcha:** a `set` placed at the timeline's _last instant_ is dropped by+ the renderer, so the resolve locks slightly before the end and a no-op `tl.set(stack,+{opacity:1}, DUR)` extends the timeline so the held phrase renders to the end.+- Deterministic / asset-free: generic font stacks, no `Math.random`, no timers.++## 5. Provenance++- **Source:** `bgm-golden-sample-reverse/gorup-by-group/gruop_3/gruop_3.mp4`+- **Audio:** `gruop_3.audiomap.json` (from `scripts/analyze-beatgrid.py`)+- **Video read:** `gruop_3.gemini-analysis.md` (Gemini 3 Pro) **confirmed by frame-by-frame+ inspection** — Gemini's word list (Design → … → Event Management, 2 loops) and the+ decode-to-"everything you need." resolve both checked out against real frames.+- **Open for promotion:** identify the source's actual typefaces if a pixel-exact match+ is wanted (this impl reproduces the _mechanism_ with a generic bold sans), and decide+ whether to ship the rotating-3D / glitch background as a second role.diff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.json b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.jsonnew file mode 100644index 0000000000..ce00b2f67d--- /dev/null+++ b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/card.json@@ -0,0 +1,111 @@+{+ "id": "roll-flipbook-word-cycle",+ "name": "Roll-Driven Flipbook (Word Cycle → Optional Lock)",+ "one_line": "A hi-hat roll drives a centred word that flips every 16th-note through a word list; optionally the flicker resolves and locks into a final phrase.",+ "status": "promoted",++ "match": {+ "structural_type": "dense_multiply",+ "requires": {+ "has_roll": true,+ "roll_rate_per_min": ">=300",+ "roll_kind": "sustained-fill",+ "energy_level": ">=MEDIUM",+ "density": ["medium", "dense"]+ },+ "mood_fit": ["hype", "glitch", "aggressive", "tense", "playful"],+ "span_bars": [1, 4],+ "exit_trigger": ["surge", "downbeat", "hard_stop"],+ "notes": "The ONE signal that triggers this template is a fast sustained-fill rolls[] entry in the audiomap (hundreds of hits/min, ~16th-note). A roll = a dense grid of slots with no single readable message → fill it with a rapidly-cycling word flipbook. Contrast held-message (onset desert → freeze) and typewriter-phrase (continuous onsets → one word per onset): here the RATE is roll-level (≈4× faster than onsets), so words flicker, they don't read one-at-a-time. The lock-to-phrase resolve is OPTIONAL."+ },++ "examples": [+ {+ "sample": "gruop_3",+ "group": "g3-flicker-lock",+ "bpm": 129.2,+ "structural_type": "dense_multiply",+ "energy_level": "HIGH",+ "energy": 0.9,+ "density": "dense",+ "roll": {+ "start": 3.71,+ "end": 6.66,+ "hits": 21,+ "rate_per_min": 407,+ "kind": "sustained-fill",+ "drum": "hihat"+ },+ "has_steady_grid": true,+ "span_sec": [3.32, 6.966],+ "span_bars": 2,+ "entry": { "anchor": "roll", "time": 3.625 },+ "exit_trigger": { "type": "surge", "time": 6.966 },+ "mood": ["hype", "glitch"]+ }+ ],++ "roles": {+ "word_flicker": {+ "kind": "message",+ "motion": "flipbook",+ "anchor": "roll.16th_grid",+ "notes": "PROPOSED motion verb. A centred word that hard-swaps (0ms) every 16th-note, cycling the word list to FILL the roll window. Word count auto-derives from (rollEnd-rollStart)/16th. The typographic field IS the percussion."+ },+ "lock_phrase": {+ "kind": "message",+ "motion": "scramble_decode",+ "anchor": "surge + next_downbeat",+ "notes": "PROPOSED motion verb. OPTIONAL. On the SURGE after the roll, the flicker clears and a scrambled line decodes left→right, locking the final phrase on the next downbeat. Empty resolveText → skip; the last flicker word just holds (locks) instead."+ },+ "background": {+ "kind": "background",+ "motion": "hold",+ "anchor": "none",+ "notes": "Pure black in this reference impl (per the reverse brief). The original gruop_3 layered a rotating 3D shape + glitch field here — an OPTIONAL add-on role, not required by the structural type."+ }+ },++ "params": {+ "bgColor": { "type": "color", "maps_to": "background.color" },+ "textColor": { "type": "color", "maps_to": "word_flicker.color + lock_phrase.color" },+ "accentColor": { "type": "color", "maps_to": "lock_phrase.trailing_accent" },+ "flipWords": {+ "type": "string",+ "maps_to": "word_flicker.words",+ "note": "comma-separated; cycled to fill the roll"+ },+ "resolveText": {+ "type": "string",+ "maps_to": "lock_phrase.content",+ "optional": true,+ "note": "EMPTY = pure flicker, no lock"+ },+ "periodChar": { "type": "string", "maps_to": "lock_phrase.trailing_accent", "optional": true }+ },++ "beat_map": {+ "comment": "Script-side BEAT block in index.html. SCENE-RELATIVE (starts at ~0, no dead pre-roll) — the source's absolute roll at 3.71s is rebased to flipStart. Duration is single-sourced from data-duration; the flipbook AUTO-FILLS the flicker window.",+ "bpm": 129.2,+ "flip_step_derived": "60/bpm/4 (16th-note) = 0.116s",+ "flipStart": 0.1,+ "flipEnd": 2.19,+ "fill_roll": true,+ "resolveStart": 2.33,+ "resolveLock": 3.33,+ "duration": "from data-duration (3.8 here)",+ "source_roll_absolute": {+ "start": 3.71,+ "end": 6.66,+ "note": "rebased: subtract ~3.6s offset to remove the pre-roll"+ }+ },++ "reference_impl": "index.html",+ "uses_primitives": ["content_swap", "word_grid_burst", "negative_space_hold", "value_counter"],++ "transition_out": { "default": "fast_cut", "observed": "clear_then_decode_lock" },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/gruop_3"],+ "created": "2026-06-17"+}diff --git a/skills/bgm-to-video/templates/roll-flipbook-word-cycle/index.html b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/index.htmlnew file mode 100644index 0000000000..d3d2e930a8--- /dev/null+++ b/skills/bgm-to-video/templates/roll-flipbook-word-cycle/index.html@@ -0,0 +1,267 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Background", "default":"#000000"},+ {"id":"textColor", "type":"color", "label":"Text color", "default":"#ffffff"},+ {"id":"accentColor","type":"color", "label":"Period accent", "default":"#ff6a32"},+ {"id":"flipWords", "type":"string", "label":"Flipbook words (comma-separated)", "default":"Design,Strategy,Branding,Marketing,Production,Campaigns,Experiential,Communication,Event Management"},+ {"id":"resolveText","type":"string", "label":"Lock phrase (empty = pure flicker, no lock)", "default":"everything you need"},+ {"id":"periodChar", "type":"string", "label":"Trailing accent (empty = none)", "default":"."}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Roll-Driven Flipbook (Word Cycle → Optional Lock) — gruop_3 reference impl</title>+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ background: var(--bg, #000000);+ overflow: hidden;+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--bg, #000000);+ }+ .g3-overlay {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ /* grid stack — every layer occupies the same centred cell, so scaling a+ layer transforms around its own centre (no translate(-50%) to clobber). */+ .g3-stack {+ display: grid;+ place-items: center;+ }+ .g3-stack > * {+ grid-area: 1 / 1;+ }+ .g3-layer {+ white-space: nowrap;+ color: var(--text, #ffffff);+ text-shadow:+ 0 0 18px rgba(255, 255, 255, 0.45),+ 0 0 46px rgba(255, 255, 255, 0.22);+ }+ .g3-flip {+ font-size: 120px;+ font-weight: 800;+ letter-spacing: -0.01em;+ }+ .g3-resolve {+ font-size: 116px;+ font-weight: 800;+ font-style: italic;+ letter-spacing: -0.01em;+ }+ .g3-period {+ color: var(--accent, #ff6a32);+ font-weight: 800;+ font-style: italic;+ }+ </style>+ </head>+ <body>+ <!-- data-duration = the scene span. Set this to YOUR scene length; the script+ reads it back so duration is single-sourced (no hard-coded value in JS).+ Rebased to scene-relative time — content starts at ~0, no dead pre-roll. -->+ <div+ data-hf-id="hf-g3rt"+ id="root"+ data-composition-id="group-three-recreate"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="3.8"+ data-root="true"+ >+ <div data-hf-id="hf-g3ov" class="g3-overlay">+ <div data-hf-id="hf-g3sk" class="g3-stack" id="stack"></div>+ </div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════+ // ROLL-DRIVEN FLIPBOOK (Word Cycle → Optional Lock) · dense_multiply+ // A hi-hat ROLL drives a centred word that flips every 16th-note (flipbook),+ // cycling a word list to FILL the roll. Optionally, when a SURGE/phrase+ // follows, the flicker resolves (scramble-decode) into a locked phrase.+ // Background is pure black. Every move is a 0ms autoAlpha set on a pre-built+ // node (no GSAP textContent-sets, no onUpdate — both fail under seek render).+ // ════════════════════════════════════════════════════════════════++ var root = document.getElementById("root");++ // ── 1. BEAT MAP — the ONLY block you edit per track ─────────────────+ // SCENE-RELATIVE time (starts at ~0 — no dead pre-roll). When reusing, map+ // your audiomap roll [rollStart,rollEnd] onto [flipStart, flipStart+rollLen],+ // i.e. subtract the roll's start offset. bpm stays your track's tempo.+ var BEAT = {+ bpm: 129.2, // tempo.bpm → 16th-note flip step = 60/bpm/4+ flipStart: 0.1, // tiny entrance lead-in — NO dead air before the flicker+ flipEnd: 2.19, // flicker length ≈ the source roll (~2.1s); auto-fills with words+ resolveStart: 2.33, // lock phrase enters after a short clear (only if a phrase is set)+ resolveLock: 3.33, // locks ~1s later (place just before a downbeat in your track)+ };+ // Scene length is single-sourced from data-duration (edit it in the HTML above).+ var DUR = parseFloat(root.getAttribute("data-duration")) || 7.34;++ // ── 2. Content variables ────────────────────────────────────────────+ var defaults = {+ bgColor: "#000000",+ textColor: "#ffffff",+ accentColor: "#ff6a32",+ flipWords:+ "Design,Strategy,Branding,Marketing,Production,Campaigns,Experiential,Communication,Event Management",+ resolveText: "everything you need",+ periodChar: ".",+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ document.documentElement.style.setProperty("--bg", vars.bgColor);+ document.documentElement.style.setProperty("--text", vars.textColor);+ document.documentElement.style.setProperty("--accent", vars.accentColor);+ var stack = root.querySelector("#stack");++ var WORDS = String(vars.flipWords)+ .split(",")+ .map(function (w) {+ return w.trim();+ })+ .filter(function (w) {+ return w !== "";+ });+ var RESOLVE = String(vars.resolveText || "").trim(); // empty → pure flicker, no lock+ var HAS_RESOLVE = RESOLVE !== "";+ var PERIOD =+ vars.periodChar && String(vars.periodChar).trim() !== "" ? vars.periodChar : "";++ // ── 3. Derived timing (auto-fills the roll — adapts to any length / bpm) ─+ var FLIP_STEP = 60 / BEAT.bpm / 4; // one word per 16th-note+ var N_SWAPS = Math.max(1, Math.round((BEAT.flipEnd - BEAT.flipStart) / FLIP_STEP));++ // ── 4. Build nodes ──────────────────────────────────────────────────+ var flipNodes = {};+ WORDS.forEach(function (w) {+ if (!flipNodes[w]) {+ var s = document.createElement("span");+ s.className = "g3-layer g3-flip";+ s.textContent = w;+ stack.appendChild(s);+ flipNodes[w] = s;+ gsap.set(s, { autoAlpha: 0 });+ }+ });++ var resolveNodes = [];+ if (HAS_RESOLVE) {+ var GLYPHS = "!<>-_/[]{}=+*^?#$%&01ABXYZ";+ var decodeAt = function (str, p) {+ var n = str.length,+ out = "",+ step = Math.floor(p * 48);+ for (var k = 0; k < n; k++) {+ var c = str.charAt(k);+ if (c === " ") {+ out += " ";+ continue;+ }+ var lock = 0.4 + 0.6 * ((k + 1) / n); // lock left→right, in the back 60%+ out += p >= lock ? c : GLYPHS.charAt((k * 7 + step * 3) % GLYPHS.length);+ }+ return out;+ };+ var DECODE_STEP = FLIP_STEP / 2; // scramble twice as fast as the flip+ var N_STEPS = Math.max(+ 1,+ Math.round((BEAT.resolveLock - BEAT.resolveStart) / DECODE_STEP),+ );+ for (var s2 = 0; s2 <= N_STEPS; s2++) {+ var node = document.createElement("span");+ node.className = "g3-layer g3-resolve";+ if (s2 === N_STEPS) {+ node.appendChild(document.createTextNode(RESOLVE));+ if (PERIOD) {+ var pd = document.createElement("span");+ pd.className = "g3-period";+ pd.textContent = PERIOD;+ node.appendChild(pd);+ }+ } else {+ node.textContent = decodeAt(RESOLVE, s2 / N_STEPS);+ }+ stack.appendChild(node);+ gsap.set(node, { autoAlpha: 0 });+ resolveNodes.push({ node: node, t: BEAT.resolveStart + s2 * DECODE_STEP });+ }+ }++ // ── 5. Timeline — one paused GSAP timeline, absolute audio seconds ──+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });++ // PHASE A — flipbook word-cycle on the 16th grid, FILLING the roll window+ var prev = null;+ for (var i = 0; i < N_SWAPS; i++) {+ var t = BEAT.flipStart + i * FLIP_STEP;+ var node = flipNodes[WORDS[i % WORDS.length]];+ if (prev && prev !== node) tl.set(prev, { autoAlpha: 0 }, t);+ tl.set(node, { autoAlpha: 1 }, t);+ prev = node;+ }+ // glitchy reveal of the first word as the roll kicks in (scale is safe here)+ tl.fromTo(+ flipNodes[WORDS[0]],+ { scale: 0.8, filter: "blur(10px)" },+ { scale: 1, filter: "blur(0px)", duration: 0.12, ease: "power2.out" },+ BEAT.flipStart,+ );++ // PHASE B — resolve (OPTIONAL). With a lock phrase: clear, then scramble-decode+ // and lock, holding to the end. Without one: the last word just holds (locks).+ if (HAS_RESOLVE) {+ if (prev) tl.set(prev, { autoAlpha: 0 }, BEAT.flipEnd); // clear the flicker+ var prevR = null;+ for (var r = 0; r < resolveNodes.length; r++) {+ if (prevR) tl.set(prevR, { autoAlpha: 0 }, resolveNodes[r].t);+ tl.set(resolveNodes[r].node, { autoAlpha: 1 }, resolveNodes[r].t);+ prevR = resolveNodes[r].node;+ }+ }+ // (if no resolve, `prev` — the last flip word — stays visible to the end)++ // Extend the timeline to the full duration with a no-op so the held final+ // state renders on every frame to DUR (a set AT the timeline's last instant+ // gets dropped by the seek renderer).+ tl.set(stack, { opacity: 1 }, DUR);++ tl.seek(0);+ window.__timelines["group-three-recreate"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/README.md b/skills/bgm-to-video/templates/split-anchor-word-slot/README.mdnew file mode 100644index 0000000000..42c781cc50--- /dev/null+++ b/skills/bgm-to-video/templates/split-anchor-word-slot/README.md@@ -0,0 +1,246 @@+# Split-Anchor Word-Slot · 5 beat-synced operators++> Reverse-engineered from **group_6** of the golden sample (the "studio contre courant" kinetic-type scene).+> `structural_type: per_onset_sequential` · status: **draft**++**ONE base lockup, FIVE operators.** The base is a kinetic-typography **lockup**: a+**held left anchor column** of `R` rows (fixed words) beside a **torn-paper word-SLOT+box** on the right. `R` is data (the `anchors` comma-list length) — pass 2, 3, or 4+words and the geometry follows. Asset-free: just text + colored boxes. Five+interchangeable, beat-synced operators act on that one lockup:++| op | what it does | what moves | source span |+| ---------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------ |+| **lockup** | pop the `R` left anchor words in one-per-beat → reveal the empty slot box | per-word pop-in + box scale-in | 0.13–0.50s (f3–f12) |+| **slot** | swap a word-GROUP into the box: lines slide in per beat → hold → slide out (omit `exit` to hold). per-line color via `colors[]` | per-line textContent + slide/fade | 1.0–1.83s (f24–f44) & 2.04–2.75s (f49–f66) |+| **bg** | flip the WHOLE scene to another theme on a beat (bg + anchor ink + box fill + slot ink invert, 0ms) | colors of root/box/anchors/lines | f83 (blue→green) |+| **shake** | global per-beat jitter of the whole lockup (x/y + rotation), one jolt per beat | transform of `#lockup` | 2.16–4.18s (f52–f100) |+| **expand** | EXIT wipe: fade text → zoom the slot box until it fills the frame | text fade + box scale→30× | 4.30–4.79s (f100–f114) |++```+group_6_template/+ index.html ← asset-free reference impl: lockup + 5 operators + program runner+ program.json ← the default group_6 score as standalone, agent-editable DATA+ card.json ← the spec: base template, operators, program_format, match signature+ assets/gsap.min.js ← vendored (offline-safe lint/validate/render)+ renders/ ← group_6_recreate(.mp4 / _audio.mp4) + custom_demo.mp4+ README.md ← this file+```++This answers the brief directly: **the fixed structure is a template; the content is+data.** Different words compose into the same lockup; the row count and the number of+background flips are program parameters; every move is keyed to a beat, so a new track+matches by swapping the beat numbers.++---++## 1. How it beat-syncs (from `../audiomap.json`)++**Nothing is on a timer.** Every move is a GSAP tween/`set` at an absolute audio second+from the analysis. Track facts: **~92 BPM**, 4/4, downbeats **2.322 (f56) / 4.923+(f118)**, a **sustained hihat fill 2.16–4.18s (f52–f100, 14 hits)**. The beat tracker is+only confident after 2.3s (the front is a VOID lead-in), so the early anchor pops ride+the onset list, not the grid.++The score is the **PROGRAM** — a data array of operator steps+([`program.json`](program.json), mirrored inline as `DEFAULT_PROGRAM` in §3 of+`index.html`):++```jsonc+[+ { "op": "lockup", "enter": [0.125, 0.333, 0.5], "box": 0.292, "theme": 0 }, // name locks in+ {+ "op": "slot",+ "words": ["I bring", "ideas", "to life"], // group 1 in→out+ "enter": [1.0, 1.167, 1.292],+ "exit": [1.667, 1.75, 1.833],+ },+ {+ "op": "slot",+ "words": ["you", "wanna", "see?"], // group 2, colored+ "enter": [2.042, 2.208, 2.375],+ "exit": [2.75, 2.75, 2.75],+ "colors": [0, 1, 1],+ },+ {+ "op": "shake",+ "amp": 15,+ "rot": 1.7,+ "settle": 0.13, // ride the hihat fill+ "beats": [2.16, 2.3, 2.44, 2.62, 2.76, 2.88, 3.06, 3.27, 3.41, 3.53, 3.71, 3.85, 4.09, 4.18],+ },+ { "op": "bg", "at": 3.458, "theme": 1 }, // blue → green (f83)+ { "op": "expand", "fade": 4.3, "at": 4.667, "to": 4.792 }, // zoom-wipe into f118+]+```++**Rule of thumb:** structure (the lock-in, the palette flip, the zoom-wipe) leans on the+strong downbeats; texture (per-word slot pops, the shake) rides the dense onset stream in+between.++---++## 2. Why _this beat_ → _this template_ (the matching intuition)++Reach for the anchor-slot lockup when the audiomap shows:++1. **A held idea + a stream of discrete onsets** — something to anchor on the left (a+ name / brand) and a hit for every word you pop on the right (`onset_gap_bars ≤ 1`).+2. **A dense run (roll / hihat fill)** to ride a **shake** on — group_6's f52–f100 fill+ is exactly the "jitter the whole thing" stretch.+3. **A strong downbeat to wipe out into** — the **expand** zoom lands its black-out one+ beat _before_ the f118 downbeat kick, so the next group "punches" in on the beat.+4. **Optional: one or two key hits to invert the palette** — schedule a `bg` flip on each.++Put plainly: **"a held name + per-onset words + one roll + a downbeat exit"** is the+fingerprint.++---++## 3. Usage++### Render with defaults (the group_6 recreation)++```bash+cd group_6_template+npx hyperframes lint . && npx hyperframes validate .+npx hyperframes render . -f 24 -o renders/group_6_recreate.mp4+# beat-matched proof (mux the original BGM):+ffmpeg -y -i renders/group_6_recreate.mp4 -i ../group_6.wav -c:v copy -c:a aac -shortest renders/group_6_recreate_audio.mp4+```++### Change the words (content only — no code edit)++```bash+# 2-row lockup, different phrase+npx hyperframes render . --variables '{+ "anchors": "make,it",+ "program": "[{\"op\":\"lockup\",\"enter\":[0.1,0.4],\"box\":0.3},{\"op\":\"slot\",\"words\":[\"move\",\"fast\"],\"enter\":[1.0,1.3],\"exit\":[1.9,1.9]},{\"op\":\"expand\",\"fade\":2.2,\"at\":2.5,\"to\":2.7}]"+}'+```++- **anchors** is a comma list — one word per row. Its length sets `R` (rows): 2 / 3 / 4.+- The slot box auto-sizes to the widest word-group; the slot operator distributes any+ word count across its `enter` / `exit` beat lists.+- **showText:false** hides all glyphs for a pure block/box look.++### Background changes once or twice (a parameter, on the beat)++```bash+# change TWICE: blue → green at 2.0s, green → ink at 3.6s+npx hyperframes render . --variables '{"program":"[{\"op\":\"lockup\",\"enter\":[0.1,0.3,0.5]},{\"op\":\"bg\",\"at\":2.0,\"theme\":1},{\"op\":\"bg\",\"at\":3.6,\"theme\":2},{\"op\":\"expand\",\"fade\":4.5,\"at\":4.8,\"to\":5.0}]"}'+```++`bg` is just another step — schedule **zero, one, or two** of them on whatever beats the+music gives you.++### Recompose freely — compose by DATA, not code (the whole point)++The five operators (`lockup`, `slot`, `bg`, `shake`, `expand`) are **pure, parameterized+functions** that write tweens at absolute audio seconds onto one shared timeline. They+are **order-independent and may overlap** (the `shake` runs _under_ the slot cycles and+the bg flip). What runs — on which beats — is the **PROGRAM** (a `{op, ...beats}` array).+So you recompose **without touching operator code**:++```bash+# Repeat the slot op three times (three word-groups), no shake, no bg flip+npx hyperframes render . --variables '{"program":"[{\"op\":\"lockup\",\"enter\":[0.1,0.3,0.5]},{\"op\":\"slot\",\"words\":[\"one\",\"two\",\"three\"],\"enter\":[1.0,1.2,1.4],\"exit\":[1.8,1.8,1.8]},{\"op\":\"slot\",\"words\":[\"four\",\"five\",\"six\"],\"enter\":[2.2,2.4,2.6],\"exit\":[3.0,3.0,3.0],\"colors\":[2,3,0]},{\"op\":\"slot\",\"words\":[\"seven\",\"eight\",\"nine\"],\"enter\":[3.4,3.6,3.8]},{\"op\":\"expand\",\"fade\":4.6,\"at\":4.9,\"to\":5.1}]"}'+```++Each step's fields are documented in [`card.json`](card.json) → `program_format`. An+agent composes by emitting this JSON (op names + beats) — it never edits JS.++> **Empty `program` = the built-in group_6 score.** Keep `program.json` and+> `DEFAULT_PROGRAM` in sync — `program.json` is the canonical, copy-pasteable data.++### Re-fit the beat to a different group (the part that changes per track)++Copy the new group's `audiomap.json` onset / downbeat seconds into the step beat lists.+Each list grows or shrinks freely — more onsets → more word pops; `beatAt()` distributes+any count across any beat list. For a longer / shorter piece set `DUR` and the root+`data-duration` to the new span. Add palettes to `THEMES`, accent colors to `ACCENTS`.++> **Deterministic / asset-free:** text + colored boxes only, no remote assets, no+> `Math.random` (shake uses a deterministic index hash), no timers. Lints clean,+> validates with no console errors.++---++## 4. Provenance++- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_6/group_6.mp4`+- **Audio:** `audiomap.json` (from `skills/bgm-to-video-new/scripts/analyze-beatgrid.py`)+- **Video read:** `group_6.gemini-analysis.md` (Gemini 3 Pro, 24fps) cross-checked by+ frame-by-frame contact sheets. Both agreed this is **kinetic typography, not an image+ grid** — left held `studio / contre / courant`; the right box cycled `I bring / ideas /+to life` then the colored `you / wanna / see?`; a one-frame blue→green palette flip at+ f83; a global shake riding the f52–f100 hihat fill; and a box zoom-wipe to black at+ f112–f114 leading into the f118 downbeat.+- **Corrections to the original read:** it is the **right slot box** (not a "left box")+ that zooms out, and the text is **masked / faded** under the zoom, not a soft dissolve.++### Tuning pass — Gemini 24fps side-by-side (`renders/sidebyside_*`)++A second pass rendered the recreate, stacked it beside the source (`renders/sidebyside_src-vs-recreate_v3.mp4`), and had Gemini 3 Pro grade the diff frame-by-frame+(`renders/sidebyside_v3.gemini-analysis.md`). The source reads as **acid/brutalist+collage with strong physical inertia**; v1 read as flat/linear UI motion. Applied:++1. **Constant lean** — the whole lockup rests at `BASE_TILT -3.5°`, the slot box leans+ `+2.6°` more. The source is never axis-aligned.+2. **Punchy easing + faux motion-blur** — slot words WHIP in from the right on `expo.out`+ with a `scaleX` stretch (1.6→1) that fakes horizontal motion blur; exit arcs down-left+ on `power3.in`. (Was a uniform, mechanical slide.)+3. **Faux-extended type** — inner `.t` span at `scaleX(1.12)` + weight 900 + tight+ tracking approximates a Druk-Wide / Monument-Extended face, asset-free. Bigger size,+ raised position (the lockup sits high-center).+4. **Per-line torn TAPES (not one box)** — this was the biggest "soul" gap (flagged in+ both Gemini passes + frame inspection). Each slot line is now its **own tape**: a+ white card sized to _its_ word (kills the dead space a shared box left behind narrow+ lines), with its own micro-rotation, a stair `margin-left` offset, a torn `clip-path`,+ and a drop shadow → a brutalist tape collage. The backing `#slotbox` is transparent+ during word phases (tapes sit straight on the colour field), and `bg` turns it into a+ solid torn card for the empty state + the expand zoom target.+5. **Brighter palette** — electric azure `#0a84ff` + lime/acid green `#5cf03a`.+6. **Stronger shake** — `amp 26px · rot 2.4° · back.out(3)` recoil around the base tilt.+ (Verified rendering by diffing adjacent shake-window frames — Gemini's v3 claim that+ the recreate was "static" was a low-res / anchoring misread.)+7. **Two-stage expand** — stage A grows the torn mass to ~half-frame (decelerating,+ `power2.out`) so the swell is _visible_ like the source (its mass is still only+ ~half-frame at f113); stage B then swallows the frame (`power2.in` + blur) and flattens+ to the solid black-out at ~f115, one beat before the f118 downbeat. (A single big-scale+ tween covered the frame far too early, because a large rest box hits full cover at a low+ scale.)++### Fix pass — review of the rendered cut++Three concrete defects spotted on playback, all fixed:++1. **Slot box covered the held words** (`courant`→`couran`, `make`→`mak`). Root cause: the+ faux-extend `scaleX` does **not** change an element's _layout_ width, so (a) the anchor+ glyphs rendered 12% wider than their layout box and overflowed RIGHT under the box, and+ (b) the slot tapes (GSAP `scaleX` from centre) bled 6% LEFT back over the anchors — the+ two overflows collided in the gap. Fixed three ways: anchors are **left-aligned** with+ each row's width **pinned to its measured scaled width** (`getBoundingClientRect`), the+ slot tapes scale from **`transform-origin: 0% 50%`** (rightward only). With the overflow+ tamed, `#slotbox margin-left` is the **press knob**: a small **negative** value (`-0.12em`)+ gives the source's tight collage TUCK — the tapes lightly press the tail of the longest+ anchor (`courant`'s `t` sits right at the tape edge) while every glyph stays legible. Use+ `0` for a clean kiss, more negative for a heavier tuck (too negative = white-on-white over+ the glyph; a tape with a contrasting `boxInk` can press further).+2. **Slot words overflowed their tape** (`bring`→`brin`) — the faux-extend `scaleX(1.12)`+ stretched only the text, not the tape background. Fixed: slot tapes carry the extend on+ the **line's GSAP `scaleX`** (the background stretches _with_ the text), `.sline .t` is+ reset to `scaleX(1)`, plus more right padding — the word always fits the strip.+3. **Final box was one clean block** — it should be a torn **collage of stacked, offset+ rectangles**. Fixed: the box is now **three sibling `.card` layers** (each its own+ offset + rotation + torn `clip-path`); they're transparent during word phases and turn+ black for the empty box + the expand zoom, scaling as one while staying staggered.++- **Open questions for promotion:** (1) expose `tear` (clip-path roughness), `tilt` /+ `boxTilt`, and the per-line stair offsets as params; (2) bundle a real Extended-Black+ font under `assets/` for an exact type match (currently faked with `scaleX`); (3) `shake`+ could auto-derive `beats` from the overlapping `rolls[]` span; (4) real motion blur isn't+ available in-engine — the `scaleX` squash + expand `blur()` only approximate it; (5) the+ source briefly shows an empty WHITE box before the first words / between groups — the+ per-line-tape model drops that (the colour field is bare until a tape whips in), a minor+ trade for killing the dead space.diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.js b/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.jsnew file mode 100644index 0000000000..3c73d761a9--- /dev/null+++ b/skills/bgm-to-video/templates/split-anchor-word-slot/assets/gsap.min.js@@ -0,0 +1,11 @@+/*!+ * GSAP 3.15.0+ * https://gsap.com+ *+ * @license Copyright 2026, GreenSock. All rights reserved.+ * Subject to the terms at https://gsap.com/standard-license.+ * @author: Jack Doyle, [email protected]+ */++!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(t)||r(t)}function R(t){return(i=bt(t,ht))&&Fe}function S(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function T(t,e){return!e&&console.warn(t)}function U(t,e){return t&&(ht[t]=e)&&i&&(i[t]=e)||ht}function V(){return 0}function ga(t){var e,r,i=t[0];if(v(i)||s(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(r=yt.length;r--&&!yt[r].targetTest(i););e=yt[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new Xt(t[r],e)))||t.splice(r,1);return t}function ha(t){return t._gsap||ga(Pt(t))[0]._gsap}function ia(t,e,r){return(r=t[e])&&s(r)?t[e]():u(r)&&t.getAttribute&&t.getAttribute(e)||r}function ja(t,e){return(t=t.split(",")).forEach(e)||t}function ka(t){return Math.round(1e5*t)/1e5||0}function la(t){return Math.round(1e7*t)/1e7||0}function ma(t,e){var r=e.charAt(0),i=parseFloat(e.substr(2));return t=parseFloat(t),"+"===r?t+i:"-"===r?t-i:"*"===r?t*i:t/i}function na(t,e){for(var r=e.length,i=0;t.indexOf(e[i])<0&&++i<r;);return i<r}function oa(){var t,e,r=pt.length,i=pt.slice(0);for(_t={},t=pt.length=0;t<r;t++)(e=i[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)}function pa(t){return!!(t._initted||t._startAt||t.add)}function qa(t,e,r,i){pt.length&&!I&&oa(),t.render(e,r,i||!!(I&&e<0&&pa(t))),pt.length&&!I&&oa()}function ra(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ot).length<2?e:r(t)?t.trim():t}function sa(t){return t}function ta(t,e){for(var r in e)r in t||(t[r]=e[r]);return t}function wa(t,e){for(var r in e)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=v(e[r])?wa(t[r]||(t[r]={}),e[r]):e[r]);return t}function xa(t,e){var r,i={};for(r in t)r in e||(i[r]=t[r]);return i}function ya(t){var e=t.parent||L,r=t.keyframes?function _setKeyframeDefaults(i){return function(t,e){for(var r in e)r in t||"duration"===r&&i||"ease"===r||(t[r]=e[r])}}(K(t.keyframes)):ta;if(w(t.inherit))for(;e;)r(t,e.vars.defaults),e=e.parent||e._dp;return t}function Aa(t,e,r,i,n){void 0===r&&(r="_first"),void 0===i&&(i="_last");var a,s=t[i];if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[i]=e,e._prev=s,e.parent=e._dp=t,e}function Ba(t,e,r,i){void 0===r&&(r="_first"),void 0===i&&(i="_last");var n=e._prev,a=e._next;n?n._next=a:t[r]===e&&(t[r]=a),a?a._prev=n:t[i]===e&&(t[i]=n),e._next=e._prev=e.parent=null}function Ca(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0}function Da(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var r=t;r;)r._dirty=1,r=r.parent;return t}function Fa(t,e,r,i){return t._startAt&&(I?t._startAt.revert(ft):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,i))}function Ha(t){return t._repeat?wt(t._tTime,t=t.duration()+t._rDelay)*t:0}function Ja(t,e){return(t-e._start)*e._ts+(0<=e._ts?0:e._dirty?e.totalDuration():e._tDur)}function Ka(t){return t._end=la(t._start+(t._tDur/Math.abs(t._ts||t._rts||q)||0))}function La(t,e){var r=t._dp;return r&&r.smoothChildTiming&&t._ts&&(t._start=la(r._time-(0<t._ts?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ka(t),r._dirty||Da(r,t)),t}function Ma(t,e){var r;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(r=Ja(t.rawTime(),e),(!e._dur||Mt(0,e.totalDuration(),r)-e._tTime>q)&&e.render(r,!0)),Da(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(r=t;r._dp;)0<=r.rawTime()&&r.totalTime(r._tTime),r=r._dp;t._zTime=-q}}function Na(e,r,i,n){return r.parent&&Ca(r),r._start=la((t(i)?i:i||e!==L?Ot(e,i,r):e._time)+r._delay),r._end=la(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Aa(e,r,"_first","_last",e._sort?"_start":0),xt(r)||(e._recent=r),n||Ma(e,r),e._ts<0&&La(e,e._tTime),e}function Oa(t,e){return(ht.ScrollTrigger||S("scrollTrigger",e))&&ht.ScrollTrigger.create(e,t)}function Pa(t,e,r,i,n){return Ht(t,e,n),t._initted?!r&&t._pt&&!I&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&f!==It.frame?(pt.push(t),t._lazy=[n,i],1):void 0:1}function Ua(t,e,r,i){var n=t._repeat,a=la(e)||0,s=t._tTime/t._tDur;return s&&!i&&(t._time*=a/t._dur),t._dur=a,t._tDur=n?n<0?1e10:la(a*(n+1)+t._rDelay*n):a,0<s&&!i&&La(t,t._tTime=t._tDur*s),t.parent&&Ka(t),r||Da(t.parent,t),t}function Va(t){return t instanceof Gt?Da(t):Ua(t,t._dur)}function Ya(e,r,i){var n,a,s=t(r[1]),o=(s?2:1)+(e<2?0:1),u=r[o];if(s&&(u.duration=r[1]),u.parent=i,e){for(n=u,a=i;a&&!("immediateRender"in n);)n=a.vars.defaults||{},a=w(a.vars.inherit)&&a.parent;u.immediateRender=w(n.immediateRender),e<2?u.runBackwards=1:u.startAt=r[o-1]}return new te(r[0],u,r[1+o])}function Za(t,e){return t||0===t?e(t):e}function _a(t,e){return r(t)&&(e=ut.exec(t))?e[1]:""}function cb(t,e){return t&&v(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&v(t[0]))&&!t.nodeType&&t!==h}function fb(r){return r=Pt(r)[0]||T("Invalid scope")||{},function(t){var e=r.current||r.nativeElement||r;return Pt(t,e.querySelectorAll?e:e===r?T("Invalid scope")||a.createElement("div"):r)}}function gb(t){return t.sort(function(){return.5-Math.random()})}function hb(t){if(s(t))return t;var p=v(t)?t:{each:t},_=jt(p.ease),m=p.from||0,g=parseFloat(p.base)||0,y={},e=0<m&&m<1,T=isNaN(m)||e,b=p.axis,w=m,x=m;return r(m)?w=x={center:.5,edges:.5,end:1}[m]||0:!e&&T&&(w=m[0],x=m[1]),function(t,e,r){var i,n,a,s,o,u,h,l,f,c=(r||p).length,d=y[c];if(!d){if(!(f="auto"===p.grid?0:(p.grid||[1,X])[1])){for(h=-X;h<(h=r[f++].getBoundingClientRect().left)&&f<c;);f<c&&f--}for(d=y[c]=[],i=T?Math.min(f,c)*w-.5:m%f,n=f===X?0:T?c*x/f-.5:m/f|0,l=X,u=h=0;u<c;u++)a=u%f-i,s=n-(u/f|0),d[u]=o=b?Math.abs("y"===b?s:a):$(a*a+s*s),h<o&&(h=o),o<l&&(l=o);"random"===m&&gb(d),d.max=h-l,d.min=l,d.v=c=(parseFloat(p.amount)||parseFloat(p.each)*(c<f?c-1:b?"y"===b?c/f:f:Math.max(f,c/f))||0)*("edges"===m?-1:1),d.b=c<0?g-c:g,d.u=_a(p.amount||p.each)||0,_=_&&c<0?Yt(_):_}return c=(d[t]-d.min)/d.max||0,la(d.b+(_?_(c):c)*d.v)+d.u}}function ib(i){var n=Math.pow(10,((i+"").split(".")[1]||"").length);return function(e){var r=la(Math.round(parseFloat(e)/i)*i*n);return(r-r%1)/n+(t(e)?0:_a(e))}}function jb(h,e){var l,f,r=K(h);return!r&&v(h)&&(l=r=h.radius||X,h.values?(h=Pt(h.values),(f=!t(h[0]))&&(l*=l)):h=ib(h.increment)),Za(e,r?s(h)?function(t){return f=h(t),Math.abs(f-t)<=l?f:t}:function(e){for(var r,i,n=parseFloat(f?e.x:e),a=parseFloat(f?e.y:0),s=X,o=0,u=h.length;u--;)(r=f?(r=h[u].x-n)*r+(i=h[u].y-a)*i:Math.abs(h[u]-n))<s&&(s=r,o=u);return o=!l||s<=l?h[o]:e,f||o===e||t(e)?o:o+_a(e)}:ib(h))}function kb(t,e,r,i){return Za(K(t)?!e:!0===r?!!(r=0):!i,function(){return K(t)?t[~~(Math.random()*t.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((t-r/2+Math.random()*(e-t+.99*r))/r)*r*i)/i})}function ob(e,r,t){return Za(t,function(t){return e[~~r(t)]})}function rb(t){return t.replace(tt,function(t){var e=t.indexOf("[")+1,r=t.substring(e||7,e?t.indexOf("]"):t.length-1).split(et);return kb(e?r:+r[0],e?0:+r[1],+r[2]||1e-5)})}function ub(t,e,r){var i,n,a,s=t.labels,o=X;for(i in s)(n=s[i]-e)<0==!!r&&n&&o>(n=Math.abs(n))&&(a=i,o=n);return a}function wb(t){return Ca(t),t.scrollTrigger&&t.scrollTrigger.kill(!!I),t.progress()<1&&At(t,"onInterrupt"),t}function zb(t){if(t)if(t=!t.name&&t.default||t,x()||t.headless){var e=t.name,r=s(t),i=e&&!r&&t.init?function(){this._props=[]}:t,n={init:V,render:_e,add:$t,kill:Te,modifier:ve,rawVars:0},a={targetTest:0,get:0,getSetter:ue,aliases:{},register:0};if(Lt(),t!==i){if(mt[e])return;ta(i,ta(xa(t,n),a)),bt(i.prototype,bt(n,xa(t,a))),mt[i.prop=e]=i,t.targetTest&&(yt.push(i),dt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}U(e,i),t.register&&t.register(Fe,i,we)}else Dt.push(t)}function Cb(t,e,r){return(6*(t+=t<0?1:1<t?-1:0)<1?e+(r-e)*t*6:t<.5?r:3*t<2?e+(r-e)*(2/3-t)*6:e)*zt+.5|0}function Db(e,r,i){var n,a,s,o,u,h,l,f,c,d,p=e?t(e)?[e>>16,e>>8&zt,e&zt]:0:Rt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),Rt[e])p=Rt[e];else if("#"===e.charAt(0)){if(e.length<6&&(e="#"+(n=e.charAt(1))+n+(a=e.charAt(2))+a+(s=e.charAt(3))+s+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(p=parseInt(e.substr(1,6),16))>>16,p>>8&zt,p&zt,parseInt(e.substr(7),16)/255];p=[(e=parseInt(e.substr(1),16))>>16,e>>8&zt,e&zt]}else if("hsl"===e.substr(0,3))if(p=d=e.match(rt),r){if(~e.indexOf("="))return p=e.match(it),i&&p.length<4&&(p[3]=1),p}else o=+p[0]%360/360,u=p[1]/100,n=2*(h=p[2]/100)-(a=h<=.5?h*(u+1):h+u-h*u),3<p.length&&(p[3]*=1),p[0]=Cb(o+1/3,n,a),p[1]=Cb(o,n,a),p[2]=Cb(o-1/3,n,a);else p=e.match(rt)||Rt.transparent;p=p.map(Number)}return r&&!d&&(n=p[0]/zt,a=p[1]/zt,s=p[2]/zt,h=((l=Math.max(n,a,s))+(f=Math.min(n,a,s)))/2,l===f?o=u=0:(c=l-f,u=.5<h?c/(2-l-f):c/(l+f),o=l===n?(a-s)/c+(a<s?6:0):l===a?(s-n)/c+2:(n-a)/c+4,o*=60),p[0]=~~(o+.5),p[1]=~~(100*u+.5),p[2]=~~(100*h+.5)),i&&p.length<4&&(p[3]=1),p}function Eb(t){var r=[],i=[],n=-1;return t.split(Et).forEach(function(t){var e=t.match(nt)||[];r.push.apply(r,e),i.push(n+=e.length+1)}),r.c=i,r}function Fb(t,e,r){var i,n,a,s,o="",u=(t+o).match(Et),h=e?"hsla(":"rgba(",l=0;if(!u)return t;if(u=u.map(function(t){return(t=Db(t,e,1))&&h+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"}),r&&(a=Eb(t),(i=r.c).join(o)!==a.c.join(o)))for(s=(n=t.replace(Et,"1").split(nt)).length-1;l<s;l++)o+=n[l]+(~i.indexOf(l)?u.shift()||h+"0,0,0,0)":(a.length?a:u.length?u:r).shift());if(!n)for(s=(n=t.split(Et)).length-1;l<s;l++)o+=n[l]+u[l];return o+n[s]}function Ib(t){var e,r=t.join(" ");if(Et.lastIndex=0,Et.test(r))return e=Ft.test(r),t[1]=Fb(t[1],e),t[0]=Fb(t[0],e,Eb(t[1])),!0}function Rb(t){var e=(t+"").split("("),r=Bt[e[0]];return r&&1<e.length&&r.config?r.config.apply(null,~t.indexOf("{")?[function _parseObjectInString(t){for(var e,r,i,n={},a=t.substr(1,t.length-3).split(":"),s=a[0],o=1,u=a.length;o<u;o++)r=a[o],e=o!==u-1?r.lastIndexOf(","):r.length,i=r.substr(0,e),n[s]=isNaN(i)?i.replace(Ut,"").trim():+i,s=r.substr(e+1).trim();return n}(e[1])]:function _valueInParentheses(t){var e=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",e);return t.substring(e,~i&&i<r?t.indexOf(")",r+1):r)}(t).split(",").map(ra)):Bt._CE&&Nt.test(t)?Bt._CE("",t):r}function Ub(t,e,r,i){void 0===r&&(r=function easeOut(t){return 1-e(1-t)}),void 0===i&&(i=function easeInOut(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var n,a={easeIn:e,easeOut:r,easeInOut:i};return ja(t,function(t){for(var e in Bt[t]=ht[t]=a,Bt[n=t.toLowerCase()]=r,a)Bt[n+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Bt[t+"."+e]=a[e]}),a}function Vb(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}}function Wb(r,t,e){function Gm(t){return 1===t?1:i*Math.pow(2,-10*t)*Q((t-a)*n)+1}var i=1<=t?t:1,n=(e||(r?.3:.45))/(t<1?t:1),a=n/G*(Math.asin(1/i)||0),s="out"===r?Gm:"in"===r?function(t){return 1-Gm(1-t)}:Vb(Gm);return n=G/n,s.config=function(t,e){return Wb(r,t,e)},s}function Xb(e,r){function Om(t){return t?--t*t*((r+1)*t+r)+1:0}void 0===r&&(r=1.70158);var t="out"===e?Om:"in"===e?function(t){return 1-Om(1-t)}:Vb(Om);return t.config=function(t){return Xb(e,t)},t}var F,I,l,L,h,n,a,i,o,f,c,d,p,_,m,g,b,k,O,M,C,P,A,D,z,E,B,N,Y={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},j={duration:.5,overwrite:!1,delay:0},X=1e8,q=1/X,G=2*Math.PI,Z=G/4,W=0,$=Math.sqrt,H=Math.cos,Q=Math.sin,J="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},K=Array.isArray,tt=/random\([^)]+\)/g,et=/,\s*/g,rt=/(?:-?\.?\d|\.)+/gi,it=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,at=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,st=/[+-]=-?[.\d]+/,ot=/[^,'"\[\]\s]+/gi,ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ht={},lt={suppressEvents:!0,isStart:!0,kill:!1},ft={suppressEvents:!0,kill:!1},ct={suppressEvents:!0},dt={},pt=[],_t={},mt={},gt={},vt=30,yt=[],Tt="",bt=function _merge(t,e){for(var r in e)t[r]=e[r];return t},wt=function _animationCycle(t,e){var r=Math.floor(t=la(t/e));return t&&r===t?r-1:r},xt=function _isFromOrFromStart(t){var e=t.data;return"isFromStart"===e||"isStart"===e},kt={_start:0,endTime:V,totalDuration:V},Ot=function _parsePosition(t,e,i){var n,a,s,o=t.labels,u=t._recent||kt,h=t.duration()>=X?u.endTime(!1):t._dur;return r(e)&&(isNaN(e)||e in o)?(a=e.charAt(0),s="%"===e.substr(-1),n=e.indexOf("="),"<"===a||">"===a?(0<=n&&(e=e.replace(/=/,"")),("<"===a?u._start:u.endTime(0<=u._repeat))+(parseFloat(e.substr(1))||0)*(s?(n<0?u:i).totalDuration()/100:1)):n<0?(e in o||(o[e]=h),o[e]):(a=parseFloat(e.charAt(n-1)+e.substr(n+1)),s&&i&&(a=a/100*(K(i)?i[0]:i).totalDuration()),1<n?_parsePosition(t,e.substr(0,n-1),i)+a:h+a)):null==e?h:+e},Mt=function _clamp(t,e,r){return r<t?t:e<r?e:r},Ct=[].slice,Pt=function toArray(t,e,i){return l&&!e&&l.selector?l.selector(t):!r(t)||i||!n&&Lt()?K(t)?function _flatten(t,e,i){return void 0===i&&(i=[]),t.forEach(function(t){return r(t)&&!e||cb(t,1)?i.push.apply(i,Pt(t)):i.push(t)})||i}(t,i):cb(t)?Ct.call(t,0):t?[t]:[]:Ct.call((e||a).querySelectorAll(t),0)},St=function mapRange(e,t,r,i,n){var a=t-e,s=i-r;return Za(n,function(t){return r+((t-e)/a*s||0)})},At=function _callback(t,e,r){var i,n,a,s=t.vars,o=s[e],u=l,h=t._ctx;if(o)return i=s[e+"Params"],n=s.callbackScope||t,r&&pt.length&&oa(),h&&(l=h),a=i?o.apply(n,i):o.call(n),l=u,a},Dt=[],zt=255,Rt={aqua:[0,zt,zt],lime:[0,zt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,zt],navy:[0,0,128],white:[zt,zt,zt],olive:[128,128,0],yellow:[zt,zt,0],orange:[zt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[zt,0,0],pink:[zt,192,203],cyan:[0,zt,zt],transparent:[zt,zt,zt,0]},Et=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Rt)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Ft=/hsl[a]?\(/,It=(O=Date.now,M=500,C=33,P=O(),A=P,z=D=1e3/240,g={time:0,frame:0,tick:function tick(){zl(!0)},deltaRatio:function deltaRatio(t){return b/(1e3/(t||60))},wake:function wake(){o&&(!n&&x()&&(h=n=window,a=h.document||{},ht.gsap=Fe,(h.gsapVersions||(h.gsapVersions=[])).push(Fe.version),R(i||h.GreenSockGlobals||!h.gsap&&h||{}),Dt.forEach(zb)),m="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,p&&g.sleep(),_=m||function(t){return setTimeout(t,z-1e3*g.time+1|0)},d=1,zl(2))},sleep:function sleep(){(m?cancelAnimationFrame:clearTimeout)(p),d=0,_=V},lagSmoothing:function lagSmoothing(t,e){M=t||1/0,C=Math.min(e||33,M)},fps:function fps(t){D=1e3/(t||240),z=1e3*g.time+D},add:function add(n,t,e){var a=t?function(t,e,r,i){n(t,e,r,i),g.remove(a)}:n;return g.remove(n),E[e?"unshift":"push"](a),Lt(),a},remove:function remove(t,e){~(e=E.indexOf(t))&&E.splice(e,1)&&e<=k&&k--},_listeners:E=[]}),Lt=function _wake(){return!d&&It.wake()},Bt={},Nt=/^[\d.\-M][\d.\-,\s]/,Ut=/["']/g,Yt=function _invertEase(e){return function(t){return 1-e(1-t)}},jt=function _parseEase(t,e){return t&&(s(t)?t:Bt[t]||Rb(t))||e};function zl(t){var e,r,i,n,a=O()-A,s=!0===t;if((M<a||a<0)&&(P+=a-C),(0<(e=(i=(A+=a)-P)-z)||s)&&(n=++g.frame,b=i-1e3*g.time,g.time=i/=1e3,z+=e+(D<=e?4:D-e),r=1),s||(p=_(zl)),r)for(k=0;k<E.length;k++)E[k](i,b,n,t)}function dn(t){return t<N?B*t*t:t<.7272727272727273?B*Math.pow(t-1.5/2.75,2)+.75:t<.9090909090909092?B*(t-=2.25/2.75)*t+.9375:B*Math.pow(t-2.625/2.75,2)+.984375}ja("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var r=e<5?e+1:e;Ub(t+",Power"+(r-1),e?function(t){return Math.pow(t,r)}:function(t){return t},function(t){return 1-Math.pow(1-t,r)},function(t){return t<.5?Math.pow(2*t,r)/2:1-Math.pow(2*(1-t),r)/2})}),Bt.Linear.easeNone=Bt.none=Bt.Linear.easeIn,Ub("Elastic",Wb("in"),Wb("out"),Wb()),B=7.5625,N=1/2.75,Ub("Bounce",function(t){return 1-dn(1-t)},dn),Ub("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)}),Ub("Circ",function(t){return-($(1-t*t)-1)}),Ub("Sine",function(t){return 1===t?1:1-H(t*Z)}),Ub("Back",Xb("in"),Xb("out"),Xb()),Bt.SteppedEase=Bt.steps=ht.SteppedEase={config:function config(t,e){void 0===t&&(t=1);var r=1/t,i=t+(e?0:1),n=e?1:0;return function(t){return((i*Mt(0,.99999999,t)|0)+n)*r}}},j.ease=Bt["quad.out"],ja("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Tt+=t+","+t+"Params,"});var Vt,Xt=function GSCache(t,e){this.id=W++,(t._gsap=this).target=t,this.harness=e,this.get=e?e.get:ia,this.set=e?e.getSetter:ue},qt=((Vt=Animation.prototype).delay=function delay(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},Vt.duration=function duration(t){return arguments.length?this.totalDuration(0<this._repeat?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},Vt.totalDuration=function totalDuration(t){return arguments.length?(this._dirty=0,Ua(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Vt.totalTime=function totalTime(t,e){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(La(this,t),!r._dp||r.parent||Ma(r,this);r&&r.parent;)r.parent._time!==r._start+(0<=r._ts?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(0<this._ts&&t<this._tDur||this._ts<0&&0<t||!this._tDur&&!t)&&Na(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===q||!this._initted&&this._dur&&t||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),qa(this,t,e)),this},Vt.time=function time(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Ha(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},Vt.totalProgress=function totalProgress(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):0<=this.rawTime()&&this._initted?1:0},Vt.progress=function progress(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Ha(this),e):this.duration()?Math.min(1,this._time/this._dur):0<this.rawTime()?1:0},Vt.iteration=function iteration(t,e){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*r,e):this._repeat?wt(this._tTime,r)+1:1},Vt.timeScale=function timeScale(t,e){if(!arguments.length)return this._rts===-q?0:this._rts;if(this._rts===t)return this;var r=this.parent&&this._ts?Ja(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||t===-q?0:this._rts,this.totalTime(Mt(-Math.abs(this._delay),this.totalDuration(),r),!1!==e),Ka(this),function _recacheAncestors(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},Vt.paused=function paused(t){return arguments.length?(this._ps!==t&&((this._ps=t)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==q&&(this._tTime-=q)))),this):this._ps},Vt.startTime=function startTime(t){if(arguments.length){this._start=la(t);var e=this.parent||this._dp;return!e||!e._sort&&this.parent||Na(e,this,this._start-this._delay),this}return this._start},Vt.endTime=function endTime(t){return this._start+(w(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},Vt.rawTime=function rawTime(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ja(e.rawTime(t),this):this._tTime:this._tTime},Vt.revert=function revert(t){void 0===t&&(t=ct);var e=I;return I=t,pa(this)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),I=e,this},Vt.globalTime=function globalTime(t){for(var e=this,r=arguments.length?t:e.rawTime();e;)r=e._start+r/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):r},Vt.repeat=function repeat(t){return arguments.length?(this._repeat=t===1/0?-2:t,Va(this)):-2===this._repeat?1/0:this._repeat},Vt.repeatDelay=function repeatDelay(t){if(arguments.length){var e=this._time;return this._rDelay=t,Va(this),e?this.time(e):this}return this._rDelay},Vt.yoyo=function yoyo(t){return arguments.length?(this._yoyo=t,this):this._yoyo},Vt.seek=function seek(t,e){return this.totalTime(Ot(this,t),w(e))},Vt.restart=function restart(t,e){return this.play().totalTime(t?-this._delay:0,w(e)),this._dur||(this._zTime=-q),this},Vt.play=function play(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},Vt.reverse=function reverse(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},Vt.pause=function pause(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},Vt.resume=function resume(){return this.paused(!1)},Vt.reversed=function reversed(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-q:0)),this):this._rts<0},Vt.invalidate=function invalidate(){return this._initted=this._act=0,this._zTime=-q,this},Vt.isActive=function isActive(){var t,e=this.parent||this._dp,r=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=r&&t<this.endTime(!0)-q))},Vt.eventCallback=function eventCallback(t,e,r){var i=this.vars;return 1<arguments.length?(e?(i[t]=e,r&&(i[t+"Params"]=r),"onUpdate"===t&&(this._onUpdate=e)):delete i[t],this):i[t]},Vt.then=function then(t){var i=this,n=i._prom;return new Promise(function(e){function Ao(){var t=i.then;i.then=null,n&&n(),s(r)&&(r=r(i))&&(r.then||r===i)&&(i.then=t),e(r),i.then=t}var r=s(t)?t:sa;i._initted&&1===i.totalProgress()&&0<=i._ts||!i._tTime&&i._ts<0?Ao():i._prom=Ao})},Vt.kill=function kill(){wb(this)},Animation);function Animation(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ua(this,+t.duration,1,1),this.data=t.data,l&&(this._ctx=l).data.push(this),d||It.wake()}ta(qt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-q,_prom:0,_ps:!1,_rts:1});var Gt=function(i){function Timeline(t,e){var r;return void 0===t&&(t={}),(r=i.call(this,t)||this).labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=w(t.sortChildren),L&&Na(t.parent||L,_assertThisInitialized(r),e),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Oa(_assertThisInitialized(r),t.scrollTrigger),r}_inheritsLoose(Timeline,i);var e=Timeline.prototype;return e.to=function to(t,e,r){return Ya(0,arguments,this),this},e.from=function from(t,e,r){return Ya(1,arguments,this),this},e.fromTo=function fromTo(t,e,r,i){return Ya(2,arguments,this),this},e.set=function set(t,e,r){return e.duration=0,e.parent=this,ya(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new te(t,e,Ot(this,r),1),this},e.call=function call(t,e,r){return Na(this,te.delayedCall(0,t,e),r)},e.staggerTo=function staggerTo(t,e,r,i,n,a,s){return r.duration=e,r.stagger=r.stagger||i,r.onComplete=a,r.onCompleteParams=s,r.parent=this,new te(t,r,Ot(this,n)),this},e.staggerFrom=function staggerFrom(t,e,r,i,n,a,s){return r.runBackwards=1,ya(r).immediateRender=w(r.immediateRender),this.staggerTo(t,e,r,i,n,a,s)},e.staggerFromTo=function staggerFromTo(t,e,r,i,n,a,s,o){return i.startAt=r,ya(i).immediateRender=w(i.immediateRender),this.staggerTo(t,e,i,n,a,s,o)},e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_=this._time,m=this._dirty?this.totalDuration():this._tDur,g=this._dur,v=t<=0?0:la(t),y=this._zTime<0!=t<0&&(this._initted||!g);if(this!==L&&m<v&&0<=t&&(v=m),v!==this._tTime||r||y){if(_!==this._time&&g&&(v+=this._time-_,t+=this._time-_),i=v,f=this._start,u=!(l=this._ts),y&&(g||(_=this._zTime),!t&&e||(this._zTime=t)),this._repeat){if(d=this._yoyo,o=g+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*o+t,e,r);if(i=la(v%o),v===m?(s=this._repeat,i=g):((s=~~(c=la(v/o)))&&s===c&&(i=g,s--),g<i&&(i=g)),c=wt(this._tTime,o),!_&&this._tTime&&c!==s&&this._tTime-c*o-this._dur<=0&&(c=s),d&&1&s&&(i=g-i,p=1),s!==c&&!this._lock){var T=d&&1&c,b=T===(d&&1&s);if(s<c&&(T=!T),_=T?0:v%g?g:v,this._lock=1,this.render(_||(p?0:la(s*o)),e,!g)._lock=0,this._tTime=v,!e&&this.parent&&At(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1,c=s),_&&_!==this._time||u!=!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(g=this._dur,m=this._tDur,b&&(this._lock=2,_=T?g:-1e-4,this.render(_,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!u)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function _findNextPauseTween(t,e,r){var i;if(e<r)for(i=t._first;i&&i._start<=r;){if("isPause"===i.data&&i._start>e)return i;i=i._next}else for(i=t._last;i&&i._start>=r;){if("isPause"===i.data&&i._start<e)return i;i=i._prev}}(this,la(_),la(i)))&&(v-=i-(i=h._start)),this._tTime=v,this._time=i,this._act=!!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,_=0),!_&&v&&g&&!e&&!c&&(At(this,"onStart"),this._tTime!==v))return this;if(_<=i&&0<=t)for(n=this._first;n;){if(a=n._next,(n._act||i>=n._start)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(i-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(i-n._start)*n._ts,e,r),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=-q);break}}n=a}else{n=this._last;for(var w=t<0?t:i;n;){if(a=n._prev,(n._act||w<=n._end)&&n._ts&&h!==n){if(n.parent!==this)return this.render(t,e,r);if(n.render(0<n._ts?(w-n._start)*n._ts:(n._dirty?n.totalDuration():n._tDur)+(w-n._start)*n._ts,e,r||I&&pa(n)),i!==this._time||!this._ts&&!u){h=0,a&&(v+=this._zTime=w?-q:q);break}}n=a}}if(h&&!e&&(this.pause(),h.render(_<=i?0:-q)._zTime=_<=i?1:-1,this._ts))return this._start=f,Ka(this),this.render(t,e,r);this._onUpdate&&!e&&At(this,"onUpdate",!0),(v===m&&this._tTime>=this.totalDuration()||!v&&_)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||(!t&&g||!(v===m&&0<this._ts||!v&&this._ts<0)||Ca(this,1),e||t<0&&!_||!v&&!_&&m||(At(this,v===m&&0<=t?"onComplete":"onReverseComplete",!0),!this._prom||v<m&&0<this.timeScale()||this._prom())))}return this},e.add=function add(e,i){var n=this;if(t(i)||(i=Ot(this,i,e)),!(e instanceof qt)){if(K(e))return e.forEach(function(t){return n.add(t,i)}),this;if(r(e))return this.addLabel(e,i);if(!s(e))return this;e=te.delayedCall(0,e)}return this!==e?Na(this,e,i):this},e.getChildren=function getChildren(t,e,r,i){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),void 0===i&&(i=-X);for(var n=[],a=this._first;a;)a._start>=i&&(a instanceof te?e&&n.push(a):(r&&n.push(a),t&&n.push.apply(n,a.getChildren(!0,e,r)))),a=a._next;return n},e.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},e.remove=function remove(t){return r(t)?this.removeLabel(t):s(t)?this.killTweensOf(t):(t.parent===this&&Ba(this,t),t===this._recent&&(this._recent=this._last),Da(this))},e.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=la(It.time-(0<this._ts?t/this._ts:(this.totalDuration()-t)/-this._ts))),i.prototype.totalTime.call(this,t,e),this._forcing=0,this):this._tTime},e.addLabel=function addLabel(t,e){return this.labels[t]=Ot(this,e),this},e.removeLabel=function removeLabel(t){return delete this.labels[t],this},e.addPause=function addPause(t,e,r){var i=te.delayedCall(0,e||V,r);return i.data="isPause",this._hasPause=1,Na(this,i,Ot(this,t))},e.removePause=function removePause(t){var e=this._first;for(t=Ot(this,t);e;)e._start===t&&"isPause"===e.data&&Ca(e),e=e._next},e.killTweensOf=function killTweensOf(t,e,r){for(var i=this.getTweensOf(t,r),n=i.length;n--;)Zt!==i[n]&&i[n].kill(t,e);return this},e.getTweensOf=function getTweensOf(e,r){for(var i,n=[],a=Pt(e),s=this._first,o=t(r);s;)s instanceof te?na(s._targets,a)&&(o?(!Zt||s._initted&&s._ts)&&s.globalTime(0)<=r&&s.globalTime(s.totalDuration())>r:!r||s.isActive())&&n.push(s):(i=s.getTweensOf(a,r)).length&&n.push.apply(n,i),s=s._next;return n},e.tweenTo=function tweenTo(t,e){e=e||{};var r,i=this,n=Ot(i,t),a=e.startAt,s=e.onStart,o=e.onStartParams,u=e.immediateRender,h=te.to(i,ta({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:n,overwrite:"auto",duration:e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale())||q,onStart:function onStart(){if(i.pause(),!r){var t=e.duration||Math.abs((n-(a&&"time"in a?a.time:i._time))/i.timeScale());h._dur!==t&&Ua(h,t,0,1).render(h._time,!0,!0),r=1}s&&s.apply(h,o||[])}},e));return u?h.render(0):h},e.tweenFromTo=function tweenFromTo(t,e,r){return this.tweenTo(e,ta({startAt:{time:Ot(this,t)}},r))},e.recent=function recent(){return this._recent},e.nextLabel=function nextLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t))},e.previousLabel=function previousLabel(t){return void 0===t&&(t=this._time),ub(this,Ot(this,t),1)},e.currentLabel=function currentLabel(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+q)},e.shiftChildren=function shiftChildren(t,e,r){void 0===r&&(r=0);var i,n=this._first,a=this.labels;for(t=la(t);n;)n._start>=r&&(n._start+=t,n._end+=t),n=n._next;if(e)for(i in a)a[i]>=r&&(a[i]+=t);return Da(this)},e.invalidate=function invalidate(t){var e=this._first;for(this._lock=0;e;)e.invalidate(t),e=e._next;return i.prototype.invalidate.call(this,t)},e.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Da(this)},e.totalDuration=function totalDuration(t){var e,r,i,n=0,a=this,s=a._last,o=X;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-t:t));if(a._dirty){for(i=a.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),o<(r=s._start)&&a._sort&&s._ts&&!a._lock?(a._lock=1,Na(a,s,r-s._delay,1)._lock=0):o=r,r<0&&s._ts&&(n-=r,(!i&&!a._dp||i&&i.smoothChildTiming)&&(a._start+=la(r/a._ts),a._time-=r,a._tTime-=r),a.shiftChildren(-r,!1,-Infinity),o=0),s._end>n&&s._ts&&(n=s._end),s=e;Ua(a,a===L&&a._time>n?a._time:n,1,1),a._dirty=0}return a._tDur},Timeline.updateRoot=function updateRoot(t){if(L._ts&&(qa(L,Ja(t,L)),f=It.frame),It.frame>=vt){vt+=Y.autoSleep||120;var e=L._first;if((!e||!e._ts)&&Y.autoSleep&&It._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||It.sleep()}}},Timeline}(qt);ta(Gt.prototype,{_lock:0,_hasPause:0,_forcing:0});function cc(t,e,i,n,a,o){var u,h,l,f;if(mt[t]&&!1!==(u=new mt[t]).init(a,u.rawVars?e[t]:function _processVars(t,e,i,n,a){if(s(t)&&(t=Qt(t,a,e,i,n)),!v(t)||t.style&&t.nodeType||K(t)||J(t))return r(t)?Qt(t,a,e,i,n):t;var o,u={};for(o in t)u[o]=Qt(t[o],a,e,i,n);return u}(e[t],n,a,o,i),i,n,o)&&(i._pt=h=new we(i._pt,a,t,0,1,u.render,u,0,u.priority),i!==c))for(l=i._ptLookup[i._targets.indexOf(a)],f=u._props.length;f--;)l[u._props[f]]=h;return u}function ic(t,r,e,i){var n,a,s=r.ease||i||"power1.inOut";if(K(r))a=e[t]||(e[t]=[]),r.forEach(function(t,e){return a.push({t:e/(r.length-1)*100,v:t,e:s})});else for(n in r)a=e[n]||(e[n]=[]),"ease"===n||a.push({t:parseFloat(t),v:r[n],e:s})}var Zt,Wt,$t=function _addPropTween(t,e,i,n,a,o,u,h,l,f){s(n)&&(n=n(a||0,t,o));var c,d=t[e],p="get"!==i?i:s(d)?l?t[e.indexOf("set")||!s(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():d,_=s(d)?l?se:ae:ie;if(r(n)&&(~n.indexOf("random(")&&(n=rb(n)),"="===n.charAt(1)&&(!(c=ma(p,n)+(_a(p)||0))&&0!==c||(n=c))),!f||p!==n||Wt)return isNaN(p*n)||""===n?(d||e in t||S(e,n),function _addComplexStringPropTween(t,e,r,i,n,a,s){var o,u,h,l,f,c,d,p,_=new we(this._pt,t,e,0,1,pe,null,n),m=0,g=0;for(_.b=r,_.e=i,r+="",(d=~(i+="").indexOf("random("))&&(i=rb(i)),a&&(a(p=[r,i],t,e),r=p[0],i=p[1]),u=r.match(at)||[];o=at.exec(i);)l=o[0],f=i.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(c=parseFloat(u[g-1])||0,_._pt={_next:_._pt,p:f||1===g?f:",",s:c,c:"="===l.charAt(1)?ma(c,l)-c:parseFloat(l)-c,m:h&&h<4?Math.round:0},m=at.lastIndex);return _.c=m<i.length?i.substring(m,i.length):"",_.fp=s,(st.test(i)||d)&&(_.e=0),this._pt=_}.call(this,t,e,p,n,_,h||Y.stringFilter,l)):(c=new we(this._pt,t,e,+p||0,n-(p||0),"boolean"==typeof d?de:fe,0,_),l&&(c.fp=l),u&&c.modifier(u,this,t),this._pt=c)},Ht=function _initTween(t,e,r){var i,n,a,s,o,u,h,l,f,c,d,p,_,m=t.vars,g=m.ease,v=m.startAt,y=m.immediateRender,T=m.lazy,b=m.onUpdate,x=m.runBackwards,k=m.yoyoEase,O=m.keyframes,M=m.autoRevert,C=t._dur,P=t._startAt,S=t._targets,A=t.parent,D=A&&"nested"===A.data?A.vars.targets:S,z="auto"===t._overwrite&&!F,R=t.timeline,E=m.easeReverse||k;if(!R||O&&g||(g="none"),t._ease=jt(g,j.ease),t._rEase=E&&(jt(E)||t._ease),t._from=!R&&!!m.runBackwards,t._from&&(t.ratio=1),!R||O&&!m.stagger){if(p=(l=S[0]?ha(S[0]).harness:0)&&m[l.prop],i=xa(m,dt),P&&(P._zTime<0&&P.progress(1),e<0&&x&&y&&!M?P.render(-1,!0):P.revert(x&&C?ft:lt),P._lazy=0),v){if(Ca(t._startAt=te.set(S,ta({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!P&&w(T),startAt:null,delay:0,onUpdate:b&&function(){return At(t,"onUpdate")},stagger:0},v))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I||!y&&!M)&&t._startAt.revert(ft),y&&C&&e<=0&&r<=0)return void(e&&(t._zTime=e))}else if(x&&C&&!P)if(e&&(y=!1),a=ta({overwrite:!1,data:"isFromStart",lazy:y&&!P&&w(T),immediateRender:y,stagger:0,parent:A},i),p&&(a[l.prop]=p),Ca(t._startAt=te.set(S,a)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(I?t._startAt.revert(ft):t._startAt.render(-1,!0)),t._zTime=e,y){if(!e)return}else _initTween(t._startAt,q,q);for(t._pt=t._ptCache=0,T=C&&w(T)||T&&!C,n=0;n<S.length;n++){if(h=(o=S[n])._gsap||ga(S)[n]._gsap,t._ptLookup[n]=c={},_t[h.id]&&pt.length&&oa(),d=D===S?n:D.indexOf(o),l&&!1!==(f=new l).init(o,p||i,t,d,D)&&(t._pt=s=new we(t._pt,o,f.name,0,1,f.render,f,0,f.priority),f._props.forEach(function(t){c[t]=s}),f.priority&&(u=1)),!l||p)for(a in i)mt[a]&&(f=cc(a,i,t,d,o,D))?f.priority&&(u=1):c[a]=s=$t.call(t,o,a,"get",i[a],d,D,0,m.stringFilter);t._op&&t._op[n]&&t.kill(o,t._op[n]),z&&t._pt&&(Zt=t,L.killTweensOf(o,c,t.globalTime(e)),_=!t.parent,Zt=0),t._pt&&T&&(_t[h.id]=1)}u&&be(t),t._onInit&&t._onInit(t)}t._onUpdate=b,t._initted=(!t._op||t._pt)&&!_,O&&e<=0&&R.render(X,!0,!0)},Qt=function _parseFuncOrString(t,e,i,n,a){return s(t)?t.call(e,i,n,a):r(t)&&~t.indexOf("random(")?rb(t):t},Jt=Tt+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",Kt={};ja(Jt+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Kt[t]=1});var te=function(E){function Tween(e,r,i,n){var a;"number"==typeof r&&(i.duration=r,r=i,i=null);var s,o,u,h,l,f,c,d,p=(a=E.call(this,n?r:ya(r))||this).vars,_=p.duration,m=p.delay,g=p.immediateRender,b=p.stagger,x=p.overwrite,k=p.keyframes,O=p.defaults,M=p.scrollTrigger,C=r.parent||L,P=(K(e)||J(e)?t(e[0]):"length"in r)?[e]:Pt(e);if(a._targets=P.length?ga(P):T("GSAP target "+e+" not found. https://gsap.com",!Y.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=x,k||b||y(_)||y(m)){var S=(r=a.vars).easeReverse||r.yoyoEase;if((s=a.timeline=new Gt({data:"nested",defaults:O||{},targets:C&&"nested"===C.data?C.vars.targets:P})).kill(),s.parent=s._dp=_assertThisInitialized(a),s._start=0,b||y(_)||y(m)){if(h=P.length,c=b&&hb(b),v(b))for(l in b)~Jt.indexOf(l)&&((d=d||{})[l]=b[l]);for(o=0;o<h;o++)(u=xa(r,Kt)).stagger=0,S&&(u.easeReverse=S),d&&bt(u,d),f=P[o],u.duration=+Qt(_,_assertThisInitialized(a),o,f,P),u.delay=(+Qt(m,_assertThisInitialized(a),o,f,P)||0)-a._delay,!b&&1===h&&u.delay&&(a._delay=m=u.delay,a._start+=m,u.delay=0),s.to(f,u,c?c(o,f,P):0),s._ease=Bt.none;s.duration()?_=m=0:a.timeline=0}else if(k){ya(ta(s.vars.defaults,{ease:"none"})),s._ease=jt(k.ease||r.ease||"none");var A,D,z,R=0;if(K(k))k.forEach(function(t){return s.to(P,t,">")}),s.duration();else{for(l in u={},k)"ease"===l||"easeEach"===l||ic(l,k[l],u,k.easeEach);for(l in u)for(A=u[l].sort(function(t,e){return t.t-e.t}),o=R=0;o<A.length;o++)(z={ease:(D=A[o]).e,duration:(D.t-(o?A[o-1].t:0))/100*_})[l]=D.v,s.to(P,z,R),R+=z.duration;s.duration()<_&&s.to({},{duration:_-s.duration()})}}_||a.duration(_=s.duration())}else a.timeline=0;return!0!==x||F||(Zt=_assertThisInitialized(a),L.killTweensOf(P),Zt=0),Na(C,_assertThisInitialized(a),i),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(g||!_&&!k&&a._start===la(C._time)&&w(g)&&function _hasNoPausedAncestors(t){return!t||t._ts&&_hasNoPausedAncestors(t.parent)}(_assertThisInitialized(a))&&"nested"!==C.data)&&(a._tTime=-q,a.render(Math.max(0,-m)||0)),M&&Oa(_assertThisInitialized(a),M),a}_inheritsLoose(Tween,E);var e=Tween.prototype;return e.render=function render(t,e,r){var i,n,a,s,o,u,h,l,f=this._time,c=this._tDur,d=this._dur,p=t<0,_=c-q<t&&!p?c:t<q?0:t;if(d){if(_!==this._tTime||!t||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!=p||this._lazy){if(i=_,l=this.timeline,this._repeat){if(s=d+this._rDelay,this._repeat<-1&&p)return this.totalTime(100*s+t,e,r);if(i=la(_%s),_===c?(a=this._repeat,i=d):(a=~~(o=la(_/s)))&&a===o?(i=d,a--):d<i&&(i=d),(u=this._yoyo&&1&a)&&(i=d-i),o=wt(this._tTime,s),i===f&&!r&&this._initted&&a===o)return this._tTime=_,this;a!==o&&this.vars.repeatRefresh&&!u&&!this._lock&&i!==s&&this._initted&&(this._lock=r=1,this.render(la(s*a),!0).invalidate()._lock=0)}if(!this._initted){if(Pa(this,p?t:i,r,e,_))return this._tTime=0,this;if(!(f===this._time||r&&this.vars.repeatRefresh&&a!==o))return this;if(d!==this._dur)return this.render(t,e,r)}if(this._rEase){var m=i<f;if(m!==this._inv){var g=m?f:d-f;this._inv=m,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=f,this._invRecip=g?(m?-1:1)/g:0,this._invScale=m?-this.ratio:1-this.ratio,this._invEase=m?this._rEase:this._ease}this.ratio=h=this._invRatio+this._invScale*this._invEase((i-this._invTime)*this._invRecip)}else this.ratio=h=this._ease(i/d);if(this._from&&(this.ratio=h=1-h),this._tTime=_,this._time=i,!this._act&&this._ts&&(this._act=1,this._lazy=0),!f&&_&&!e&&!o&&(At(this,"onStart"),this._tTime!==_))return this;for(n=this._pt;n;)n.r(h,n.d),n=n._next;l&&l.render(t<0?t:l._dur*l._ease(i/this._dur),e,r)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(p&&Fa(this,t,0,r),At(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!e&&this.parent&&At(this,"onRepeat"),_!==this._tDur&&_||this._tTime!==_||(p&&!this._onUpdate&&Fa(this,t,0,!0),!t&&d||!(_===this._tDur&&0<this._ts||!_&&this._ts<0)||Ca(this,1),e||p&&!f||!(_||f||u)||(At(this,_===c?"onComplete":"onReverseComplete",!0),!this._prom||_<c&&0<this.timeScale()||this._prom()))}}else!function _renderZeroDurationTween(t,e,r,i){var n,a,s,o=t.ratio,u=e<0||!e&&(!t._start&&function _parentPlayheadIsBeforeStart(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||_parentPlayheadIsBeforeStart(e))}(t)&&(t._initted||!xt(t))||(t._ts<0||t._dp._ts<0)&&!xt(t))?0:1,h=t._rDelay,l=0;if(h&&t._repeat&&(l=Mt(0,t._tDur,e),a=wt(l,h),t._yoyo&&1&a&&(u=1-u),a!==wt(t._tTime,h)&&(o=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==o||I||i||t._zTime===q||!e&&t._zTime){if(!t._initted&&Pa(t,e,i,r,l))return;for(s=t._zTime,t._zTime=e||(r?q:0),r=r||e&&!s,t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=l,n=t._pt;n;)n.r(u,n.d),n=n._next;e<0&&Fa(t,e,0,!0),t._onUpdate&&!r&&At(t,"onUpdate"),l&&t._repeat&&!r&&t.parent&&At(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ca(t,1),r||I||(At(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,r);return this},e.targets=function targets(){return this._targets},e.invalidate=function invalidate(t){return t&&this.vars.runBackwards||(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),E.prototype.invalidate.call(this,t)},e.resetTo=function resetTo(t,e,r,i,n){d||It.wake(),this._ts||this.play();var a,s=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ht(this,s),a=this._ease(s/this._dur),function _updatePropTweens(t,e,r,i,n,a,s,o){var u,h,l,f,c=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!c)for(c=t._ptCache[e]=[],l=t._ptLookup,f=t._targets.length;f--;){if((u=l[f][e])&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==e&&u.fp!==e;)u=u._next;if(!u)return Wt=1,t.vars[e]="+=0",Ht(t,s),Wt=0,o?T(e+" not eligible for reset. Try splitting into individual properties"):1;c.push(u)}for(f=c.length;f--;)(u=(h=c[f])._pt||h).s=!i&&0!==i||n?u.s+(i||0)+a*u.c:i,u.c=r-u.s,h.e&&(h.e=ka(r)+_a(h.e)),h.b&&(h.b=u.s+_a(h.b))}(this,t,e,r,i,a,s,n)?this.resetTo(t,e,r,i,1):(La(this,0),this.parent||Aa(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?wb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!I),this;if(this.timeline){var i=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Zt&&!0!==Zt.vars.overwrite)._first||wb(this),this.parent&&i!==this.timeline.totalDuration()&&Ua(this,this._dur*this.timeline._tDur/i,0,1),this}var n,a,s,o,u,h,l,f=this._targets,c=t?Pt(t):f,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,i=r===e.length;i&&r--&&t[r]===e[r];);return r<0}(f,c))return"all"===e&&(this._pt=0),wb(this);for(n=this._op=this._op||[],"all"!==e&&(r(e)&&(u={},ja(e,function(t){return u[t]=1}),e=u),e=function _addAliasesToVars(t,e){var r,i,n,a,s=t[0]?ha(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(i in r=bt({},e),o)if(i in r)for(n=(a=o[i].split(",")).length;n--;)r[a[n]]=r[i];return r}(f,e)),l=f.length;l--;)if(~c.indexOf(f[l]))for(u in a=d[l],"all"===e?(n[l]=e,o=a,s={}):(s=n[l]=n[l]||{},o=e),o)(h=a&&a[u])&&("kill"in h.d&&!0!==h.d.kill(u)||Ba(this,h,"_pt"),delete a[u]),"all"!==s&&(s[u]=1);return this._initted&&!this._pt&&p&&wb(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return Ya(1,arguments)},Tween.delayedCall=function delayedCall(t,e,r,i){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},Tween.fromTo=function fromTo(t,e,r){return Ya(2,arguments)},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return L.killTweensOf(t,e,r)},Tween}(qt);ta(te.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ja("staggerTo,staggerFrom,staggerFromTo",function(r){te[r]=function(){var t=new Gt,e=Ct.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function qc(t,e,r){return t.setAttribute(e,r)}function yc(t,e,r,i){i.mSet(t,e,i.m.call(i.tween,r,i.mt),i)}var ie=function _setterPlain(t,e,r){return t[e]=r},ae=function _setterFunc(t,e,r){return t[e](r)},se=function _setterFuncWithParam(t,e,r,i){return t[e](i.fp,r)},ue=function _getSetter(t,e){return s(t[e])?ae:u(t[e])&&t.setAttribute?qc:ie},fe=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},de=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},pe=function _renderComplexString(t,e){var r=e._pt,i="";if(!t&&e.b)i=e.b;else if(1===t&&e.e)i=e.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+i,r=r._next;i+=e.c}e.set(e.t,e.p,i,e)},_e=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},ve=function _addPluginModifier(t,e,r,i){for(var n,a=this._pt;a;)n=a._next,a.p===i&&a.modifier(t,e,r),a=n},Te=function _killPropTweensOf(t){for(var e,r,i=this._pt;i;)r=i._next,i.p===t&&!i.op||i.op===t?Ba(this,i,"_pt"):i.dep||(e=1),i=r;return!e},be=function _sortPropTweensByPriority(t){for(var e,r,i,n,a=t._pt;a;){for(e=a._next,r=i;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:n)?a._prev._next=a:i=a,(a._next=r)?r._prev=a:n=a,a=e}t._pt=i},we=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=yc,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,i,n,a,s,o,u){this.t=e,this.s=i,this.c=n,this.p=r,this.r=a||fe,this.d=s||this,this.set=o||ie,this.pr=u||0,(this._next=t)&&(t._prev=this)}ja(Tt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return dt[t]=1}),ht.TweenMax=ht.TweenLite=te,ht.TimelineLite=ht.TimelineMax=Gt,L=new Gt({sortChildren:!1,defaults:j,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Y.stringFilter=Ib;function Gc(t){return(Oe[t]||Me).map(function(t){return t()})}function Hc(){var t=Date.now(),o=[];2<t-Ce&&(Gc("matchMediaInit"),ke.forEach(function(t){var e,r,i,n,a=t.queries,s=t.conditions;for(r in a)(e=h.matchMedia(a[r]).matches)&&(i=1),e!==s[r]&&(s[r]=e,n=1);n&&(t.revert(),i&&o.push(t))}),Gc("matchMediaRevert"),o.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Ce=t,Gc("matchMedia"))}var xe,ke=[],Oe={},Me=[],Ce=0,Pe=0,Se=((xe=Context.prototype).add=function add(t,i,n){function Gw(){var t,e=l,r=a.selector;return e&&e!==a&&e.data.push(a),n&&(a.selector=fb(n)),l=a,t=i.apply(a,arguments),s(t)&&a._r.push(t),l=e,a.selector=r,a.isReverted=!1,t}s(t)&&(n=i,i=t,t=s);var a=this;return a.last=Gw,t===s?Gw(a,function(t){return a.add(null,t)}):t?a[t]=Gw:Gw},xe.ignore=function ignore(t){var e=l;l=null,t(this),l=e},xe.getTweens=function getTweens(){var e=[];return this.data.forEach(function(t){return t instanceof Context?e.push.apply(e,t.getTweens()):t instanceof te&&!(t.parent&&"nested"===t.parent.data)&&e.push(t)}),e},xe.clear=function clear(){this._r.length=this.data.length=0},xe.kill=function kill(i,t){var n=this;if(i?function(){for(var t,e=n.getTweens(),r=n.data.length;r--;)"isFlip"===(t=n.data[r]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach(function(t){return e.splice(e.indexOf(t),1)}));for(e.map(function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}}).sort(function(t,e){return e.g-t.g||-1/0}).forEach(function(t){return t.t.revert(i)}),r=n.data.length;r--;)(t=n.data[r])instanceof Gt?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):t instanceof te||!t.revert||t.revert(i);n._r.forEach(function(t){return t(i,n)}),n.isReverted=!0}():this.data.forEach(function(t){return t.kill&&t.kill()}),this.clear(),t)for(var e=ke.length;e--;)ke[e].id===this.id&&ke.splice(e,1)},xe.revert=function revert(t){this.kill(t||{})},Context);function Context(t,e){this.selector=e&&fb(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Pe++,t&&this.add(t)}var De,Re=((De=MatchMedia.prototype).add=function add(t,e,r){v(t)||(t={matches:t});var i,n,a,s=new Se(0,r||this.scope),o=s.conditions={};for(n in l&&!s.selector&&(s.selector=l.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t)"all"===n?a=1:(i=h.matchMedia(t[n]))&&(ke.indexOf(s)<0&&ke.push(s),(o[n]=i.matches)&&(a=1),i.addListener?i.addListener(Hc):i.addEventListener("change",Hc));return a&&e(s,function(t){return s.add(null,t)}),this},De.revert=function revert(t){this.kill(t||{})},De.kill=function kill(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},MatchMedia);function MatchMedia(t){this.contexts=[],this.scope=t,l&&l.data.push(this)}var Ee={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t){return zb(t)})},timeline:function timeline(t){return new Gt(t)},getTweensOf:function getTweensOf(t,e){return L.getTweensOf(t,e)},getProperty:function getProperty(i,t,e,n){r(i)&&(i=Pt(i)[0]);var a=ha(i||{}).get,s=e?sa:ra;return"native"===e&&(e=""),i?t?s((mt[t]&&mt[t].get||a)(i,t,e,n)):function(t,e,r){return s((mt[t]&&mt[t].get||a)(i,t,e,r))}:i},quickSetter:function quickSetter(r,e,i){if(1<(r=Pt(r)).length){var n=r.map(function(t){return Fe.quickSetter(t,e,i)}),a=n.length;return function(t){for(var e=a;e--;)n[e](t)}}r=r[0]||{};var s=mt[e],o=ha(r),u=o.harness&&(o.harness.aliases||{})[e]||e,h=s?function(t){var e=new s;c._pt=0,e.init(r,i?t+i:t,c,0,[r]),e.render(1,e),c._pt&&_e(1,c)}:o.set(r,u);return s?h:function(t){return h(r,u,i?t+i:t,o,1)}},quickTo:function quickTo(t,i,e){function $x(t,e,r){return n.resetTo(i,t,e,r)}var r,n=Fe.to(t,ta(((r={})[i]="+=0.1",r.paused=!0,r.stagger=0,r),e||{}));return $x.tween=n,$x},isTweening:function isTweening(t){return 0<L.getTweensOf(t,!0).length},defaults:function defaults(t){return t&&t.ease&&(t.ease=jt(t.ease,j.ease)),wa(j,t||{})},config:function config(t){return wa(Y,t||{})},registerEffect:function registerEffect(t){var i=t.name,n=t.effect,e=t.plugins,a=t.defaults,r=t.extendTimeline;(e||"").split(",").forEach(function(t){return t&&!mt[t]&&!ht[t]&&T(i+" effect requires "+t+" plugin.")}),gt[i]=function(t,e,r){return n(Pt(t),ta(e||{},a),r)},r&&(Gt.prototype[i]=function(t,e,r){return this.add(gt[i](t,v(e)?e:(r=e)&&{},this),r)})},registerEase:function registerEase(t,e){Bt[t]=jt(e)},parseEase:function parseEase(t,e){return arguments.length?jt(t,e):Bt},getById:function getById(t){return L.getById(t)},exportRoot:function exportRoot(t,e){void 0===t&&(t={});var r,i,n=new Gt(t);for(n.smoothChildTiming=w(t.smoothChildTiming),L.remove(n),n._dp=0,n._time=n._tTime=L._time,r=L._first;r;)i=r._next,!e&&!r._dur&&r instanceof te&&r.vars.onComplete===r._targets[0]||Na(n,r,r._start-r._delay),r=i;return Na(L,n,0),n},context:function context(t,e){return t?new Se(t,e):l},matchMedia:function matchMedia(t){return new Re(t)},matchMediaRefresh:function matchMediaRefresh(){return ke.forEach(function(t){var e,r,i=t.conditions;for(r in i)i[r]&&(i[r]=!1,e=1);e&&t.revert()})||Hc()},addEventListener:function addEventListener(t,e){var r=Oe[t]||(Oe[t]=[]);~r.indexOf(e)||r.push(e)},removeEventListener:function removeEventListener(t,e){var r=Oe[t],i=r&&r.indexOf(e);0<=i&&r.splice(i,1)},utils:{wrap:function wrap(e,t,r){var i=t-e;return K(e)?ob(e,wrap(0,e.length),t):Za(r,function(t){return(i+(t-e)%i)%i+e})},wrapYoyo:function wrapYoyo(e,t,r){var i=t-e,n=2*i;return K(e)?ob(e,wrapYoyo(0,e.length-1),t):Za(r,function(t){return e+(i<(t=(n+(t-e)%n)%n||0)?n-t:t)})},distribute:hb,random:kb,snap:jb,normalize:function normalize(t,e,r){return St(t,e,0,1,r)},getUnit:_a,clamp:function clamp(e,r,t){return Za(t,function(t){return Mt(e,r,t)})},splitColor:Db,toArray:Pt,selector:fb,mapRange:St,pipe:function pipe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}},unitize:function unitize(e,r){return function(t){return e(parseFloat(t))+(r||_a(t))}},interpolate:function interpolate(e,i,t,n){var a=isNaN(e+i)?0:function(t){return(1-t)*e+t*i};if(!a){var s,o,u,h,l,f=r(e),c={};if(!0===t&&(n=1)&&(t=null),f)e={p:e},i={p:i};else if(K(e)&&!K(i)){for(u=[],h=e.length,l=h-2,o=1;o<h;o++)u.push(interpolate(e[o-1],e[o]));h--,a=function func(t){t*=h;var e=Math.min(l,~~t);return u[e](t-e)},t=i}else n||(e=bt(K(e)?[]:{},e));if(!u){for(s in i)$t.call(c,e,s,"get",i[s]);a=function func(t){return _e(t,c)||(f?e.p:e)}}}return Za(t,a)},shuffle:gb},install:R,effects:gt,ticker:It,updateRoot:Gt.updateRoot,plugins:mt,globalTimeline:L,core:{PropTween:we,globals:U,Tween:te,Timeline:Gt,Animation:qt,getCache:ha,_removeLinkedListItem:Ba,reverting:function reverting(){return I},context:function context(t){return t&&l&&(l.data.push(t),t._ctx=l),l},suppressOverwrites:function suppressOverwrites(t){return F=t}}};ja("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Ee[t]=te[t]}),It.add(Gt.updateRoot),c=Ee.to({},{duration:0});function Lc(t,e){for(var r=t._pt;r&&r.p!==e&&r.op!==e&&r.fp!==e;)r=r._next;return r}function Nc(t,a){return{name:t,headless:1,rawVars:1,init:function init(t,n,e){e._onInit=function(t){var e,i;if(r(n)&&(e={},ja(n,function(t){return e[t]=1}),n=e),a){for(i in e={},n)e[i]=a(n[i]);n=e}!function _addModifiers(t,e){var r,i,n,a=t._targets;for(r in e)for(i=a.length;i--;)(n=(n=t._ptLookup[i][r])&&n.d)&&(n._pt&&(n=Lc(n,r)),n&&n.modifier&&n.modifier(e[r],t,a[i],r))}(t,n)}}}}var Fe=Ee.registerPlugin({name:"attr",init:function init(t,e,r,i,n){var a,s,o;for(a in this.tween=r,e)o=t.getAttribute(a)||"",(s=this.add(t,"setAttribute",(o||0)+"",e[a],i,n,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function render(t,e){for(var r=e._pt;r;)I?r.set(r.t,r.p,r.b,r):r.r(t,r.d),r=r._next}},{name:"endArray",headless:1,init:function init(t,e){for(var r=e.length;r--;)this.add(t,r,t[r]||0,e[r],0,0,0,0,0,1)}},Nc("roundProps",ib),Nc("modifiers"),Nc("snap",jb))||Ee;te.version=Gt.version=Fe.version="3.15.0",o=1,x()&&Lt();function xd(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function yd(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)}function zd(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Ad(t,e){return e.set(e.t,e.p,1===t?e.e:t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)}function Bd(t,e){var r=e.s+e.c*t;e.set(e.t,e.p,~~(r+(r<0?-.5:.5))+e.u,e)}function Cd(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)}function Dd(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)}function Ed(t,e,r){return t.style[e]=r}function Fd(t,e,r){return t.style.setProperty(e,r)}function Gd(t,e,r){return t._gsap[e]=r}function Hd(t,e,r){return t._gsap.scaleX=t._gsap.scaleY=r}function Id(t,e,r,i,n){var a=t._gsap;a.scaleX=a.scaleY=r,a.renderTransform(n,a)}function Jd(t,e,r,i,n){var a=t._gsap;a[e]=r,a.renderTransform(n,a)}function Md(t,e){var r=this,i=this.target,n=i.style,a=i._gsap;if(t in ur&&n){if(this.tfm=this.tfm||{},"transform"===t)return _r.transform.split(",").forEach(function(t){return Md.call(r,t,e)});if(~(t=_r[t]||t).indexOf(",")?t.split(",").forEach(function(t){return r.tfm[t]=wr(i,t)}):this.tfm[t]=a.x?a[t]:wr(i,t),t===gr&&(this.tfm.zOrigin=a.zOrigin),0<=this.props.indexOf(mr))return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(gr,e,"")),t=mr}(n||e)&&this.props.push(t,e,n[t])}function Nd(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))}function Od(){var t,e,r=this.props,i=this.target,n=i.style,a=i._gsap;for(t=0;t<r.length;t+=3)r[t+1]?2===r[t+1]?i[r[t]](r[t+2]):i[r[t]]=r[t+2]:r[t+2]?n[r[t]]=r[t+2]:n.removeProperty("--"===r[t].substr(0,2)?r[t]:r[t].replace(cr,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)a[e]=this.tfm[e];a.svg&&(a.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),(t=je())&&t.isStart||n[mr]||(Nd(n),a.zOrigin&&n[gr]&&(n[gr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}}function Pd(t,e){var r={target:t,props:[],revert:Od,save:Md};return t._gsap||Fe.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(t){return r.save(t)}),r}function Rd(t,e){var r=Le.createElementNS?Le.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Le.createElement(t);return r&&r.style?r:Le.createElement(t)}function Sd(t,e,r){var i=getComputedStyle(t);return i[e]||i.getPropertyValue(e.replace(cr,"-$1").toLowerCase())||i.getPropertyValue(e)||!r&&Sd(t,yr(e)||e,1)||""}function Vd(){(function _windowExists(){return"undefined"!=typeof window})()&&window.document&&(Ie=window,Le=Ie.document,Be=Le.documentElement,Ue=Rd("div")||{style:{}},Rd("div"),mr=yr(mr),gr=mr+"Origin",Ue.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Ve=!!yr("perspective"),je=Fe.core.reverting,Ne=1)}function Wd(t){var e,r=t.ownerSVGElement,i=Rd("svg",r&&r.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=t.cloneNode(!0);n.style.display="block",i.appendChild(n),Be.appendChild(i);try{e=n.getBBox()}catch(t){}return i.removeChild(n),Be.removeChild(i),e}function Xd(t,e){for(var r=e.length;r--;)if(t.hasAttribute(e[r]))return t.getAttribute(e[r])}function Yd(e){var r,i;try{r=e.getBBox()}catch(t){r=Wd(e),i=1}return r&&(r.width||r.height)||i||(r=Wd(e)),!r||r.width||r.x||r.y?r:{x:+Xd(e,["x","cx","x1"])||0,y:+Xd(e,["y","cy","y1"])||0,width:0,height:0}}function Zd(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Yd(t))}function $d(t,e){if(e){var r,i=t.style;e in ur&&e!==gr&&(e=mr),i.removeProperty?("ms"!==(r=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),i.removeProperty("--"===r?e:e.replace(cr,"-$1").toLowerCase())):i.removeAttribute(e)}}function _d(t,e,r,i,n,a){var s=new we(t._pt,e,r,0,1,a?Dd:Cd);return(t._pt=s).b=i,s.e=n,t._props.push(r),s}function ce(t,e,r,i){var n,a,s,o,u=parseFloat(r)||0,h=(r+"").trim().substr((u+"").length)||"px",l=Ue.style,f=dr.test(e),c="svg"===t.tagName.toLowerCase(),d=(c?"client":"offset")+(f?"Width":"Height"),p="px"===i,_="%"===i;if(i===h||!u||Tr[i]||Tr[h])return u;if("px"===h||p||(u=ce(t,e,r,"px")),o=t.getCTM&&Zd(t),(_||"%"===h)&&(ur[e]||~e.indexOf("adius")))return n=o?t.getBBox()[f?"width":"height"]:t[d],ka(_?u/n*100:u/100*n);if(l[f?"width":"height"]=100+(p?h:i),a="rem"!==i&&~e.indexOf("adius")||"em"===i&&t.appendChild&&!c?t:t.parentNode,o&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==Le&&a.appendChild||(a=Le.body),(s=a._gsap)&&_&&s.width&&f&&s.time===It.time&&!s.uncache)return ka(u/s.width*100);if(!_||"height"!==e&&"width"!==e)!_&&"%"!==h||br[Sd(a,"display")]||(l.position=Sd(t,"position")),a===t&&(l.position="static"),a.appendChild(Ue),n=Ue[d],a.removeChild(Ue),l.position="absolute";else{var m=t.style[e];t.style[e]=100+i,n=t[d],m?t.style[e]=m:$d(t,e)}return f&&_&&((s=ha(a)).time=It.time,s.width=a[d]),ka(p?n*u/100:n&&u?100/n*u:0)}function ee(t,e,r,i){if(!r||"none"===r){var n=yr(e,t,1),a=n&&Sd(t,n,1);a&&a!==r?(e=n,r=a):"borderColor"===e&&(r=Sd(t,"borderTopColor"))}var s,o,u,h,l,f,c,d,p,_,m,g=new we(this._pt,t.style,e,0,1,pe),v=0,y=0;if(g.b=r,g.e=i,r+="","var(--"===(i+="").substring(0,6)&&(i=Sd(t,i.substring(4,i.indexOf(")")))),"auto"===i&&(f=t.style[e],t.style[e]=i,i=Sd(t,e)||i,f?t.style[e]=f:$d(t,e)),Ib(s=[r,i]),i=s[1],u=(r=s[0]).match(nt)||[],(i.match(nt)||[]).length){for(;o=nt.exec(i);)c=o[0],p=i.substring(v,o.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),c!==(f=u[y++]||"")&&(h=parseFloat(f)||0,m=f.substr((h+"").length),"="===c.charAt(1)&&(c=ma(h,c)+m),d=parseFloat(c),_=c.substr((d+"").length),v=nt.lastIndex-_.length,_||(_=_||Y.units[e]||m,v===i.length&&(i+=_,g.e+=_)),m!==_&&(h=ce(t,e,f,_)||0),g._pt={_next:g._pt,p:p||1===y?p:",",s:h,c:d-h,m:l&&l<4||"zIndex"===e?Math.round:0});g.c=v<i.length?i.substring(v,i.length):""}else g.r="display"===e&&"none"===i?Dd:Cd;return st.test(i)&&(g.e=0),this._pt=g}function ge(t){var e=t.split(" "),r=e[0],i=e[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==i&&"right"!==i||(t=r,r=i,i=t),e[0]=xr[r]||r,e[1]=xr[i]||i,e.join(" ")}function he(t,e){if(e.tween&&e.tween._time===e.tween._dur){var r,i,n,a=e.t,s=a.style,o=e.u,u=a._gsap;if("all"===o||!0===o)s.cssText="",i=1;else for(n=(o=o.split(",")).length;-1<--n;)r=o[n],ur[r]&&(i=1,r="transformOrigin"===r?gr:mr),$d(a,r);i&&($d(a,mr),u&&(u.svg&&a.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Cr(a,1),u.uncache=1,Nd(s)))}}function le(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t}function me(t){var e=Sd(t,mr);return le(e)?Or:e.substr(7).match(it).map(ka)}function ne(t,e){var r,i,n,a,s=t._gsap||ha(t),o=t.style,u=me(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(n=t.transform.baseVal.consolidate().matrix).a,n.b,n.c,n.d,n.e,n.f]).join(",")?Or:u:(u!==Or||t.offsetParent||t===Be||s.svg||(n=o.display,o.display="block",(r=t.parentNode)&&(t.offsetParent||t.getBoundingClientRect().width)||(a=1,i=t.nextElementSibling,Be.appendChild(t)),u=me(t),n?o.display=n:$d(t,"display"),a&&(i?r.insertBefore(t,i):r?r.appendChild(t):Be.removeChild(t))),e&&6<u.length?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)}function oe(t,e,r,i,n,a){var s,o,u,h=t._gsap,l=n||ne(t,!0),f=h.xOrigin||0,c=h.yOrigin||0,d=h.xOffset||0,p=h.yOffset||0,_=l[0],m=l[1],g=l[2],v=l[3],y=l[4],T=l[5],b=e.split(" "),w=parseFloat(b[0])||0,x=parseFloat(b[1])||0;r?l!==Or&&(o=_*v-m*g)&&(u=w*(-m/o)+x*(_/o)-(_*T-m*y)/o,w=w*(v/o)+x*(-g/o)+(g*T-v*y)/o,x=u):(w=(s=Yd(t)).x+(~b[0].indexOf("%")?w/100*s.width:w),x=s.y+(~(b[1]||b[0]).indexOf("%")?x/100*s.height:x)),i||!1!==i&&h.smooth?(y=w-f,T=x-c,h.xOffset=d+(y*_+T*g)-y,h.yOffset=p+(y*m+T*v)-T):h.xOffset=h.yOffset=0,h.xOrigin=w,h.yOrigin=x,h.smooth=!!i,h.origin=e,h.originIsAbsolute=!!r,t.style[gr]="0px 0px",a&&(_d(a,h,"xOrigin",f,w),_d(a,h,"yOrigin",c,x),_d(a,h,"xOffset",d,h.xOffset),_d(a,h,"yOffset",p,h.yOffset)),t.setAttribute("data-svg-origin",w+" "+x)}function re(t,e,r){var i=_a(e);return ka(parseFloat(e)+parseFloat(ce(t,"x",r+"px",i)))+i}function ye(t,e,i,n,a){var s,o,u=360,h=r(a),l=parseFloat(a)*(h&&~a.indexOf("rad")?hr:1)-n,f=n+l+"deg";return h&&("short"===(s=a.split("_")[1])&&(l%=u)!==l%180&&(l+=l<0?u:-u),"cw"===s&&l<0?l=(l+36e9)%u-~~(l/u)*u:"ccw"===s&&0<l&&(l=(l-36e9)%u-~~(l/u)*u)),t._pt=o=new we(t._pt,e,i,n,l,yd),o.e=f,o.u="deg",t._props.push(i),o}function ze(t,e){for(var r in e)t[r]=e[r];return t}function Ae(t,e,r){var i,n,a,s,o,u,h,l=ze({},r._gsap),f=r.style;for(n in l.svg?(a=r.getAttribute("transform"),r.setAttribute("transform",""),f[mr]=e,i=Cr(r,1),$d(r,mr),r.setAttribute("transform",a)):(a=getComputedStyle(r)[mr],f[mr]=e,i=Cr(r,1),f[mr]=a),ur)(a=l[n])!==(s=i[n])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(n)<0&&(o=_a(a)!==(h=_a(s))?ce(r,n,a,h):parseFloat(a),u=parseFloat(s),t._pt=new we(t._pt,i,n,o,u-o,xd),t._pt.u=h||0,t._props.push(n));ze(i,l)}var Ie,Le,Be,Ne,Ue,Ye,je,Ve,Xe=Bt.Power0,qe=Bt.Power1,Ge=Bt.Power2,Ze=Bt.Power3,We=Bt.Power4,$e=Bt.Linear,He=Bt.Quad,Qe=Bt.Cubic,Je=Bt.Quart,Ke=Bt.Quint,tr=Bt.Strong,er=Bt.Elastic,rr=Bt.Back,ir=Bt.SteppedEase,nr=Bt.Bounce,ar=Bt.Sine,sr=Bt.Expo,or=Bt.Circ,ur={},hr=180/Math.PI,lr=Math.PI/180,fr=Math.atan2,cr=/([A-Z])/g,dr=/(left|right|width|margin|padding|x)/i,pr=/[\s,\(]\S/,_r={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},mr="transform",gr=mr+"Origin",vr="O,Moz,ms,Ms,Webkit".split(","),yr=function _checkPropPrefix(t,e,r){var i=(e||Ue).style,n=5;if(t in i&&!r)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);n--&&!(vr[n]+t in i););return n<0?null:(3===n?"ms":0<=n?vr[n]:"")+t},Tr={deg:1,rad:1,turn:1},br={grid:1,flex:1},wr=function _get(t,e,r,i){var n;return Ne||Vd(),e in _r&&"transform"!==e&&~(e=_r[e]).indexOf(",")&&(e=e.split(",")[0]),ur[e]&&"transform"!==e?(n=Cr(t,i),n="transformOrigin"!==e?n[e]:n.svg?n.origin:Pr(Sd(t,gr))+" "+n.zOrigin+"px"):(n=t.style[e])&&"auto"!==n&&!i&&!~(n+"").indexOf("calc(")||(n=kr[e]&&kr[e](t,e,r)||Sd(t,e)||ia(t,e)||("opacity"===e?1:0)),r&&!~(n+"").trim().indexOf(" ")?ce(t,e,n,r)+r:n},xr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},kr={clearProps:function clearProps(t,e,r,i,n){if("isFromStart"!==n.data){var a=t._pt=new we(t._pt,e,r,0,0,he);return a.u=i,a.pr=-10,a.tween=n,t._props.push(r),1}}},Or=[1,0,0,1,0,0],Mr={},Cr=function _parseTransform(t,e){var r=t._gsap||new Xt(t);if("x"in r&&!e&&!r.uncache)return r;var i,n,a,s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x,k,O,M,C,P,S,A,D,z,R,E,F=t.style,I=r.scaleX<0,L="deg",B=getComputedStyle(t),N=Sd(t,gr)||"0";return i=n=a=u=h=l=f=c=d=0,s=o=1,r.svg=!(!t.getCTM||!Zd(t)),B.translate&&("none"===B.translate&&"none"===B.scale&&"none"===B.rotate||(F[mr]=("none"!==B.translate?"translate3d("+(B.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==B.rotate?"rotate("+B.rotate+") ":"")+("none"!==B.scale?"scale("+B.scale.split(" ").join(",")+") ":"")+("none"!==B[mr]?B[mr]:"")),F.scale=F.rotate=F.translate="none"),m=ne(t,r.svg),r.svg&&(M=r.uncache?(C=t.getBBox(),N=r.xOrigin-C.x+"px "+(r.yOrigin-C.y)+"px",""):!e&&t.getAttribute("data-svg-origin"),oe(t,M||N,!!M||r.originIsAbsolute,!1!==r.smooth,m)),p=r.xOrigin||0,_=r.yOrigin||0,m!==Or&&(T=m[0],b=m[1],w=m[2],x=m[3],i=k=m[4],n=O=m[5],6===m.length?(s=Math.sqrt(T*T+b*b),o=Math.sqrt(x*x+w*w),u=T||b?fr(b,T)*hr:0,(f=w||x?fr(w,x)*hr+u:0)&&(o*=Math.abs(Math.cos(f*lr))),r.svg&&(i-=p-(p*T+_*w),n-=_-(p*b+_*x))):(E=m[6],z=m[7],S=m[8],A=m[9],D=m[10],R=m[11],i=m[12],n=m[13],a=m[14],h=(g=fr(E,D))*hr,g&&(M=k*(v=Math.cos(-g))+S*(y=Math.sin(-g)),C=O*v+A*y,P=E*v+D*y,S=k*-y+S*v,A=O*-y+A*v,D=E*-y+D*v,R=z*-y+R*v,k=M,O=C,E=P),l=(g=fr(-w,D))*hr,g&&(v=Math.cos(-g),R=x*(y=Math.sin(-g))+R*v,T=M=T*v-S*y,b=C=b*v-A*y,w=P=w*v-D*y),u=(g=fr(b,T))*hr,g&&(M=T*(v=Math.cos(g))+b*(y=Math.sin(g)),C=k*v+O*y,b=b*v-T*y,O=O*v-k*y,T=M,k=C),h&&359.9<Math.abs(h)+Math.abs(u)&&(h=u=0,l=180-l),s=ka(Math.sqrt(T*T+b*b+w*w)),o=ka(Math.sqrt(O*O+E*E)),g=fr(k,O),f=2e-4<Math.abs(g)?g*hr:0,d=R?1/(R<0?-R:R):0),r.svg&&(M=t.getAttribute("transform"),r.forceCSS=t.setAttribute("transform","")||!le(Sd(t,mr)),M&&t.setAttribute("transform",M))),90<Math.abs(f)&&Math.abs(f)<270&&(I?(s*=-1,f+=u<=0?180:-180,u+=u<=0?180:-180):(o*=-1,f+=f<=0?180:-180)),e=e||r.uncache,r.x=i-((r.xPercent=i&&(!e&&r.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-i)?-50:0)))?t.offsetWidth*r.xPercent/100:0)+"px",r.y=n-((r.yPercent=n&&(!e&&r.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-n)?-50:0)))?t.offsetHeight*r.yPercent/100:0)+"px",r.z=a+"px",r.scaleX=ka(s),r.scaleY=ka(o),r.rotation=ka(u)+L,r.rotationX=ka(h)+L,r.rotationY=ka(l)+L,r.skewX=f+L,r.skewY=c+L,r.transformPerspective=d+"px",(r.zOrigin=parseFloat(N.split(" ")[2])||!e&&r.zOrigin||0)&&(F[gr]=Pr(N)),r.xOffset=r.yOffset=0,r.force3D=Y.force3D,r.renderTransform=r.svg?Er:Ve?Rr:Sr,r.uncache=0,r},Pr=function _firstTwoOnly(t){return(t=t.split(" "))[0]+" "+t[1]},Sr=function _renderNon3DTransforms(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Rr(t,e)},Ar="0deg",Dr="0px",zr=") ",Rr=function _renderCSSTransforms(t,e){var r=e||this,i=r.xPercent,n=r.yPercent,a=r.x,s=r.y,o=r.z,u=r.rotation,h=r.rotationY,l=r.rotationX,f=r.skewX,c=r.skewY,d=r.scaleX,p=r.scaleY,_=r.transformPerspective,m=r.force3D,g=r.target,v=r.zOrigin,y="",T="auto"===m&&t&&1!==t||!0===m;if(v&&(l!==Ar||h!==Ar)){var b,w=parseFloat(h)*lr,x=Math.sin(w),k=Math.cos(w);w=parseFloat(l)*lr,b=Math.cos(w),a=re(g,a,x*b*-v),s=re(g,s,-Math.sin(w)*-v),o=re(g,o,k*b*-v+v)}_!==Dr&&(y+="perspective("+_+zr),(i||n)&&(y+="translate("+i+"%, "+n+"%) "),!T&&a===Dr&&s===Dr&&o===Dr||(y+=o!==Dr||T?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+zr),u!==Ar&&(y+="rotate("+u+zr),h!==Ar&&(y+="rotateY("+h+zr),l!==Ar&&(y+="rotateX("+l+zr),f===Ar&&c===Ar||(y+="skew("+f+", "+c+zr),1===d&&1===p||(y+="scale("+d+", "+p+zr),g.style[mr]=y||"translate(0, 0)"},Er=function _renderSVGTransforms(t,e){var r,i,n,a,s,o=e||this,u=o.xPercent,h=o.yPercent,l=o.x,f=o.y,c=o.rotation,d=o.skewX,p=o.skewY,_=o.scaleX,m=o.scaleY,g=o.target,v=o.xOrigin,y=o.yOrigin,T=o.xOffset,b=o.yOffset,w=o.forceCSS,x=parseFloat(l),k=parseFloat(f);c=parseFloat(c),d=parseFloat(d),(p=parseFloat(p))&&(d+=p=parseFloat(p),c+=p),c||d?(c*=lr,d*=lr,r=Math.cos(c)*_,i=Math.sin(c)*_,n=Math.sin(c-d)*-m,a=Math.cos(c-d)*m,d&&(p*=lr,s=Math.tan(d-p),n*=s=Math.sqrt(1+s*s),a*=s,p&&(s=Math.tan(p),r*=s=Math.sqrt(1+s*s),i*=s)),r=ka(r),i=ka(i),n=ka(n),a=ka(a)):(r=_,a=m,i=n=0),(x&&!~(l+"").indexOf("px")||k&&!~(f+"").indexOf("px"))&&(x=ce(g,"x",l,"px"),k=ce(g,"y",f,"px")),(v||y||T||b)&&(x=ka(x+v-(v*r+y*n)+T),k=ka(k+y-(v*i+y*a)+b)),(u||h)&&(s=g.getBBox(),x=ka(x+u/100*s.width),k=ka(k+h/100*s.height)),s="matrix("+r+","+i+","+n+","+a+","+x+","+k+")",g.setAttribute("transform",s),w&&(g.style[mr]=s)};ja("padding,margin,Width,Radius",function(e,r){var t="Right",i="Bottom",n="Left",o=(r<3?["Top",t,i,n]:["Top"+n,"Top"+t,i+t,i+n]).map(function(t){return r<2?e+t:"border"+t+e});kr[1<r?"border"+e:e]=function(e,t,r,i,n){var a,s;if(arguments.length<4)return a=o.map(function(t){return wr(e,t,r)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(i+"").split(" "),s={},o.forEach(function(t,e){return s[t]=a[e]=a[e]||a[(e-1)/2|0]}),e.init(t,s,n)}});var Fr,Ir,Lr,Br={name:"css",register:Vd,targetTest:function targetTest(t){return t.style&&t.nodeType},init:function init(t,e,i,n,a){var s,o,u,h,l,f,c,d,p,_,m,g,v,y,T,b,w,x=this._props,k=t.style,O=i.vars.startAt;for(c in Ne||Vd(),this.styles=this.styles||Pd(t),b=this.styles.props,this.tween=i,e)if("autoRound"!==c&&(o=e[c],!mt[c]||!cc(c,e,i,n,t,a)))if(l=typeof o,f=kr[c],"function"===l&&(l=typeof(o=o.call(i,n,t,a))),"string"===l&&~o.indexOf("random(")&&(o=rb(o)),f)f(this,t,c,o,i)&&(T=1);else if("--"===c.substr(0,2))s=(getComputedStyle(t).getPropertyValue(c)+"").trim(),o+="",Et.lastIndex=0,Et.test(s)||(d=_a(s),(p=_a(o))?d!==p&&(s=ce(t,c,s,p)+p):d&&(o+=d)),this.add(k,"setProperty",s,o,n,a,0,0,c),x.push(c),b.push(c,0,k[c]);else if("undefined"!==l){if(O&&c in O?(s="function"==typeof O[c]?O[c].call(i,n,t,a):O[c],r(s)&&~s.indexOf("random(")&&(s=rb(s)),_a(s+"")||"auto"===s||(s+=Y.units[c]||_a(wr(t,c))||""),"="===(s+"").charAt(1)&&(s=wr(t,c))):s=wr(t,c),h=parseFloat(s),(_="string"===l&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),u=parseFloat(o),c in _r&&("autoAlpha"===c&&(1===h&&"hidden"===wr(t,"visibility")&&u&&(h=0),b.push("visibility",0,k.visibility),_d(this,k,"visibility",h?"inherit":"hidden",u?"inherit":"hidden",!u)),"scale"!==c&&"transform"!==c&&~(c=_r[c]).indexOf(",")&&(c=c.split(",")[0])),m=c in ur){if(this.styles.save(c),w=o,"string"===l&&"var(--"===o.substring(0,6)){if("calc("===(o=Sd(t,o.substring(4,o.indexOf(")")))).substring(0,5)){var M=t.style.perspective;t.style.perspective=o,o=Sd(t,"perspective"),M?t.style.perspective=M:$d(t,"perspective")}u=parseFloat(o)}if(g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new we(this._pt,k,mr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===c)this._pt=new we(this._pt,v,"scaleY",v.scaleY,(_?ma(v.scaleY,_+u):u)-v.scaleY||0,xd),this._pt.u=0,x.push("scaleY",c),c+="X";else{if("transformOrigin"===c){b.push(gr,0,k[gr]),o=ge(o),v.svg?oe(t,o,0,y,0,this):((p=parseFloat(o.split(" ")[2])||0)!==v.zOrigin&&_d(this,v,"zOrigin",v.zOrigin,p),_d(this,k,c,Pr(s),Pr(o)));continue}if("svgOrigin"===c){oe(t,o,1,y,0,this);continue}if(c in Mr){ye(this,v,c,h,_?ma(h,_+o):o);continue}if("smoothOrigin"===c){_d(this,v,"smooth",v.smooth,o);continue}if("force3D"===c){v[c]=o;continue}if("transform"===c){Ae(this,o,t);continue}}}else c in k||(c=yr(c)||c);if(m||(u||0===u)&&(h||0===h)&&!pr.test(o)&&c in k)u=u||0,(d=(s+"").substr((h+"").length))!==(p=_a(o)||(c in Y.units?Y.units[c]:d))&&(h=ce(t,c,s,p)),this._pt=new we(this._pt,m?v:k,c,h,(_?ma(h,_+u):u)-h,m||"px"!==p&&"zIndex"!==c||!1===e.autoRound?xd:Bd),this._pt.u=p||0,m&&w!==o?(this._pt.b=s,this._pt.e=w,this._pt.r=Ad):d!==p&&"%"!==p&&(this._pt.b=s,this._pt.r=zd);else if(c in k)ee.call(this,t,c,s,_?_+o:o);else if(c in t)this.add(t,c,s||t[c],_?_+o:o,n,a);else if("parseTransform"!==c){S(c,o);continue}m||(c in k?b.push(c,0,k[c]):"function"==typeof t[c]?b.push(c,2,t[c]()):b.push(c,1,s||t[c])),x.push(c)}T&&be(this)},render:function render(t,e){if(e.tween._time||!je())for(var r=e._pt;r;)r.r(t,r.d),r=r._next;else e.styles.revert()},get:wr,aliases:_r,getSetter:function getSetter(t,e,r){var i=_r[e];return i&&i.indexOf(",")<0&&(e=i),e in ur&&e!==gr&&(t._gsap.x||wr(t,"x"))?r&&Ye===r?"scale"===e?Hd:Gd:(Ye=r||{})&&("scale"===e?Id:Jd):t.style&&!u(t.style[e])?Ed:~e.indexOf("-")?Fd:ue(t,e)},core:{_removeProperty:$d,_getMatrix:ne}};Fe.utils.checkPrefix=yr,Fe.core.getStyleSaver=Pd,Lr=ja((Fr="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Ir="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(t){ur[t]=1}),ja(Ir,function(t){Y.units[t]="deg",Mr[t]=1}),_r[Lr[13]]=Fr+","+Ir,ja("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(t){var e=t.split(":");_r[e[1]]=Lr[e[0]]}),ja("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Y.units[t]="px"}),Fe.registerPlugin(Br);var Nr=Fe.registerPlugin(Br)||Fe,Ur=Nr.core.Tween;e.Back=rr,e.Bounce=nr,e.CSSPlugin=Br,e.Circ=or,e.Cubic=Qe,e.Elastic=er,e.Expo=sr,e.Linear=$e,e.Power0=Xe,e.Power1=qe,e.Power2=Ge,e.Power3=Ze,e.Power4=We,e.Quad=He,e.Quart=Je,e.Quint=Ke,e.Sine=ar,e.SteppedEase=ir,e.Strong=tr,e.TimelineLite=Gt,e.TimelineMax=Gt,e.TweenLite=te,e.TweenMax=Ur,e.default=Nr,e.gsap=Nr;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});+diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/card.json b/skills/bgm-to-video/templates/split-anchor-word-slot/card.jsonnew file mode 100644index 0000000000..900a3fb50f--- /dev/null+++ b/skills/bgm-to-video/templates/split-anchor-word-slot/card.json@@ -0,0 +1,178 @@+{+ "id": "split-anchor-word-slot",+ "name": "Split-Anchor Word-Slot · beat-synced kinetic typography",+ "one_line": "ONE base lockup — a HELD left anchor column of R rows (fixed words) beside a torn-paper word-SLOT box on the right — driven by five interchangeable beat-synced operators: anchor lock-in, slot word-group cycle (in/out, per-line color), full-scene background flip, global per-beat jitter, and a box-zoom exit wipe. R (rows) and the number of background flips are data, so 2/3/4 rows and 0/1/2 flips all 'just work'.",+ "status": "promoted",+ "created": "2026-06-17",+ "base_template": {+ "primitive": "anchor_slot_lockup",+ "notes": "A two-column kinetic-typography lockup. LEFT = an 'anchor' column of R held words (one per row, fixed for the whole group). RIGHT = a torn-paper 'slot' box (a colored card with a faint offset second sheet) holding up to R stacked text lines. R is derived from the `anchors` comma-list length; the box pre-builds maxRows line nodes from the program, so 2/3/4 rows follow the data with no code edit. A slot 'word-group' = the lines the box currently shows; cycling = swapping that group in/out. Asset-free: text + colored boxes only. All five operators below act on this one lockup — same DOM, different rhythmic scheduling."+ },+ "operations": {+ "lockup": {+ "intent": "establish the held stage: pop the R left anchor words in (one per beat) and reveal the empty slot box",+ "anchors": "enter[] = onsets (one per anchor row, distributed); box = beat the empty box appears",+ "what_moves": "per-anchor pop-in (autoAlpha + y + scale); box scale-in. Anchors then hold for the whole group.",+ "source_span_sec": [0.125, 0.5],+ "source_frames_24": [3, 12]+ },+ "slot": {+ "intent": "one word-GROUP cycle inside the box — lines slide in one-per-beat, hold, then slide out (omit exit to hold)",+ "anchors": "enter[] = onsets (per line); exit[] = onsets (per line, or all equal for a one-shot clear)",+ "what_moves": "per-line textContent set + slide/fade in, slide/fade out. `colors[]` tints individual lines (ACCENTS index) for the multi-color look; else the theme's boxInk.",+ "repeatable": true,+ "source_groups": [+ {+ "words": ["I bring", "ideas", "to life"],+ "span_sec": [1.0, 1.833],+ "frames_24": [24, 44]+ },+ {+ "words": ["you", "wanna", "see?"],+ "span_sec": [2.042, 2.75],+ "frames_24": [49, 66],+ "colors": "blue/green/green"+ }+ ]+ },+ "bg": {+ "intent": "flip the whole scene to another theme on a beat (stage bg + anchor ink + box fill + slot ink invert as one 0ms hit)",+ "anchors": "at = beat",+ "what_moves": "backgroundColor of root + box + sheet; color of anchors + slot lines. Schedule 0/1/2 of these = background changes none / once / twice.",+ "source_span_sec": [3.458, 3.458],+ "source_frames_24": [83, 83],+ "source_flip": "blue scene (theme 0) → green scene (theme 1)"+ },+ "shake": {+ "intent": "global per-beat jitter of the whole lockup (x/y translate + rotation), one jolt per beat — rides a dense onset run / roll",+ "anchors": "beats[] = onsets (the source's 14-hit hihat fill)",+ "what_moves": "transform of #lockup (anchors + box together); each jolt is a deterministic index-hashed offset that eases back to 0 by `settle`. Runs UNDER slot/bg (overlapping ops are fine — absolute-second scheduling).",+ "source_span_sec": [2.16, 4.18],+ "source_frames_24": [52, 100]+ },+ "expand": {+ "intent": "the EXIT transition — fade the text out, reset the lockup transform, then ZOOM the slot box until it fills the frame (a color wipe into the next group)",+ "anchors": "fade = beat text starts fading; at = box zoom start; to = box fills the frame",+ "what_moves": "anchors + slot lines fade to 0; clip-path/rotation cleared; #slotbox scales to 30× (covers 1920×1080) ending opaque full-frame. Lands the black-out just before the next downbeat kick.",+ "source_span_sec": [4.3, 4.792],+ "source_frames_24": [100, 115]+ }+ },+ "match": {+ "structural_type": "per_onset_sequential",+ "requires": {+ "energy_level": ">=MEDIUM",+ "has_steady_grid": true,+ "onset_gap_bars": "<=1.0"+ },+ "mood_fit": ["hype", "playful", "bold", "elegant"],+ "span_bars": [2, 4],+ "exit_trigger": ["surge", "downbeat", "hard_stop"],+ "notes": "Reach for this when the section is short, has a held idea (a brand / name to anchor on the left) and a stream of discrete onsets to pop separate words on, PLUS at least one dense run (roll / hihat fill) to ride a shake on and a strong downbeat to wipe out into. The five ops map onto: lock the name → cycle a couple of word-groups per beat → invert the palette on a key hit → jitter through the busy bit → zoom-wipe on the downbeat. Variable R (rows) and 0/1/2 bg flips are data, so it fits 2/3/4-line lockups and either a single or double color shift."+ },+ "examples": [+ {+ "sample": "bgm-golden-sample-reverse",+ "group": "group_6",+ "bpm": 92,+ "downbeats_sec": [2.322, 4.923],+ "roll_sec": [2.16, 4.18],+ "roll_kind": "sustained-fill",+ "span_sec": [0.0, 5.41],+ "rows": 3,+ "bg_flips": 1,+ "program": "lockup(0.125-0.5) → slot:'I bring/ideas/to life'(1.0-1.833) → slot:'you/wanna/see?'(2.042-2.75) → shake(2.16-4.18) → bg→green(3.458) → expand(4.3-4.792)"+ }+ ],+ "params": {+ "bgColor": {+ "type": "color",+ "maps_to": "stage.background (theme 0 bg)",+ "default": "#0a84ff"+ },+ "anchors": {+ "type": "string",+ "maps_to": "lockup.left_column",+ "default": "studio,contre,courant",+ "notes": "comma list — ONE word per row; its length sets R (rows). 2/3/4 words = 2/3/4 rows."+ },+ "theme": {+ "type": "number",+ "maps_to": "scene.base_theme",+ "default": 0,+ "notes": "THEMES index for the opening scene"+ },+ "showText": {+ "type": "boolean",+ "maps_to": "text.visible",+ "default": true,+ "notes": "false = blocks/box only, no glyphs"+ },+ "program": {+ "type": "string",+ "maps_to": "engine.program",+ "default": "",+ "notes": "JSON array of operator steps (see program_format). Empty = built-in group_6 score. THIS is the compose-by-data surface: reorder/drop/repeat steps, swap beats, add bg flips — no code edit."+ }+ },+ "engine": {+ "model": "operators + program-as-data (identical to poster-tile-mosaic). The 5 operators (§6 of index.html) are pure, parameterized functions that write GSAP tweens at ABSOLUTE audio seconds onto ONE paused timeline — so they are order-independent and may overlap (shake runs under slot/bg). A PROGRAM (data) lists which ops run on which beats; §7 dispatches OPS[step.op](step). Compose by editing DATA (the PROGRAM array, the `program` variable, or program.json) — never the operator code.",+ "operators": ["lockup", "slot", "bg", "shake", "expand"],+ "dispatch": "OPS[step.op](step) for each step in PROGRAM",+ "extend": "add an operator = add a function + an OPS key; the program can then call it by name. Add themes to THEMES / accent colors to ACCENTS."+ },+ "program_format": {+ "_": "A program is a JSON array of steps. Each step = { op, ...fields }. Beats are absolute audio seconds. theme = index into THEMES[]; colors[] = indices into ACCENTS[]. Rows (R) come from the `anchors` variable; the slot box auto-sizes to the widest word-group.",+ "lockup": {+ "enter": "number[] — one onset per anchor row (distributed if count != R); per-word pop-in",+ "box": "number? — beat the empty slot box appears (default = last enter)",+ "theme": "number? — THEMES index for the opening scene (default = base theme)"+ },+ "slot": {+ "words": "string[] — the lines this cycle shows in the box (<= maxRows)",+ "enter": "number[] — onset per line; slide/fade in",+ "exit": "number[]? — onset per line to slide out; omit to HOLD the group. Equal values = a one-shot whole-group clear.",+ "colors": "number[]? — ACCENTS index per line (the multi-color look); omit = theme boxInk",+ "theme": "number? — THEMES index whose boxInk colors the lines (default = base theme)",+ "dir": "string? — 'up' (default) | 'down' slide direction on enter"+ },+ "bg": {+ "at": "number — beat the whole scene flips (0ms invert)",+ "theme": "number — THEMES index to flip to. Add a 2nd `bg` step to change twice."+ },+ "shake": {+ "beats": "number[] — one jolt per beat (ride a roll / dense onset run)",+ "amp": "number? — translate amplitude px (default 14)",+ "rot": "number? — rotation amplitude deg (default 1.5)",+ "settle": "number? — seconds each jolt eases back to rest (default 0.12)"+ },+ "expand": {+ "fade": "number — beat the text starts fading out",+ "at": "number — beat the box-zoom starts",+ "to": "number? — beat the box fills the frame (default at + 0.15)",+ "theme": "number? — recolor the box at zoom start (default = keep current)"+ }+ },+ "reference_impl": "index.html",+ "program_data": "program.json (the default group_6 score as standalone, agent-editable data)",+ "uses_primitives": [+ "held_lockup",+ "anchor_pop_in",+ "word_slot_cycle",+ "per_line_color",+ "scene_palette_flip",+ "beat_jitter_shake",+ "box_zoom_wipe",+ "freeze_hold"+ ],+ "transition_out": {+ "default": "fast_cut",+ "observed": ["box_zoom_wipe", "anticipation_zoom_to_black_into_downbeat"]+ },+ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_6"],+ "provenance": {+ "video": "group_6.mp4",+ "audiomap": "audiomap.json (scripts/analyze-beatgrid.py — ~92 BPM, downbeats 2.322/4.923, sustained hihat fill 2.16-4.18s)",+ "video_read": "group_6.gemini-analysis.md (Gemini 3 Pro 24fps) cross-checked by frame-by-frame contact sheets. Both agreed: NOT an image grid — pure kinetic typography. Left held 'studio/contre/courant'; right box cycled 'I bring/ideas/to life' then colored 'you/wanna/see?'; blue→green hard flip at f83; global shake on the hihat fill; box zoom-wipe to black at f112-114 into the f118 downbeat. (User's original read was correct except: it is the RIGHT slot box, not a 'left box', that zooms; and the text is masked/faded out, not a soft dissolve.)"+ }+}diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/index.html b/skills/bgm-to-video/templates/split-anchor-word-slot/index.htmlnew file mode 100644index 0000000000..b1d48afe3f--- /dev/null+++ b/skills/bgm-to-video/templates/split-anchor-word-slot/index.html@@ -0,0 +1,594 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Stage background (theme 0)", "default":"#0a84ff"},+ {"id":"anchors", "type":"string", "label":"Left anchor column (comma list = rows)","default":"studio,contre,courant"},+ {"id":"theme", "type":"number", "label":"Base theme index", "default":0},+ {"id":"showText","type":"boolean", "label":"Show text (false = blocks only)", "default":true},+ {"id":"program", "type":"string", "label":"Program JSON (empty = built-in group_6 score)", "default":""}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Split-Anchor Word-Slot · beat-synced kinetic typography — group_6 reference impl</title>+ <script src="./assets/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ background: #0a84ff;+ overflow: hidden;+ font-family: "Helvetica Neue", "Arial Black", Arial, sans-serif;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: #0a84ff;+ }+ /* #frame = the CENTERING wrapper. CSS positions it slightly ABOVE center (the source+ sits high-center); GSAP never touches #frame, so the CSS transform here is safe. */+ #frame {+ position: absolute;+ left: 50%;+ top: 43%;+ transform: translate(-50%, -50%);+ }+ /* #lockup = the thing GSAP jitters/tilts (shake) — NO CSS transform, so GSAP owns+ x/y/rotation cleanly. Holds the base tilt the whole brutalist lockup leans at. */+ #lockup {+ position: relative;+ display: flex;+ align-items: center;+ gap: 0;+ will-change: transform;+ }+ /* anchors LEFT-aligned (ragged right) so the slot box clears the shorter words and+ never hides the held text. */+ #anchors {+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ }+ .anchor {+ font-weight: 900;+ line-height: 0.96;+ letter-spacing: -0.045em;+ text-transform: lowercase;+ white-space: nowrap;+ will-change: transform, opacity;+ }+ /* the inner .t span carries the faux-EXTENDED width (scaleX) for the ANCHORS — they+ have no background, so nothing overflows. GSAP animates the outer element; the+ span's scaleX is never touched by GSAP, so the two never fight (asset-free+ Druk-Wide / Extended-Black look from a system font). */+ .t {+ display: inline-block;+ transform: scaleX(1.12);+ transform-origin: left center;+ }+ /* slot TAPES carry their extend via the LINE's GSAP scaleX instead, so the tape+ BACKGROUND stretches WITH the text and the word never overflows the strip. */+ .sline .t {+ transform: scaleX(1);+ }+ /* #slotbox = a TRANSPARENT container sitting just RIGHT of the anchors (small positive+ margin → it never covers the held words). Holds the 3 stacked cards + the word tapes. */+ /* small NEGATIVE margin = the source's tight collage TUCK: the tape kisses / lightly+ presses over the tail of the longest anchor without hiding the glyph (the tape's own+ text starts after its left padding, so words never collide). Tune this for press amount. */+ #slotbox {+ position: relative;+ margin-left: -0.12em;+ will-change: transform, opacity;+ backface-visibility: hidden;+ transform-origin: 50% 42%;+ }+ /* THREE stacked, offset, torn CARDS = the brutalist collage. Transparent during word+ phases; `bg` turns them black for the empty box + the expand zoom (they scale as one+ with #slotbox, staying staggered). Siblings — NOT parent-clipped — so the offsets show. */+ .card {+ position: absolute;+ inset: 0;+ background: transparent;+ will-change: transform;+ }+ #card1 {+ z-index: -1;+ clip-path: polygon(0% 4%, 97% 0%, 100% 92%, 3% 100%);+ }+ #card2 {+ z-index: -2;+ transform: translate(22px, 17px) rotate(-2.8deg);+ clip-path: polygon(0% 2%, 100% 0%, 98% 100%, 2% 96%);+ }+ #card3 {+ z-index: -3;+ transform: translate(-15px, 10px) rotate(2.1deg);+ clip-path: polygon(0% 6%, 96% 3%, 100% 95%, 4% 100%);+ }+ .lines {+ position: relative;+ z-index: 1;+ display: grid;+ }+ .sgroup {+ grid-area: 1 / 1;+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ gap: 3px;+ }+ /* each .sline is its OWN torn TAPE — sized to its word, its GSAP scaleX stretches+ bg+text TOGETHER (no overflow), its own micro-rotation + stair offset + shadow. */+ .sline {+ font-weight: 900;+ line-height: 0.96;+ letter-spacing: -0.045em;+ white-space: nowrap;+ text-align: left;+ background: #f4f4f4;+ padding: 0.03em 0.22em 0.08em 0.16em;+ clip-path: polygon(0% 6%, 98% 0%, 100% 90%, 3% 100%);+ box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.16);+ transform-origin: 0% 50%; /* GSAP scaleX stretches RIGHTward only — never back over the anchors */+ will-change: transform, opacity;+ }+ </style>+ </head>+ <body>+ <!-- duration 5.41s = the full group_6 span (lockup → 2 slot cycles → bg flip + shake → expand wipe) -->+ <div+ data-hf-id="hf-g6rt"+ id="root"+ data-composition-id="group-six-recreate"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="5.41"+ data-root="true"+ >+ <div data-hf-id="hf-g6frame" id="frame">+ <div data-hf-id="hf-g6lock" id="lockup">+ <div data-hf-id="hf-g6anch" id="anchors"></div>+ <div data-hf-id="hf-g6box" id="slotbox">+ <div data-hf-id="hf-g6c1" id="card1" class="card"></div>+ <div data-hf-id="hf-g6c2" id="card2" class="card"></div>+ <div data-hf-id="hf-g6c3" id="card3" class="card"></div>+ <div class="lines" id="lines"></div>+ </div>+ </div>+ </div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════════+ // SPLIT-ANCHOR WORD-SLOT · ONE base lockup, FIVE beat-synced operators+ // ────────────────────────────────────────────────────────────────────+ // BASE : a kinetic-typography LOCKUP — a HELD left "anchor" column of R rows+ // (fixed words) beside a torn-paper word-SLOT box on the right. The+ // whole lockup LEANS at a base tilt (brutalist/acid attitude). R is+ // data (the `anchors` comma-list). Asset-free: text + colored boxes.+ // Reversed from group_6 + tuned against a Gemini side-by-side pass.+ //+ // OP lockup : pop the R anchor words in (punchy scale, faux motion-blur squash)+ // + reveal the empty slot box. The held stage. (source f3–f12)+ // OP slot : one word-GROUP cycle — lines WHIP in from the right (expo.out ++ // scaleX stretch = fake motion blur), hold, then arc out down-left.+ // own color per line. repeatable. (source f24–f44, f49–f66)+ // OP bg : HARD-CUT flip the whole scene to another theme on a beat (bg ++ // anchor ink + box fill + slot ink invert, 0ms). 0/1/2× = changes+ // none / once / twice. (source f83 blue→green)+ // OP shake : global per-beat JOLT of the lockup (x/y + rotation around the base+ // tilt) with a back-ease recoil — one punch per beat. (source f52–f100)+ // OP expand : EXIT wipe — fade text, then the slot box ZOOMS (expo.in, blur) from+ // its own centre until it swallows the frame. (source f106–f117)+ //+ // ARCHITECTURE: every operator writes GSAP tweens at ABSOLUTE audio seconds onto+ // ONE paused timeline → order-independent, may overlap (shake runs under slot/bg).+ // A data PROGRAM lists which ops run on which beats; §7 dispatches it. Compose by+ // editing DATA (the PROGRAM / `program` var / program.json), never operator code.+ // ════════════════════════════════════════════════════════════════════++ // ── 1. Content variables ──+ var defaults = {+ bgColor: "#0a84ff",+ anchors: "studio,contre,courant",+ theme: 0,+ showText: true,+ program: "",+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );+ var ANCHORS = String(vars.anchors)+ .split(",")+ .map(function (s) {+ return s.trim();+ })+ .filter(function (s) {+ return s.length;+ });+ if (!ANCHORS.length) ANCHORS = ["studio", "contre", "courant"];+ var BASE_THEME = Math.max(0, parseInt(vars.theme, 10) || 0);+ var SHOW_TEXT = vars.showText !== false && vars.showText !== "false";++ // base attitude: the whole lockup leans; the box leans extra the other way.+ var BASE_TILT = -3.5; // deg, the lockup's resting lean+ var BOX_TILT = 2.6; // deg, the slot box's extra lean vs the anchors++ // ── 2. THEME LIBRARY — brighter electric/fluoro to match the source ──+ var THEMES = [+ { bg: "#0a84ff", ink: "#ffffff", box: "#f4f4f4", boxInk: "#0a84ff" }, // 0 electric blue+ { bg: "#5cf03a", ink: "#0a0a0a", box: "#0a0a0a", boxInk: "#5cf03a" }, // 1 lime/acid green (invert)+ { bg: "#0a0a0a", ink: "#ffffff", box: "#ffffff", boxInk: "#0a0a0a" }, // 2 ink+ { bg: "#ffe400", ink: "#0a0a0a", box: "#0a0a0a", boxInk: "#ffe400" }, // 3 amber+ ];+ var ACCENTS = ["#0a84ff", "#39e024", "#ff3bd0", "#ffe400", "#ffffff", "#0a0a0a"];+ function theme(i) {+ return THEMES[((i % THEMES.length) + THEMES.length) % THEMES.length];+ }+ function accent(i) {+ return ACCENTS[((i % ACCENTS.length) + ACCENTS.length) % ACCENTS.length];+ }++ // ── 3. THE PROGRAM (data) — see program.json / card.json → program_format ──+ // group_6: ~92 BPM · downbeats 2.322(f56)/4.923(f118) · hihat fill 2.16–4.18s.+ var DEFAULT_PROGRAM = [+ { op: "lockup", enter: [0.125, 0.333, 0.5], box: 0.292, theme: 0 },+ {+ op: "slot",+ words: ["I bring", "ideas", "to life"],+ enter: [1.0, 1.167, 1.292],+ exit: [1.667, 1.75, 1.833],+ },+ {+ op: "slot",+ words: ["you", "wanna", "see?"],+ enter: [2.042, 2.208, 2.375],+ exit: [2.75, 2.75, 2.75],+ colors: [0, 1, 1],+ },+ {+ op: "shake",+ amp: 26,+ rot: 2.4,+ settle: 0.16,+ beats: [+ 2.16, 2.3, 2.44, 2.62, 2.76, 2.88, 3.06, 3.27, 3.41, 3.53, 3.71, 3.85, 4.09, 4.18,+ ],+ },+ { op: "bg", at: 3.458, theme: 1 },+ { op: "expand", fade: 4.18, at: 4.4, to: 4.82 },+ ];+ var DUR = 5.41;++ var PROGRAM = DEFAULT_PROGRAM;+ if (vars.program && String(vars.program).trim()) {+ try {+ var parsed = typeof vars.program === "string" ? JSON.parse(vars.program) : vars.program;+ if (parsed && parsed.length) PROGRAM = parsed;+ } catch (e) {+ PROGRAM = DEFAULT_PROGRAM;+ }+ }++ // ── 4. Build the LOCKUP ──────────────────────────────────────────────────+ var R = ANCHORS.length;+ var slotSteps = PROGRAM.filter(function (s) {+ return s.op === "slot";+ });+ var maxSlot = slotSteps.reduce(function (m, s) {+ return Math.max(m, (s.words || []).length);+ }, 0);+ var maxRows = Math.max(R, maxSlot, 1);+ var fontPx = maxRows <= 3 ? 116 : maxRows === 4 ? 92 : 74;+ var rowH = Math.round(fontPx * 0.99);++ var root = document.getElementById("root");+ var lockupEl = document.getElementById("lockup");+ var anchorsBox = document.getElementById("anchors");+ var slotbox = document.getElementById("slotbox");+ var card1 = document.getElementById("card1");+ var card2 = document.getElementById("card2");+ var card3 = document.getElementById("card3");+ var cards = [card1, card2, card3];+ var linesBox = document.getElementById("lines");++ var TH0 = theme(BASE_THEME);+ document.documentElement.style.background = vars.bgColor || TH0.bg;+ document.body.style.background = vars.bgColor || TH0.bg;+ root.style.background = vars.bgColor || TH0.bg;++ function mkWord(text, px, h) {+ // word node with an inner faux-extended span+ var d = document.createElement("div");+ d.style.fontSize = px + "px";+ d.style.height = h + "px";+ var sp = document.createElement("span");+ sp.className = "t";+ sp.textContent = SHOW_TEXT ? text : "";+ d.appendChild(sp);+ return { row: d, span: sp };+ }++ // left anchor column (held words). The faux-extend scaleX renders the glyphs WIDER+ // than their layout box (origin-left → overflow to the right); pin each row's width+ // to the SCALED width so the column — and the slot box to its right — accounts for+ // it and never overlaps the held words.+ var anchorEls = [];+ for (var a = 0; a < R; a++) {+ var w = mkWord(ANCHORS[a], fontPx, rowH);+ w.row.className = "anchor";+ w.span.style.color = TH0.ink;+ anchorsBox.appendChild(w.row);+ w.row.style.width = Math.ceil(w.span.getBoundingClientRect().width + 2) + "px";+ anchorEls.push(w.row);+ }++ // the slot box is a TRANSPARENT backing during word phases (so only the per-line+ // tapes show on the bg — no dead space). `bg` turns it into a solid torn card for+ // the empty state + the expand zoom. ONE .sgroup per slot step, stacked in one grid+ // cell. Each .sline is its own TAPE (own width/rotation/offset). No runtime text edit.+ slotbox.style.background = "transparent";+ cards.forEach(function (c) {+ c.style.background = "transparent";+ });+ var groups = []; // [{ lines:[rowEls], spans:[spanEls] }]+ slotSteps.forEach(function (step) {+ var g = document.createElement("div");+ g.className = "sgroup";+ var lines = [],+ spans = [];+ (step.words || []).forEach(function (word, li) {+ var lw = mkWord(word, fontPx, rowH);+ lw.row.className = "sline";+ lw.row.style.background = TH0.box; // each line = its own tape+ lw.row.style.marginLeft = [0, 16, 8, 24][li % 4] + "px"; // rightward stair offset (collage)+ lw.span.style.color = TH0.boxInk;+ g.appendChild(lw.row);+ lines.push(lw.row);+ spans.push(lw.span);+ });+ linesBox.appendChild(g);+ groups.push({ lines: lines, spans: spans });+ step.__g = groups.length - 1; // remember which group this step drives+ });+ var allSlotLines = groups.reduce(function (acc, g) {+ return acc.concat(g.lines);+ }, []);+ var allSlotSpans = groups.reduce(function (acc, g) {+ return acc.concat(g.spans);+ }, []);++ // ── 5. Timeline + helpers ────────────────────────────────────────────────+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });++ function beatAt(i, n, beats) {+ if (!beats || !beats.length) return 0;+ return beats[Math.min(beats.length - 1, Math.floor((i * beats.length) / n))];+ }+ function jolt(k) {+ // deterministic per-beat shake offset (no Math.random)+ return { x: ((k * 37) % 11) - 5, y: ((k * 53) % 9) - 4, r: ((k * 29) % 7) - 3 };+ }+ function lineRot(i) {+ return [-2.0, 1.6, -1.0, 2.2][i % 4];+ } // per-line lean++ // rest pose: lockup leans at BASE_TILT, box leans extra, all content hidden.+ gsap.set(lockupEl, { rotation: BASE_TILT });+ gsap.set(slotbox, { rotation: BOX_TILT });+ gsap.set(anchorEls, { autoAlpha: 0, y: 18, scale: 0.9, scaleX: 0.9 });+ gsap.set(slotbox, { autoAlpha: 0, scale: 0.86 });+ allSlotLines.forEach(function (el, i) {+ gsap.set(el, { autoAlpha: 0, rotation: lineRot(i) });+ });++ // ── 6. THE FIVE OPERATORS ────────────────────────────────────────────────++ // lockup — punchy anchor pop-in (scale + faux-blur squash) + box reveal.+ function lockup(P) {+ var th = theme(P.theme != null ? P.theme : BASE_THEME);+ tl.set(lockupEl, { rotation: BASE_TILT }, 0);+ anchorEls.forEach(function (el, i) {+ tl.set(el.firstChild, { color: th.ink }, 0);+ tl.fromTo(+ el,+ { autoAlpha: 0, y: 26, scale: 0.84, scaleX: 0.7 },+ {+ autoAlpha: 1,+ y: 0,+ scale: 1,+ scaleX: 1,+ duration: 0.2,+ ease: "expo.out",+ overwrite: "auto",+ immediateRender: false,+ },+ beatAt(i, R, P.enter),+ );+ });+ var boxAt = P.box != null ? P.box : beatAt(R - 1, R, P.enter);+ tl.fromTo(+ slotbox,+ { autoAlpha: 0, scale: 0.6, rotation: BOX_TILT - 6 },+ {+ autoAlpha: 1,+ scale: 1,+ rotation: BOX_TILT,+ duration: 0.22,+ ease: "back.out(2.2)",+ overwrite: "auto",+ immediateRender: false,+ },+ boxAt,+ );+ }++ // slot — word-GROUP cycle: WHIP in from the right (expo.out + scaleX stretch),+ // hold, arc out down-left. each line its own colour + lean.+ function slot(P) {+ var g = groups[P.__g != null ? P.__g : 0];+ if (!g) return;+ var th = theme(P.theme != null ? P.theme : BASE_THEME);+ var n = g.lines.length;+ g.lines.forEach(function (el, i) {+ var col = P.colors && P.colors[i] != null ? accent(P.colors[i]) : th.boxInk;+ var tIn = beatAt(i, n, P.enter);+ tl.set(g.spans[i], { color: col }, tIn);+ tl.fromTo(+ el,+ { autoAlpha: 0, x: 150, scaleX: 1.7, rotation: lineRot(i) },+ {+ autoAlpha: 1,+ x: 0,+ scaleX: 1.12,+ rotation: lineRot(i),+ duration: 0.24,+ ease: "expo.out",+ overwrite: "auto",+ immediateRender: false,+ }, // rest scaleX 1.12 = faux-extend (bg stretches with text)+ tIn,+ );+ });+ if (!P.exit || !P.exit.length) return;+ g.lines.forEach(function (el, i) {+ tl.to(+ el,+ {+ autoAlpha: 0,+ x: -120,+ y: 46,+ scaleX: 1.4,+ duration: 0.16,+ ease: "power3.in",+ overwrite: "auto",+ },+ beatAt(i, n, P.exit),+ );+ });+ }++ // bg — hard-cut scene flip (0ms invert). 0/1/2 of these = bg changes 0/1/2×.+ function bg(P) {+ var th = theme(P.theme != null ? P.theme : 0);+ tl.set(root, { backgroundColor: th.bg }, P.at);+ tl.set(+ anchorEls.map(function (e) {+ return e.firstChild;+ }),+ { color: th.ink },+ P.at,+ );+ tl.set(cards, { backgroundColor: th.box }, P.at); // 3 stacked torn cards = the EMPTY box + zoom target+ tl.set(allSlotLines, { backgroundColor: th.box }, P.at); // recolor any visible tapes+ tl.set(allSlotSpans, { color: th.boxInk }, P.at);+ }++ // shake — per-beat JOLT around the base tilt, with a back-ease recoil.+ function shake(P) {+ var amp = P.amp != null ? P.amp : 22;+ var rot = P.rot != null ? P.rot : 2.2;+ var settle = P.settle != null ? P.settle : 0.15;+ (P.beats || []).forEach(function (t, k) {+ var j = jolt(k);+ tl.fromTo(+ lockupEl,+ { x: (j.x * amp) / 5, y: (j.y * amp) / 4, rotation: BASE_TILT + (j.r * rot) / 3 },+ {+ x: 0,+ y: 0,+ rotation: BASE_TILT,+ duration: settle,+ ease: "back.out(3)",+ overwrite: "auto",+ immediateRender: false,+ },+ t,+ );+ });+ }++ // expand — EXIT wipe: fade text, then the box ZOOMS (expo.in + blur) to swallow+ // the frame. keeps the lockup lean; clip-path off so the scaled box fully covers.+ function expand(P) {+ var fadeAt = P.fade != null ? P.fade : P.at;+ tl.to(+ anchorEls,+ { autoAlpha: 0, duration: 0.16, ease: "power2.in", overwrite: "auto" },+ fadeAt,+ );+ tl.to(+ allSlotLines,+ { autoAlpha: 0, duration: 0.14, ease: "power2.in", overwrite: "auto" },+ fadeAt,+ );+ var startAt = P.at,+ endAt = P.to != null ? P.to : P.at + 0.46;+ tl.set(lockupEl, { x: 0, y: 0 }, startAt); // clear shake residual (keep the lean)+ if (P.theme != null) tl.set(cards, { backgroundColor: theme(P.theme).box }, startAt);+ var mid = Math.max(startAt + 0.04, endAt - 0.12);+ // stage A — the TORN mass grows but stays SUB-frame (≈half-screen, decelerating),+ // so the eye reads "the box is swelling" across most of the window (matches the+ // source, whose mass is only ~half-frame as late as f113). A big rest box covers+ // the frame at a low scale, so cap stage A low and let stage B do the swallow.+ tl.fromTo(+ slotbox,+ { scale: 1, filter: "blur(0px)" },+ {+ scale: 2.2,+ filter: "blur(4px)",+ duration: mid - startAt,+ ease: "power2.out",+ overwrite: "auto",+ immediateRender: false,+ },+ startAt,+ );+ // stage B — SWALLOW the frame in the last beats (accelerating), then flatten to solid.+ tl.to(+ slotbox,+ {+ scale: 34,+ filter: "blur(12px)",+ duration: endAt - mid,+ ease: "power2.in",+ overwrite: "auto",+ },+ mid,+ );+ tl.set(card1, { clipPath: "none" }, endAt - 0.03); // card1 (inset 0) flattens to a solid full-frame black-out+ }++ var OPS = { lockup: lockup, slot: slot, bg: bg, shake: shake, expand: expand };++ // ── 7. RUN THE PROGRAM ───────────────────────────────────────────────────+ PROGRAM.forEach(function (step) {+ var fn = step && OPS[step.op];+ if (fn) fn(step);+ });++ tl.to({}, { duration: 0.001 }, DUR);+ tl.seek(0);+ window.__timelines["group-six-recreate"] = tl;+ })();+ </script>+ </body>+</html>diff --git a/skills/bgm-to-video/templates/split-anchor-word-slot/program.json b/skills/bgm-to-video/templates/split-anchor-word-slot/program.jsonnew file mode 100644index 0000000000..eb35719535--- /dev/null+++ b/skills/bgm-to-video/templates/split-anchor-word-slot/program.json@@ -0,0 +1,39 @@+[+ {+ "op": "lockup",+ "enter": [0.125, 0.333, 0.5],+ "box": 0.292,+ "theme": 0+ },+ {+ "op": "slot",+ "words": ["I bring", "ideas", "to life"],+ "enter": [1.0, 1.167, 1.292],+ "exit": [1.667, 1.75, 1.833]+ },+ {+ "op": "slot",+ "words": ["you", "wanna", "see?"],+ "enter": [2.042, 2.208, 2.375],+ "exit": [2.75, 2.75, 2.75],+ "colors": [0, 1, 1]+ },+ {+ "op": "shake",+ "amp": 26,+ "rot": 2.4,+ "settle": 0.16,+ "beats": [2.16, 2.3, 2.44, 2.62, 2.76, 2.88, 3.06, 3.27, 3.41, 3.53, 3.71, 3.85, 4.09, 4.18]+ },+ {+ "op": "bg",+ "at": 3.458,+ "theme": 1+ },+ {+ "op": "expand",+ "fade": 4.18,+ "at": 4.4,+ "to": 4.82+ }+]diff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.md b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.mdnew file mode 100644index 0000000000..d579edbe52--- /dev/null+++ b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/README.md@@ -0,0 +1,186 @@+# Typewriter Phrase / Keyword Font-Shuffle++> Reverse-engineered from **group_2** of the golden sample (the "growth through creativity." scene).+> `structural_type: per_onset_sequential` · status: **draft**++Words type in **one-per-onset** to spell a short phrase; then **one keyword** cycles+through a library of typefaces **on the beat** while the rest of the line holds dead+still. Background is pure black (the original's glitch field is an optional add-on role).++```+templates/typewriter-phrase-keyword-shuffle/+ index.html ← parameterized, asset-free reference impl (1 paused GSAP timeline)+ card.json ← the spec: match-face + build-face+ README.md ← this file+```++---++## 1. How it beat-syncs (from `group_2.audiomap.json`)++The whole scene is nailed to the audiomap. **Nothing is on a timer** — every move is a+GSAP tween/`set` at an absolute audio-second taken straight from the analysis.++Track facts: **BPM 129.2**, 4/4, `bar_dur = 4·(60/129.2) = 1.858s`. Every move rides a+**hi-hat onset** from `audiomap.events[]` (this scene is the quiet pre-drop build — low+energy, but the hats tick continuously).++### Phase A — spell-out (typewriter, accumulating)++One word pops in per onset and **stays** (it does not replace the previous word):++| visual | audiomap anchor | `audiomap` field |+| ----------------------------- | ---------------- | ---------------- |+| `growth` pops | **0.557s** hihat | `events[1].t` |+| `through` pops | **0.906s** hihat | `events[2].t` |+| `creativity` pops (base face) | **1.231s** hihat | `events[3].t` |+| orange `.` punches in | **1.440s** hihat | `events[4].t` |++→ in the impl: `LEAD_ONSETS = [0.557, 0.906]`, `KEY_ONSET = 1.231`, `PERIOD_ONSET = 1.440`.+Each is a `fromTo(autoAlpha 0→1, scale .92→1)` ~100ms reactive pop landing on the onset.++### Phase B — keyword font-shuffle (on the beat, 0ms hard swaps)++Once the phrase is set, **only `creativity`** changes — it flips typeface on each+following onset; `growth through` and the `.` stay locked in the base face:++| visual | audiomap anchor | font preset |+| --------------------------------------- | ---------------- | ----------- |+| → upright serif | **1.904s** hihat | `FONTS[1]` |+| → heavy serif | **2.392s** hihat | `FONTS[2]` |+| → italic serif | **2.624s** hihat | `FONTS[3]` |+| → back to base bold sans, then **HOLD** | **3.088s** hihat | `FONTS[0]` |++→ in the impl: `SHUFFLE = [{t,font}, …]`. Each row is a `tl.set(keyEl, fontProps(i), t)`+— **0ms**, because a font flip is a percussive hit (the contract's `content_swap` rule:+easing a hit kills it).++### Phase C — exit++Scene ends at **3.85s**, just before the **3.855s kick** (`events[11]`, the first+`MEDIUM`→`HIGH` SURGE / drop). The phrase locks; the drop is where the _next_ group's+regime change begins. `exit_trigger: surge` (snapped to downbeat `3.808`).++> **The rule of thumb:** structure (word entries, the final lock) leans on the strong+> grid; texture (the per-beat font flips) rides the syncopated hi-hats in between.++---++## 2. Why _this beat_ → _this template_ (the matching intuition)++This is the important part. When the Music Reader emits a `GroupSignature` and you (or+the Director) look at the audiomap, **these are the tells that should make you reach for+this template:**++1. **A steady grid is present.** `has_steady_grid: true` — stable BPM, ≥2 downbeats.+ Without a reliable grid you can't put one word per beat.+2. **The onset stream is CONTINUOUS, not a desert.** `onset_gap_bars: 0.28` (≪ 1 bar) —+ the hi-hats keep ticking ~every 0.3–0.5s. This is the single biggest discriminator.+ It means: _there is a hit available for every move you want to make_ — one per word on+ the way in, then one per font-flip after.+3. **Discrete, individually-placeable onsets.** Each `events[]` entry is a clean+ weak/syncopated hit → rubric step 6 → `per_onset_sequential`. Each onset can carry+ exactly one reveal.+4. **A run of onsets at the head you can map to words** (Phase A) **+ a continuing tick+ afterward** (Phase B). That two-part shape — _accumulate, then animate-in-place_ — is+ what this template is built around.+5. **It ends on a SURGE/drop** (or hard*stop). The build resolves into something bigger,+ so the scene's job is to \_fill the pre-drop bars with readable, rhythmic typography*.++Put plainly: **"steady grid + a continuous hi-hat stream + low-energy pre-drop build ++ends on a drop" is the fingerprint.** The moment you see that in the audiomap, this+template fits — you have a hit for every word and a hit for every font change.++### The contrast that makes it click++The exact same track, one group earlier (group_1), is the **opposite** signature and+wants the **opposite** template:++| | `held-message-living-field` (group_1) | `typewriter-phrase-keyword-shuffle` (group_2) |+| ----------------- | ------------------------------------- | --------------------------------------------- |+| `structural_type` | `sustained_hold` | `per_onset_sequential` |+| `onset_gap_bars` | **≥ 1.5** (onset _desert_) | **< 1.0** (continuous) |+| energy gate | `energy_level ≥ MEDIUM` | not gated (low is fine) |+| what moves | the **background** (text frozen) | the **text** (per onset / per beat) |+| because… | no onsets → nothing to hit → hold | onsets everywhere → hit everything |++So the decision is mechanical: **onset desert → hold the message; continuous onset+stream → type it / shuffle it.** Same `match.requires` predicates both sides read; see+`card.json`.++---++## 3. Usage++### Render with defaults (the group_2 recreation)++```bash+cd templates/typewriter-phrase-keyword-shuffle # or this folder+npx hyperframes lint && npx hyperframes validate+npx hyperframes render -f 24 -o renders/out.mp4+```++### Change the words (content only — no code edit)++`params` are `data-composition-variables`; fill them with `--variables`:++```bash+npx hyperframes render --variables '{+ "lead1":"built", "lead2":"for", "lead3":"",+ "keyword":"speed", "periodChar":".",+ "accentColor":"#39e6a0"+}'+```++- **Lead words are 1–3 and optional.** Leave `lead2`/`lead3` empty to ship a 1- or+ 2-word lead (`""` is skipped, the line rebuilds and re-centers automatically). The+ **keyword** is always the last, shuffling word.+- **`periodChar`** empty → no trailing accent dot.++### Re-fit the beat to a different group (the part that changes per track)++Content lives in `--variables`; **musical timing lives in the script** (`index.html`,+section `// 3. BEAT MAP`). When you reuse this template on a _new_ group, copy the new+group's `audiomap.json` numbers in:++```js+var LEAD_ONSETS = [ … ]; // one events[].t per lead word, in order+var KEY_ONSET = … ; // events[].t where the keyword types in+var PERIOD_ONSET = … ; // events[].t for the accent char (or remove)+var SHUFFLE = [ // one row per font-flip — add as MANY as the beat has+ { t: <events[].t or beats_sec[]>, font: <index into FONTS[]> },+ …+];+var DUR = <scene end, just before the next drop/hard_stop>;+```++**You can have more (or fewer) flips than group_2's four.** `SHUFFLE` is just a list —+add a row for every beat you want a change on. Re-use a `font` index to repeat a face,+or walk new indices for a longer cycle.++### Preset more fonts++The keyword cycles the **`FONTS[]` preset library** (top of the script). It ships **8**+offline-safe faces (bold sans · upright serif · heavy serif · italic serif · monospace ·+condensed sans · light sans-italic · bold serif-italic). `FONTS[0]` is the **base** face+shared with the lead words. Add entries freely — every `{ family, weight, style }` is+valid; `fontProps(i)` wraps the index so `SHUFFLE` can point anywhere. More beats →+preset more faces and walk through them.++> **Deterministic / asset-free:** only generic font stacks (no remote/Google fonts), no+> `Math.random`, no timers — every flip is keyed to an audio second, so it renders+> identically every time. See `references/builder-contract.md`.++---++## 4. Provenance++- **Source:** `bgm-golden-sample-reverse/gorup-by-group/group_2/group_2.mp4`+- **Audio:** `group_2.audiomap.json` (from `scripts/analyze-beatgrid.py`)+- **Video read:** `group_2_text-only.gemini-analysis.md` (Gemini 3 Pro) **corrected by+ frame-by-frame inspection** — the Gemini pass reported the keyword as static; pulling+ real frames at each onset proved it shuffles typeface. Trust frames over sparse+ sampling for per-frame detail.+- **Open question for promotion:** identify the _actual_ typefaces in the source if a+ pixel-exact match is wanted (this impl reproduces the _mechanism_ with generic faces),+ and decide whether to ship the glitch-field background as a second role.diff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.json b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.jsonnew file mode 100644index 0000000000..50f2121c5a--- /dev/null+++ b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/card.json@@ -0,0 +1,95 @@+{+ "id": "typewriter-phrase-keyword-shuffle",+ "name": "Typewriter Phrase / Keyword Font-Shuffle",+ "one_line": "Words type in one-per-onset to spell a phrase, then one keyword cycles typefaces on the beat while everything else holds dead still.",+ "status": "promoted",++ "match": {+ "structural_type": "per_onset_sequential",+ "requires": {+ "has_steady_grid": true,+ "onset_rate": ">=1.5",+ "onset_gap_bars": "<1.0",+ "density": ["sparse", "medium"]+ },+ "mood_fit": ["hype", "glitch", "tense", "cinematic", "playful"],+ "span_bars": [1, 4],+ "exit_trigger": ["surge", "hard_stop", "downbeat"],+ "notes": "Deliberately NOT gated on energy_level — the discriminator is a steady grid with a CONTINUOUS onset stream (no desert). This is the inverse of held-message-living-field, which requires onset_gap_bars >= 1.5 (an onset desert) and energy >= MEDIUM. If the grid goes quiet (gap >= ~1.5 bars), use a hold template instead."+ },++ "examples": [+ {+ "sample": "group_2",+ "group": "g2-text-scene",+ "bpm": 129.2,+ "structural_type": "per_onset_sequential",+ "energy_level": "VOID",+ "energy": 0.13,+ "density": "sparse",+ "onset_rate": 2.89,+ "onset_gap_bars": 0.28,+ "has_steady_grid": true,+ "span_sec": [0.0, 3.808],+ "span_bars": 2,+ "entry": { "anchor": "onset", "time": 0.046 },+ "exit_trigger": { "type": "surge", "time": 3.808 },+ "mood": ["tense", "cinematic"]+ }+ ],++ "roles": {+ "lead_phrase": {+ "kind": "message",+ "motion": "per_onset_pop",+ "anchor": "entry.onsets",+ "notes": "1-3 words; one word pops in per hi-hat onset and ACCUMULATES (typewriter, not replace), then holds. group_2: [email protected] · [email protected]."+ },+ "keyword": {+ "kind": "message",+ "motion": "font_shuffle",+ "anchor": "beats_after_phrase",+ "notes": "PROPOSED NEW motion verb. The final word types in (base face) then cycles through the FONTS[] preset library on each subsequent beat/onset — 0ms hard swaps; holds the base face between flips and after the last one. group_2: types @1.231, period @1.440, shuffles @1.904/2.392/2.624/3.088."+ },+ "background": {+ "kind": "background",+ "motion": "hold",+ "anchor": "none",+ "notes": "Pure black in this reference impl (per the reverse brief). The original group_2 layered a glitch/strobe/RGB-split field here (motion: strobe / energy_envelope_breath) — an OPTIONAL add-on role, not required by the structural type."+ }+ },++ "params": {+ "bgColor": { "type": "color", "maps_to": "background.color" },+ "textColor": { "type": "color", "maps_to": "lead_phrase.color + keyword.color" },+ "accentColor": { "type": "color", "maps_to": "keyword.trailing_accent" },+ "lead1": { "type": "string", "maps_to": "lead_phrase.word[0]", "optional": true },+ "lead2": { "type": "string", "maps_to": "lead_phrase.word[1]", "optional": true },+ "lead3": { "type": "string", "maps_to": "lead_phrase.word[2]", "optional": true },+ "keyword": { "type": "string", "maps_to": "keyword.content" },+ "periodChar": { "type": "string", "maps_to": "keyword.trailing_accent", "optional": true }+ },++ "beat_map": {+ "comment": "Script-side constants in index.html, filled from <group>.audiomap.json. Content lives in params; musical timing lives here.",+ "lead_onsets": [0.557, 0.906],+ "keyword_onset": 1.231,+ "period_onset": 1.44,+ "shuffle": [+ { "t": 1.904, "font": 1 },+ { "t": 2.392, "font": 2 },+ { "t": 2.624, "font": 3 },+ { "t": 3.088, "font": 0 }+ ],+ "duration": 3.85,+ "font_presets": 8+ },++ "reference_impl": "index.html",+ "uses_primitives": ["typewriter_reveal", "content_swap", "negative_space_hold"],++ "transition_out": { "default": "fast_cut", "observed": "surge_drop_cut" },++ "reversed_from": ["bgm-golden-sample-reverse/gorup-by-group/group_2"],+ "created": "2026-06-17"+}diff --git a/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/index.html b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/index.htmlnew file mode 100644index 0000000000..ebc380169c--- /dev/null+++ b/skills/bgm-to-video/templates/typewriter-phrase-keyword-shuffle/index.html@@ -0,0 +1,238 @@+<!doctype html>+<html+ lang="en"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Background", "default":"#000000"},+ {"id":"textColor", "type":"color", "label":"Text color", "default":"#ffffff"},+ {"id":"accentColor","type":"color", "label":"Period / keyword accent","default":"#ff6a32"},+ {"id":"lead1", "type":"string", "label":"Lead word 1 (optional)", "default":"growth"},+ {"id":"lead2", "type":"string", "label":"Lead word 2 (optional)", "default":"through"},+ {"id":"lead3", "type":"string", "label":"Lead word 3 (optional)", "default":""},+ {"id":"keyword", "type":"string", "label":"Keyword (shuffles font)","default":"creativity"},+ {"id":"periodChar", "type":"string", "label":"Trailing accent char (empty = none)","default":"."}+ ]'+>+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=1920, height=1080" />+ <title>Typewriter Phrase / Keyword Font-Shuffle — group_2 reference impl</title>+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>+ <style>+ *,+ *::before,+ *::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ html,+ body {+ background: var(--bg, #000000);+ overflow: hidden;+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;+ }+ #root {+ position: relative;+ width: 1920px;+ height: 1080px;+ overflow: hidden;+ background: var(--bg, #000000);+ }+ .g2-overlay {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ /* one centered line; when the keyword changes typeface the line re-centers,+ exactly as the source does (the lead words shift slightly, that's faithful). */+ .g2-line {+ display: inline-flex;+ align-items: baseline;+ gap: 0.28em;+ white-space: nowrap;+ color: var(--text, #ffffff);+ font-size: 112px;+ font-weight: 800;+ letter-spacing: -0.01em;+ text-shadow:+ 0 0 18px rgba(255, 255, 255, 0.45),+ 0 0 44px rgba(255, 255, 255, 0.22);+ }+ .g2-word {+ display: inline-block;+ }+ /* keyword + its trailing accent travel together so the dot hugs the word */+ .g2-cword {+ display: inline-flex;+ align-items: baseline;+ }+ .g2-period {+ display: inline-block;+ color: var(--accent, #ff6a32);+ font-weight: 800;+ }+ </style>+ </head>+ <body>+ <!-- duration = 3.85s = the spell-out + shuffle scene (0 → just before the 3.855s drop) -->+ <div+ data-hf-id="hf-g2rt"+ id="root"+ data-composition-id="group-two-recreate"+ data-width="1920"+ data-height="1080"+ data-start="0"+ data-duration="3.85"+ data-root="true"+ >+ <div data-hf-id="hf-g2ov" class="g2-overlay">+ <div data-hf-id="hf-g2ln" class="g2-line" id="line"></div>+ </div>+ </div>++ <script>+ (function () {+ // ════════════════════════════════════════════════════════════════+ // TYPEWRITER PHRASE / KEYWORD FONT-SHUFFLE · structural_type: per_onset_sequential+ // Words type in one-per-onset to spell a phrase; then ONE keyword cycles+ // typefaces on the beat while everything else holds dead still.+ // ════════════════════════════════════════════════════════════════++ // ── 1. Content variables (what a user changes) ─────────────────────+ var defaults = {+ bgColor: "#000000",+ textColor: "#ffffff",+ accentColor: "#ff6a32",+ lead1: "growth",+ lead2: "through",+ lead3: "",+ keyword: "creativity",+ periodChar: ".",+ };+ var vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // ── 2. FONT PRESET LIBRARY (preset many — the keyword cycles these) ─+ // FONTS[0] is the BASE face, shared with the lead words. The keyword flips+ // to FONTS[i] on each SHUFFLE step. Offline-safe generic stacks only (no+ // remote fonts). Extend this list freely — more beats → more presets to+ // cycle through. Each entry: { family, weight, style }.+ var FONTS = [+ {+ family: '"Helvetica Neue", Helvetica, Arial, sans-serif',+ weight: 800,+ style: "normal",+ }, // 0 base bold sans+ { family: 'Georgia, "Times New Roman", Times, serif', weight: 500, style: "normal" }, // 1 upright serif+ { family: "Georgia, serif", weight: 800, style: "normal" }, // 2 heavy serif+ { family: 'Georgia, "Times New Roman", serif', weight: 500, style: "italic" }, // 3 italic serif+ { family: '"Courier New", Courier, monospace', weight: 700, style: "normal" }, // 4 monospace+ { family: '"Arial Narrow", "Helvetica Neue", sans-serif', weight: 700, style: "normal" }, // 5 condensed sans+ { family: '"Helvetica Neue", Arial, sans-serif', weight: 300, style: "italic" }, // 6 light sans italic+ { family: "Georgia, serif", weight: 700, style: "italic" }, // 7 bold serif italic+ ];+ function fontProps(i) {+ var f = FONTS[((i % FONTS.length) + FONTS.length) % FONTS.length];+ return { fontFamily: f.family, fontWeight: f.weight, fontStyle: f.style };+ }++ // ── 3. BEAT MAP (filled from <group>.audiomap.json — see README) ────+ // group_2.audiomap.json: BPM 129.2, hi-hat onsets drive every move.+ // one ENTRY onset per lead word (in order), then KEYWORD, then PERIOD.+ var LEAD_ONSETS = [0.557, 0.906]; // grid.events[].t — one per non-empty lead word+ var KEY_ONSET = 1.231; // keyword types in here+ var PERIOD_ONSET = 1.44; // accent char punches in here+ // keyword font-shuffle: each {t,font} flips the keyword on a beat/onset.+ // t = a grid.beats_sec[] / events[].t after the phrase is set.+ // font = index into FONTS[]. Add as many rows as the beat has flips — and+ // re-use indices to repeat faces, or walk new ones for a longer shuffle.+ var SHUFFLE = [+ { t: 1.904, font: 1 }, // → upright serif+ { t: 2.392, font: 2 }, // → heavy serif+ { t: 2.624, font: 3 }, // → italic serif+ { t: 3.088, font: 0 }, // → back to base, then HOLD to the end+ ];+ var DUR = 3.85; // scene end (just before the 3.855 drop/kick)++ // ── 4. Build the line (1–3 lead words + keyword + optional accent) ──+ var root = document.getElementById("root");+ document.documentElement.style.setProperty("--bg", vars.bgColor);+ document.documentElement.style.setProperty("--text", vars.textColor);+ document.documentElement.style.setProperty("--accent", vars.accentColor);++ var line = root.querySelector("#line");+ var leadWords = [vars.lead1, vars.lead2, vars.lead3].filter(function (w) {+ return w && String(w).trim() !== "";+ });++ var leadEls = leadWords.map(function (w) {+ var s = document.createElement("span");+ s.className = "g2-word";+ s.textContent = w;+ line.appendChild(s);+ return s;+ });++ var cword = document.createElement("span");+ cword.className = "g2-cword";+ var keyEl = document.createElement("span");+ keyEl.className = "g2-word";+ keyEl.textContent = vars.keyword;+ cword.appendChild(keyEl);+ var periodEl = null;+ if (vars.periodChar && String(vars.periodChar).trim() !== "") {+ periodEl = document.createElement("span");+ periodEl.className = "g2-period";+ periodEl.textContent = vars.periodChar;+ cword.appendChild(periodEl);+ }+ line.appendChild(cword);++ // ── 5. Timeline — one paused GSAP timeline, absolute audio seconds ──+ window.__timelines = window.__timelines || {};+ var tl = gsap.timeline({ paused: true });++ var allSpans = leadEls.concat([keyEl]);+ if (periodEl) allSpans.push(periodEl);+ gsap.set(allSpans, { autoAlpha: 0 });+ gsap.set(keyEl, fontProps(0)); // keyword starts in the base face++ var POP_IN = { autoAlpha: 0, scale: 0.92, y: 5 };+ var POP_OUT = { autoAlpha: 1, scale: 1, y: 0, duration: 0.1, ease: "back.out(2)" };++ // typewriter accumulation — each lead word pops on its onset (words stay)+ leadEls.forEach(function (el, i) {+ var t = i < LEAD_ONSETS.length ? LEAD_ONSETS[i] : KEY_ONSET;+ tl.fromTo(el, POP_IN, POP_OUT, t);+ });+ // keyword types in (in the base face)+ tl.fromTo(keyEl, POP_IN, POP_OUT, KEY_ONSET);+ // trailing accent char punches in on its own onset+ if (periodEl) {+ tl.fromTo(+ periodEl,+ { autoAlpha: 0, scale: 0.3 },+ { autoAlpha: 1, scale: 1, duration: 0.09, ease: "back.out(3)" },+ PERIOD_ONSET,+ );+ }++ // keyword font-shuffle — 0ms hard sets on the beat (the percussion IS the swap)+ SHUFFLE.forEach(function (s) {+ tl.set(keyEl, fontProps(s.font), s.t);+ });++ tl.seek(0);+ window.__timelines["group-two-recreate"] = tl;+ })();+ </script>+ </body>+</html>