@softure-ai/marketing-kit 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +107 -15
  3. package/dist/cli/main.js +84 -29
  4. package/dist/cli/main.js.map +1 -1
  5. package/dist/cli/og.d.ts +4 -1
  6. package/dist/cli/og.d.ts.map +1 -1
  7. package/dist/cli/og.js +15 -7
  8. package/dist/cli/og.js.map +1 -1
  9. package/dist/cli/options.d.ts +26 -2
  10. package/dist/cli/options.d.ts.map +1 -1
  11. package/dist/cli/options.js +97 -9
  12. package/dist/cli/options.js.map +1 -1
  13. package/dist/cli/voice.d.ts +14 -0
  14. package/dist/cli/voice.d.ts.map +1 -1
  15. package/dist/cli/voice.js +13 -0
  16. package/dist/cli/voice.js.map +1 -1
  17. package/dist/config/actions-schema.d.ts +21 -15
  18. package/dist/config/actions-schema.d.ts.map +1 -1
  19. package/dist/config/actions-schema.js +18 -3
  20. package/dist/config/actions-schema.js.map +1 -1
  21. package/dist/config/config.d.ts +2 -0
  22. package/dist/config/config.d.ts.map +1 -1
  23. package/dist/config/config.js +2 -2
  24. package/dist/config/config.js.map +1 -1
  25. package/dist/config/og-image-names.d.ts +7 -0
  26. package/dist/config/og-image-names.d.ts.map +1 -0
  27. package/dist/config/og-image-names.js +9 -0
  28. package/dist/config/og-image-names.js.map +1 -0
  29. package/dist/config/schema.d.ts +111 -16
  30. package/dist/config/schema.d.ts.map +1 -1
  31. package/dist/config/schema.js +77 -11
  32. package/dist/config/schema.js.map +1 -1
  33. package/dist/film.d.ts +20 -5
  34. package/dist/film.d.ts.map +1 -1
  35. package/dist/film.js.map +1 -1
  36. package/dist/index.d.ts +5 -3
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +5 -3
  39. package/dist/index.js.map +1 -1
  40. package/dist/og/index.d.ts +3 -3
  41. package/dist/og/index.d.ts.map +1 -1
  42. package/dist/og/index.js +3 -2
  43. package/dist/og/index.js.map +1 -1
  44. package/dist/og/render.d.ts +13 -0
  45. package/dist/og/render.d.ts.map +1 -1
  46. package/dist/og/render.js +31 -6
  47. package/dist/og/render.js.map +1 -1
  48. package/dist/og/templates/big-number.d.ts +7 -0
  49. package/dist/og/templates/big-number.d.ts.map +1 -0
  50. package/dist/og/templates/big-number.js +41 -0
  51. package/dist/og/templates/big-number.js.map +1 -0
  52. package/dist/og/templates/carousel.d.ts +5 -0
  53. package/dist/og/templates/carousel.d.ts.map +1 -0
  54. package/dist/og/templates/carousel.js +26 -0
  55. package/dist/og/templates/carousel.js.map +1 -0
  56. package/dist/og/templates/context.d.ts +11 -3
  57. package/dist/og/templates/context.d.ts.map +1 -1
  58. package/dist/og/templates/context.js +6 -0
  59. package/dist/og/templates/context.js.map +1 -1
  60. package/dist/og/templates/frame.d.ts +2 -2
  61. package/dist/og/templates/frame.d.ts.map +1 -1
  62. package/dist/og/templates/frame.js +2 -2
  63. package/dist/og/templates/frame.js.map +1 -1
  64. package/dist/og/templates/index.d.ts +8 -3
  65. package/dist/og/templates/index.d.ts.map +1 -1
  66. package/dist/og/templates/index.js +18 -5
  67. package/dist/og/templates/index.js.map +1 -1
  68. package/dist/og/templates/portrait.d.ts +22 -0
  69. package/dist/og/templates/portrait.d.ts.map +1 -0
  70. package/dist/og/templates/portrait.js +75 -0
  71. package/dist/og/templates/portrait.js.map +1 -0
  72. package/dist/og/templates/schemas.d.ts +28 -0
  73. package/dist/og/templates/schemas.d.ts.map +1 -1
  74. package/dist/og/templates/schemas.js +26 -0
  75. package/dist/og/templates/schemas.js.map +1 -1
  76. package/dist/record/actions.d.ts.map +1 -1
  77. package/dist/record/actions.js +6 -1
  78. package/dist/record/actions.js.map +1 -1
  79. package/dist/record/record.d.ts.map +1 -1
  80. package/dist/record/record.js +51 -17
  81. package/dist/record/record.js.map +1 -1
  82. package/dist/record/screen-guard.d.ts +13 -0
  83. package/dist/record/screen-guard.d.ts.map +1 -0
  84. package/dist/record/screen-guard.js +27 -0
  85. package/dist/record/screen-guard.js.map +1 -0
  86. package/dist/screenshot/gates.d.ts +6 -3
  87. package/dist/screenshot/gates.d.ts.map +1 -1
  88. package/dist/screenshot/gates.js +12 -3
  89. package/dist/screenshot/gates.js.map +1 -1
  90. package/dist/screenshot/screenshot.d.ts +17 -0
  91. package/dist/screenshot/screenshot.d.ts.map +1 -1
  92. package/dist/screenshot/screenshot.js +37 -6
  93. package/dist/screenshot/screenshot.js.map +1 -1
  94. package/dist/screenshot/storage-state.d.ts +9 -0
  95. package/dist/screenshot/storage-state.d.ts.map +1 -0
  96. package/dist/screenshot/storage-state.js +25 -0
  97. package/dist/screenshot/storage-state.js.map +1 -0
  98. package/dist/voice/placeholder.d.ts +35 -0
  99. package/dist/voice/placeholder.d.ts.map +1 -0
  100. package/dist/voice/placeholder.js +53 -0
  101. package/dist/voice/placeholder.js.map +1 -0
  102. package/package.json +2 -1
  103. package/schema/marketing.schema.json +392 -43
  104. package/src/cli/main.ts +80 -27
  105. package/src/cli/og.ts +14 -6
  106. package/src/cli/options.ts +109 -10
  107. package/src/cli/voice.ts +20 -0
  108. package/src/config/actions-schema.ts +18 -3
  109. package/src/config/config.ts +4 -3
  110. package/src/config/og-image-names.ts +7 -0
  111. package/src/config/schema.ts +91 -13
  112. package/src/film.ts +15 -5
  113. package/src/index.ts +7 -1
  114. package/src/og/index.ts +16 -2
  115. package/src/og/render.ts +36 -6
  116. package/src/og/templates/big-number.ts +44 -0
  117. package/src/og/templates/carousel.ts +27 -0
  118. package/src/og/templates/context.ts +16 -3
  119. package/src/og/templates/frame.ts +2 -2
  120. package/src/og/templates/index.ts +31 -9
  121. package/src/og/templates/portrait.ts +126 -0
  122. package/src/og/templates/schemas.ts +35 -0
  123. package/src/record/actions.ts +6 -1
  124. package/src/record/record.ts +53 -19
  125. package/src/record/screen-guard.ts +37 -0
  126. package/src/screenshot/gates.ts +13 -3
  127. package/src/screenshot/screenshot.ts +51 -11
  128. package/src/screenshot/storage-state.ts +24 -0
  129. package/src/voice/placeholder.ts +83 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ Newest first. Each version lists what changed for an app that uses `@softure-ai/marketing-kit`. When an app has run a version in
