Spaces:
Running
Running
奥德彪语录 v2:极简版成品——原片 + 字幕 + 配音 + 原片音乐(推送 #9)
Browse files- .gitattributes +1 -0
- README.md +14 -0
- assets/{App-ewBDLmFp.js → App-gWMtIkbi.js} +0 -0
- assets/index-B07ize7Z.css +0 -1
- assets/{index-DCP6NXdr.js → index-BkQ_XwTg.js} +2 -2
- assets/index-Ce46jEpY.css +1 -0
- fonts/MaShanZheng.woff2 +2 -2
- fonts/NotoSansSC.woff2 +2 -2
- fonts/NotoSerifSC.woff2 +2 -2
- index.html +4 -4
- media/bgm.mp3 +3 -0
- media/footage.mp4 +2 -2
- src/App.tsx +5 -6
- src/film/CoverPanel.tsx +1 -1
- src/film/ExportPanel.tsx +3 -5
- src/film/Gallery.tsx +1 -2
- src/film/Player.tsx +2 -2
- src/film/core/chrome.ts +0 -201
- src/film/core/covers.ts +97 -140
- src/film/core/dc.ts +3 -62
- src/film/core/exporter.ts +2 -3
- src/film/core/film.ts +36 -104
- src/film/core/footage.ts +28 -47
- src/film/core/fx.ts +8 -491
- src/film/core/renderer.ts +154 -52
- src/film/core/score.ts +67 -657
- src/film/core/treatments.ts +0 -569
- src/film/data/quotes.ts +44 -75
- src/film/useThumbs.ts +1 -1
.gitattributes
CHANGED
|
@@ -274,3 +274,4 @@ media/voice/36.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
| 274 |
media/voice/39.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 275 |
media/voice/40.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 276 |
media/voice/41.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 274 |
media/voice/39.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 275 |
media/voice/40.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 276 |
media/voice/41.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 277 |
+
media/bgm.mp3 filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -26,6 +26,19 @@ pinned: false
|
|
| 26 |
|
| 27 |
步骤:① 写本计划(推送 #8)→ ② 重写渲染与混音、封面,质检后推送成品(推送 #9)。
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
---
|
| 30 |
|
| 31 |
# 附:v1 开发记录(已废弃,仅作留档)
|
|
@@ -186,3 +199,4 @@ index.html (纯静态,部署在本 Space)
|
|
| 186 |
- 终检:1080P/30fps 横屏导出成功;2K/1080P/720P × 横竖屏 × 24/30/60fps 共 15 种编码配置全部可用;线上 Space 的视频、字体、配音均支持跨域与分段加载
|
| 187 |
- 手机端修复:合集条按钮不再被右下角徽标遮挡
|
| 188 |
- [x] 推送 #8:v2 极简版改版计划
|
|
|
|
|
|
| 26 |
|
| 27 |
步骤:① 写本计划(推送 #8)→ ② 重写渲染与混音、封面,质检后推送成品(推送 #9)。
|
| 28 |
|
| 29 |
+
### v2 完成情况(推送 #9)
|
| 30 |
+
|
| 31 |
+
- ✅ 画面只用原片(1080p,原速),去掉全部特效、补充素材与片头片尾动画;开头 0.8 秒淡入、结尾 0.9 秒淡出
|
| 32 |
+
- ✅ 字幕:一句一屏,配音开始前 0.2 秒淡入;金句单独一屏;配音结束后英文译文浮现;每条时长 = 配音 + 4 秒(最短 8 秒)
|
| 33 |
+
- ✅ 声音:配音 + 原片音乐(说话时比人声低约 16 dB,空白处低约 8 dB),成片约 -14 LUFS;关闭"背景音乐"即只导出配音
|
| 34 |
+
- ✅ 竖屏:原片完整显示于画面中部,角标在上、字幕与英文在下
|
| 35 |
+
- ✅ 封面:原片定格 / 暗场金句 / 黑底留白 × 16:9、4:3、3:4
|
| 36 |
+
- ✅ 质检:43 条 × 横竖屏 × 6 个时间点字幕无越界无重叠;43 条 × 3 比例 × 3 款封面全部通过;竖屏两条合并导出(720×1280/30fps,含背景音乐)成功
|
| 37 |
+
|
| 38 |
+
### 使用
|
| 39 |
+
|
| 40 |
+
作品墙点任意一条播放 → 右侧"导出视频"选分辨率 / 帧率 / 画幅 / 背景音乐 → 导出 MP4;勾选多条卡片右上角圆圈 → 底部"预览 / 合并导出";"发布文案"一键复制四平台标题、描述、话题;"封面"多选比例后下载(多张自动打包 ZIP)。建议用电脑版 Chrome / Edge 导出。
|
| 41 |
+
|
| 42 |
---
|
| 43 |
|
| 44 |
# 附:v1 开发记录(已废弃,仅作留档)
|
|
|
|
| 199 |
- 终检:1080P/30fps 横屏导出成功;2K/1080P/720P × 横竖屏 × 24/30/60fps 共 15 种编码配置全部可用;线上 Space 的视频、字体、配音均支持跨域与分段加载
|
| 200 |
- 手机端修复:合集条按钮不再被右下角徽标遮挡
|
| 201 |
- [x] 推送 #8:v2 极简版改版计划
|
| 202 |
+
- [x] 推送 #9:v2 极简版成品(原片 + 字幕 + 配音 + 原片音乐)
|
assets/{App-ewBDLmFp.js → App-gWMtIkbi.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/index-B07ize7Z.css
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-snug:1.375;--leading-relaxed:1.625;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-2xl:40px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Lato,PingFang SC,sans-serif}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-12{top:calc(var(--spacing) * -12)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-12{right:calc(var(--spacing) * -12)}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.bottom-0{bottom:calc(var(--spacing) * 0)}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-\[18px\]{left:18px}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-12{margin-top:calc(var(--spacing) * 12)}.mt-24{margin-top:calc(var(--spacing) * 24)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\[--cell-size\]{width:--cell-size;height:--cell-size}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-20{height:calc(var(--spacing) * 20)}.h-\[--cell-size\]{height:--cell-size}.h-\[1px\]{height:1px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\[--radix-context-menu-content-available-height\]{max-height:--radix-context-menu-content-available-height}.max-h-\[--radix-select-content-available-height\]{max-height:--radix-select-content-available-height}.max-h-\[300px\]{max-height:300px}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-20{width:calc(var(--spacing) * 20)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-\[--cell-size\]{width:--cell-size}.w-\[1px\]{width:1px}.w-\[88px\]{width:88px}.w-\[100px\]{width:100px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\[1400px\]{max-width:1400px}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-6{min-width:calc(var(--spacing) * 6)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[--cell-size\]{min-width:--cell-size}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[140px\]{min-width:140px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-\[2\]{flex:2}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:--radix-context-menu-content-transform-origin}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:--radix-dropdown-menu-content-transform-origin}.origin-\[--radix-hover-card-content-transform-origin\]{transform-origin:--radix-hover-card-content-transform-origin}.origin-\[--radix-menubar-content-transform-origin\]{transform-origin:--radix-menubar-content-transform-origin}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:--radix-popover-content-transform-origin}.origin-\[--radix-select-content-transform-origin\]{transform-origin:--radix-select-content-transform-origin}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:--radix-tooltip-content-transform-origin}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-\[var\(--border-base\)\]{border-color:var(--border-base)}.border-destructive,.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-primary,.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,var(--primary) 50%,transparent)}}.border-transparent{border-color:#0000}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\[\#0a0908\]{background-color:#0a0908}.bg-\[\#0a0908\]\/85{background-color:#0a0908d9}.bg-\[\#0f0d0b\]\/95{background-color:#0f0d0bf2}.bg-\[\#100e0c\]{background-color:#100e0c}.bg-\[\#14120f\]{background-color:#14120f}.bg-\[\#F5C518\]{background-color:#f5c518}.bg-\[var\(--bg-subtle\)\]{background-color:var(--bg-subtle)}.bg-\[var\(--neutral-0\)\]{background-color:var(--neutral-0)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-foreground\/5{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/5{background-color:color-mix(in oklab,var(--foreground) 5%,transparent)}}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\/15{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-white) 2%,transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-white) 3%,transparent)}}.bg-white\/\[0\.06\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-white) 6%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\/80{--tw-gradient-from:color-mix(in oklab, var(--color-black) 80%, transparent)}}.from-black\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-black{fill:var(--color-black)}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.fill-white{fill:var(--color-white)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[--cell-size\]{padding-inline:--cell-size}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-\[132px\]{padding-right:132px}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-\[OdbLatinItalic\]{font-family:OdbLatinItalic}.font-\[OdbLatin\]{font-family:OdbLatin}.font-\[OdbSerif\]{font-family:OdbSerif}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[28px\]{font-size:28px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\[0\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#F5C518\]{color:#f5c518}.text-\[\#F5C518\]\/90{color:#f5c518e6}.text-\[var\(--fg-subtle\)\]{color:var(--fg-subtle)}.text-accent-foreground{color:var(--accent-foreground)}.text-black{color:var(--color-black)}.text-black\/60{color:#0009}@supports (color:color-mix(in lab,red,red)){.text-black\/60{color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/50{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,var(--foreground) 50%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.text-white\/20{color:#fff3}@supports (color:color-mix(in lab,red,red)){.text-white\/20{color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.text-white\/35{color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.text-white\/35{color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.text-white\/45{color:#ffffff73}@supports (color:color-mix(in lab,red,red)){.text-white\/45{color:color-mix(in oklab,var(--color-white) 45%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\/55{color:#ffffff8c}@supports (color:color-mix(in lab,red,red)){.text-white\/55{color:color-mix(in oklab,var(--color-white) 55%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\/75{color:color-mix(in oklab,var(--color-white) 75%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/85{color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.text-white\/85{color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_-20px_rgba\(0\,0\,0\,0\.9\)\]{--tw-shadow:0 30px 80px -20px var(--tw-shadow-color,#000000e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\[\#F5C518\]{--tw-ring-color:#f5c518}.ring-\[\#F5C518\]\/60{--tw-ring-color:oklab(84.1944% -.00126347 .168374/.6)}.ring-emerald-500\/40{--tw-ring-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.ring-emerald-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.ring-red-500\/30{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.ring-red-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.ring-white\/8{--tw-ring-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.ring-white\/8{--tw-ring-color:color-mix(in oklab, var(--color-white) 8%, transparent)}}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-white\/15{--tw-ring-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.ring-white\/15{--tw-ring-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.ring-white\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\/30{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.ring-white\/40{--tw-ring-color:#fff6}@supports (color:color-mix(in lab,red,red)){.ring-white\/40{--tw-ring-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.ring-white\/50{--tw-ring-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.ring-white\/50{--tw-ring-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--cell-size\:2rem\]{--cell-size:2rem}.fade-out{--tw-exit-opacity:0}.running{animation-play-state:running}@media(hover:hover){.group-hover\:scale-\[1\.04\]:is(:where(.group):hover *){scale:1.04}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[focused\=true\]\/day\:relative:is(:where(.group\/day)[data-focused=true] *){position:relative}.group-data-\[focused\=true\]\/day\:z-10:is(:where(.group\/day)[data-focused=true] *){z-index:10}.group-data-\[focused\=true\]\/day\:border-ring:is(:where(.group\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\[focused\=true\]\/day\:ring-\[3px\]:is(:where(.group\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.group-\[\.toast\]\:bg-muted:is(:where(.group).toast *){background-color:var(--muted)}.group-\[\.toast\]\:bg-primary:is(:where(.group).toast *){background-color:var(--primary)}.group-\[\.toast\]\:text-muted-foreground:is(:where(.group).toast *){color:var(--muted-foreground)}.group-\[\.toast\]\:text-primary-foreground:is(:where(.group).toast *){color:var(--primary-foreground)}.group-\[\.toaster\]\:border-border:is(:where(.group).toaster *){border-color:var(--border)}.group-\[\.toaster\]\:bg-background:is(:where(.group).toaster *){background-color:var(--background)}.group-\[\.toaster\]\:text-foreground:is(:where(.group).toaster *){color:var(--foreground)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}@media(hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-black\/70:hover{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/70:hover{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive) 80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary) 80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/80:hover{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:ring-white\/25:hover{--tw-ring-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/25:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.hover\:ring-white\/30:hover{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/30:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:var(--destructive)}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:var(--destructive-foreground)}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:var(--destructive)}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:border-\[var\(--fg-base\)\]:focus-visible{border-color:var(--fg-base)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.has-focus\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\:ring-\[3px\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:calc(52*var(--spacing))}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:calc(52*var(--spacing))}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-]{--tw-exit-opacity:0}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:.2s ease-out accordion-up}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:.8}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50% }.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% }.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48% }.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:.2s ease-out accordion-down}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50% }.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48% }.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% }@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[state\=visible\]\:animate-in[data-state=visible]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media(min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing) * 0)}.sm\:bottom-0{bottom:calc(var(--spacing) * 0)}.sm\:block{display:block}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% }}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:flex{display:flex}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-\[76px\]{top:76px}.lg\:max-h-\[calc\(100vh-96px\)\]{max-height:calc(100vh - 96px)}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_380px\]{grid-template-columns:minmax(0,1fr) 380px}.lg\:overflow-y-auto{overflow-y:auto}}@media(min-width:80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:border-destructive{border-color:var(--destructive)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\+div\]\:text-xs+div{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}:is(.rtl\:\*\*\:\[\.rdp-button\\_next\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\:\*\*\:\[\.rdp-button\\_previous\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>span\]\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing) * 4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing) * 4)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-3\.5>svg{height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:w-3\.5>svg{width:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing) * 7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:#0000}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}:root{--background:#fff;--foreground:#212121;--card:#fff;--card-foreground:#212121;--popover:#fff;--popover-foreground:#212121;--primary:#ff2974;--primary-foreground:#fff;--secondary:#f3f2f2;--secondary-foreground:#212121;--muted:#f3f2f2;--muted-foreground:#7a7a7a;--accent:#f3f2f2;--accent-foreground:#212121;--destructive:#f5242e;--destructive-foreground:#fff;--border:#e8e8e8;--input:#e8e8e8;--ring:#212121;--radius:.5rem;--neutral-0:#fff;--neutral-50:#fafafa;--neutral-100:#f5f4f4;--neutral-200:#e7e7e7;--neutral-300:#d8d8d8;--neutral-400:#aaa;--neutral-500:#7a7a7a;--neutral-600:#5b5b5b;--neutral-700:#464646;--neutral-800:#2a2a2a;--neutral-900:#212121;--neutral-950:#1b1b1b;--neutral-1000:#101010;--brand-100:#ff2882;--brand-60:#ff288299;--brand-30:#ff28824d;--brand-10:#ff28821a;--brand-seafoam:#b6cfd0;--brand-dusty-teal:#6ba4b8;--brand-black-aqua:#002f38;--brand-deep-teal-blue:#07272d;--visualizer-rose-pop:#fd4b96;--visualizer-indigo-breeze:#6366f1;--visualizer-emerald-mint:#10b981;--visualizer-golden-amber:#f59e0b;--visualizer-royal-blue:#1d4ed8;--visualizer-crimson-spark:#ef4444;--visualizer-aqua-glow:#06b6d4;--visualizer-sunbeam-yellow:#facc15;--bg-subtle:#2a2a2a0a;--bg-subtle-hover:#2a2a2a0f;--bg-base:#ffffffe0;--bg-base-opaque:#fff;--bg-menu:#fff;--bg-chat:#fcfcfc;--bg-chat-nav:#f4f4f4;--fg-base:#212121;--fg-subtle:#7a7a7a;--fg-muted:#aaa;--fg-disabled:#d8d8d8;--border-base:#2a2a2a0a;--border-strong:#2a2a2a14;--border-contrast:#2a2a2a1f;--border-focus:#2a2a2a66;--tag-blue-10:#5bb5ff1a;--tag-blue-100:#5bb5ff;--tag-yellow-10:#dec3781a;--tag-yellow-100:#dec378;--tag-purple-10:#908eb81a;--tag-purple-100:#908eb8;--tag-cyan-10:#74ada41a;--tag-cyan-100:#74ada4;--tag-pink-10:#b88ea71a;--tag-pink-100:#b88ea7;--tag-orange-10:#b8a08e1a;--tag-orange-100:#b8a08e;--gradient-max-dark:linear-gradient(213deg, #8c421d 2%, #fbe67b 31%, #fcfbe7 53%, #f7d14e 77%, #d4a041 100%);--gradient-max-light:linear-gradient(125deg, #8c421d 22%, #d2af00 47%, #cd9124 67%, #d4a041 88%);--gradient-pro-dark:linear-gradient(213deg, #7a96ac 1%, #c5d6e2 27%, #eaeff3 47%, #c5d6e2 65%, #a3bccf 89%);--gradient-pro-light:linear-gradient(129deg, #7a96ac 4%, #6d7f8d 27%, #9fb9ce 55%, #6d7f8d 90%);--gradient-plus-dark:linear-gradient(214deg, #986732 0%, #a7825b 23%, #f6d0ab 45%, #a07043 66%, #9d774e 100%);--gradient-plus-light:linear-gradient(129deg, #9e8976 5%, #7a5e50 19%, #f6d0ab 35%, #9d774e 49%, #c99b70 65%, #795f52 78%);--gradient-upgrade-dark:linear-gradient(214deg, #ffedf3 0%, #ff9fbf 30%, #fd5d92 59%, #ffdab2 100%);--gradient-upgrade-light:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-new-function:linear-gradient(33deg, #6e86ff 17%, #ff2882 55%, #ff98a4 103%);--gradient-suggestion:linear-gradient(32deg, #fd538c 4%, #5aa6e0 47%, #ffdab2 98%);--gradient-g1:linear-gradient(189deg, #ffacc6 6%, #b6e0f5 99%);--gradient-g2:linear-gradient(34deg, #9796f0 9%, #fbc7d4 84%);--gradient-g3:linear-gradient(to right, #ed4264, #ffedbc);--gradient-g4:linear-gradient(232deg, #fedc2a 4%, #dd5789 56%, #7a2c9e 104%);--gradient-g5:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-max:var(--gradient-max-light);--gradient-pro:var(--gradient-pro-light);--gradient-plus:var(--gradient-plus-light);--gradient-upgrade:var(--gradient-upgrade-light);--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-10:10px;--spacing-12:12px;--spacing-16:16px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-64:64px;--spacing-96:96px;--spacing-128:128px;--radius-2:2px;--radius-4:4px;--radius-6:6px;--radius-8:8px;--radius-10:10px;--radius-12:12px;--radius-16:16px;--radius-20:20px;--radius-24:24px;--radius-full:999px;--font-family-header:"Lato", "PingFang SC", sans-serif;--font-family-body:"Lato", "PingFang SC", sans-serif;--font-family-code:"Roboto Mono", monospace}.dark{--background:#171717;--foreground:#e8e8e8;--card:#171717;--card-foreground:#e8e8e8;--popover:#262626;--popover-foreground:#e8e8e8;--primary:#ff2974;--primary-foreground:#fff;--secondary:#292929;--secondary-foreground:#e8e8e8;--muted:#292929;--muted-foreground:#ababab;--accent:#292929;--accent-foreground:#e8e8e8;--destructive:#ff4c4f;--destructive-foreground:#fff;--border:#333;--input:#333;--ring:#e7e7e7;--gradient-max:var(--gradient-max-dark);--gradient-pro:var(--gradient-pro-dark);--gradient-plus:var(--gradient-plus-dark);--gradient-upgrade:var(--gradient-upgrade-dark);--bg-subtle:#ffffff0a;--bg-subtle-hover:#ffffff1f;--bg-base:#2a2a2acc;--bg-base-opaque:#171717;--bg-menu:#252525;--bg-chat:#101010;--bg-chat-nav:#171717;--fg-base:#e7e7e7;--fg-subtle:#aaa;--fg-muted:#7a7a7a;--fg-disabled:#5b5b5b;--border-base:#ffffff0a;--border-strong:#ffffff14;--border-contrast:#ffffff1f;--border-focus:#fff6}@media(max-width:768px){:root{--spacing-96:64px;--spacing-128:64px}}@font-face{font-family:OdbSerif;src:url(../fonts/NotoSerifSC.woff2)format("woff2");font-weight:200 900;font-display:swap}@font-face{font-family:OdbSans;src:url(../fonts/NotoSansSC.woff2)format("woff2");font-weight:100 900;font-display:swap}@font-face{font-family:OdbLatin;src:url(../fonts/CormorantGaramond.woff2)format("woff2");font-weight:300 700;font-display:swap}@font-face{font-family:OdbLatinItalic;src:url(../fonts/CormorantGaramondItalic.woff2)format("woff2");font-weight:300 700;font-style:italic;font-display:swap}.odb-range{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#ffffff26;border-radius:999px;outline:none;height:4px}.odb-range::-webkit-slider-thumb{-webkit-appearance:none;cursor:pointer;background:#f5c518;border-radius:50%;width:14px;height:14px;box-shadow:0 0 0 4px #f5c5182e}.odb-range::-moz-range-thumb{cursor:pointer;background:#f5c518;border:0;border-radius:50%;width:14px;height:14px}html,body{background:#0a0908}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
|
|
|
|
|
|
assets/{index-DCP6NXdr.js → index-BkQ_XwTg.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Hfm_NZuV.js","./index-dieXJrkU.js","./client-DsO8Qooz.js","./index-CUnzljiZ.js","./jsx-runtime-D_zvdyIk.js","./App-
|
| 2 |
-
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&d(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const E="modulepreload",v=function(r,o){return new URL(r,o).href},w={},y=function(o,i,d){let e=Promise.resolve();if(i&&i.length>0){let s=function(n){return Promise.all(n.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=s(i.map(n=>{if(n=v(n,d),n in w)return;w[n]=!0;const u=n.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===n&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":E,u||(c.as="script"),c.crossOrigin="",c.href=n,h&&c.setAttribute("nonce",h),document.head.appendChild(c),u)return new Promise((m,g)=>{c.addEventListener("load",m),c.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${n}`)))})}))}function t(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return e.then(s=>{for(const l of s||[])l.status==="rejected"&&t(l.reason);return o().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const r=document.getElementById("root");try{let o=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const i=await y(()=>import("./index-Hfm_NZuV.js").then(a=>a.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof i.useState!="function")throw new Error("dep-stub");const{createElement:d}=i,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:a,hydrateRoot:c}=await import("./client-DsO8Qooz.js").then(m=>m.c);return{createRoot:a,hydrateRoot:c}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:s,QueryClientProvider:l}=await y(async()=>{const{QueryClient:a,QueryClientProvider:c}=await import("./index-CUnzljiZ.js");return{QueryClient:a,QueryClientProvider:c}},__vite__mapDeps([3,0,1,4]),import.meta.url),{default:f}=await y(async()=>{const{default:a}=await import("./App-
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Hfm_NZuV.js","./index-dieXJrkU.js","./client-DsO8Qooz.js","./index-CUnzljiZ.js","./jsx-runtime-D_zvdyIk.js","./App-gWMtIkbi.js","./ErrorBoundary-CoWFRUty.js"])))=>i.map(i=>d[i]);
|
| 2 |
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&d(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const E="modulepreload",v=function(r,o){return new URL(r,o).href},w={},y=function(o,i,d){let e=Promise.resolve();if(i&&i.length>0){let s=function(n){return Promise.all(n.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=s(i.map(n=>{if(n=v(n,d),n in w)return;w[n]=!0;const u=n.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===n&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":E,u||(c.as="script"),c.crossOrigin="",c.href=n,h&&c.setAttribute("nonce",h),document.head.appendChild(c),u)return new Promise((m,g)=>{c.addEventListener("load",m),c.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${n}`)))})}))}function t(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return e.then(s=>{for(const l of s||[])l.status==="rejected"&&t(l.reason);return o().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const r=document.getElementById("root");try{let o=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const i=await y(()=>import("./index-Hfm_NZuV.js").then(a=>a.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof i.useState!="function")throw new Error("dep-stub");const{createElement:d}=i,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:a,hydrateRoot:c}=await import("./client-DsO8Qooz.js").then(m=>m.c);return{createRoot:a,hydrateRoot:c}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:s,QueryClientProvider:l}=await y(async()=>{const{QueryClient:a,QueryClientProvider:c}=await import("./index-CUnzljiZ.js");return{QueryClient:a,QueryClientProvider:c}},__vite__mapDeps([3,0,1,4]),import.meta.url),{default:f}=await y(async()=>{const{default:a}=await import("./App-gWMtIkbi.js");return{default:a}},__vite__mapDeps([5,4,0,1]),import.meta.url),{default:h}=await y(async()=>{const{default:a}=await import("./ErrorBoundary-CoWFRUty.js");return{default:a}},__vite__mapDeps([6,4,0,1]),import.meta.url),n=new s({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,retryDelay:a=>Math.min(1e3*2**a,1e4),staleTime:3e4}}}),u=d(h,null,d(l,{client:n},d(f))),p=!!r.querySelector("[data-surf-placeholder]");r.childNodes.length>0&&r.innerHTML!=="<!--ssr-outlet-->"&&!p?t(r,u):(r.innerHTML="",e(r).render(u)),window.__reactOk=!0,sessionStorage.removeItem(_),o(),new MutationObserver(o).observe(r,{childList:!0,subtree:!0})}catch{const o=P(),i=Date.now()-o.t>O?0:o.c;i<L?(r.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#3b82f6;font-weight:600;margin:0 0 4px">Loading dependencies...</p>','<p style="color:#3b82f6;opacity:0.7;font-size:12px;margin:0">Reloading automatically</p>',"</div>"].join(""),sessionStorage.setItem(_,JSON.stringify({c:i+1,t:Date.now()})),setTimeout(()=>location.reload(),3e3+i*1e3)):r.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#c0392b;font-weight:600;margin:0 0 4px">Failed to load dependencies</p>','<p style="color:#c0392b;opacity:0.8;font-size:12px;margin:0">Please refresh the page</p>',"</div>"].join("")}}R();
|
assets/index-Ce46jEpY.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-widest:.1em;--leading-snug:1.375;--leading-relaxed:1.625;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-2xl:40px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Lato,PingFang SC,sans-serif}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-12{top:calc(var(--spacing) * -12)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-12{right:calc(var(--spacing) * -12)}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.bottom-0{bottom:calc(var(--spacing) * 0)}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-\[18px\]{left:18px}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-12{margin-top:calc(var(--spacing) * 12)}.mt-24{margin-top:calc(var(--spacing) * 24)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\[--cell-size\]{width:--cell-size;height:--cell-size}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-20{height:calc(var(--spacing) * 20)}.h-\[--cell-size\]{height:--cell-size}.h-\[1px\]{height:1px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\[--radix-context-menu-content-available-height\]{max-height:--radix-context-menu-content-available-height}.max-h-\[--radix-select-content-available-height\]{max-height:--radix-select-content-available-height}.max-h-\[300px\]{max-height:300px}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-20{width:calc(var(--spacing) * 20)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-\[--cell-size\]{width:--cell-size}.w-\[1px\]{width:1px}.w-\[88px\]{width:88px}.w-\[100px\]{width:100px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\[1400px\]{max-width:1400px}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-6{min-width:calc(var(--spacing) * 6)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[--cell-size\]{min-width:--cell-size}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[140px\]{min-width:140px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-\[2\]{flex:2}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:--radix-context-menu-content-transform-origin}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:--radix-dropdown-menu-content-transform-origin}.origin-\[--radix-hover-card-content-transform-origin\]{transform-origin:--radix-hover-card-content-transform-origin}.origin-\[--radix-menubar-content-transform-origin\]{transform-origin:--radix-menubar-content-transform-origin}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:--radix-popover-content-transform-origin}.origin-\[--radix-select-content-transform-origin\]{transform-origin:--radix-select-content-transform-origin}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:--radix-tooltip-content-transform-origin}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-\[var\(--border-base\)\]{border-color:var(--border-base)}.border-destructive,.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-primary,.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,var(--primary) 50%,transparent)}}.border-transparent{border-color:#0000}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\[\#0a0908\]{background-color:#0a0908}.bg-\[\#0a0908\]\/85{background-color:#0a0908d9}.bg-\[\#0f0d0b\]\/95{background-color:#0f0d0bf2}.bg-\[\#100e0c\]{background-color:#100e0c}.bg-\[\#14120f\]{background-color:#14120f}.bg-\[\#F5C518\]{background-color:#f5c518}.bg-\[var\(--bg-subtle\)\]{background-color:var(--bg-subtle)}.bg-\[var\(--neutral-0\)\]{background-color:var(--neutral-0)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-foreground\/5{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/5{background-color:color-mix(in oklab,var(--foreground) 5%,transparent)}}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\/15{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-white) 2%,transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-white) 3%,transparent)}}.bg-white\/\[0\.06\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-white) 6%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\/80{--tw-gradient-from:color-mix(in oklab, var(--color-black) 80%, transparent)}}.from-black\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-black{fill:var(--color-black)}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.fill-white{fill:var(--color-white)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[--cell-size\]{padding-inline:--cell-size}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-\[132px\]{padding-right:132px}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-\[OdbLatinItalic\]{font-family:OdbLatinItalic}.font-\[OdbLatin\]{font-family:OdbLatin}.font-\[OdbSerif\]{font-family:OdbSerif}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[28px\]{font-size:28px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\[0\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#F5C518\]{color:#f5c518}.text-\[\#F5C518\]\/90{color:#f5c518e6}.text-\[var\(--fg-subtle\)\]{color:var(--fg-subtle)}.text-accent-foreground{color:var(--accent-foreground)}.text-black{color:var(--color-black)}.text-black\/60{color:#0009}@supports (color:color-mix(in lab,red,red)){.text-black\/60{color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/50{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,var(--foreground) 50%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.text-white\/20{color:#fff3}@supports (color:color-mix(in lab,red,red)){.text-white\/20{color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.text-white\/35{color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.text-white\/35{color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.text-white\/45{color:#ffffff73}@supports (color:color-mix(in lab,red,red)){.text-white\/45{color:color-mix(in oklab,var(--color-white) 45%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\/55{color:#ffffff8c}@supports (color:color-mix(in lab,red,red)){.text-white\/55{color:color-mix(in oklab,var(--color-white) 55%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\/75{color:color-mix(in oklab,var(--color-white) 75%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/85{color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.text-white\/85{color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_-20px_rgba\(0\,0\,0\,0\.9\)\]{--tw-shadow:0 30px 80px -20px var(--tw-shadow-color,#000000e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\[\#F5C518\]{--tw-ring-color:#f5c518}.ring-\[\#F5C518\]\/60{--tw-ring-color:oklab(84.1944% -.00126347 .168374/.6)}.ring-emerald-500\/40{--tw-ring-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.ring-emerald-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.ring-red-500\/30{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.ring-red-500\/30{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.ring-white\/8{--tw-ring-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.ring-white\/8{--tw-ring-color:color-mix(in oklab, var(--color-white) 8%, transparent)}}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-white\/15{--tw-ring-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.ring-white\/15{--tw-ring-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.ring-white\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\/30{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.ring-white\/40{--tw-ring-color:#fff6}@supports (color:color-mix(in lab,red,red)){.ring-white\/40{--tw-ring-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.ring-white\/50{--tw-ring-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.ring-white\/50{--tw-ring-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--cell-size\:2rem\]{--cell-size:2rem}.fade-out{--tw-exit-opacity:0}.running{animation-play-state:running}@media(hover:hover){.group-hover\:scale-\[1\.04\]:is(:where(.group):hover *){scale:1.04}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[focused\=true\]\/day\:relative:is(:where(.group\/day)[data-focused=true] *){position:relative}.group-data-\[focused\=true\]\/day\:z-10:is(:where(.group\/day)[data-focused=true] *){z-index:10}.group-data-\[focused\=true\]\/day\:border-ring:is(:where(.group\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\[focused\=true\]\/day\:ring-\[3px\]:is(:where(.group\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.group-\[\.toast\]\:bg-muted:is(:where(.group).toast *){background-color:var(--muted)}.group-\[\.toast\]\:bg-primary:is(:where(.group).toast *){background-color:var(--primary)}.group-\[\.toast\]\:text-muted-foreground:is(:where(.group).toast *){color:var(--muted-foreground)}.group-\[\.toast\]\:text-primary-foreground:is(:where(.group).toast *){color:var(--primary-foreground)}.group-\[\.toaster\]\:border-border:is(:where(.group).toaster *){border-color:var(--border)}.group-\[\.toaster\]\:bg-background:is(:where(.group).toaster *){background-color:var(--background)}.group-\[\.toaster\]\:text-foreground:is(:where(.group).toaster *){color:var(--foreground)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}@media(hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-black\/70:hover{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/70:hover{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive) 80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary) 80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/80:hover{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:ring-white\/25:hover{--tw-ring-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/25:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.hover\:ring-white\/30:hover{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/30:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:var(--destructive)}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:var(--destructive-foreground)}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:var(--destructive)}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:border-\[var\(--fg-base\)\]:focus-visible{border-color:var(--fg-base)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.has-focus\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\:ring-\[3px\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:calc(52*var(--spacing))}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:calc(52*var(--spacing))}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-]{--tw-exit-opacity:0}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:.2s ease-out accordion-up}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:.8}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50% }.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% }.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48% }.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:.2s ease-out accordion-down}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50% }.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48% }.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% }@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[state\=visible\]\:animate-in[data-state=visible]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media(min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing) * 0)}.sm\:bottom-0{bottom:calc(var(--spacing) * 0)}.sm\:block{display:block}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% }}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:flex{display:flex}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-\[76px\]{top:76px}.lg\:max-h-\[calc\(100vh-96px\)\]{max-height:calc(100vh - 96px)}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_380px\]{grid-template-columns:minmax(0,1fr) 380px}.lg\:overflow-y-auto{overflow-y:auto}}@media(min-width:80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:border-destructive{border-color:var(--destructive)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\+div\]\:text-xs+div{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}:is(.rtl\:\*\*\:\[\.rdp-button\\_next\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\:\*\*\:\[\.rdp-button\\_previous\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>span\]\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing) * 4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing) * 4)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-3\.5>svg{height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:w-3\.5>svg{width:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing) * 7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:#0000}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}:root{--background:#fff;--foreground:#212121;--card:#fff;--card-foreground:#212121;--popover:#fff;--popover-foreground:#212121;--primary:#ff2974;--primary-foreground:#fff;--secondary:#f3f2f2;--secondary-foreground:#212121;--muted:#f3f2f2;--muted-foreground:#7a7a7a;--accent:#f3f2f2;--accent-foreground:#212121;--destructive:#f5242e;--destructive-foreground:#fff;--border:#e8e8e8;--input:#e8e8e8;--ring:#212121;--radius:.5rem;--neutral-0:#fff;--neutral-50:#fafafa;--neutral-100:#f5f4f4;--neutral-200:#e7e7e7;--neutral-300:#d8d8d8;--neutral-400:#aaa;--neutral-500:#7a7a7a;--neutral-600:#5b5b5b;--neutral-700:#464646;--neutral-800:#2a2a2a;--neutral-900:#212121;--neutral-950:#1b1b1b;--neutral-1000:#101010;--brand-100:#ff2882;--brand-60:#ff288299;--brand-30:#ff28824d;--brand-10:#ff28821a;--brand-seafoam:#b6cfd0;--brand-dusty-teal:#6ba4b8;--brand-black-aqua:#002f38;--brand-deep-teal-blue:#07272d;--visualizer-rose-pop:#fd4b96;--visualizer-indigo-breeze:#6366f1;--visualizer-emerald-mint:#10b981;--visualizer-golden-amber:#f59e0b;--visualizer-royal-blue:#1d4ed8;--visualizer-crimson-spark:#ef4444;--visualizer-aqua-glow:#06b6d4;--visualizer-sunbeam-yellow:#facc15;--bg-subtle:#2a2a2a0a;--bg-subtle-hover:#2a2a2a0f;--bg-base:#ffffffe0;--bg-base-opaque:#fff;--bg-menu:#fff;--bg-chat:#fcfcfc;--bg-chat-nav:#f4f4f4;--fg-base:#212121;--fg-subtle:#7a7a7a;--fg-muted:#aaa;--fg-disabled:#d8d8d8;--border-base:#2a2a2a0a;--border-strong:#2a2a2a14;--border-contrast:#2a2a2a1f;--border-focus:#2a2a2a66;--tag-blue-10:#5bb5ff1a;--tag-blue-100:#5bb5ff;--tag-yellow-10:#dec3781a;--tag-yellow-100:#dec378;--tag-purple-10:#908eb81a;--tag-purple-100:#908eb8;--tag-cyan-10:#74ada41a;--tag-cyan-100:#74ada4;--tag-pink-10:#b88ea71a;--tag-pink-100:#b88ea7;--tag-orange-10:#b8a08e1a;--tag-orange-100:#b8a08e;--gradient-max-dark:linear-gradient(213deg, #8c421d 2%, #fbe67b 31%, #fcfbe7 53%, #f7d14e 77%, #d4a041 100%);--gradient-max-light:linear-gradient(125deg, #8c421d 22%, #d2af00 47%, #cd9124 67%, #d4a041 88%);--gradient-pro-dark:linear-gradient(213deg, #7a96ac 1%, #c5d6e2 27%, #eaeff3 47%, #c5d6e2 65%, #a3bccf 89%);--gradient-pro-light:linear-gradient(129deg, #7a96ac 4%, #6d7f8d 27%, #9fb9ce 55%, #6d7f8d 90%);--gradient-plus-dark:linear-gradient(214deg, #986732 0%, #a7825b 23%, #f6d0ab 45%, #a07043 66%, #9d774e 100%);--gradient-plus-light:linear-gradient(129deg, #9e8976 5%, #7a5e50 19%, #f6d0ab 35%, #9d774e 49%, #c99b70 65%, #795f52 78%);--gradient-upgrade-dark:linear-gradient(214deg, #ffedf3 0%, #ff9fbf 30%, #fd5d92 59%, #ffdab2 100%);--gradient-upgrade-light:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-new-function:linear-gradient(33deg, #6e86ff 17%, #ff2882 55%, #ff98a4 103%);--gradient-suggestion:linear-gradient(32deg, #fd538c 4%, #5aa6e0 47%, #ffdab2 98%);--gradient-g1:linear-gradient(189deg, #ffacc6 6%, #b6e0f5 99%);--gradient-g2:linear-gradient(34deg, #9796f0 9%, #fbc7d4 84%);--gradient-g3:linear-gradient(to right, #ed4264, #ffedbc);--gradient-g4:linear-gradient(232deg, #fedc2a 4%, #dd5789 56%, #7a2c9e 104%);--gradient-g5:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-max:var(--gradient-max-light);--gradient-pro:var(--gradient-pro-light);--gradient-plus:var(--gradient-plus-light);--gradient-upgrade:var(--gradient-upgrade-light);--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-10:10px;--spacing-12:12px;--spacing-16:16px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-64:64px;--spacing-96:96px;--spacing-128:128px;--radius-2:2px;--radius-4:4px;--radius-6:6px;--radius-8:8px;--radius-10:10px;--radius-12:12px;--radius-16:16px;--radius-20:20px;--radius-24:24px;--radius-full:999px;--font-family-header:"Lato", "PingFang SC", sans-serif;--font-family-body:"Lato", "PingFang SC", sans-serif;--font-family-code:"Roboto Mono", monospace}.dark{--background:#171717;--foreground:#e8e8e8;--card:#171717;--card-foreground:#e8e8e8;--popover:#262626;--popover-foreground:#e8e8e8;--primary:#ff2974;--primary-foreground:#fff;--secondary:#292929;--secondary-foreground:#e8e8e8;--muted:#292929;--muted-foreground:#ababab;--accent:#292929;--accent-foreground:#e8e8e8;--destructive:#ff4c4f;--destructive-foreground:#fff;--border:#333;--input:#333;--ring:#e7e7e7;--gradient-max:var(--gradient-max-dark);--gradient-pro:var(--gradient-pro-dark);--gradient-plus:var(--gradient-plus-dark);--gradient-upgrade:var(--gradient-upgrade-dark);--bg-subtle:#ffffff0a;--bg-subtle-hover:#ffffff1f;--bg-base:#2a2a2acc;--bg-base-opaque:#171717;--bg-menu:#252525;--bg-chat:#101010;--bg-chat-nav:#171717;--fg-base:#e7e7e7;--fg-subtle:#aaa;--fg-muted:#7a7a7a;--fg-disabled:#5b5b5b;--border-base:#ffffff0a;--border-strong:#ffffff14;--border-contrast:#ffffff1f;--border-focus:#fff6}@media(max-width:768px){:root{--spacing-96:64px;--spacing-128:64px}}@font-face{font-family:OdbSerif;src:url(../fonts/NotoSerifSC.woff2)format("woff2");font-weight:200 900;font-display:swap}@font-face{font-family:OdbSans;src:url(../fonts/NotoSansSC.woff2)format("woff2");font-weight:100 900;font-display:swap}@font-face{font-family:OdbLatin;src:url(../fonts/CormorantGaramond.woff2)format("woff2");font-weight:300 700;font-display:swap}@font-face{font-family:OdbLatinItalic;src:url(../fonts/CormorantGaramondItalic.woff2)format("woff2");font-weight:300 700;font-style:italic;font-display:swap}.odb-range{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#ffffff26;border-radius:999px;outline:none;height:4px}.odb-range::-webkit-slider-thumb{-webkit-appearance:none;cursor:pointer;background:#f5c518;border-radius:50%;width:14px;height:14px;box-shadow:0 0 0 4px #f5c5182e}.odb-range::-moz-range-thumb{cursor:pointer;background:#f5c518;border:0;border-radius:50%;width:14px;height:14px}html,body{background:#0a0908}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
|
fonts/MaShanZheng.woff2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:111f3b0eca3a44dab41f89363c80d54efb7403c471906f1bbcb5c282eb27a262
|
| 3 |
+
size 478236
|
fonts/NotoSansSC.woff2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:90bae5abfc6595b6e05404a41387deff97909d9bd783032f72f635534f6a3fd2
|
| 3 |
+
size 353080
|
fonts/NotoSerifSC.woff2
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e258d7e310cd2d2f834eeea53e545544f04f72d91b7f123ae3c77a707b37daa8
|
| 3 |
+
size 459832
|
index.html
CHANGED
|
@@ -54,14 +54,14 @@
|
|
| 54 |
<meta charset="UTF-8" />
|
| 55 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 56 |
<link rel="icon" href="/favicon.ico" />
|
| 57 |
-
<title>奥德彪语录
|
| 58 |
-
<meta name="description" content="43 条奥德彪语录
|
| 59 |
<meta name="theme-color" content="#0a0908" />
|
| 60 |
<script>
|
| 61 |
document.documentElement.classList.add('dark');
|
| 62 |
</script>
|
| 63 |
-
<script type="module" crossorigin src="./assets/index-
|
| 64 |
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
| 65 |
</head>
|
| 66 |
<body>
|
| 67 |
<div id="root"><!--ssr-outlet--></div>
|
|
|
|
| 54 |
<meta charset="UTF-8" />
|
| 55 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 56 |
<link rel="icon" href="/favicon.ico" />
|
| 57 |
+
<title>奥德彪语录</title>
|
| 58 |
+
<meta name="description" content="43 条奥德彪语录 × 原片:极简字幕 + 纪录片配音,网页即看,可本地导出 MP4、合并导出,附四平台文案与多比例封面。" />
|
| 59 |
<meta name="theme-color" content="#0a0908" />
|
| 60 |
<script>
|
| 61 |
document.documentElement.classList.add('dark');
|
| 62 |
</script>
|
| 63 |
+
<script type="module" crossorigin src="./assets/index-BkQ_XwTg.js"></script>
|
| 64 |
+
<link rel="stylesheet" crossorigin href="./assets/index-Ce46jEpY.css">
|
| 65 |
</head>
|
| 66 |
<body>
|
| 67 |
<div id="root"><!--ssr-outlet--></div>
|
media/bgm.mp3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a27a13f2b2bac9aeac0dc7027290b08487586fb594deb0b91c07846c8f28194
|
| 3 |
+
size 377411
|
media/footage.mp4
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:074748d2a858ed95d361e8eece824ab69c522236e89ca4c5e2b0bcdda07cc356
|
| 3 |
+
size 10598227
|
src/App.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import ExportPanel from '@/components/film/ExportPanel'
|
|
| 6 |
import CopyPanel from '@/components/film/CopyPanel'
|
| 7 |
import CoverPanel from '@/components/film/CoverPanel'
|
| 8 |
import { useThumbs } from '@/components/film/useThumbs'
|
| 9 |
-
import { QUOTES
|
| 10 |
import { getCopy } from '@/film/core/copy'
|
| 11 |
import { pad2 } from '@/film/core/util'
|
| 12 |
|
|
@@ -22,7 +22,7 @@ export default function App() {
|
|
| 22 |
const [autoKey, setAutoKey] = useState(0)
|
| 23 |
const thumbs = useThumbs(true)
|
| 24 |
|
| 25 |
-
useEffect(() => { document.title = '奥德彪语录
|
| 26 |
|
| 27 |
const ids = useMemo(() => (mergeMode && selected.length ? selected : [current]), [mergeMode, selected, current])
|
| 28 |
const q = QUOTES.find((x) => x.id === current)!
|
|
@@ -44,11 +44,11 @@ export default function App() {
|
|
| 44 |
<div className="mx-auto flex max-w-[1400px] items-center gap-3 px-4 py-3">
|
| 45 |
<div className="flex h-8 w-8 items-center justify-center rounded-md bg-[#F5C518] text-black"><Clapperboard className="h-4.5 w-4.5" /></div>
|
| 46 |
<div className="min-w-0">
|
| 47 |
-
<h1 className="truncate font-[OdbSerif] text-[17px] font-bold tracking-[0.12em]">奥德彪语录 <span className="text-[#F5C518]">·</span>
|
| 48 |
-
<p className="hidden truncate font-[OdbLatin] text-[12px] tracking-[0.3em] text-white/40 sm:block">ODEBIAO · FORTY-THREE QUOTES
|
| 49 |
</div>
|
| 50 |
<div className="ml-auto hidden items-center gap-4 text-[12px] text-white/50 md:flex">
|
| 51 |
-
<span>43
|
| 52 |
</div>
|
| 53 |
</div>
|
| 54 |
</header>
|
|
@@ -77,7 +77,6 @@ export default function App() {
|
|
| 77 |
<div className="flex flex-wrap items-center gap-2">
|
| 78 |
<span className="font-[OdbLatin] text-[28px] leading-none text-[#F5C518]">№{pad2(current)}</span>
|
| 79 |
<span className="font-[OdbSerif] text-[20px] font-bold tracking-[0.15em]">{c?.chapter}</span>
|
| 80 |
-
<span className="rounded-full bg-white/[0.06] px-2.5 py-0.5 text-[11px] text-white/60 ring-1 ring-white/10">{TREATMENT_INFO[q.treatment].en} · {TREATMENT_INFO[q.treatment].name}</span>
|
| 81 |
</div>
|
| 82 |
<p className="mt-2 font-[OdbSerif] text-[16px] leading-relaxed text-white/90">「{q.text}」</p>
|
| 83 |
{c?.en && <p className="mt-1 font-[OdbLatinItalic] text-[15px] italic text-white/45">{c.en}</p>}
|
|
|
|
| 6 |
import CopyPanel from '@/components/film/CopyPanel'
|
| 7 |
import CoverPanel from '@/components/film/CoverPanel'
|
| 8 |
import { useThumbs } from '@/components/film/useThumbs'
|
| 9 |
+
import { QUOTES } from '@/film/data/quotes'
|
| 10 |
import { getCopy } from '@/film/core/copy'
|
| 11 |
import { pad2 } from '@/film/core/util'
|
| 12 |
|
|
|
|
| 22 |
const [autoKey, setAutoKey] = useState(0)
|
| 23 |
const thumbs = useThumbs(true)
|
| 24 |
|
| 25 |
+
useEffect(() => { document.title = '奥德彪语录' }, [])
|
| 26 |
|
| 27 |
const ids = useMemo(() => (mergeMode && selected.length ? selected : [current]), [mergeMode, selected, current])
|
| 28 |
const q = QUOTES.find((x) => x.id === current)!
|
|
|
|
| 44 |
<div className="mx-auto flex max-w-[1400px] items-center gap-3 px-4 py-3">
|
| 45 |
<div className="flex h-8 w-8 items-center justify-center rounded-md bg-[#F5C518] text-black"><Clapperboard className="h-4.5 w-4.5" /></div>
|
| 46 |
<div className="min-w-0">
|
| 47 |
+
<h1 className="truncate font-[OdbSerif] text-[17px] font-bold tracking-[0.12em]">奥德彪语录 <span className="text-[#F5C518]">·</span> 语录短片</h1>
|
| 48 |
+
<p className="hidden truncate font-[OdbLatin] text-[12px] tracking-[0.3em] text-white/40 sm:block">ODEBIAO · FORTY-THREE QUOTES</p>
|
| 49 |
</div>
|
| 50 |
<div className="ml-auto hidden items-center gap-4 text-[12px] text-white/50 md:flex">
|
| 51 |
+
<span>43 条语录</span><span>原片 · 字幕 · 配音</span><span>本地导出 MP4</span>
|
| 52 |
</div>
|
| 53 |
</div>
|
| 54 |
</header>
|
|
|
|
| 77 |
<div className="flex flex-wrap items-center gap-2">
|
| 78 |
<span className="font-[OdbLatin] text-[28px] leading-none text-[#F5C518]">№{pad2(current)}</span>
|
| 79 |
<span className="font-[OdbSerif] text-[20px] font-bold tracking-[0.15em]">{c?.chapter}</span>
|
|
|
|
| 80 |
</div>
|
| 81 |
<p className="mt-2 font-[OdbSerif] text-[16px] leading-relaxed text-white/90">「{q.text}」</p>
|
| 82 |
{c?.en && <p className="mt-1 font-[OdbLatinItalic] text-[15px] italic text-white/45">{c.en}</p>}
|
src/film/CoverPanel.tsx
CHANGED
|
@@ -74,7 +74,7 @@ export default function CoverPanel({ id }: { id: number }) {
|
|
| 74 |
{visible.map((r) => (
|
| 75 |
<div key={r.key}>
|
| 76 |
<div className="mb-1.5 text-[11px] text-white/45">{r.label} · {r.w}×{r.h}</div>
|
| 77 |
-
<div className={`grid gap-2
|
| 78 |
{DESIGNS.map((d) => {
|
| 79 |
const k = `${r.key}|${d.key}` as Key
|
| 80 |
const on = picked.has(k)
|
|
|
|
| 74 |
{visible.map((r) => (
|
| 75 |
<div key={r.key}>
|
| 76 |
<div className="mb-1.5 text-[11px] text-white/45">{r.label} · {r.w}×{r.h}</div>
|
| 77 |
+
<div className={`grid gap-2 grid-cols-3`}>
|
| 78 |
{DESIGNS.map((d) => {
|
| 79 |
const k = `${r.key}|${d.key}` as Key
|
| 80 |
const on = picked.has(k)
|
src/film/ExportPanel.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import { useMemo, useRef, useState } from 'react'
|
| 2 |
-
import { Download, Film as FilmIcon, Loader2, X, Music
|
| 3 |
import { exportMp4, downloadBlob, exportSupport, RES_DIMS, type Fps, type Res } from '@/film/core/exporter'
|
| 4 |
import { Program } from '@/film/core/film'
|
| 5 |
import { getCopy } from '@/film/core/copy'
|
|
@@ -35,7 +35,6 @@ export default function ExportPanel({ ids, portrait: initialPortrait, label }: P
|
|
| 35 |
const [res, setRes] = useState<Res>('1080P')
|
| 36 |
const [fps, setFps] = useState<Fps>(30)
|
| 37 |
const [music, setMusic] = useState(true)
|
| 38 |
-
const [sfx, setSfx] = useState(true)
|
| 39 |
const [portrait, setPortrait] = useState<boolean | null>(null)
|
| 40 |
const P = portrait ?? initialPortrait
|
| 41 |
const [busy, setBusy] = useState(false)
|
|
@@ -51,7 +50,7 @@ export default function ExportPanel({ ids, portrait: initialPortrait, label }: P
|
|
| 51 |
setMsg(null)
|
| 52 |
abort.current = new AbortController()
|
| 53 |
try {
|
| 54 |
-
const out = await exportMp4({ ids, portrait: P, res, fps, music,
|
| 55 |
const name = ids.length === 1
|
| 56 |
? `奥德彪语录_${pad2(ids[0])}_${getCopy(ids[0])?.chapter ?? ''}_${res}_${fps}fps_${P ? '竖屏' : '横屏'}.mp4`
|
| 57 |
: `奥德彪语录_合集${ids.length}则_${res}_${fps}fps_${P ? '竖屏' : '横屏'}.mp4`
|
|
@@ -86,8 +85,7 @@ export default function ExportPanel({ ids, portrait: initialPortrait, label }: P
|
|
| 86 |
<Seg value={P ? 'p' : 'l'} onChange={(v) => setPortrait(v === 'p')} options={[{ v: 'l', l: '横屏 16:9', sub: 'B站 / 电脑' }, { v: 'p', l: '竖屏 9:16', sub: '抖音 / 手机' }]} />
|
| 87 |
</div>
|
| 88 |
<div className="flex gap-2">
|
| 89 |
-
<Toggle on={music} set={setMusic} label="背景音乐" icon={<Music className="h-3.5 w-3.5" />} />
|
| 90 |
-
<Toggle on={sfx} set={setSfx} label="音效" icon={<Sparkles className="h-3.5 w-3.5" />} />
|
| 91 |
</div>
|
| 92 |
{!sup.video ? (
|
| 93 |
<p className="rounded-md bg-red-500/10 p-3 text-[12px] leading-relaxed text-red-300 ring-1 ring-red-500/30">当前浏览器不支持本地编码导出。请使用最新版 Chrome / Edge(电脑或安卓手机)打开本页导出 MP4。</p>
|
|
|
|
| 1 |
import { useMemo, useRef, useState } from 'react'
|
| 2 |
+
import { Download, Film as FilmIcon, Loader2, X, Music } from 'lucide-react'
|
| 3 |
import { exportMp4, downloadBlob, exportSupport, RES_DIMS, type Fps, type Res } from '@/film/core/exporter'
|
| 4 |
import { Program } from '@/film/core/film'
|
| 5 |
import { getCopy } from '@/film/core/copy'
|
|
|
|
| 35 |
const [res, setRes] = useState<Res>('1080P')
|
| 36 |
const [fps, setFps] = useState<Fps>(30)
|
| 37 |
const [music, setMusic] = useState(true)
|
|
|
|
| 38 |
const [portrait, setPortrait] = useState<boolean | null>(null)
|
| 39 |
const P = portrait ?? initialPortrait
|
| 40 |
const [busy, setBusy] = useState(false)
|
|
|
|
| 50 |
setMsg(null)
|
| 51 |
abort.current = new AbortController()
|
| 52 |
try {
|
| 53 |
+
const out = await exportMp4({ ids, portrait: P, res, fps, music, signal: abort.current.signal, onProgress: (p, stage, eta) => setProg({ p, stage, eta }) })
|
| 54 |
const name = ids.length === 1
|
| 55 |
? `奥德彪语录_${pad2(ids[0])}_${getCopy(ids[0])?.chapter ?? ''}_${res}_${fps}fps_${P ? '竖屏' : '横屏'}.mp4`
|
| 56 |
: `奥德彪语录_合集${ids.length}则_${res}_${fps}fps_${P ? '竖屏' : '横屏'}.mp4`
|
|
|
|
| 85 |
<Seg value={P ? 'p' : 'l'} onChange={(v) => setPortrait(v === 'p')} options={[{ v: 'l', l: '横屏 16:9', sub: 'B站 / 电脑' }, { v: 'p', l: '竖屏 9:16', sub: '抖音 / 手机' }]} />
|
| 86 |
</div>
|
| 87 |
<div className="flex gap-2">
|
| 88 |
+
<Toggle on={music} set={setMusic} label="背景音乐(原片音乐)" icon={<Music className="h-3.5 w-3.5" />} />
|
|
|
|
| 89 |
</div>
|
| 90 |
{!sup.video ? (
|
| 91 |
<p className="rounded-md bg-red-500/10 p-3 text-[12px] leading-relaxed text-red-300 ring-1 ring-red-500/30">当前浏览器不支持本地编码导出。请使用最新版 Chrome / Edge(电脑或安卓手机)打开本页导出 MP4。</p>
|
src/film/Gallery.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import { Check, Play } from 'lucide-react'
|
| 2 |
-
import { QUOTES
|
| 3 |
import { getCopy } from '@/film/core/copy'
|
| 4 |
import { pad2 } from '@/film/core/util'
|
| 5 |
|
|
@@ -32,7 +32,6 @@ export default function Gallery({ current, selected, thumbs, onOpen, onToggle }:
|
|
| 32 |
<div className="absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition group-hover:opacity-100">
|
| 33 |
<Play className="h-8 w-8 fill-white text-white" />
|
| 34 |
</div>
|
| 35 |
-
<span className="absolute left-2 top-2 rounded bg-black/60 px-1.5 py-0.5 font-mono text-[10px] tracking-wider text-white/80 backdrop-blur">{TREATMENT_INFO[q.treatment].name}</span>
|
| 36 |
</div>
|
| 37 |
<div className="p-2.5">
|
| 38 |
<div className="flex items-baseline gap-2">
|
|
|
|
| 1 |
import { Check, Play } from 'lucide-react'
|
| 2 |
+
import { QUOTES } from '@/film/data/quotes'
|
| 3 |
import { getCopy } from '@/film/core/copy'
|
| 4 |
import { pad2 } from '@/film/core/util'
|
| 5 |
|
|
|
|
| 32 |
<div className="absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition group-hover:opacity-100">
|
| 33 |
<Play className="h-8 w-8 fill-white text-white" />
|
| 34 |
</div>
|
|
|
|
| 35 |
</div>
|
| 36 |
<div className="p-2.5">
|
| 37 |
<div className="flex items-baseline gap-2">
|
src/film/Player.tsx
CHANGED
|
@@ -118,7 +118,7 @@ export default function Player({ ids, portrait, setPortrait, onPrev, onNext, onE
|
|
| 118 |
setAudioState('loading')
|
| 119 |
audio.current.buf = null
|
| 120 |
let cancelled = false
|
| 121 |
-
renderProgramAudio(prog, { music: true
|
| 122 |
.then((buf) => {
|
| 123 |
if (cancelled) return
|
| 124 |
audio.current.buf = buf
|
|
@@ -198,7 +198,7 @@ export default function Player({ ids, portrait, setPortrait, onPrev, onNext, onE
|
|
| 198 |
{loading && (
|
| 199 |
<div className="pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-3 bg-black/60 text-[13px] text-white/80">
|
| 200 |
<Loader2 className="h-6 w-6 animate-spin text-[#F5C518]" />
|
| 201 |
-
<span>{!assetsReady ? '正在载入原片与字体…' : '正在
|
| 202 |
</div>
|
| 203 |
)}
|
| 204 |
{!loading && !playing && t < 0.05 && (
|
|
|
|
| 118 |
setAudioState('loading')
|
| 119 |
audio.current.buf = null
|
| 120 |
let cancelled = false
|
| 121 |
+
renderProgramAudio(prog, { music: true })
|
| 122 |
.then((buf) => {
|
| 123 |
if (cancelled) return
|
| 124 |
audio.current.buf = buf
|
|
|
|
| 198 |
{loading && (
|
| 199 |
<div className="pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-3 bg-black/60 text-[13px] text-white/80">
|
| 200 |
<Loader2 className="h-6 w-6 animate-spin text-[#F5C518]" />
|
| 201 |
+
<span>{!assetsReady ? '正在载入原片与字体…' : '正在载入配音…'}</span>
|
| 202 |
</div>
|
| 203 |
)}
|
| 204 |
{!loading && !playing && t < 0.05 && (
|
src/film/core/chrome.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
| 1 |
-
// 片头(冷开场)/ 片尾(徽标)/ 合集开场
|
| 2 |
-
import { FONT } from './assets'
|
| 3 |
-
import { TREATMENT_INFO } from '../data/quotes'
|
| 4 |
-
import type { DC } from './dc'
|
| 5 |
-
import { impulse, numCN } from './dc'
|
| 6 |
-
import { bicycleLineArt, hline, inkBloom, drawBanana } from './fx'
|
| 7 |
-
import { BANANA, txt } from './typo'
|
| 8 |
-
import { clamp, ease, lerp, pad2, smooth } from './util'
|
| 9 |
-
|
| 10 |
-
/** 片头:0 → vs */
|
| 11 |
-
export function drawIntro(dc: DC) {
|
| 12 |
-
const { g, w, h, S, u, t, f } = dc
|
| 13 |
-
const vs = f.vs
|
| 14 |
-
if (t > vs + 0.3) return
|
| 15 |
-
const tr = f.treatment
|
| 16 |
-
const veil = 1 - smooth((t - (vs - 0.9)) / 0.9)
|
| 17 |
-
const out = 1 - smooth((t - (vs - 0.75)) / 0.6) // 文字退场
|
| 18 |
-
const cx = w / 2, cy = h / 2
|
| 19 |
-
const no = pad2(f.id)
|
| 20 |
-
|
| 21 |
-
if (tr === 'SWISS') {
|
| 22 |
-
// 色块擦入 → 擦出
|
| 23 |
-
const kin = ease.inOutExpo(t / 0.55)
|
| 24 |
-
const kout = ease.inOutExpo((t - (vs - 0.5)) / 0.5)
|
| 25 |
-
const x0 = lerp(-w, 0, kin) + lerp(0, w, kout)
|
| 26 |
-
g.save()
|
| 27 |
-
g.fillStyle = '#111'
|
| 28 |
-
g.fillRect(x0, 0, w, h)
|
| 29 |
-
g.beginPath(); g.rect(x0, 0, w, h); g.clip()
|
| 30 |
-
const big = S * (dc.P ? 0.62 : 0.72)
|
| 31 |
-
txt(g, no, x0 + w * 0.06, h * (dc.P ? 0.36 : 0.44), `${big}px ${FONT.display}`, BANANA, 'left', 0.0, clamp((t - 0.3) / 0.05))
|
| 32 |
-
txt(g, f.chapter, x0 + w * 0.06, h * (dc.P ? 0.62 : 0.8), `900 ${S * 0.075}px ${FONT.sans}`, '#fff', 'left', 0.08, clamp((t - 0.6) / 0.05))
|
| 33 |
-
txt(g, 'ODEBIAO QUOTES / 奥德彪语录', x0 + w * 0.06, h * 0.08, `${S * 0.022}px ${FONT.mono}`, '#fff', 'left', 0.1, clamp((t - 0.45) / 0.05))
|
| 34 |
-
txt(g, `${no} / 43`, x0 + w * 0.94, h * 0.08, `${S * 0.022}px ${FONT.mono}`, '#fff', 'right', 0.1, clamp((t - 0.45) / 0.05))
|
| 35 |
-
g.restore()
|
| 36 |
-
dc.post.blurDir = [Math.max(impulse(t, 0.45, 0.06), impulse(t, vs - 0.05, 0.08)) * 0.04, 0]
|
| 37 |
-
return
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
if (tr === 'SCROLL') {
|
| 41 |
-
// 宣纸上墨滴晕开,竖排题字
|
| 42 |
-
g.save()
|
| 43 |
-
g.globalAlpha = veil
|
| 44 |
-
g.fillStyle = '#ece4d3'
|
| 45 |
-
g.fillRect(0, 0, w, h)
|
| 46 |
-
inkBloom(g, cx, cy, S * 0.42, clamp(t / 1.6), f.seed)
|
| 47 |
-
g.globalAlpha = veil * out
|
| 48 |
-
g.font = `${S * 0.16}px ${FONT.brush}`
|
| 49 |
-
g.textAlign = 'center'
|
| 50 |
-
g.textBaseline = 'middle'
|
| 51 |
-
g.fillStyle = `rgba(239,232,218,${clamp((t - 0.5) / 0.6)})`
|
| 52 |
-
g.fillText(numCN(f.id), cx, cy)
|
| 53 |
-
const title = [...f.chapter]
|
| 54 |
-
title.forEach((c, i) => {
|
| 55 |
-
const a = clamp((t - 0.9 - i * 0.12) / 0.4)
|
| 56 |
-
g.globalAlpha = veil * out * a
|
| 57 |
-
g.font = `${S * 0.045}px ${FONT.brush}`
|
| 58 |
-
g.fillStyle = '#1a1712'
|
| 59 |
-
const x = dc.P ? cx : cx + S * 0.34
|
| 60 |
-
const y0 = dc.P ? cy + S * 0.3 : cy - (title.length * S * 0.055) / 2
|
| 61 |
-
if (dc.P) g.fillText(c, x - ((title.length - 1) / 2 - i) * S * 0.058, y0)
|
| 62 |
-
else g.fillText(c, x, y0 + i * S * 0.058)
|
| 63 |
-
})
|
| 64 |
-
g.restore()
|
| 65 |
-
return
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
if (tr === 'DOCUMENT') {
|
| 69 |
-
// 场记板
|
| 70 |
-
g.save()
|
| 71 |
-
g.globalAlpha = veil
|
| 72 |
-
g.fillStyle = '#0b0b0b'
|
| 73 |
-
g.fillRect(0, 0, w, h)
|
| 74 |
-
g.globalAlpha = veil * out
|
| 75 |
-
const bw = Math.min(w * 0.78, S * 1.1), bh = bw * 0.62
|
| 76 |
-
const bx = cx - bw / 2, by = cy - bh / 2 + S * 0.04
|
| 77 |
-
// 打板条
|
| 78 |
-
const close = ease.inCubic(clamp((t - 1.0) / 0.32))
|
| 79 |
-
const ang = lerp(-0.42, 0, close)
|
| 80 |
-
g.save()
|
| 81 |
-
g.translate(bx, by)
|
| 82 |
-
g.rotate(ang)
|
| 83 |
-
const sh = bh * 0.14
|
| 84 |
-
g.fillStyle = '#f2f2f2'
|
| 85 |
-
g.fillRect(0, -sh - 2 * u, bw, sh)
|
| 86 |
-
g.fillStyle = '#111'
|
| 87 |
-
for (let i = 0; i < 8; i++) { g.beginPath(); g.moveTo(i * bw / 7 + sh * 0.6, -sh - 2 * u); g.lineTo(i * bw / 7 + sh * 1.3, -sh - 2 * u); g.lineTo(i * bw / 7 + sh * 0.7, -2 * u); g.lineTo(i * bw / 7, -2 * u); g.fill() }
|
| 88 |
-
g.restore()
|
| 89 |
-
g.strokeStyle = '#f2f2f2'
|
| 90 |
-
g.lineWidth = 3 * u
|
| 91 |
-
g.strokeRect(bx, by, bw, bh)
|
| 92 |
-
const row = (y: number) => { g.beginPath(); g.moveTo(bx, by + y); g.lineTo(bx + bw, by + y); g.stroke() }
|
| 93 |
-
row(bh * 0.3); row(bh * 0.62)
|
| 94 |
-
g.beginPath(); g.moveTo(bx + bw / 2, by + bh * 0.3); g.lineTo(bx + bw / 2, by + bh * 0.62); g.stroke()
|
| 95 |
-
const fs = bh * 0.085
|
| 96 |
-
txt(g, 'PROD. 奥德彪语录 · ODEBIAO QUOTES', bx + bw * 0.04, by + bh * 0.15, `${fs}px ${FONT.mono}`, '#f2f2f2')
|
| 97 |
-
txt(g, `SCENE ${no}`, bx + bw * 0.04, by + bh * 0.46, `${fs * 1.4}px ${FONT.mono}`, '#f2f2f2')
|
| 98 |
-
txt(g, 'TAKE 1', bx + bw * 0.54, by + bh * 0.46, `${fs * 1.4}px ${FONT.mono}`, '#f2f2f2')
|
| 99 |
-
txt(g, f.chapter, bx + bw * 0.04, by + bh * 0.81, `700 ${fs * 1.5}px ${FONT.serif}`, BANANA, 'left', 0.2)
|
| 100 |
-
txt(g, 'DIR. — ROLL A', bx + bw * 0.96, by + bh * 0.81, `${fs * 0.8}px ${FONT.mono}`, '#9a9a9a', 'right')
|
| 101 |
-
g.restore()
|
| 102 |
-
dc.post.flash = Math.max(dc.post.flash, impulse(t, 1.32, 0.05) * 0.5)
|
| 103 |
-
return
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
// 默认:电影冷开场
|
| 107 |
-
g.save()
|
| 108 |
-
g.globalAlpha = veil
|
| 109 |
-
g.fillStyle = '#000'
|
| 110 |
-
g.fillRect(0, 0, w, h)
|
| 111 |
-
g.globalAlpha = out
|
| 112 |
-
const gold = tr === 'EPIC'
|
| 113 |
-
const accent = gold ? '#e9c46a' : tr === 'NOIR' ? '#bcd0e8' : BANANA
|
| 114 |
-
const sc = 1 + (1 - out) * 0.06 + t * 0.012
|
| 115 |
-
g.translate(cx, cy)
|
| 116 |
-
g.scale(sc, sc)
|
| 117 |
-
g.translate(-cx, -cy)
|
| 118 |
-
// 顶部厂牌
|
| 119 |
-
txt(g, 'ODEBIAO QUOTES', cx, cy - S * 0.27, `500 ${S * 0.02}px ${FONT.latin}`, 'rgba(255,255,255,0.7)', 'center', 0.6, clamp((t - 0.15) / 0.5))
|
| 120 |
-
// 编号
|
| 121 |
-
const slam = tr === 'MONUMENT'
|
| 122 |
-
const nk = slam ? ease.outBack(clamp((t - 0.25) / 0.35), 1.6) : ease.outCubic(clamp((t - 0.25) / 0.9))
|
| 123 |
-
g.save()
|
| 124 |
-
g.globalAlpha *= clamp(nk * 1.4)
|
| 125 |
-
g.translate(cx, cy - S * 0.08)
|
| 126 |
-
const ns = slam ? lerp(2.4, 1, nk) : lerp(1.15, 1, nk)
|
| 127 |
-
g.scale(ns, ns)
|
| 128 |
-
g.font = `300 ${S * 0.17}px ${FONT.latin}`
|
| 129 |
-
g.textAlign = 'center'
|
| 130 |
-
g.textBaseline = 'middle'
|
| 131 |
-
g.fillStyle = '#fff'
|
| 132 |
-
g.fillText(`№ ${no}`, 0, 0)
|
| 133 |
-
g.restore()
|
| 134 |
-
if (slam) dc.post.shift = [Math.sin(t * 90) * impulse(t, 0.4, 0.12) * 0.01, Math.cos(t * 80) * impulse(t, 0.4, 0.12) * 0.01]
|
| 135 |
-
// 横线
|
| 136 |
-
hline(g, cx - S * 0.2, cx + S * 0.2, cy + S * 0.04, accent, 1.5 * u, ease.inOutCubic((t - 0.45) / 0.7))
|
| 137 |
-
// 章节标题
|
| 138 |
-
const title = [...f.chapter]
|
| 139 |
-
const fs = S * 0.052
|
| 140 |
-
const trk = 0.55
|
| 141 |
-
const tw = title.length * fs * (1 + trk) - trk * fs
|
| 142 |
-
title.forEach((c, i) => {
|
| 143 |
-
const a = ease.outCubic(clamp((t - 0.75 - i * 0.09) / 0.5))
|
| 144 |
-
txt(g, c, cx - tw / 2 + i * fs * (1 + trk) + fs / 2, cy + S * 0.12 + (1 - a) * fs * 0.3, `600 ${fs}px ${FONT.serif}`, '#fff', 'center', 0, a)
|
| 145 |
-
})
|
| 146 |
-
const info = TREATMENT_INFO[tr]
|
| 147 |
-
txt(g, `${info.en} · ${info.name}`, cx, cy + S * 0.22, `500 ${S * 0.018}px ${FONT.latin}`, accent, 'center', 0.4, clamp((t - 1.1) / 0.5) * 0.9)
|
| 148 |
-
g.restore()
|
| 149 |
-
// 片头漏光过渡
|
| 150 |
-
dc.post.leak = Math.max(dc.post.leak, impulse(t, vs - 0.35, 0.35) * (t > vs - 0.6 ? 0.9 : 0) * (gold || tr === 'CINEMA' ? 1 : 0.5))
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
/** 片尾 */
|
| 154 |
-
export function drawOutro(dc: DC) {
|
| 155 |
-
const { g, w, h, S, u, t, f } = dc
|
| 156 |
-
const t0 = f.holdEnd
|
| 157 |
-
if (t < t0) return
|
| 158 |
-
const lt = t - t0
|
| 159 |
-
if (!f.fullOutro) {
|
| 160 |
-
dc.post.fade = Math.max(dc.post.fade, smooth(lt / 0.65))
|
| 161 |
-
return
|
| 162 |
-
}
|
| 163 |
-
const veil = smooth(lt / 0.55)
|
| 164 |
-
g.save()
|
| 165 |
-
g.globalAlpha = veil
|
| 166 |
-
g.fillStyle = '#060504'
|
| 167 |
-
g.fillRect(0, 0, w, h)
|
| 168 |
-
g.restore()
|
| 169 |
-
const cx = w / 2
|
| 170 |
-
const cy = h * (dc.P ? 0.43 : 0.4)
|
| 171 |
-
const k = ease.inOutCubic((lt - 0.35) / 1.5)
|
| 172 |
-
g.save()
|
| 173 |
-
g.globalAlpha = 1 - smooth((lt - 2.75) / 0.6)
|
| 174 |
-
bicycleLineArt(g, cx, cy, S * 0.085, k, 'rgba(255,255,255,0.92)', BANANA, 2.2 * u)
|
| 175 |
-
const a1 = ease.outCubic((lt - 1.0) / 0.8)
|
| 176 |
-
const fs = S * 0.062
|
| 177 |
-
txt(g, '奥德彪语录', cx, cy + S * 0.2 + (1 - a1) * 10 * u, `700 ${fs}px ${FONT.serif}`, '#fff', 'center', 0.5, a1)
|
| 178 |
-
txt(g, 'ODEBIAO · FORTY-THREE QUOTES OF A BANANA KNIGHT', cx, cy + S * 0.28, `500 ${S * 0.017}px ${FONT.latin}`, 'rgba(255,255,255,0.6)', 'center', 0.25, ease.outCubic((lt - 1.3) / 0.8))
|
| 179 |
-
hline(g, cx - S * 0.06, cx + S * 0.06, cy + S * 0.335, BANANA, 1.5 * u, ease.outCubic((lt - 1.5) / 0.6))
|
| 180 |
-
txt(g, `${pad2(f.id)} / 43 · ${f.chapter}`, cx, cy + S * 0.375, `500 ${S * 0.02}px ${FONT.serif}`, BANANA, 'center', 0.3, ease.outCubic((lt - 1.7) / 0.6))
|
| 181 |
-
g.restore()
|
| 182 |
-
dc.post.fade = Math.max(dc.post.fade, smooth((lt - (f.T - t0 - 0.45)) / 0.45))
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
/** 合集开场 */
|
| 186 |
-
export function drawOpener(dc: DC, t: number, dur: number, ids: number[]) {
|
| 187 |
-
const { g, w, h, S, u } = dc
|
| 188 |
-
const cx = w / 2, cy = h / 2
|
| 189 |
-
g.save()
|
| 190 |
-
g.fillStyle = 'rgba(0,0,0,0.55)'
|
| 191 |
-
g.fillRect(0, 0, w, h)
|
| 192 |
-
const a = ease.outCubic(t / 0.9) * (1 - smooth((t - dur + 0.6) / 0.6))
|
| 193 |
-
g.globalAlpha = a
|
| 194 |
-
for (let i = 0; i < 3; i++) drawBanana(g, cx + (i - 1) * S * 0.05, cy - S * 0.22, S * 0.035, -0.3 + i * 0.25, BANANA, ease.outBack(clamp((t - 0.2 - i * 0.1) / 0.5)))
|
| 195 |
-
txt(g, '奥德彪语录', cx, cy - S * 0.06, `700 ${S * 0.1}px ${FONT.serif}`, '#fff', 'center', 0.35)
|
| 196 |
-
hline(g, cx - S * 0.18, cx + S * 0.18, cy + S * 0.04, BANANA, 1.5 * u, ease.inOutCubic((t - 0.4) / 0.8))
|
| 197 |
-
txt(g, `合 集 · 共 ${ids.length} 则`, cx, cy + S * 0.1, `500 ${S * 0.035}px ${FONT.serif}`, BANANA, 'center', 0.2)
|
| 198 |
-
txt(g, ids.map((i) => pad2(i)).join(' · ').slice(0, 80), cx, cy + S * 0.17, `500 ${S * 0.018}px ${FONT.latin}`, 'rgba(255,255,255,0.6)', 'center', 0.15)
|
| 199 |
-
g.restore()
|
| 200 |
-
dc.post.fade = Math.max(1 - smooth(t / 0.6), smooth((t - dur + 0.35) / 0.35) * 0.9)
|
| 201 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/film/core/covers.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
| 1 |
-
// 封面
|
| 2 |
import { FONT, loadFonts } from './assets'
|
| 3 |
import { Film, quoteById, type CharT } from './film'
|
| 4 |
-
import {
|
| 5 |
import { Post, defaultPost } from './post'
|
| 6 |
-
import {
|
| 7 |
-
import {
|
| 8 |
-
import { numCN } from './dc'
|
| 9 |
import { pad2 } from './util'
|
| 10 |
|
| 11 |
export type Ratio = '16:9' | '4:3' | '3:4'
|
| 12 |
-
export type Design = '
|
| 13 |
export const RATIOS: { key: Ratio; w: number; h: number; label: string }[] = [
|
| 14 |
{ key: '16:9', w: 1920, h: 1080, label: '16:9 横版(B站 / 西瓜 / YouTube)' },
|
| 15 |
{ key: '4:3', w: 1440, h: 1080, label: '4:3 横版(视频号 / 公众号)' },
|
| 16 |
{ key: '3:4', w: 1080, h: 1440, label: '3:4 竖版(小红书 / 抖音)' },
|
| 17 |
]
|
| 18 |
export const DESIGNS: { key: Design; name: string }[] = [
|
| 19 |
-
{ key: '
|
| 20 |
-
{ key: '
|
| 21 |
-
{ key: '
|
| 22 |
-
{ key: 'ink', name: '水墨圆窗' },
|
| 23 |
]
|
|
|
|
|
|
|
| 24 |
|
| 25 |
let coverVideo: HTMLVideoElement | null = null
|
| 26 |
async function getVideo() {
|
|
@@ -37,168 +37,125 @@ async function getVideo() {
|
|
| 37 |
return coverVideo
|
| 38 |
}
|
| 39 |
|
| 40 |
-
const
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
-
function
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
-
export async function renderCover(id: number, ratio: Ratio, design: Design
|
| 51 |
await loadFonts()
|
| 52 |
const R = RATIOS.find((r) => r.key === ratio)!
|
| 53 |
-
const w =
|
| 54 |
const q = quoteById(id)
|
| 55 |
const film = new Film(q)
|
| 56 |
const v = await getVideo()
|
| 57 |
-
const
|
| 58 |
-
await seekExact(v,
|
| 59 |
const c = document.createElement('canvas')
|
| 60 |
c.width = w
|
| 61 |
c.height = h
|
| 62 |
const g = c.getContext('2d')!
|
| 63 |
const S = Math.min(w, h)
|
| 64 |
-
const u = S / 1080
|
| 65 |
const P = h > w
|
| 66 |
const cl = clausesOf(q.text)
|
| 67 |
-
const
|
|
|
|
| 68 |
const post = defaultPost()
|
| 69 |
-
|
| 70 |
-
const no = pad2(id)
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
const gr = g.createLinearGradient(0, h * 0.3, 0, h)
|
| 75 |
-
gr.addColorStop(0, 'rgba(0,0,0,0.05)')
|
| 76 |
-
gr.addColorStop(1, 'rgba(0,0,0,0.85)')
|
| 77 |
-
g.fillStyle = gr
|
| 78 |
-
g.fillRect(0, 0, w, h)
|
| 79 |
-
g.fillStyle = 'rgba(0,0,0,0.25)'
|
| 80 |
-
g.fillRect(0, 0, w, h)
|
| 81 |
-
godRays(g, w, h, 1, { x: 0.75, y: -0.1, color: '#ffcf70', alpha: 0.1, seed: id })
|
| 82 |
-
txt(g, `奥德彪语录 №${no}`, w * 0.06, h * 0.08, `600 ${S * 0.034}px ${FONT.serif}`, '#fff', 'left', 0.3)
|
| 83 |
-
txt(g, film.chapter, w * 0.94, h * 0.08, `600 ${S * 0.034}px ${FONT.serif}`, BANANA, 'right', 0.4)
|
| 84 |
-
const big = fake(punch.replace(/[,。;]/g, ''), q.keys)
|
| 85 |
-
const lines = breakClause(big, P ? 6 : 9)
|
| 86 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 900, maxW: w * 0.88, maxSize: S * (P ? 0.15 : 0.14), tracking: 0.04, lineH: 1.22, align: 'left', x: w * 0.06, y: h * (P ? 0.66 : 0.6) })
|
| 87 |
-
L.placed.forEach((p) => drawChar(g, p, 99, 'cut', { family: FONT.serif, weight: 900, fill: '#fff', keyFill: BANANA, shadow: 'rgba(0,0,0,0.5)', shadowBlur: 30 * u }))
|
| 88 |
-
if (cl.length > 1) {
|
| 89 |
-
const font = `500 ${S * 0.036}px ${FONT.serif}`
|
| 90 |
-
g.save(); g.font = font
|
| 91 |
-
let pre = cl.slice(0, -1).join('')
|
| 92 |
-
const fits = (x: string) => g.measureText(x).width * 1.08 <= w * 0.88
|
| 93 |
-
if (!fits(pre)) { while (pre.length > 1 && !fits(pre + '…')) pre = pre.slice(0, -1); pre += '…' }
|
| 94 |
-
g.restore()
|
| 95 |
-
txt(g, pre, w * 0.06, h * (P ? 0.66 : 0.6) - L.height / 2 - S * 0.06, font, 'rgba(255,255,255,0.85)', 'left', 0.08)
|
| 96 |
-
}
|
| 97 |
-
txt(g, 'ODEBIAO QUOTES · A FILM IN 43 LINES', w * 0.06, h * 0.93, `500 ${S * 0.022}px ${FONT.latin}`, 'rgba(255,255,255,0.7)', 'left', 0.3)
|
| 98 |
-
post.gain = [1.1, 1.0, 0.86]
|
| 99 |
-
post.lift = [0.02, 0.03, 0.05]
|
| 100 |
-
post.contrast = 1.12
|
| 101 |
-
post.bloom = 0.25
|
| 102 |
-
post.halation = 0.2
|
| 103 |
-
post.vignette = 0.5
|
| 104 |
-
post.grain = 0.05
|
| 105 |
-
}
|
| 106 |
|
| 107 |
-
if (design === '
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
g.fillRect(0, 0, w, h)
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
g.
|
| 116 |
-
g.lineWidth = 2 * u
|
| 117 |
-
g.strokeRect(S * 0.035, S * 0.035, w - S * 0.07, h - S * 0.07)
|
| 118 |
-
const numY = strip.y + strip.h + S * (P ? 0.1 : 0.08)
|
| 119 |
-
txt(g, `№ ${no}`, w / 2, numY, `300 ${S * 0.09}px ${FONT.latin}`, '#e9c46a', 'center', 0.1)
|
| 120 |
-
// 文字区:编号下方 → 章节名上方,按可用高度自适应字号
|
| 121 |
-
const top = numY + S * 0.075, bottom = h - S * 0.17
|
| 122 |
-
let per = P ? 9 : 14
|
| 123 |
-
let lines = cl.flatMap((x) => breakClause(fake(x, q.keys), per))
|
| 124 |
-
if (lines.length > 4) { per = P ? 10 : 18; lines = cl.flatMap((x) => breakClause(fake(x, q.keys), per)) }
|
| 125 |
-
const maxByH = (bottom - top) / (lines.length * 1.55 - 0.55)
|
| 126 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 600, maxW: w * 0.8, maxSize: Math.min(S * (P ? 0.062 : 0.058), maxByH), tracking: 0.14, lineH: 1.55, x: w / 2, y: (top + bottom) / 2 })
|
| 127 |
-
L.placed.forEach((p) => drawChar(g, p, 99, 'cut', { family: FONT.serif, weight: 600, fill: '#f4efe4', keyFill: '#e9c46a' }))
|
| 128 |
-
txt(g, `— ${film.chapter} —`, w / 2, Math.min(h - S * 0.115, (top + bottom) / 2 + L.height / 2 + S * 0.065), `500 ${S * 0.03}px ${FONT.serif}`, '#e9c46a', 'center', 0.4)
|
| 129 |
-
txt(g, '奥德彪语录', w / 2, h - S * 0.07, `500 ${S * 0.022}px ${FONT.serif}`, 'rgba(255,255,255,0.55)', 'center', 0.8)
|
| 130 |
-
post.grain = 0.04
|
| 131 |
-
post.vignette = 0.3
|
| 132 |
-
post.bloom = 0.1
|
| 133 |
}
|
| 134 |
|
| 135 |
-
if (design === '
|
| 136 |
-
|
|
|
|
|
|
|
| 137 |
g.fillRect(0, 0, w, h)
|
| 138 |
-
|
| 139 |
-
const
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
drawChar(g, p, 99, 'cut', { family: FONT.sans, weight: 900, fill: '#111', keyFill: BANANA })
|
| 151 |
-
})
|
| 152 |
-
txt(g, '奥德彪语录 / ODEBIAO QUOTES', P ? w * 0.08 : w * 0.06, S * 0.05, `${S * 0.022}px ${FONT.mono}`, '#111', 'left', 0.08)
|
| 153 |
-
txt(g, film.chapter, P ? w * 0.08 : w * 0.06, (P ? h * 0.63 : h * 0.4) + L.height / 2 + S * 0.06, `700 ${S * 0.04}px ${FONT.sans}`, '#111', 'left', 0.1)
|
| 154 |
-
drawBanana(g, P ? w * 0.18 : w * 0.43, P ? h * 0.88 : h * 0.9, S * 0.05, -0.4, '#111')
|
| 155 |
-
post.grain = 0.03
|
| 156 |
-
post.vignette = 0.1
|
| 157 |
-
post.bloom = 0
|
| 158 |
-
post.halation = 0
|
| 159 |
}
|
| 160 |
|
| 161 |
-
if (design === '
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
const
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
g.
|
| 173 |
-
g.strokeStyle = 'rgba(26,23,18,0.85)'
|
| 174 |
-
g.lineWidth = 3 * u
|
| 175 |
-
g.beginPath(); g.arc(cx, cy, r, 0, Math.PI * 2); g.stroke()
|
| 176 |
-
const cols = cl.map((x) => fake(x, q.keys))
|
| 177 |
-
const area = P ? { right: w * 0.9, maxH: h * 0.36, cy: h * 0.76, maxW: w * 0.82 } : { right: w * 0.9, maxH: h * 0.74, cy: h * 0.5, maxW: w * 0.4 }
|
| 178 |
-
let V = layoutVertical(cols, { rightX: area.right, topY: 0, maxH: area.maxH, maxSize: S * 0.1, centerY: area.cy, colGap: 0.7 })
|
| 179 |
-
if (V.width > area.maxW) V = layoutVertical(cols, { rightX: area.right, topY: 0, maxH: area.maxH, maxSize: V.size * (area.maxW / V.width), centerY: area.cy, colGap: 0.7 })
|
| 180 |
-
V.placed.forEach((p) => drawChar(g, p, 99, 'cut', { family: FONT.brush, weight: 400, fill: '#17140f', keyFill: '#a3231a' }))
|
| 181 |
-
const last = V.placed[V.placed.length - 1]
|
| 182 |
-
if (last) seal(g, last.x - V.size * 0.6 - S * 0.04, Math.min(h - S * 0.08, last.y + V.size * 1.4), S * 0.08, '德彪', 1, FONT.brush)
|
| 183 |
-
txt(g, `语录 其${numCN(id)}`, S * 0.06, S * 0.07, `500 ${S * 0.03}px ${FONT.serif}`, '#7a1c14', 'left', 0.3)
|
| 184 |
-
txt(g, film.chapter, S * 0.06, S * 0.12, `${S * 0.04}px ${FONT.brush}`, '#17140f', 'left', 0.2)
|
| 185 |
-
post.grain = 0.04
|
| 186 |
-
post.vignette = 0.25
|
| 187 |
-
post.bloom = 0
|
| 188 |
-
post.halation = 0
|
| 189 |
-
post.saturation = 0.95
|
| 190 |
}
|
| 191 |
-
if (design === 'poster') particles(g, w, h, 2, { n: 40, seed: id, color: '#ffcf70', size: 2.4 * u, alpha: 0.5 })
|
| 192 |
|
| 193 |
-
// 统一胶片后期
|
| 194 |
const pp = new Post(w, h)
|
| 195 |
-
if (pp.render(c, post, id
|
| 196 |
const out = document.createElement('canvas')
|
| 197 |
out.width = w
|
| 198 |
out.height = h
|
| 199 |
out.getContext('2d')!.drawImage(pp.canvas, 0, 0)
|
| 200 |
-
|
| 201 |
-
lose?.loseContext()
|
| 202 |
return out
|
| 203 |
}
|
| 204 |
return c
|
|
|
|
| 1 |
+
// 封面:16:9 / 4:3 / 3:4 × 3 款(与成片一致的极简风格)
|
| 2 |
import { FONT, loadFonts } from './assets'
|
| 3 |
import { Film, quoteById, type CharT } from './film'
|
| 4 |
+
import { seekExact, footageUrl } from './footage'
|
| 5 |
import { Post, defaultPost } from './post'
|
| 6 |
+
import { drawVideo } from './fx'
|
| 7 |
+
import { adv, breakClause } from './typo'
|
|
|
|
| 8 |
import { pad2 } from './util'
|
| 9 |
|
| 10 |
export type Ratio = '16:9' | '4:3' | '3:4'
|
| 11 |
+
export type Design = 'still' | 'center' | 'minimal'
|
| 12 |
export const RATIOS: { key: Ratio; w: number; h: number; label: string }[] = [
|
| 13 |
{ key: '16:9', w: 1920, h: 1080, label: '16:9 横版(B站 / 西瓜 / YouTube)' },
|
| 14 |
{ key: '4:3', w: 1440, h: 1080, label: '4:3 横版(视频号 / 公众号)' },
|
| 15 |
{ key: '3:4', w: 1080, h: 1440, label: '3:4 竖版(小红书 / 抖音)' },
|
| 16 |
]
|
| 17 |
export const DESIGNS: { key: Design; name: string }[] = [
|
| 18 |
+
{ key: 'still', name: '原片定格' },
|
| 19 |
+
{ key: 'center', name: '暗场金句' },
|
| 20 |
+
{ key: 'minimal', name: '黑底留白' },
|
|
|
|
| 21 |
]
|
| 22 |
+
const FRAMES = [5.6, 8.8, 12.2, 15.0, 17.2]
|
| 23 |
+
const SUB = '#F5F2EA'
|
| 24 |
|
| 25 |
let coverVideo: HTMLVideoElement | null = null
|
| 26 |
async function getVideo() {
|
|
|
|
| 37 |
return coverVideo
|
| 38 |
}
|
| 39 |
|
| 40 |
+
const asChars = (s: string): CharT[] => [...s].filter((c) => !/[,。;、]/.test(c)).map((ch, i) => ({ ch, i, t0: 0, t1: 0, clause: 0, key: false }))
|
| 41 |
+
const clausesOf = (text: string) => text.match(/[^,。;?!、]+[,。;?!、]?/g) ?? [text]
|
| 42 |
+
|
| 43 |
+
/** 居中排一段文字(自动缩放到 maxW / maxH) */
|
| 44 |
+
function block(g: CanvasRenderingContext2D, lines: CharT[][], o: { cx: number; cy: number; maxW: number; maxH: number; size: number; weight: number; track: number; lineH: number; fill: string; align?: 'center' | 'left'; x?: number }) {
|
| 45 |
+
const fam = FONT.serif
|
| 46 |
+
const widths = lines.map((l) => l.reduce((s, c) => s + adv(g, fam, o.weight, c.ch), 0) + o.track * (l.length - 1))
|
| 47 |
+
let fs = Math.min(o.size, o.maxW / Math.max(...widths))
|
| 48 |
+
fs = Math.min(fs, o.maxH / (lines.length * o.lineH - (o.lineH - 1)))
|
| 49 |
+
const H = fs * (lines.length * o.lineH - (o.lineH - 1))
|
| 50 |
+
g.save()
|
| 51 |
+
g.font = `${o.weight} ${fs}px ${fam}`
|
| 52 |
+
g.fillStyle = o.fill
|
| 53 |
+
g.textBaseline = 'middle'
|
| 54 |
+
g.textAlign = 'left'
|
| 55 |
+
lines.forEach((l, li) => {
|
| 56 |
+
let x = o.align === 'left' ? o.x! : o.cx - (widths[li] * fs) / 2
|
| 57 |
+
const y = o.cy - H / 2 + fs / 2 + li * fs * o.lineH
|
| 58 |
+
for (const c of l) { g.fillText(c.ch, x, y); x += adv(g, fam, o.weight, c.ch) * fs + o.track * fs }
|
| 59 |
+
})
|
| 60 |
+
g.restore()
|
| 61 |
+
return { H, fs }
|
| 62 |
}
|
| 63 |
|
| 64 |
+
function label(g: CanvasRenderingContext2D, s: string, x: number, y: number, font: string, fill: string, align: CanvasTextAlign, track = 0) {
|
| 65 |
+
g.save()
|
| 66 |
+
g.font = font
|
| 67 |
+
g.fillStyle = fill
|
| 68 |
+
g.textBaseline = 'middle'
|
| 69 |
+
if (!track) { g.textAlign = align; g.fillText(s, x, y); g.restore(); return }
|
| 70 |
+
const fs = parseFloat(font.match(/(\d+(?:\.\d+)?)px/)![1])
|
| 71 |
+
const ws = [...s].map((c) => g.measureText(c).width)
|
| 72 |
+
const total = ws.reduce((a, b) => a + b, 0) + track * fs * (ws.length - 1)
|
| 73 |
+
let xx = align === 'center' ? x - total / 2 : align === 'right' ? x - total : x
|
| 74 |
+
g.textAlign = 'left'
|
| 75 |
+
;[...s].forEach((c, i) => { g.fillText(c, xx, y); xx += ws[i] + track * fs })
|
| 76 |
+
g.restore()
|
| 77 |
}
|
| 78 |
|
| 79 |
+
export async function renderCover(id: number, ratio: Ratio, design: Design): Promise<HTMLCanvasElement> {
|
| 80 |
await loadFonts()
|
| 81 |
const R = RATIOS.find((r) => r.key === ratio)!
|
| 82 |
+
const w = R.w, h = R.h
|
| 83 |
const q = quoteById(id)
|
| 84 |
const film = new Film(q)
|
| 85 |
const v = await getVideo()
|
| 86 |
+
const di = DESIGNS.findIndex((d) => d.key === design)
|
| 87 |
+
await seekExact(v, FRAMES[(id + di * 2) % FRAMES.length])
|
| 88 |
const c = document.createElement('canvas')
|
| 89 |
c.width = w
|
| 90 |
c.height = h
|
| 91 |
const g = c.getContext('2d')!
|
| 92 |
const S = Math.min(w, h)
|
|
|
|
| 93 |
const P = h > w
|
| 94 |
const cl = clausesOf(q.text)
|
| 95 |
+
const no = `№ ${pad2(id)}`
|
| 96 |
+
const brand = `500 ${S * 0.03}px ${FONT.serif}`
|
| 97 |
const post = defaultPost()
|
| 98 |
+
post.bloom = 0; post.halation = 0; post.aberration = 0; post.flicker = 0; post.grain = 0.02; post.vignette = 0.25
|
|
|
|
| 99 |
|
| 100 |
+
g.fillStyle = '#000'
|
| 101 |
+
g.fillRect(0, 0, w, h)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
+
if (design === 'still') {
|
| 104 |
+
// 原片满屏 + 底部字幕式金句
|
| 105 |
+
drawVideo(g, v, { x: 0, y: 0, w, h }, { zoom: 1.02, fx: 0.48, fy: 0.5 })
|
| 106 |
+
const gr = g.createLinearGradient(0, h * 0.45, 0, h)
|
| 107 |
+
gr.addColorStop(0, 'rgba(0,0,0,0)')
|
| 108 |
+
gr.addColorStop(1, 'rgba(0,0,0,0.72)')
|
| 109 |
+
g.fillStyle = gr
|
| 110 |
g.fillRect(0, 0, w, h)
|
| 111 |
+
label(g, '奥德彪语录', S * 0.06, S * 0.08, brand, '#fff', 'left', 0.42)
|
| 112 |
+
label(g, no, S * 0.06, S * 0.135, `400 ${S * 0.026}px ${FONT.latin}`, 'rgba(255,255,255,0.75)', 'left')
|
| 113 |
+
const lines = cl.flatMap((x) => breakClause(asChars(x), P ? 9 : 14))
|
| 114 |
+
g.shadowColor = 'rgba(0,0,0,0.6)'; g.shadowBlur = 16
|
| 115 |
+
block(g, lines, { cx: w / 2, cy: h * (P ? 0.78 : 0.79), maxW: w * 0.86, maxH: h * (P ? 0.3 : 0.3), size: S * 0.07, weight: 600, track: 0.1, lineH: 1.5, fill: SUB })
|
| 116 |
+
g.shadowBlur = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
| 118 |
|
| 119 |
+
if (design === 'center') {
|
| 120 |
+
// 原片压暗 + 居中金句(最后一句放大)
|
| 121 |
+
drawVideo(g, v, { x: 0, y: 0, w, h }, { zoom: 1.04, fx: 0.48, fy: 0.5 })
|
| 122 |
+
g.fillStyle = 'rgba(0,0,0,0.55)'
|
| 123 |
g.fillRect(0, 0, w, h)
|
| 124 |
+
const punch = cl[cl.length - 1]
|
| 125 |
+
const pre = cl.slice(0, -1).join('').replace(/[,。;、]$/, '')
|
| 126 |
+
const big = breakClause(asChars(punch), P ? 7 : 10)
|
| 127 |
+
const r = block(g, big, { cx: w / 2, cy: h * 0.52, maxW: w * 0.82, maxH: h * 0.34, size: S * 0.13, weight: 700, track: 0.06, lineH: 1.3, fill: SUB })
|
| 128 |
+
if (pre) {
|
| 129 |
+
const preLines = breakClause(asChars(pre), P ? 14 : 22)
|
| 130 |
+
block(g, preLines, { cx: w / 2, cy: h * 0.52 - r.H / 2 - S * 0.085, maxW: w * 0.8, maxH: S * 0.12, size: S * 0.04, weight: 400, track: 0.12, lineH: 1.45, fill: 'rgba(245,242,234,0.78)' })
|
| 131 |
+
}
|
| 132 |
+
label(g, '奥 德 彪 语 录', w / 2, h * 0.1, brand, 'rgba(255,255,255,0.85)', 'center', 0.2)
|
| 133 |
+
g.fillStyle = 'rgba(255,255,255,0.5)'
|
| 134 |
+
g.fillRect(w / 2 - S * 0.03, h * 0.9 - S * 0.045, S * 0.06, 2)
|
| 135 |
+
label(g, `${no} · ${film.chapter}`, w / 2, h * 0.9, `400 ${S * 0.026}px ${FONT.serif}`, 'rgba(255,255,255,0.7)', 'center', 0.2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
| 137 |
|
| 138 |
+
if (design === 'minimal') {
|
| 139 |
+
// 黑底:上方一条原片画面,下方全文
|
| 140 |
+
const vh = P ? w * 0.5625 : h * 0.42
|
| 141 |
+
const vw = P ? w : vh * (16 / 9) > w * 0.9 ? w * 0.9 : vh * (16 / 9)
|
| 142 |
+
const vx = (w - vw) / 2, vy = P ? h * 0.12 : h * 0.12
|
| 143 |
+
drawVideo(g, v, { x: vx, y: vy, w: vw, h: vh }, { zoom: 1.02, fx: 0.48, fy: 0.5 })
|
| 144 |
+
const top = vy + vh + S * 0.08
|
| 145 |
+
const bottom = h - S * 0.14
|
| 146 |
+
const lines = cl.flatMap((x) => breakClause(asChars(x), P ? 10 : 16))
|
| 147 |
+
block(g, lines, { cx: w / 2, cy: (top + bottom) / 2, maxW: w * 0.84, maxH: bottom - top, size: S * 0.055, weight: 500, track: 0.14, lineH: 1.6, fill: SUB })
|
| 148 |
+
label(g, '奥德彪语录', w / 2, h - S * 0.075, `500 ${S * 0.024}px ${FONT.serif}`, 'rgba(255,255,255,0.6)', 'center', 0.5)
|
| 149 |
+
label(g, no, w / 2, vy / 2, `400 ${S * 0.03}px ${FONT.latin}`, 'rgba(255,255,255,0.7)', 'center')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
}
|
|
|
|
| 151 |
|
|
|
|
| 152 |
const pp = new Post(w, h)
|
| 153 |
+
if (pp.render(c, post, id)) {
|
| 154 |
const out = document.createElement('canvas')
|
| 155 |
out.width = w
|
| 156 |
out.height = h
|
| 157 |
out.getContext('2d')!.drawImage(pp.canvas, 0, 0)
|
| 158 |
+
pp.gl?.getExtension('WEBGL_lose_context')?.loseContext()
|
|
|
|
| 159 |
return out
|
| 160 |
}
|
| 161 |
return c
|
src/film/core/dc.ts
CHANGED
|
@@ -1,63 +1,4 @@
|
|
| 1 |
-
import type { Film
|
| 2 |
-
import type { PostParams } from './post'
|
| 3 |
-
import { FONT } from './assets'
|
| 4 |
-
import { clamp, ease, smooth } from './util'
|
| 5 |
|
| 6 |
-
/**
|
| 7 |
-
export
|
| 8 |
-
g: CanvasRenderingContext2D
|
| 9 |
-
w: number
|
| 10 |
-
h: number
|
| 11 |
-
P: boolean // 竖屏
|
| 12 |
-
S: number // 短边
|
| 13 |
-
u: number // 单位(短边 / 1080)
|
| 14 |
-
t: number // 片内时间
|
| 15 |
-
f: Film
|
| 16 |
-
video: HTMLVideoElement | null
|
| 17 |
-
shot: number | null
|
| 18 |
-
useLocal: number // 当前镜头已播放时长
|
| 19 |
-
post: PostParams
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
export const impulse = (t: number, at: number, decay = 0.25) => { const d = t - at; return d < 0 ? 0 : Math.exp(-d / decay) }
|
| 23 |
-
|
| 24 |
-
/** 金句落点时间(最后一页第一个字) */
|
| 25 |
-
export const punchAt = (f: Film) => f.pages[f.pages.length - 1].chars[0]?.t0 ?? f.vs
|
| 26 |
-
|
| 27 |
-
export function pageAlpha(f: Film, p: PageT, t: number, fin = 0.25, fout = 0.3) {
|
| 28 |
-
const a = smooth((t - p.t0) / fin)
|
| 29 |
-
if (p.last) return a
|
| 30 |
-
return Math.min(a, smooth((p.t1 - t) / fout))
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
export function numCN(n: number) {
|
| 34 |
-
const d = '零一二三四五六七八九'
|
| 35 |
-
if (n < 10) return d[n]
|
| 36 |
-
if (n < 20) return '十' + (n % 10 ? d[n % 10] : '')
|
| 37 |
-
return d[Math.floor(n / 10)] + '十' + (n % 10 ? d[n % 10] : '')
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
/** 英文字幕(定格时出现) */
|
| 41 |
-
export function drawEnglish(dc: DC, x: number, y: number, maxW: number, color = 'rgba(255,255,255,0.82)', align: CanvasTextAlign = 'center', size?: number) {
|
| 42 |
-
const { g, f, t } = dc
|
| 43 |
-
if (!f.en) return
|
| 44 |
-
const a = ease.outCubic((t - f.ve - 0.25) / 0.9) * (1 - smooth((t - f.holdEnd + 0.1) / 0.4) * 0)
|
| 45 |
-
if (a <= 0) return
|
| 46 |
-
const fs = size ?? dc.S * 0.03
|
| 47 |
-
g.save()
|
| 48 |
-
g.globalAlpha *= clamp(a)
|
| 49 |
-
g.font = `italic 400 ${fs}px ${FONT.latinItalic}`
|
| 50 |
-
g.fillStyle = color
|
| 51 |
-
g.textAlign = align
|
| 52 |
-
g.textBaseline = 'middle'
|
| 53 |
-
const words = f.en.split(' ')
|
| 54 |
-
const lines: string[] = []
|
| 55 |
-
let cur = ''
|
| 56 |
-
for (const wd of words) {
|
| 57 |
-
const test = cur ? cur + ' ' + wd : wd
|
| 58 |
-
if (g.measureText(test).width > maxW && cur) { lines.push(cur); cur = wd } else cur = test
|
| 59 |
-
}
|
| 60 |
-
if (cur) lines.push(cur)
|
| 61 |
-
lines.slice(0, 3).forEach((l, i) => g.fillText(l, x, y + i * fs * 1.35 + (1 - a) * fs * 0.4))
|
| 62 |
-
g.restore()
|
| 63 |
-
}
|
|
|
|
| 1 |
+
import type { Film } from './film'
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
/** 金句(最后一句字幕)开始时间 */
|
| 4 |
+
export const punchAt = (f: Film) => f.pages[f.pages.length - 1]?.chars[0]?.t0 ?? f.vs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/film/core/exporter.ts
CHANGED
|
@@ -14,7 +14,6 @@ export interface ExportOptions {
|
|
| 14 |
res: Res
|
| 15 |
fps: Fps
|
| 16 |
music: boolean
|
| 17 |
-
sfx: boolean
|
| 18 |
onProgress?: (p: number, stage: string, etaSec?: number) => void
|
| 19 |
signal?: AbortSignal
|
| 20 |
}
|
|
@@ -86,10 +85,10 @@ export async function exportMp4(o: ExportOptions): Promise<{ blob: Blob; hasAudi
|
|
| 86 |
if (!vcfg) throw new Error(`当前设备不支持 ${W}×${H} 的 H.264 编码,请尝试更低分辨率。`)
|
| 87 |
const acodec = await pickAudioCodec()
|
| 88 |
|
| 89 |
-
o.onProgress?.(0.01, '混音(配音 +
|
| 90 |
let audio: AudioBuffer | null = null
|
| 91 |
if (acodec) {
|
| 92 |
-
audio = await renderProgramAudio(prog, { music: o.music
|
| 93 |
if (acodec.cfg.sampleRate !== audio.sampleRate) audio = await resample(audio, acodec.cfg.sampleRate)
|
| 94 |
}
|
| 95 |
check()
|
|
|
|
| 14 |
res: Res
|
| 15 |
fps: Fps
|
| 16 |
music: boolean
|
|
|
|
| 17 |
onProgress?: (p: number, stage: string, etaSec?: number) => void
|
| 18 |
signal?: AbortSignal
|
| 19 |
}
|
|
|
|
| 85 |
if (!vcfg) throw new Error(`当前设备不支持 ${W}×${H} 的 H.264 编码,请尝试更低分辨率。`)
|
| 86 |
const acodec = await pickAudioCodec()
|
| 87 |
|
| 88 |
+
o.onProgress?.(0.01, '混音(配音 + 原片音乐)')
|
| 89 |
let audio: AudioBuffer | null = null
|
| 90 |
if (acodec) {
|
| 91 |
+
audio = await renderProgramAudio(prog, { music: o.music })
|
| 92 |
if (acodec.cfg.sampleRate !== audio.sampleRate) audio = await resample(audio, acodec.cfg.sampleRate)
|
| 93 |
}
|
| 94 |
check()
|
src/film/core/film.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
| 1 |
-
// 语录 →
|
| 2 |
import VOICE from '../data/voice.json'
|
| 3 |
-
import { QUOTES, type QuoteMeta
|
| 4 |
import { getCopy } from './copy'
|
| 5 |
-
import {
|
| 6 |
-
import { mulberry32 } from './util'
|
| 7 |
|
| 8 |
interface VoiceEntry { id: number; duration: number; chars: [number, number, number][]; clauses: string[] }
|
| 9 |
const V = VOICE as unknown as Record<string, VoiceEntry>
|
|
@@ -13,75 +12,53 @@ export interface ClauseT { index: number; text: string; chars: CharT[]; t0: numb
|
|
| 13 |
export interface PageT { index: number; clauses: ClauseT[]; chars: CharT[]; t0: number; t1: number; last: boolean }
|
| 14 |
|
| 15 |
const PUNCT = /[,。;、,.;::]/
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
DOCUMENT: 0.95, NOIR: 0.4, EPIC: 0.45, SWISS: 0.75,
|
| 19 |
-
}
|
| 20 |
-
/** 每页最多字数(横屏 / 竖屏) */
|
| 21 |
-
const PAGE_BUDGET: Record<Treatment, [number, number]> = {
|
| 22 |
-
CINEMA: [18, 14], MONUMENT: [9, 8], SCROLL: [60, 40], DIPTYCH: [30, 30], VELOCITY: [12, 10],
|
| 23 |
-
DOCUMENT: [22, 16], NOIR: [16, 12], EPIC: [16, 16], SWISS: [16, 12],
|
| 24 |
-
}
|
| 25 |
|
| 26 |
-
export
|
|
|
|
|
|
|
| 27 |
|
| 28 |
export class Film {
|
| 29 |
q: QuoteMeta
|
| 30 |
id: number
|
| 31 |
text: string
|
| 32 |
-
treatment: Treatment
|
| 33 |
chapter: string
|
| 34 |
en: string
|
| 35 |
voiceDur: number
|
| 36 |
-
intro: number
|
| 37 |
vs: number
|
| 38 |
ve: number
|
| 39 |
-
holdEnd: number
|
| 40 |
T: number
|
| 41 |
-
|
| 42 |
-
fullOutro: boolean
|
| 43 |
chars: CharT[] = []
|
| 44 |
clauses: ClauseT[] = []
|
| 45 |
pages: PageT[] = []
|
| 46 |
uses: ShotUse[] = []
|
| 47 |
-
seed: number
|
| 48 |
-
rnd: () => number
|
| 49 |
portrait: boolean
|
| 50 |
|
| 51 |
-
constructor(q: QuoteMeta,
|
| 52 |
this.q = q
|
| 53 |
this.id = q.id
|
| 54 |
this.text = q.text
|
| 55 |
-
this.
|
| 56 |
const c = getCopy(q.id)
|
| 57 |
this.chapter = c?.chapter || `第${q.id}则`
|
| 58 |
this.en = c?.en || ''
|
| 59 |
-
this.compact = !!opts.compact
|
| 60 |
-
this.portrait = !!opts.portrait
|
| 61 |
-
this.fullOutro = !this.compact || !!opts.last
|
| 62 |
-
this.seed = q.id * 7919 + 17
|
| 63 |
-
this.rnd = mulberry32(this.seed)
|
| 64 |
const v = V[String(q.id)]
|
| 65 |
this.voiceDur = v?.duration ?? 4
|
| 66 |
-
this.
|
| 67 |
-
this.vs = this.intro
|
| 68 |
this.ve = this.vs + this.voiceDur
|
| 69 |
-
this.
|
| 70 |
-
this.
|
| 71 |
this.buildText(v)
|
| 72 |
this.buildPages()
|
| 73 |
-
this.
|
| 74 |
}
|
| 75 |
|
| 76 |
private buildText(v?: VoiceEntry) {
|
| 77 |
const text = this.text
|
| 78 |
const timing = new Map<number, [number, number]>()
|
| 79 |
v?.chars.forEach(([i, a, b]) => timing.set(i, [a, b]))
|
| 80 |
-
const keyMask = new Array(text.length).fill(false)
|
| 81 |
-
for (const k of this.q.keys) {
|
| 82 |
-
let p = text.indexOf(k)
|
| 83 |
-
while (p >= 0) { for (let j = 0; j < k.length; j++) keyMask[p + j] = true; p = text.indexOf(k, p + k.length) }
|
| 84 |
-
}
|
| 85 |
const clauseTexts = v?.clauses ?? [text]
|
| 86 |
let pos = 0
|
| 87 |
let lastT = 0
|
|
@@ -94,8 +71,8 @@ export class Film {
|
|
| 94 |
const tm = timing.get(i)
|
| 95 |
const t0 = this.vs + (tm ? tm[0] : lastT)
|
| 96 |
const t1 = this.vs + (tm ? tm[1] : lastT + 0.12)
|
| 97 |
-
lastT =
|
| 98 |
-
const c: CharT = { ch, i, t0, t1, clause: ci, key:
|
| 99 |
chars.push(c)
|
| 100 |
this.chars.push(c)
|
| 101 |
}
|
|
@@ -104,121 +81,76 @@ export class Film {
|
|
| 104 |
})
|
| 105 |
}
|
| 106 |
|
|
|
|
| 107 |
private buildPages() {
|
| 108 |
-
const
|
| 109 |
-
const budget = this.portrait ? bp : bl
|
| 110 |
const groups: ClauseT[][] = []
|
| 111 |
let cur: ClauseT[] = []
|
| 112 |
let n = 0
|
| 113 |
this.clauses.forEach((c) => {
|
| 114 |
if (cur.length && n + c.chars.length > budget) { groups.push(cur); cur = []; n = 0 }
|
| 115 |
-
cur.push(c)
|
|
|
|
| 116 |
})
|
| 117 |
if (cur.length) groups.push(cur)
|
| 118 |
-
|
| 119 |
-
if (
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
if (total > budget * 0.7) groups.splice(0, 1, g.slice(0, -1), g.slice(-1))
|
| 123 |
-
}
|
| 124 |
-
this.pages = groups.map((cl, i) => ({
|
| 125 |
-
index: i, clauses: cl, chars: cl.flatMap((c) => c.chars),
|
| 126 |
-
t0: cl[0].t0 - 0.28, t1: 0, last: i === groups.length - 1,
|
| 127 |
-
}))
|
| 128 |
-
this.pages.forEach((p, i) => { p.t1 = i < this.pages.length - 1 ? this.pages[i + 1].t0 : this.holdEnd })
|
| 129 |
-
}
|
| 130 |
-
|
| 131 |
-
private buildShots() {
|
| 132 |
-
const pref = this.q.shots?.length ? [...this.q.shots] : [3, 2, 5]
|
| 133 |
-
const pool = [...pref, ...ORIGINAL_SHOTS.filter((i) => !pref.includes(i))]
|
| 134 |
-
const sp = SPEED[this.treatment]
|
| 135 |
-
const r = this.rnd
|
| 136 |
-
let k = 0
|
| 137 |
-
const next = () => pool[k++ % pool.length]
|
| 138 |
-
const cuts: number[] = [0]
|
| 139 |
-
// 片头镜头 → 每页一个镜头 → 片尾
|
| 140 |
-
this.pages.forEach((p, i) => { if (i > 0 || this.treatment !== 'SWISS') cuts.push(Math.max(0.6, p.t0 - (i === 0 ? 0.35 : 0.08))) })
|
| 141 |
-
if (this.treatment === 'DIPTYCH') {
|
| 142 |
-
const b = this.clauses.find((c) => c.index >= (this.q.split ?? Math.ceil(this.clauses.length / 2)))
|
| 143 |
-
if (b) cuts.push(b.t0 - 0.2)
|
| 144 |
-
}
|
| 145 |
-
const end = this.fullOutro ? this.holdEnd + 1.0 : this.T
|
| 146 |
-
const uniq = Array.from(new Set(cuts.map((c) => Math.round(c * 100) / 100))).sort((a, b) => a - b).filter((c) => c < end - 0.3)
|
| 147 |
-
uniq.forEach((c, i) => {
|
| 148 |
-
const to = i < uniq.length - 1 ? uniq[i + 1] : end
|
| 149 |
-
const shot = next()
|
| 150 |
-
const rv = r(), ro = r()
|
| 151 |
-
const off = this.q.offsets?.[i] ?? ro * 0.35
|
| 152 |
-
this.uses.push(makeUse(`${this.id}-${i}`, shot, c, to, sp * (this.q.offsets ? 1 : 0.85 + rv * 0.3), off))
|
| 153 |
-
})
|
| 154 |
}
|
| 155 |
|
| 156 |
useAt(t: number): { use: ShotUse; ft: number } | null {
|
| 157 |
for (const u of this.uses) if (t >= u.from && t < u.to) return { use: u, ft: footageTime(u, t) }
|
| 158 |
-
|
|
|
|
| 159 |
}
|
| 160 |
nextUse(t: number): { use: ShotUse; ft: number } | null {
|
| 161 |
for (const u of this.uses) if (u.from > t) return { use: u, ft: footageTime(u, u.from) }
|
| 162 |
return null
|
| 163 |
}
|
| 164 |
pageAt(t: number) {
|
| 165 |
-
let p =
|
| 166 |
for (const pg of this.pages) if (t >= pg.t0) p = pg
|
| 167 |
return p
|
| 168 |
}
|
| 169 |
-
/** 是否在讲话(用于音量表、闪避) */
|
| 170 |
-
speaking(t: number) {
|
| 171 |
-
for (const c of this.clauses) if (t >= c.t0 - 0.05 && t <= c.t1 + 0.05) return true
|
| 172 |
-
return false
|
| 173 |
-
}
|
| 174 |
}
|
| 175 |
|
| 176 |
export function quoteById(id: number) { return QUOTES.find((q) => q.id === id)! }
|
| 177 |
|
| 178 |
-
// ---------------- Program:单
|
| 179 |
export interface Segment { film: Film; start: number; end: number }
|
| 180 |
|
| 181 |
export class Program {
|
| 182 |
segments: Segment[] = []
|
| 183 |
duration = 0
|
| 184 |
-
opener = 0
|
| 185 |
ids: number[]
|
| 186 |
portrait: boolean
|
| 187 |
constructor(ids: number[], portrait: boolean) {
|
| 188 |
this.ids = ids
|
| 189 |
this.portrait = portrait
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
ids.forEach((id, i) => {
|
| 194 |
-
const f = new Film(quoteById(id), { compact, portrait, last: i === ids.length - 1 })
|
| 195 |
this.segments.push({ film: f, start: t, end: t + f.T })
|
| 196 |
t += f.T
|
| 197 |
})
|
| 198 |
this.duration = t
|
| 199 |
}
|
| 200 |
-
segAt(t: number): { seg: Segment
|
| 201 |
-
if (t <
|
| 202 |
-
for (const s of this.segments) if (t < s.end) return { seg: s, local: t - s.start }
|
| 203 |
const s = this.segments[this.segments.length - 1]
|
| 204 |
return { seg: s, local: Math.min(t - s.start, s.film.T - 1e-3) }
|
| 205 |
}
|
| 206 |
footageAt(t: number) {
|
| 207 |
const { seg, local } = this.segAt(t)
|
| 208 |
-
if (!seg) {
|
| 209 |
-
// 合集开场使用第一个镜头的慢放
|
| 210 |
-
const f = this.segments[0]?.film
|
| 211 |
-
const u = makeUse('opener', 9, 0, this.opener, 0.6, 0.1)
|
| 212 |
-
return f ? { use: u, ft: footageTime(u, t) } : null
|
| 213 |
-
}
|
| 214 |
return seg.film.useAt(local)
|
| 215 |
}
|
| 216 |
nextFootage(t: number) {
|
| 217 |
const { seg, local } = this.segAt(t)
|
| 218 |
-
if (!seg) return this.segments[0]?.film.nextUse(-1) ?? null
|
| 219 |
const n = seg.film.nextUse(local)
|
| 220 |
if (n) return n
|
| 221 |
const idx = this.segments.indexOf(seg)
|
| 222 |
-
|
|
|
|
| 223 |
}
|
| 224 |
}
|
|
|
|
| 1 |
+
// 语录 → 时间线:原片 + 逐句字幕 + 配音
|
| 2 |
import VOICE from '../data/voice.json'
|
| 3 |
+
import { QUOTES, type QuoteMeta } from '../data/quotes'
|
| 4 |
import { getCopy } from './copy'
|
| 5 |
+
import { footageTime, planUses, type ShotUse } from './footage'
|
|
|
|
| 6 |
|
| 7 |
interface VoiceEntry { id: number; duration: number; chars: [number, number, number][]; clauses: string[] }
|
| 8 |
const V = VOICE as unknown as Record<string, VoiceEntry>
|
|
|
|
| 12 |
export interface PageT { index: number; clauses: ClauseT[]; chars: CharT[]; t0: number; t1: number; last: boolean }
|
| 13 |
|
| 14 |
const PUNCT = /[,。;、,.;::]/
|
| 15 |
+
/** 原片起点:轮换,避免合集里每条都从同一画面开始 */
|
| 16 |
+
const STARTS = [0, 4.3, 7.24, 10.94]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
export const LEAD = 1.2 // 配音开始前
|
| 19 |
+
export const TAIL = 2.8 // 配音结束后
|
| 20 |
+
export const MIN_LEN = 8
|
| 21 |
|
| 22 |
export class Film {
|
| 23 |
q: QuoteMeta
|
| 24 |
id: number
|
| 25 |
text: string
|
|
|
|
| 26 |
chapter: string
|
| 27 |
en: string
|
| 28 |
voiceDur: number
|
|
|
|
| 29 |
vs: number
|
| 30 |
ve: number
|
|
|
|
| 31 |
T: number
|
| 32 |
+
start: number
|
|
|
|
| 33 |
chars: CharT[] = []
|
| 34 |
clauses: ClauseT[] = []
|
| 35 |
pages: PageT[] = []
|
| 36 |
uses: ShotUse[] = []
|
|
|
|
|
|
|
| 37 |
portrait: boolean
|
| 38 |
|
| 39 |
+
constructor(q: QuoteMeta, portrait = false) {
|
| 40 |
this.q = q
|
| 41 |
this.id = q.id
|
| 42 |
this.text = q.text
|
| 43 |
+
this.portrait = portrait
|
| 44 |
const c = getCopy(q.id)
|
| 45 |
this.chapter = c?.chapter || `第${q.id}则`
|
| 46 |
this.en = c?.en || ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
const v = V[String(q.id)]
|
| 48 |
this.voiceDur = v?.duration ?? 4
|
| 49 |
+
this.vs = LEAD
|
|
|
|
| 50 |
this.ve = this.vs + this.voiceDur
|
| 51 |
+
this.T = Math.max(MIN_LEN, this.ve + TAIL)
|
| 52 |
+
this.start = STARTS[(q.id - 1) % STARTS.length]
|
| 53 |
this.buildText(v)
|
| 54 |
this.buildPages()
|
| 55 |
+
this.uses = planUses(String(q.id), this.start, this.T)
|
| 56 |
}
|
| 57 |
|
| 58 |
private buildText(v?: VoiceEntry) {
|
| 59 |
const text = this.text
|
| 60 |
const timing = new Map<number, [number, number]>()
|
| 61 |
v?.chars.forEach(([i, a, b]) => timing.set(i, [a, b]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
const clauseTexts = v?.clauses ?? [text]
|
| 63 |
let pos = 0
|
| 64 |
let lastT = 0
|
|
|
|
| 71 |
const tm = timing.get(i)
|
| 72 |
const t0 = this.vs + (tm ? tm[0] : lastT)
|
| 73 |
const t1 = this.vs + (tm ? tm[1] : lastT + 0.12)
|
| 74 |
+
lastT = tm ? tm[1] : lastT + 0.12
|
| 75 |
+
const c: CharT = { ch, i, t0, t1, clause: ci, key: false }
|
| 76 |
chars.push(c)
|
| 77 |
this.chars.push(c)
|
| 78 |
}
|
|
|
|
| 81 |
})
|
| 82 |
}
|
| 83 |
|
| 84 |
+
/** 字幕分页:一页一句(短句合并),金句单独成页 */
|
| 85 |
private buildPages() {
|
| 86 |
+
const budget = this.portrait ? 11 : 16
|
|
|
|
| 87 |
const groups: ClauseT[][] = []
|
| 88 |
let cur: ClauseT[] = []
|
| 89 |
let n = 0
|
| 90 |
this.clauses.forEach((c) => {
|
| 91 |
if (cur.length && n + c.chars.length > budget) { groups.push(cur); cur = []; n = 0 }
|
| 92 |
+
cur.push(c)
|
| 93 |
+
n += c.chars.length
|
| 94 |
})
|
| 95 |
if (cur.length) groups.push(cur)
|
| 96 |
+
const last = groups[groups.length - 1]
|
| 97 |
+
if (last && last.length >= 2) groups.splice(groups.length - 1, 1, last.slice(0, -1), last.slice(-1))
|
| 98 |
+
this.pages = groups.map((cl, i) => ({ index: i, clauses: cl, chars: cl.flatMap((c) => c.chars), t0: cl[0].t0 - 0.2, t1: 0, last: i === groups.length - 1 }))
|
| 99 |
+
this.pages.forEach((p, i) => { p.t1 = i < this.pages.length - 1 ? this.pages[i + 1].t0 : this.T })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
|
| 102 |
useAt(t: number): { use: ShotUse; ft: number } | null {
|
| 103 |
for (const u of this.uses) if (t >= u.from && t < u.to) return { use: u, ft: footageTime(u, t) }
|
| 104 |
+
const u = this.uses[this.uses.length - 1]
|
| 105 |
+
return u ? { use: u, ft: footageTime(u, t) } : null
|
| 106 |
}
|
| 107 |
nextUse(t: number): { use: ShotUse; ft: number } | null {
|
| 108 |
for (const u of this.uses) if (u.from > t) return { use: u, ft: footageTime(u, u.from) }
|
| 109 |
return null
|
| 110 |
}
|
| 111 |
pageAt(t: number) {
|
| 112 |
+
let p: PageT | null = null
|
| 113 |
for (const pg of this.pages) if (t >= pg.t0) p = pg
|
| 114 |
return p
|
| 115 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
export function quoteById(id: number) { return QUOTES.find((q) => q.id === id)! }
|
| 119 |
|
| 120 |
+
// ---------------- Program:单条或合集(按顺序首尾相接,黑场过渡) ----------------
|
| 121 |
export interface Segment { film: Film; start: number; end: number }
|
| 122 |
|
| 123 |
export class Program {
|
| 124 |
segments: Segment[] = []
|
| 125 |
duration = 0
|
|
|
|
| 126 |
ids: number[]
|
| 127 |
portrait: boolean
|
| 128 |
constructor(ids: number[], portrait: boolean) {
|
| 129 |
this.ids = ids
|
| 130 |
this.portrait = portrait
|
| 131 |
+
let t = 0
|
| 132 |
+
ids.forEach((id) => {
|
| 133 |
+
const f = new Film(quoteById(id), portrait)
|
|
|
|
|
|
|
| 134 |
this.segments.push({ film: f, start: t, end: t + f.T })
|
| 135 |
t += f.T
|
| 136 |
})
|
| 137 |
this.duration = t
|
| 138 |
}
|
| 139 |
+
segAt(t: number): { seg: Segment; local: number } {
|
| 140 |
+
for (const s of this.segments) if (t < s.end) return { seg: s, local: Math.max(0, t - s.start) }
|
|
|
|
| 141 |
const s = this.segments[this.segments.length - 1]
|
| 142 |
return { seg: s, local: Math.min(t - s.start, s.film.T - 1e-3) }
|
| 143 |
}
|
| 144 |
footageAt(t: number) {
|
| 145 |
const { seg, local } = this.segAt(t)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
return seg.film.useAt(local)
|
| 147 |
}
|
| 148 |
nextFootage(t: number) {
|
| 149 |
const { seg, local } = this.segAt(t)
|
|
|
|
| 150 |
const n = seg.film.nextUse(local)
|
| 151 |
if (n) return n
|
| 152 |
const idx = this.segments.indexOf(seg)
|
| 153 |
+
const nx = this.segments[idx + 1]?.film
|
| 154 |
+
return nx ? { use: nx.uses[0], ft: footageTime(nx.uses[0], 0) } : null
|
| 155 |
}
|
| 156 |
}
|
src/film/core/footage.ts
CHANGED
|
@@ -1,55 +1,39 @@
|
|
| 1 |
-
// 原片
|
| 2 |
import { BASE } from './assets'
|
| 3 |
|
| 4 |
-
export
|
| 5 |
-
|
| 6 |
-
/** 由场景检测切分出的镜头(秒)。fx/fy 为主体大致位置,用于竖屏裁切。 */
|
| 7 |
-
export const SHOTS: Shot[] = [
|
| 8 |
-
{ id: 0, start: 0.08, end: 2.72, fx: 0.42, fy: 0.55, luma: 'dark' },
|
| 9 |
-
{ id: 1, start: 3.6, end: 4.2, fx: 0.5, fy: 0.5, luma: 'bright' },
|
| 10 |
-
{ id: 2, start: 4.3, end: 7.1, fx: 0.43, fy: 0.45, luma: 'bright' },
|
| 11 |
-
{ id: 3, start: 7.24, end: 10.8, fx: 0.5, fy: 0.5, luma: 'mid' },
|
| 12 |
-
{ id: 4, start: 10.94, end: 13.2, fx: 0.45, fy: 0.5, luma: 'mid' },
|
| 13 |
-
{ id: 5, start: 13.34, end: 16.4, fx: 0.48, fy: 0.5, luma: 'dark' },
|
| 14 |
-
{ id: 6, start: 16.54, end: 18.7, fx: 0.55, fy: 0.45, luma: 'mid' },
|
| 15 |
-
// —— 补充素材(Pexels 免费授权,见 README 素材来源)——
|
| 16 |
-
{ id: 7, start: 18.87, end: 24.67, fx: 0.5, fy: 0.5, luma: 'mid' }, // 香蕉特写
|
| 17 |
-
{ id: 8, start: 24.87, end: 30.67, fx: 0.5, fy: 0.5, luma: 'mid' }, // 旋转的车轮
|
| 18 |
-
{ id: 9, start: 30.87, end: 36.67, fx: 0.5, fy: 0.5, luma: 'mid' }, // 香蕉园航拍
|
| 19 |
-
{ id: 10, start: 36.87, end: 42.67, fx: 0.5, fy: 0.55, luma: 'mid' }, // 黄昏土路独行
|
| 20 |
-
{ id: 11, start: 42.87, end: 48.67, fx: 0.5, fy: 0.5, luma: 'dark' }, // 雨夜车窗
|
| 21 |
-
{ id: 12, start: 48.87, end: 54.67, fx: 0.5, fy: 0.5, luma: 'mid' }, // 老牛耕田
|
| 22 |
-
{ id: 13, start: 54.87, end: 60.67, fx: 0.5, fy: 0.4, luma: 'dark' }, // 闹钟 5:59 → 6:00
|
| 23 |
-
]
|
| 24 |
-
export const ORIGINAL_SHOTS = [0, 2, 3, 4, 5, 6]
|
| 25 |
export const SRC_FPS = 30
|
| 26 |
|
| 27 |
export interface ShotUse {
|
| 28 |
key: string
|
| 29 |
-
|
| 30 |
-
from: number // 时间线开始(秒)
|
| 31 |
to: number // 时间线结束
|
| 32 |
-
|
| 33 |
-
|
| 34 |
}
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
const
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
export function footageTime(u: ShotUse, t: number) {
|
| 47 |
-
const
|
| 48 |
-
|
| 49 |
-
return Math.min(s.end - 0.04, Math.max(s.start, ft))
|
| 50 |
}
|
| 51 |
|
| 52 |
export const footageUrl = () => `${BASE}media/footage.mp4`
|
|
|
|
| 53 |
|
| 54 |
function makeVideo(): HTMLVideoElement {
|
| 55 |
const v = document.createElement('video')
|
|
@@ -83,7 +67,7 @@ export function seekExact(v: HTMLVideoElement, ft: number): Promise<void> {
|
|
| 83 |
})
|
| 84 |
}
|
| 85 |
|
| 86 |
-
/** 预览:双
|
| 87 |
export class FootageDeck {
|
| 88 |
els: HTMLVideoElement[]
|
| 89 |
keys: (string | null)[] = [null, null]
|
|
@@ -92,13 +76,12 @@ export class FootageDeck {
|
|
| 92 |
this.els = [makeVideo(), makeVideo()]
|
| 93 |
this.ready = Promise.all(this.els.map(waitReady)).then(() => undefined)
|
| 94 |
}
|
| 95 |
-
private slotOf(key: string) { return this.keys.indexOf(key) }
|
| 96 |
sync(cur: { use: ShotUse; ft: number } | null, next: { use: ShotUse; ft: number } | null, playing: boolean): HTMLVideoElement | null {
|
| 97 |
let ci = -1
|
| 98 |
if (cur) {
|
| 99 |
-
ci = this.
|
| 100 |
if (ci < 0) {
|
| 101 |
-
const ni = next ? this.
|
| 102 |
ci = ni === 0 ? 1 : 0
|
| 103 |
this.keys[ci] = cur.use.key
|
| 104 |
this.els[ci].currentTime = cur.ft
|
|
@@ -106,8 +89,7 @@ export class FootageDeck {
|
|
| 106 |
const v = this.els[ci]
|
| 107 |
const drift = Math.abs(v.currentTime - cur.ft)
|
| 108 |
if (playing) {
|
| 109 |
-
if (
|
| 110 |
-
if (drift > 0.22 && !v.seeking) v.currentTime = cur.ft
|
| 111 |
if (v.paused) v.play().catch(() => {})
|
| 112 |
} else {
|
| 113 |
if (!v.paused) v.pause()
|
|
@@ -118,9 +100,8 @@ export class FootageDeck {
|
|
| 118 |
const oi = ci === 0 ? 1 : 0
|
| 119 |
if (this.keys[oi] !== next.use.key) {
|
| 120 |
this.keys[oi] = next.use.key
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
v.currentTime = next.ft
|
| 124 |
}
|
| 125 |
}
|
| 126 |
for (let i = 0; i < 2; i++) if (i !== ci && !this.els[i].paused) this.els[i].pause()
|
|
@@ -130,7 +111,7 @@ export class FootageDeck {
|
|
| 130 |
dispose() { this.els.forEach((v) => { v.pause(); v.removeAttribute('src'); v.load() }) }
|
| 131 |
}
|
| 132 |
|
| 133 |
-
/** 导出:逐帧精确取帧
|
| 134 |
export class FootageExact {
|
| 135 |
v: HTMLVideoElement
|
| 136 |
ready: Promise<void>
|
|
|
|
| 1 |
+
// 原片:只使用《奥德彪.MP4》,按时间循环播放;播放与导出两种取帧方式
|
| 2 |
import { BASE } from './assets'
|
| 3 |
|
| 4 |
+
export const CLIP_LEN = 18.7 // 原片可用时长(秒)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
export const SRC_FPS = 30
|
| 6 |
|
| 7 |
export interface ShotUse {
|
| 8 |
key: string
|
| 9 |
+
from: number // 时间线开始
|
|
|
|
| 10 |
to: number // 时间线结束
|
| 11 |
+
offset: number // 原片起点
|
| 12 |
+
speed: number
|
| 13 |
}
|
| 14 |
|
| 15 |
+
/** 把一段时间线映射到原片:从 start 开始实时播放,播到结尾自动回到开头 */
|
| 16 |
+
export function planUses(key: string, start: number, T: number): ShotUse[] {
|
| 17 |
+
const uses: ShotUse[] = []
|
| 18 |
+
let t = 0
|
| 19 |
+
let off = start
|
| 20 |
+
let i = 0
|
| 21 |
+
while (t < T - 1e-3) {
|
| 22 |
+
const len = Math.min(CLIP_LEN - off, T - t)
|
| 23 |
+
uses.push({ key: `${key}-${i++}`, from: t, to: t + len, offset: off, speed: 1 })
|
| 24 |
+
t += len
|
| 25 |
+
off = 0
|
| 26 |
+
}
|
| 27 |
+
return uses
|
| 28 |
}
|
| 29 |
|
| 30 |
export function footageTime(u: ShotUse, t: number) {
|
| 31 |
+
const ft = u.offset + Math.max(0, t - u.from) * u.speed
|
| 32 |
+
return Math.min(CLIP_LEN - 0.02, Math.max(0, ft))
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
export const footageUrl = () => `${BASE}media/footage.mp4`
|
| 36 |
+
export const bgmUrl = () => `${BASE}media/bgm.mp3`
|
| 37 |
|
| 38 |
function makeVideo(): HTMLVideoElement {
|
| 39 |
const v = document.createElement('video')
|
|
|
|
| 67 |
})
|
| 68 |
}
|
| 69 |
|
| 70 |
+
/** 预览:双播放器交替,提前把下一段 seek 好,循环/换片无卡顿 */
|
| 71 |
export class FootageDeck {
|
| 72 |
els: HTMLVideoElement[]
|
| 73 |
keys: (string | null)[] = [null, null]
|
|
|
|
| 76 |
this.els = [makeVideo(), makeVideo()]
|
| 77 |
this.ready = Promise.all(this.els.map(waitReady)).then(() => undefined)
|
| 78 |
}
|
|
|
|
| 79 |
sync(cur: { use: ShotUse; ft: number } | null, next: { use: ShotUse; ft: number } | null, playing: boolean): HTMLVideoElement | null {
|
| 80 |
let ci = -1
|
| 81 |
if (cur) {
|
| 82 |
+
ci = this.keys.indexOf(cur.use.key)
|
| 83 |
if (ci < 0) {
|
| 84 |
+
const ni = next ? this.keys.indexOf(next.use.key) : -1
|
| 85 |
ci = ni === 0 ? 1 : 0
|
| 86 |
this.keys[ci] = cur.use.key
|
| 87 |
this.els[ci].currentTime = cur.ft
|
|
|
|
| 89 |
const v = this.els[ci]
|
| 90 |
const drift = Math.abs(v.currentTime - cur.ft)
|
| 91 |
if (playing) {
|
| 92 |
+
if (drift > 0.2 && !v.seeking) v.currentTime = cur.ft
|
|
|
|
| 93 |
if (v.paused) v.play().catch(() => {})
|
| 94 |
} else {
|
| 95 |
if (!v.paused) v.pause()
|
|
|
|
| 100 |
const oi = ci === 0 ? 1 : 0
|
| 101 |
if (this.keys[oi] !== next.use.key) {
|
| 102 |
this.keys[oi] = next.use.key
|
| 103 |
+
this.els[oi].pause()
|
| 104 |
+
this.els[oi].currentTime = next.ft
|
|
|
|
| 105 |
}
|
| 106 |
}
|
| 107 |
for (let i = 0; i < 2; i++) if (i !== ci && !this.els[i].paused) this.els[i].pause()
|
|
|
|
| 111 |
dispose() { this.els.forEach((v) => { v.pause(); v.removeAttribute('src'); v.load() }) }
|
| 112 |
}
|
| 113 |
|
| 114 |
+
/** 导出:逐帧精确取帧 */
|
| 115 |
export class FootageExact {
|
| 116 |
v: HTMLVideoElement
|
| 117 |
ready: Promise<void>
|
src/film/core/fx.ts
CHANGED
|
@@ -1,514 +1,31 @@
|
|
| 1 |
-
//
|
| 2 |
-
import { SHOTS } from './footage'
|
| 3 |
-
import { clamp, ease, fbm1, hash, lerp, mulberry32, rgba } from './util'
|
| 4 |
-
|
| 5 |
export interface Rect { x: number; y: number; w: number; h: number }
|
| 6 |
|
| 7 |
-
const cache = new Map<string, HTMLCanvasElement>()
|
| 8 |
-
function cached(key: string, w: number, h: number, draw: (g: CanvasRenderingContext2D, w: number, h: number) => void) {
|
| 9 |
-
const k = `${key}-${w}x${h}`
|
| 10 |
-
let c = cache.get(k)
|
| 11 |
-
if (!c) {
|
| 12 |
-
c = document.createElement('canvas')
|
| 13 |
-
c.width = w
|
| 14 |
-
c.height = h
|
| 15 |
-
draw(c.getContext('2d')!, w, h)
|
| 16 |
-
cache.set(k, c)
|
| 17 |
-
}
|
| 18 |
-
return c
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
/** 素材绘制:cover 裁切 + 主体对焦点 + 推拉 */
|
| 22 |
export function drawVideo(
|
| 23 |
g: CanvasRenderingContext2D,
|
| 24 |
video: HTMLVideoElement | null,
|
| 25 |
r: Rect,
|
| 26 |
-
o: { zoom?: number; fx?: number; fy?: number
|
| 27 |
) {
|
| 28 |
g.save()
|
| 29 |
g.beginPath()
|
| 30 |
g.rect(r.x, r.y, r.w, r.h)
|
| 31 |
g.clip()
|
| 32 |
-
g.globalAlpha *= o.alpha ?? 1
|
| 33 |
if (!video || video.readyState < 2 || !video.videoWidth) {
|
| 34 |
-
|
| 35 |
-
gr.addColorStop(0, '#1b1813')
|
| 36 |
-
gr.addColorStop(1, '#070605')
|
| 37 |
-
g.fillStyle = gr
|
| 38 |
g.fillRect(r.x, r.y, r.w, r.h)
|
| 39 |
g.restore()
|
| 40 |
return
|
| 41 |
}
|
| 42 |
-
const
|
| 43 |
-
const
|
| 44 |
-
const fy = o.fy ?? sh?.fy ?? 0.5
|
| 45 |
const vw = video.videoWidth, vh = video.videoHeight
|
| 46 |
-
const
|
| 47 |
-
const s = Math.max(r.w / vw, r.h / vh) * z
|
| 48 |
const dw = vw * s, dh = vh * s
|
| 49 |
-
/
|
| 50 |
-
let
|
| 51 |
-
let y = r.y + r.h / 2 - fy * dh + (o.panY ?? 0) * r.h
|
| 52 |
x = Math.min(r.x, Math.max(r.x + r.w - dw, x))
|
| 53 |
y = Math.min(r.y, Math.max(r.y + r.h - dh, y))
|
| 54 |
-
if (o.mirror) {
|
| 55 |
-
g.translate(r.x * 2 + r.w, 0)
|
| 56 |
-
g.scale(-1, 1)
|
| 57 |
-
}
|
| 58 |
g.drawImage(video, x, y, dw, dh)
|
| 59 |
g.restore()
|
| 60 |
}
|
| 61 |
-
|
| 62 |
-
/** 去色(canvas 混合模式实现,跨浏览器) */
|
| 63 |
-
export function desaturate(g: CanvasRenderingContext2D, r: Rect, amount = 1) {
|
| 64 |
-
g.save()
|
| 65 |
-
g.globalCompositeOperation = 'saturation'
|
| 66 |
-
g.globalAlpha = amount
|
| 67 |
-
g.fillStyle = '#808080'
|
| 68 |
-
g.fillRect(r.x, r.y, r.w, r.h)
|
| 69 |
-
g.restore()
|
| 70 |
-
}
|
| 71 |
-
export function tint(g: CanvasRenderingContext2D, r: Rect, color: string, mode: GlobalCompositeOperation, alpha: number) {
|
| 72 |
-
g.save()
|
| 73 |
-
g.globalCompositeOperation = mode
|
| 74 |
-
g.globalAlpha = alpha
|
| 75 |
-
g.fillStyle = color
|
| 76 |
-
g.fillRect(r.x, r.y, r.w, r.h)
|
| 77 |
-
g.restore()
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
export function letterbox(g: CanvasRenderingContext2D, w: number, h: number, ratio: number, k: number, color = '#000') {
|
| 81 |
-
// ratio:目标画幅宽高比(如 2.39),k:0..1 动画进度
|
| 82 |
-
const targetH = Math.min(h, w / ratio)
|
| 83 |
-
const bar = ((h - targetH) / 2) * clamp(k)
|
| 84 |
-
if (bar <= 0.5) return 0
|
| 85 |
-
g.fillStyle = color
|
| 86 |
-
g.fillRect(0, 0, w, bar)
|
| 87 |
-
g.fillRect(0, h - bar, w, bar)
|
| 88 |
-
return bar
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
/** 漂浮尘埃 / 金色余烬 */
|
| 92 |
-
export function particles(g: CanvasRenderingContext2D, w: number, h: number, t: number, o: { n: number; seed: number; color: string; size: number; rise?: number; drift?: number; twinkle?: boolean; alpha?: number }) {
|
| 93 |
-
g.save()
|
| 94 |
-
g.globalCompositeOperation = 'lighter'
|
| 95 |
-
const r = mulberry32(o.seed)
|
| 96 |
-
for (let i = 0; i < o.n; i++) {
|
| 97 |
-
const x0 = r(), y0 = r(), sp = 0.3 + r() * 0.9, sz = (0.3 + r() * r() * 1.8) * o.size, ph = r() * 100
|
| 98 |
-
const x = ((x0 + Math.sin(t * 0.3 * sp + ph) * 0.03 + t * (o.drift ?? 0.004) * sp) % 1 + 1) % 1
|
| 99 |
-
const y = ((y0 - t * (o.rise ?? 0.02) * sp) % 1 + 1) % 1
|
| 100 |
-
const tw = o.twinkle ? 0.5 + 0.5 * Math.sin(t * 3 * sp + ph) : 1
|
| 101 |
-
const a = (o.alpha ?? 0.7) * tw * (0.3 + 0.7 * r())
|
| 102 |
-
const gr = g.createRadialGradient(x * w, y * h, 0, x * w, y * h, sz * 3)
|
| 103 |
-
gr.addColorStop(0, rgba(o.color, a))
|
| 104 |
-
gr.addColorStop(0.35, rgba(o.color, a * 0.35))
|
| 105 |
-
gr.addColorStop(1, rgba(o.color, 0))
|
| 106 |
-
g.fillStyle = gr
|
| 107 |
-
g.fillRect(x * w - sz * 3, y * h - sz * 3, sz * 6, sz * 6)
|
| 108 |
-
}
|
| 109 |
-
g.restore()
|
| 110 |
-
}
|
| 111 |
-
|
| 112 |
-
/** 丁达尔光束 */
|
| 113 |
-
export function godRays(g: CanvasRenderingContext2D, w: number, h: number, t: number, o: { x: number; y: number; color: string; alpha: number; n?: number; seed?: number }) {
|
| 114 |
-
g.save()
|
| 115 |
-
g.globalCompositeOperation = 'lighter'
|
| 116 |
-
const cx = o.x * w, cy = o.y * h
|
| 117 |
-
const n = o.n ?? 9
|
| 118 |
-
const r = mulberry32(o.seed ?? 3)
|
| 119 |
-
const L = Math.hypot(w, h) * 1.2
|
| 120 |
-
for (let i = 0; i < n; i++) {
|
| 121 |
-
const base = Math.PI / 2 + (r() - 0.5) * 1.4
|
| 122 |
-
const a = base + Math.sin(t * 0.15 + i) * 0.05
|
| 123 |
-
const wd = 0.02 + r() * 0.06
|
| 124 |
-
const al = o.alpha * (0.35 + 0.65 * r()) * (0.75 + 0.25 * Math.sin(t * 0.7 + i * 2))
|
| 125 |
-
const gr = g.createRadialGradient(cx, cy, 0, cx, cy, L)
|
| 126 |
-
gr.addColorStop(0, rgba(o.color, al))
|
| 127 |
-
gr.addColorStop(0.5, rgba(o.color, al * 0.25))
|
| 128 |
-
gr.addColorStop(1, rgba(o.color, 0))
|
| 129 |
-
g.fillStyle = gr
|
| 130 |
-
g.beginPath()
|
| 131 |
-
g.moveTo(cx, cy)
|
| 132 |
-
g.lineTo(cx + Math.cos(a - wd) * L, cy + Math.sin(a - wd) * L)
|
| 133 |
-
g.lineTo(cx + Math.cos(a + wd) * L, cy + Math.sin(a + wd) * L)
|
| 134 |
-
g.closePath()
|
| 135 |
-
g.fill()
|
| 136 |
-
}
|
| 137 |
-
g.restore()
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
/** 雨丝 */
|
| 141 |
-
export function rain(g: CanvasRenderingContext2D, w: number, h: number, t: number, o: { n: number; seed: number; alpha: number; angle?: number; speed?: number }) {
|
| 142 |
-
g.save()
|
| 143 |
-
const r = mulberry32(o.seed)
|
| 144 |
-
const ang = o.angle ?? 0.18
|
| 145 |
-
g.lineCap = 'round'
|
| 146 |
-
for (let i = 0; i < o.n; i++) {
|
| 147 |
-
const x0 = r() * 1.3 - 0.15, ph = r(), z = 0.3 + r() * 0.7
|
| 148 |
-
const sp = (o.speed ?? 1.6) * (0.6 + z)
|
| 149 |
-
const y = ((ph + t * sp) % 1.2) - 0.1
|
| 150 |
-
const len = (0.03 + z * 0.06) * h
|
| 151 |
-
const x = (x0 + y * Math.tan(ang) * 0.6) * w
|
| 152 |
-
g.strokeStyle = `rgba(200,215,235,${o.alpha * z})`
|
| 153 |
-
g.lineWidth = Math.max(0.6, z * 1.6 * (h / 1080))
|
| 154 |
-
g.beginPath()
|
| 155 |
-
g.moveTo(x, y * h)
|
| 156 |
-
g.lineTo(x - Math.sin(ang) * len, y * h - Math.cos(ang) * len)
|
| 157 |
-
g.stroke()
|
| 158 |
-
}
|
| 159 |
-
g.restore()
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
/** 散景光斑 */
|
| 163 |
-
export function bokeh(g: CanvasRenderingContext2D, w: number, h: number, t: number, o: { n: number; seed: number; colors: string[]; alpha: number; size: number }) {
|
| 164 |
-
g.save()
|
| 165 |
-
g.globalCompositeOperation = 'lighter'
|
| 166 |
-
const r = mulberry32(o.seed)
|
| 167 |
-
for (let i = 0; i < o.n; i++) {
|
| 168 |
-
const x = (r() + Math.sin(t * 0.07 + i) * 0.02) * w
|
| 169 |
-
const y = (r() * 0.9 + Math.cos(t * 0.05 + i * 1.7) * 0.015) * h
|
| 170 |
-
const s = (0.4 + r() * 0.9) * o.size
|
| 171 |
-
const c = o.colors[Math.floor(r() * o.colors.length)]
|
| 172 |
-
const a = o.alpha * (0.4 + 0.6 * r()) * (0.75 + 0.25 * Math.sin(t * 0.8 + i))
|
| 173 |
-
const gr = g.createRadialGradient(x, y, s * 0.2, x, y, s)
|
| 174 |
-
gr.addColorStop(0, rgba(c, a * 0.55))
|
| 175 |
-
gr.addColorStop(0.82, rgba(c, a * 0.75))
|
| 176 |
-
gr.addColorStop(0.92, rgba(c, a * 0.9))
|
| 177 |
-
gr.addColorStop(1, rgba(c, 0))
|
| 178 |
-
g.fillStyle = gr
|
| 179 |
-
g.beginPath()
|
| 180 |
-
g.arc(x, y, s, 0, Math.PI * 2)
|
| 181 |
-
g.fill()
|
| 182 |
-
}
|
| 183 |
-
g.restore()
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
/** 速度线(从消失点放射) */
|
| 187 |
-
export function speedLines(g: CanvasRenderingContext2D, w: number, h: number, t: number, o: { cx: number; cy: number; n: number; seed: number; alpha: number; color?: string; inner?: number }) {
|
| 188 |
-
g.save()
|
| 189 |
-
g.globalCompositeOperation = 'lighter'
|
| 190 |
-
const r = mulberry32(o.seed)
|
| 191 |
-
const cx = o.cx * w, cy = o.cy * h
|
| 192 |
-
const R = Math.hypot(w, h)
|
| 193 |
-
for (let i = 0; i < o.n; i++) {
|
| 194 |
-
const a = r() * Math.PI * 2
|
| 195 |
-
const sp = 1.5 + r() * 2.5
|
| 196 |
-
const ph = r()
|
| 197 |
-
const p = (ph + t * sp) % 1
|
| 198 |
-
const r0 = lerp(o.inner ?? 0.18, 1.1, p * p) * R * 0.5
|
| 199 |
-
const len = (0.05 + r() * 0.18) * R * p
|
| 200 |
-
const al = o.alpha * Math.sin(p * Math.PI) * (0.4 + 0.6 * r())
|
| 201 |
-
g.strokeStyle = o.color ? rgba(o.color, al) : `rgba(255,255,255,${al})`
|
| 202 |
-
g.lineWidth = (0.5 + r() * 2.2) * (h / 1080)
|
| 203 |
-
g.beginPath()
|
| 204 |
-
g.moveTo(cx + Math.cos(a) * r0, cy + Math.sin(a) * r0)
|
| 205 |
-
g.lineTo(cx + Math.cos(a) * (r0 + len), cy + Math.sin(a) * (r0 + len))
|
| 206 |
-
g.stroke()
|
| 207 |
-
}
|
| 208 |
-
g.restore()
|
| 209 |
-
}
|
| 210 |
-
|
| 211 |
-
/** 宣纸纹理(缓存) */
|
| 212 |
-
export function paper(w: number, h: number, base = '#ece4d3') {
|
| 213 |
-
return cached('paper' + base, Math.round(w), Math.round(h), (g, W, H) => {
|
| 214 |
-
g.fillStyle = base
|
| 215 |
-
g.fillRect(0, 0, W, H)
|
| 216 |
-
const r = mulberry32(7)
|
| 217 |
-
const img = g.getImageData(0, 0, W, H)
|
| 218 |
-
const d = img.data
|
| 219 |
-
for (let i = 0; i < d.length; i += 4) {
|
| 220 |
-
const n = (r() - 0.5) * 14
|
| 221 |
-
d[i] += n; d[i + 1] += n; d[i + 2] += n * 0.9
|
| 222 |
-
}
|
| 223 |
-
g.putImageData(img, 0, 0)
|
| 224 |
-
// 纤维
|
| 225 |
-
g.globalAlpha = 0.07
|
| 226 |
-
g.strokeStyle = '#6b5a3a'
|
| 227 |
-
for (let i = 0; i < (W * H) / 4000; i++) {
|
| 228 |
-
const x = r() * W, y = r() * H, a = r() * Math.PI, l = 6 + r() * 26
|
| 229 |
-
g.lineWidth = 0.5 + r()
|
| 230 |
-
g.beginPath()
|
| 231 |
-
g.moveTo(x, y)
|
| 232 |
-
g.quadraticCurveTo(x + Math.cos(a) * l * 0.5 + (r() - 0.5) * 6, y + Math.sin(a) * l * 0.5, x + Math.cos(a) * l, y + Math.sin(a) * l)
|
| 233 |
-
g.stroke()
|
| 234 |
-
}
|
| 235 |
-
// 边缘做旧
|
| 236 |
-
g.globalAlpha = 1
|
| 237 |
-
const gr = g.createRadialGradient(W / 2, H / 2, Math.min(W, H) * 0.35, W / 2, H / 2, Math.hypot(W, H) * 0.6)
|
| 238 |
-
gr.addColorStop(0, 'rgba(120,95,55,0)')
|
| 239 |
-
gr.addColorStop(1, 'rgba(120,95,55,0.28)')
|
| 240 |
-
g.fillStyle = gr
|
| 241 |
-
g.fillRect(0, 0, W, H)
|
| 242 |
-
})
|
| 243 |
-
}
|
| 244 |
-
|
| 245 |
-
/** 水墨远山(缓存) */
|
| 246 |
-
export function inkMountains(w: number, h: number, seed = 1) {
|
| 247 |
-
return cached('mount' + seed, Math.round(w), Math.round(h), (g, W, H) => {
|
| 248 |
-
const layers = 4
|
| 249 |
-
for (let L = 0; L < layers; L++) {
|
| 250 |
-
const base = H * (0.52 + L * 0.11)
|
| 251 |
-
const amp = H * (0.2 - L * 0.035)
|
| 252 |
-
const a = 0.12 + L * 0.1
|
| 253 |
-
const gr = g.createLinearGradient(0, base - amp, 0, H)
|
| 254 |
-
gr.addColorStop(0, `rgba(25,22,18,${a})`)
|
| 255 |
-
gr.addColorStop(0.5, `rgba(25,22,18,${a * 0.45})`)
|
| 256 |
-
gr.addColorStop(1, 'rgba(25,22,18,0)')
|
| 257 |
-
g.fillStyle = gr
|
| 258 |
-
g.beginPath()
|
| 259 |
-
g.moveTo(0, H)
|
| 260 |
-
for (let x = 0; x <= W; x += 4) {
|
| 261 |
-
const u = x / W
|
| 262 |
-
const y = base - amp * (0.55 * (fbm1(u * (2.2 + L) + seed * 3 + L * 9, 5) + 0.6) + 0.25 * Math.sin(u * 3 + L))
|
| 263 |
-
g.lineTo(x, y)
|
| 264 |
-
}
|
| 265 |
-
g.lineTo(W, H)
|
| 266 |
-
g.closePath()
|
| 267 |
-
g.fill()
|
| 268 |
-
}
|
| 269 |
-
})
|
| 270 |
-
}
|
| 271 |
-
|
| 272 |
-
/** 墨滴晕开 */
|
| 273 |
-
export function inkBloom(g: CanvasRenderingContext2D, x: number, y: number, r: number, k: number, seed: number, color = '20,18,15') {
|
| 274 |
-
if (k <= 0) return
|
| 275 |
-
const rr = mulberry32(seed)
|
| 276 |
-
g.save()
|
| 277 |
-
const n = 7
|
| 278 |
-
for (let i = 0; i < n; i++) {
|
| 279 |
-
const a = rr() * Math.PI * 2
|
| 280 |
-
const d = rr() * r * 0.35 * k
|
| 281 |
-
const rad = r * (0.35 + rr() * 0.5) * ease.outCubic(k)
|
| 282 |
-
const gr = g.createRadialGradient(x + Math.cos(a) * d, y + Math.sin(a) * d, 0, x + Math.cos(a) * d, y + Math.sin(a) * d, rad)
|
| 283 |
-
const al = 0.55 * (1 - k * 0.4)
|
| 284 |
-
gr.addColorStop(0, `rgba(${color},${al})`)
|
| 285 |
-
gr.addColorStop(0.6, `rgba(${color},${al * 0.6})`)
|
| 286 |
-
gr.addColorStop(1, `rgba(${color},0)`)
|
| 287 |
-
g.fillStyle = gr
|
| 288 |
-
g.beginPath()
|
| 289 |
-
g.arc(x + Math.cos(a) * d, y + Math.sin(a) * d, rad, 0, Math.PI * 2)
|
| 290 |
-
g.fill()
|
| 291 |
-
}
|
| 292 |
-
g.restore()
|
| 293 |
-
}
|
| 294 |
-
|
| 295 |
-
/** 网格(瑞士版式) */
|
| 296 |
-
export function grid(g: CanvasRenderingContext2D, w: number, h: number, cols: number, rows: number, color: string, alpha: number) {
|
| 297 |
-
g.save()
|
| 298 |
-
g.strokeStyle = color
|
| 299 |
-
g.globalAlpha = alpha
|
| 300 |
-
g.lineWidth = Math.max(1, h / 1080)
|
| 301 |
-
for (let i = 1; i < cols; i++) { const x = Math.round((w * i) / cols) + 0.5; g.beginPath(); g.moveTo(x, 0); g.lineTo(x, h); g.stroke() }
|
| 302 |
-
for (let i = 1; i < rows; i++) { const y = Math.round((h * i) / rows) + 0.5; g.beginPath(); g.moveTo(0, y); g.lineTo(w, y); g.stroke() }
|
| 303 |
-
g.restore()
|
| 304 |
-
}
|
| 305 |
-
|
| 306 |
-
/** 取景框 */
|
| 307 |
-
export function viewfinder(g: CanvasRenderingContext2D, w: number, h: number, t: number, u: number, o: { tc: string; alpha: number; info?: string; rec?: boolean }) {
|
| 308 |
-
if (o.alpha <= 0) return
|
| 309 |
-
g.save()
|
| 310 |
-
g.globalAlpha = o.alpha
|
| 311 |
-
g.strokeStyle = 'rgba(255,255,255,0.85)'
|
| 312 |
-
g.lineWidth = 2 * u
|
| 313 |
-
const m = 48 * u, L = 56 * u
|
| 314 |
-
const corners: [number, number, number, number][] = [[m, m, 1, 1], [w - m, m, -1, 1], [m, h - m, 1, -1], [w - m, h - m, -1, -1]]
|
| 315 |
-
corners.forEach(([x, y, sx, sy]) => { g.beginPath(); g.moveTo(x, y + sy * L); g.lineTo(x, y); g.lineTo(x + sx * L, y); g.stroke() })
|
| 316 |
-
// 中心十字
|
| 317 |
-
g.lineWidth = 1.2 * u
|
| 318 |
-
g.strokeStyle = 'rgba(255,255,255,0.5)'
|
| 319 |
-
const cx = w / 2, cy = h / 2, c = 16 * u
|
| 320 |
-
g.beginPath(); g.moveTo(cx - c, cy); g.lineTo(cx + c, cy); g.moveTo(cx, cy - c); g.lineTo(cx, cy + c); g.stroke()
|
| 321 |
-
g.font = `${22 * u}px "OdbMono", monospace`
|
| 322 |
-
g.textBaseline = 'middle'
|
| 323 |
-
g.fillStyle = 'rgba(255,255,255,0.9)'
|
| 324 |
-
// REC
|
| 325 |
-
if (o.rec !== false) {
|
| 326 |
-
const on = Math.floor(t * 1.6) % 2 === 0
|
| 327 |
-
if (on) { g.fillStyle = '#ff3b30'; g.beginPath(); g.arc(m + 20 * u, m + 34 * u, 9 * u, 0, Math.PI * 2); g.fill() }
|
| 328 |
-
g.fillStyle = 'rgba(255,255,255,0.9)'
|
| 329 |
-
g.textAlign = 'left'
|
| 330 |
-
g.fillText('REC', m + 38 * u, m + 35 * u)
|
| 331 |
-
}
|
| 332 |
-
g.textAlign = 'right'
|
| 333 |
-
g.fillText(o.tc, w - m - 8 * u, m + 35 * u)
|
| 334 |
-
g.textAlign = 'left'
|
| 335 |
-
g.fillText(o.info ?? 'ISO 800 1/50 F2.8 4K', m + 8 * u, h - m - 30 * u)
|
| 336 |
-
// 电池
|
| 337 |
-
const bx = w - m - 70 * u, by = h - m - 42 * u
|
| 338 |
-
g.strokeStyle = 'rgba(255,255,255,0.9)'
|
| 339 |
-
g.lineWidth = 2 * u
|
| 340 |
-
g.strokeRect(bx, by, 52 * u, 24 * u)
|
| 341 |
-
g.fillStyle = 'rgba(255,255,255,0.9)'
|
| 342 |
-
g.fillRect(bx + 52 * u, by + 7 * u, 4 * u, 10 * u)
|
| 343 |
-
g.fillRect(bx + 4 * u, by + 4 * u, 30 * u, 16 * u)
|
| 344 |
-
g.restore()
|
| 345 |
-
}
|
| 346 |
-
|
| 347 |
-
export function timecode(t: number, fps = 24) {
|
| 348 |
-
const f = Math.floor((t % 1) * fps)
|
| 349 |
-
const s = Math.floor(t) % 60
|
| 350 |
-
const m = Math.floor(t / 60) % 60
|
| 351 |
-
return `00:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}:${f.toString().padStart(2, '0')}`
|
| 352 |
-
}
|
| 353 |
-
|
| 354 |
-
/** 香蕉徽标(矢量) */
|
| 355 |
-
export function bananaPath(g: CanvasRenderingContext2D, x: number, y: number, s: number, rot = 0) {
|
| 356 |
-
g.save()
|
| 357 |
-
g.translate(x, y)
|
| 358 |
-
g.rotate(rot)
|
| 359 |
-
g.scale(s, s)
|
| 360 |
-
g.beginPath()
|
| 361 |
-
g.moveTo(-0.92, -0.18)
|
| 362 |
-
g.bezierCurveTo(-0.62, 0.52, 0.42, 0.66, 0.9, 0.02)
|
| 363 |
-
g.bezierCurveTo(0.96, -0.06, 0.98, -0.16, 0.92, -0.2)
|
| 364 |
-
g.bezierCurveTo(0.46, 0.26, -0.38, 0.22, -0.78, -0.3)
|
| 365 |
-
g.closePath()
|
| 366 |
-
g.restore()
|
| 367 |
-
}
|
| 368 |
-
export function drawBanana(g: CanvasRenderingContext2D, x: number, y: number, s: number, rot: number, fill: string, alpha = 1) {
|
| 369 |
-
g.save()
|
| 370 |
-
g.globalAlpha *= alpha
|
| 371 |
-
bananaPath(g, x, y, s, rot)
|
| 372 |
-
g.fillStyle = fill
|
| 373 |
-
g.fill()
|
| 374 |
-
// 蒂
|
| 375 |
-
g.translate(x, y)
|
| 376 |
-
g.rotate(rot)
|
| 377 |
-
g.fillStyle = '#3a2a10'
|
| 378 |
-
g.fillRect(-0.98 * s, -0.36 * s, 0.14 * s, 0.12 * s)
|
| 379 |
-
g.restore()
|
| 380 |
-
}
|
| 381 |
-
|
| 382 |
-
/** 线稿:二八大杠 + 一车香蕉,按进度描边绘制 */
|
| 383 |
-
export function bicycleLineArt(g: CanvasRenderingContext2D, cx: number, cy: number, s: number, k: number, color: string, accent: string, lw: number) {
|
| 384 |
-
// 坐标单位:s = 车轮半径
|
| 385 |
-
const segs: { d: (g: CanvasRenderingContext2D) => void; len: number; c?: string }[] = []
|
| 386 |
-
const R = s
|
| 387 |
-
const rear = [cx - 1.55 * R, cy + 0.5 * R], front = [cx + 1.55 * R, cy + 0.5 * R]
|
| 388 |
-
const bb = [cx - 0.2 * R, cy + 0.62 * R], seat = [cx - 0.55 * R, cy - 0.75 * R], head = [cx + 1.05 * R, cy - 0.7 * R]
|
| 389 |
-
const circ = (c: number[]) => (g2: CanvasRenderingContext2D) => { g2.arc(c[0], c[1], R, -Math.PI / 2, Math.PI * 1.5) }
|
| 390 |
-
const line = (pts: number[][]) => (g2: CanvasRenderingContext2D) => { g2.moveTo(pts[0][0], pts[0][1]); pts.slice(1).forEach((p) => g2.lineTo(p[0], p[1])) }
|
| 391 |
-
const dist = (pts: number[][]) => pts.slice(1).reduce((a, p, i) => a + Math.hypot(p[0] - pts[i][0], p[1] - pts[i][1]), 0)
|
| 392 |
-
segs.push({ d: circ(rear), len: 2 * Math.PI * R })
|
| 393 |
-
segs.push({ d: circ(front), len: 2 * Math.PI * R })
|
| 394 |
-
const frame = [rear, bb, seat, rear]
|
| 395 |
-
segs.push({ d: line(frame), len: dist(frame) })
|
| 396 |
-
const top = [seat, [head[0] - 0.06 * R, head[1] + 0.12 * R], bb]
|
| 397 |
-
segs.push({ d: line(top), len: dist(top) })
|
| 398 |
-
const fork = [front, head, [head[0] - 0.35 * R, head[1] - 0.3 * R], [head[0] - 0.62 * R, head[1] - 0.28 * R]]
|
| 399 |
-
segs.push({ d: line(fork), len: dist(fork) })
|
| 400 |
-
const saddle = [[seat[0] - 0.25 * R, seat[1] - 0.08 * R], [seat[0] + 0.22 * R, seat[1] - 0.08 * R]]
|
| 401 |
-
segs.push({ d: line(saddle), len: dist(saddle) })
|
| 402 |
-
// 后货架
|
| 403 |
-
const rack = [[rear[0] - 0.2 * R, rear[1] - 0.95 * R], [seat[0] + 0.05 * R, rear[1] - 0.95 * R], [rear[0], rear[1]]]
|
| 404 |
-
segs.push({ d: line(rack), len: dist(rack) })
|
| 405 |
-
const total = segs.reduce((a, b) => a + b.len, 0)
|
| 406 |
-
let acc = 0
|
| 407 |
-
g.save()
|
| 408 |
-
g.lineCap = 'round'
|
| 409 |
-
g.lineJoin = 'round'
|
| 410 |
-
g.lineWidth = lw
|
| 411 |
-
g.strokeStyle = color
|
| 412 |
-
for (const sg of segs) {
|
| 413 |
-
const start = acc / total, end = (acc + sg.len) / total
|
| 414 |
-
acc += sg.len
|
| 415 |
-
const p = clamp((k - start) / (end - start))
|
| 416 |
-
if (p <= 0) continue
|
| 417 |
-
g.setLineDash([sg.len * p, sg.len * 2])
|
| 418 |
-
g.beginPath()
|
| 419 |
-
sg.d(g)
|
| 420 |
-
g.stroke()
|
| 421 |
-
}
|
| 422 |
-
g.setLineDash([])
|
| 423 |
-
// 香蕉堆(在描边后半程逐根落上货架)
|
| 424 |
-
const nb = 9
|
| 425 |
-
for (let i = 0; i < nb; i++) {
|
| 426 |
-
const p = clamp((k - 0.55 - i * 0.035) / 0.12)
|
| 427 |
-
if (p <= 0) continue
|
| 428 |
-
const row = Math.floor(i / 3), col = i % 3
|
| 429 |
-
const bx = rear[0] - 0.35 * R + col * 0.42 * R + (row % 2) * 0.18 * R
|
| 430 |
-
const by = rear[1] - 1.1 * R - row * 0.3 * R - (1 - ease.outBack(p)) * 0.8 * R
|
| 431 |
-
drawBanana(g, bx, by, 0.32 * R, -0.25 + (hash(i) - 0.5) * 0.4, accent, p)
|
| 432 |
-
}
|
| 433 |
-
g.restore()
|
| 434 |
-
}
|
| 435 |
-
|
| 436 |
-
/** 印章 */
|
| 437 |
-
export function seal(g: CanvasRenderingContext2D, x: number, y: number, s: number, text: string, k: number, font: string) {
|
| 438 |
-
if (k <= 0) return
|
| 439 |
-
const e = ease.outBack(clamp(k * 1.4), 2)
|
| 440 |
-
g.save()
|
| 441 |
-
g.translate(x, y)
|
| 442 |
-
g.scale(lerp(1.6, 1, e), lerp(1.6, 1, e))
|
| 443 |
-
g.rotate(-0.04)
|
| 444 |
-
g.globalAlpha *= clamp(k * 3)
|
| 445 |
-
g.fillStyle = '#b3241b'
|
| 446 |
-
const r = s * 0.08
|
| 447 |
-
g.beginPath()
|
| 448 |
-
g.roundRect(-s / 2, -s / 2, s, s, r)
|
| 449 |
-
g.fill()
|
| 450 |
-
// 斑驳
|
| 451 |
-
const rr = mulberry32(11)
|
| 452 |
-
g.globalCompositeOperation = 'destination-out'
|
| 453 |
-
for (let i = 0; i < 40; i++) { g.globalAlpha = 0.25 + rr() * 0.5; g.beginPath(); g.arc((rr() - 0.5) * s, (rr() - 0.5) * s, rr() * s * 0.05, 0, Math.PI * 2); g.fill() }
|
| 454 |
-
g.globalCompositeOperation = 'source-over'
|
| 455 |
-
g.globalAlpha = 1
|
| 456 |
-
g.fillStyle = '#f6e9dc'
|
| 457 |
-
g.textAlign = 'center'
|
| 458 |
-
g.textBaseline = 'middle'
|
| 459 |
-
const chars = [...text]
|
| 460 |
-
if (chars.length === 4) {
|
| 461 |
-
g.font = `${s * 0.4}px ${font}`
|
| 462 |
-
const pos = [[0.22, -0.22], [0.22, 0.22], [-0.22, -0.22], [-0.22, 0.22]]
|
| 463 |
-
chars.forEach((c, i) => g.fillText(c, pos[i][0] * s, pos[i][1] * s + s * 0.02))
|
| 464 |
-
} else if (chars.length === 2) {
|
| 465 |
-
g.font = `${s * 0.42}px ${font}`
|
| 466 |
-
g.fillText(chars[0], 0, -s * 0.2)
|
| 467 |
-
g.fillText(chars[1], 0, s * 0.22)
|
| 468 |
-
} else {
|
| 469 |
-
g.font = `${s * 0.6}px ${font}`
|
| 470 |
-
g.fillText(text, 0, s * 0.03)
|
| 471 |
-
}
|
| 472 |
-
g.restore()
|
| 473 |
-
}
|
| 474 |
-
|
| 475 |
-
/** 冲击波环 */
|
| 476 |
-
export function shockRing(g: CanvasRenderingContext2D, x: number, y: number, k: number, maxR: number, color: string, lw: number) {
|
| 477 |
-
if (k <= 0 || k >= 1) return
|
| 478 |
-
g.save()
|
| 479 |
-
g.strokeStyle = rgba(color, (1 - k) * 0.8)
|
| 480 |
-
g.lineWidth = lw * (1 - k)
|
| 481 |
-
g.beginPath()
|
| 482 |
-
g.arc(x, y, ease.outExpo(k) * maxR, 0, Math.PI * 2)
|
| 483 |
-
g.stroke()
|
| 484 |
-
g.restore()
|
| 485 |
-
}
|
| 486 |
-
|
| 487 |
-
/** 横向切片故障 */
|
| 488 |
-
export function glitchSlices(g: CanvasRenderingContext2D, w: number, h: number, t: number, amount: number) {
|
| 489 |
-
if (amount <= 0.01) return
|
| 490 |
-
const src = g.canvas
|
| 491 |
-
const n = 7
|
| 492 |
-
for (let i = 0; i < n; i++) {
|
| 493 |
-
const r = hash(Math.floor(t * 30) * 13 + i)
|
| 494 |
-
if (r > amount) continue
|
| 495 |
-
const y = hash(i * 7 + Math.floor(t * 30)) * h
|
| 496 |
-
const sh = (0.01 + hash(i + 3) * 0.06) * h
|
| 497 |
-
const dx = (hash(i * 31 + Math.floor(t * 30)) - 0.5) * w * 0.12 * amount
|
| 498 |
-
g.drawImage(src, 0, y, w, sh, dx, y, w, sh)
|
| 499 |
-
}
|
| 500 |
-
}
|
| 501 |
-
|
| 502 |
-
/** 细线 */
|
| 503 |
-
export function hline(g: CanvasRenderingContext2D, x0: number, x1: number, y: number, color: string, lw: number, k = 1) {
|
| 504 |
-
if (k <= 0) return
|
| 505 |
-
g.save()
|
| 506 |
-
g.strokeStyle = color
|
| 507 |
-
g.lineWidth = lw
|
| 508 |
-
g.beginPath()
|
| 509 |
-
const xm = (x0 + x1) / 2
|
| 510 |
-
g.moveTo(lerp(xm, x0, k), y)
|
| 511 |
-
g.lineTo(lerp(xm, x1, k), y)
|
| 512 |
-
g.stroke()
|
| 513 |
-
g.restore()
|
| 514 |
-
}
|
|
|
|
| 1 |
+
// 原片绘制(cover 裁切,按主体位置对焦)
|
|
|
|
|
|
|
|
|
|
| 2 |
export interface Rect { x: number; y: number; w: number; h: number }
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
export function drawVideo(
|
| 5 |
g: CanvasRenderingContext2D,
|
| 6 |
video: HTMLVideoElement | null,
|
| 7 |
r: Rect,
|
| 8 |
+
o: { zoom?: number; fx?: number; fy?: number } = {},
|
| 9 |
) {
|
| 10 |
g.save()
|
| 11 |
g.beginPath()
|
| 12 |
g.rect(r.x, r.y, r.w, r.h)
|
| 13 |
g.clip()
|
|
|
|
| 14 |
if (!video || video.readyState < 2 || !video.videoWidth) {
|
| 15 |
+
g.fillStyle = '#0b0a09'
|
|
|
|
|
|
|
|
|
|
| 16 |
g.fillRect(r.x, r.y, r.w, r.h)
|
| 17 |
g.restore()
|
| 18 |
return
|
| 19 |
}
|
| 20 |
+
const fx = o.fx ?? 0.5
|
| 21 |
+
const fy = o.fy ?? 0.5
|
|
|
|
| 22 |
const vw = video.videoWidth, vh = video.videoHeight
|
| 23 |
+
const s = Math.max(r.w / vw, r.h / vh) * (o.zoom ?? 1)
|
|
|
|
| 24 |
const dw = vw * s, dh = vh * s
|
| 25 |
+
let x = r.x + r.w / 2 - fx * dw
|
| 26 |
+
let y = r.y + r.h / 2 - fy * dh
|
|
|
|
| 27 |
x = Math.min(r.x, Math.max(r.x + r.w - dw, x))
|
| 28 |
y = Math.min(r.y, Math.max(r.y + r.h - dh, y))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
g.drawImage(video, x, y, dw, dh)
|
| 30 |
g.restore()
|
| 31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/film/core/renderer.ts
CHANGED
|
@@ -1,11 +1,146 @@
|
|
| 1 |
-
// 渲染
|
| 2 |
-
import type { Program } from './film'
|
| 3 |
-
import { Post, defaultPost } from './post'
|
| 4 |
-
import
|
| 5 |
-
import {
|
| 6 |
-
import {
|
| 7 |
-
import {
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
export class Renderer {
|
| 11 |
w: number
|
|
@@ -19,7 +154,7 @@ export class Renderer {
|
|
| 19 |
this.layer = document.createElement('canvas')
|
| 20 |
this.layer.width = w
|
| 21 |
this.layer.height = h
|
| 22 |
-
this.g = this.layer.getContext('2d'
|
| 23 |
this.post = new Post(w, h)
|
| 24 |
}
|
| 25 |
get output(): HTMLCanvasElement { return this.post.gl ? this.post.canvas : this.layer }
|
|
@@ -29,59 +164,26 @@ export class Renderer {
|
|
| 29 |
this.layer.width = w; this.layer.height = h
|
| 30 |
this.post.resize(w, h)
|
| 31 |
}
|
| 32 |
-
|
| 33 |
render(prog: Program, t: number, video: HTMLVideoElement | null) {
|
| 34 |
const { g, w, h } = this
|
| 35 |
g.setTransform(1, 0, 0, 1, 0, 0)
|
| 36 |
g.globalAlpha = 1
|
| 37 |
g.globalCompositeOperation = 'source-over'
|
| 38 |
-
if ('filter' in g) g.filter = 'none'
|
| 39 |
g.shadowBlur = 0
|
| 40 |
-
g.fillStyle = '#000'
|
| 41 |
-
g.fillRect(0, 0, w, h)
|
| 42 |
const post = defaultPost()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
const { seg, local } = prog.segAt(t)
|
| 44 |
-
|
| 45 |
-
const film = seg?.film ?? prog.segments[0].film
|
| 46 |
-
const ua = seg ? film.useAt(local) : null
|
| 47 |
-
const dc: DC = {
|
| 48 |
-
g, w, h, P: h > w, S, u: S / 1080, t: local, f: film, video,
|
| 49 |
-
shot: seg ? ua?.use.shot ?? null : 9, useLocal: ua ? local - ua.use.from : local, post,
|
| 50 |
-
}
|
| 51 |
-
if (!seg) {
|
| 52 |
-
drawVideo(g, video, { x: 0, y: 0, w, h }, { zoom: 1.1 + t * 0.02, shot: 9 })
|
| 53 |
-
desaturate(g, { x: 0, y: 0, w, h }, 0.5)
|
| 54 |
-
tint(g, { x: 0, y: 0, w, h }, '#3a2405', 'multiply', 0.4)
|
| 55 |
-
post.gain = [1.1, 1.0, 0.8]
|
| 56 |
-
post.bloom = 0.3
|
| 57 |
-
post.halation = 0.25
|
| 58 |
-
post.grain = 0.08
|
| 59 |
-
post.vignette = 0.6
|
| 60 |
-
drawOpener(dc, t, prog.opener, prog.ids)
|
| 61 |
-
} else {
|
| 62 |
-
// 片尾黑场完全盖住后不再绘制正片
|
| 63 |
-
if (!(film.fullOutro && local > film.holdEnd + 0.6)) {
|
| 64 |
-
g.save()
|
| 65 |
-
TREATMENTS[film.treatment](dc)
|
| 66 |
-
g.restore()
|
| 67 |
-
}
|
| 68 |
-
g.save()
|
| 69 |
-
drawIntro(dc)
|
| 70 |
-
g.restore()
|
| 71 |
-
// 片尾前的故障/甩镜过渡
|
| 72 |
-
if (film.treatment === 'DOCUMENT' || film.treatment === 'VELOCITY') {
|
| 73 |
-
const k = impulse(local, film.holdEnd - 0.12, 0.12) * (local > film.holdEnd - 0.25 ? 1 : 0)
|
| 74 |
-
glitchSlices(g, w, h, local, k)
|
| 75 |
-
post.aberration += k * 0.02
|
| 76 |
-
}
|
| 77 |
-
g.save()
|
| 78 |
-
drawOutro(dc)
|
| 79 |
-
g.restore()
|
| 80 |
-
}
|
| 81 |
if (!this.post.render(this.layer, post, t)) {
|
| 82 |
-
// 无 WebGL 时的降级:直接用 2D 图层,并做淡出
|
| 83 |
if (post.fade > 0) { g.fillStyle = `rgba(0,0,0,${post.fade})`; g.fillRect(0, 0, w, h) }
|
| 84 |
}
|
| 85 |
-
return dc
|
| 86 |
}
|
| 87 |
}
|
|
|
|
| 1 |
+
// 极简渲染:原片 + 逐句字幕 + 英文译文 + 角标
|
| 2 |
+
import type { CharT, Film, PageT, Program } from './film'
|
| 3 |
+
import { Post, defaultPost, type PostParams } from './post'
|
| 4 |
+
import { FONT } from './assets'
|
| 5 |
+
import { drawVideo, type Rect } from './fx'
|
| 6 |
+
import { adv, breakClause } from './typo'
|
| 7 |
+
import { clamp, ease, pad2, smooth } from './util'
|
| 8 |
+
|
| 9 |
+
const SUB = '#F5F2EA'
|
| 10 |
+
|
| 11 |
+
/** 一页字幕 → 若干行(同一行的两句之间留一个全角空格) */
|
| 12 |
+
function pageLines(p: PageT, perLine: number): CharT[][] {
|
| 13 |
+
const total = p.chars.length + p.clauses.length - 1
|
| 14 |
+
if (total <= perLine) {
|
| 15 |
+
const line: CharT[] = []
|
| 16 |
+
p.clauses.forEach((c, i) => {
|
| 17 |
+
if (i > 0) line.push({ ch: ' ', i: -1, t0: c.t0, t1: c.t0, clause: c.index, key: false })
|
| 18 |
+
line.push(...c.chars)
|
| 19 |
+
})
|
| 20 |
+
return [line]
|
| 21 |
+
}
|
| 22 |
+
return p.clauses.flatMap((c) => breakClause(c.chars, perLine))
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
export function videoRect(w: number, h: number): Rect {
|
| 26 |
+
if (w >= h) return { x: 0, y: 0, w, h }
|
| 27 |
+
const vh = (w * 9) / 16
|
| 28 |
+
return { x: 0, y: h * 0.4 - vh / 2, w, h: vh }
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
export function drawFilmFrame(g: CanvasRenderingContext2D, w: number, h: number, f: Film, t: number, video: HTMLVideoElement | null, post: PostParams) {
|
| 32 |
+
const P = h > w
|
| 33 |
+
const S = Math.min(w, h)
|
| 34 |
+
const u = S / 1080
|
| 35 |
+
const vr = videoRect(w, h)
|
| 36 |
+
g.fillStyle = '#000'
|
| 37 |
+
g.fillRect(0, 0, w, h)
|
| 38 |
+
drawVideo(g, video, vr, { zoom: 1 })
|
| 39 |
+
|
| 40 |
+
// 横屏:底部轻微压暗,托住字幕
|
| 41 |
+
if (!P) {
|
| 42 |
+
const gr = g.createLinearGradient(0, h * 0.58, 0, h)
|
| 43 |
+
gr.addColorStop(0, 'rgba(0,0,0,0)')
|
| 44 |
+
gr.addColorStop(1, 'rgba(0,0,0,0.5)')
|
| 45 |
+
g.fillStyle = gr
|
| 46 |
+
g.fillRect(0, h * 0.58, w, h * 0.42)
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
g.textBaseline = 'middle'
|
| 50 |
+
// 角标:奥德彪语录 · №07
|
| 51 |
+
const ba = smooth((t - 0.5) / 0.9) * 0.9
|
| 52 |
+
if (ba > 0) {
|
| 53 |
+
g.save()
|
| 54 |
+
g.globalAlpha = ba
|
| 55 |
+
g.fillStyle = '#fff'
|
| 56 |
+
g.shadowColor = 'rgba(0,0,0,0.55)'
|
| 57 |
+
g.shadowBlur = 12 * u
|
| 58 |
+
const bs = S * (P ? 0.034 : 0.024)
|
| 59 |
+
const title = '奥德彪语录'
|
| 60 |
+
const tr = 0.42
|
| 61 |
+
g.font = `500 ${bs}px ${FONT.serif}`
|
| 62 |
+
const tw = [...title].reduce((s, c) => s + adv(g, FONT.serif, 500, c) * bs, 0) + tr * bs * (title.length - 1)
|
| 63 |
+
const x0 = P ? w / 2 - tw / 2 : w * 0.045
|
| 64 |
+
const y0 = P ? vr.y - S * 0.2 : h * 0.075
|
| 65 |
+
g.textAlign = 'left'
|
| 66 |
+
let x = x0
|
| 67 |
+
for (const c of title) { g.fillText(c, x, y0); x += adv(g, FONT.serif, 500, c) * bs + tr * bs }
|
| 68 |
+
g.globalAlpha = ba * 0.7
|
| 69 |
+
g.fillRect(P ? w / 2 - 14 * u : x0, y0 + bs * 1.05, 28 * u, Math.max(1, 1.2 * u))
|
| 70 |
+
g.font = `400 ${bs * 0.86}px ${FONT.latin}`
|
| 71 |
+
g.textAlign = P ? 'center' : 'left'
|
| 72 |
+
g.fillText(`№ ${pad2(f.id)}`, P ? w / 2 : x0, y0 + bs * 1.9)
|
| 73 |
+
g.restore()
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
// 字幕
|
| 77 |
+
const page = f.pageAt(t)
|
| 78 |
+
const size = P ? S * 0.062 : S * 0.052
|
| 79 |
+
const track = 0.12
|
| 80 |
+
const lineH = 1.55
|
| 81 |
+
const baseY = P ? vr.y + vr.h + S * 0.2 : h * 0.86
|
| 82 |
+
let blockBottom = baseY
|
| 83 |
+
if (page) {
|
| 84 |
+
const a = page.last ? smooth((t - page.t0) / 0.35) : Math.min(smooth((t - page.t0) / 0.35), smooth((page.t1 - t) / 0.28))
|
| 85 |
+
if (a > 0) {
|
| 86 |
+
const lines = pageLines(page, P ? 12 : 18)
|
| 87 |
+
const fam = FONT.serif
|
| 88 |
+
const wt = 500
|
| 89 |
+
const widths = lines.map((l) => l.reduce((s, c) => s + adv(g, fam, wt, c.ch), 0) + track * (l.length - 1))
|
| 90 |
+
const fs = Math.min(size, (w * (P ? 0.86 : 0.82)) / Math.max(...widths))
|
| 91 |
+
const n = lines.length
|
| 92 |
+
const top = P ? baseY - (fs * lineH * (n - 1)) / 2 : baseY - fs * lineH * (n - 1)
|
| 93 |
+
const rise = (1 - ease.outCubic(clamp((t - page.t0) / 0.5))) * fs * 0.18
|
| 94 |
+
g.save()
|
| 95 |
+
g.globalAlpha = a
|
| 96 |
+
g.font = `${wt} ${fs}px ${fam}`
|
| 97 |
+
g.fillStyle = SUB
|
| 98 |
+
g.textAlign = 'left'
|
| 99 |
+
g.shadowColor = 'rgba(0,0,0,0.65)'
|
| 100 |
+
g.shadowBlur = 14 * u
|
| 101 |
+
g.shadowOffsetY = 1.5 * u
|
| 102 |
+
lines.forEach((l, li) => {
|
| 103 |
+
let x = w / 2 - (widths[li] * fs) / 2
|
| 104 |
+
const y = top + li * fs * lineH + rise
|
| 105 |
+
for (const c of l) {
|
| 106 |
+
if (c.ch !== ' ') g.fillText(c.ch, x, y)
|
| 107 |
+
x += adv(g, fam, wt, c.ch) * fs + track * fs
|
| 108 |
+
}
|
| 109 |
+
})
|
| 110 |
+
g.restore()
|
| 111 |
+
blockBottom = top + (n - 1) * fs * lineH + fs * 0.5
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
// 英文译文(配音结束后浮现)
|
| 116 |
+
const ea = smooth((t - f.ve - 0.3) / 0.9)
|
| 117 |
+
if (f.en && ea > 0) {
|
| 118 |
+
const es = S * (P ? 0.036 : 0.028)
|
| 119 |
+
g.save()
|
| 120 |
+
g.globalAlpha = ea * 0.8
|
| 121 |
+
g.font = `italic 400 ${es}px ${FONT.latinItalic}`
|
| 122 |
+
g.fillStyle = SUB
|
| 123 |
+
g.textAlign = 'center'
|
| 124 |
+
g.shadowColor = 'rgba(0,0,0,0.6)'
|
| 125 |
+
g.shadowBlur = 10 * u
|
| 126 |
+
const maxW = w * (P ? 0.84 : 0.7)
|
| 127 |
+
const lines: string[] = []
|
| 128 |
+
let cur = ''
|
| 129 |
+
for (const wd of f.en.split(' ')) {
|
| 130 |
+
const test = cur ? cur + ' ' + wd : wd
|
| 131 |
+
if (g.measureText(test).width > maxW && cur) { lines.push(cur); cur = wd } else cur = test
|
| 132 |
+
}
|
| 133 |
+
if (cur) lines.push(cur)
|
| 134 |
+
const y0 = P ? blockBottom + es * 1.6 : Math.min(blockBottom + es * 1.5, h - es * 1.2 * lines.length)
|
| 135 |
+
lines.slice(0, 3).forEach((l, i) => g.fillText(l, w / 2, y0 + i * es * 1.35))
|
| 136 |
+
g.restore()
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
// 淡入淡出
|
| 140 |
+
const fin = smooth(t / 0.8)
|
| 141 |
+
const fout = smooth((f.T - t) / 0.9)
|
| 142 |
+
post.fade = 1 - Math.min(fin, fout)
|
| 143 |
+
}
|
| 144 |
|
| 145 |
export class Renderer {
|
| 146 |
w: number
|
|
|
|
| 154 |
this.layer = document.createElement('canvas')
|
| 155 |
this.layer.width = w
|
| 156 |
this.layer.height = h
|
| 157 |
+
this.g = this.layer.getContext('2d')!
|
| 158 |
this.post = new Post(w, h)
|
| 159 |
}
|
| 160 |
get output(): HTMLCanvasElement { return this.post.gl ? this.post.canvas : this.layer }
|
|
|
|
| 164 |
this.layer.width = w; this.layer.height = h
|
| 165 |
this.post.resize(w, h)
|
| 166 |
}
|
|
|
|
| 167 |
render(prog: Program, t: number, video: HTMLVideoElement | null) {
|
| 168 |
const { g, w, h } = this
|
| 169 |
g.setTransform(1, 0, 0, 1, 0, 0)
|
| 170 |
g.globalAlpha = 1
|
| 171 |
g.globalCompositeOperation = 'source-over'
|
|
|
|
| 172 |
g.shadowBlur = 0
|
|
|
|
|
|
|
| 173 |
const post = defaultPost()
|
| 174 |
+
// 极简后期:几乎不可察觉的暗角与颗粒,保持原片质感
|
| 175 |
+
post.contrast = 1.03
|
| 176 |
+
post.saturation = 0.97
|
| 177 |
+
post.vignette = 0.2
|
| 178 |
+
post.grain = 0.02
|
| 179 |
+
post.bloom = 0
|
| 180 |
+
post.halation = 0
|
| 181 |
+
post.aberration = 0
|
| 182 |
+
post.flicker = 0
|
| 183 |
const { seg, local } = prog.segAt(t)
|
| 184 |
+
drawFilmFrame(g, w, h, seg.film, local, video, post)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
if (!this.post.render(this.layer, post, t)) {
|
|
|
|
| 186 |
if (post.fade > 0) { g.fillStyle = `rgba(0,0,0,${post.fade})`; g.fillRect(0, 0, w, h) }
|
| 187 |
}
|
|
|
|
| 188 |
}
|
| 189 |
}
|
src/film/core/score.ts
CHANGED
|
@@ -1,677 +1,87 @@
|
|
| 1 |
-
//
|
| 2 |
-
import type {
|
| 3 |
-
import type { Treatment } from '../data/quotes'
|
| 4 |
import { fetchArrayBuffer, voiceUrl } from './assets'
|
| 5 |
-
import {
|
| 6 |
-
import { mulberry32 } from './util'
|
| 7 |
|
| 8 |
export const SR = 44100
|
| 9 |
|
| 10 |
-
export interface MixOptions { music: boolean;
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
bpm: number
|
| 16 |
-
pad: number // 铺底音量
|
| 17 |
-
keys?: 'piano' | 'rhodes' | 'marimba' | 'guzheng' | null
|
| 18 |
-
strings?: boolean
|
| 19 |
-
choir?: boolean
|
| 20 |
-
bass?: 'pulse' | 'ostinato' | 'drone' | null
|
| 21 |
-
drums?: 'taiko' | 'hats' | 'snap' | null
|
| 22 |
-
bed?: 'rain' | 'tape' | 'wind' | null
|
| 23 |
-
tick?: boolean
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
const PRESETS: Record<Treatment, Preset> = {
|
| 27 |
-
CINEMA: { root: 38, bpm: 70, pad: 1, chords: [[0, 7, 15, 19, 26], [-4, 3, 12, 16, 19], [3, 10, 15, 19, 22], [-2, 5, 14, 17, 21]], keys: 'piano', bass: 'drone' },
|
| 28 |
-
MONUMENT: { root: 36, bpm: 60, pad: 0.9, chords: [[0, 7, 12, 15], [0, 7, 12, 15], [-4, 3, 8, 12], [-5, 2, 7, 14]], strings: true, bass: 'pulse', drums: 'taiko' },
|
| 29 |
-
SCROLL: { root: 38, bpm: 66, pad: 0.7, chords: [[0, 7, 14], [-3, 4, 9], [2, 9, 14], [0, 7, 12]], keys: 'guzheng', bass: 'drone', bed: 'wind' },
|
| 30 |
-
DIPTYCH: { root: 45, bpm: 76, pad: 0.85, chords: [[0, 7, 12, 15], [-4, 3, 8, 15], [0, 7, 12, 15], [-5, 2, 7, 14]], keys: 'piano', bass: 'drone' },
|
| 31 |
-
VELOCITY: { root: 40, bpm: 124, pad: 0.7, chords: [[0, 7, 12, 15], [0, 7, 12, 15], [-4, 3, 8, 12], [-2, 5, 10, 14]], bass: 'ostinato', drums: 'hats', strings: true, bed: 'wind' },
|
| 32 |
-
DOCUMENT: { root: 41, bpm: 84, pad: 0.75, chords: [[0, 4, 11, 14], [-3, 4, 7, 12], [2, 5, 9, 12], [-5, 2, 7, 11]], keys: 'rhodes', bass: 'drone', bed: 'tape', tick: true },
|
| 33 |
-
NOIR: { root: 34, bpm: 58, pad: 0.85, chords: [[0, 7, 15, 22], [-4, 3, 12, 19], [-7, 0, 8, 15], [-5, 2, 10, 17]], keys: 'piano', bass: 'drone', bed: 'rain' },
|
| 34 |
-
EPIC: { root: 38, bpm: 72, pad: 1, chords: [[0, 7, 12, 15, 19], [-4, 3, 8, 12, 15], [3, 10, 15, 19, 22], [-2, 5, 10, 14, 17]], strings: true, choir: true, bass: 'pulse', drums: 'taiko' },
|
| 35 |
-
SWISS: { root: 48, bpm: 100, pad: 0.55, chords: [[0, 4, 7, 9, 14], [5, 9, 12, 16], [-3, 4, 7, 12], [2, 5, 9, 12]], keys: 'marimba', bass: 'ostinato', drums: 'snap' },
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
const mtof = (m: number) => 440 * Math.pow(2, (m - 69) / 12)
|
| 39 |
-
|
| 40 |
-
// ---------------- 解码缓存 ----------------
|
| 41 |
-
const voiceCache = new Map<number, Promise<AudioBuffer>>()
|
| 42 |
-
export function loadVoice(id: number) {
|
| 43 |
-
let p = voiceCache.get(id)
|
| 44 |
if (!p) {
|
| 45 |
-
p = fetchArrayBuffer(
|
| 46 |
-
|
| 47 |
-
return ctx.decodeAudioData(ab.slice(0))
|
| 48 |
-
})
|
| 49 |
-
voiceCache.set(id, p)
|
| 50 |
}
|
| 51 |
return p
|
| 52 |
}
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
const b = ctx.createBuffer(2, ctx.sampleRate * 2, ctx.sampleRate)
|
| 58 |
-
const r = mulberry32(99)
|
| 59 |
-
for (let c = 0; c < 2; c++) { const d = b.getChannelData(c); for (let i = 0; i < d.length; i++) d[i] = r() * 2 - 1 }
|
| 60 |
-
noiseBuf = b
|
| 61 |
-
return b
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
function impulseResponse(ctx: BaseAudioContext, dur = 3.2, decay = 2.6) {
|
| 65 |
-
const n = Math.floor(ctx.sampleRate * dur)
|
| 66 |
-
const b = ctx.createBuffer(2, n, ctx.sampleRate)
|
| 67 |
-
const r = mulberry32(5)
|
| 68 |
-
for (let c = 0; c < 2; c++) {
|
| 69 |
-
const d = b.getChannelData(c)
|
| 70 |
-
const pre = Math.floor(ctx.sampleRate * 0.02)
|
| 71 |
-
for (let i = pre; i < n; i++) {
|
| 72 |
-
const t = (i - pre) / n
|
| 73 |
-
d[i] = (r() * 2 - 1) * Math.pow(1 - t, decay) * (1 - Math.exp(-(i - pre) / (ctx.sampleRate * 0.004)))
|
| 74 |
-
}
|
| 75 |
-
}
|
| 76 |
-
return b
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
const ksCache = new Map<string, AudioBuffer>()
|
| 80 |
-
/** Karplus-Strong 拨弦(古筝感) */
|
| 81 |
-
function ksPluck(ctx: BaseAudioContext, f: number, dur = 3, bright = 0.5) {
|
| 82 |
-
const key = `${Math.round(f * 10)}-${bright}-${ctx.sampleRate}`
|
| 83 |
-
const c = ksCache.get(key)
|
| 84 |
-
if (c) return c
|
| 85 |
-
const sr = ctx.sampleRate
|
| 86 |
-
const n = Math.floor(sr * dur)
|
| 87 |
-
const b = ctx.createBuffer(1, n, sr)
|
| 88 |
-
const d = b.getChannelData(0)
|
| 89 |
-
const N = Math.max(2, Math.round(sr / f))
|
| 90 |
-
const buf = new Float32Array(N)
|
| 91 |
-
const r = mulberry32(Math.round(f))
|
| 92 |
-
for (let i = 0; i < N; i++) buf[i] = (r() * 2 - 1) * (1 - bright * 0.5) + (i < N / 2 ? bright * 0.4 : -bright * 0.4)
|
| 93 |
-
let idx = 0
|
| 94 |
-
const damp = 0.4985 + 0.0012 * bright
|
| 95 |
-
for (let i = 0; i < n; i++) {
|
| 96 |
-
const a = buf[idx], nb = buf[(idx + 1) % N]
|
| 97 |
-
const v = (a + nb) * damp
|
| 98 |
-
buf[idx] = v
|
| 99 |
-
d[i] = a
|
| 100 |
-
idx = (idx + 1) % N
|
| 101 |
-
}
|
| 102 |
-
ksCache.set(key, b)
|
| 103 |
-
return b
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
// ---------------- 乐器 ----------------
|
| 107 |
-
interface Bus { music: GainNode; sfx: GainNode; rev: GainNode; ctx: BaseAudioContext }
|
| 108 |
-
|
| 109 |
-
function env(g: GainNode, t: number, a: number, peak: number, hold: number, rel: number) {
|
| 110 |
-
g.gain.setValueAtTime(0, t)
|
| 111 |
-
g.gain.linearRampToValueAtTime(peak, t + a)
|
| 112 |
-
g.gain.setValueAtTime(peak, t + a + hold)
|
| 113 |
-
g.gain.linearRampToValueAtTime(0, t + a + hold + rel)
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
function pad(b: Bus, notes: number[], t: number, dur: number, level: number, color = 900, out: AudioNode = b.music) {
|
| 117 |
-
const { ctx } = b
|
| 118 |
-
const lp = ctx.createBiquadFilter()
|
| 119 |
-
lp.type = 'lowpass'
|
| 120 |
-
lp.frequency.setValueAtTime(color * 0.6, t)
|
| 121 |
-
lp.frequency.linearRampToValueAtTime(color, t + dur * 0.5)
|
| 122 |
-
lp.frequency.linearRampToValueAtTime(color * 0.7, t + dur)
|
| 123 |
-
lp.Q.value = 0.6
|
| 124 |
-
const g = ctx.createGain()
|
| 125 |
-
env(g, t, Math.min(1.4, dur * 0.35), level, Math.max(0, dur - 1.4), 1.6)
|
| 126 |
-
lp.connect(g)
|
| 127 |
-
g.connect(out)
|
| 128 |
-
g.connect(b.rev)
|
| 129 |
-
notes.forEach((m, i) => {
|
| 130 |
-
for (const det of [-7, 6]) {
|
| 131 |
-
const o = ctx.createOscillator()
|
| 132 |
-
o.type = 'sawtooth'
|
| 133 |
-
o.frequency.value = mtof(m)
|
| 134 |
-
o.detune.value = det + (i % 2 ? 2 : -2)
|
| 135 |
-
const og = ctx.createGain()
|
| 136 |
-
og.gain.value = 0.5 / notes.length
|
| 137 |
-
const p = ctx.createStereoPanner()
|
| 138 |
-
p.pan.value = det < 0 ? -0.35 : 0.35
|
| 139 |
-
o.connect(og).connect(p).connect(lp)
|
| 140 |
-
o.start(t)
|
| 141 |
-
o.stop(t + dur + 1.8)
|
| 142 |
-
}
|
| 143 |
-
})
|
| 144 |
-
}
|
| 145 |
-
|
| 146 |
-
function piano(b: Bus, m: number, t: number, vel: number, pan = 0, decay = 2.6) {
|
| 147 |
-
const { ctx } = b
|
| 148 |
-
const f = mtof(m)
|
| 149 |
-
const g = ctx.createGain()
|
| 150 |
-
g.gain.setValueAtTime(0, t)
|
| 151 |
-
g.gain.linearRampToValueAtTime(vel, t + 0.006)
|
| 152 |
-
g.gain.exponentialRampToValueAtTime(vel * 0.25, t + 0.4)
|
| 153 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + decay)
|
| 154 |
-
const lp = ctx.createBiquadFilter()
|
| 155 |
-
lp.type = 'lowpass'
|
| 156 |
-
lp.frequency.setValueAtTime(5200, t)
|
| 157 |
-
lp.frequency.exponentialRampToValueAtTime(1400, t + decay * 0.6)
|
| 158 |
-
const p = ctx.createStereoPanner()
|
| 159 |
-
p.pan.value = pan
|
| 160 |
-
lp.connect(g).connect(p)
|
| 161 |
-
p.connect(b.music)
|
| 162 |
-
p.connect(b.rev)
|
| 163 |
-
const parts: [number, number, OscillatorType][] = [[1, 1, 'sine'], [2, 0.32, 'sine'], [3, 0.1, 'triangle'], [4.02, 0.05, 'sine']]
|
| 164 |
-
for (const [mul, a, type] of parts) {
|
| 165 |
-
const o = ctx.createOscillator()
|
| 166 |
-
o.type = type
|
| 167 |
-
o.frequency.value = f * mul
|
| 168 |
-
o.detune.value = (mul - 1) * 1.5
|
| 169 |
-
const og = ctx.createGain()
|
| 170 |
-
og.gain.value = a
|
| 171 |
-
o.connect(og).connect(lp)
|
| 172 |
-
o.start(t)
|
| 173 |
-
o.stop(t + decay + 0.1)
|
| 174 |
-
}
|
| 175 |
-
}
|
| 176 |
-
|
| 177 |
-
function rhodes(b: Bus, m: number, t: number, vel: number, pan = 0) {
|
| 178 |
-
const { ctx } = b
|
| 179 |
-
const f = mtof(m)
|
| 180 |
-
const g = ctx.createGain()
|
| 181 |
-
g.gain.setValueAtTime(0, t)
|
| 182 |
-
g.gain.linearRampToValueAtTime(vel, t + 0.01)
|
| 183 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + 2.4)
|
| 184 |
-
const trem = ctx.createOscillator()
|
| 185 |
-
trem.frequency.value = 4.6
|
| 186 |
-
const tg = ctx.createGain()
|
| 187 |
-
tg.gain.value = vel * 0.25
|
| 188 |
-
trem.connect(tg).connect(g.gain)
|
| 189 |
-
trem.start(t)
|
| 190 |
-
trem.stop(t + 2.5)
|
| 191 |
-
const p = ctx.createStereoPanner()
|
| 192 |
-
p.pan.value = pan
|
| 193 |
-
g.connect(p)
|
| 194 |
-
p.connect(b.music)
|
| 195 |
-
p.connect(b.rev)
|
| 196 |
-
for (const [mul, a] of [[1, 1], [2, 0.18], [7.1, 0.04]] as [number, number][]) {
|
| 197 |
-
const o = ctx.createOscillator()
|
| 198 |
-
o.frequency.value = f * mul
|
| 199 |
-
const og = ctx.createGain()
|
| 200 |
-
og.gain.value = a
|
| 201 |
-
o.connect(og).connect(g)
|
| 202 |
-
o.start(t)
|
| 203 |
-
o.stop(t + 2.5)
|
| 204 |
-
}
|
| 205 |
-
}
|
| 206 |
-
|
| 207 |
-
function marimba(b: Bus, m: number, t: number, vel: number, pan = 0) {
|
| 208 |
-
const { ctx } = b
|
| 209 |
-
const f = mtof(m)
|
| 210 |
-
const g = ctx.createGain()
|
| 211 |
-
g.gain.setValueAtTime(0, t)
|
| 212 |
-
g.gain.linearRampToValueAtTime(vel, t + 0.004)
|
| 213 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + 0.7)
|
| 214 |
-
const p = ctx.createStereoPanner()
|
| 215 |
-
p.pan.value = pan
|
| 216 |
-
g.connect(p)
|
| 217 |
-
p.connect(b.music)
|
| 218 |
-
p.connect(b.rev)
|
| 219 |
-
for (const [mul, a] of [[1, 1], [3.93, 0.22], [9.2, 0.05]] as [number, number][]) {
|
| 220 |
-
const o = ctx.createOscillator()
|
| 221 |
-
o.frequency.value = f * mul
|
| 222 |
-
const og = ctx.createGain()
|
| 223 |
-
og.gain.setValueAtTime(a, t)
|
| 224 |
-
og.gain.exponentialRampToValueAtTime(0.001, t + (mul > 1 ? 0.15 : 0.7))
|
| 225 |
-
o.connect(og).connect(g)
|
| 226 |
-
o.start(t)
|
| 227 |
-
o.stop(t + 0.75)
|
| 228 |
-
}
|
| 229 |
-
}
|
| 230 |
-
|
| 231 |
-
function guzheng(b: Bus, m: number, t: number, vel: number, pan = 0) {
|
| 232 |
-
const { ctx } = b
|
| 233 |
-
const src = ctx.createBufferSource()
|
| 234 |
-
src.buffer = ksPluck(ctx, mtof(m), 3.2, 0.6)
|
| 235 |
-
const g = ctx.createGain()
|
| 236 |
-
g.gain.value = vel * 1.4
|
| 237 |
-
const hp = ctx.createBiquadFilter()
|
| 238 |
-
hp.type = 'highpass'
|
| 239 |
-
hp.frequency.value = 120
|
| 240 |
-
const p = ctx.createStereoPanner()
|
| 241 |
-
p.pan.value = pan
|
| 242 |
-
src.connect(hp).connect(g).connect(p)
|
| 243 |
-
p.connect(b.music)
|
| 244 |
-
p.connect(b.rev)
|
| 245 |
-
src.start(t)
|
| 246 |
-
}
|
| 247 |
-
|
| 248 |
-
function strings(b: Bus, notes: number[], t: number, dur: number, level: number) {
|
| 249 |
-
const { ctx } = b
|
| 250 |
-
const lp = ctx.createBiquadFilter()
|
| 251 |
-
lp.type = 'lowpass'
|
| 252 |
-
lp.frequency.value = 2200
|
| 253 |
-
const g = ctx.createGain()
|
| 254 |
-
env(g, t, Math.min(2, dur * 0.45), level, Math.max(0, dur - 2), 1.8)
|
| 255 |
-
lp.connect(g)
|
| 256 |
-
g.connect(b.music)
|
| 257 |
-
g.connect(b.rev)
|
| 258 |
-
const vib = ctx.createOscillator()
|
| 259 |
-
vib.frequency.value = 5.2
|
| 260 |
-
const vg = ctx.createGain()
|
| 261 |
-
vg.gain.value = 9
|
| 262 |
-
vib.connect(vg)
|
| 263 |
-
vib.start(t)
|
| 264 |
-
vib.stop(t + dur + 2)
|
| 265 |
-
notes.forEach((m) => {
|
| 266 |
-
for (const det of [-9, 0, 8]) {
|
| 267 |
-
const o = ctx.createOscillator()
|
| 268 |
-
o.type = 'sawtooth'
|
| 269 |
-
o.frequency.value = mtof(m)
|
| 270 |
-
o.detune.value = det
|
| 271 |
-
vg.connect(o.detune)
|
| 272 |
-
const og = ctx.createGain()
|
| 273 |
-
og.gain.value = 0.33 / notes.length
|
| 274 |
-
const p = ctx.createStereoPanner()
|
| 275 |
-
p.pan.value = det / 14
|
| 276 |
-
o.connect(og).connect(p).connect(lp)
|
| 277 |
-
o.start(t)
|
| 278 |
-
o.stop(t + dur + 2)
|
| 279 |
-
}
|
| 280 |
-
})
|
| 281 |
-
}
|
| 282 |
|
| 283 |
-
function
|
| 284 |
-
const
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
const formants = [[700, 6], [1150, 8], [2700, 10]]
|
| 290 |
-
const mix = ctx.createGain()
|
| 291 |
-
mix.gain.value = 1
|
| 292 |
-
formants.forEach(([fq, q], i) => {
|
| 293 |
-
const bp = ctx.createBiquadFilter()
|
| 294 |
-
bp.type = 'bandpass'
|
| 295 |
-
bp.frequency.value = fq
|
| 296 |
-
bp.Q.value = q
|
| 297 |
-
const fg = ctx.createGain()
|
| 298 |
-
fg.gain.value = [1, 0.6, 0.25][i] * 3
|
| 299 |
-
mix.connect(bp).connect(fg).connect(g)
|
| 300 |
-
})
|
| 301 |
-
notes.forEach((m) => {
|
| 302 |
-
for (const det of [-12, 10]) {
|
| 303 |
-
const o = ctx.createOscillator()
|
| 304 |
-
o.type = 'sawtooth'
|
| 305 |
-
o.frequency.value = mtof(m)
|
| 306 |
-
o.detune.value = det
|
| 307 |
-
const og = ctx.createGain()
|
| 308 |
-
og.gain.value = 0.5 / notes.length
|
| 309 |
-
o.connect(og).connect(mix)
|
| 310 |
-
o.start(t)
|
| 311 |
-
o.stop(t + dur + 2.2)
|
| 312 |
-
}
|
| 313 |
-
})
|
| 314 |
-
}
|
| 315 |
-
|
| 316 |
-
function sub(b: Bus, m: number, t: number, dur: number, level: number, out?: AudioNode) {
|
| 317 |
-
const { ctx } = b
|
| 318 |
-
const o = ctx.createOscillator()
|
| 319 |
-
o.frequency.value = mtof(m)
|
| 320 |
-
const g = ctx.createGain()
|
| 321 |
-
env(g, t, 0.8, level, Math.max(0, dur - 0.8), 1.2)
|
| 322 |
-
o.connect(g).connect(out ?? b.music)
|
| 323 |
-
o.start(t)
|
| 324 |
-
o.stop(t + dur + 1.3)
|
| 325 |
-
}
|
| 326 |
-
|
| 327 |
-
function bassNote(b: Bus, m: number, t: number, len: number, level: number) {
|
| 328 |
-
const { ctx } = b
|
| 329 |
-
const o = ctx.createOscillator()
|
| 330 |
-
o.type = 'sawtooth'
|
| 331 |
-
o.frequency.value = mtof(m)
|
| 332 |
-
const lp = ctx.createBiquadFilter()
|
| 333 |
-
lp.type = 'lowpass'
|
| 334 |
-
lp.frequency.setValueAtTime(900, t)
|
| 335 |
-
lp.frequency.exponentialRampToValueAtTime(180, t + len)
|
| 336 |
-
lp.Q.value = 4
|
| 337 |
-
const g = ctx.createGain()
|
| 338 |
-
g.gain.setValueAtTime(0, t)
|
| 339 |
-
g.gain.linearRampToValueAtTime(level, t + 0.005)
|
| 340 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + len)
|
| 341 |
-
o.connect(lp).connect(g).connect(b.music)
|
| 342 |
-
o.start(t)
|
| 343 |
-
o.stop(t + len + 0.05)
|
| 344 |
-
}
|
| 345 |
-
|
| 346 |
-
function noiseHit(b: Bus, t: number, o: { type: BiquadFilterType; f: number; f2?: number; q?: number; dur: number; level: number; attack?: number; pan?: number; panTo?: number; out?: AudioNode; rev?: number }) {
|
| 347 |
-
const { ctx } = b
|
| 348 |
-
const src = ctx.createBufferSource()
|
| 349 |
-
src.buffer = noise(ctx)
|
| 350 |
-
src.loop = true
|
| 351 |
-
const bf = ctx.createBiquadFilter()
|
| 352 |
-
bf.type = o.type
|
| 353 |
-
bf.frequency.setValueAtTime(o.f, t)
|
| 354 |
-
if (o.f2) bf.frequency.exponentialRampToValueAtTime(o.f2, t + o.dur)
|
| 355 |
-
bf.Q.value = o.q ?? 0.8
|
| 356 |
-
const g = ctx.createGain()
|
| 357 |
-
const a = o.attack ?? 0.003
|
| 358 |
-
g.gain.setValueAtTime(0, t)
|
| 359 |
-
g.gain.linearRampToValueAtTime(o.level, t + a)
|
| 360 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + o.dur)
|
| 361 |
-
const p = ctx.createStereoPanner()
|
| 362 |
-
p.pan.setValueAtTime(o.pan ?? 0, t)
|
| 363 |
-
if (o.panTo != null) p.pan.linearRampToValueAtTime(o.panTo, t + o.dur)
|
| 364 |
-
src.connect(bf).connect(g).connect(p)
|
| 365 |
-
p.connect(o.out ?? b.sfx)
|
| 366 |
-
if (o.rev) { const rg = ctx.createGain(); rg.gain.value = o.rev; p.connect(rg).connect(b.rev) }
|
| 367 |
-
src.start(t, (t * 0.37) % 1.5)
|
| 368 |
-
src.stop(t + o.dur + 0.05)
|
| 369 |
-
}
|
| 370 |
-
|
| 371 |
-
function drop(b: Bus, t: number, f0: number, f1: number, dur: number, level: number, out?: AudioNode) {
|
| 372 |
-
const { ctx } = b
|
| 373 |
-
const o = ctx.createOscillator()
|
| 374 |
-
o.frequency.setValueAtTime(f0, t)
|
| 375 |
-
o.frequency.exponentialRampToValueAtTime(f1, t + dur * 0.6)
|
| 376 |
-
const g = ctx.createGain()
|
| 377 |
-
g.gain.setValueAtTime(0, t)
|
| 378 |
-
g.gain.linearRampToValueAtTime(level, t + 0.004)
|
| 379 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + dur)
|
| 380 |
-
const sh = ctx.createWaveShaper()
|
| 381 |
-
const curve = new Float32Array(1024)
|
| 382 |
-
for (let i = 0; i < 1024; i++) { const x = (i / 1023) * 2 - 1; curve[i] = Math.tanh(x * 2.2) }
|
| 383 |
-
sh.curve = curve
|
| 384 |
-
o.connect(sh).connect(g)
|
| 385 |
-
g.connect(out ?? b.sfx)
|
| 386 |
-
const rg = ctx.createGain()
|
| 387 |
-
rg.gain.value = 0.25
|
| 388 |
-
g.connect(rg).connect(b.rev)
|
| 389 |
-
o.start(t)
|
| 390 |
-
o.stop(t + dur + 0.05)
|
| 391 |
-
}
|
| 392 |
-
|
| 393 |
-
// ---------------- 音效 ----------------
|
| 394 |
-
const sfx = {
|
| 395 |
-
boom: (b: Bus, t: number, l = 1) => { drop(b, t, 90, 32, 2.6, 0.75 * l); noiseHit(b, t, { type: 'lowpass', f: 600, f2: 80, dur: 1.4, level: 0.25 * l, rev: 0.4 }) },
|
| 396 |
-
impact: (b: Bus, t: number, l = 1) => { drop(b, t, 120, 38, 1.4, 0.8 * l); noiseHit(b, t, { type: 'lowpass', f: 3000, f2: 200, dur: 0.6, level: 0.35 * l, rev: 0.6 }) },
|
| 397 |
-
thump: (b: Bus, t: number, l = 1) => { drop(b, t, 140, 50, 0.35, 0.45 * l); noiseHit(b, t, { type: 'bandpass', f: 1200, dur: 0.08, level: 0.12 * l }) },
|
| 398 |
-
whoosh: (b: Bus, t: number, l = 1, dir = 1) => noiseHit(b, t - 0.25, { type: 'bandpass', f: 600, f2: 4200, q: 1.2, dur: 0.5, level: 0.22 * l, attack: 0.22, pan: -0.7 * dir, panTo: 0.7 * dir, rev: 0.3 }),
|
| 399 |
-
riser: (b: Bus, t0: number, t1: number, l = 1) => {
|
| 400 |
-
const { ctx } = b
|
| 401 |
-
const src = ctx.createBufferSource()
|
| 402 |
-
src.buffer = noise(ctx)
|
| 403 |
-
src.loop = true
|
| 404 |
-
const bf = ctx.createBiquadFilter()
|
| 405 |
-
bf.type = 'bandpass'
|
| 406 |
-
bf.Q.value = 2
|
| 407 |
-
bf.frequency.setValueAtTime(300, t0)
|
| 408 |
-
bf.frequency.exponentialRampToValueAtTime(7000, t1)
|
| 409 |
-
const g = ctx.createGain()
|
| 410 |
-
g.gain.setValueAtTime(0.0001, t0)
|
| 411 |
-
g.gain.exponentialRampToValueAtTime(0.18 * l, t1)
|
| 412 |
-
g.gain.linearRampToValueAtTime(0, t1 + 0.03)
|
| 413 |
-
src.connect(bf).connect(g)
|
| 414 |
-
g.connect(b.sfx)
|
| 415 |
-
g.connect(b.rev)
|
| 416 |
-
src.start(t0)
|
| 417 |
-
src.stop(t1 + 0.05)
|
| 418 |
-
},
|
| 419 |
-
swell: (b: Bus, notes: number[], t1: number, l = 1) => {
|
| 420 |
-
// 反向音效:渐强后戛然而止
|
| 421 |
-
const { ctx } = b
|
| 422 |
-
const g = ctx.createGain()
|
| 423 |
-
g.gain.setValueAtTime(0.0001, t1 - 1.2)
|
| 424 |
-
g.gain.exponentialRampToValueAtTime(0.16 * l, t1 - 0.02)
|
| 425 |
-
g.gain.linearRampToValueAtTime(0, t1)
|
| 426 |
-
g.connect(b.sfx)
|
| 427 |
-
notes.forEach((m) => {
|
| 428 |
-
const o = ctx.createOscillator()
|
| 429 |
-
o.type = 'triangle'
|
| 430 |
-
o.frequency.value = mtof(m)
|
| 431 |
-
o.connect(g)
|
| 432 |
-
o.start(t1 - 1.25)
|
| 433 |
-
o.stop(t1 + 0.02)
|
| 434 |
-
})
|
| 435 |
-
noiseHit(b, t1 - 1.2, { type: 'highpass', f: 4000, dur: 1.2, level: 0.001, attack: 1.15 })
|
| 436 |
-
},
|
| 437 |
-
click: (b: Bus, t: number, l = 1) => noiseHit(b, t, { type: 'highpass', f: 3500, dur: 0.035, level: 0.3 * l }),
|
| 438 |
-
snap: (b: Bus, t: number, l = 1) => noiseHit(b, t, { type: 'bandpass', f: 2200, q: 2.5, dur: 0.07, level: 0.5 * l, rev: 0.25 }),
|
| 439 |
-
clap: (b: Bus, t: number) => { noiseHit(b, t, { type: 'bandpass', f: 1800, q: 1.2, dur: 0.12, level: 0.7, rev: 0.4 }); drop(b, t, 220, 90, 0.12, 0.3) },
|
| 440 |
-
shutter: (b: Bus, t: number) => { noiseHit(b, t, { type: 'highpass', f: 2500, dur: 0.04, level: 0.4 }); noiseHit(b, t + 0.07, { type: 'highpass', f: 2000, dur: 0.05, level: 0.3 }) },
|
| 441 |
-
gong: (b: Bus, t: number, l = 1) => {
|
| 442 |
-
const { ctx } = b
|
| 443 |
-
const g = ctx.createGain()
|
| 444 |
-
g.gain.setValueAtTime(0, t)
|
| 445 |
-
g.gain.linearRampToValueAtTime(0.22 * l, t + 0.02)
|
| 446 |
-
g.gain.exponentialRampToValueAtTime(0.0001, t + 4)
|
| 447 |
-
g.connect(b.sfx)
|
| 448 |
-
g.connect(b.rev)
|
| 449 |
-
for (const [f, a] of [[98, 1], [147.5, 0.5], [212, 0.35], [301, 0.2], [420, 0.12]] as [number, number][]) {
|
| 450 |
-
const o = ctx.createOscillator()
|
| 451 |
-
o.frequency.setValueAtTime(f * 1.01, t)
|
| 452 |
-
o.frequency.linearRampToValueAtTime(f, t + 1)
|
| 453 |
-
const og = ctx.createGain()
|
| 454 |
-
og.gain.value = a
|
| 455 |
-
o.connect(og).connect(g)
|
| 456 |
-
o.start(t)
|
| 457 |
-
o.stop(t + 4.1)
|
| 458 |
-
}
|
| 459 |
-
},
|
| 460 |
-
}
|
| 461 |
-
|
| 462 |
-
// ---------------- 单片配乐 ----------------
|
| 463 |
-
function scoreFilm(b: Bus, f: Film, off: number, o: MixOptions, voice: AudioBuffer | null, voiceBus: GainNode) {
|
| 464 |
-
const p = PRESETS[f.treatment]
|
| 465 |
-
const r = mulberry32(f.seed)
|
| 466 |
-
const T = f.T
|
| 467 |
-
const beat = 60 / p.bpm
|
| 468 |
-
const bar = beat * 4
|
| 469 |
-
const punch = punchAt(f)
|
| 470 |
-
const musicEnd = f.fullOutro ? T - 0.2 : T + 0.3
|
| 471 |
-
const root = p.root + (f.id % 3 === 0 ? 2 : f.id % 3 === 1 ? 0 : -2)
|
| 472 |
-
|
| 473 |
-
if (o.music) {
|
| 474 |
-
// 闪避:配音时压低音乐
|
| 475 |
-
const duck = b.ctx.createGain()
|
| 476 |
-
duck.gain.setValueAtTime(1, off)
|
| 477 |
-
for (const c of f.clauses) {
|
| 478 |
-
duck.gain.setTargetAtTime(0.42, off + c.t0 - 0.12, 0.05)
|
| 479 |
-
duck.gain.setTargetAtTime(1, off + c.t1 + 0.18, 0.25)
|
| 480 |
-
}
|
| 481 |
-
duck.connect(b.music)
|
| 482 |
-
const bus: Bus = { ...b, music: duck }
|
| 483 |
-
// 和弦进行
|
| 484 |
-
const chordLen = bar * (p.bpm > 110 ? 2 : 1)
|
| 485 |
-
let ci = 0
|
| 486 |
-
const start = 0.15
|
| 487 |
-
for (let t = start; t < musicEnd; t += chordLen, ci++) {
|
| 488 |
-
const ch = p.chords[ci % p.chords.length].map((x) => x + root)
|
| 489 |
-
const len = Math.min(chordLen, musicEnd - t)
|
| 490 |
-
pad(bus, ch.map((m) => m + 12), off + t, len, 0.11 * p.pad, p.bpm > 110 ? 1400 : 950)
|
| 491 |
-
if (p.bass === 'drone') sub(bus, root - 12 + (p.chords[ci % p.chords.length][0] || 0), off + t, len, 0.16)
|
| 492 |
-
if (p.strings && t > f.vs - 1.5) strings(bus, ch.slice(1).map((m) => m + 12), off + t, len, 0.07)
|
| 493 |
-
if (p.choir && t > punch - chordLen) choir(bus, ch.slice(0, 3).map((m) => m + 24), off + t, len, 0.05)
|
| 494 |
-
// 旋律性乐器
|
| 495 |
-
if (p.keys) {
|
| 496 |
-
const scale = ch.map((m) => m + 24)
|
| 497 |
-
const steps = p.keys === 'marimba' ? 8 : p.keys === 'guzheng' ? 6 : 4
|
| 498 |
-
const dt = chordLen / steps
|
| 499 |
-
for (let s = 0; s < steps; s++) {
|
| 500 |
-
const tt = t + s * dt
|
| 501 |
-
if (tt > musicEnd - 0.5) break
|
| 502 |
-
if (p.keys !== 'marimba' && r() < 0.28) continue
|
| 503 |
-
const note = scale[Math.floor(r() * scale.length)] + (r() < 0.2 ? 12 : 0)
|
| 504 |
-
const pan = f.treatment === 'DIPTYCH' ? (s % 2 ? 0.6 : -0.6) : (r() - 0.5) * 0.6
|
| 505 |
-
const vel = 0.09 + r() * 0.05
|
| 506 |
-
if (p.keys === 'piano') piano(bus, note, off + tt, vel, pan, f.treatment === 'NOIR' ? 3.6 : 2.6)
|
| 507 |
-
else if (p.keys === 'rhodes') rhodes(bus, note, off + tt, vel * 0.9, pan)
|
| 508 |
-
else if (p.keys === 'marimba') marimba(bus, note, off + tt, vel * 0.9, pan)
|
| 509 |
-
else if (p.keys === 'guzheng') guzheng(bus, [0, 2, 4, 7, 9][Math.floor(r() * 5)] + root + 24 + (r() < 0.3 ? 12 : 0), off + tt, vel, pan)
|
| 510 |
-
}
|
| 511 |
-
}
|
| 512 |
-
// 节奏
|
| 513 |
-
if (p.bass === 'ostinato' && t > f.vs - bar) {
|
| 514 |
-
const n = p.bpm > 110 ? 16 : 8
|
| 515 |
-
for (let s = 0; s < n * (chordLen / bar); s++) {
|
| 516 |
-
const tt = t + s * (bar / n)
|
| 517 |
-
if (tt > musicEnd - 0.3) break
|
| 518 |
-
bassNote(bus, ch[0] - 12 + (s % 4 === 3 ? 7 : 0), off + tt, bar / n * 0.9, 0.12)
|
| 519 |
-
}
|
| 520 |
-
}
|
| 521 |
-
if (p.bass === 'pulse') for (let s = 0; s < 4 * (chordLen / bar); s++) { const tt = t + s * beat; if (tt < musicEnd - 0.3) drop(bus, off + tt, 75, 42, 0.5, 0.18, bus.music) }
|
| 522 |
-
if (p.drums === 'hats' && t > f.vs - bar) for (let s = 0; s < 8 * (chordLen / bar); s++) { const tt = t + s * beat / 2; if (tt < musicEnd - 0.3) noiseHit(bus, off + tt, { type: 'highpass', f: 8000, dur: s % 2 ? 0.03 : 0.06, level: s % 2 ? 0.05 : 0.08, out: bus.music }) }
|
| 523 |
-
if (p.drums === 'snap' && t > f.vs - bar) for (let s = 1; s < 4 * (chordLen / bar); s += 2) { const tt = t + s * beat; if (tt < musicEnd - 0.3) noiseHit(bus, off + tt, { type: 'bandpass', f: 2400, q: 2.5, dur: 0.06, level: 0.16, out: bus.music, rev: 0.2 }) }
|
| 524 |
-
if (p.drums === 'taiko' && t > f.vs - 0.2) { drop(bus, off + t, 95, 45, 0.9, 0.35, bus.music); if (chordLen > 2.5) drop(bus, off + t + beat * 2.5, 110, 50, 0.6, 0.18, bus.music) }
|
| 525 |
-
if (p.tick) for (let s = 0; s < 4 * (chordLen / bar); s++) { const tt = t + s * beat; if (tt < musicEnd - 0.3) noiseHit(bus, off + tt, { type: 'highpass', f: 5000, dur: 0.02, level: 0.06, out: bus.music }) }
|
| 526 |
-
}
|
| 527 |
-
// 环境声床
|
| 528 |
-
if (p.bed) {
|
| 529 |
-
const src = b.ctx.createBufferSource()
|
| 530 |
-
src.buffer = noise(b.ctx)
|
| 531 |
-
src.loop = true
|
| 532 |
-
const lp = b.ctx.createBiquadFilter()
|
| 533 |
-
lp.type = p.bed === 'tape' ? 'highpass' : 'bandpass'
|
| 534 |
-
lp.frequency.value = p.bed === 'rain' ? 2500 : p.bed === 'tape' ? 4000 : 500
|
| 535 |
-
lp.Q.value = p.bed === 'wind' ? 0.6 : 0.4
|
| 536 |
-
const g = b.ctx.createGain()
|
| 537 |
-
const lvl = p.bed === 'rain' ? 0.07 : p.bed === 'tape' ? 0.012 : 0.04
|
| 538 |
-
env(g, off + 0.2, 1.2, lvl, Math.max(0, musicEnd - 2.6), 1.2)
|
| 539 |
-
src.connect(lp).connect(g).connect(b.music)
|
| 540 |
-
src.start(off + 0.2)
|
| 541 |
-
src.stop(off + musicEnd + 0.2)
|
| 542 |
-
}
|
| 543 |
-
// 片尾徽标和弦
|
| 544 |
-
if (f.fullOutro) {
|
| 545 |
-
const t0 = off + f.holdEnd + 0.35
|
| 546 |
-
const ch = [0, 7, 14, 16, 19, 24].map((x) => x + root + 12)
|
| 547 |
-
pad(b, ch, t0, 2.6, 0.08, 1800)
|
| 548 |
-
ch.forEach((m, i) => piano(b, m + 12, t0 + 0.4 + i * 0.12, 0.06, (i / ch.length - 0.5) * 0.8, 3))
|
| 549 |
-
}
|
| 550 |
-
}
|
| 551 |
-
|
| 552 |
-
if (o.sfx) {
|
| 553 |
-
// 片头
|
| 554 |
-
if (f.treatment === 'SWISS') { sfx.whoosh(b, off + 0.45, 0.9); sfx.snap(b, off + 0.62); sfx.whoosh(b, off + f.vs - 0.05, 0.8, -1) }
|
| 555 |
-
else if (f.treatment === 'DOCUMENT') { sfx.click(b, off + 0.4, 0.6); sfx.clap(b, off + 1.32) }
|
| 556 |
-
else if (f.treatment === 'SCROLL') { sfx.gong(b, off + 0.3, 0.9) }
|
| 557 |
-
else if (f.treatment === 'MONUMENT') { sfx.impact(b, off + 0.35, 0.9) }
|
| 558 |
-
else sfx.boom(b, off + 0.25, f.compact ? 0.5 : 0.75)
|
| 559 |
-
if (f.treatment !== 'SWISS' && f.treatment !== 'DOCUMENT') sfx.riser(b, off + f.vs - 1.4, off + f.vs - 0.08, 0.8)
|
| 560 |
-
if (f.treatment !== 'SWISS') sfx.whoosh(b, off + f.vs - 0.1, 0.7)
|
| 561 |
-
// 换页
|
| 562 |
-
f.pages.forEach((pg, i) => {
|
| 563 |
-
if (i === 0) return
|
| 564 |
-
if (f.treatment === 'SWISS') sfx.snap(b, off + pg.t0 + 0.05, 0.7)
|
| 565 |
-
else if (f.treatment === 'VELOCITY') sfx.whoosh(b, off + pg.t0, 1.1, i % 2 ? 1 : -1)
|
| 566 |
-
else if (f.treatment !== 'SCROLL') sfx.whoosh(b, off + pg.t0, 0.45, i % 2 ? 1 : -1)
|
| 567 |
-
})
|
| 568 |
-
// 逐字
|
| 569 |
-
if (f.treatment === 'MONUMENT') f.chars.forEach((c) => sfx.thump(b, off + c.t0 + 0.1, 0.35))
|
| 570 |
-
if (f.treatment === 'DOCUMENT') f.chars.forEach((c) => sfx.click(b, off + c.t0, 0.25))
|
| 571 |
-
// 金句落点
|
| 572 |
-
const ch0 = p.chords[0].map((x) => x + root + 12)
|
| 573 |
-
if (['CINEMA', 'NOIR', 'EPIC', 'DIPTYCH'].includes(f.treatment)) sfx.swell(b, ch0, off + punch - 0.04, 0.9)
|
| 574 |
-
if (['MONUMENT', 'EPIC', 'VELOCITY', 'CINEMA'].includes(f.treatment)) sfx.impact(b, off + punch, f.treatment === 'CINEMA' ? 0.6 : 0.9)
|
| 575 |
-
if (f.treatment === 'DOCUMENT') sfx.shutter(b, off + punch)
|
| 576 |
-
if (f.treatment === 'SWISS') sfx.snap(b, off + punch, 1)
|
| 577 |
-
if (f.treatment === 'SCROLL') { sfx.thump(b, off + f.ve + 0.32, 0.8); guzheng(b, root + 24, off + punch, 0.18, 0) }
|
| 578 |
-
if (f.treatment === 'NOIR') sfx.gong(b, off + punch, 0.35)
|
| 579 |
-
// 片尾
|
| 580 |
-
if (f.fullOutro) sfx.boom(b, off + f.holdEnd + 0.1, 0.28)
|
| 581 |
-
}
|
| 582 |
-
|
| 583 |
-
if (voice && o.voice !== false) {
|
| 584 |
-
const src = b.ctx.createBufferSource()
|
| 585 |
-
src.buffer = voice
|
| 586 |
-
const p2 = b.ctx.createStereoPanner()
|
| 587 |
-
p2.pan.value = 0
|
| 588 |
-
src.connect(p2).connect(voiceBus)
|
| 589 |
-
src.start(off + f.vs)
|
| 590 |
-
}
|
| 591 |
-
}
|
| 592 |
-
|
| 593 |
-
function rmsDb(chs: Float32Array[], sr: number, floorDb: number) {
|
| 594 |
-
// 50ms 窗口 RMS,只统计高于门限的窗口(门控响度)
|
| 595 |
-
const win = Math.floor(sr * 0.05)
|
| 596 |
-
let acc = 0, n = 0, peak = 0
|
| 597 |
-
const len = chs[0].length
|
| 598 |
-
for (let i = 0; i < len; i += win) {
|
| 599 |
-
let e = 0
|
| 600 |
-
const end = Math.min(len, i + win)
|
| 601 |
-
for (const d of chs) for (let j = i; j < end; j++) { const v = d[j]; e += v * v; const a = v < 0 ? -v : v; if (a > peak) peak = a }
|
| 602 |
-
e /= (end - i) * chs.length
|
| 603 |
-
const db = 10 * Math.log10(e + 1e-12)
|
| 604 |
-
if (db > floorDb) { acc += e; n++ }
|
| 605 |
-
}
|
| 606 |
-
return { db: n ? 10 * Math.log10(acc / n) : -120, peak }
|
| 607 |
-
}
|
| 608 |
-
|
| 609 |
-
async function renderStem(prog: Program, which: 'voice' | 'music' | 'sfx', voices: (AudioBuffer | null)[]): Promise<AudioBuffer> {
|
| 610 |
-
const len = Math.ceil((prog.duration + 0.2) * SR)
|
| 611 |
const ctx = new OfflineAudioContext(2, len, SR)
|
| 612 |
const master = ctx.createGain()
|
|
|
|
| 613 |
master.connect(ctx.destination)
|
| 614 |
-
const
|
| 615 |
-
|
| 616 |
-
const
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
if (o.sfx) { sfx.boom(b, 0.2, 0.8); sfx.riser(b, prog.opener - 1.4, prog.opener - 0.1, 0.7) }
|
| 631 |
-
}
|
| 632 |
-
prog.segments.forEach((s, i) => scoreFilm(b, s.film, s.start, o, which === 'voice' ? voices[i] : null, voiceBus))
|
| 633 |
-
return ctx.startRendering()
|
| 634 |
-
}
|
| 635 |
-
|
| 636 |
-
/** 渲染整条节目音轨:分轨渲染 → 门控响度测量 → 自动配比 → 原地叠加 → 软限幅(逐轨进行,长合集也不爆内存) */
|
| 637 |
-
export async function renderProgramAudio(prog: Program, o: MixOptions): Promise<AudioBuffer> {
|
| 638 |
-
const voices = await Promise.all(prog.segments.map((s) => (o.voice === false ? Promise.resolve(null) : loadVoice(s.film.id).catch(() => null))))
|
| 639 |
-
const order: ('voice' | 'music' | 'sfx')[] = []
|
| 640 |
-
if (o.voice !== false) order.push('voice')
|
| 641 |
-
if (o.music) order.push('music')
|
| 642 |
-
if (o.sfx) order.push('sfx')
|
| 643 |
-
if (!order.length) order.push('voice')
|
| 644 |
-
let out: AudioBuffer | null = null
|
| 645 |
-
let ref = { db: -20, peak: 0.5 }
|
| 646 |
-
let hasVoice = false
|
| 647 |
-
for (const which of order) {
|
| 648 |
-
const stem = await renderStem(prog, which, voices)
|
| 649 |
-
const ch = [stem.getChannelData(0), stem.getChannelData(1)]
|
| 650 |
-
let gain = 1
|
| 651 |
-
if (which === 'voice') { ref = rmsDb(ch, SR, -50); hasVoice = true }
|
| 652 |
-
else if (which === 'music') { const m = rmsDb(ch, SR, -60); gain = hasVoice ? Math.pow(10, (ref.db - 11 - m.db) / 20) : 0.5 / Math.max(1e-6, m.peak) }
|
| 653 |
-
else { const x = rmsDb(ch, SR, -60); gain = hasVoice ? Math.min(Math.pow(10, (ref.db - 6 - x.db) / 20), (ref.peak * 1.05) / Math.max(1e-6, x.peak)) : 0.6 / Math.max(1e-6, x.peak) }
|
| 654 |
-
if (!out) {
|
| 655 |
-
out = stem
|
| 656 |
-
if (gain !== 1) for (const d of ch) for (let i = 0; i < d.length; i++) d[i] *= gain
|
| 657 |
-
} else {
|
| 658 |
-
for (let c = 0; c < 2; c++) { const d = out.getChannelData(c), s2 = ch[c]; const n = Math.min(d.length, s2.length); for (let i = 0; i < n; i++) d[i] += s2[i] * gain }
|
| 659 |
}
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 667 |
for (let c = 0; c < 2; c++) {
|
| 668 |
-
const d =
|
| 669 |
for (let i = 0; i < d.length; i++) {
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
if (a > T) v = Math.sign(v) * (T + (0.97 - T) * Math.tanh((a - T) / (0.97 - T)))
|
| 673 |
-
d[i] = v
|
| 674 |
}
|
| 675 |
}
|
| 676 |
-
return
|
| 677 |
}
|
|
|
|
| 1 |
+
// 声音:配音 + 原片音乐(作为背景音乐,配音时自动压低)
|
| 2 |
+
import type { Program } from './film'
|
|
|
|
| 3 |
import { fetchArrayBuffer, voiceUrl } from './assets'
|
| 4 |
+
import { bgmUrl, CLIP_LEN } from './footage'
|
|
|
|
| 5 |
|
| 6 |
export const SR = 44100
|
| 7 |
|
| 8 |
+
export interface MixOptions { music: boolean; voice?: boolean }
|
| 9 |
|
| 10 |
+
const decodeCache = new Map<string, Promise<AudioBuffer>>()
|
| 11 |
+
function decode(url: string) {
|
| 12 |
+
let p = decodeCache.get(url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
if (!p) {
|
| 14 |
+
p = fetchArrayBuffer(url).then((ab) => new OfflineAudioContext(2, 1, SR).decodeAudioData(ab.slice(0)))
|
| 15 |
+
decodeCache.set(url, p)
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
return p
|
| 18 |
}
|
| 19 |
+
export const loadVoice = (id: number) => decode(voiceUrl(id))
|
| 20 |
+
export const loadBgm = () => decode(bgmUrl())
|
| 21 |
|
| 22 |
+
/** 背景音乐相对配音的电平(dB):无人声时 / 有人声时 */
|
| 23 |
+
const BGM_FREE = -9
|
| 24 |
+
const BGM_DUCK = -19
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
export async function renderProgramAudio(prog: Program, o: MixOptions): Promise<AudioBuffer> {
|
| 27 |
+
const [voices, bgm] = await Promise.all([
|
| 28 |
+
Promise.all(prog.segments.map((s) => (o.voice === false ? Promise.resolve(null) : loadVoice(s.film.id).catch(() => null)))),
|
| 29 |
+
o.music ? loadBgm().catch(() => null) : Promise.resolve(null),
|
| 30 |
+
])
|
| 31 |
+
const len = Math.ceil((prog.duration + 0.1) * SR)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
const ctx = new OfflineAudioContext(2, len, SR)
|
| 33 |
const master = ctx.createGain()
|
| 34 |
+
master.gain.value = Math.pow(10, 3 / 20)
|
| 35 |
master.connect(ctx.destination)
|
| 36 |
+
const db = (x: number) => Math.pow(10, x / 20)
|
| 37 |
+
// 配音统一响度已在素材阶段完成(-16 LUFS);原片音乐约 -14 LUFS
|
| 38 |
+
const VOICE_GAIN = 1
|
| 39 |
+
const bgmBase = db(-16 - -14.4)
|
| 40 |
+
|
| 41 |
+
prog.segments.forEach((s, i) => {
|
| 42 |
+
const f = s.film
|
| 43 |
+
const off = s.start
|
| 44 |
+
const v = voices[i]
|
| 45 |
+
if (v) {
|
| 46 |
+
const src = ctx.createBufferSource()
|
| 47 |
+
src.buffer = v
|
| 48 |
+
const g = ctx.createGain()
|
| 49 |
+
g.gain.value = VOICE_GAIN
|
| 50 |
+
src.connect(g).connect(master)
|
| 51 |
+
src.start(off + f.vs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
+
if (bgm) {
|
| 54 |
+
// 与画面同步:原片音乐跟随原片的起点与循环
|
| 55 |
+
const g = ctx.createGain()
|
| 56 |
+
const free = bgmBase * db(BGM_FREE)
|
| 57 |
+
const duck = bgmBase * db(BGM_DUCK)
|
| 58 |
+
g.gain.setValueAtTime(0, off)
|
| 59 |
+
g.gain.linearRampToValueAtTime(free, off + 0.8)
|
| 60 |
+
for (const c of f.clauses) {
|
| 61 |
+
g.gain.setTargetAtTime(duck, off + c.t0 - 0.25, 0.08)
|
| 62 |
+
g.gain.setTargetAtTime(free, off + c.t1 + 0.15, 0.35)
|
| 63 |
+
}
|
| 64 |
+
g.gain.setValueAtTime(free, off + f.T - 1.0)
|
| 65 |
+
g.gain.linearRampToValueAtTime(0, off + f.T - 0.05)
|
| 66 |
+
g.connect(master)
|
| 67 |
+
for (const u of f.uses) {
|
| 68 |
+
const src = ctx.createBufferSource()
|
| 69 |
+
src.buffer = bgm
|
| 70 |
+
src.connect(g)
|
| 71 |
+
const d = u.to - u.from
|
| 72 |
+
src.start(off + u.from, Math.min(u.offset, CLIP_LEN), d + 0.02)
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
})
|
| 76 |
+
const out = await ctx.startRendering()
|
| 77 |
+
// 软限幅:0.75 以上平滑压缩,最高不超过 -0.3 dBFS
|
| 78 |
+
const T = 0.75, M = 0.965
|
| 79 |
for (let c = 0; c < 2; c++) {
|
| 80 |
+
const d = out.getChannelData(c)
|
| 81 |
for (let i = 0; i < d.length; i++) {
|
| 82 |
+
const a = d[i] < 0 ? -d[i] : d[i]
|
| 83 |
+
if (a > T) d[i] = Math.sign(d[i]) * (T + (M - T) * Math.tanh((a - T) / (M - T)))
|
|
|
|
|
|
|
| 84 |
}
|
| 85 |
}
|
| 86 |
+
return out
|
| 87 |
}
|
src/film/core/treatments.ts
DELETED
|
@@ -1,569 +0,0 @@
|
|
| 1 |
-
// 9 套导演美学处理
|
| 2 |
-
import { FONT } from './assets'
|
| 3 |
-
import type { DC } from './dc'
|
| 4 |
-
import { drawEnglish, impulse, numCN, pageAlpha, punchAt } from './dc'
|
| 5 |
-
import type { CharT, PageT } from './film'
|
| 6 |
-
import {
|
| 7 |
-
bokeh, desaturate, drawVideo, glitchSlices, godRays, grid, hline, inkBloom, inkMountains, letterbox, paper, particles,
|
| 8 |
-
rain, seal, shockRing, speedLines, tint, timecode, viewfinder, type Rect,
|
| 9 |
-
} from './fx'
|
| 10 |
-
import { BANANA, BANANA_SOFT, breakClause, drawChar, goldGradient, layoutLines, layoutVertical, txt, type Placed } from './typo'
|
| 11 |
-
import { clamp, ease, fbm1, lerp, pad2, smooth } from './util'
|
| 12 |
-
import type { Treatment } from '../data/quotes'
|
| 13 |
-
import { SHOTS } from './footage'
|
| 14 |
-
|
| 15 |
-
const isDark = (dc: DC) => dc.shot != null && SHOTS[dc.shot]?.luma === 'dark'
|
| 16 |
-
|
| 17 |
-
const full = (dc: DC): Rect => ({ x: 0, y: 0, w: dc.w, h: dc.h })
|
| 18 |
-
const linesOf = (p: PageT, maxPer: number) => p.clauses.flatMap((c) => breakClause(c.chars, maxPer))
|
| 19 |
-
|
| 20 |
-
function pushZoom(dc: DC, base = 1.04, rate = 0.02) {
|
| 21 |
-
return base + dc.useLocal * rate
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
function drawPlaced(dc: DC, placed: Placed[], reveal: Parameters<typeof drawChar>[3], style: Parameters<typeof drawChar>[4]) {
|
| 25 |
-
for (const p of placed) drawChar(dc.g, p, dc.t, reveal, style)
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
// ───────────────────────────── CINEMA 宽银幕 ─────────────────────────────
|
| 29 |
-
function CINEMA(dc: DC) {
|
| 30 |
-
const { g, w, h, P, S, t, f, post } = dc
|
| 31 |
-
const punch = punchAt(f)
|
| 32 |
-
const pk = impulse(t, punch - 0.04, 0.3)
|
| 33 |
-
const tone = f.q.tone
|
| 34 |
-
let rect: Rect = full(dc)
|
| 35 |
-
if (P) rect = { x: 0, y: h * 0.2, w, h: w * 1.12 }
|
| 36 |
-
drawVideo(g, dc.video, rect, { zoom: pushZoom(dc, 1.05, 0.03) + pk * 0.05, shot: dc.shot ?? undefined, panX: Math.sin(t * 0.13) * 0.015 })
|
| 37 |
-
// 底部渐暗,托字
|
| 38 |
-
const gr = g.createLinearGradient(0, P ? rect.y + rect.h * 0.6 : h * 0.4, 0, P ? rect.y + rect.h : h)
|
| 39 |
-
gr.addColorStop(0, 'rgba(0,0,0,0)')
|
| 40 |
-
gr.addColorStop(1, 'rgba(0,0,0,0.78)')
|
| 41 |
-
g.fillStyle = gr
|
| 42 |
-
g.fillRect(0, 0, w, h)
|
| 43 |
-
const lb = P ? 0 : letterbox(g, w, h, 2.39, ease.inOutCubic((t - 0.3) / 1.6))
|
| 44 |
-
if (P) {
|
| 45 |
-
g.fillStyle = '#000'
|
| 46 |
-
g.fillRect(0, 0, w, rect.y)
|
| 47 |
-
g.fillRect(0, rect.y + rect.h, w, h - rect.y - rect.h)
|
| 48 |
-
txt(g, `ODEBIAO QUOTES №${pad2(f.id)}`, w / 2, rect.y * 0.55, `500 ${S * 0.03}px ${FONT.latin}`, 'rgba(255,255,255,0.55)', 'center', 0.5, smooth((t - f.vs) / 0.8))
|
| 49 |
-
}
|
| 50 |
-
// 字幕
|
| 51 |
-
const page = f.pageAt(t)
|
| 52 |
-
const lines = linesOf(page, P ? 9 : 16)
|
| 53 |
-
const ty = P ? rect.y + rect.h + (h - rect.y - rect.h) * 0.42 : h - lb - h * 0.15
|
| 54 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 600, maxW: w * (P ? 0.86 : 0.8), maxSize: S * (P ? 0.075 : 0.058), tracking: 0.14, lineH: 1.5, x: w / 2, y: ty })
|
| 55 |
-
g.save()
|
| 56 |
-
g.globalAlpha = pageAlpha(f, page, t)
|
| 57 |
-
drawPlaced(dc, L.placed, 'blur', { family: FONT.serif, weight: 600, fill: '#f6f1e7', keyFill: BANANA, dur: 0.55, shadow: 'rgba(0,0,0,0.75)', shadowBlur: 18 * dc.u })
|
| 58 |
-
g.restore()
|
| 59 |
-
drawEnglish(dc, w / 2, ty + L.height / 2 + S * 0.05, w * 0.8)
|
| 60 |
-
// 调色:青橙 / 金色 / 冷
|
| 61 |
-
post.contrast = 1.12
|
| 62 |
-
post.saturation = 0.92
|
| 63 |
-
post.lift = tone === 'cold' ? [0.0, 0.03, 0.07] : [0.02, 0.035, 0.06]
|
| 64 |
-
post.gain = tone === 'cold' ? [0.92, 1.0, 1.08] : tone === 'gold' ? [1.12, 1.02, 0.82] : [1.08, 1.0, 0.88]
|
| 65 |
-
post.bloom = 0.22
|
| 66 |
-
post.halation = 0.22
|
| 67 |
-
post.grain = 0.075
|
| 68 |
-
post.vignette = 0.55
|
| 69 |
-
post.flash = pk * 0.32
|
| 70 |
-
post.aberration = 0.0015 + pk * 0.012
|
| 71 |
-
post.zoom = 1 + pk * 0.02
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
// ───────────────────────────── MONUMENT 纪念碑 ─────────────────────────────
|
| 75 |
-
function MONUMENT(dc: DC) {
|
| 76 |
-
const { g, w, h, P, S, t, f, post } = dc
|
| 77 |
-
const punch = punchAt(f)
|
| 78 |
-
const pk = impulse(t, punch, 0.35)
|
| 79 |
-
drawVideo(g, dc.video, full(dc), { zoom: pushZoom(dc, 1.08, 0.025), shot: dc.shot ?? undefined })
|
| 80 |
-
desaturate(g, full(dc))
|
| 81 |
-
g.fillStyle = `rgba(0,0,0,${isDark(dc) ? 0.25 : 0.5})`
|
| 82 |
-
g.fillRect(0, 0, w, h)
|
| 83 |
-
// 巨型主符号
|
| 84 |
-
const big = f.q.big || f.q.keys[0]?.[0] || '彪'
|
| 85 |
-
const bigA = 0.13 + smooth((t - punch) / 0.5) * 0.25
|
| 86 |
-
g.save()
|
| 87 |
-
g.globalAlpha = bigA * smooth((t - f.vs + 0.4) / 1.2)
|
| 88 |
-
const bs = (P ? w * 0.9 : h * 1.05) / Math.max(1, [...big].length * 0.62)
|
| 89 |
-
g.font = `900 ${bs}px ${[...big].some((c) => /\d/.test(c)) ? FONT.display : FONT.serif}`
|
| 90 |
-
g.textAlign = 'center'
|
| 91 |
-
g.textBaseline = 'middle'
|
| 92 |
-
g.lineWidth = 2.5 * dc.u
|
| 93 |
-
g.strokeStyle = t > punch ? BANANA : 'rgba(255,255,255,0.9)'
|
| 94 |
-
const drift = Math.sin(t * 0.2) * S * 0.02
|
| 95 |
-
g.strokeText(big, w * (P ? 0.5 : 0.62) + drift, h * (P ? 0.32 : 0.5))
|
| 96 |
-
g.restore()
|
| 97 |
-
// 巨字砸入
|
| 98 |
-
const page = f.pageAt(t)
|
| 99 |
-
const lines = linesOf(page, P ? 5 : 9)
|
| 100 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 900, maxW: w * 0.88, maxSize: S * (P ? 0.17 : 0.15), tracking: 0.04, lineH: 1.2, x: w / 2, y: h * (P ? 0.56 : 0.5) })
|
| 101 |
-
g.save()
|
| 102 |
-
g.globalAlpha = pageAlpha(f, page, t, 0.05, 0.12)
|
| 103 |
-
drawPlaced(dc, L.placed, 'slam', { family: FONT.serif, weight: 900, fill: '#fff', keyFill: BANANA, dur: 0.32, lead: 0.1, shadow: 'rgba(0,0,0,0.6)', shadowBlur: 30 * dc.u })
|
| 104 |
-
g.restore()
|
| 105 |
-
drawEnglish(dc, w / 2, h * (P ? 0.56 : 0.5) + L.height / 2 + S * 0.07, w * 0.8, 'rgba(255,255,255,0.75)')
|
| 106 |
-
// 每个字落地的震动
|
| 107 |
-
let shake = 0
|
| 108 |
-
for (const c of page.chars) shake += impulse(t, c.t0 + 0.12, 0.09)
|
| 109 |
-
shake = Math.min(1.4, shake) + pk * 1.5
|
| 110 |
-
post.shift = [fbm1(t * 40) * shake * 0.006, fbm1(t * 40 + 9) * shake * 0.006]
|
| 111 |
-
post.mono = 0
|
| 112 |
-
post.contrast = 1.28
|
| 113 |
-
post.saturation = 1
|
| 114 |
-
post.gain = [1.04, 1.0, 0.96]
|
| 115 |
-
post.grain = 0.11
|
| 116 |
-
post.vignette = 0.68
|
| 117 |
-
post.bloom = 0.1
|
| 118 |
-
post.halation = 0.05
|
| 119 |
-
post.flash = pk * 0.45
|
| 120 |
-
post.radial = pk * 0.08
|
| 121 |
-
// 换页时的黑场节拍
|
| 122 |
-
for (const p of f.pages) if (p.index > 0) post.fade = Math.max(post.fade, impulse(t, p.t0, 0.06) * 0.7 * (t < p.t0 + 0.2 ? 1 : 0))
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
// ───────────────────────────── SCROLL 竖排水墨 ─────────────────────────────
|
| 126 |
-
function SCROLL(dc: DC) {
|
| 127 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 128 |
-
g.drawImage(paper(w, h), 0, 0)
|
| 129 |
-
g.save()
|
| 130 |
-
g.globalAlpha = 0.55
|
| 131 |
-
const m = inkMountains(w, h, f.id % 3)
|
| 132 |
-
g.drawImage(m, -((t * 4 * u) % 1) - t * 3 * u, P ? -h * 0.12 : 0, w * 1.08, h)
|
| 133 |
-
g.restore()
|
| 134 |
-
// 圆窗
|
| 135 |
-
const wcx = P ? w * 0.5 : w * 0.3, wcy = P ? h * 0.27 : h * 0.5
|
| 136 |
-
const R = (P ? w * 0.36 : h * 0.34) * ease.outCubic((t - 0.8) / 1.4)
|
| 137 |
-
if (R > 1) {
|
| 138 |
-
g.save()
|
| 139 |
-
g.beginPath()
|
| 140 |
-
g.arc(wcx, wcy, R, 0, Math.PI * 2)
|
| 141 |
-
g.clip()
|
| 142 |
-
drawVideo(g, dc.video, { x: wcx - R, y: wcy - R, w: R * 2, h: R * 2 }, { zoom: pushZoom(dc, 1.12, 0.02), shot: dc.shot ?? undefined })
|
| 143 |
-
desaturate(g, { x: wcx - R, y: wcy - R, w: R * 2, h: R * 2 })
|
| 144 |
-
tint(g, { x: wcx - R, y: wcy - R, w: R * 2, h: R * 2 }, '#e6d8b8', 'multiply', 0.75)
|
| 145 |
-
tint(g, { x: wcx - R, y: wcy - R, w: R * 2, h: R * 2 }, '#2a2117', 'screen', 0.18)
|
| 146 |
-
g.restore()
|
| 147 |
-
g.save()
|
| 148 |
-
g.strokeStyle = 'rgba(26,23,18,0.85)'
|
| 149 |
-
g.lineWidth = 3 * u
|
| 150 |
-
g.beginPath(); g.arc(wcx, wcy, R, 0, Math.PI * 2); g.stroke()
|
| 151 |
-
g.strokeStyle = 'rgba(26,23,18,0.3)'
|
| 152 |
-
g.lineWidth = 1.2 * u
|
| 153 |
-
g.beginPath(); g.arc(wcx + 2 * u, wcy - 1 * u, R + 8 * u, 0, Math.PI * 2); g.stroke()
|
| 154 |
-
g.restore()
|
| 155 |
-
}
|
| 156 |
-
// 竖排诗句(全部分句累积)
|
| 157 |
-
const page = f.pageAt(t)
|
| 158 |
-
const cols = page.clauses.map((c) => c.chars)
|
| 159 |
-
const area = P ? { right: w * 0.9, top: h * 0.56, maxH: h * 0.36, cy: h * 0.75, maxW: w * 0.8 } : { right: w * 0.88, top: h * 0.14, maxH: h * 0.72, cy: h * 0.5, maxW: w * 0.42 }
|
| 160 |
-
let V = layoutVertical(cols, { rightX: area.right, topY: area.top, maxH: area.maxH, maxSize: S * (P ? 0.085 : 0.1), centerY: area.cy, colGap: 0.75 })
|
| 161 |
-
if (V.width > area.maxW) V = layoutVertical(cols, { rightX: area.right, topY: area.top, maxH: area.maxH, maxSize: V.size * (area.maxW / V.width), centerY: area.cy, colGap: 0.75 })
|
| 162 |
-
g.save()
|
| 163 |
-
g.globalAlpha = pageAlpha(f, page, t, 0.3, 0.45)
|
| 164 |
-
for (const p of V.placed) {
|
| 165 |
-
const k = clamp((t - p.c.t0 + 0.05) / 0.9)
|
| 166 |
-
if (k > 0 && k < 1) inkBloom(g, p.x + p.size / 2, p.y, p.size * 0.9, k, p.c.i + f.id * 100, '40,32,22')
|
| 167 |
-
drawChar(g, p, t, 'ink', { family: FONT.brush, weight: 400, fill: '#17140f', keyFill: '#a3231a', dur: 0.7 })
|
| 168 |
-
}
|
| 169 |
-
g.restore()
|
| 170 |
-
// 编号(竖排小字)
|
| 171 |
-
txt(g, `语录 其${numCN(f.id)}`, P ? w * 0.08 : w * 0.06, P ? h * 0.06 : h * 0.1, `500 ${S * 0.026}px ${FONT.serif}`, '#7a1c14', 'left', 0.3, smooth((t - 1) / 1))
|
| 172 |
-
// 英文 & 印章
|
| 173 |
-
const last = V.placed[V.placed.length - 1]
|
| 174 |
-
if (last) {
|
| 175 |
-
const sk = (t - (f.ve + 0.25)) / 0.5
|
| 176 |
-
seal(g, last.x - V.size * 0.6 - S * 0.04, Math.min(P ? h * 0.875 : h - S * 0.08, last.y + V.size * 1.5), S * 0.075, '德彪', sk, FONT.brush)
|
| 177 |
-
}
|
| 178 |
-
drawEnglish(dc, P ? w / 2 : wcx, P ? h * 0.955 : wcy + h * 0.41, P ? w * 0.86 : h * 0.7, 'rgba(40,32,22,0.85)', 'center', S * 0.026)
|
| 179 |
-
post.contrast = 1.02
|
| 180 |
-
post.saturation = 0.9
|
| 181 |
-
post.gain = [1.02, 1.0, 0.95]
|
| 182 |
-
post.lift = [0.02, 0.015, 0.0]
|
| 183 |
-
post.grain = 0.05
|
| 184 |
-
post.vignette = 0.3
|
| 185 |
-
post.bloom = 0
|
| 186 |
-
post.halation = 0
|
| 187 |
-
post.aberration = 0.0005
|
| 188 |
-
post.flicker = 0
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
// ───────────────────────────── DIPTYCH 对仗分屏 ─────────────────────────────
|
| 192 |
-
function DIPTYCH(dc: DC) {
|
| 193 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 194 |
-
const split = f.q.split ?? Math.ceil(f.clauses.length / 2)
|
| 195 |
-
const A = f.clauses.filter((c) => c.index < split)
|
| 196 |
-
const B = f.clauses.filter((c) => c.index >= split)
|
| 197 |
-
const bStart = B[0]?.t0 ?? f.ve
|
| 198 |
-
// 分屏位置:谁在说话谁更大
|
| 199 |
-
const side = smooth((t - bStart + 0.3) / 0.6) // 0 = A 主导, 1 = B 主导
|
| 200 |
-
const hold = smooth((t - f.ve - 0.1) / 0.8)
|
| 201 |
-
const open = ease.inOutExpo((t - f.vs + 0.9) / 0.9)
|
| 202 |
-
let s = lerp(lerp(0.6, 0.4, side), 0.5, hold)
|
| 203 |
-
s = lerp(P ? 0.5 : 0.5, s, open)
|
| 204 |
-
const ra: Rect = P ? { x: 0, y: 0, w, h: h * s } : { x: 0, y: 0, w: w * s, h }
|
| 205 |
-
const rb: Rect = P ? { x: 0, y: h * s, w, h: h * (1 - s) } : { x: w * s, y: 0, w: w * (1 - s), h }
|
| 206 |
-
const z = pushZoom(dc, 1.1, 0.02)
|
| 207 |
-
drawVideo(g, dc.video, ra, { zoom: z, shot: dc.shot ?? undefined, panX: -0.04 })
|
| 208 |
-
tint(g, ra, '#f0a63a', 'soft-light', 0.65)
|
| 209 |
-
tint(g, ra, '#3a2408', 'multiply', isDark(dc) ? 0.05 : 0.25)
|
| 210 |
-
drawVideo(g, dc.video, rb, { zoom: z * 1.05, shot: dc.shot ?? undefined, mirror: true, panX: 0.04 })
|
| 211 |
-
desaturate(g, rb, 0.6)
|
| 212 |
-
tint(g, rb, '#3b78c9', 'soft-light', 0.7)
|
| 213 |
-
tint(g, rb, '#0b1a2e', 'multiply', isDark(dc) ? 0.05 : 0.3)
|
| 214 |
-
if (isDark(dc)) { tint(g, ra, '#ffffff', 'screen', 0.1); tint(g, rb, '#9fc6ff', 'screen', 0.12) }
|
| 215 |
-
// 非发言半屏压暗
|
| 216 |
-
g.fillStyle = `rgba(0,0,0,${0.45 * side * (1 - hold)})`
|
| 217 |
-
g.fillRect(ra.x, ra.y, ra.w, ra.h)
|
| 218 |
-
g.fillStyle = `rgba(0,0,0,${0.45 * (1 - side) * (1 - hold) * open})`
|
| 219 |
-
g.fillRect(rb.x, rb.y, rb.w, rb.h)
|
| 220 |
-
// 中线
|
| 221 |
-
g.save()
|
| 222 |
-
g.strokeStyle = 'rgba(255,255,255,0.9)'
|
| 223 |
-
g.lineWidth = 2 * u
|
| 224 |
-
g.beginPath()
|
| 225 |
-
const lk = ease.inOutCubic((t - f.vs + 1.0) / 0.8)
|
| 226 |
-
if (P) { g.moveTo(w / 2 - (w / 2) * lk, h * s); g.lineTo(w / 2 + (w / 2) * lk, h * s) } else { g.moveTo(w * s, h / 2 - (h / 2) * lk); g.lineTo(w * s, h / 2 + (h / 2) * lk) }
|
| 227 |
-
g.stroke()
|
| 228 |
-
g.restore()
|
| 229 |
-
// 关键词巨字
|
| 230 |
-
const keyOf = (cl: typeof A) => f.q.keys.find((k) => cl.some((c) => c.text.includes(k))) || ''
|
| 231 |
-
const half = (cl: typeof A, r: Rect, label: string, accent: string, active: number) => {
|
| 232 |
-
const ka = keyOf(cl)
|
| 233 |
-
if (ka) {
|
| 234 |
-
g.save()
|
| 235 |
-
g.globalAlpha = 0.16 * smooth((t - (cl[0]?.t0 ?? 0)) / 0.8)
|
| 236 |
-
g.font = `900 ${Math.min(r.w / Math.max(2, ka.length) * 0.95, r.h * 0.7)}px ${FONT.serif}`
|
| 237 |
-
g.textAlign = 'center'
|
| 238 |
-
g.textBaseline = 'middle'
|
| 239 |
-
g.strokeStyle = accent
|
| 240 |
-
g.lineWidth = 2 * u
|
| 241 |
-
g.strokeText(ka, r.x + r.w / 2, r.y + r.h * 0.42)
|
| 242 |
-
g.restore()
|
| 243 |
-
}
|
| 244 |
-
const lines = cl.flatMap((c) => breakClause(c.chars, P ? 9 : 7))
|
| 245 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 700, maxW: r.w * 0.82, maxSize: S * (P ? 0.07 : 0.075), tracking: 0.1, lineH: 1.4, x: r.x + r.w / 2, y: r.y + r.h * 0.55 })
|
| 246 |
-
g.save()
|
| 247 |
-
g.globalAlpha = lerp(0.55, 1, active)
|
| 248 |
-
drawPlaced(dc, L.placed, 'rise', { family: FONT.serif, weight: 700, fill: '#fff', keyFill: accent, dur: 0.5, shadow: 'rgba(0,0,0,0.5)', shadowBlur: 18 * u })
|
| 249 |
-
g.restore()
|
| 250 |
-
txt(g, label, r.x + (P ? S * 0.05 : r.w / 2), r.y + (P ? S * 0.06 : S * 0.08), `500 ${S * 0.02}px ${FONT.latin}`, 'rgba(255,255,255,0.75)', P ? 'left' : 'center', 0.5, open)
|
| 251 |
-
}
|
| 252 |
-
half(A, ra, 'I', BANANA, Math.max(1 - side, hold))
|
| 253 |
-
half(B, rb, 'II', '#9fd4ff', Math.max(side, hold))
|
| 254 |
-
drawEnglish(dc, w / 2, P ? h * 0.93 : h * 0.9, w * 0.8)
|
| 255 |
-
post.contrast = 1.1
|
| 256 |
-
post.saturation = 1.05
|
| 257 |
-
post.grain = 0.07
|
| 258 |
-
post.vignette = 0.45
|
| 259 |
-
post.bloom = 0.15
|
| 260 |
-
post.halation = 0.12
|
| 261 |
-
post.blurDir = [P ? 0 : impulse(t, bStart - 0.2, 0.08) * 0.03, P ? impulse(t, bStart - 0.2, 0.08) * 0.03 : 0]
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
// ───────────────────────────── VELOCITY 追逐速度 ─────────────────────────────
|
| 265 |
-
function VELOCITY(dc: DC) {
|
| 266 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 267 |
-
const punch = punchAt(f)
|
| 268 |
-
const pk = impulse(t, punch, 0.3)
|
| 269 |
-
const sh = 0.004 + pk * 0.01
|
| 270 |
-
g.save()
|
| 271 |
-
g.translate(w / 2, h / 2)
|
| 272 |
-
g.rotate(Math.sin(t * 0.6) * 0.03 + fbm1(t * 2) * 0.01)
|
| 273 |
-
g.translate(-w / 2, -h / 2)
|
| 274 |
-
drawVideo(g, dc.video, { x: -w * 0.04, y: -h * 0.04, w: w * 1.08, h: h * 1.08 }, { zoom: 1.12 + pk * 0.1, shot: dc.shot ?? undefined, panX: fbm1(t * 3) * 0.01, panY: fbm1(t * 3 + 4) * 0.01 })
|
| 275 |
-
g.restore()
|
| 276 |
-
g.fillStyle = 'rgba(10,8,6,0.25)'
|
| 277 |
-
g.fillRect(0, 0, w, h)
|
| 278 |
-
speedLines(g, w, h, t, { cx: 0.5, cy: 0.5, n: 110, seed: f.seed, alpha: 0.32 + pk * 0.4, inner: 0.3 })
|
| 279 |
-
// 速度表
|
| 280 |
-
const kmh = Math.round(38 + (t / f.T) * 30 + fbm1(t * 2) * 6 + pk * 20)
|
| 281 |
-
txt(g, `${kmh}`, S * 0.06, h - S * 0.12, `${S * 0.09}px ${FONT.display}`, BANANA, 'left', 0.02, smooth((t - f.vs) / 0.5))
|
| 282 |
-
txt(g, 'KM/H · NO BRAKE', S * 0.06, h - S * 0.06, `${S * 0.02}px ${FONT.mono}`, 'rgba(255,255,255,0.8)', 'left', 0.1, smooth((t - f.vs) / 0.5))
|
| 283 |
-
// 斜体飞字
|
| 284 |
-
const page = f.pageAt(t)
|
| 285 |
-
const lines = linesOf(page, P ? 6 : 10)
|
| 286 |
-
const L = layoutLines(g, lines, { family: FONT.sans, weight: 900, maxW: w * (P ? 0.84 : 0.8), maxSize: S * (P ? 0.13 : 0.12), tracking: 0.02, lineH: 1.18, align: P ? 'center' : 'left', x: P ? w / 2 : w * 0.08, y: h * (P ? 0.5 : 0.52) })
|
| 287 |
-
g.save()
|
| 288 |
-
g.globalAlpha = pageAlpha(f, page, t, 0.08, 0.12)
|
| 289 |
-
g.translate(w / 2, h / 2)
|
| 290 |
-
g.transform(1, 0, -0.16, 1, 0, 0)
|
| 291 |
-
g.translate(-w / 2, -h / 2)
|
| 292 |
-
drawPlaced(dc, L.placed, 'fly', { family: FONT.sans, weight: 900, fill: '#fff', keyFill: BANANA, dur: 0.38, shadow: 'rgba(0,0,0,0.55)', shadowBlur: 20 * u })
|
| 293 |
-
g.restore()
|
| 294 |
-
drawEnglish(dc, P ? w / 2 : w * 0.08, h * (P ? 0.5 : 0.52) + L.height / 2 + S * 0.06, w * 0.8, 'rgba(255,255,255,0.8)', P ? 'center' : 'left')
|
| 295 |
-
// 换页甩镜
|
| 296 |
-
let whip = 0
|
| 297 |
-
for (const p of f.pages) whip += impulse(t, p.t0 - 0.02, 0.07) * (t > p.t0 - 0.12 ? 1 : 0)
|
| 298 |
-
post.blurDir = [0.008 + whip * 0.06 + pk * 0.02, 0]
|
| 299 |
-
post.radial = pk * 0.06
|
| 300 |
-
post.shift = [fbm1(t * 25) * sh, fbm1(t * 25 + 3) * sh]
|
| 301 |
-
post.contrast = 1.2
|
| 302 |
-
post.saturation = 1.1
|
| 303 |
-
post.gain = [1.08, 1.0, 0.9]
|
| 304 |
-
post.aberration = 0.003 + pk * 0.01 + whip * 0.01
|
| 305 |
-
post.vignette = 0.65
|
| 306 |
-
post.grain = 0.07
|
| 307 |
-
post.bloom = 0.18
|
| 308 |
-
post.flash = pk * 0.25
|
| 309 |
-
}
|
| 310 |
-
|
| 311 |
-
// ───────────────────────────── DOCUMENT 纪录片取景 ─────────────────────────────
|
| 312 |
-
function DOCUMENT(dc: DC) {
|
| 313 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 314 |
-
const punch = punchAt(f)
|
| 315 |
-
const hx = fbm1(t * 0.8) * 0.012, hy = fbm1(t * 0.8 + 5) * 0.012
|
| 316 |
-
drawVideo(g, dc.video, full(dc), { zoom: pushZoom(dc, 1.08, 0.01), shot: dc.shot ?? undefined, panX: hx, panY: hy })
|
| 317 |
-
const va = smooth((t - f.vs + 0.3) / 0.6) * (1 - 0.85 * smooth((t - f.ve - 0.05) / 0.5))
|
| 318 |
-
viewfinder(g, w, h, t, u, { tc: timecode(t + f.id * 61), alpha: va, info: t > f.ve ? "" : `ISO 800 1/50 F2.8 · SCENE ${pad2(f.id)}` })
|
| 319 |
-
// 主体追踪框 + 数据标注
|
| 320 |
-
const labels = f.q.labels ?? []
|
| 321 |
-
const bw = w * (P ? 0.55 : 0.26), bh = h * (P ? 0.3 : 0.46)
|
| 322 |
-
const bx = w * 0.5 - bw / 2 + fbm1(t * 1.3) * w * 0.01, by = h * (P ? 0.3 : 0.42) - bh / 2 + fbm1(t * 1.3 + 2) * h * 0.01
|
| 323 |
-
const boxK = smooth((t - f.vs - 0.2) / 0.4) * (1 - smooth((t - f.ve - 0.4) / 0.5))
|
| 324 |
-
if (boxK > 0) {
|
| 325 |
-
g.save()
|
| 326 |
-
g.globalAlpha = boxK
|
| 327 |
-
g.strokeStyle = BANANA
|
| 328 |
-
g.lineWidth = 1.5 * u
|
| 329 |
-
g.setLineDash([10 * u, 7 * u])
|
| 330 |
-
g.lineDashOffset = -t * 30
|
| 331 |
-
g.strokeRect(bx, by, bw, bh)
|
| 332 |
-
g.setLineDash([])
|
| 333 |
-
txt(g, 'SUBJECT · ODEBIAO', bx, by - 14 * u, `${S * 0.017}px ${FONT.mono}`, BANANA, 'left', 0.05)
|
| 334 |
-
g.restore()
|
| 335 |
-
}
|
| 336 |
-
const span = Math.max(0.6, f.voiceDur / Math.max(1, labels.length))
|
| 337 |
-
labels.forEach((lab, i) => {
|
| 338 |
-
const t0 = f.vs + 0.3 + i * span * 0.8
|
| 339 |
-
const n = Math.floor(clamp((t - t0) / 0.6) * lab.length)
|
| 340 |
-
if (n <= 0) return
|
| 341 |
-
const lx = P ? w * 0.08 : (i % 2 ? bx + bw + w * 0.04 : bx - w * 0.04)
|
| 342 |
-
const ly = P ? h * 0.08 + S * 0.09 + i * S * 0.055 : by + bh * (0.2 + i * 0.3)
|
| 343 |
-
g.save()
|
| 344 |
-
g.globalAlpha = 1 - smooth((t - f.holdEnd + 0.4) / 0.4)
|
| 345 |
-
g.strokeStyle = 'rgba(255,255,255,0.8)'
|
| 346 |
-
g.lineWidth = 1 * u
|
| 347 |
-
if (!P) {
|
| 348 |
-
g.beginPath()
|
| 349 |
-
g.moveTo(i % 2 ? bx + bw : bx, ly)
|
| 350 |
-
g.lineTo(lx, ly)
|
| 351 |
-
g.stroke()
|
| 352 |
-
}
|
| 353 |
-
g.fillStyle = 'rgba(0,0,0,0.55)'
|
| 354 |
-
g.font = `${S * 0.022}px ${FONT.mono}`
|
| 355 |
-
const s = lab.slice(0, n)
|
| 356 |
-
const tw = g.measureText(lab).width
|
| 357 |
-
const rx = P ? lx : i % 2 ? lx : lx - tw - 16 * u
|
| 358 |
-
g.fillRect(rx - 8 * u, ly - S * 0.02, tw + 16 * u, S * 0.04)
|
| 359 |
-
g.restore()
|
| 360 |
-
txt(g, s + (n < lab.length ? '▌' : ''), rx, ly, `${S * 0.022}px ${FONT.mono}`, '#fff', 'left', 0)
|
| 361 |
-
})
|
| 362 |
-
// 大数据
|
| 363 |
-
if (f.q.big) {
|
| 364 |
-
const k = ease.outExpo((t - punch) / 0.6)
|
| 365 |
-
if (k > 0) {
|
| 366 |
-
const x = P ? w * 0.92 : w * 0.92, y = P ? h * 0.2 : h * 0.3
|
| 367 |
-
txt(g, f.q.big, x, y, `${S * (P ? 0.16 : 0.2)}px ${FONT.display}`, BANANA, 'right', 0.02, k * (1 - smooth((t - f.holdEnd) / 0.4)))
|
| 368 |
-
txt(g, 'FIELD DATA', x, y + S * (P ? 0.1 : 0.12), `${S * 0.02}px ${FONT.mono}`, 'rgba(255,255,255,0.8)', 'right', 0.2, k)
|
| 369 |
-
}
|
| 370 |
-
}
|
| 371 |
-
// 下三分之一字幕(打字机)
|
| 372 |
-
const page = f.pageAt(t)
|
| 373 |
-
const lines = linesOf(page, P ? 9 : 16)
|
| 374 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 700, maxW: w * 0.84, maxSize: S * (P ? 0.062 : 0.056), tracking: 0.06, lineH: 1.55, align: 'left', x: w * 0.08, y: h * (P ? 0.7 : 0.76) })
|
| 375 |
-
const pa = pageAlpha(f, page, t, 0.1, 0.2)
|
| 376 |
-
g.save()
|
| 377 |
-
g.globalAlpha = pa
|
| 378 |
-
// 黑底条
|
| 379 |
-
const byLine = new Map<number, Placed[]>()
|
| 380 |
-
L.placed.forEach((p) => { const a = byLine.get(p.line) || []; a.push(p); byLine.set(p.line, a) })
|
| 381 |
-
byLine.forEach((ps) => {
|
| 382 |
-
const shown = ps.filter((p) => t >= p.c.t0 - 0.04)
|
| 383 |
-
if (!shown.length) return
|
| 384 |
-
const x0 = ps[0].x - L.size * 0.3, x1 = shown[shown.length - 1].x + shown[shown.length - 1].w + L.size * 0.3
|
| 385 |
-
g.fillStyle = 'rgba(8,8,8,0.72)'
|
| 386 |
-
g.fillRect(x0, ps[0].y - L.size * 0.68, x1 - x0, L.size * 1.36)
|
| 387 |
-
shown.filter((p) => p.c.key).forEach((p) => { g.fillStyle = BANANA; g.fillRect(p.x - L.size * 0.05, p.y - L.size * 0.6, p.w + L.size * 0.16, L.size * 1.2) })
|
| 388 |
-
})
|
| 389 |
-
for (const p of L.placed) drawChar(g, p, t, 'type', { family: FONT.serif, weight: 700, fill: '#f4f1ea', keyFill: '#111', lead: 0.04 })
|
| 390 |
-
// 光标
|
| 391 |
-
const shownAll = L.placed.filter((p) => t >= p.c.t0 - 0.04)
|
| 392 |
-
const lp = shownAll[shownAll.length - 1]
|
| 393 |
-
if (lp && Math.floor(t * 2.4) % 2 === 0) { g.fillStyle = BANANA; g.fillRect(lp.x + lp.w + L.size * 0.12, lp.y - L.size * 0.45, L.size * 0.08, L.size * 0.9) }
|
| 394 |
-
g.restore()
|
| 395 |
-
drawEnglish(dc, w * 0.08, h * (P ? 0.7 : 0.76) + L.height / 2 + S * 0.05, w * 0.84, 'rgba(255,255,255,0.85)', 'left')
|
| 396 |
-
post.saturation = 0.82
|
| 397 |
-
post.gain = [0.98, 1.03, 0.97]
|
| 398 |
-
post.lift = [0.02, 0.03, 0.02]
|
| 399 |
-
post.contrast = 1.08
|
| 400 |
-
post.scan = 0.1
|
| 401 |
-
post.grain = 0.1
|
| 402 |
-
post.aberration = 0.0025
|
| 403 |
-
post.vignette = 0.38
|
| 404 |
-
post.bloom = 0.08
|
| 405 |
-
post.halation = 0.04
|
| 406 |
-
post.flicker = 0.03
|
| 407 |
-
}
|
| 408 |
-
|
| 409 |
-
// ───────────────────────────── NOIR 夜雨黑色电影 ─────────────────────────────
|
| 410 |
-
function NOIR(dc: DC) {
|
| 411 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 412 |
-
const punch = punchAt(f)
|
| 413 |
-
drawVideo(g, dc.video, full(dc), { zoom: pushZoom(dc, 1.08, 0.018), shot: dc.shot ?? undefined })
|
| 414 |
-
desaturate(g, full(dc), 0.75)
|
| 415 |
-
tint(g, full(dc), '#0d1a30', 'multiply', isDark(dc) ? 0.2 : 0.55)
|
| 416 |
-
if (isDark(dc)) tint(g, full(dc), '#5a6f8f', 'screen', 0.18)
|
| 417 |
-
bokeh(g, w, h, t, { n: 16, seed: f.seed, colors: ['#ffb36b', '#ff7a59', '#8ec5ff', '#ffd9a0'], alpha: 0.22, size: S * 0.07 })
|
| 418 |
-
rain(g, w, h, t, { n: 170, seed: f.seed + 1, alpha: 0.32 })
|
| 419 |
-
const page = f.pageAt(t)
|
| 420 |
-
const lines = linesOf(page, P ? 7 : 14)
|
| 421 |
-
const L = layoutLines(g, lines, { family: FONT.serif, weight: 300, maxW: w * 0.82, maxSize: S * (P ? 0.07 : 0.06), tracking: 0.32, lineH: 1.7, x: w / 2, y: h * 0.5 })
|
| 422 |
-
const focus = page.last ? 1 - ease.outCubic((t - page.t0) / 1.0) : 0
|
| 423 |
-
g.save()
|
| 424 |
-
g.globalAlpha = pageAlpha(f, page, t, 0.6, 0.5)
|
| 425 |
-
if (focus > 0.02 && 'filter' in g) g.filter = `blur(${(focus * 10 * u).toFixed(1)}px)`
|
| 426 |
-
drawPlaced(dc, L.placed, 'blur', { family: FONT.serif, weight: 300, fill: '#eef2f7', keyFill: BANANA_SOFT, dur: 0.9, lead: 0.1, shadow: 'rgba(0,0,0,0.7)', shadowBlur: 22 * u })
|
| 427 |
-
g.restore()
|
| 428 |
-
hline(g, w / 2 - S * 0.05, w / 2 + S * 0.05, h * 0.5 - L.height / 2 - S * 0.06, 'rgba(255,255,255,0.5)', 1 * u, smooth((t - f.vs) / 1))
|
| 429 |
-
drawEnglish(dc, w / 2, h * 0.5 + L.height / 2 + S * 0.07, w * 0.8, 'rgba(225,232,240,0.8)')
|
| 430 |
-
const pk = impulse(t, punch, 0.5)
|
| 431 |
-
post.exposure = 0.92
|
| 432 |
-
post.contrast = 1.18
|
| 433 |
-
post.saturation = 0.7
|
| 434 |
-
post.gain = [0.86, 0.96, 1.1]
|
| 435 |
-
post.lift = [0.0, 0.02, 0.05]
|
| 436 |
-
post.grain = 0.09
|
| 437 |
-
post.vignette = 0.7
|
| 438 |
-
post.bloom = 0.3
|
| 439 |
-
post.halation = 0.1
|
| 440 |
-
post.flash = pk * 0.22
|
| 441 |
-
post.flicker = 0.035
|
| 442 |
-
}
|
| 443 |
-
|
| 444 |
-
// ───────────────────────────── EPIC 金色史诗 ─────────────────────────────
|
| 445 |
-
function EPIC(dc: DC) {
|
| 446 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 447 |
-
const punch = punchAt(f)
|
| 448 |
-
const pk = impulse(t, punch, 0.4)
|
| 449 |
-
drawVideo(g, dc.video, full(dc), { zoom: 1.02 + (t / f.T) * 0.22 + pk * 0.04, shot: dc.shot ?? undefined, panY: -0.02 + (t / f.T) * 0.03 })
|
| 450 |
-
tint(g, full(dc), '#3a2405', 'multiply', 0.35)
|
| 451 |
-
godRays(g, w, h, t, { x: 0.5, y: -0.08, color: '#ffcf70', alpha: 0.12, n: 10, seed: f.seed })
|
| 452 |
-
particles(g, w, h, t, { n: 70, seed: f.seed, color: '#ffb347', size: 2.6 * u, rise: 0.05, twinkle: true, alpha: 0.75 })
|
| 453 |
-
const poem = [11, 12, 19].includes(f.id)
|
| 454 |
-
const fam = poem ? FONT.brush : FONT.serif
|
| 455 |
-
const wt = poem ? 400 : 900
|
| 456 |
-
const page = f.pageAt(t)
|
| 457 |
-
const lines = linesOf(page, P ? 7 : 9)
|
| 458 |
-
const L = layoutLines(g, lines, { family: fam, weight: wt, maxW: w * 0.84, maxSize: S * (P ? 0.11 : 0.105), tracking: 0.08, lineH: 1.3, x: w / 2, y: h * 0.5 })
|
| 459 |
-
const gold = goldGradient(g, w * 0.2, h * 0.5 - L.height / 2, w * 0.8, h * 0.5 + L.height / 2, t)
|
| 460 |
-
g.save()
|
| 461 |
-
g.globalAlpha = pageAlpha(f, page, t, 0.2, 0.35)
|
| 462 |
-
drawPlaced(dc, L.placed, 'gold', { family: fam, weight: wt, fill: gold, keyFill: '#fff6d6', dur: 0.65, shadow: 'rgba(255,170,60,0.55)', shadowBlur: 34 * u })
|
| 463 |
-
g.restore()
|
| 464 |
-
shockRing(g, w / 2, h / 2, (t - punch) / 1.1, S * 0.7, '#ffd27a', 6 * u)
|
| 465 |
-
drawEnglish(dc, w / 2, h * 0.5 + L.height / 2 + S * 0.07, w * 0.8, 'rgba(255,236,200,0.85)')
|
| 466 |
-
post.gain = [1.14, 1.0, 0.76]
|
| 467 |
-
post.lift = [0.05, 0.03, 0.0]
|
| 468 |
-
post.contrast = 1.12
|
| 469 |
-
post.saturation = 1.05
|
| 470 |
-
post.bloom = 0.45
|
| 471 |
-
post.halation = 0.35
|
| 472 |
-
post.leak = Math.max(post.leak, 0.28)
|
| 473 |
-
post.leakPos = [0.85, 0.08]
|
| 474 |
-
post.leakColor = [1, 0.6, 0.25]
|
| 475 |
-
post.grain = 0.07
|
| 476 |
-
post.vignette = 0.62
|
| 477 |
-
post.flash = pk * 0.45
|
| 478 |
-
post.radial = pk * 0.07
|
| 479 |
-
}
|
| 480 |
-
|
| 481 |
-
// ───────────────────────────── SWISS 瑞士版式 ─────────────────────────────
|
| 482 |
-
function SWISS(dc: DC) {
|
| 483 |
-
const { g, w, h, P, S, t, f, post, u } = dc
|
| 484 |
-
const tone = f.q.tone
|
| 485 |
-
const bg = tone === 'red' || tone === 'green' ? '#EFEDE6' : BANANA
|
| 486 |
-
const ink = '#111111'
|
| 487 |
-
const accent = tone === 'red' ? '#E63B2E' : tone === 'green' ? '#2E7D4F' : '#111111'
|
| 488 |
-
g.fillStyle = bg
|
| 489 |
-
g.fillRect(0, 0, w, h)
|
| 490 |
-
grid(g, w, h, P ? 6 : 12, P ? 12 : 8, ink, 0.1)
|
| 491 |
-
const page = f.pageAt(t)
|
| 492 |
-
// 素材面板随页面硬切换位
|
| 493 |
-
const lay = P
|
| 494 |
-
? [{ x: 0.08, y: 0.08, w: 0.84, h: 0.34 }, { x: 0.38, y: 0.06, w: 0.54, h: 0.4 }, { x: 0, y: 0.1, w: 1, h: 0.3 }]
|
| 495 |
-
: [{ x: 0.54, y: 0.12, w: 0.4, h: 0.76 }, { x: 0.6, y: 0.08, w: 0.34, h: 0.5 }, { x: 0.5, y: 0.5, w: 0.5, h: 0.5 }]
|
| 496 |
-
const L0 = lay[page.index % lay.length]
|
| 497 |
-
const pr: Rect = { x: L0.x * w, y: L0.y * h, w: L0.w * w, h: L0.h * h }
|
| 498 |
-
const pin = ease.outExpo((t - 0.2) / 0.5)
|
| 499 |
-
if (pin > 0) {
|
| 500 |
-
const r2 = { ...pr, h: pr.h * pin }
|
| 501 |
-
drawVideo(g, dc.video, r2, { zoom: pushZoom(dc, 1.15, 0.02), shot: dc.shot ?? undefined })
|
| 502 |
-
desaturate(g, r2)
|
| 503 |
-
g.save(); g.globalCompositeOperation = 'multiply'; g.fillStyle = tone === 'red' || tone === 'green' ? '#d8d4c8' : BANANA; g.fillRect(r2.x, r2.y, r2.w, r2.h); g.restore()
|
| 504 |
-
tint(g, r2, '#000', 'source-over', 0.08)
|
| 505 |
-
txt(g, `FIG. ${pad2(f.id)}.${page.index + 1}`, pr.x, pr.y + pr.h + S * 0.025, `${S * 0.018}px ${FONT.mono}`, ink, 'left', 0.05)
|
| 506 |
-
}
|
| 507 |
-
// 页眉
|
| 508 |
-
txt(g, 'ODEBIAO QUOTES', S * 0.05, S * 0.05, `${S * 0.02}px ${FONT.mono}`, ink, 'left', 0.12)
|
| 509 |
-
txt(g, `${pad2(f.id)} / 43`, w - S * 0.05, S * 0.05, `${S * 0.02}px ${FONT.mono}`, ink, 'right', 0.12)
|
| 510 |
-
// 主符号(随配音进度逐字出现)
|
| 511 |
-
const big = f.q.big || ''
|
| 512 |
-
if (big) {
|
| 513 |
-
const chars = [...big]
|
| 514 |
-
const frac = clamp((t - f.vs) / Math.max(0.5, f.voiceDur * 0.95))
|
| 515 |
-
const n = Math.ceil(frac * chars.length)
|
| 516 |
-
const s = chars.slice(0, n).join('')
|
| 517 |
-
const isNum = /^[\d+=?/.\s]+$/.test(big)
|
| 518 |
-
const size = Math.min(S * (P ? 0.32 : 0.42), (P ? w * 0.9 : w * 0.5) / Math.max(1, chars.length * (isNum ? 0.5 : 0.95)))
|
| 519 |
-
txt(g, s, S * 0.05, P ? h * 0.86 : h * 0.8, `${isNum ? '' : '900 '}${size}px ${isNum ? FONT.display : FONT.sans}`, accent, 'left', 0, 1)
|
| 520 |
-
}
|
| 521 |
-
// 色块(关键词依次点亮)
|
| 522 |
-
if (f.q.keys.length >= 3) {
|
| 523 |
-
const cols = ['#2E7D4F', '#E8B90F', '#111']
|
| 524 |
-
f.q.keys.forEach((k, i) => {
|
| 525 |
-
const kc = f.chars.find((c) => f.text.substr(c.i, k.length) === k)
|
| 526 |
-
const on = kc ? ease.outExpo((t - kc.t0) / 0.3) : 0
|
| 527 |
-
const sz = S * 0.09
|
| 528 |
-
const x = P ? w - S * 0.05 - (3 - i) * sz * 1.15 : pr.x + i * sz * 1.15
|
| 529 |
-
const y = P ? h * 0.47 : pr.y + pr.h + S * 0.06
|
| 530 |
-
g.strokeStyle = ink; g.lineWidth = 2 * u
|
| 531 |
-
g.strokeRect(x, y, sz, sz)
|
| 532 |
-
g.fillStyle = cols[i % 3]
|
| 533 |
-
g.fillRect(x, y + sz * (1 - on), sz, sz * on)
|
| 534 |
-
})
|
| 535 |
-
}
|
| 536 |
-
// 文字:黑体硬切 + 擦除块
|
| 537 |
-
const lines = linesOf(page, P ? 7 : 8)
|
| 538 |
-
const L = layoutLines(g, lines, { family: FONT.sans, weight: 900, maxW: P ? w * 0.86 : w * 0.44, maxSize: S * (P ? 0.1 : 0.085), tracking: -0.02, lineH: 1.18, align: 'left', x: S * 0.05, y: P ? h * 0.63 : h * 0.38 })
|
| 539 |
-
if (t < page.t1 || page.last) {
|
| 540 |
-
for (const p of L.placed) {
|
| 541 |
-
const k = clamp((t - p.c.t0 + 0.08) / 0.22)
|
| 542 |
-
if (k <= 0) continue
|
| 543 |
-
if (k > 0.45) drawChar(g, p, t, 'cut', { family: FONT.sans, weight: 900, fill: ink, keyFill: tone === 'red' || tone === 'green' ? accent : '#fff', lead: 0.0 })
|
| 544 |
-
if (p.c.key && k > 0.45 && !(tone === 'red' || tone === 'green')) {
|
| 545 |
-
g.save(); g.globalCompositeOperation = 'destination-over'; g.fillStyle = ink; g.fillRect(p.x - 2, p.y - p.size * 0.58, p.w + 4 + p.size * -0.02, p.size * 1.16); g.restore()
|
| 546 |
-
}
|
| 547 |
-
// 擦除块
|
| 548 |
-
const bw = p.w * (k < 0.45 ? k / 0.45 : 1 - (k - 0.45) / 0.55)
|
| 549 |
-
if (bw > 0.5) { g.fillStyle = accent === ink ? '#111' : accent; g.fillRect(k < 0.45 ? p.x : p.x + p.w - bw, p.y - p.size * 0.55, bw, p.size * 1.1) }
|
| 550 |
-
}
|
| 551 |
-
}
|
| 552 |
-
drawEnglish(dc, S * 0.05, (P ? h * 0.63 : h * 0.38) + L.height / 2 + S * 0.05, P ? w * 0.86 : w * 0.44, ink, 'left', S * 0.026)
|
| 553 |
-
// 箭头
|
| 554 |
-
txt(g, '↘', P ? w - S * 0.1 : w * 0.47, P ? h * 0.52 : h * 0.12, `${S * 0.05}px ${FONT.sans}`, accent, 'center', 0, smooth((t - f.vs) / 0.3))
|
| 555 |
-
post.grain = 0.035
|
| 556 |
-
post.vignette = 0.12
|
| 557 |
-
post.contrast = 1.04
|
| 558 |
-
post.bloom = 0
|
| 559 |
-
post.halation = 0
|
| 560 |
-
post.aberration = 0.0006
|
| 561 |
-
post.flicker = 0
|
| 562 |
-
}
|
| 563 |
-
|
| 564 |
-
export const TREATMENTS: Record<Treatment, (dc: DC) => void> = {
|
| 565 |
-
CINEMA, MONUMENT, SCROLL, DIPTYCH, VELOCITY, DOCUMENT, NOIR, EPIC, SWISS,
|
| 566 |
-
}
|
| 567 |
-
|
| 568 |
-
export { glitchSlices }
|
| 569 |
-
export type { CharT }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/film/data/quotes.ts
CHANGED
|
@@ -1,82 +1,51 @@
|
|
| 1 |
-
// 43 条语录
|
| 2 |
-
export type Treatment =
|
| 3 |
-
| 'CINEMA' | 'MONUMENT' | 'SCROLL' | 'DIPTYCH' | 'VELOCITY'
|
| 4 |
-
| 'DOCUMENT' | 'NOIR' | 'EPIC' | 'SWISS'
|
| 5 |
-
|
| 6 |
export interface QuoteMeta {
|
| 7 |
id: number
|
| 8 |
text: string
|
| 9 |
-
treatment: Treatment
|
| 10 |
-
/** 需要点亮的关键词 */
|
| 11 |
-
keys: string[]
|
| 12 |
-
/** 视觉主符号(SWISS / MONUMENT / DOCUMENT 使用) */
|
| 13 |
-
big?: string
|
| 14 |
-
/** 纪录片数据标注 */
|
| 15 |
-
labels?: string[]
|
| 16 |
-
/** 偏好镜头(原片镜头库编号) */
|
| 17 |
-
shots?: number[]
|
| 18 |
-
/** 每个镜头的起始偏移(占镜头长度比例),不填则随机 */
|
| 19 |
-
offsets?: number[]
|
| 20 |
-
/** DIPTYCH:从第几个分句开始进入右/下半屏 */
|
| 21 |
-
split?: number
|
| 22 |
-
/** 色彩倾向 */
|
| 23 |
-
tone?: 'warm' | 'cold' | 'gold' | 'mono' | 'green' | 'red'
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
export const TREATMENT_INFO: Record<Treatment, { name: string; en: string; desc: string }> = {
|
| 27 |
-
CINEMA: { name: '宽银幕', en: 'CINEMASCOPE', desc: '遮幅 · 青橙调色 · 字幕式落字' },
|
| 28 |
-
MONUMENT: { name: '纪念碑', en: 'MONUMENT', desc: '巨字砸入 · 黑白 · 冲击' },
|
| 29 |
-
SCROLL: { name: '竖排水墨', en: 'INK SCROLL', desc: '宣纸 · 竖排 · 毛笔显影 · 印章' },
|
| 30 |
-
DIPTYCH: { name: '对仗分屏', en: 'DIPTYCH', desc: '分屏对冲 · 两种色调' },
|
| 31 |
-
VELOCITY: { name: '追逐速度', en: 'VELOCITY', desc: '速度线 · 运动模糊 · 倾斜字' },
|
| 32 |
-
DOCUMENT: { name: '纪录片取景', en: 'DOCUMENTARY', desc: '取景框 · 时间码 · 数据标注' },
|
| 33 |
-
NOIR: { name: '夜雨黑色电影', en: 'NOIR', desc: '冷调 · 雨丝 · 散景' },
|
| 34 |
-
EPIC: { name: '金色史诗', en: 'EPIC', desc: '金字 · 光束 · 粒子' },
|
| 35 |
-
SWISS: { name: '瑞士版式', en: 'SWISS STYLE', desc: '网格 · 色块 · 硬切' },
|
| 36 |
}
|
| 37 |
|
| 38 |
export const QUOTES: QuoteMeta[] = [
|
| 39 |
-
{ id: 1, text:
|
| 40 |
-
{ id: 2, text:
|
| 41 |
-
{ id: 3, text:
|
| 42 |
-
{ id: 4, text:
|
| 43 |
-
{ id: 5, text:
|
| 44 |
-
{ id: 6, text:
|
| 45 |
-
{ id: 7, text:
|
| 46 |
-
{ id: 8, text:
|
| 47 |
-
{ id: 9, text:
|
| 48 |
-
{ id: 10, text:
|
| 49 |
-
{ id: 11, text:
|
| 50 |
-
{ id: 12, text:
|
| 51 |
-
{ id: 13, text:
|
| 52 |
-
{ id: 14, text:
|
| 53 |
-
{ id: 15, text:
|
| 54 |
-
{ id: 16, text:
|
| 55 |
-
{ id: 17, text:
|
| 56 |
-
{ id: 18, text:
|
| 57 |
-
{ id: 19, text:
|
| 58 |
-
{ id: 20, text:
|
| 59 |
-
{ id: 21, text:
|
| 60 |
-
{ id: 22, text:
|
| 61 |
-
{ id: 23, text:
|
| 62 |
-
{ id: 24, text:
|
| 63 |
-
{ id: 25, text:
|
| 64 |
-
{ id: 26, text:
|
| 65 |
-
{ id: 27, text:
|
| 66 |
-
{ id: 28, text:
|
| 67 |
-
{ id: 29, text:
|
| 68 |
-
{ id: 30, text:
|
| 69 |
-
{ id: 31, text:
|
| 70 |
-
{ id: 32, text:
|
| 71 |
-
{ id: 33, text:
|
| 72 |
-
{ id: 34, text:
|
| 73 |
-
{ id: 35, text:
|
| 74 |
-
{ id: 36, text:
|
| 75 |
-
{ id: 37, text:
|
| 76 |
-
{ id: 38, text:
|
| 77 |
-
{ id: 39, text:
|
| 78 |
-
{ id: 40, text:
|
| 79 |
-
{ id: 41, text:
|
| 80 |
-
{ id: 42, text:
|
| 81 |
-
{ id: 43, text:
|
| 82 |
]
|
|
|
|
| 1 |
+
// 43 条奥德彪语录
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
export interface QuoteMeta {
|
| 3 |
id: number
|
| 4 |
text: string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
}
|
| 6 |
|
| 7 |
export const QUOTES: QuoteMeta[] = [
|
| 8 |
+
{ id: 1, text: "我拉了一把香蕉,其实香蕉拉了我一把。" },
|
| 9 |
+
{ id: 2, text: "拉上香蕉,我无法刹车;放下香蕉,我无法生活。" },
|
| 10 |
+
{ id: 3, text: "拉上香蕉的我不敢踩下刹车,因为我怕贫穷追上来。" },
|
| 11 |
+
{ id: 4, text: "不是二八大杠没有刹车片,而是我的生活没有暂停键。" },
|
| 12 |
+
{ id: 5, text: "我如果不会压弯,就会被生活压弯。" },
|
| 13 |
+
{ id: 6, text: "拉香蕉可能会少活十年,不拉香蕉一天也活不下去。" },
|
| 14 |
+
{ id: 7, text: "这个香蕉我不拉,我的下一代就要拉。" },
|
| 15 |
+
{ id: 8, text: "五百斤是自行车的极限,不是我的极限。" },
|
| 16 |
+
{ id: 9, text: "拉得动400斤的香蕉,却拉不动两斤的心。" },
|
| 17 |
+
{ id: 10, text: "初看不知蕉中意,再看已是蕉中人。" },
|
| 18 |
+
{ id: 11, text: "蕉之巅,傲世间,有我德彪便有天。" },
|
| 19 |
+
{ id: 12, text: "天不生我奥德彪,万亩香蕉烂荒郊。" },
|
| 20 |
+
{ id: 13, text: "生平不识奥德彪,哪有资格吃香蕉。" },
|
| 21 |
+
{ id: 14, text: "既生蕉,何生彪,不生彪,谁拉蕉,没有蕉,何来彪,拉了蕉,苦了彪。" },
|
| 22 |
+
{ id: 15, text: "我有两辆自行车,一辆用来拉香蕉,另外一辆也用来拉香蕉。" },
|
| 23 |
+
{ id: 16, text: "世界上本没有路,拉香蕉的人多了,也就成了路。" },
|
| 24 |
+
{ id: 17, text: "累的时候很想哭,但我不能哭,因为骑车擦眼泪不安全。" },
|
| 25 |
+
{ id: 18, text: "虚伪的男人看美女扭腰,奋斗的男人看彪子拉香蕉。" },
|
| 26 |
+
{ id: 19, text: "二八大杠跨上腰,秒变骑士穿云霄,风驰电掣云端飘,相机无法对上焦,风里雨里往前飙,只为家中黑美娇。" },
|
| 27 |
+
{ id: 20, text: "天之骄子奥德彪,二八大杠拉香蕉,下坡路上无人超,相机无法对上焦,人生无望路昭昭,不踩刹车雨里飘。" },
|
| 28 |
+
{ id: 21, text: "以为骑上自行车就能追上生活,结果生活在车上。" },
|
| 29 |
+
{ id: 22, text: "生活如此多蕉,一定不能输给奥德彪。" },
|
| 30 |
+
{ id: 23, text: "有人问我为什么不换辆车,我说换了车,谁来换我?" },
|
| 31 |
+
{ id: 24, text: "我的二八大杠一辈子没换过零件,就像我的人生一辈子没换过剧本。" },
|
| 32 |
+
{ id: 25, text: "我以为我跑得够快贫穷就追不上我,后来才发现,原来贫穷在我身上。" },
|
| 33 |
+
{ id: 26, text: "我拼命加速,但贫穷始终快我一步。" },
|
| 34 |
+
{ id: 27, text: "狮子都没有追得上我,我却没有甩掉贫穷。" },
|
| 35 |
+
{ id: 28, text: "我昨晚梦见自己很穷,醒来发现是真的。" },
|
| 36 |
+
{ id: 29, text: "贫穷的爱情就像香蕉,不是绿了就是黄了,一口没吃就黑了。" },
|
| 37 |
+
{ id: 30, text: "生活只会欺负穷人,香蕉也是,爱情更是。" },
|
| 38 |
+
{ id: 31, text: "我年轻时很穷,努力了几年,终于不再年轻了。" },
|
| 39 |
+
{ id: 32, text: "我已经不是当年的穷小子了,我是今年的穷小子。" },
|
| 40 |
+
{ id: 33, text: "有人生来就在罗马,有人生来就是牛马。" },
|
| 41 |
+
{ id: 34, text: "乾坤未定,你我皆是黑马;闹钟一响,你我皆是牛马。" },
|
| 42 |
+
{ id: 35, text: "小时候说想当小动物,长大后终于当上了牛马。" },
|
| 43 |
+
{ id: 36, text: "小时候以为自己是奥特曼,长大后才发现自己是奥德彪。" },
|
| 44 |
+
{ id: 37, text: "路途虽然遥远,但别担心,也挣不到什么钱。" },
|
| 45 |
+
{ id: 38, text: "生活压我三五年,加在一起是八年。" },
|
| 46 |
+
{ id: 39, text: "我以为我跑的够快贫穷就追不上我,后来我才发现,原来贫穷在我身上。" },
|
| 47 |
+
{ id: 40, text: "你在嘲笑奥德彪,奥德彪说没功夫理你。他有三个老婆、七个孩子要养,很忙,也很快乐。" },
|
| 48 |
+
{ id: 41, text: "人人都笑奥德彪,人人都是奥德彪,拉着属于自己的香蕉。" },
|
| 49 |
+
{ id: 42, text: "什么都是我说的,我根本就不会中文。" },
|
| 50 |
+
{ id: 43, text: "香蕉是我拉的,但那些嗨话不是我说的。" },
|
| 51 |
]
|
src/film/useThumbs.ts
CHANGED
|
@@ -21,7 +21,7 @@ export function useThumbs(enabled: boolean) {
|
|
| 21 |
if (stop) break
|
| 22 |
const prog = new Program([q.id], false)
|
| 23 |
const f = prog.segments[0].film
|
| 24 |
-
const t = Math.min(f.
|
| 25 |
const fa = prog.footageAt(t)
|
| 26 |
const v = fa ? await fx.at(fa.ft) : null
|
| 27 |
r.render(prog, t, v)
|
|
|
|
| 21 |
if (stop) break
|
| 22 |
const prog = new Program([q.id], false)
|
| 23 |
const f = prog.segments[0].film
|
| 24 |
+
const t = Math.min(f.T - 1.2, punchAt(f) + 0.9)
|
| 25 |
const fa = prog.footageAt(t)
|
| 26 |
const v = fa ? await fx.at(fa.ft) : null
|
| 27 |
r.render(prog, t, v)
|