4
+ production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
5
+ "Definition of done"). Versions before the first one below are described in their GitHub Releases (`marketing-kit@x.y.z`).
6
+
7
+ ## 0.1.9
8
+
9
+ - `beats[].screenGuard`: a sentence's own phrases, checked while that sentence is on screen (at a `checkScreen` inside
10
+ it, or when it ends), so each number is proven on screen when the voiceover says it. The video's `screenGuard` is
11
+ still checked at every `checkScreen` and may be left out, with the `checkScreen`, when the sentences carry every
12
+ phrase. A 0.1.8 `marketing.json` works as it is.
13
+ - README: `record <video> --placeholder` (0.1.8) is the rehearsal before paying; a script that recorded fake
14
+ voiceovers into a second cache with a copy of `marketing.json` can go.
15
+ - `fill` replaces a value already in the input: the old value is selected and deleted on screen, then the new one is
16
+ typed (over a prefilled `45`, `fill … "50"` records `50`, not `4550`). An empty input records as before; `"clear":
17
+ false` keeps the old behaviour; an input the app refills makes the action fail with its name.
18
+ - New `press` action and `Director.press(key, { times, perKey })`: any key (`Backspace`, `Enter`, `ControlOrMeta+A`)
19
+ one or more times. A hand-written `Director` needs the new method.
20
+
21
+ ## 0.1.8
22
+
23
+ - Described in the GitHub Release `marketing-kit@0.1.8`.
package/README.md CHANGED
@@ -12,17 +12,31 @@ from one `marketing.json` (MK-2), the scene included as declarative actions (MK-
12
12
  TTS providers (MK-7), screenshots (MK-4) and OG images (MK-5) build on it. Background:
13
13
  [docs/03-marketing-kit.md](../../docs/03-marketing-kit.md).
14
14
 
15
+ ## Install
16
+
17
+ An app runs the kit through `npx` with a pinned version, not as a dependency:
18
+
19
+ ```json
20
+ { "scripts": { "marketing": "npx -y @softure-ai/marketing-kit@0.1.8" } }
21
+ ```
22
+
23
+ `npm run marketing -- all <video>` then runs the CLI. As a `devDependency` the kit would add more than 100 MB
24
+ (hyperframes, Playwright, sharp, resvg) to every `npm ci` and to the deps stage of the app's Docker image, which
25
+ never runs it. Bump the pin and the `$schema` URL of `marketing.json` together. A project that imports the library
26
+ API (`@softure-ai/marketing-kit`, `@softure-ai/marketing-kit/og`) installs it as usual.
27
+
15
28
  ## Commands
16
29
 
17
30
  ```bash
18
- softure-marketing all <video> # voiceover from the cache -> recording -> render -> post copy
31
+ softure-marketing all <video> [--placeholder] # voiceover from the cache -> recording -> render -> post copy
19
32
  softure-marketing voice <video>... [--commit] # voiceovers in order; without --commit only the cost estimate
20
- softure-marketing record <video> [--today=YYYY-MM-DD] [--url=...]
21
- softure-marketing render <video> [--quality=draft|standard|high]
33
+ softure-marketing record <video> [--today=YYYY-MM-DD] [--url=...] [--placeholder]
34
+ softure-marketing render <video> [--quality=draft|standard|high] [--placeholder]
22
35
  softure-marketing preview <video> # the composition in the hyperframes preview
23
36
  softure-marketing posts <video> # post copy only
24
37
  softure-marketing og [image] # OG images (PNG) of every ogImages entry, or of one
25
38
  softure-marketing shots [<id>] [--url=...] # the screenshots entries (or one), each behind its gates
39
+ softure-marketing shots --page=<url> --out=<file.png> --expect=<phrase> [...] # one page anywhere, same gates
26
40
  ```
27
41
 
28
42
  Every command takes `--config=<path>` (default `./marketing.json`). Exit codes: `0` done, `1` failed, `2`
@@ -38,6 +52,14 @@ the screen guard refused the recording (the screen did not show what the voiceov
38
52
  what was recorded, where it stopped and which videos were never sent). Without `--commit` the summary prints
39
53
  the batch's characters and estimate, so the cost is known before paying. Use it instead of a shell loop: a
40
54
  loop runs on after a failed call, and the provider sees every call it makes.
55
+ - **`--placeholder`** rehearses a film before paying for its voiceover: `all`, `record` and `render` use a free
56
+ stand-in, a quiet tone with the script's words at `voice.placeholder.wordsPerSecond` (default 2.5) and
57
+ `voice.placeholder.sentencePauseSeconds` (default 0.5) between sentences. It is written into
58
+ `<output.buildDir>/<video>/placeholder/`, never into `voice.cacheDir` (where it would count as the paid recording),
59
+ and the film goes to `<video>.placeholder.mp4`. A recording made on it renders only with `--placeholder`, and a
60
+ recording made on the paid voiceover only without it. Match the pace to the voice to see the film's real length.
61
+ `record <video> --placeholder` proves a new scene's actions and screen guard before paying, with no script around
62
+ `createFakeTtsProvider`, no second cache directory and no copy of `marketing.json`.
41
63
  - **`--today`** records the app as of another day for one run; it overrides the video's `today`. Once a
42
64
  voiceover is paid for, pin its day in the video's `today` instead, so a plain `all` reproduces the film in any
43
65
  later month (the voiceover says numbers that depend on the day).
@@ -60,11 +82,19 @@ once per scheme, in its own browser, into `<id>-light.png` and `<id>-dark.png`;
60
82
  in `app.colorScheme`. `shots <id>` takes the entry's id and writes all of its files. Since an entry may
61
83
  write any of those three names, an id that is another entry's `<id>-light` or `<id>-dark` is refused.
62
84
  `full: true` first scrolls the page one screen at a time to the bottom, so lazy images and sections
63
- load, then captures the whole page. A screenshot is kept only when it passes every gate:
85
+ load, then captures the whole page. `scrollTo: <px>` instead captures one viewport frame scrolled that far, e.g. to
86
+ check scroll-driven motion (set `motion: "no-preference"` for it, or the page shows its end state). `waitMs` waits
87
+ that long after loading and scrolling, before the gates read the page, for an animation to settle (default 0).
88
+ `storageState` captures a signed-in screen: a Playwright storage state (cookies and localStorage), relative to the
89
+ folder of `marketing.json`, written by the app's own login script (`await context.storageState({ path })`) or by
90
+ `npx playwright codegen --save-storage=<file> <url>`. It holds a live session, so keep it out of git and regenerate
91
+ it when the session expires; a missing or broken file stops `shots` before the browser starts. A screenshot is kept
92
+ only when it passes every gate:
64
93
 
65
94
  | Gate | Refused when |
66
95
  | --- | --- |
67
96
  | `status` | the page answers with HTTP 400 or above, or not at all (`load`: it did not load within 30 s) |
97
+ | `scroll` | the page cannot scroll as far as `scrollTo` (the frame would show another place) |
68
98
  | `phrase` | the page does not show `expect` within 5 s of loading (hidden elements do not count) |
69
99
  | `size` | the file is smaller than `minBytes` (40 kB by default: a blank or broken page); the file is deleted |
70
100
 
@@ -78,6 +108,22 @@ exit code `1`. `--url` points at another address of the app; without it, `shots`
78
108
  starts `app.startCommand` as `record` does. A plain page can be smaller than 40 kB: set `minBytes` for it
79
109
  (the fixture's calculator, a dark page with one form, is about 16 kB and sets 5000).
80
110
 
111
+ #### One page anywhere: `shots --page`
112
+
113
+ ```bash
114
+ softure-marketing shots --page=https://example.com/pricing --out=shots/pricing.png --expect="Pricing" \
115
+ [--width=1440 --height=900 --scale=1 --full --scroll=<px> --wait=<ms> --motion=reduce|no-preference \
116
+ --scheme=light|dark --auth=<storage-state.json> --minbytes=40000]
117
+ ```
118
+
119
+ A competitor's page, production, or any page that is not a `screenshots` entry: the same browser settings
120
+ (`brand.locale`, `brand.timezone`, `app.hideSelectors`, `app.colorScheme` unless `--scheme`) and the same gates, one
121
+ file at `--out` (relative to the current directory; an older file there is removed first). The flags are the entry's
122
+ fields: `--scroll` is `scrollTo`, `--wait` is `waitMs`, `--auth` is `storageState` (relative to the current
123
+ directory), `--minbytes` is `minBytes`; the viewport defaults to 1440×900. `--expect` is required, so an error page
124
+ is never kept. The app is not started and `--url` does not apply. Every flag needs `=<value>` except `--full`, and
125
+ an unknown flag stops the run: a typo must never switch a gate off.
126
+
81
127
  ## `marketing.json`
82
128
 
83
129
  The contract is one zod schema (`src/config/schema.ts`), published as
@@ -162,7 +208,7 @@ folder of `marketing.json`. A complete example: [examples/fixture/marketing.json
162
208
  | | `posts[]` | `video`, `caption`, `hashtags`, `codes` (this video's own codes), `disclosure` (`true`; `false` leaves the disclosure out); a video without one gets no `posts.md` |
163
209
  | | `disclosure` | a paragraph after every post's caption, before the link: that the persona is an example, that it is not advice, that the voice is AI-generated; `{persona}` becomes the video's persona name |
164
210
  | `screenshots[]` | `id`, `path`, `width`, `height`, `full` (`false`), `expect`, `motion` (`reduce`), `minBytes` (`40000`), `scale` (`1`), `colorSchemes` | for `softure-marketing shots`, see [Screenshots](#screenshots) |
165
- | `ogImages[]` | `id`, `template` (`headline-cta`, `headline-chart`), `size` (`[1200, 630]`), `data` | for `softure-marketing og`, see [OG images](#og-images) |
211
+ | `ogImages[]` | `id`, `template` (`headline-cta`, `headline-chart`, `big-number`, `carousel`), `size` (`"landscape"`, `"portrait"`, `"square"`, `"story"` or `[width, height]`; `landscape` for the headline cards, `portrait` for the others), `data` | for `softure-marketing og`, see [OG images](#og-images) |
166
212
  | `layout` | per layout (`9:16`, `1:1`, `16:9` for phone films; `desktop` for desktop films): `caption` (`top`, `left`, `right`, `fontSize`), `persona` (`top`, `left`, `right`), `endCard` (`top`, `left`, `right`, `headlineSize`, `phone.scale`, `phone.center`) | overrides of the layout's geometry table for every film of that layout, in frame px (`endCard.phone` is the browser window's pose in `desktop`); a missing key keeps the table's value. Values must fit the frame and each box's margins must leave at least 200 px for its text. The frame, the screen box and the camera target are fixed |
167
213
  | `sfx` | `tap`, `key`, `whoosh`, `sparkle`, `pop` | sound effects; a missing one is silent |
168
214
  | `output` | `dir` (`marketing/out`), `buildDir` (`marketing/build`), `quality` (`standard`) | where films go; `--quality` wins |
@@ -190,6 +236,9 @@ default. Values must be hex literals (`#rgb`, `#rrggbb`, `#rrggbbaa`).
190
236
 
191
237
  ### From FIRE_TRACKER's constants
192
238
 
239
+ What MK-1 hard-coded and the key that holds it now. The table names the kind of value, not the value: a project's
240
+ look changes in its own `marketing.json`, without a change to the kit.
241
+
193
242
  | What MK-1 still had in code | Where it is now |
194
243
  | --- | --- |
195
244
  | `marketing.config.json` (`locale`, `brand.name`, `app`, `siteCss`, `posts.site`, `paths`) | `marketing.json`: `brand`, `app`, `brand.tokensFrom.css`, `social.linkTemplate`, `voice.cacheDir`, `output`, `sfx`, `brand.fonts` |
@@ -199,8 +248,8 @@ default. Values must be hex literals (`#rgb`, `#rrggbb`, `#rrggbbaa`).
199
248
  | hidden `nextjs-portal` and the mailing-list pill | `app.hideSelectors` |
200
249
  | the screen guard reading `main` | `app.screenGuardSelector` |
201
250
  | Geist and Newsreader files | `brand.fonts` |
202
- | the arc logo, `#059669` and the light caption pill | `brand.logo`, `brand.colors.captionHighlight`, `captionBackground` |
203
- | `--accessible` for the link pill and the avatar | `brand.colors.cta` (or `tokensFrom.roles.cta: "accessible"`) |
251
+ | the logo, the caption highlight colour and the light caption pill | `brand.logo`, `brand.colors.captionHighlight`, `captionBackground` |
252
+ | the token used for the link pill and the avatar | `brand.colors.cta` (or `tokensFrom.roles.cta: "<token>"`) |
204
253
  | FIRE's narrator voice, Polish | `voice.voiceId`, `voice.language: "pl"` (the cache keys of FIRE's paid recordings stay the same) |
205
254
  | `?z=` and three fixed platforms | `social.linkTemplate`, `social.platforms` |
206
255
  | five fixed sound file names | `sfx` |
@@ -225,7 +274,13 @@ The fixture has the same film both ways in [examples/fixture/marketing.json](exa
225
274
  (typed `Scene`) that drives the Director itself: `d.beat(id, …, { pad })`, then the same methods as
226
275
  the actions (`d.fill(name, value)`, `d.tap(locator)`, `d.until(word)`, …). A video uses one or the other.
227
276
  - **`screenGuard`**: every number the voiceover says, as the screen writes it. If the screen does not
228
- show one, the recording stops with code 2 and no film is made.
277
+ show one, the recording stops with code 2 and no film is made. The video's list is checked at every
278
+ `checkScreen`, all phrases at once, so place it after the last action that reveals one of them.
279
+ - **`beats[].screenGuard`**: the phrases one sentence says, checked while that sentence is on screen: at a
280
+ `checkScreen` inside the sentence (together with the video's list), or, without one, when the sentence ends,
281
+ after its `pad`. A film whose later sentence reveals a number keeps proving the earlier numbers were on screen
282
+ when the voiceover said them. Any sentence but the first can carry one, with `actions` or a `sceneModule`; when
283
+ the sentences carry every phrase, the video's `screenGuard` and the `checkScreen` can be left out.
229
284
 
230
285
  ### Scene actions
231
286
 
@@ -237,7 +292,8 @@ Optional arguments left out keep the Director's defaults.
237
292
  | `wide` | `scale` (`1`), `whoosh` (`false`) | camera on the whole screen |
238
293
  | `tap` | `target`, `after` (`0.35` s) | scrolls the element into view if needed and taps its centre (clicks it on a desktop) |
239
294
  | `type` | `text`, `perChar` (`0.13` s) | types into the focused element, one key at a time |
240
- | `fill` | `input`, `value` | taps `input[name=<input>]`, moves the camera onto it (1.55×; on a desktop at most what still fits the frame) and types the value |
295
+ | `press` | `key`, `times` (`1`, up to 50), `perKey` (`0.13` s) | presses a key on the focused element: a Playwright key name such as `Backspace`, `Enter`, `Tab` or `ControlOrMeta+A` (Meta on macOS, Control elsewhere) |
296
+ | `fill` | `input`, `value`, `clear` (`true`) | taps `input[name=<input>]`, moves the camera onto it (1.55×; on a desktop at most what still fits the frame) and types the value. A value already in the field (a prefilled default, or one the app sets on focus) is selected and deleted on screen first, so `fill intentAge 50` over `45` ends as `50`; if the app puts a value back, the action fails. `clear: false` types after the old value (`4550`) |
241
297
  | `blur` | | takes the focus off the active element |
242
298
  | `focus` | `target` (one or many), `scale` (fits the element), `height` | camera on the element, or on the rectangle around several |
243
299
  | `bring` | `target`, `top` (`140` px), `seconds` (`0.5`) | scrolls so the element's top edge stands `top` px from the top |
@@ -246,7 +302,7 @@ Optional arguments left out keep the Director's defaults.
246
302
  | `cue` | `name` (`sparkle`, `persona-out`) | an event on the film's timeline |
247
303
  | `hold` | `seconds` (0-30) | lets the screen run |
248
304
  | `until` | `word` | waits until the voiceover says this word of the sentence |
249
- | `checkScreen` | | the screen guard, now |
305
+ | `checkScreen` | | the screen guard, now: the video's `screenGuard` and the current sentence's |
250
306
 
251
307
  A beat's `pad` (`0.35` s) is how long the screen holds after the voiceover ends the sentence.
252
308
 
@@ -272,7 +328,8 @@ up to 10 s, `hold` up to 30 s, whole pixels for `top` and `height`). A scene tha
272
328
 
273
329
  What can be checked without a browser is checked when the config loads, by JSON path: an `until` word
274
330
  the sentence does not say, a `hook.still` or `hook.shots[].mark` no action saves, an opening shot after
275
- the first without the `word` it starts on, a scene without `checkScreen`, actions on the opening sentence,
331
+ the first without the `word` it starts on, a scene without `checkScreen` while the video has its own `screenGuard`,
332
+ a film with no screen guard phrase at all, actions, a pad or a `screenGuard` on the opening sentence,
276
333
  actions next to a `sceneModule`. The checks that span
277
334
  sentences run once the rest of the config is valid, so fixing one round of errors can reveal the next.
278
335
  An action that fails while recording names its path and the config file:
@@ -328,6 +385,29 @@ format, so its paid recordings are reused as they are, with no re-keying and no
328
385
  `from the cache`; an estimate line means the text, voice or model differs from FIRE's, and nothing
329
386
  was spent.
330
387
 
388
+ ### Upgrading to 0.1.9
389
+
390
+ - A 0.1.8 `marketing.json` works as it is. New: `beats[].screenGuard`, a sentence's own phrases, checked while that
391
+ sentence is on screen. A film that moved its `checkScreen` to the last sentence because a later sentence reveals
392
+ a number can move each number to the sentence that says it.
393
+ - A script that records fake voiceovers into a second cache with a copy of `marketing.json`, to rehearse scenes
394
+ before paying, can go: `record <video> --placeholder` (from 0.1.8) does that without touching `voice.cacheDir`.
395
+ - `fill` replaces a value already in the field instead of typing after it: over a prefilled `45`, `fill … "50"` now
396
+ records `50` (0.1.8 recorded `4550`). The old value is selected and deleted on screen, with a key sound for each
397
+ key. A field that is empty records frame for frame as before. `"clear": false` keeps 0.1.8's behaviour.
398
+ - A new `press` action presses any key (`Backspace`, `Enter`, `Tab`, `Escape`, `ControlOrMeta+A`), `times` times, so
399
+ a scene that shows a deletion key by key or submits with Enter needs no `sceneModule`. A scene module calls
400
+ `d.press(key, { times, perKey })`; a hand-written `Director` needs the new method.
401
+
402
+ ### Upgrading to 0.1.8
403
+
404
+ - Portrait social posts get their own templates: move a `headline-cta` entry with `size: [1080, 1350]` to
405
+ `big-number` (one figure as the hero) or to a `carousel` slide. `headline-cta` and `headline-chart` render as
406
+ before.
407
+ - A 0.1.7 `marketing.json`, its screenshots and the voiceover cache work as they are. New: `scrollTo`, `waitMs` and
408
+ `storageState` on `screenshots[]` entries, `shots --page` for any page, `--placeholder` on `all`/`record`/`render`
409
+ with `voice.placeholder`. An app that kept its own screenshot script for these can drop it.
410
+
331
411
  ### Upgrading to 0.1.7
332
412
 
333
413
  - A batch of voiceovers is one command: `voice a b c --commit` instead of a shell loop. Paid calls are spaced by
@@ -338,7 +418,8 @@ format, so its paid recordings are reused as they are, with no re-keying and no
338
418
  ## OG images
339
419
 
340
420
  `softure-marketing og` renders each `ogImages` entry with [Satori](https://github.com/vercel/satori)
341
- and resvg to `<output.dir>/og/<id>.png`, at `size` (1200×630 by default), outside Next. The brand
421
+ and resvg to `<output.dir>/og/<id>.png`, at `size` (1200×630 for the headline cards and 1080×1350 for the
422
+ portrait posts by default), outside Next. The brand
342
423
  supplies everything around the copy: the background and text colours, the logo and name in the top
343
424
  corner, and the fonts. `data` is the template's input, checked by its own schema (each template's
344
425
  fields are in the JSON Schema):
@@ -347,6 +428,15 @@ fields are in the JSON Schema):
347
428
  | --- | --- |
348
429
  | `headline-cta` | `headline` (≤ 90 characters), `eyebrow` (≤ 40), `cta` (≤ 32, a pill in `cta`/`onCta` colours), `tiles` (≤ 4 of `label` ≤ 24, `value` ≤ 16) |
349
430
  | `headline-chart` | `headline`, `eyebrow`, `tiles` (≤ 3), `chart`: `viewBox` `[width, height]` and `paths` (1-8) of `d` (SVG path data), `tone` (`accent`, `cta`, `foreground`, `muted`), `fill` (a tint instead of a line), `strokeWidth` (view box units) |
431
+ | `big-number` | `number` (≤ 12 characters, unit included, e.g. `898 PLN`; shorter numbers get bigger type), `caption` (≤ 90, the sentence under it), `eyebrow` (≤ 40), `tiles` (≤ 2), `cta` (≤ 32), `source` (≤ 80, small at the bottom) |
432
+ | `carousel` | `slides` (2-10) of `headline` (≤ 90), `eyebrow` (≤ 40), `body` (≤ 200), `tiles` (≤ 2), `cta` (≤ 32), `source` (≤ 80); `counter` (`true`: `n/N` in the top corner) |
433
+
434
+ **Social posts.** `big-number` and `carousel` are written for a 1080×1350 portrait post (their default `size`) and
435
+ scale by the limiting side, so `"square"` and `"story"` hold the same copy. The logo and name sit on top, the copy
436
+ fills the middle, the call to action and the source line are pinned to the bottom. A carousel entry writes one file
437
+ per slide, `<output.dir>/og/<id>-1.png`…`<id>-<n>.png`, with a shared look; an `ogImages` id that a slide's file
438
+ would also take is refused. The limits are what the post holds: copy at every limit stays inside the frame's margin
439
+ (a test renders it and checks the pixels), and a word too long for the line is broken rather than run past the edge.
350
440
 
351
441
  Values the app computes, such as a chart or a projected date, are computed by the app and arrive in
352
442
  `data` as numbers, text or SVG paths; the package only draws them.
@@ -395,14 +485,16 @@ export default async function Image(): Promise<Response> {
395
485
 
396
486
  `@resvg/resvg-js` is a native module: if the bundler tries to bundle it, list it in
397
487
  `serverExternalPackages` in `next.config.ts`. `renderOgImage({ template, data, size, brand, fonts })`
398
- renders without a `marketing.json` at all.
488
+ renders without a `marketing.json` at all. For a carousel, pass `slide` (1-based) to either function;
489
+ `countOgSlides(template, data)` says how many there are.
399
490
 
400
491
  ## Requirements
401
492
 
402
493
  - Node 22, **ffmpeg** in PATH.
403
494
  - A Chromium for the recording and the screenshots: Playwright's own, or `PLAYWRIGHT_CHROMIUM_PATH=<path>`.
404
- - A Chrome for hyperframes: downloaded on the first render (into `~/.cache/puppeteer`), or
405
- `HYPERFRAMES_BROWSER_PATH=<path>` (a Chromium headless shell works).
495
+ - A Chrome for hyperframes: downloaded on the first render (into `~/.cache/hyperframes/chrome`; an older
496
+ `~/.cache/puppeteer/chrome-headless-shell` is still used when it is there), or `HYPERFRAMES_BROWSER_PATH=<path>`
497
+ (a Chromium headless shell works).
406
498
  - The CLI runs hyperframes with `HYPERFRAMES_NO_TELEMETRY=1` unless you set it yourself.
407
499
 
408
500
  ## Licences
package/dist/cli/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
3
- import { join } from "node:path";
3
+ import { join, resolve } from "node:path";
4
4
  import { findMissingFiles, formatConfigIssues, loadMarketingConfig } from "../config/config.js";
5
5
  import { getGeometry, getLayoutName } from "../compose/timeline.js";
6
6
  import { sceneBeats } from "../film.js";
@@ -10,18 +10,20 @@ import { recordFilm, ScreenGuardError } from "../record/record.js";
10
10
  import { findMachineProblem } from "../render/preflight.js";
11
11
  import { runHyperframes } from "../render/hyperframes.js";
12
12
  import { renderFilm } from "../render/render.js";
13
- import { takeScreenshots } from "../screenshot/screenshot.js";
13
+ import { takePageScreenshot, takeScreenshots } from "../screenshot/screenshot.js";
14
+ import { findStorageStateProblem } from "../screenshot/storage-state.js";
15
+ import { isPlaceholderKey } from "../voice/placeholder.js";
14
16
  import { splitIntoBeats } from "../voice/voiceover.js";
15
17
  import { CliFailure, fail } from "./failure.js";
16
18
  import { loadFilm } from "./films.js";
17
19
  import { writeOgImages } from "./og.js";
18
20
  import { getRecordingDay, readOptions } from "./options.js";
19
21
  import { ensureServer } from "./server.js";
20
- import { getVoiceoverPaths, produceVoiceover, produceVoiceovers, readJson, requireVoiceover } from "./voice.js";
22
+ import { getFilmVoiceover, produceVoiceover, produceVoiceovers, readJson } from "./voice.js";
21
23
  /**
22
24
  * `softure-marketing`: the only way into the films.
23
25
  *
24
- * all <film> voiceover from the cache -> recording -> render -> post copy
26
+ * all <film> [--placeholder] voiceover from the cache (or the free placeholder) -> recording -> render -> post copy
25
27
  * voice <film>... [--commit] voiceovers in order (paid only with --commit), spaced and stopped at the first error
26
28
  * record <film> [--today=YYYY-MM-DD] [--url=...] (--today overrides the video's today)
27
29
  * render <film> [--quality=draft|standard|high]
@@ -29,6 +31,7 @@ import { getVoiceoverPaths, produceVoiceover, produceVoiceovers, readJson, requi
29
31
  * posts <film>
30
32
  * og [image]
31
33
  * shots [<id>] [--url=...]
34
+ * shots --page=<url> --out=<file.png> --expect=<phrase> [...]
32
35
  */
33
36
  const getBuildDir = (config, film) => join(config.output.buildDir, film.id);
34
37
  const getOutDir = (config, film) => join(config.output.dir, film.id);
@@ -41,7 +44,9 @@ function preflight(config, film, needsRender) {
41
44
  fail(formatConfigIssues(config, missing));
42
45
  }
43
46
  async function record(config, film, options) {
44
- const voiceover = requireVoiceover(config, film);
47
+ const { voiceover, key, isPlaceholder } = getFilmVoiceover(config, film, { isPlaceholder: options.isPlaceholder, buildDir: getBuildDir(config, film) });
48
+ if (isPlaceholder)
49
+ console.log(`voiceover: the placeholder (a tone, ${config.voice.placeholder.wordsPerSecond} words a second); nothing paid, render it with --placeholder.`);
45
50
  const voices = splitIntoBeats(voiceover.words, film.beats, film.voice.tempo);
46
51
  const server = await ensureServer(config, film, options.url);
47
52
  mkdirSync(getBuildDir(config, film), { recursive: true });
@@ -54,7 +59,7 @@ async function record(config, film, options) {
54
59
  url: server.url,
55
60
  outDir: getBuildDir(config, film),
56
61
  voices,
57
- voiceoverKey: getVoiceoverPaths(config, film).key,
62
+ voiceoverKey: key,
58
63
  today: recordingDay.day ?? undefined,
59
64
  filmPath: film.scenePath,
60
65
  executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
@@ -100,14 +105,22 @@ function render(config, film, options) {
100
105
  fail(`no recording: run softure-marketing record ${film.id} first.`);
101
106
  // Our own file, written by `recordFilm`; the two fields that tie it to the script are checked below.
102
107
  const log = readJson(logPath);
103
- const voiceover = requireVoiceover(config, film);
108
+ // A recording follows the timings of the voiceover it was made on, so a placeholder recording never renders
109
+ // with the paid voiceover, nor the reverse.
110
+ if (isPlaceholderKey(log.voiceoverKey) !== options.isPlaceholder) {
111
+ if (options.isPlaceholder)
112
+ fail(`the recording was made on the paid voiceover: run softure-marketing record ${film.id} --placeholder, or render without --placeholder.`);
113
+ fail(`the recording was made on the placeholder voiceover: run softure-marketing record ${film.id} for the paid one, or render with --placeholder.`);
114
+ }
115
+ const { voiceover, key } = getFilmVoiceover(config, film, { isPlaceholder: options.isPlaceholder, buildDir: dir });
104
116
  // The recording must match the script; otherwise the action times belong to another voiceover or
105
117
  // other sentences, and the film would come out silently out of sync.
106
118
  const beatIds = sceneBeats(film).map((beat) => beat.id);
107
- if (log.voiceoverKey !== getVoiceoverPaths(config, film).key || log.beatIds?.join(",") !== beatIds.join(",")) {
108
- fail(`the recording does not match the current script (the sentences or the voiceover changed): run softure-marketing record ${film.id}.`);
119
+ if (log.voiceoverKey !== key || log.beatIds?.join(",") !== beatIds.join(",")) {
120
+ fail(`the recording does not match the current script (the sentences or the voiceover changed): run softure-marketing record ${film.id}${options.isPlaceholder ? " --placeholder" : ""}.`);
109
121
  }
110
- const output = join(getOutDir(config, film), `${film.id}.mp4`);
122
+ // A rehearsal never takes the place of the real film.
123
+ const output = join(getOutDir(config, film), options.isPlaceholder ? `${film.id}.placeholder.mp4` : `${film.id}.mp4`);
111
124
  const seconds = renderFilm({
112
125
  film,
113
126
  log,
@@ -144,8 +157,59 @@ function selectScreenshots(config, shotId) {
144
157
  fail(`no screenshots in ${config.file}: add entries to "screenshots".`);
145
158
  fail(`no screenshot "${shotId}" in ${config.file}; known: ${config.screenshots.map((entry) => entry.id).join(", ") || "none"}.`);
146
159
  }
160
+ /** The entries with their storage state as an absolute path, each checked before the browser starts. */
161
+ function resolveStorageStates(config, entries) {
162
+ const [first, ...rest] = entries.map((entry) => {
163
+ if (entry.storageState === undefined)
164
+ return entry;
165
+ const path = resolve(config.root, entry.storageState);
166
+ const problem = findStorageStateProblem(path);
167
+ if (problem !== null)
168
+ fail(`screenshot "${entry.id}": ${problem}.`);
169
+ return { ...entry, storageState: path };
170
+ });
171
+ // The map keeps the length of a non-empty tuple.
172
+ return [first, ...rest];
173
+ }
174
+ function getScreenshotBrowser(config) {
175
+ return { colorScheme: config.app.colorScheme, locale: config.brand.locale, timezone: config.brand.timezone, hideSelectors: config.app.hideSelectors };
176
+ }
177
+ /** Prints each result and fails when any shot was refused. */
178
+ function reportScreenshots(results) {
179
+ for (const result of results) {
180
+ if (result.ok)
181
+ console.log(`✓ ${result.file} (${(result.bytes / 1000).toFixed(0)} kB)`);
182
+ else
183
+ console.error(`✗ ${result.name}: ${result.message}`);
184
+ }
185
+ const failed = results.filter((result) => !result.ok).length;
186
+ if (failed > 0)
187
+ fail(`${failed} of ${results.length} screenshots failed their gates; see above.`);
188
+ }
189
+ /** `shots --page`: one page anywhere; the app is not started, and the storage state resolves from the current directory. */
190
+ async function pageShot(config, options) {
191
+ let { entry } = options;
192
+ if (entry.storageState !== undefined) {
193
+ const path = resolve(entry.storageState);
194
+ const problem = findStorageStateProblem(path);
195
+ if (problem !== null)
196
+ fail(`--auth: ${problem}.`);
197
+ entry = { ...entry, storageState: path };
198
+ }
199
+ const file = resolve(options.out);
200
+ console.log(`screenshot: ${options.page}.`);
201
+ const result = await takePageScreenshot({
202
+ entry,
203
+ url: options.page,
204
+ file,
205
+ scheme: options.scheme,
206
+ browser: getScreenshotBrowser(config),
207
+ executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
208
+ });
209
+ reportScreenshots([result]);
210
+ }
147
211
  async function shots(config, options) {
148
- const entries = selectScreenshots(config, options.shotId);
212
+ const entries = resolveStorageStates(config, selectScreenshots(config, options.shotId));
149
213
  const [first] = entries;
150
214
  const target = { url: new URL(first.path, config.app.baseUrl).href, ownUrl: `http://localhost:${config.app.port}${first.path}` };
151
215
  const server = await ensureServer(config, target, options.url === undefined ? undefined : new URL(first.path, options.url).href);
@@ -158,26 +222,13 @@ async function shots(config, options) {
158
222
  baseUrl: server.url,
159
223
  outDir,
160
224
  executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH || undefined,
161
- browser: {
162
- colorScheme: config.app.colorScheme,
163
- locale: config.brand.locale,
164
- timezone: config.brand.timezone,
165
- hideSelectors: config.app.hideSelectors,
166
- },
225
+ browser: getScreenshotBrowser(config),
167
226
  });
168
227
  }
169
228
  finally {
170
229
  server.stop();
171
230
  }
172
- for (const result of results) {
173
- if (result.ok)
174
- console.log(`✓ ${result.file} (${(result.bytes / 1000).toFixed(0)} kB)`);
175
- else
176
- console.error(`✗ ${result.name}: ${result.message}`);
177
- }
178
- const failed = results.filter((result) => !result.ok).length;
179
- if (failed > 0)
180
- fail(`${failed} of ${results.length} screenshots failed their gates; see above.`);
231
+ reportScreenshots(results);
181
232
  }
182
233
  async function main(argv) {
183
234
  const parsed = readOptions(argv);
@@ -193,7 +244,10 @@ async function main(argv) {
193
244
  return;
194
245
  }
195
246
  if (options.command === "shots") {
196
- await shots(config, options);
247
+ if (options.mode === "page")
248
+ await pageShot(config, options);
249
+ else
250
+ await shots(config, options);
197
251
  return;
198
252
  }
199
253
  if (options.command === "voice") {
@@ -227,8 +281,9 @@ async function main(argv) {
227
281
  }
228
282
  case "all": {
229
283
  preflight(config, film, true);
230
- if ((await produceVoiceover(config, film, false)) === null)
231
- fail("no voiceover; see the message above.");
284
+ if (!options.isPlaceholder && (await produceVoiceover(config, film, false)) === null) {
285
+ fail(`no voiceover; see the message above. To rehearse the film for free: softure-marketing all ${film.id} --placeholder.`);
286
+ }
232
287
  await record(config, film, options);
233
288
  render(config, film, options);
234
289
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,EAAwB,MAAM,qBAAqB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAwB,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,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"}
package/dist/cli/og.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import type { MarketingConfig } from "../config/config.js";
2
- /** `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named. */
2
+ /**
3
+ * `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named; a carousel
4
+ * writes one file per slide, `<id>-1.png`…`<id>-<n>.png`.
5
+ */
3
6
  export declare function writeOgImages(config: MarketingConfig, imageId: string | null): Promise<void>;
4
7
  //# sourceMappingURL=og.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"og.d.ts","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D,wGAAwG;AACxG,wBAAsB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAelG"}
1
+ {"version":3,"file":"og.d.ts","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBlG"}
package/dist/cli/og.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { mkdirSync, writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
+ import { getOgImageNames } from "../config/og-image-names.js";
3
4
  import { renderConfiguredOgImage } from "../og/render.js";
4
5
  import { fail } from "./failure.js";
5
- /** `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named. */
6
+ /**
7
+ * `og [image]`: writes `<output.dir>/og/<id>.png` for every `ogImages` entry, or for the one named; a carousel
8
+ * writes one file per slide, `<id>-1.png`…`<id>-<n>.png`.
9
+ */
6
10
  export async function writeOgImages(config, imageId) {
7
11
  const entries = imageId === null ? config.ogImages : config.ogImages.filter((image) => image.id === imageId);
8
12
  if (config.ogImages.length === 0)
@@ -13,12 +17,16 @@ export async function writeOgImages(config, imageId) {
13
17
  const dir = join(config.output.dir, "og");
14
18
  mkdirSync(dir, { recursive: true });
15
19
  for (const entry of entries) {
16
- const png = await renderConfiguredOgImage({ config, id: entry.id });
17
- if (!png.ok)
18
- fail(png.error);
19
- const path = join(dir, `${entry.id}.png`);
20
- writeFileSync(path, png.value);
21
- console.log(`✓ ${path} (${entry.size[0]}×${entry.size[1]}, ${entry.template})`);
20
+ const names = getOgImageNames(entry);
21
+ for (const [index, name] of names.entries()) {
22
+ const png = await renderConfiguredOgImage({ config, id: entry.id, slide: index + 1 });
23
+ if (!png.ok)
24
+ fail(png.error);
25
+ const path = join(dir, `${name}.png`);
26
+ writeFileSync(path, png.value);
27
+ const slide = names.length > 1 ? `, slide ${String(index + 1)}/${String(names.length)}` : "";
28
+ console.log(`✓ ${path} (${String(entry.size[0])}×${String(entry.size[1])}, ${entry.template}${slide})`);
29
+ }
22
30
  }
23
31
  }
24
32
  //# sourceMappingURL=og.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"og.js","sourceRoot":"","sources":["../../src/cli/og.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,wGAAwG;AACxG,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAuB,EAAE,OAAsB;IACjF,MAAM,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC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