@koda-sl/baker-cli 0.550.0 → 0.551.0-dev.ad2740332

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 (858) hide show
  1. package/README.md +18 -1
  2. package/dist/account-IG3U6UXZ.js +82 -0
  3. package/dist/account-JCQYOGJD.js +82 -0
  4. package/dist/account-reads-LOCJMS35.js +219 -0
  5. package/dist/account-users-AZPQPHD3.js +64 -0
  6. package/dist/account-writes-BSSKSTZ2.js +68 -0
  7. package/dist/accounts-2PZV6VRS.js +80 -0
  8. package/dist/accounts-5I6USVT7.js +701 -0
  9. package/dist/actions-TSNXITQM.js +55 -0
  10. package/dist/activecampaign-2RKR6P74.js +938 -0
  11. package/dist/ad-group-writes-KMB3OMJG.js +172 -0
  12. package/dist/ad-groups-E67CNQS4.js +70 -0
  13. package/dist/ad-writes-FNMKNFUN.js +176 -0
  14. package/dist/add-ENUFKN5V.js +305 -0
  15. package/dist/add-SRHNKSJT.js +107 -0
  16. package/dist/ads-4LASBP4G.js +79 -0
  17. package/dist/ads-X33452HM.js +48 -0
  18. package/dist/advertisers-XO5EJXR5.js +123 -0
  19. package/dist/analytics-AZTZVHVA.js +447 -0
  20. package/dist/analytics-ED3NBGJJ.js +2437 -0
  21. package/dist/animate-OWXAT2RK.js +480 -0
  22. package/dist/assign-SIXEBHRW.js +80 -0
  23. package/dist/audience-size-ACNA4JIX.js +76 -0
  24. package/dist/audiences-3R574STZ.js +280 -0
  25. package/dist/audit-K5BEYW7G.js +154 -0
  26. package/dist/autocomplete-XIYI56SU.js +114 -0
  27. package/dist/avatars-C5CUPLIV.js +38 -0
  28. package/dist/bid-pricing-2UF6O2K6.js +103 -0
  29. package/dist/brand-ATWMTJFS.js +22 -0
  30. package/dist/brief-A65JXAER.js +543 -0
  31. package/dist/campaign-groups-F5C7C7NG.js +99 -0
  32. package/dist/campaign-writes-TNW7KKQQ.js +168 -0
  33. package/dist/campaign-writes-Z2J24SUZ.js +176 -0
  34. package/dist/campaigns-43OS6EUG.js +78 -0
  35. package/dist/campaigns-TQZXAMWE.js +111 -0
  36. package/dist/campaigns-XTNWM3VV.js +113 -0
  37. package/dist/canvas-UGO5IHCA.js +46 -0
  38. package/dist/capabilities-XHPLFYH2.js +147 -0
  39. package/dist/catalog-7LINLVVY.js +66 -0
  40. package/dist/catalogs-IR22RGZD.js +130 -0
  41. package/dist/changes-JAGWBHQC.js +143 -0
  42. package/dist/chatgpt-NE2RBMFK.js +47 -0
  43. package/dist/chats-QFZ4DGI7.js +449 -0
  44. package/dist/check-AEMZGF5G.js +107 -0
  45. package/dist/chunk-34JTMTPJ.js +224 -0
  46. package/dist/chunk-3C42N42Q.js +297 -0
  47. package/dist/chunk-3EUITH4J.js +638 -0
  48. package/dist/chunk-4IRJ5JXA.js +46 -0
  49. package/dist/chunk-4QGNRCSE.js +930 -0
  50. package/dist/chunk-4XFP43NH.js +142 -0
  51. package/dist/chunk-5EHSDRMJ.js +377 -0
  52. package/dist/chunk-5IFFPSEN.js +225 -0
  53. package/dist/chunk-64ALJ6TJ.js +274 -0
  54. package/dist/chunk-6KGMWAUL.js +494 -0
  55. package/dist/chunk-6OIKNJ7G.js +26 -0
  56. package/dist/chunk-6ZUGN27V.js +103 -0
  57. package/dist/chunk-7MWELLCN.js +51 -0
  58. package/dist/chunk-7UFV6H7J.js +167 -0
  59. package/dist/chunk-B3CDNANO.js +843 -0
  60. package/dist/chunk-B3LSWNUR.js +392 -0
  61. package/dist/chunk-BIHU5GCE.js +19 -0
  62. package/dist/chunk-BNI5DAB7.js +783 -0
  63. package/dist/chunk-CISE4DOX.js +89 -0
  64. package/dist/chunk-CVWYS7SE.js +191 -0
  65. package/dist/chunk-CXRS5YLB.js +150 -0
  66. package/dist/chunk-E5H7JIWB.js +3510 -0
  67. package/dist/chunk-EI6R7GKQ.js +275 -0
  68. package/dist/chunk-F3CZFUXZ.js +3187 -0
  69. package/dist/chunk-F3CZFUXZ.js.map +1 -0
  70. package/dist/chunk-F743MUNY.js +344 -0
  71. package/dist/chunk-FEVA2MNA.js +438 -0
  72. package/dist/chunk-FJXSVDWW.js +203 -0
  73. package/dist/chunk-G6J6AWTE.js +5471 -0
  74. package/dist/chunk-GCZK4BMB.js +5368 -0
  75. package/dist/chunk-GKIYKOJW.js +156 -0
  76. package/dist/chunk-GKMDBLTQ.js +7852 -0
  77. package/dist/chunk-GKMDBLTQ.js.map +1 -0
  78. package/dist/chunk-H4CLWLYF.js +4269 -0
  79. package/dist/chunk-H4CLWLYF.js.map +1 -0
  80. package/dist/chunk-H4OVNGUK.js +91 -0
  81. package/dist/chunk-HWOOMK5A.js +66 -0
  82. package/dist/chunk-IABSARSS.js +334 -0
  83. package/dist/chunk-IAOKMWUF.js +910 -0
  84. package/dist/chunk-ICEYCLRU.js +679 -0
  85. package/dist/chunk-JBNT444M.js +285 -0
  86. package/dist/chunk-K3HZVRBJ.js +8954 -0
  87. package/dist/chunk-KCZY5Y4E.js +61 -0
  88. package/dist/chunk-KTO2Y3DI.js +1646 -0
  89. package/dist/chunk-L7AJMZ6Z.js +24026 -0
  90. package/dist/chunk-L7AJMZ6Z.js.map +1 -0
  91. package/dist/chunk-LDFM37DM.js +148 -0
  92. package/dist/chunk-LHC6OHQ6.js +857 -0
  93. package/dist/chunk-LMSV7NQY.js +455 -0
  94. package/dist/chunk-LPDHNMOY.js +57 -0
  95. package/dist/chunk-METHLFNZ.js +63 -0
  96. package/dist/chunk-MI3HAKXY.js +170 -0
  97. package/dist/chunk-P6FMQHJJ.js +131 -0
  98. package/dist/chunk-PT73IEI6.js +479 -0
  99. package/dist/chunk-Q6LCL67T.js +1518 -0
  100. package/dist/chunk-RFGO4DHJ.js +2209 -0
  101. package/dist/chunk-RMTM22JO.js +685 -0
  102. package/dist/chunk-RQOSSYVH.js +718 -0
  103. package/dist/chunk-RQOSSYVH.js.map +1 -0
  104. package/dist/chunk-S2L2A2ZN.js +430 -0
  105. package/dist/chunk-SA3P64PQ.js +169 -0
  106. package/dist/chunk-SIKCVWM3.js +76 -0
  107. package/dist/chunk-SIOLRCLE.js +831 -0
  108. package/dist/chunk-TK6BXI5A.js +392 -0
  109. package/dist/chunk-V4UJERGL.js +64 -0
  110. package/dist/chunk-V6NFLQKX.js +207 -0
  111. package/dist/chunk-VISKG4IA.js +547 -0
  112. package/dist/chunk-WJ6KKTIU.js +23 -0
  113. package/dist/chunk-WPZTFSED.js +163 -0
  114. package/dist/chunk-X5UMVG4S.js +249 -0
  115. package/dist/chunk-X7ROPKZT.js +197 -0
  116. package/dist/chunk-XDJZH2JV.js +604 -0
  117. package/dist/chunk-XU6XQPNM.js +1919 -0
  118. package/dist/chunk-YKFGXS26.js +228 -0
  119. package/dist/chunk-YQB66YKJ.js +98 -0
  120. package/dist/chunk-YSTAPNQP.js +1902 -0
  121. package/dist/chunk-ZSLZOUGC.js +91 -0
  122. package/dist/claim-R6OG5IHM.js +200 -0
  123. package/dist/cli.js +34 -33
  124. package/dist/cli.js.map +1 -1
  125. package/dist/companies-M36P2XXN.js +198 -0
  126. package/dist/company-NQAS3QF6.js +308 -0
  127. package/dist/complete-FJHCHRYO.js +84 -0
  128. package/dist/connect-TEWDGN6C.js +45 -0
  129. package/dist/conversation-UC7PXJQ3.js +96 -0
  130. package/dist/conversion-report-R4KJI4VA.js +127 -0
  131. package/dist/conversion-upload-command-WCLWA27O.js +439 -0
  132. package/dist/conversion-writes-XIQEIDPS.js +122 -0
  133. package/dist/conversions-D7P3KVQK.js +140 -0
  134. package/dist/conversions-RMBQNW3T.js +78 -0
  135. package/dist/create-GMZHI4BK.js +62 -0
  136. package/dist/create-J2AICQFF.js +135 -0
  137. package/dist/create-RVR33UQM.js +239 -0
  138. package/dist/create-VXHOWOVI.js +210 -0
  139. package/dist/creatives-SLKM5XNE.js +223 -0
  140. package/dist/creatives-YMFRT6SE.js +58 -0
  141. package/dist/credentials-T3IID6QG.js +290 -0
  142. package/dist/critique-2Y53EQ3S.js +1451 -0
  143. package/dist/critique-SMLSUHY2.js +232 -0
  144. package/dist/crm-E35C36E3.js +323 -0
  145. package/dist/crm-TPV4H4KN.js +227 -0
  146. package/dist/currency-BY647ZB7.js +88 -0
  147. package/dist/customers-PH376T52.js +65 -0
  148. package/dist/delete-4MNN3QXP.js +67 -0
  149. package/dist/delete-7PEW3V6J.js +69 -0
  150. package/dist/delete-TRONZNM2.js +57 -0
  151. package/dist/demographics-EZXWOSZE.js +141 -0
  152. package/dist/discard-PHO5BKEZ.js +69 -0
  153. package/dist/discover-TAJUFO5R.js +172 -0
  154. package/dist/domain-7GNF7QHV.js +101 -0
  155. package/dist/download-A4EYH6VD.js +172 -0
  156. package/dist/draft-NQG5RBSF.js +220 -0
  157. package/dist/draft-PA3L7VG6.js +342 -0
  158. package/dist/draft-QQWTEXVT.js +313 -0
  159. package/dist/draft-RGSDXFFT.js +408 -0
  160. package/dist/draft-SKEGKHIK.js +288 -0
  161. package/dist/engine/index.js +8 -8
  162. package/dist/experiments-DEUWFSDQ.js +236 -0
  163. package/dist/facets-KWT2NAGR.js +117 -0
  164. package/dist/feedback-A56L3VWN.js +115 -0
  165. package/dist/feedback-O3BVHXJA.js +136 -0
  166. package/dist/feedback-O3BVHXJA.js.map +1 -0
  167. package/dist/feedback-record-FE4P5MKS.js +269 -0
  168. package/dist/fetch-M5U4E5IE.js +204 -0
  169. package/dist/fit-AYFRRDAN.js +65 -0
  170. package/dist/flows-QKR7JW6H.js +250 -0
  171. package/dist/fonts-RUHNGL7R.js +39 -0
  172. package/dist/forecast-V7IPL6EC.js +121 -0
  173. package/dist/forecast-VOND3WVO.js +169 -0
  174. package/dist/funnel-WNVS53CO.js +397 -0
  175. package/dist/generate-SW5KLHXG.js +263 -0
  176. package/dist/get-AJNPJIX6.js +59 -0
  177. package/dist/get-ZLRSDJM6.js +82 -0
  178. package/dist/google-VYARAUQH.js +3270 -0
  179. package/dist/google-ads-3PIHLIIF.js +198 -0
  180. package/dist/history-34E26WGP.js +153 -0
  181. package/dist/history-7DF5HFJT.js +69 -0
  182. package/dist/history-LWAKFSHW.js +102 -0
  183. package/dist/hubspot-HH7KVQU5.js +782 -0
  184. package/dist/ideas-VFZXVUFZ.js +45 -0
  185. package/dist/images-LB4E2F5I.js +92 -0
  186. package/dist/ingest-LRUKF3EK.js +27 -0
  187. package/dist/ingest-VZ77AODJ.js +123 -0
  188. package/dist/insights-YVV5MHPQ.js +132 -0
  189. package/dist/inspect-X6XU4CXL.js +192 -0
  190. package/dist/intent-GIAQDMHF.js +95 -0
  191. package/dist/keyword-gap-NZF75XGF.js +130 -0
  192. package/dist/keyword-metrics-P546E6KW.js +200 -0
  193. package/dist/keywords-for-site-AEFJ5BTU.js +131 -0
  194. package/dist/landing-RKO3LUST.js +28 -0
  195. package/dist/languages-GGNN7FEK.js +40 -0
  196. package/dist/leads-OVYF2EKX.js +115 -0
  197. package/dist/learn-UWJ24ZD5.js +207 -0
  198. package/dist/line-item-writes-46K4NKPJ.js +211 -0
  199. package/dist/line-items-YRSGOQFS.js +107 -0
  200. package/dist/link-XXRDZQFM.js +67 -0
  201. package/dist/linkedin-W4OWO6QA.js +1330 -0
  202. package/dist/linkedin-person-SQTWLIN5.js +139 -0
  203. package/dist/list-E6WPSAQK.js +154 -0
  204. package/dist/list-S34STWB3.js +306 -0
  205. package/dist/list-XERZMEWU.js +67 -0
  206. package/dist/locations-7RYEWKJO.js +69 -0
  207. package/dist/locations-BU4ZGWAS.js +40 -0
  208. package/dist/log-CDN4H2JY.js +95 -0
  209. package/dist/make-JE7V2RWR.js +1367 -0
  210. package/dist/map-SPSJ532D.js +436 -0
  211. package/dist/mcp-PBPHIS4Q.js +729 -0
  212. package/dist/media-sources-MZL4XML4.js +35 -0
  213. package/dist/members-RDNSONMW.js +47 -0
  214. package/dist/metrics-Z75Q2FHP.js +152 -0
  215. package/dist/models-X2IXXAD6.js +155 -0
  216. package/dist/normalize-4KL73UBE.js +144 -0
  217. package/dist/options-7MN5WH3J.js +125 -0
  218. package/dist/organization-NJT4G355.js +949 -0
  219. package/dist/performance-PG5T4D7M.js +27 -0
  220. package/dist/performance-SB2KLMTO.js +5565 -0
  221. package/dist/pixels-DBSPNHIE.js +62 -0
  222. package/dist/promoted-tweet-writes-PCWFF2EG.js +183 -0
  223. package/dist/promoted-tweets-ZSXREC4V.js +119 -0
  224. package/dist/publish-FIYZNQYO.js +344 -0
  225. package/dist/query-NMQKS4MY.js +62 -0
  226. package/dist/reddit-7WRZ5B3I.js +29 -0
  227. package/dist/refresh-IKHSUY3E.js +97 -0
  228. package/dist/release-JCKOGRTY.js +63 -0
  229. package/dist/relevant-pages-JRIDJL4L.js +99 -0
  230. package/dist/remove-KE63VJ3M.js +53 -0
  231. package/dist/reopen-4YSAVTOS.js +66 -0
  232. package/dist/rerun-K5SQ6GAQ.js +96 -0
  233. package/dist/research-OFHOHRFD.js +75 -0
  234. package/dist/research-ORXD6AV4.js +265 -0
  235. package/dist/reset-4CLSOD77.js +57 -0
  236. package/dist/reset-BN4FDUZB.js +57 -0
  237. package/dist/resolve-F6QVMQGX.js +124 -0
  238. package/dist/retry-JGAJF6CN.js +65 -0
  239. package/dist/retry-NJUIX2QT.js +63 -0
  240. package/dist/revenue-BYGHXTYJ.js +91 -0
  241. package/dist/rules-MWTPVJTK.js +99 -0
  242. package/dist/rules-add-3MJRAYXB.js +465 -0
  243. package/dist/run-CXD7RKYN.js +71 -0
  244. package/dist/run-NDJSLZNE.js +69 -0
  245. package/dist/scaffold-ad-2N7H7ACP.js +1513 -0
  246. package/dist/scaffold-static-ad-R7T766AD.js +1011 -0
  247. package/dist/scaffold-video-22HVSFRR.js +885 -0
  248. package/dist/schedule-ZEREUVXT.js +64 -0
  249. package/dist/scheduled-agents-5URJWW2E.js +55 -0
  250. package/dist/schema-NQ7DXUHX.js +135 -0
  251. package/dist/schema-U6GAKTQZ.js +121 -0
  252. package/dist/search-T5JFYDCZ.js +177 -0
  253. package/dist/select-SDFGLXMV.js +110 -0
  254. package/dist/set-prompt-JI5W6VPR.js +199 -0
  255. package/dist/setup-links-TOL7BFBE.js +144 -0
  256. package/dist/shopify-QXOGNIVU.js +3980 -0
  257. package/dist/site-NJDIUQY6.js +180 -0
  258. package/dist/sources-EMUT5MV7.js +457 -0
  259. package/dist/sources-M4IJL4H7.js +30 -0
  260. package/dist/stale-YYJNWLIE.js +90 -0
  261. package/dist/status-UZJGIDRI.js +65 -0
  262. package/dist/studio-OV2ZY5W3.js +49 -0
  263. package/dist/sync-T3E7SP7B.js +57 -0
  264. package/dist/sync-definition-TLY4FQKC.js +70 -0
  265. package/dist/tags-DPI3CAPB.js +23 -0
  266. package/dist/tags-DS3W4EDB.js +26 -0
  267. package/dist/tags-HSUBVXPJ.js +227 -0
  268. package/dist/tags-WP7W57FY.js +23 -0
  269. package/dist/tags-WWZFKW3Y.js +23 -0
  270. package/dist/targeting-criteria-PICDCHEV.js +113 -0
  271. package/dist/targets-WOMHJXY7.js +106 -0
  272. package/dist/testimonials-LDL66SSG.js +32 -0
  273. package/dist/themes-RRLYZ46U.js +95 -0
  274. package/dist/top-companies-RBRWAW27.js +111 -0
  275. package/dist/transcript-V6LZKOKQ.js +165 -0
  276. package/dist/translate-53TPL46A.js +603 -0
  277. package/dist/triggers-DDV73LZ4.js +144 -0
  278. package/dist/unlink-PLS3GA5V.js +70 -0
  279. package/dist/unstage-GSWMVEVP.js +88 -0
  280. package/dist/update-CIMCN33A.js +155 -0
  281. package/dist/update-KK7QO2KE.js +101 -0
  282. package/dist/update-X2H3GZ4I.js +192 -0
  283. package/dist/update-XNV6KHYK.js +66 -0
  284. package/dist/upload-OL2S2OSA.js +130 -0
  285. package/dist/url-options-2TQCGD2W.js +131 -0
  286. package/dist/url-params-QNSGNQ6N.js +101 -0
  287. package/dist/validate-KC3UA552.js +125 -0
  288. package/dist/videos-GBD36TD2.js +41 -0
  289. package/dist/viewer-check-LQUD2OYO.js +83 -0
  290. package/dist/web-K3L2BKAH.js +173 -0
  291. package/dist/winning-ads-X3VYALHK.js +86 -0
  292. package/dist/write-commands-XUOCRBME.js +1525 -0
  293. package/dist/x-65WPQWOP.js +47 -0
  294. package/package.json +1 -1
  295. package/dist/account-2HJ4GKHN.js +0 -82
  296. package/dist/account-MTMCQQYH.js +0 -82
  297. package/dist/account-reads-X36NPCX5.js +0 -219
  298. package/dist/account-users-FJ63HUJT.js +0 -64
  299. package/dist/account-writes-FZ3KCJZY.js +0 -68
  300. package/dist/accounts-PLZTPM52.js +0 -701
  301. package/dist/accounts-VYQINKID.js +0 -80
  302. package/dist/actions-NKCYYR7Q.js +0 -55
  303. package/dist/activecampaign-LQHDIHN5.js +0 -938
  304. package/dist/ad-group-writes-XGG3WQEO.js +0 -172
  305. package/dist/ad-groups-GZIPUN64.js +0 -70
  306. package/dist/ad-writes-2VTRWQLW.js +0 -176
  307. package/dist/add-6EHN5G6X.js +0 -107
  308. package/dist/add-HLBKTI3H.js +0 -305
  309. package/dist/ads-CWXQLZCC.js +0 -48
  310. package/dist/ads-LNWALF6G.js +0 -79
  311. package/dist/advertisers-YMIPR2QG.js +0 -123
  312. package/dist/analytics-37M6Z37U.js +0 -2437
  313. package/dist/analytics-6VAB2VYM.js +0 -447
  314. package/dist/animate-DM4OUJMR.js +0 -480
  315. package/dist/assign-V25HMGMU.js +0 -80
  316. package/dist/audience-size-FKNAK4QD.js +0 -76
  317. package/dist/audiences-7D5VPOWF.js +0 -280
  318. package/dist/audit-6VVUMMYL.js +0 -154
  319. package/dist/autocomplete-NETVGJRC.js +0 -114
  320. package/dist/avatars-HH4LOUA3.js +0 -38
  321. package/dist/bid-pricing-SCTUSHFI.js +0 -103
  322. package/dist/brand-FTPQYYDU.js +0 -22
  323. package/dist/brief-MCKNRSWM.js +0 -543
  324. package/dist/campaign-groups-ZNKBTXPV.js +0 -99
  325. package/dist/campaign-writes-5TWXZ44R.js +0 -168
  326. package/dist/campaign-writes-H22P6YPW.js +0 -176
  327. package/dist/campaigns-265JXD2Z.js +0 -78
  328. package/dist/campaigns-E64SHT67.js +0 -111
  329. package/dist/campaigns-GYNO5P22.js +0 -113
  330. package/dist/canvas-E4ZT2K7I.js +0 -46
  331. package/dist/capabilities-RVNBW4OL.js +0 -147
  332. package/dist/catalog-DPUQBZZ7.js +0 -66
  333. package/dist/catalogs-SBXFAD3X.js +0 -130
  334. package/dist/changes-HXVZUJMH.js +0 -143
  335. package/dist/chatgpt-UXJPCGZU.js +0 -47
  336. package/dist/chats-4SQSGOFC.js +0 -449
  337. package/dist/check-4WC2RLDR.js +0 -107
  338. package/dist/chunk-3I66ZQTI.js +0 -203
  339. package/dist/chunk-3SEXQVMX.js +0 -91
  340. package/dist/chunk-4D73PLXU.js +0 -843
  341. package/dist/chunk-4EGXO63N.js +0 -479
  342. package/dist/chunk-4S5ZAG4S.js +0 -63
  343. package/dist/chunk-5UEBOBLO.js +0 -170
  344. package/dist/chunk-6FLUNQHT.js +0 -91
  345. package/dist/chunk-6I7N2WYU.js +0 -19
  346. package/dist/chunk-6KWT3Z35.js +0 -103
  347. package/dist/chunk-AI2SKWZE.js +0 -197
  348. package/dist/chunk-ANV42DGJ.js +0 -455
  349. package/dist/chunk-AYEWXTSF.js +0 -392
  350. package/dist/chunk-CKIDKN6H.js +0 -191
  351. package/dist/chunk-D4NK7SPT.js +0 -930
  352. package/dist/chunk-DNZVBP2W.js +0 -61
  353. package/dist/chunk-DYTBVVQX.js +0 -679
  354. package/dist/chunk-EBWOLUII.js +0 -24026
  355. package/dist/chunk-EBWOLUII.js.map +0 -1
  356. package/dist/chunk-EH34RWKR.js +0 -604
  357. package/dist/chunk-EOMY5SUJ.js +0 -783
  358. package/dist/chunk-EQAEWL6A.js +0 -547
  359. package/dist/chunk-F5UU5PAE.js +0 -494
  360. package/dist/chunk-FVDC6AKZ.js +0 -150
  361. package/dist/chunk-G4VG6ZV3.js +0 -430
  362. package/dist/chunk-GEQUWPAX.js +0 -715
  363. package/dist/chunk-GEQUWPAX.js.map +0 -1
  364. package/dist/chunk-GN7K3NPI.js +0 -148
  365. package/dist/chunk-H6CS7VSO.js +0 -1902
  366. package/dist/chunk-HBDWE7WK.js +0 -98
  367. package/dist/chunk-I6JPTDKR.js +0 -377
  368. package/dist/chunk-IGIACW2B.js +0 -207
  369. package/dist/chunk-IRINY4B2.js +0 -2209
  370. package/dist/chunk-J4JY435Z.js +0 -438
  371. package/dist/chunk-JAC6JVCI.js +0 -26
  372. package/dist/chunk-JLLGXYOZ.js +0 -857
  373. package/dist/chunk-JY3OJBKZ.js +0 -3510
  374. package/dist/chunk-KIXVHP2C.js +0 -1919
  375. package/dist/chunk-LODEDXCD.js +0 -156
  376. package/dist/chunk-MCJ5I5LR.js +0 -3187
  377. package/dist/chunk-MCJ5I5LR.js.map +0 -1
  378. package/dist/chunk-MEK7SMWO.js +0 -685
  379. package/dist/chunk-MELSTI6W.js +0 -66
  380. package/dist/chunk-MSMTG6OC.js +0 -4269
  381. package/dist/chunk-MSMTG6OC.js.map +0 -1
  382. package/dist/chunk-MZPS46OR.js +0 -76
  383. package/dist/chunk-NBWZVBDG.js +0 -131
  384. package/dist/chunk-P3VY5JEM.js +0 -274
  385. package/dist/chunk-PXGR3VGW.js +0 -1646
  386. package/dist/chunk-QK3HMAVU.js +0 -5471
  387. package/dist/chunk-QYKZ3FVE.js +0 -51
  388. package/dist/chunk-RHEWQB5O.js +0 -638
  389. package/dist/chunk-RP36XHWT.js +0 -46
  390. package/dist/chunk-SNWFM2DB.js +0 -228
  391. package/dist/chunk-SWPJZJTY.js +0 -8954
  392. package/dist/chunk-SXYEIZND.js +0 -275
  393. package/dist/chunk-T62SKL4T.js +0 -831
  394. package/dist/chunk-T7SOINEA.js +0 -169
  395. package/dist/chunk-TARINRA4.js +0 -1518
  396. package/dist/chunk-TBIDT7FG.js +0 -392
  397. package/dist/chunk-TNHIYELA.js +0 -249
  398. package/dist/chunk-TNZUMU55.js +0 -167
  399. package/dist/chunk-UT77RVVU.js +0 -142
  400. package/dist/chunk-VOUCQ2YW.js +0 -64
  401. package/dist/chunk-VR2AF7I7.js +0 -7823
  402. package/dist/chunk-VR2AF7I7.js.map +0 -1
  403. package/dist/chunk-VVMRSEW6.js +0 -23
  404. package/dist/chunk-WFJ7KR5K.js +0 -163
  405. package/dist/chunk-WLA7CA4G.js +0 -297
  406. package/dist/chunk-WOE4TZHJ.js +0 -285
  407. package/dist/chunk-XJ2GXHU4.js +0 -57
  408. package/dist/chunk-XLG3SJ3K.js +0 -334
  409. package/dist/chunk-XYNQMRNX.js +0 -5368
  410. package/dist/chunk-YDGBWP3I.js +0 -89
  411. package/dist/chunk-Z4TWYYM3.js +0 -910
  412. package/dist/chunk-ZEUAJAKN.js +0 -225
  413. package/dist/chunk-ZKYJYBDR.js +0 -344
  414. package/dist/chunk-ZL43WZBX.js +0 -224
  415. package/dist/claim-G4MRH7Q7.js +0 -200
  416. package/dist/companies-TV5SX7IW.js +0 -198
  417. package/dist/company-W2N3H7AG.js +0 -308
  418. package/dist/complete-CTS2VDY5.js +0 -84
  419. package/dist/connect-64CFSYYE.js +0 -45
  420. package/dist/conversation-T57OY4L4.js +0 -96
  421. package/dist/conversion-report-RB2MU7UD.js +0 -127
  422. package/dist/conversion-upload-command-HFZYKVXA.js +0 -439
  423. package/dist/conversion-writes-56AIPXPK.js +0 -122
  424. package/dist/conversions-NRX76ZIT.js +0 -78
  425. package/dist/conversions-P75BZDDN.js +0 -140
  426. package/dist/create-2IFLWXCE.js +0 -135
  427. package/dist/create-2ZM3SAMX.js +0 -239
  428. package/dist/create-I6AVOYOS.js +0 -210
  429. package/dist/create-YKV66SQ6.js +0 -62
  430. package/dist/creatives-4HMWWE4O.js +0 -58
  431. package/dist/creatives-CSXTXOTD.js +0 -223
  432. package/dist/credentials-YQND7EIL.js +0 -290
  433. package/dist/critique-ABUU725C.js +0 -232
  434. package/dist/critique-EBQKUWBV.js +0 -1451
  435. package/dist/crm-4GXVHO4R.js +0 -323
  436. package/dist/crm-G2QOW4WY.js +0 -227
  437. package/dist/currency-CHBV6WIO.js +0 -88
  438. package/dist/customers-SNDSWS2C.js +0 -65
  439. package/dist/delete-AXECUWUU.js +0 -57
  440. package/dist/delete-WSWCPQ4R.js +0 -67
  441. package/dist/delete-YE3ZJKGK.js +0 -69
  442. package/dist/demographics-UPLQV4VW.js +0 -141
  443. package/dist/discard-D3SPLQP2.js +0 -69
  444. package/dist/discover-ZU2DAV23.js +0 -172
  445. package/dist/domain-OXNE56NK.js +0 -101
  446. package/dist/download-DGVEUXKX.js +0 -172
  447. package/dist/draft-2SMIRPNZ.js +0 -220
  448. package/dist/draft-2YTMB4YM.js +0 -313
  449. package/dist/draft-EWGNZUU4.js +0 -288
  450. package/dist/draft-L7EN5TZD.js +0 -342
  451. package/dist/draft-R7BNWMBR.js +0 -408
  452. package/dist/experiments-C3M65LMP.js +0 -236
  453. package/dist/facets-SGS4HDCM.js +0 -117
  454. package/dist/feedback-256D3HOY.js +0 -115
  455. package/dist/feedback-record-FDOIZ3HV.js +0 -269
  456. package/dist/fetch-EODKEOLX.js +0 -204
  457. package/dist/fit-VEUYZEG6.js +0 -65
  458. package/dist/flows-RCOWB5BY.js +0 -250
  459. package/dist/fonts-33UOE4X3.js +0 -39
  460. package/dist/forecast-372Q6KQZ.js +0 -169
  461. package/dist/forecast-I3WRFKQL.js +0 -121
  462. package/dist/funnel-MLPPNJQK.js +0 -397
  463. package/dist/generate-JQIK3UYS.js +0 -263
  464. package/dist/get-AOHHMPZC.js +0 -59
  465. package/dist/get-SORMH25W.js +0 -82
  466. package/dist/google-JHTOX6WM.js +0 -3270
  467. package/dist/google-ads-CNREZMRN.js +0 -198
  468. package/dist/history-D5UQTJ4H.js +0 -102
  469. package/dist/history-VNLS2TKB.js +0 -69
  470. package/dist/history-ZE7OQGDR.js +0 -153
  471. package/dist/hubspot-WGP36QI3.js +0 -782
  472. package/dist/ideas-4F5JG4UV.js +0 -45
  473. package/dist/images-Q5MZ75SL.js +0 -92
  474. package/dist/ingest-52X3B37O.js +0 -123
  475. package/dist/ingest-NXISET6E.js +0 -27
  476. package/dist/insights-XY6II7TX.js +0 -132
  477. package/dist/inspect-JD4WLZ57.js +0 -192
  478. package/dist/intent-5QUPPZNI.js +0 -95
  479. package/dist/keyword-gap-IG3EFLDH.js +0 -130
  480. package/dist/keyword-metrics-DDW4MSLX.js +0 -200
  481. package/dist/keywords-for-site-3UM6THUN.js +0 -131
  482. package/dist/landing-EAEMVCED.js +0 -28
  483. package/dist/languages-LNHWSCMT.js +0 -40
  484. package/dist/leads-MITJNZWB.js +0 -115
  485. package/dist/learn-VLUC2TXW.js +0 -207
  486. package/dist/line-item-writes-HLQYQ4KG.js +0 -211
  487. package/dist/line-items-64KIKPCB.js +0 -107
  488. package/dist/link-NNSG5YQ4.js +0 -67
  489. package/dist/linkedin-JYN5LGP2.js +0 -1330
  490. package/dist/linkedin-person-OPCUWPLI.js +0 -139
  491. package/dist/list-5U4Z3PWU.js +0 -306
  492. package/dist/list-7S4KTZNU.js +0 -154
  493. package/dist/list-VQQICPK3.js +0 -67
  494. package/dist/locations-64JNCQID.js +0 -69
  495. package/dist/locations-KVAAO7LD.js +0 -40
  496. package/dist/log-63ZVYC6L.js +0 -95
  497. package/dist/make-7ITIZUJI.js +0 -1367
  498. package/dist/map-MTR4V7KE.js +0 -436
  499. package/dist/mcp-HKMQLXBC.js +0 -729
  500. package/dist/media-sources-ZBSBTB4C.js +0 -35
  501. package/dist/members-MTRJ3ZRS.js +0 -47
  502. package/dist/metrics-MXGA3EFS.js +0 -152
  503. package/dist/models-Z6SUHWKI.js +0 -155
  504. package/dist/normalize-SAKXSFEX.js +0 -144
  505. package/dist/options-L7B3SDIX.js +0 -125
  506. package/dist/organization-FFRNHVC5.js +0 -949
  507. package/dist/performance-AJA7YGOO.js +0 -5565
  508. package/dist/performance-F72KFQU5.js +0 -27
  509. package/dist/pixels-H642RPK4.js +0 -62
  510. package/dist/promoted-tweet-writes-32RAOXQR.js +0 -183
  511. package/dist/promoted-tweets-KMLFRWDN.js +0 -119
  512. package/dist/publish-FOSPQ2BE.js +0 -344
  513. package/dist/query-FT2BA3WH.js +0 -62
  514. package/dist/reddit-5PYYZNBJ.js +0 -29
  515. package/dist/refresh-AOHTPXU4.js +0 -97
  516. package/dist/release-G2UKFAQY.js +0 -63
  517. package/dist/relevant-pages-OCHLUV5K.js +0 -99
  518. package/dist/remove-K5C2URJE.js +0 -53
  519. package/dist/reopen-PWROABUC.js +0 -66
  520. package/dist/rerun-CVJYCCNK.js +0 -96
  521. package/dist/research-KLWC3JBI.js +0 -75
  522. package/dist/research-Z3OJXOS4.js +0 -265
  523. package/dist/reset-3QL7IOHF.js +0 -57
  524. package/dist/reset-GPO4MCSM.js +0 -57
  525. package/dist/resolve-7SW7FZ7Q.js +0 -124
  526. package/dist/retry-HNCUDQ7S.js +0 -63
  527. package/dist/retry-NVMOGTZD.js +0 -65
  528. package/dist/revenue-HDJFYUEB.js +0 -91
  529. package/dist/rules-RYHWD4HA.js +0 -99
  530. package/dist/rules-add-EMDFBYDA.js +0 -465
  531. package/dist/run-2XRDPVHX.js +0 -71
  532. package/dist/run-PXHQKRY5.js +0 -69
  533. package/dist/scaffold-ad-RJAXMKOX.js +0 -1513
  534. package/dist/scaffold-static-ad-4HLSHPJI.js +0 -1011
  535. package/dist/scaffold-video-UH6OOIQW.js +0 -885
  536. package/dist/schedule-WT22OEBF.js +0 -64
  537. package/dist/scheduled-agents-BLIDNRFX.js +0 -55
  538. package/dist/schema-FUCZHUNV.js +0 -135
  539. package/dist/schema-NSXMRNWM.js +0 -121
  540. package/dist/search-S5O3L4KX.js +0 -177
  541. package/dist/select-ISIQXRPF.js +0 -110
  542. package/dist/set-prompt-MAQN5CYY.js +0 -199
  543. package/dist/setup-links-HANLAGD2.js +0 -144
  544. package/dist/shopify-PKWH7WXV.js +0 -3980
  545. package/dist/site-GADKB2RP.js +0 -180
  546. package/dist/sources-CA7JLF4P.js +0 -30
  547. package/dist/sources-HUXVRGDH.js +0 -457
  548. package/dist/stale-2A33KEE7.js +0 -90
  549. package/dist/status-5JTRE3OM.js +0 -65
  550. package/dist/studio-6ZXUKA4G.js +0 -49
  551. package/dist/sync-RJFMKM6D.js +0 -57
  552. package/dist/sync-definition-AKZUCLEV.js +0 -70
  553. package/dist/tags-B2EXVMNS.js +0 -23
  554. package/dist/tags-JUIKSERD.js +0 -227
  555. package/dist/tags-LP6I7GY4.js +0 -26
  556. package/dist/tags-UHD43CAG.js +0 -23
  557. package/dist/tags-WJFCPOP7.js +0 -23
  558. package/dist/targeting-criteria-2LKBD5IH.js +0 -113
  559. package/dist/targets-O5JYFOCY.js +0 -106
  560. package/dist/testimonials-P63TKNJ2.js +0 -32
  561. package/dist/themes-R3A6IVQN.js +0 -95
  562. package/dist/top-companies-F7DUMWXA.js +0 -111
  563. package/dist/transcript-4RFSQA5U.js +0 -165
  564. package/dist/translate-WOJFJRAC.js +0 -603
  565. package/dist/triggers-4MHFN3VV.js +0 -144
  566. package/dist/unlink-5AXBQOIL.js +0 -70
  567. package/dist/unstage-SIBXT25Y.js +0 -88
  568. package/dist/update-4BDOO53L.js +0 -101
  569. package/dist/update-NNEMJQ4D.js +0 -155
  570. package/dist/update-O76YSKXB.js +0 -192
  571. package/dist/update-YS4QI2KP.js +0 -66
  572. package/dist/upload-XVV3HQ5W.js +0 -130
  573. package/dist/url-options-YZ6UG3NY.js +0 -131
  574. package/dist/url-params-XL5URMTG.js +0 -101
  575. package/dist/validate-42Q7X2KK.js +0 -125
  576. package/dist/videos-HMKEY5WY.js +0 -41
  577. package/dist/viewer-check-4XFEWEH3.js +0 -83
  578. package/dist/web-PYG3AOYS.js +0 -173
  579. package/dist/winning-ads-74BKOBVN.js +0 -86
  580. package/dist/write-commands-43GTQIR6.js +0 -1525
  581. package/dist/x-6WSV55RN.js +0 -47
  582. /package/dist/{account-2HJ4GKHN.js.map → account-IG3U6UXZ.js.map} +0 -0
  583. /package/dist/{account-MTMCQQYH.js.map → account-JCQYOGJD.js.map} +0 -0
  584. /package/dist/{account-reads-X36NPCX5.js.map → account-reads-LOCJMS35.js.map} +0 -0
  585. /package/dist/{account-users-FJ63HUJT.js.map → account-users-AZPQPHD3.js.map} +0 -0
  586. /package/dist/{account-writes-FZ3KCJZY.js.map → account-writes-BSSKSTZ2.js.map} +0 -0
  587. /package/dist/{accounts-VYQINKID.js.map → accounts-2PZV6VRS.js.map} +0 -0
  588. /package/dist/{accounts-PLZTPM52.js.map → accounts-5I6USVT7.js.map} +0 -0
  589. /package/dist/{actions-NKCYYR7Q.js.map → actions-TSNXITQM.js.map} +0 -0
  590. /package/dist/{activecampaign-LQHDIHN5.js.map → activecampaign-2RKR6P74.js.map} +0 -0
  591. /package/dist/{ad-group-writes-XGG3WQEO.js.map → ad-group-writes-KMB3OMJG.js.map} +0 -0
  592. /package/dist/{ad-groups-GZIPUN64.js.map → ad-groups-E67CNQS4.js.map} +0 -0
  593. /package/dist/{ad-writes-2VTRWQLW.js.map → ad-writes-FNMKNFUN.js.map} +0 -0
  594. /package/dist/{add-HLBKTI3H.js.map → add-ENUFKN5V.js.map} +0 -0
  595. /package/dist/{add-6EHN5G6X.js.map → add-SRHNKSJT.js.map} +0 -0
  596. /package/dist/{ads-LNWALF6G.js.map → ads-4LASBP4G.js.map} +0 -0
  597. /package/dist/{ads-CWXQLZCC.js.map → ads-X33452HM.js.map} +0 -0
  598. /package/dist/{advertisers-YMIPR2QG.js.map → advertisers-XO5EJXR5.js.map} +0 -0
  599. /package/dist/{analytics-6VAB2VYM.js.map → analytics-AZTZVHVA.js.map} +0 -0
  600. /package/dist/{analytics-37M6Z37U.js.map → analytics-ED3NBGJJ.js.map} +0 -0
  601. /package/dist/{animate-DM4OUJMR.js.map → animate-OWXAT2RK.js.map} +0 -0
  602. /package/dist/{assign-V25HMGMU.js.map → assign-SIXEBHRW.js.map} +0 -0
  603. /package/dist/{audience-size-FKNAK4QD.js.map → audience-size-ACNA4JIX.js.map} +0 -0
  604. /package/dist/{audiences-7D5VPOWF.js.map → audiences-3R574STZ.js.map} +0 -0
  605. /package/dist/{audit-6VVUMMYL.js.map → audit-K5BEYW7G.js.map} +0 -0
  606. /package/dist/{autocomplete-NETVGJRC.js.map → autocomplete-XIYI56SU.js.map} +0 -0
  607. /package/dist/{avatars-HH4LOUA3.js.map → avatars-C5CUPLIV.js.map} +0 -0
  608. /package/dist/{bid-pricing-SCTUSHFI.js.map → bid-pricing-2UF6O2K6.js.map} +0 -0
  609. /package/dist/{brand-FTPQYYDU.js.map → brand-ATWMTJFS.js.map} +0 -0
  610. /package/dist/{brief-MCKNRSWM.js.map → brief-A65JXAER.js.map} +0 -0
  611. /package/dist/{campaign-groups-ZNKBTXPV.js.map → campaign-groups-F5C7C7NG.js.map} +0 -0
  612. /package/dist/{campaign-writes-5TWXZ44R.js.map → campaign-writes-TNW7KKQQ.js.map} +0 -0
  613. /package/dist/{campaign-writes-H22P6YPW.js.map → campaign-writes-Z2J24SUZ.js.map} +0 -0
  614. /package/dist/{campaigns-265JXD2Z.js.map → campaigns-43OS6EUG.js.map} +0 -0
  615. /package/dist/{campaigns-E64SHT67.js.map → campaigns-TQZXAMWE.js.map} +0 -0
  616. /package/dist/{campaigns-GYNO5P22.js.map → campaigns-XTNWM3VV.js.map} +0 -0
  617. /package/dist/{canvas-E4ZT2K7I.js.map → canvas-UGO5IHCA.js.map} +0 -0
  618. /package/dist/{capabilities-RVNBW4OL.js.map → capabilities-XHPLFYH2.js.map} +0 -0
  619. /package/dist/{catalog-DPUQBZZ7.js.map → catalog-7LINLVVY.js.map} +0 -0
  620. /package/dist/{catalogs-SBXFAD3X.js.map → catalogs-IR22RGZD.js.map} +0 -0
  621. /package/dist/{changes-HXVZUJMH.js.map → changes-JAGWBHQC.js.map} +0 -0
  622. /package/dist/{chatgpt-UXJPCGZU.js.map → chatgpt-NE2RBMFK.js.map} +0 -0
  623. /package/dist/{chats-4SQSGOFC.js.map → chats-QFZ4DGI7.js.map} +0 -0
  624. /package/dist/{check-4WC2RLDR.js.map → check-AEMZGF5G.js.map} +0 -0
  625. /package/dist/{chunk-ZL43WZBX.js.map → chunk-34JTMTPJ.js.map} +0 -0
  626. /package/dist/{chunk-WLA7CA4G.js.map → chunk-3C42N42Q.js.map} +0 -0
  627. /package/dist/{chunk-RHEWQB5O.js.map → chunk-3EUITH4J.js.map} +0 -0
  628. /package/dist/{chunk-RP36XHWT.js.map → chunk-4IRJ5JXA.js.map} +0 -0
  629. /package/dist/{chunk-D4NK7SPT.js.map → chunk-4QGNRCSE.js.map} +0 -0
  630. /package/dist/{chunk-UT77RVVU.js.map → chunk-4XFP43NH.js.map} +0 -0
  631. /package/dist/{chunk-I6JPTDKR.js.map → chunk-5EHSDRMJ.js.map} +0 -0
  632. /package/dist/{chunk-ZEUAJAKN.js.map → chunk-5IFFPSEN.js.map} +0 -0
  633. /package/dist/{chunk-P3VY5JEM.js.map → chunk-64ALJ6TJ.js.map} +0 -0
  634. /package/dist/{chunk-F5UU5PAE.js.map → chunk-6KGMWAUL.js.map} +0 -0
  635. /package/dist/{chunk-JAC6JVCI.js.map → chunk-6OIKNJ7G.js.map} +0 -0
  636. /package/dist/{chunk-6KWT3Z35.js.map → chunk-6ZUGN27V.js.map} +0 -0
  637. /package/dist/{chunk-QYKZ3FVE.js.map → chunk-7MWELLCN.js.map} +0 -0
  638. /package/dist/{chunk-TNZUMU55.js.map → chunk-7UFV6H7J.js.map} +0 -0
  639. /package/dist/{chunk-4D73PLXU.js.map → chunk-B3CDNANO.js.map} +0 -0
  640. /package/dist/{chunk-AYEWXTSF.js.map → chunk-B3LSWNUR.js.map} +0 -0
  641. /package/dist/{chunk-6I7N2WYU.js.map → chunk-BIHU5GCE.js.map} +0 -0
  642. /package/dist/{chunk-EOMY5SUJ.js.map → chunk-BNI5DAB7.js.map} +0 -0
  643. /package/dist/{chunk-YDGBWP3I.js.map → chunk-CISE4DOX.js.map} +0 -0
  644. /package/dist/{chunk-CKIDKN6H.js.map → chunk-CVWYS7SE.js.map} +0 -0
  645. /package/dist/{chunk-FVDC6AKZ.js.map → chunk-CXRS5YLB.js.map} +0 -0
  646. /package/dist/{chunk-JY3OJBKZ.js.map → chunk-E5H7JIWB.js.map} +0 -0
  647. /package/dist/{chunk-SXYEIZND.js.map → chunk-EI6R7GKQ.js.map} +0 -0
  648. /package/dist/{chunk-ZKYJYBDR.js.map → chunk-F743MUNY.js.map} +0 -0
  649. /package/dist/{chunk-J4JY435Z.js.map → chunk-FEVA2MNA.js.map} +0 -0
  650. /package/dist/{chunk-3I66ZQTI.js.map → chunk-FJXSVDWW.js.map} +0 -0
  651. /package/dist/{chunk-QK3HMAVU.js.map → chunk-G6J6AWTE.js.map} +0 -0
  652. /package/dist/{chunk-XYNQMRNX.js.map → chunk-GCZK4BMB.js.map} +0 -0
  653. /package/dist/{chunk-LODEDXCD.js.map → chunk-GKIYKOJW.js.map} +0 -0
  654. /package/dist/{chunk-3SEXQVMX.js.map → chunk-H4OVNGUK.js.map} +0 -0
  655. /package/dist/{chunk-MELSTI6W.js.map → chunk-HWOOMK5A.js.map} +0 -0
  656. /package/dist/{chunk-XLG3SJ3K.js.map → chunk-IABSARSS.js.map} +0 -0
  657. /package/dist/{chunk-Z4TWYYM3.js.map → chunk-IAOKMWUF.js.map} +0 -0
  658. /package/dist/{chunk-DYTBVVQX.js.map → chunk-ICEYCLRU.js.map} +0 -0
  659. /package/dist/{chunk-WOE4TZHJ.js.map → chunk-JBNT444M.js.map} +0 -0
  660. /package/dist/{chunk-SWPJZJTY.js.map → chunk-K3HZVRBJ.js.map} +0 -0
  661. /package/dist/{chunk-DNZVBP2W.js.map → chunk-KCZY5Y4E.js.map} +0 -0
  662. /package/dist/{chunk-PXGR3VGW.js.map → chunk-KTO2Y3DI.js.map} +0 -0
  663. /package/dist/{chunk-GN7K3NPI.js.map → chunk-LDFM37DM.js.map} +0 -0
  664. /package/dist/{chunk-JLLGXYOZ.js.map → chunk-LHC6OHQ6.js.map} +0 -0
  665. /package/dist/{chunk-ANV42DGJ.js.map → chunk-LMSV7NQY.js.map} +0 -0
  666. /package/dist/{chunk-XJ2GXHU4.js.map → chunk-LPDHNMOY.js.map} +0 -0
  667. /package/dist/{chunk-4S5ZAG4S.js.map → chunk-METHLFNZ.js.map} +0 -0
  668. /package/dist/{chunk-5UEBOBLO.js.map → chunk-MI3HAKXY.js.map} +0 -0
  669. /package/dist/{chunk-NBWZVBDG.js.map → chunk-P6FMQHJJ.js.map} +0 -0
  670. /package/dist/{chunk-4EGXO63N.js.map → chunk-PT73IEI6.js.map} +0 -0
  671. /package/dist/{chunk-TARINRA4.js.map → chunk-Q6LCL67T.js.map} +0 -0
  672. /package/dist/{chunk-IRINY4B2.js.map → chunk-RFGO4DHJ.js.map} +0 -0
  673. /package/dist/{chunk-MEK7SMWO.js.map → chunk-RMTM22JO.js.map} +0 -0
  674. /package/dist/{chunk-G4VG6ZV3.js.map → chunk-S2L2A2ZN.js.map} +0 -0
  675. /package/dist/{chunk-T7SOINEA.js.map → chunk-SA3P64PQ.js.map} +0 -0
  676. /package/dist/{chunk-MZPS46OR.js.map → chunk-SIKCVWM3.js.map} +0 -0
  677. /package/dist/{chunk-T62SKL4T.js.map → chunk-SIOLRCLE.js.map} +0 -0
  678. /package/dist/{chunk-TBIDT7FG.js.map → chunk-TK6BXI5A.js.map} +0 -0
  679. /package/dist/{chunk-VOUCQ2YW.js.map → chunk-V4UJERGL.js.map} +0 -0
  680. /package/dist/{chunk-IGIACW2B.js.map → chunk-V6NFLQKX.js.map} +0 -0
  681. /package/dist/{chunk-EQAEWL6A.js.map → chunk-VISKG4IA.js.map} +0 -0
  682. /package/dist/{chunk-VVMRSEW6.js.map → chunk-WJ6KKTIU.js.map} +0 -0
  683. /package/dist/{chunk-WFJ7KR5K.js.map → chunk-WPZTFSED.js.map} +0 -0
  684. /package/dist/{chunk-TNHIYELA.js.map → chunk-X5UMVG4S.js.map} +0 -0
  685. /package/dist/{chunk-AI2SKWZE.js.map → chunk-X7ROPKZT.js.map} +0 -0
  686. /package/dist/{chunk-EH34RWKR.js.map → chunk-XDJZH2JV.js.map} +0 -0
  687. /package/dist/{chunk-KIXVHP2C.js.map → chunk-XU6XQPNM.js.map} +0 -0
  688. /package/dist/{chunk-SNWFM2DB.js.map → chunk-YKFGXS26.js.map} +0 -0
  689. /package/dist/{chunk-HBDWE7WK.js.map → chunk-YQB66YKJ.js.map} +0 -0
  690. /package/dist/{chunk-H6CS7VSO.js.map → chunk-YSTAPNQP.js.map} +0 -0
  691. /package/dist/{chunk-6FLUNQHT.js.map → chunk-ZSLZOUGC.js.map} +0 -0
  692. /package/dist/{claim-G4MRH7Q7.js.map → claim-R6OG5IHM.js.map} +0 -0
  693. /package/dist/{companies-TV5SX7IW.js.map → companies-M36P2XXN.js.map} +0 -0
  694. /package/dist/{company-W2N3H7AG.js.map → company-NQAS3QF6.js.map} +0 -0
  695. /package/dist/{complete-CTS2VDY5.js.map → complete-FJHCHRYO.js.map} +0 -0
  696. /package/dist/{connect-64CFSYYE.js.map → connect-TEWDGN6C.js.map} +0 -0
  697. /package/dist/{conversation-T57OY4L4.js.map → conversation-UC7PXJQ3.js.map} +0 -0
  698. /package/dist/{conversion-report-RB2MU7UD.js.map → conversion-report-R4KJI4VA.js.map} +0 -0
  699. /package/dist/{conversion-upload-command-HFZYKVXA.js.map → conversion-upload-command-WCLWA27O.js.map} +0 -0
  700. /package/dist/{conversion-writes-56AIPXPK.js.map → conversion-writes-XIQEIDPS.js.map} +0 -0
  701. /package/dist/{conversions-P75BZDDN.js.map → conversions-D7P3KVQK.js.map} +0 -0
  702. /package/dist/{conversions-NRX76ZIT.js.map → conversions-RMBQNW3T.js.map} +0 -0
  703. /package/dist/{create-YKV66SQ6.js.map → create-GMZHI4BK.js.map} +0 -0
  704. /package/dist/{create-2IFLWXCE.js.map → create-J2AICQFF.js.map} +0 -0
  705. /package/dist/{create-2ZM3SAMX.js.map → create-RVR33UQM.js.map} +0 -0
  706. /package/dist/{create-I6AVOYOS.js.map → create-VXHOWOVI.js.map} +0 -0
  707. /package/dist/{creatives-CSXTXOTD.js.map → creatives-SLKM5XNE.js.map} +0 -0
  708. /package/dist/{creatives-4HMWWE4O.js.map → creatives-YMFRT6SE.js.map} +0 -0
  709. /package/dist/{credentials-YQND7EIL.js.map → credentials-T3IID6QG.js.map} +0 -0
  710. /package/dist/{critique-EBQKUWBV.js.map → critique-2Y53EQ3S.js.map} +0 -0
  711. /package/dist/{critique-ABUU725C.js.map → critique-SMLSUHY2.js.map} +0 -0
  712. /package/dist/{crm-4GXVHO4R.js.map → crm-E35C36E3.js.map} +0 -0
  713. /package/dist/{crm-G2QOW4WY.js.map → crm-TPV4H4KN.js.map} +0 -0
  714. /package/dist/{currency-CHBV6WIO.js.map → currency-BY647ZB7.js.map} +0 -0
  715. /package/dist/{customers-SNDSWS2C.js.map → customers-PH376T52.js.map} +0 -0
  716. /package/dist/{delete-WSWCPQ4R.js.map → delete-4MNN3QXP.js.map} +0 -0
  717. /package/dist/{delete-YE3ZJKGK.js.map → delete-7PEW3V6J.js.map} +0 -0
  718. /package/dist/{delete-AXECUWUU.js.map → delete-TRONZNM2.js.map} +0 -0
  719. /package/dist/{demographics-UPLQV4VW.js.map → demographics-EZXWOSZE.js.map} +0 -0
  720. /package/dist/{discard-D3SPLQP2.js.map → discard-PHO5BKEZ.js.map} +0 -0
  721. /package/dist/{discover-ZU2DAV23.js.map → discover-TAJUFO5R.js.map} +0 -0
  722. /package/dist/{domain-OXNE56NK.js.map → domain-7GNF7QHV.js.map} +0 -0
  723. /package/dist/{download-DGVEUXKX.js.map → download-A4EYH6VD.js.map} +0 -0
  724. /package/dist/{draft-2SMIRPNZ.js.map → draft-NQG5RBSF.js.map} +0 -0
  725. /package/dist/{draft-L7EN5TZD.js.map → draft-PA3L7VG6.js.map} +0 -0
  726. /package/dist/{draft-2YTMB4YM.js.map → draft-QQWTEXVT.js.map} +0 -0
  727. /package/dist/{draft-R7BNWMBR.js.map → draft-RGSDXFFT.js.map} +0 -0
  728. /package/dist/{draft-EWGNZUU4.js.map → draft-SKEGKHIK.js.map} +0 -0
  729. /package/dist/{experiments-C3M65LMP.js.map → experiments-DEUWFSDQ.js.map} +0 -0
  730. /package/dist/{facets-SGS4HDCM.js.map → facets-KWT2NAGR.js.map} +0 -0
  731. /package/dist/{feedback-256D3HOY.js.map → feedback-A56L3VWN.js.map} +0 -0
  732. /package/dist/{feedback-record-FDOIZ3HV.js.map → feedback-record-FE4P5MKS.js.map} +0 -0
  733. /package/dist/{fetch-EODKEOLX.js.map → fetch-M5U4E5IE.js.map} +0 -0
  734. /package/dist/{fit-VEUYZEG6.js.map → fit-AYFRRDAN.js.map} +0 -0
  735. /package/dist/{flows-RCOWB5BY.js.map → flows-QKR7JW6H.js.map} +0 -0
  736. /package/dist/{fonts-33UOE4X3.js.map → fonts-RUHNGL7R.js.map} +0 -0
  737. /package/dist/{forecast-I3WRFKQL.js.map → forecast-V7IPL6EC.js.map} +0 -0
  738. /package/dist/{forecast-372Q6KQZ.js.map → forecast-VOND3WVO.js.map} +0 -0
  739. /package/dist/{funnel-MLPPNJQK.js.map → funnel-WNVS53CO.js.map} +0 -0
  740. /package/dist/{generate-JQIK3UYS.js.map → generate-SW5KLHXG.js.map} +0 -0
  741. /package/dist/{get-AOHHMPZC.js.map → get-AJNPJIX6.js.map} +0 -0
  742. /package/dist/{get-SORMH25W.js.map → get-ZLRSDJM6.js.map} +0 -0
  743. /package/dist/{google-JHTOX6WM.js.map → google-VYARAUQH.js.map} +0 -0
  744. /package/dist/{google-ads-CNREZMRN.js.map → google-ads-3PIHLIIF.js.map} +0 -0
  745. /package/dist/{history-ZE7OQGDR.js.map → history-34E26WGP.js.map} +0 -0
  746. /package/dist/{history-VNLS2TKB.js.map → history-7DF5HFJT.js.map} +0 -0
  747. /package/dist/{history-D5UQTJ4H.js.map → history-LWAKFSHW.js.map} +0 -0
  748. /package/dist/{hubspot-WGP36QI3.js.map → hubspot-HH7KVQU5.js.map} +0 -0
  749. /package/dist/{ideas-4F5JG4UV.js.map → ideas-VFZXVUFZ.js.map} +0 -0
  750. /package/dist/{images-Q5MZ75SL.js.map → images-LB4E2F5I.js.map} +0 -0
  751. /package/dist/{ingest-NXISET6E.js.map → ingest-LRUKF3EK.js.map} +0 -0
  752. /package/dist/{ingest-52X3B37O.js.map → ingest-VZ77AODJ.js.map} +0 -0
  753. /package/dist/{insights-XY6II7TX.js.map → insights-YVV5MHPQ.js.map} +0 -0
  754. /package/dist/{inspect-JD4WLZ57.js.map → inspect-X6XU4CXL.js.map} +0 -0
  755. /package/dist/{intent-5QUPPZNI.js.map → intent-GIAQDMHF.js.map} +0 -0
  756. /package/dist/{keyword-gap-IG3EFLDH.js.map → keyword-gap-NZF75XGF.js.map} +0 -0
  757. /package/dist/{keyword-metrics-DDW4MSLX.js.map → keyword-metrics-P546E6KW.js.map} +0 -0
  758. /package/dist/{keywords-for-site-3UM6THUN.js.map → keywords-for-site-AEFJ5BTU.js.map} +0 -0
  759. /package/dist/{landing-EAEMVCED.js.map → landing-RKO3LUST.js.map} +0 -0
  760. /package/dist/{languages-LNHWSCMT.js.map → languages-GGNN7FEK.js.map} +0 -0
  761. /package/dist/{leads-MITJNZWB.js.map → leads-OVYF2EKX.js.map} +0 -0
  762. /package/dist/{learn-VLUC2TXW.js.map → learn-UWJ24ZD5.js.map} +0 -0
  763. /package/dist/{line-item-writes-HLQYQ4KG.js.map → line-item-writes-46K4NKPJ.js.map} +0 -0
  764. /package/dist/{line-items-64KIKPCB.js.map → line-items-YRSGOQFS.js.map} +0 -0
  765. /package/dist/{link-NNSG5YQ4.js.map → link-XXRDZQFM.js.map} +0 -0
  766. /package/dist/{linkedin-JYN5LGP2.js.map → linkedin-W4OWO6QA.js.map} +0 -0
  767. /package/dist/{linkedin-person-OPCUWPLI.js.map → linkedin-person-SQTWLIN5.js.map} +0 -0
  768. /package/dist/{list-7S4KTZNU.js.map → list-E6WPSAQK.js.map} +0 -0
  769. /package/dist/{list-5U4Z3PWU.js.map → list-S34STWB3.js.map} +0 -0
  770. /package/dist/{list-VQQICPK3.js.map → list-XERZMEWU.js.map} +0 -0
  771. /package/dist/{locations-64JNCQID.js.map → locations-7RYEWKJO.js.map} +0 -0
  772. /package/dist/{locations-KVAAO7LD.js.map → locations-BU4ZGWAS.js.map} +0 -0
  773. /package/dist/{log-63ZVYC6L.js.map → log-CDN4H2JY.js.map} +0 -0
  774. /package/dist/{make-7ITIZUJI.js.map → make-JE7V2RWR.js.map} +0 -0
  775. /package/dist/{map-MTR4V7KE.js.map → map-SPSJ532D.js.map} +0 -0
  776. /package/dist/{mcp-HKMQLXBC.js.map → mcp-PBPHIS4Q.js.map} +0 -0
  777. /package/dist/{media-sources-ZBSBTB4C.js.map → media-sources-MZL4XML4.js.map} +0 -0
  778. /package/dist/{members-MTRJ3ZRS.js.map → members-RDNSONMW.js.map} +0 -0
  779. /package/dist/{metrics-MXGA3EFS.js.map → metrics-Z75Q2FHP.js.map} +0 -0
  780. /package/dist/{models-Z6SUHWKI.js.map → models-X2IXXAD6.js.map} +0 -0
  781. /package/dist/{normalize-SAKXSFEX.js.map → normalize-4KL73UBE.js.map} +0 -0
  782. /package/dist/{options-L7B3SDIX.js.map → options-7MN5WH3J.js.map} +0 -0
  783. /package/dist/{organization-FFRNHVC5.js.map → organization-NJT4G355.js.map} +0 -0
  784. /package/dist/{performance-F72KFQU5.js.map → performance-PG5T4D7M.js.map} +0 -0
  785. /package/dist/{performance-AJA7YGOO.js.map → performance-SB2KLMTO.js.map} +0 -0
  786. /package/dist/{pixels-H642RPK4.js.map → pixels-DBSPNHIE.js.map} +0 -0
  787. /package/dist/{promoted-tweet-writes-32RAOXQR.js.map → promoted-tweet-writes-PCWFF2EG.js.map} +0 -0
  788. /package/dist/{promoted-tweets-KMLFRWDN.js.map → promoted-tweets-ZSXREC4V.js.map} +0 -0
  789. /package/dist/{publish-FOSPQ2BE.js.map → publish-FIYZNQYO.js.map} +0 -0
  790. /package/dist/{query-FT2BA3WH.js.map → query-NMQKS4MY.js.map} +0 -0
  791. /package/dist/{reddit-5PYYZNBJ.js.map → reddit-7WRZ5B3I.js.map} +0 -0
  792. /package/dist/{refresh-AOHTPXU4.js.map → refresh-IKHSUY3E.js.map} +0 -0
  793. /package/dist/{release-G2UKFAQY.js.map → release-JCKOGRTY.js.map} +0 -0
  794. /package/dist/{relevant-pages-OCHLUV5K.js.map → relevant-pages-JRIDJL4L.js.map} +0 -0
  795. /package/dist/{remove-K5C2URJE.js.map → remove-KE63VJ3M.js.map} +0 -0
  796. /package/dist/{reopen-PWROABUC.js.map → reopen-4YSAVTOS.js.map} +0 -0
  797. /package/dist/{rerun-CVJYCCNK.js.map → rerun-K5SQ6GAQ.js.map} +0 -0
  798. /package/dist/{research-KLWC3JBI.js.map → research-OFHOHRFD.js.map} +0 -0
  799. /package/dist/{research-Z3OJXOS4.js.map → research-ORXD6AV4.js.map} +0 -0
  800. /package/dist/{reset-GPO4MCSM.js.map → reset-4CLSOD77.js.map} +0 -0
  801. /package/dist/{reset-3QL7IOHF.js.map → reset-BN4FDUZB.js.map} +0 -0
  802. /package/dist/{resolve-7SW7FZ7Q.js.map → resolve-F6QVMQGX.js.map} +0 -0
  803. /package/dist/{retry-NVMOGTZD.js.map → retry-JGAJF6CN.js.map} +0 -0
  804. /package/dist/{retry-HNCUDQ7S.js.map → retry-NJUIX2QT.js.map} +0 -0
  805. /package/dist/{revenue-HDJFYUEB.js.map → revenue-BYGHXTYJ.js.map} +0 -0
  806. /package/dist/{rules-RYHWD4HA.js.map → rules-MWTPVJTK.js.map} +0 -0
  807. /package/dist/{rules-add-EMDFBYDA.js.map → rules-add-3MJRAYXB.js.map} +0 -0
  808. /package/dist/{run-2XRDPVHX.js.map → run-CXD7RKYN.js.map} +0 -0
  809. /package/dist/{run-PXHQKRY5.js.map → run-NDJSLZNE.js.map} +0 -0
  810. /package/dist/{scaffold-ad-RJAXMKOX.js.map → scaffold-ad-2N7H7ACP.js.map} +0 -0
  811. /package/dist/{scaffold-static-ad-4HLSHPJI.js.map → scaffold-static-ad-R7T766AD.js.map} +0 -0
  812. /package/dist/{scaffold-video-UH6OOIQW.js.map → scaffold-video-22HVSFRR.js.map} +0 -0
  813. /package/dist/{schedule-WT22OEBF.js.map → schedule-ZEREUVXT.js.map} +0 -0
  814. /package/dist/{scheduled-agents-BLIDNRFX.js.map → scheduled-agents-5URJWW2E.js.map} +0 -0
  815. /package/dist/{schema-FUCZHUNV.js.map → schema-NQ7DXUHX.js.map} +0 -0
  816. /package/dist/{schema-NSXMRNWM.js.map → schema-U6GAKTQZ.js.map} +0 -0
  817. /package/dist/{search-S5O3L4KX.js.map → search-T5JFYDCZ.js.map} +0 -0
  818. /package/dist/{select-ISIQXRPF.js.map → select-SDFGLXMV.js.map} +0 -0
  819. /package/dist/{set-prompt-MAQN5CYY.js.map → set-prompt-JI5W6VPR.js.map} +0 -0
  820. /package/dist/{setup-links-HANLAGD2.js.map → setup-links-TOL7BFBE.js.map} +0 -0
  821. /package/dist/{shopify-PKWH7WXV.js.map → shopify-QXOGNIVU.js.map} +0 -0
  822. /package/dist/{site-GADKB2RP.js.map → site-NJDIUQY6.js.map} +0 -0
  823. /package/dist/{sources-HUXVRGDH.js.map → sources-EMUT5MV7.js.map} +0 -0
  824. /package/dist/{sources-CA7JLF4P.js.map → sources-M4IJL4H7.js.map} +0 -0
  825. /package/dist/{stale-2A33KEE7.js.map → stale-YYJNWLIE.js.map} +0 -0
  826. /package/dist/{status-5JTRE3OM.js.map → status-UZJGIDRI.js.map} +0 -0
  827. /package/dist/{studio-6ZXUKA4G.js.map → studio-OV2ZY5W3.js.map} +0 -0
  828. /package/dist/{sync-RJFMKM6D.js.map → sync-T3E7SP7B.js.map} +0 -0
  829. /package/dist/{sync-definition-AKZUCLEV.js.map → sync-definition-TLY4FQKC.js.map} +0 -0
  830. /package/dist/{tags-WJFCPOP7.js.map → tags-DPI3CAPB.js.map} +0 -0
  831. /package/dist/{tags-LP6I7GY4.js.map → tags-DS3W4EDB.js.map} +0 -0
  832. /package/dist/{tags-JUIKSERD.js.map → tags-HSUBVXPJ.js.map} +0 -0
  833. /package/dist/{tags-UHD43CAG.js.map → tags-WP7W57FY.js.map} +0 -0
  834. /package/dist/{tags-B2EXVMNS.js.map → tags-WWZFKW3Y.js.map} +0 -0
  835. /package/dist/{targeting-criteria-2LKBD5IH.js.map → targeting-criteria-PICDCHEV.js.map} +0 -0
  836. /package/dist/{targets-O5JYFOCY.js.map → targets-WOMHJXY7.js.map} +0 -0
  837. /package/dist/{testimonials-P63TKNJ2.js.map → testimonials-LDL66SSG.js.map} +0 -0
  838. /package/dist/{themes-R3A6IVQN.js.map → themes-RRLYZ46U.js.map} +0 -0
  839. /package/dist/{top-companies-F7DUMWXA.js.map → top-companies-RBRWAW27.js.map} +0 -0
  840. /package/dist/{transcript-4RFSQA5U.js.map → transcript-V6LZKOKQ.js.map} +0 -0
  841. /package/dist/{translate-WOJFJRAC.js.map → translate-53TPL46A.js.map} +0 -0
  842. /package/dist/{triggers-4MHFN3VV.js.map → triggers-DDV73LZ4.js.map} +0 -0
  843. /package/dist/{unlink-5AXBQOIL.js.map → unlink-PLS3GA5V.js.map} +0 -0
  844. /package/dist/{unstage-SIBXT25Y.js.map → unstage-GSWMVEVP.js.map} +0 -0
  845. /package/dist/{update-NNEMJQ4D.js.map → update-CIMCN33A.js.map} +0 -0
  846. /package/dist/{update-4BDOO53L.js.map → update-KK7QO2KE.js.map} +0 -0
  847. /package/dist/{update-O76YSKXB.js.map → update-X2H3GZ4I.js.map} +0 -0
  848. /package/dist/{update-YS4QI2KP.js.map → update-XNV6KHYK.js.map} +0 -0
  849. /package/dist/{upload-XVV3HQ5W.js.map → upload-OL2S2OSA.js.map} +0 -0
  850. /package/dist/{url-options-YZ6UG3NY.js.map → url-options-2TQCGD2W.js.map} +0 -0
  851. /package/dist/{url-params-XL5URMTG.js.map → url-params-QNSGNQ6N.js.map} +0 -0
  852. /package/dist/{validate-42Q7X2KK.js.map → validate-KC3UA552.js.map} +0 -0
  853. /package/dist/{videos-HMKEY5WY.js.map → videos-GBD36TD2.js.map} +0 -0
  854. /package/dist/{viewer-check-4XFEWEH3.js.map → viewer-check-LQUD2OYO.js.map} +0 -0
  855. /package/dist/{web-PYG3AOYS.js.map → web-K3L2BKAH.js.map} +0 -0
  856. /package/dist/{winning-ads-74BKOBVN.js.map → winning-ads-X3VYALHK.js.map} +0 -0
  857. /package/dist/{write-commands-43GTQIR6.js.map → write-commands-XUOCRBME.js.map} +0 -0
  858. /package/dist/{x-6WSV55RN.js.map → x-65WPQWOP.js.map} +0 -0
@@ -0,0 +1,1919 @@
1
+ import {
2
+ REFERENCE_SHEET_MODEL
3
+ } from "./chunk-F3CZFUXZ.js";
4
+ import {
5
+ askJev
6
+ } from "./chunk-JF2XP76K.js";
7
+
8
+ // src/engine/scaffold/lib/elements.ts
9
+ var ACTOR_SHEET_MODEL = REFERENCE_SHEET_MODEL;
10
+ function sanitizeId(raw, fallback) {
11
+ const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
12
+ return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
13
+ }
14
+ function assignElementLabels(elements, medium) {
15
+ if (medium === "static") return staticElementLabels(elements);
16
+ const used = /* @__PURE__ */ new Set();
17
+ return elements.map((el) => {
18
+ const raw = medium === "video" && el.type?.toLowerCase() === "logo" ? "BRAND_LOGO" : el.label ?? el.type ?? "ELEMENT";
19
+ const base = raw.toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "ELEMENT";
20
+ let label = base;
21
+ let n = 2;
22
+ while (used.has(label)) label = `${base}_${n++}`;
23
+ used.add(label);
24
+ return { el, label };
25
+ });
26
+ }
27
+ var STATIC_LABEL_PREFIX = {
28
+ person: "PERSON",
29
+ animal: "ANIMAL",
30
+ product: "PRODUCT",
31
+ badge: "BADGE"
32
+ };
33
+ function staticElementLabels(elements) {
34
+ const counts = /* @__PURE__ */ new Map();
35
+ return elements.map((el) => {
36
+ const type = el.type?.toLowerCase() ?? "";
37
+ const prefix = type === "logo" ? "LOGO" : STATIC_LABEL_PREFIX[type] ?? "PROP";
38
+ const n = (counts.get(prefix) ?? 0) + 1;
39
+ counts.set(prefix, n);
40
+ const label = prefix === "LOGO" ? n === 1 ? "LOGO" : `LOGO_${n}` : `${prefix}_${n}`;
41
+ return { el, label };
42
+ });
43
+ }
44
+ var REFERENCE_ROLES = {
45
+ video: {
46
+ byType: {
47
+ logo: "the brand wordmark/logo; reproduce it exactly, do not redraw or restyle it.",
48
+ badge: "a trust/rating badge; reproduce it exactly, do not invent ratings or seals.",
49
+ product: "the showcased product; keep this exact product identity consistent across every frame. Ignore any caption text printed on this reference.",
50
+ person: "a recurring cast member; render the SAME individual as this reference image and keep them consistent across EVERY frame \u2014 their appearance comes from this reference, never from prose. Ignore any caption text printed on this reference.",
51
+ animal: "a recurring cast member; render the SAME individual as this reference image and keep them consistent across EVERY frame \u2014 their appearance comes from this reference, never from prose. Ignore any caption text printed on this reference.",
52
+ location: "the fixed set/location; keep the room, background, and layout identical to this reference across EVERY frame \u2014 do not re-invent the environment. Ignore any caption text printed on this reference."
53
+ },
54
+ fallback: "a recurring identity element; reproduce it faithfully and keep it consistent across every frame. Ignore any caption text printed on it."
55
+ },
56
+ static: {
57
+ byType: {
58
+ logo: "the brand wordmark/logo; reproduce it as closely as possible, do not redraw or restyle it.",
59
+ badge: "a trust/rating badge; reproduce it exactly, do not invent ratings or seals.",
60
+ product: "the showcased product; keep this exact product identity. Ignore any caption text printed on this reference.",
61
+ person: "the emotional hero \u2014 the brand's cast person: a company Avatar's identity sheet, a multi-view turnaround of ONE person the brand may show. Keep this exact face, hair and build, and render them once in the pose, gaze, wardrobe and expression the blueprint specifies \u2014 never as a grid. Ignore the cell labels printed on the sheet.",
62
+ animal: "the emotional hero \u2014 the face/muzzle/eyes the viewer locks onto and exactly where AI artifacts (malformed mouths, teeth, foam, extra fingers) betray a fake. It MUST be grounded in this real reference, never invented from prose. Keep this identity AND the expression the blueprint specifies. Ignore any caption text printed on this reference."
63
+ },
64
+ fallback: "an identity-bearing element; reproduce it faithfully from this reference. Ignore any caption text printed on it."
65
+ }
66
+ };
67
+ function referenceRole(type, medium) {
68
+ const roles = REFERENCE_ROLES[medium];
69
+ return roles.byType[type.toLowerCase()] ?? roles.fallback;
70
+ }
71
+ function elementTodo(el, label, medium) {
72
+ const desc = el.description ? ` \u2014 ${el.description}` : "";
73
+ const expr = el.expression ? `, with a ${el.expression} expression` : "";
74
+ const t = el.type.toLowerCase();
75
+ return medium === "video" ? videoElementTodo(el, t, label, `${desc}${expr}`) : staticElementTodo(el, t, label, `${desc}${expr}`);
76
+ }
77
+ function videoElementTodo(el, t, label, brief) {
78
+ const fresh = t === "animal" || t === "location" ? " [SOURCE FRESH \u2014 a DIFFERENT animal/set than the original ad; do not reuse the source's]" : "";
79
+ const same = el.same_as ? ` [SAME INDIVIDUAL as ${el.same_as} \u2014 a different wardrobe/look of the same person; reuse that cast person, change only the outfit]` : "";
80
+ if (t === "person") {
81
+ return `[TODO: cast a company Avatar as ${label} (person)${brief}${same} \u2014 re-run scaffold-video with \`--avatar <handle>\` (\`baker avatars list\`; \`baker avatars create\` invents a new face). NEVER a photo of a real person found on the web or taken from the source ad: the image model reproduces that face]`;
82
+ }
83
+ return `[TODO: drop one real source image for ${label} (${el.type})${brief} \u2014 reused across every frame it appears in${fresh}${same}; use a path relative to this canvas file, never an absolute path]`;
84
+ }
85
+ function staticElementTodo(el, t, label, brief) {
86
+ if (t === "person") {
87
+ return `[TODO: cast a company Avatar as ${label} (person)${brief} \u2014 REQUIRED: this is the emotional hero and the render keeps this face, so re-run scaffold-static-ad with \`--avatar <handle>\` (\`baker avatars list\`; \`baker avatars create\` invents a new face); never a found photo of a real person (web search, the source ad), who never agreed to appear in this ad]`;
88
+ }
89
+ const lock = t === "animal" ? " \u2014 REQUIRED: this is the emotional hero; ground it in a real reference (image-library / video-library / Pinterest), do not delete this slot and free-generate" : "";
90
+ return `[TODO: drop a real image for ${label} (${el.type})${brief}${lock} \u2014 replace with a path relative to this canvas file, never an absolute path]`;
91
+ }
92
+
93
+ // src/engine/scaffold/review-platforms.ts
94
+ var REVIEW_PLATFORMS = [
95
+ { name: "Trustpilot", domain: "trustpilot.com", pattern: /\btrust ?pilot\b/i, reviewOnly: true },
96
+ { name: "G2", domain: "g2.com", pattern: /\bG2\b/, reviewOnly: true },
97
+ { name: "Capterra", domain: "capterra.com", pattern: /\bcapterra\b/i, reviewOnly: true },
98
+ { name: "Tripadvisor", domain: "tripadvisor.com", pattern: /\btrip ?advisor\b/i, reviewOnly: true },
99
+ { name: "Yelp", domain: "yelp.com", pattern: /\byelp\b/i, reviewOnly: true },
100
+ { name: "Feefo", domain: "feefo.com", pattern: /\bfeefo\b/i, reviewOnly: true },
101
+ // Before Google: the first match names the platform.
102
+ { name: "Google Play", domain: "play.google.com", pattern: /\bgoogle play\b/i, reviewOnly: false },
103
+ { name: "Google", domain: "google.com", pattern: /\bgoogle\b/i, reviewOnly: false },
104
+ { name: "the App Store", domain: "apple.com", pattern: /\bapp ?store\b/i, reviewOnly: false }
105
+ ];
106
+ var RATING_SIGN = /[★☆⭐]|(?<![\d.,])[1-5](?:[.,]\d)?\s*\/\s*5(?![\d.,]\d)/u;
107
+ function namedPlatform(text) {
108
+ return REVIEW_PLATFORMS.find((p) => p.pattern.test(text)) ?? null;
109
+ }
110
+ function claimedPlatform(text) {
111
+ const platform = namedPlatform(text);
112
+ return platform && (platform.reviewOnly || RATING_SIGN.test(text)) ? platform : null;
113
+ }
114
+ var CITES_PLATFORM = 0.5;
115
+ var CITATION_QUESTION = "Does `line` cite `platform` as the source of a rating or of customers' reviews (stars, a score, reviews or opinions on it), in whatever language it is written? Only naming the platform (download it on, find us on, search on, sign in with) is not citing it for reviews.";
116
+ function jevCitationJudge(onSpend) {
117
+ return (items) => askJev(
118
+ items.map((i) => ({ instructions: { line: i.line, platform: i.platform, question: CITATION_QUESTION } })),
119
+ onSpend
120
+ );
121
+ }
122
+ async function citedPlatforms(lines, judge = jevCitationJudge()) {
123
+ const cited = /* @__PURE__ */ new Map();
124
+ const asked = [];
125
+ for (const line of new Set(lines)) {
126
+ const shown = claimedPlatform(line);
127
+ const platform = namedPlatform(line);
128
+ if (shown) cited.set(line, shown);
129
+ else if (platform) asked.push({ line, platform });
130
+ }
131
+ if (asked.length === 0) return cited;
132
+ const judged = await judge(asked.map((a) => ({ line: a.line, platform: a.platform.name }))).catch(() => null);
133
+ asked.forEach((a, k) => {
134
+ if ((judged?.[k] ?? 0) >= CITES_PLATFORM) cited.set(a.line, a.platform);
135
+ });
136
+ return cited;
137
+ }
138
+ function citedBy(line, cited) {
139
+ return cited ? cited.get(line) ?? null : claimedPlatform(line);
140
+ }
141
+ function figureForms(figure) {
142
+ const forms = [figure, figure.replace(/,/g, "."), figure.replace(/\./g, ",")];
143
+ if (/^\d{1,3}(?:[.,]\d{3})+$/.test(figure)) forms.push(figure.replace(/[.,]/g, ""));
144
+ if (/^\d{4,}$/.test(figure)) {
145
+ const grouped = (separator) => figure.replace(/\B(?=(\d{3})+$)/g, separator);
146
+ forms.push(grouped(","), grouped("."), grouped(" "), grouped("\xA0"), grouped("\u202F"));
147
+ }
148
+ return [...new Set(forms)];
149
+ }
150
+
151
+ // src/engine/scaffold/static-copy.ts
152
+ import { z } from "zod";
153
+ var COPY_DIRECTIVE_HEADER = "TEXT \u2014 RENDER THE COPY EXACTLY:";
154
+ var normalize = (s) => typeof s === "string" ? s.trim().toLowerCase() : "";
155
+ function textEntries(blueprint) {
156
+ const entries2 = blueprint?.text_content;
157
+ return Array.isArray(entries2) ? entries2 : [];
158
+ }
159
+ function copyStrings(blueprint) {
160
+ const seen = /* @__PURE__ */ new Set();
161
+ const out = [];
162
+ for (const entry of textEntries(blueprint)) {
163
+ if (normalize(entry?.role) === "logo") continue;
164
+ const text = typeof entry?.text === "string" ? entry.text.trim() : "";
165
+ if (!text || seen.has(text)) continue;
166
+ seen.add(text);
167
+ out.push(text);
168
+ }
169
+ return out;
170
+ }
171
+ var IN_SCENE_ROLES = /* @__PURE__ */ new Set(["in_scene", "scene", "ui", "screen", "screenshot", "packaging", "signage", "sign"]);
172
+ var IN_SCENE_PLACEMENT = /\b(phone|screen|screenshot|app|packaging|package|bottle|jar|signage|signboard|handwritten|receipt|whiteboard|sticky note|notepad)\b/;
173
+ function isInScene(entry) {
174
+ const surface = normalize(entry.surface);
175
+ if (surface === "in_scene") return true;
176
+ if (surface === "overlay") return false;
177
+ return IN_SCENE_ROLES.has(normalize(entry.role)) || IN_SCENE_PLACEMENT.test(normalize(entry.placement));
178
+ }
179
+ function inSceneText(blueprint) {
180
+ const seen = /* @__PURE__ */ new Set();
181
+ return textEntries(blueprint).flatMap((entry) => {
182
+ const text = typeof entry?.text === "string" ? entry.text.trim() : "";
183
+ if (!text || normalize(entry.role) === "logo" || !isInScene(entry) || seen.has(text)) return [];
184
+ seen.add(text);
185
+ return [{ text, placement: typeof entry.placement === "string" ? entry.placement.trim() : "" }];
186
+ });
187
+ }
188
+ function conceptHasLogo(blueprint) {
189
+ const logos = blueprint?.brands_logos;
190
+ return Array.isArray(logos) && logos.some(
191
+ (l) => normalize(l?.function_in_image) === "advertiser_brand"
192
+ );
193
+ }
194
+ var WinningMechanismSchema = z.object({ kind: z.string(), device: z.string(), why_it_works: z.string().optional() }).loose();
195
+ function winningMechanisms(blueprint) {
196
+ const raw = blueprint?.winning_mechanisms;
197
+ if (!Array.isArray(raw)) return [];
198
+ return raw.flatMap((entry) => {
199
+ const parsed = WinningMechanismSchema.safeParse(entry);
200
+ return parsed.success ? [parsed.data] : [];
201
+ });
202
+ }
203
+ function specimenText(strings) {
204
+ return strings.length > 0 ? strings.join("\n") : "Brand Headline";
205
+ }
206
+ function textFidelityDirective(strings, hasFont) {
207
+ const specimen = hasFont ? " in the specimen's typeface," : "";
208
+ const exact = strings.length > 0 ? `Render these exact strings${specimen} each once, verbatim, with no extra, missing, or altered characters: ${strings.map((s) => `"${s}"`).join(" / ")}.` : "This ad has no copy: render no words at all.";
209
+ return [
210
+ exact,
211
+ "Render NO other words anywhere in the image \u2014 no invented labels, captions, sub-headers, or filler text.",
212
+ "Any bill, quote, receipt, screen or price tag in the scene shows no readable prices or amounts beyond these strings: its figures are blurred or out of focus.",
213
+ "For any brand name or uncommon word, lock its letters exactly as written (spell it out letter-by-letter if that helps the characters render correctly).",
214
+ "Keep all type crisp, legible, and large enough to read cleanly; no garbled, warped, or duplicated characters, and no unreadable microtext."
215
+ ].join("\n");
216
+ }
217
+ function replaceCopyDirective(prompt, directive) {
218
+ const start = prompt.indexOf(COPY_DIRECTIVE_HEADER);
219
+ if (start === -1) return prompt;
220
+ const bodyStart = start + COPY_DIRECTIVE_HEADER.length;
221
+ const end = prompt.indexOf("\n\n", bodyStart);
222
+ const tail = end === -1 ? "" : prompt.slice(end);
223
+ return `${prompt.slice(0, bodyStart)}
224
+ ${directive}${tail}`;
225
+ }
226
+
227
+ // src/engine/scaffold/static-ad-spec.ts
228
+ import { z as z3 } from "zod";
229
+
230
+ // src/engine/scaffold/native-surface.ts
231
+ import { z as z2 } from "zod";
232
+ var Hex = z2.string().regex(/^#[0-9a-fA-F]{6}$/, "a colour is a 6-digit hex like #123551").transform((h) => h.toLowerCase());
233
+ var PhotoId = z2.string().regex(/^PHOTO_\d+$/, "a photo id is PHOTO_1, PHOTO_2\u2026");
234
+ var Author = z2.object({
235
+ name: z2.string().trim().min(1),
236
+ /** Their handle with the @, as the platform prints it: a real one of ours, never an invented one. */
237
+ handle: z2.string().trim().min(2).optional(),
238
+ avatar: z2.union([z2.literal("logo"), z2.literal("initials"), PhotoId]).default("initials"),
239
+ verified: z2.boolean().optional(),
240
+ /** A line under the name: a review site's "3 reviews · ES", a chat's "online". */
241
+ subtitle: z2.string().trim().min(1).optional()
242
+ }).strict();
243
+ var Photo = z2.object({
244
+ id: PhotoId,
245
+ /** What the photo shows, in plain words: who, doing what, where. */
246
+ what: z2.string().trim().min(1),
247
+ /** Its shape on the screen. */
248
+ ratio: z2.enum(["1:1", "4:3", "3:4", "16:9", "4:5"]).default("4:3"),
249
+ look: z2.enum(["photo", "illustration"]).default("photo"),
250
+ /**
251
+ * A picture of ours (a path from the creative's folder, or a URL): used as it is, nothing
252
+ * rendered. There is no `avatar`: nothing grounds a rendered photo on an avatar's sheet, so a
253
+ * photo naming one would still render a made-up face (the strict schema refuses the key).
254
+ */
255
+ image: z2.string().trim().min(1).optional()
256
+ }).strict();
257
+ var XPost = z2.object({
258
+ author: Author,
259
+ text: z2.string().trim().min(1),
260
+ photo: PhotoId.optional(),
261
+ /** The handle this post answers, printed above it as X does ("Replying to @alexbuilds"). */
262
+ reply_to: z2.string().trim().min(2).optional(),
263
+ /** How long ago, as X prints it: 2h, 14m, Sep 3. */
264
+ time: z2.string().trim().min(1).optional(),
265
+ stats: z2.object({
266
+ replies: z2.string().optional(),
267
+ reposts: z2.string().optional(),
268
+ likes: z2.string().optional(),
269
+ views: z2.string().optional()
270
+ }).strict().optional()
271
+ }).strict();
272
+ var ChatCard = z2.object({
273
+ photo: PhotoId.optional(),
274
+ title: z2.string().trim().min(1),
275
+ subtitle: z2.string().trim().min(1).optional(),
276
+ /** The card's button, as the chat prints it ("Pagar $899 MXN"). */
277
+ button: z2.string().trim().min(1).optional()
278
+ }).strict();
279
+ var ChatMessage = z2.object({
280
+ /** `them` is the other side of the chat (the contact in the header), `me` the phone's owner. */
281
+ from: z2.enum(["them", "me"]),
282
+ text: z2.string().trim().min(1).optional(),
283
+ time: z2.string().trim().min(1).optional(),
284
+ card: ChatCard.optional()
285
+ }).strict().refine((m) => m.text || m.card, "a message has text or a card");
286
+ var Review = z2.object({
287
+ author: Author,
288
+ stars: z2.number().int().min(1).max(5).default(5),
289
+ title: z2.string().trim().min(1).optional(),
290
+ text: z2.string().trim().min(1),
291
+ date: z2.string().trim().min(1).optional()
292
+ }).strict();
293
+ var NotesItem = z2.object({ text: z2.string().trim().min(1), checked: z2.boolean().default(false) }).strict();
294
+ var SlackMessage = z2.object({
295
+ author: Author,
296
+ text: z2.string().trim().min(1),
297
+ time: z2.string().trim().min(1).optional(),
298
+ reactions: z2.array(z2.object({ emoji: z2.string().trim().min(1), count: z2.number().int().min(1) }).strict()).default([]),
299
+ /** "3 replies" under the message. */
300
+ replies: z2.string().trim().min(1).optional()
301
+ }).strict();
302
+ var Frame = z2.object({
303
+ headline: z2.string().trim().min(1).optional(),
304
+ caption: z2.string().trim().min(1).optional(),
305
+ logo: z2.boolean().default(false),
306
+ /** Where the frame's logo goes: under the screen, or over it as a badge (a review wall's anchor). */
307
+ logo_position: z2.enum(["under", "over"]).default("under"),
308
+ background: Hex.optional()
309
+ }).strict().default({ logo: false, logo_position: "under" });
310
+ var Base = { photos: z2.array(Photo).default([]), frame: Frame };
311
+ var NativeSurfaceSchema = z2.discriminatedUnion("surface", [
312
+ z2.object({
313
+ surface: z2.literal("x_post"),
314
+ theme: z2.enum(["light", "dark"]).default("light"),
315
+ /** One post, or a thread: each after the first a reply under it, its line joining them. */
316
+ posts: z2.array(XPost).min(1).max(4),
317
+ ...Base
318
+ }).strict(),
319
+ z2.object({
320
+ surface: z2.enum(["whatsapp", "imessage"]),
321
+ /** Who the chat is with: the header's name and picture. */
322
+ contact: Author,
323
+ messages: z2.array(ChatMessage).min(1).max(8),
324
+ /** The day pill above the messages ("Hoy", "Today"). */
325
+ day: z2.string().trim().min(1).optional(),
326
+ /** Drawn inside a phone; else the screen alone. Default true. */
327
+ device: z2.boolean().default(true),
328
+ ...Base
329
+ }).strict(),
330
+ z2.object({
331
+ surface: z2.enum(["trustpilot", "google_reviews"]),
332
+ /** The rating the platform shows for the company: a real one, in `src/content`. */
333
+ summary: z2.object({ score: z2.string().trim().min(1), count: z2.string().trim().min(1), label: z2.string().optional() }).strict().optional(),
334
+ /**
335
+ * Every real review the wall shows, the strongest first: the first two are read as the ad's
336
+ * copy, whole in the safe area; the rest are the wall they lie on, as large and as sharp, across
337
+ * the whole frame and cut by its edges. A wall wins on how many there are (8 to 16), each one a
338
+ * real review in the company's own words.
339
+ */
340
+ reviews: z2.array(Review).min(1).max(16),
341
+ ...Base
342
+ }).strict(),
343
+ z2.object({
344
+ surface: z2.literal("notes"),
345
+ title: z2.string().trim().min(1),
346
+ items: z2.array(NotesItem).default([]),
347
+ body: z2.string().trim().min(1).optional(),
348
+ ...Base
349
+ }).strict(),
350
+ z2.object({
351
+ surface: z2.literal("slack"),
352
+ channel: z2.string().trim().min(1),
353
+ messages: z2.array(SlackMessage).min(1).max(6),
354
+ ...Base
355
+ }).strict()
356
+ ]);
357
+ var SURFACE_NAMES = {
358
+ x_post: "a post on X",
359
+ whatsapp: "a WhatsApp chat",
360
+ imessage: "an iMessage chat",
361
+ trustpilot: "a wall of Trustpilot reviews",
362
+ google_reviews: "a wall of Google reviews",
363
+ notes: "a note in the Notes app",
364
+ slack: "a Slack message"
365
+ };
366
+ function nativeSurfaceName(surface) {
367
+ return SURFACE_NAMES[surface.surface];
368
+ }
369
+ function nativeCopy(surface) {
370
+ const frame = [surface.frame.headline, surface.frame.caption];
371
+ const body = (() => {
372
+ switch (surface.surface) {
373
+ case "x_post":
374
+ return surface.posts.map((p) => p.text);
375
+ case "whatsapp":
376
+ case "imessage":
377
+ return surface.messages.flatMap((m) => [m.text, m.card?.title, m.card?.subtitle, m.card?.button]);
378
+ case "trustpilot":
379
+ case "google_reviews":
380
+ return surface.reviews.slice(0, FEATURED_REVIEWS).flatMap((r) => [r.title, shownReview(r.text)]);
381
+ case "notes":
382
+ return [surface.title, ...surface.items.map((i) => i.text), surface.body];
383
+ case "slack":
384
+ return surface.messages.map((m) => m.text);
385
+ default:
386
+ return [];
387
+ }
388
+ })();
389
+ return [frame[0], ...body, frame[1]].filter((t) => Boolean(t?.trim()));
390
+ }
391
+ var FEATURED_REVIEWS = 2;
392
+ var REVIEW_SHOWN = 160;
393
+ function shownReview(text) {
394
+ if (text.length <= REVIEW_SHOWN) return text;
395
+ const cut = text.slice(0, REVIEW_SHOWN - 1);
396
+ const atWord = cut.slice(0, Math.max(cut.lastIndexOf(" "), REVIEW_SHOWN / 2));
397
+ return `${atWord.replace(/[\s,.;:!?¡¿-]+$/u, "")}\u2026`;
398
+ }
399
+ function authorsOf(surface) {
400
+ switch (surface.surface) {
401
+ case "x_post":
402
+ return surface.posts.map((p) => p.author);
403
+ case "whatsapp":
404
+ case "imessage":
405
+ return [surface.contact];
406
+ case "trustpilot":
407
+ case "google_reviews":
408
+ return surface.reviews.map((r) => r.author);
409
+ case "slack":
410
+ return surface.messages.map((m) => m.author);
411
+ default:
412
+ return [];
413
+ }
414
+ }
415
+ function nativeChrome(surface, language, words) {
416
+ const t = chromeWords(language, words);
417
+ const handleParts = (h) => h ? [h, h.replace(/^@/, ""), ...h.replace(/^@/, "").split(/[_.]/)] : [];
418
+ const authors = authorsOf(surface).flatMap((a) => [a.name, ...handleParts(a.handle), a.subtitle, initials(a.name)]);
419
+ const own = (() => {
420
+ switch (surface.surface) {
421
+ case "x_post":
422
+ return surface.posts.flatMap((p) => [
423
+ p.time,
424
+ ...Object.values(p.stats ?? {}),
425
+ ...p.reply_to ? [t.replying, ...handleParts(p.reply_to)] : []
426
+ ]);
427
+ case "whatsapp":
428
+ case "imessage":
429
+ return [surface.day ?? t.today, ...surface.messages.map((m) => m.time), t.online, t.business, t.message];
430
+ case "trustpilot":
431
+ case "google_reviews":
432
+ return [
433
+ ...surface.reviews.slice(FEATURED_REVIEWS).flatMap((r) => [r.title, shownReview(r.text)]),
434
+ ...surface.reviews.map((r) => r.date),
435
+ surface.summary?.score,
436
+ surface.summary?.count,
437
+ surface.summary?.label ?? t.excellent,
438
+ t.verified,
439
+ surface.surface === "trustpilot" ? "Trustpilot" : "Google",
440
+ t.reviewsWord
441
+ ];
442
+ case "notes":
443
+ return [t.notes];
444
+ case "slack":
445
+ return [
446
+ `#${surface.channel.replace(/^#/, "")}`,
447
+ ...surface.messages.flatMap((m) => [m.time, m.replies, ...m.reactions.map((r) => String(r.count))])
448
+ ];
449
+ default:
450
+ return [];
451
+ }
452
+ })();
453
+ const prompts = [t.post, t.replyPrompt, t.messagePrompt];
454
+ return [...new Set([...authors, ...own, ...prompts].filter((w) => Boolean(w?.trim())))];
455
+ }
456
+ function photoIdsNamed(surface) {
457
+ const avatars = authorsOf(surface).flatMap((a) => a.avatar.startsWith("PHOTO_") ? [a.avatar] : []);
458
+ const pictures = surface.surface === "x_post" ? surface.posts.map((p) => p.photo) : surface.surface === "whatsapp" || surface.surface === "imessage" ? surface.messages.map((m) => m.card?.photo) : [];
459
+ return [.../* @__PURE__ */ new Set([...avatars, ...pictures.filter((id) => Boolean(id))])];
460
+ }
461
+ function nativePhotosShown(surface) {
462
+ const named = new Set(photoIdsNamed(surface));
463
+ return surface.photos.filter((p) => named.has(p.id));
464
+ }
465
+ function avatarPhotoIds(surface) {
466
+ return new Set(authorsOf(surface).flatMap((a) => a.avatar.startsWith("PHOTO_") ? [a.avatar] : []));
467
+ }
468
+ function nativeProblems(surface) {
469
+ const described = new Set(surface.photos.map((p) => p.id));
470
+ return photoIdsNamed(surface).filter((id) => !described.has(id)).map(
471
+ (id) => `\`native\` shows ${id} but \`native.photos\` does not say what it is: add {"id":"${id}","what":"\u2026"}.`
472
+ );
473
+ }
474
+ function nativeGateProblems(surface, records, brandName) {
475
+ const problems = nativeProblems(surface);
476
+ const haystack = records.toLowerCase();
477
+ const ours = (a) => a.avatar === "logo" || brandName !== void 0 && a.name.trim().toLowerCase() === brandName.trim().toLowerCase();
478
+ for (const author of authorsOf(surface)) {
479
+ if (!author.handle || !ours(author)) continue;
480
+ const bare = author.handle.replace(/^@/, "").toLowerCase();
481
+ if (!haystack.includes(bare)) {
482
+ problems.push(
483
+ `The screen shows the brand as ${author.handle}, a handle COMPANY.md and src/content never state: use the brand's real handle, or drop \`handle\` (never an invented one).`
484
+ );
485
+ }
486
+ }
487
+ if ((surface.surface === "trustpilot" || surface.surface === "google_reviews") && surface.summary) {
488
+ if (!figureForms(surface.summary.score.toLowerCase()).some((form) => haystack.includes(form))) {
489
+ problems.push(
490
+ `The screen shows a ${surface.summary.score} rating the company's records (COMPANY.md, src/content) do not hold: add where it comes from, or drop \`summary\`.`
491
+ );
492
+ }
493
+ }
494
+ return problems;
495
+ }
496
+ var WORD_MEANINGS = {
497
+ today: "the day label over today's messages in a chat",
498
+ online: "the status under a chat contact's name",
499
+ business: "the label under a WhatsApp business contact's name",
500
+ message: "the placeholder in a chat's message bar",
501
+ verified: "the badge on a verified review",
502
+ excellent: "the word a review site prints beside a 4.5-5 star score",
503
+ reviewsWord: "the plural noun after the review count (1,200 reviews)",
504
+ notes: "the title of the phone's notes app",
505
+ experience: "the label before the date a reviewer had the experience",
506
+ replying: "the words before the handle a post on X replies to",
507
+ post: "the title over a thread on X",
508
+ replyPrompt: "the placeholder of the reply bar under a thread on X",
509
+ messagePrompt: "the placeholder of Slack's message bar, before the channel name"
510
+ };
511
+ var InterfaceWordsSchema = z2.object(
512
+ Object.fromEntries(Object.keys(WORD_MEANINGS).map((k) => [k, z2.string().trim().min(1)]))
513
+ );
514
+ var CHECKED = {
515
+ es: {
516
+ today: "Hoy",
517
+ online: "en l\xEDnea",
518
+ business: "Cuenta de empresa",
519
+ message: "Mensaje",
520
+ verified: "Verificada",
521
+ excellent: "Excelente",
522
+ reviewsWord: "opiniones",
523
+ notes: "Notas",
524
+ experience: "Fecha de la experiencia",
525
+ replying: "En respuesta a",
526
+ post: "Post",
527
+ replyPrompt: "Postea tu respuesta",
528
+ messagePrompt: "Enviar mensaje a"
529
+ },
530
+ pt: {
531
+ today: "Hoje",
532
+ online: "online",
533
+ business: "Conta comercial",
534
+ message: "Mensagem",
535
+ verified: "Verificada",
536
+ excellent: "Excelente",
537
+ reviewsWord: "avalia\xE7\xF5es",
538
+ notes: "Notas",
539
+ experience: "Data da experi\xEAncia",
540
+ replying: "Em resposta a",
541
+ post: "Post",
542
+ replyPrompt: "Poste sua resposta",
543
+ messagePrompt: "Enviar mensagem para"
544
+ },
545
+ en: {
546
+ today: "Today",
547
+ online: "online",
548
+ business: "Business account",
549
+ message: "Message",
550
+ verified: "Verified",
551
+ excellent: "Excellent",
552
+ reviewsWord: "reviews",
553
+ notes: "Notes",
554
+ experience: "Date of experience",
555
+ replying: "Replying to",
556
+ post: "Post",
557
+ replyPrompt: "Post your reply",
558
+ messagePrompt: "Message"
559
+ }
560
+ };
561
+ var primary = (language) => (language ?? "en").split(/[-_]/)[0]?.toLowerCase() ?? "en";
562
+ function needsInterfaceWords(language) {
563
+ return language !== void 0 && CHECKED[primary(language)] === void 0;
564
+ }
565
+ var INTERFACE_WORDS_PROMPT_VERSION = 1;
566
+ function interfaceWordsPrompt(language) {
567
+ const english = CHECKED.en;
568
+ return [
569
+ `These are the words WhatsApp, iMessage, X, Slack, Trustpilot, Google reviews and the phone's notes app print around what people write, in English. Give each as those apps print it in their interface for people whose language is ${language}: the apps' own wording, short, in that language's script and capitalisation.`,
570
+ "",
571
+ ...Object.entries(WORD_MEANINGS).map(
572
+ ([key, meaning]) => `- "${key}": ${JSON.stringify(english[key])} (${meaning})`
573
+ ),
574
+ "",
575
+ `Reply with only this JSON, every key above with its words: {${Object.keys(WORD_MEANINGS).map((k) => `"${k}": "\u2026"`).join(", ")}}`
576
+ ].join("\n");
577
+ }
578
+ function readInterfaceWords(answer) {
579
+ const parsed = InterfaceWordsSchema.safeParse(answer);
580
+ return parsed.success ? parsed.data : null;
581
+ }
582
+ function chromeWords(language, words) {
583
+ return CHECKED[primary(language)] ?? words ?? CHECKED.en;
584
+ }
585
+ function inked(assets, src, groundIsDark) {
586
+ return src && !groundIsDark && assets.lightLogos?.includes(src) ? " inked" : "";
587
+ }
588
+ function keepTogether(html) {
589
+ return html.replace(/\b([ap])\. m\./g, "$1.&nbsp;m.").replace(/(\d) (?=[ap]\.|%|€|\$|(?:semanas|weeks|días|days|min)\b)/g, "$1&nbsp;");
590
+ }
591
+ var esc = (text) => text.replace(/[&<>"]/g, (ch) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[ch]);
592
+ function linked(text) {
593
+ return esc(text).replace(/(^|[\s(])([#@][\p{L}\p{N}_]+|https?:\/\/\S+)/gu, '$1<span class="link">$2</span>');
594
+ }
595
+ function initials(name) {
596
+ const words = name.replace(/[^\p{L}\s]/gu, " ").split(/\s+/).filter(Boolean);
597
+ const first = words[0]?.[0] ?? "";
598
+ const second = words.length > 1 ? words[1]?.[0] ?? "" : "";
599
+ return `${first}${second}`.toUpperCase();
600
+ }
601
+ var INITIALS_TINTS = ["#f4d7c4", "#d6e4f5", "#dcecd7", "#f2dcef", "#f6e7b8", "#d9d6f2"];
602
+ function tintOf(name) {
603
+ let sum = 0;
604
+ for (const ch of name) sum += ch.codePointAt(0) ?? 0;
605
+ return INITIALS_TINTS[sum % INITIALS_TINTS.length];
606
+ }
607
+ function avatarHtml(author, assets, cls) {
608
+ if (author.avatar === "logo") {
609
+ const src = assets.mark ?? assets.logo;
610
+ if (src) return `<div class="${cls} logo-av"><img src="${src}" alt=""></div>`;
611
+ } else if (author.avatar !== "initials") {
612
+ const src = assets.photos[author.avatar];
613
+ if (src) return `<div class="${cls}"><img src="${src}" alt=""></div>`;
614
+ }
615
+ return `<div class="${cls} initials" style="background:${tintOf(author.name)}">${esc(initials(author.name))}</div>`;
616
+ }
617
+ var ICON = {
618
+ verifiedX: '<svg class="badge" viewBox="0 0 22 22"><path fill="#1d9bf0" d="M20.4 11c0-1.3-.8-2.4-1.9-2.9.4-1.2.1-2.6-.8-3.5s-2.3-1.2-3.5-.8C13.7 2.6 12.4 1.8 11 1.8s-2.6.8-3.1 2c-1.2-.4-2.6-.1-3.5.8s-1.2 2.3-.8 3.5C2.4 8.6 1.6 9.7 1.6 11s.8 2.4 1.9 2.9c-.4 1.2-.1 2.6.8 3.5s2.3 1.2 3.5.8c.5 1.2 1.8 2 3.2 2s2.6-.8 3.1-2c1.2.4 2.6.1 3.5-.8s1.2-2.3.8-3.5c1.2-.5 2-1.6 2-2.9z"/><path fill="#fff" d="M9.6 14.6 6.4 11.4l1.3-1.3 1.9 1.9 4.6-4.6 1.3 1.3z"/></svg>',
619
+ verifiedWa: '<svg class="badge" viewBox="0 0 22 22"><path fill="#25d366" d="M20.4 11c0-1.3-.8-2.4-1.9-2.9.4-1.2.1-2.6-.8-3.5s-2.3-1.2-3.5-.8C13.7 2.6 12.4 1.8 11 1.8s-2.6.8-3.1 2c-1.2-.4-2.6-.1-3.5.8s-1.2 2.3-.8 3.5C2.4 8.6 1.6 9.7 1.6 11s.8 2.4 1.9 2.9c-.4 1.2-.1 2.6.8 3.5s2.3 1.2 3.5.8c.5 1.2 1.8 2 3.2 2s2.6-.8 3.1-2c1.2.4 2.6.1 3.5-.8s1.2-2.3.8-3.5c1.2-.5 2-1.6 2-2.9z"/><path fill="#fff" d="M9.6 14.6 6.4 11.4l1.3-1.3 1.9 1.9 4.6-4.6 1.3 1.3z"/></svg>',
620
+ reply: '<svg viewBox="0 0 24 24"><path d="M1.8 10c0-4.4 3.6-8 8-8h4.4c4.5 0 8.1 3.6 8.1 8.1 0 3-1.6 5.6-4.2 7.1L10 21.7v-3.6H9.9C5.4 18.1 1.8 14.5 1.8 10zm8-6c-3.3 0-6 2.7-6 6 0 3.4 2.7 6.1 6.1 6.1H12v2.3l5.1-2.8c1.9-1.1 3.1-3.1 3.1-5.4 0-3.4-2.7-6.1-6.1-6.1H9.8z"/></svg>',
621
+ repost: '<svg viewBox="0 0 24 24"><path d="M4.5 3.9 8.9 8l-1.4 1.5-2-1.9V16c0 1.1.9 2 2 2H13v2H7.5c-2.2 0-4-1.8-4-4V7.6l-2 1.9L.1 8l4.4-4.1zM16.5 6H11V4h5.5c2.2 0 4 1.8 4 4v8.4l2-1.9 1.4 1.5-4.4 4.1-4.4-4.1 1.4-1.5 2 1.9V8c0-1.1-.9-2-2-2z"/></svg>',
622
+ like: '<svg viewBox="0 0 24 24"><path d="M16.7 5.5c-1.1-.1-2.6.4-3.9 2.3l-.8 1.2-.8-1.2C9.9 5.9 8.4 5.4 7.3 5.5c-1.2.1-2.2.8-2.8 1.9-1.1 2.2-.6 5.4 3.1 8.9 1.2 1.1 2.7 2.3 4.4 3.5 1.7-1.2 3.2-2.4 4.4-3.5 3.7-3.5 4.2-6.7 3.1-8.9-.6-1.1-1.6-1.8-2.8-1.9zM12 21.4c-1.9-1.3-3.7-2.7-5.1-4-4-3.8-5.1-7.6-3.6-10.8.9-1.8 2.6-2.9 4.5-3.1 1.6-.1 3.1.5 4.2 1.7 1.1-1.2 2.6-1.8 4.2-1.7 1.9.2 3.6 1.3 4.5 3.1 1.5 3.2.4 7-3.6 10.8-1.4 1.3-3.2 2.7-5.1 4z"/></svg>',
623
+ views: '<svg viewBox="0 0 24 24"><path d="M8.8 20H6.8V4h2v16zm5-14h-2v14h2V6zm5 4h-2v10h2V10zm-15 4h-2v6h2v-6z"/></svg>',
624
+ share: '<svg viewBox="0 0 24 24"><path d="M12 2.6 17.4 8 16 9.4l-3-3V16h-2V6.4l-3 3L6.6 8 12 2.6zM21 15l-.1 3.5c0 1.4-1.1 2.5-2.5 2.5H5.5C4.1 21 3 19.8 3 18.5V15h2v3.5c0 .3.2.5.5.5h12.9c.3 0 .5-.2.5-.5L19 15h2z"/></svg>',
625
+ ticks: '<svg class="ticks" viewBox="0 0 18 11"><path fill="#53bdeb" d="M12.1.6 5.3 7.4 2.4 4.5 1.3 5.6l4 4 7.9-7.9zM16.6.6 9.8 7.4l-.9-.9-1.1 1.1 2 2 7.9-7.9z"/></svg>',
626
+ back: '<svg class="back" viewBox="0 0 12 20"><path d="M10 2 2 10l8 8" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>',
627
+ video: '<svg viewBox="0 0 26 18"><rect x="1" y="2" width="16" height="14" rx="3.5" fill="none" stroke="currentColor" stroke-width="2"/><path d="m18 7 6-4v12l-6-4z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/></svg>',
628
+ phone: '<svg viewBox="0 0 22 22"><path d="M6.6 2.5 8.9 6c.4.6.3 1.3-.2 1.8L7.3 9.1c1.1 2.4 3.1 4.4 5.6 5.6l1.3-1.4c.5-.5 1.2-.6 1.8-.2l3.5 2.3c.6.4.8 1.2.5 1.8-.8 1.7-2.5 2.6-4.3 2.3C9.8 18.6 3.4 12.2 2.5 6.3c-.3-1.8.6-3.5 2.3-4.3.6-.3 1.4-.1 1.8.5z" fill="none" stroke="currentColor" stroke-width="1.8"/></svg>',
629
+ star: '<svg viewBox="0 0 24 24"><path fill="#fff" d="m12 3.6 2.5 5.9 6.3.5-4.8 4.1 1.5 6.2L12 17l-5.5 3.3L8 14.1 3.2 10l6.3-.5z"/></svg>',
630
+ check: '<svg viewBox="0 0 24 24"><path d="m6 12.5 4 4 8-9" fill="none" stroke="#fff" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>',
631
+ home: '<svg viewBox="0 0 24 24"><path d="M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
632
+ search: '<svg viewBox="0 0 24 24"><path d="M10.5 3a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15zM16 16l5 5" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
633
+ bell: '<svg viewBox="0 0 24 24"><path d="M6 17V11a6 6 0 0 1 12 0v6l1.5 2h-15zM10 21h4" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
634
+ mail: '<svg viewBox="0 0 24 24"><path d="M3 6h18v12H3zM3 6l9 7 9-7" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
635
+ tick: '<svg viewBox="0 0 24 24"><path d="m5 12.5 4.5 4.5L19 7.5" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
636
+ checklist: '<svg viewBox="0 0 24 24"><path d="M4 6h2M4 12h2M4 18h2M9 6h11M9 12h11M9 18h11" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
637
+ camera: '<svg viewBox="0 0 24 24"><path d="M3 8h4l2-3h6l2 3h4v11H3zM12 10a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7z" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
638
+ pen: '<svg viewBox="0 0 24 24"><path d="M4 20l4-1L19 8l-3-3L5 16zM14 7l3 3" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>',
639
+ compose: '<svg viewBox="0 0 24 24"><path d="M4 4h9M4 4v16h16v-9M20 4l-9 9-2 .5.5-2z" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>'
640
+ };
641
+ var STATUS_BAR = '<div class="status-bar"><span>9:41</span><span class="bars"><i></i><i></i><i></i><i></i></span></div>';
642
+ function xPosts(surface, assets, t) {
643
+ return surface.posts.map((post, i) => {
644
+ const last = i === surface.posts.length - 1;
645
+ const name = `<span class="name">${esc(post.author.name)}</span>${post.author.verified ? ICON.verifiedX : ""}`;
646
+ const meta = [post.author.handle, post.time].filter(Boolean).map((s) => esc(s));
647
+ const photo = post.photo && assets.photos[post.photo];
648
+ const ratio = surface.photos.find((p) => p.id === post.photo)?.ratio ?? "4:3";
649
+ const stats = post.stats ?? {};
650
+ const action = (icon, n) => `<span class="act">${icon}<span>${n ? esc(n) : ""}</span></span>`;
651
+ return `<article class="post${last ? "" : " threaded"}">
652
+ <div class="rail">${avatarHtml(post.author, assets, "av")}${last ? "" : '<div class="thread-line"></div>'}</div>
653
+ <div class="body">
654
+ <div class="head">${name}<span class="meta">${meta.join(" \xB7 ")}</span><span class="more">\xB7\xB7\xB7</span></div>
655
+ ${post.reply_to ? `<div class="replying">${esc(t.replying)} <span class="link">${esc(post.reply_to)}</span></div>` : ""}
656
+ <div class="text">${linked(post.text)}</div>
657
+ ${photo ? `<div class="media" style="aspect-ratio:${ratio.replace(":", "/")}"><img src="${photo}" alt=""></div>` : ""}
658
+ <div class="actions">${action(ICON.reply, stats.replies)}${action(ICON.repost, stats.reposts)}${action(ICON.like, stats.likes)}${action(ICON.views, stats.views)}${action(ICON.share)}</div>
659
+ </div>
660
+ </article>`;
661
+ }).join("");
662
+ }
663
+ function xParts(surface, assets, t) {
664
+ const tabs = [ICON.home, ICON.search, ICON.bell, ICON.mail].map((icon) => `<span>${icon}</span>`).join("");
665
+ return {
666
+ cls: `surface x ${surface.theme}`,
667
+ top: `${STATUS_BAR}<div class="x-head">${ICON.back}<span>${esc(t.post)}</span></div>`,
668
+ body: xPosts(surface, assets, t),
669
+ bottom: `<div class="x-reply"><span class="x-reply-av"></span><span>${esc(t.replyPrompt)}</span></div><div class="tabbar">${tabs}</div><div class="home-bar"></div>`,
670
+ align: "top"
671
+ };
672
+ }
673
+ function bubbleHtml(m, assets, wa) {
674
+ const photo = m.card?.photo ? assets.photos[m.card.photo] : void 0;
675
+ const sub2 = m.card?.subtitle ? `<div class="card-sub">${esc(m.card.subtitle)}</div>` : "";
676
+ const card = m.card ? `<div class="card">${photo ? `<img src="${photo}" alt="">` : ""}<div class="card-title">${esc(m.card.title)}</div>${sub2}</div>` : "";
677
+ const ticks = wa && m.from === "me" ? ICON.ticks : "";
678
+ const time = m.time ? `<span class="time">${esc(m.time)}${ticks}</span>` : "";
679
+ const text = m.text ? `<div class="msg-text">${linked(m.text)}${time}</div>` : time;
680
+ const button = m.card?.button ? `<div class="card-button">${esc(m.card.button)}</div>` : "";
681
+ const copy = [m.text, m.card?.title, m.card?.subtitle, m.card?.button].filter((t) => Boolean(t?.trim()));
682
+ return `<div class="bubble ${m.from}" data-copy="${esc(JSON.stringify(copy))}">${card}${text}${button}</div>`;
683
+ }
684
+ function chatHeader(contact, assets, t, wa, verified) {
685
+ if (!wa) {
686
+ return `<div class="im-head">${ICON.back}<div class="who">${avatarHtml(contact, assets, "av")}<div class="name">${esc(contact.name)}</div></div></div>`;
687
+ }
688
+ const status = contact.subtitle ?? (verified ? t.business : t.online);
689
+ const badge = verified ? ICON.verifiedWa : "";
690
+ return `<div class="wa-head">${ICON.back}${avatarHtml(contact, assets, "av")}<div class="who"><div class="name">${esc(contact.name)}${badge}</div><div class="status">${esc(status)}</div></div><div class="icons">${ICON.video}${ICON.phone}</div></div>`;
691
+ }
692
+ function chatParts(surface, assets, t) {
693
+ const wa = surface.surface === "whatsapp";
694
+ const bubbles = surface.messages.map((m) => bubbleHtml(m, assets, wa)).join("");
695
+ const input = wa ? '<div class="wa-input"><span class="plus">+</span><span class="field"></span><span class="mic"></span></div>' : '<div class="im-input"><span class="plus">+</span><span class="field"></span></div>';
696
+ return {
697
+ cls: `screen ${surface.surface}`,
698
+ top: `${STATUS_BAR}${chatHeader(surface.contact, assets, t, wa, surface.contact.verified === true)}`,
699
+ body: `<div class="messages"><div class="day">${esc(surface.day ?? t.today)}</div>${bubbles}</div>`,
700
+ bottom: input,
701
+ align: "bottom"
702
+ };
703
+ }
704
+ function chatHtml(surface, assets, t) {
705
+ const parts = chatParts(surface, assets, t);
706
+ const screen = `<div class="${parts.cls}">${parts.top}${parts.body}${parts.bottom}</div>`;
707
+ return `<div class="surface chat${surface.device ? " device" : ""}">${screen}</div>`;
708
+ }
709
+ function starsHtml(kind, stars, size = "s") {
710
+ if (kind === "google_reviews") {
711
+ return `<span class="g-stars ${size}">${"\u2605".repeat(stars)}<span class="off">${"\u2605".repeat(5 - stars)}</span></span>`;
712
+ }
713
+ const cells = Array.from(
714
+ { length: 5 },
715
+ (_, i) => `<span class="tp-star${i < stars ? "" : " off"}">${ICON.star}</span>`
716
+ );
717
+ return `<span class="tp-stars ${size}">${cells.join("")}</span>`;
718
+ }
719
+ function reviewCard(r, kind, assets, t, cls, style) {
720
+ const sub2 = r.author.subtitle ? `<div class="r-sub">${esc(r.author.subtitle)}</div>` : "";
721
+ const verified = kind === "trustpilot" ? `<span class="r-verified">${ICON.tick} ${esc(t.verified)}</span>` : "";
722
+ return `<div class="${cls}" style="${style}"><div class="r-head">${avatarHtml(r.author, assets, "av")}<div><div class="r-name">${esc(r.author.name)}</div>${sub2}</div></div><div class="r-stars">${starsHtml(kind, r.stars)}${verified}${r.date ? `<span class="r-date">${esc(r.date)}</span>` : ""}</div>${r.title ? `<div class="r-title">${esc(r.title)}</div>` : ""}<div class="r-text">${esc(shownReview(r.text))}</div></div>`;
723
+ }
724
+ function platformMark(kind) {
725
+ return kind === "trustpilot" ? `<span class="tp-mark"><span class="tp-glyph">${ICON.star}</span>Trustpilot</span>` : `<span class="g-mark"><b style="color:#4285f4">G</b><b style="color:#ea4335">o</b><b style="color:#fbbc05">o</b><b style="color:#4285f4">g</b><b style="color:#34a853">l</b><b style="color:#ea4335">e</b></span>`;
726
+ }
727
+ function reviewsHtml(surface, assets, t, brandName) {
728
+ const kind = surface.surface;
729
+ const platform = platformMark(kind);
730
+ const summary = surface.summary ? `<div class="summary">${assets.logo ? `<img class="sum-logo${inked(assets, assets.logo, false)}" src="${assets.logo}" alt="">` : brandName ? `<div class="sum-name">${esc(brandName)}</div>` : ""}<div class="sum-row"><span class="sum-label">${esc(surface.summary.label ?? t.excellent)}</span>${starsHtml(kind, 5, "l")}</div><div class="sum-count">${esc(surface.summary.score)} \xB7 ${esc(surface.summary.count)} ${esc(t.reviewsWord)} ${platform}</div></div>` : "";
731
+ const tilt = [-2.5, 2.2, -1.8, 2.8, -2.4, 1.6];
732
+ const nudge = [-22, 22, -16, 12, -16, 10];
733
+ const cards = surface.reviews.slice(0, FEATURED_REVIEWS).map(
734
+ (r, i) => reviewCard(
735
+ r,
736
+ kind,
737
+ assets,
738
+ t,
739
+ "review",
740
+ `transform:translateX(${nudge[i % nudge.length]}px) rotate(${tilt[i % tilt.length]}deg)`
741
+ )
742
+ );
743
+ const footer = surface.summary ? "" : `<div class="platform-foot">${platform}</div>`;
744
+ const anchor = surface.frame.logo && surface.frame.logo_position === "over" && assets.logo ? `<div class="wall-badge"><img class="${inked(assets, assets.logo, false).trim()}" src="${assets.logo}" alt=""></div>` : "";
745
+ const at = Math.ceil(cards.length / 2);
746
+ const pile = anchor ? [...cards.slice(0, at), anchor, ...cards.slice(at)].join("") : cards.join("");
747
+ return `<div class="surface reviews ${kind}">${summary}<div class="wall">${pile}</div>${footer}</div>`;
748
+ }
749
+ function reviewPile(surface, assets, t) {
750
+ return surface.reviews.slice(FEATURED_REVIEWS).map((r) => reviewCard(r, surface.surface, assets, t, "review back", "")).join("");
751
+ }
752
+ function notesParts(surface, t) {
753
+ const items = surface.items.map(
754
+ (i) => `<div class="item${i.checked ? " checked" : ""}"><span class="circle">${i.checked ? ICON.check : ""}</span><span>${esc(i.text)}</span></div>`
755
+ ).join("");
756
+ const tools = [ICON.checklist, ICON.camera, ICON.pen, ICON.compose].map((icon) => `<span>${icon}</span>`).join("");
757
+ return {
758
+ cls: "surface notes",
759
+ top: `${STATUS_BAR}<div class="n-head"><span class="n-back">${ICON.back}${esc(t.notes)}</span><span class="n-icons"><i></i><i></i></span></div>`,
760
+ body: `<h1>${esc(surface.title)}</h1>${items}${surface.body ? `<p class="n-body">${esc(surface.body)}</p>` : ""}`,
761
+ bottom: `<div class="n-tools">${tools}</div><div class="home-bar"></div>`,
762
+ align: "top"
763
+ };
764
+ }
765
+ function notesHtml(surface, t) {
766
+ const parts = notesParts(surface, t);
767
+ return `<div class="${parts.cls}">${parts.top.replace(STATUS_BAR, "")}${parts.body}</div>`;
768
+ }
769
+ function slackParts(surface, assets, t) {
770
+ const channel = surface.channel.replace(/^#/, "");
771
+ const messages = surface.messages.map((m) => {
772
+ const reactions = m.reactions.map((r) => `<span class="reaction">${esc(r.emoji)} ${r.count}</span>`).join("");
773
+ return `<div class="s-msg">${avatarHtml(m.author, assets, "av")}<div class="s-body"><div class="s-head"><span class="name">${esc(m.author.name)}</span>${m.time ? `<span class="s-time">${esc(m.time)}</span>` : ""}</div><div class="s-text">${linked(m.text)}</div>${reactions ? `<div class="reactions">${reactions}</div>` : ""}${m.replies ? `<div class="s-replies">${esc(m.replies)}</div>` : ""}</div></div>`;
774
+ }).join("");
775
+ return {
776
+ cls: "surface slack",
777
+ top: `${STATUS_BAR}<div class="s-channel"># ${esc(channel)}</div>`,
778
+ body: messages,
779
+ bottom: `<div class="s-compose"><span>${esc(t.messagePrompt)} #${esc(channel)}</span></div><div class="home-bar"></div>`,
780
+ align: "top"
781
+ };
782
+ }
783
+ function slackHtml(surface, assets, t) {
784
+ const parts = slackParts(surface, assets, t);
785
+ return `<div class="${parts.cls}">${parts.top.replace(STATUS_BAR, "")}${parts.body}</div>`;
786
+ }
787
+ function backdrop(surface, brand) {
788
+ if (surface.frame.background) return surface.frame.background;
789
+ switch (surface.surface) {
790
+ case "x_post":
791
+ return surface.theme === "dark" ? "#000000" : "#ffffff";
792
+ case "notes":
793
+ case "slack":
794
+ return "#ffffff";
795
+ case "trustpilot":
796
+ case "google_reviews":
797
+ return brand.ground ?? "#f4f3ee";
798
+ default:
799
+ return brand.ground ?? "#1f2a44";
800
+ }
801
+ }
802
+ function isDark(hex) {
803
+ const n = Number.parseInt(hex.slice(1), 16);
804
+ const [r, g, b] = [n >> 16 & 255, n >> 8 & 255, n & 255];
805
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b < 140;
806
+ }
807
+ var STYLE = `
808
+ *{box-sizing:border-box;margin:0;padding:0}
809
+ html,body{width:100%;height:100%;overflow:hidden}
810
+ body{font-family:Inter,"Noto Sans","Liberation Sans",Arial,sans-serif,"Noto Color Emoji";-webkit-font-smoothing:antialiased}
811
+ #box{position:absolute;display:flex;align-items:center;justify-content:center}
812
+ #stack{display:flex;flex-direction:column;align-items:center;gap:18px;transform-origin:center center;width:390px}
813
+ .headline{font-family:BrandFont,Inter,sans-serif;font-weight:800;font-size:30px;line-height:1.08;letter-spacing:-.02em;text-align:center;width:100%}
814
+ .caption{font-family:Inter,sans-serif;font-weight:600;font-size:17px;line-height:1.3;text-align:center;width:100%}
815
+ .frame-logo{height:30px;max-width:180px;object-fit:contain}
816
+ .inked{filter:brightness(0)}
817
+ .over{position:relative}
818
+ .logo-badge{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-4deg);background:#fff;border-radius:18px;padding:16px 26px;box-shadow:0 14px 40px rgba(0,0,0,.35);z-index:5}
819
+ .logo-badge img{height:54px;max-width:240px;object-fit:contain}
820
+ img{display:block}
821
+ .av{width:40px;height:40px;border-radius:50%;overflow:hidden;flex:none;background:#ddd}
822
+ .av img{width:100%;height:100%;object-fit:cover}
823
+ .av.logo-av{background:#fff;border:1px solid rgba(0,0,0,.08);display:flex;align-items:center;justify-content:center}
824
+ .av.logo-av img{width:78%;height:78%;object-fit:contain}
825
+ .av.initials{display:flex;align-items:center;justify-content:center;font-weight:600;font-size:15px;color:#2b2b2b}
826
+ .badge{width:18px;height:18px;flex:none;margin-left:2px}
827
+ .link{color:#1d9bf0}
828
+ /* X */
829
+ .surface.x{width:390px;background:#fff;color:#0f1419;padding:4px 0}
830
+ .x.dark{background:#000;color:#e7e9ea}
831
+ .post{display:flex;gap:10px;padding:12px 16px 4px}
832
+ .post .rail{display:flex;flex-direction:column;align-items:center}
833
+ .thread-line{width:2px;flex:1;background:#cfd9de;margin-top:4px}
834
+ .x.dark .thread-line{background:#333639}
835
+ .post .body{flex:1;min-width:0}
836
+ .post .head{display:flex;align-items:center;gap:3px;font-size:15px;line-height:20px;white-space:nowrap}
837
+ .post .name{font-weight:700;flex:none}
838
+ .post .meta{color:#536471;margin-left:3px;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
839
+ .post .replying{color:#536471;font-size:15px;line-height:20px}.x.dark .replying{color:#71767b}
840
+ .x.dark .meta,.x.dark .actions{color:#71767b}
841
+ .post .more{margin-left:auto;color:#536471;letter-spacing:1px}
842
+ .post .text{font-size:15px;line-height:20px;white-space:pre-wrap;overflow-wrap:break-word;margin-top:2px}
843
+ .post .media{margin-top:12px;border-radius:16px;overflow:hidden;border:1px solid #cfd9de}
844
+ .x.dark .media{border-color:#2f3336}
845
+ .post .media img{width:100%;height:100%;object-fit:cover}
846
+ .actions{display:flex;justify-content:space-between;color:#536471;font-size:13px;margin:10px 0 8px;max-width:340px}
847
+ .act{display:flex;align-items:center;gap:4px}
848
+ .act svg{width:18px;height:18px;fill:currentColor}
849
+ /* Chats */
850
+ .surface.chat{width:390px}
851
+ .chat.device{padding:11px;border-radius:52px;background:#111;box-shadow:0 18px 50px rgba(0,0,0,.35)}
852
+ .screen{border-radius:42px;overflow:hidden;display:flex;flex-direction:column;background:#efeae2}
853
+ .chat:not(.device) .screen{border-radius:18px}
854
+ .status-bar{display:flex;justify-content:space-between;align-items:center;padding:12px 28px 6px;font-weight:600;font-size:15px}
855
+ .bars{display:flex;gap:2px;align-items:flex-end}.bars i{display:block;width:3px;background:currentColor;border-radius:1px}
856
+ .bars i:nth-child(1){height:4px}.bars i:nth-child(2){height:6px}.bars i:nth-child(3){height:8px}.bars i:nth-child(4){height:10px}
857
+ .whatsapp .status-bar,.whatsapp .wa-head{background:#f6f5f3;color:#111b21}
858
+ .wa-head{display:flex;align-items:center;gap:8px;padding:6px 12px 10px;border-bottom:1px solid #e0ddd8}
859
+ .wa-head .back{width:11px;height:19px;color:#007aff;margin-right:2px}
860
+ .wa-head .av{width:36px;height:36px}
861
+ .wa-head .who{flex:1;min-width:0}
862
+ .wa-head .name{display:flex;align-items:center;gap:3px;font-weight:600;font-size:16px}
863
+ .wa-head .status{font-size:12.5px;color:#667781}
864
+ .wa-head .icons{display:flex;gap:20px;color:#007aff}.wa-head .icons svg{width:24px;height:20px}
865
+ .whatsapp .messages{background-color:#efeae2;background-image:radial-gradient(rgba(0,0,0,.035) 1.2px,transparent 1.3px),radial-gradient(rgba(0,0,0,.025) 1px,transparent 1.1px);background-size:22px 22px,13px 13px;background-position:0 0,7px 9px}
866
+ .messages{display:flex;flex-direction:column;gap:6px;padding:10px 12px 14px}
867
+ .day{align-self:center;background:#fff;color:#54656f;font-size:12.5px;padding:4px 12px;border-radius:8px;margin:2px 0 6px;box-shadow:0 1px .5px rgba(11,20,26,.13)}
868
+ .bubble{max-width:80%;border-radius:10px;padding:6px 8px 6px 9px;font-size:16px;line-height:21px;color:#111b21;box-shadow:0 1px .5px rgba(11,20,26,.13);overflow:hidden}
869
+ .bubble.them{align-self:flex-start;background:#fff;border-top-left-radius:2px}
870
+ .bubble.me{align-self:flex-end;background:#d9fdd3;border-top-right-radius:2px}
871
+ .msg-text{white-space:pre-wrap;overflow-wrap:break-word}
872
+ .time{float:right;font-size:11.5px;color:#667781;margin:8px 0 -4px 10px;display:inline-flex;align-items:center;gap:3px}
873
+ .ticks{width:17px;height:11px}
874
+ .card{margin:-3px -5px 6px -6px;border-radius:7px;overflow:hidden;background:rgba(0,0,0,.035)}
875
+ .card img{width:100%;aspect-ratio:16/10;object-fit:cover;background:#fff}
876
+ .card-title{font-weight:600;padding:7px 9px 0}
877
+ .card-sub{color:#111b21;font-weight:600;font-size:16px;padding:2px 9px 8px}
878
+ .card-button{margin:6px -8px -6px -9px;border-top:1px solid rgba(0,0,0,.08);text-align:center;color:#027eb5;font-weight:500;padding:10px 0 9px;font-size:15.5px}
879
+ .wa-input{display:flex;align-items:center;gap:10px;background:#f6f5f3;padding:8px 12px 26px;color:#007aff;font-size:28px;font-weight:300}
880
+ .wa-input .field,.im-input .field{flex:1;height:34px;border-radius:17px;background:#fff;border:1px solid #e0ddd8}
881
+ .wa-input .mic{width:16px;height:24px;border:2.5px solid #007aff;border-radius:9px}
882
+ .imessage .screen,.screen.imessage{background:#fff}
883
+ .imessage .status-bar{color:#000}
884
+ .im-head{display:flex;align-items:flex-start;padding:2px 14px 10px;background:#f7f7f7;border-bottom:1px solid #e5e5ea;color:#007aff}
885
+ .im-head .back{width:11px;height:19px;margin-top:14px}
886
+ .im-head .who{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;margin-right:11px}
887
+ .im-head .av{width:50px;height:50px}
888
+ .im-head .name{color:#000;font-size:12px}
889
+ .screen.imessage .messages{background:#fff}
890
+ .screen.imessage .day{background:none;box-shadow:none;color:#8e8e93;font-size:12px}
891
+ .screen.imessage .bubble{box-shadow:none;border-radius:19px;padding:8px 13px}
892
+ .screen.imessage .bubble.them{background:#e9e9eb;color:#000}
893
+ .screen.imessage .bubble.me{background:#0b84fe;color:#fff}
894
+ .screen.imessage .time{display:none}
895
+ .screen.imessage .card-button{color:inherit}
896
+ .im-input{display:flex;align-items:center;gap:10px;padding:8px 12px 26px;color:#8e8e93;font-size:26px}
897
+ /* Reviews */
898
+ .surface.reviews{width:100%;display:flex;flex-direction:column;gap:14px}
899
+ .summary{background:#fff;border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;box-shadow:0 6px 18px rgba(0,0,0,.12)}
900
+ .sum-logo{height:34px;max-width:200px;object-fit:contain}
901
+ .sum-name{font-weight:800;font-size:22px}
902
+ .sum-row{display:flex;align-items:center;gap:10px}
903
+ .sum-label{font-weight:700;font-size:20px;color:#191919}
904
+ .sum-count{font-size:13px;color:#555;display:flex;align-items:center;gap:6px}
905
+ .wall{display:flex;flex-direction:column;gap:0}.wall .review+.review{margin-top:-4px}
906
+ .wall-badge{align-self:center;position:relative;z-index:5;margin:2px 0;background:#fff;border-radius:22px;padding:16px 30px;box-shadow:0 16px 44px rgba(0,0,0,.38);transform:rotate(-3deg)}
907
+ .wall-badge img{height:64px;max-width:280px;object-fit:contain}
908
+ .wide #stack{width:620px}.wide .surface.reviews{width:620px}.wide .wall{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;align-items:start}.wide .wall .review+.review{margin-top:0}.wide .wall-badge{grid-column:1/-1;justify-self:center;margin:-22px 0}
909
+ .review{position:relative;background:#fff;border-radius:10px;padding:14px 16px 16px;box-shadow:0 6px 18px rgba(0,0,0,.14);color:#191919}
910
+ .r-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
911
+ .r-name{font-weight:600;font-size:15px}
912
+ .r-sub{font-size:12.5px;color:#6c6c85}
913
+ .r-stars{display:flex;align-items:center;gap:10px;margin-bottom:8px}
914
+ .r-verified{font-size:12px;color:#6c6c85}
915
+ .r-date{margin-left:auto;font-size:12px;color:#6c6c85}
916
+ .r-title{font-weight:700;font-size:16px;margin-bottom:4px}
917
+ .r-text{font-size:14.5px;line-height:1.42}
918
+ .tp-stars{display:inline-flex;gap:2px}
919
+ .tp-star{width:20px;height:20px;background:#00b67a;display:inline-flex;align-items:center;justify-content:center}
920
+ .tp-stars.l .tp-star{width:28px;height:28px}
921
+ .tp-star svg{width:82%;height:82%}
922
+ .tp-star.off{background:#dcdce6}
923
+ .tp-mark{font-weight:700;color:#191919;display:inline-flex;align-items:center;gap:2px}
924
+ .g-stars{color:#fbbc04;font-size:17px;letter-spacing:1px}.g-stars.l{font-size:26px}.g-stars .off{color:#dadce0}
925
+ .g-mark{font-weight:700;font-size:15px;letter-spacing:-.5px}
926
+ .platform-foot{align-self:center;background:#fff;border-radius:999px;padding:6px 14px;font-size:15px}
927
+ /* Notes */
928
+ .surface.notes{width:390px;background:#fff;color:#000;padding:8px 20px 22px}
929
+ .n-head{display:flex;justify-content:space-between;align-items:center;color:#e0a100;font-size:17px;padding:6px 0 14px}
930
+ .n-back{display:flex;align-items:center;gap:6px}.n-back svg{width:11px;height:19px}
931
+ .n-icons{display:flex;gap:16px}.n-icons i{display:block;width:24px;height:24px;border:2px solid #e0a100;border-radius:50%}
932
+ .notes h1{font-size:28px;line-height:1.15;font-weight:700;margin-bottom:14px}
933
+ .item{display:flex;gap:12px;align-items:flex-start;font-size:17px;line-height:1.35;margin-bottom:12px}
934
+ .circle{width:24px;height:24px;border-radius:50%;border:1.6px solid #c7c7cc;flex:none;display:flex;align-items:center;justify-content:center;margin-top:-1px}
935
+ .item.checked .circle{background:#e0a100;border-color:#e0a100}
936
+ .circle svg{width:16px;height:16px}
937
+ .n-body{font-size:17px;line-height:1.4;margin-top:6px}
938
+ /* Slack */
939
+ .surface.slack{width:390px;background:#fff;color:#1d1c1d;padding-bottom:10px}
940
+ .s-channel{font-weight:800;font-size:17px;padding:12px 16px;border-bottom:1px solid #e8e8e8}
941
+ .s-msg{display:flex;gap:10px;padding:10px 16px 4px}
942
+ .slack .av{border-radius:8px;width:38px;height:38px}
943
+ .s-body{flex:1;min-width:0}
944
+ .s-head{display:flex;align-items:baseline;gap:8px}
945
+ .s-head .name{font-weight:800;font-size:15px}
946
+ .s-time{font-size:12px;color:#616061}
947
+ .s-text{font-size:15px;line-height:1.46;white-space:pre-wrap}
948
+ .slack .link{color:#1264a3;background:rgba(29,155,209,.1);border-radius:3px;padding:0 2px}
949
+ .reactions{display:flex;gap:6px;margin-top:6px}
950
+ .reaction{border:1px solid #1d9bd1;background:#e8f5fa;border-radius:12px;padding:1px 8px;font-size:13px;color:#1264a3}
951
+ .s-replies{color:#1264a3;font-weight:700;font-size:13px;margin-top:6px}
952
+ /* A 9:16: the app full screen */
953
+ .fs-app{position:absolute;inset:0;overflow:hidden}
954
+ .fs-app.surface{width:auto;padding:0}
955
+ .fs-app.screen{border-radius:0;display:block}
956
+ .fs-app.surface.notes,.fs-app.surface.slack{background:#fff}
957
+ #top{position:absolute;left:0;right:0;top:0;z-index:3}
958
+ #bottom{position:absolute;left:0;right:0;bottom:0;z-index:3}
959
+ #top>div,#bottom>div{width:390px}
960
+ #banner{position:absolute;left:0;right:0;z-index:4}
961
+ #banner>div{width:390px}
962
+ .fs-card{margin:0 14px;border-radius:16px;padding:11px 14px;display:flex;flex-direction:column;align-items:center;gap:6px;box-shadow:0 10px 28px rgba(0,0,0,.22)}
963
+ .fs-card .headline{font-size:18px}.fs-card .caption{font-size:11.5px}.fs-card .frame-logo{height:17px}
964
+ .fs #stack{position:absolute;left:0;top:0;transform-origin:top left;display:block;gap:0}
965
+ .fs .surface.notes h1,.fs .item,.fs .n-body{margin-left:20px;margin-right:20px}
966
+ .fs-app.notes #stack{padding-top:6px}
967
+ .fs-app.screen.whatsapp{background-color:#efeae2;background-image:radial-gradient(rgba(0,0,0,.035) 1.2px,transparent 1.3px),radial-gradient(rgba(0,0,0,.025) 1px,transparent 1.1px);background-size:30px 30px,18px 18px;background-position:0 0,9px 12px}
968
+ .fs-app.whatsapp .messages{background:none}
969
+ .fs-app .messages{padding:10px 12px 12px}
970
+ .fs-app .bubble{max-width:min(80%,320px)}.fs-app .bubble:has(.card){max-width:min(66%,240px)}.fs-app .card img{aspect-ratio:3/2}
971
+ .fs .post .media{aspect-ratio:16/9!important}
972
+ .fs .status-bar{padding:14px 30px 8px}
973
+ .x .status-bar{color:inherit}
974
+ .x-head{display:flex;align-items:center;gap:26px;padding:8px 16px 12px;font-weight:700;font-size:19px;border-bottom:1px solid #eff3f4}
975
+ .x.dark .x-head{border-color:#2f3336}
976
+ .x-head .back{width:12px;height:20px}
977
+ .x-reply{display:flex;align-items:center;gap:12px;padding:10px 16px;border-top:1px solid #eff3f4;color:#536471;font-size:16px}
978
+ .x.dark .x-reply{border-color:#2f3336;color:#71767b}
979
+ .x-reply-av{width:30px;height:30px;border-radius:50%;background:#cfd9de}.x.dark .x-reply-av{background:#333639}
980
+ .x.light #top,.x.light #bottom{background:#fff}.x.dark #top,.x.dark #bottom{background:#000}
981
+ .tabbar{display:flex;justify-content:space-around;padding:10px 8px 4px;border-top:1px solid #eff3f4}
982
+ .x.dark .tabbar{border-color:#2f3336}
983
+ .tabbar svg{width:27px;height:27px}
984
+ .home-bar{width:134px;height:5px;border-radius:3px;background:currentColor;opacity:.85;margin:10px auto 8px}
985
+ .screen.whatsapp .wa-input{padding-bottom:8px}
986
+ .screen.imessage .im-input{padding-bottom:8px;background:#fff}
987
+ #bottom .wa-input,#bottom .im-input{border-top:1px solid #e0ddd8}
988
+ .n-tools{display:flex;justify-content:space-between;padding:10px 26px 0;color:#e0a100;background:#fff}.n-tools svg{width:25px;height:25px}
989
+ .fs-app.notes #top,.fs-app.notes #bottom{background:#fff;color:#000}
990
+ .fs-app.notes .n-head{padding:6px 20px 10px}
991
+ .s-compose{margin:8px 12px 0;border:1px solid #c9c9c9;border-radius:10px;padding:12px 14px;color:#868686;font-size:15px;background:#fff}
992
+ .fs-app.slack #top,.fs-app.slack #bottom{background:#fff;color:#1d1c1d}
993
+ /* A wall's pile */
994
+ #backdrop{position:absolute;inset:0;overflow:hidden}
995
+ .review.back{position:absolute;width:390px;box-shadow:0 4px 14px rgba(0,0,0,.12)}
996
+ #backdrop .wash{position:absolute;inset:0;background:var(--ground);opacity:.35}
997
+ .wall-card{width:100%;border-radius:16px;padding:12px 16px;box-shadow:0 12px 32px rgba(0,0,0,.3);position:relative;z-index:6}
998
+ #box{z-index:2}
999
+ .tp-glyph{display:inline-flex;width:18px;height:18px;background:#00b67a;align-items:center;justify-content:center;margin-right:3px}.tp-glyph svg{width:80%;height:80%}
1000
+ .r-verified{display:inline-flex;align-items:center;gap:3px}.r-verified svg{width:12px;height:12px}
1001
+ `;
1002
+ var px = (n) => Math.round(n * 10) / 10;
1003
+ var PHONE_WIDTH = 390;
1004
+ var FONT_WAIT_MS = 1e4;
1005
+ var READY = `
1006
+ await Promise.all([...document.images].map((i) => (i.complete ? null : i.decode().catch(() => null))));
1007
+ // The web fonts are waited on for a while, never for ever: past it the page draws in the fallback face.
1008
+ if (document.fonts) await Promise.race([document.fonts.ready, new Promise((r) => setTimeout(r, ${FONT_WAIT_MS}))]);
1009
+ // A square mark set where a wordmark goes reads as a speck at a wordmark's height.
1010
+ for (const img of document.querySelectorAll(".frame-logo")) {
1011
+ if (img.naturalWidth > 0 && img.naturalWidth < img.naturalHeight * 1.6) img.style.height = img.offsetHeight * 1.8 + "px";
1012
+ }
1013
+ `;
1014
+ var FIT = `
1015
+ (async () => {${READY}
1016
+ const box = document.getElementById("box");
1017
+ const stack = document.getElementById("stack");
1018
+ const pile = document.getElementById("backdrop");
1019
+ const fit = () => Math.min(box.clientWidth / stack.offsetWidth, box.clientHeight / stack.offsetHeight);
1020
+ let scale = fit();
1021
+ // A wall in a box squarer than its column is laid out wider, up to a third, so its cards run
1022
+ // shorter and read larger.
1023
+ if (pile && !document.body.classList.contains("wide")) {
1024
+ const base = stack.offsetWidth;
1025
+ let best = { width: base, scale };
1026
+ for (const grow of [1.1, 1.2, 1.33]) {
1027
+ stack.style.width = base * grow + "px";
1028
+ const s = fit();
1029
+ if (s > best.scale) best = { width: base * grow, scale: s };
1030
+ }
1031
+ stack.style.width = best.width + "px";
1032
+ scale = fit();
1033
+ }
1034
+ stack.style.transform = "scale(" + scale + ")";
1035
+ if (pile) {
1036
+ // The wall under the featured: the other reviews once each, whole and upright, in tidy columns
1037
+ // a little smaller than the featured ones, set back under a wash of the ground. Tier 1, Oct
1038
+ // 2026: a pile of tilted cards larger than the featured, repeated to fill the frame, read as
1039
+ // "too many testimonials in the background, it doesn't make much sense".
1040
+ const W = innerWidth, H = innerHeight;
1041
+ const cards = [...pile.children];
1042
+ const cw = Math.min(scale * 0.8, (W * 0.46) / 390);
1043
+ const cols = Math.max(2, Math.min(3, Math.round(W / (390 * cw * 1.05))));
1044
+ const gap = (W - cols * 390 * cw) / (cols + 1);
1045
+ const ys = Array.from({ length: cols }, (_, c) => H * 0.03 - (c % 2) * 60 * cw);
1046
+ for (const card of cards) {
1047
+ const c = ys.indexOf(Math.min(...ys));
1048
+ card.style.zoom = String(cw);
1049
+ card.style.left = (gap + c * (390 * cw + gap)) / cw + "px";
1050
+ card.style.top = ys[c] / cw + "px";
1051
+ ys[c] += card.offsetHeight * cw + gap * 0.6;
1052
+ }
1053
+ const wash = document.createElement("div");
1054
+ wash.className = "wash";
1055
+ pile.appendChild(wash);
1056
+ }
1057
+ document.body.dataset.ready = "1";
1058
+ })();
1059
+ `;
1060
+ var FIT_FULLSCREEN = `
1061
+ (async () => {${READY}
1062
+ const cfg = JSON.parse(document.body.dataset.fit);
1063
+ const W = innerWidth, H = innerHeight;
1064
+ const top = document.getElementById("top"), bottom = document.getElementById("bottom");
1065
+ const banner = document.getElementById("banner"), stack = document.getElementById("stack");
1066
+ let y0 = Math.max(top.getBoundingClientRect().height, cfg.bandTop);
1067
+ const y1 = Math.min(H - bottom.getBoundingClientRect().height, cfg.bandBottom);
1068
+ if (banner) {
1069
+ banner.style.top = y0 + 8 + "px";
1070
+ y0 += banner.getBoundingClientRect().height + 16;
1071
+ }
1072
+ const room = y1 - y0;
1073
+ // Laid out wider as it shrinks, so it runs the screen's width, but never past a fifth wider than
1074
+ // the phone: a post's photo grows with the width, and the words would only get smaller.
1075
+ // A chat runs the screen's whole width at any scale: its bubbles keep to the phone's widths, so
1076
+ // a wider column only sets them against the edges, as the app does, never in a narrow strip.
1077
+ // Clear of the buttons down the right, where the placement draws them (\`rail\`).
1078
+ const across = W - cfg.rail;
1079
+ const fits = (s) => { stack.style.width = (cfg.scroll ? across / s : Math.min(across / s, cfg.phone * 1.2)) + "px"; return stack.offsetHeight * s <= room; };
1080
+ // A chat never shrinks past what reads on a phone: its earliest messages scroll up under the
1081
+ // header instead, as the app does, and the page says which ones went (the review expects them
1082
+ // nowhere on this size).
1083
+ const floor = cfg.chrome * (cfg.scroll ? 0.5 : 0.2);
1084
+ // A short chat is set a little larger than the phone, so it reads and fills the screen.
1085
+ let lo = floor, hi = cfg.chrome * (cfg.scroll ? 1.3 : 1), best = lo;
1086
+ if (fits(hi)) best = hi;
1087
+ else for (let i = 0; i < 16; i++) { const m = (lo + hi) / 2; if (fits(m)) { best = m; lo = m; } else hi = m; }
1088
+ fits(best);
1089
+ stack.style.transform = "scale(" + best + ")";
1090
+ stack.style.left = (across - stack.offsetWidth * best) / 2 + "px";
1091
+ const h = stack.offsetHeight * best;
1092
+ stack.style.top = (cfg.align === "bottom" ? y1 - h : y0) + "px";
1093
+ const hidden = [];
1094
+ if (cfg.scroll && h > room + 1) {
1095
+ const veil = document.createElement("div");
1096
+ const wall = getComputedStyle(stack.querySelector(".messages") ?? stack).backgroundColor;
1097
+ veil.style.cssText = "position:absolute;left:0;right:0;top:0;z-index:2;background:" + wall + ";height:" + y0 + "px";
1098
+ document.body.appendChild(veil);
1099
+ for (const bubble of stack.querySelectorAll("[data-copy]")) {
1100
+ if (bubble.getBoundingClientRect().top < y0) hidden.push(...JSON.parse(bubble.dataset.copy));
1101
+ }
1102
+ }
1103
+ document.body.dataset.hidden = JSON.stringify(hidden);
1104
+ document.body.dataset.ready = "1";
1105
+ })();
1106
+ `;
1107
+ function isFullScreen(opts) {
1108
+ return opts.height / opts.width >= 1.7;
1109
+ }
1110
+ var FULL_SCREEN_APPS = /* @__PURE__ */ new Set([
1111
+ "x_post",
1112
+ "whatsapp",
1113
+ "imessage",
1114
+ "notes",
1115
+ "slack"
1116
+ ]);
1117
+ function frameGround(surface, brand, size) {
1118
+ if (isFullScreen(size) && FULL_SCREEN_APPS.has(surface.surface)) {
1119
+ return surface.frame.background ?? brand.ground ?? "#ffffff";
1120
+ }
1121
+ return backdrop(surface, brand);
1122
+ }
1123
+ function nativeSurfaceHtml(surface, assets, opts) {
1124
+ const w = opts.width / 2;
1125
+ const h = opts.height / 2;
1126
+ const t = chromeWords(opts.language, opts.words);
1127
+ const bg = backdrop(surface, opts.brand);
1128
+ const ink = isDark(bg) ? "#ffffff" : opts.brand.ink ?? "#111111";
1129
+ const font = assets.font ? `@font-face{font-family:BrandFont;src:url(${assets.font});font-display:block}` : "";
1130
+ const head = `<!doctype html><html><head><meta charset="utf-8">
1131
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Color+Emoji&display=block">
1132
+ <style>${font}${STYLE}`;
1133
+ const parts = isFullScreen(opts) ? appParts(surface, assets, t) : null;
1134
+ if (parts) return fullScreenHtml(surface, parts, assets, opts, head);
1135
+ const wall = surface.surface === "trustpilot" || surface.surface === "google_reviews";
1136
+ const stack = frameStack(surface, screenHtml(surface, assets, t, opts.brand.name), assets, ink, bg);
1137
+ const box = layoutBox(opts.safe, w, h);
1138
+ const pile = wall ? `<div id="backdrop" style="--ground:${bg}">${reviewPile(surface, assets, t)}</div>` : "";
1139
+ const wide = wall && Math.min(surface.reviews.length, FEATURED_REVIEWS) >= 2 && box.width / box.height > 1.25;
1140
+ return `${head}
1141
+ body{background:${bg};width:${w}px;height:${h}px;position:relative}
1142
+ #box{top:${px(box.top)}px;left:${px(box.left)}px;width:${px(box.width)}px;height:${px(box.height)}px}
1143
+ </style></head><body${wide ? ' class="wide"' : ""}>${pile}<div id="box"><div id="stack">${stack}</div></div><script>${FIT}</script></body></html>`;
1144
+ }
1145
+ function appParts(surface, assets, t) {
1146
+ switch (surface.surface) {
1147
+ case "x_post":
1148
+ return xParts(surface, assets, t);
1149
+ case "whatsapp":
1150
+ case "imessage":
1151
+ return chatParts(surface, assets, t);
1152
+ case "notes":
1153
+ return notesParts(surface, t);
1154
+ case "slack":
1155
+ return slackParts(surface, assets, t);
1156
+ default:
1157
+ return null;
1158
+ }
1159
+ }
1160
+ function fullScreenHtml(surface, parts, assets, opts, head) {
1161
+ const w = opts.width / 2;
1162
+ const h = opts.height / 2;
1163
+ const chrome = Math.round(w / PHONE_WIDTH * 1e3) / 1e3;
1164
+ const fit = {
1165
+ bandTop: px(opts.safe.top * h),
1166
+ bandBottom: px((1 - opts.safe.bottom) * h),
1167
+ // Buttons down the right (Reels, TikTok, Shorts): an inset wider on the right than the left.
1168
+ rail: opts.safe.right > opts.safe.left ? px(opts.safe.right * w) : 0,
1169
+ chrome,
1170
+ phone: PHONE_WIDTH,
1171
+ align: parts.align,
1172
+ scroll: surface.surface === "whatsapp" || surface.surface === "imessage"
1173
+ };
1174
+ const { frame } = surface;
1175
+ const ground = frameGround(surface, opts.brand, opts);
1176
+ const ink = isDark(ground) ? "#ffffff" : opts.brand.ink ?? "#111111";
1177
+ const logo = frame.logo ? isDark(ground) ? assets.frameLogo ?? assets.logo : assets.logo ?? assets.frameLogo : void 0;
1178
+ const card = [
1179
+ frame.headline ? `<div class="headline" style="color:${ink}">${keepTogether(esc(frame.headline))}</div>` : "",
1180
+ frame.caption ? `<div class="caption" style="color:${ink}">${keepTogether(esc(frame.caption))}</div>` : "",
1181
+ logo ? `<img class="frame-logo${inked(assets, logo, isDark(ground))}" src="${logo}" alt="">` : ""
1182
+ ].join("");
1183
+ const banner = card ? `<div id="banner"><div style="zoom:${chrome}"><div class="fs-card" style="background:${ground}">${card}</div></div></div>` : "";
1184
+ return `${head}
1185
+ body{width:${w}px;height:${h}px;position:relative}
1186
+ </style></head><body class="fs" data-fit='${JSON.stringify(fit)}'><div class="fs-app ${parts.cls}"><div id="top"><div style="zoom:${chrome}">${parts.top}</div></div>${banner}<div id="stack">${parts.body}</div><div id="bottom"><div style="zoom:${chrome}">${parts.bottom}</div></div></div><script>${FIT_FULLSCREEN}</script></body></html>`;
1187
+ }
1188
+ function screenHtml(surface, assets, t, brandName) {
1189
+ switch (surface.surface) {
1190
+ case "x_post":
1191
+ return `<div class="surface x ${surface.theme}">${xPosts(surface, assets, t)}</div>`;
1192
+ case "whatsapp":
1193
+ case "imessage":
1194
+ return chatHtml(surface, assets, t);
1195
+ case "trustpilot":
1196
+ case "google_reviews":
1197
+ return reviewsHtml(surface, assets, t, brandName);
1198
+ case "notes":
1199
+ return notesHtml(surface, t);
1200
+ case "slack":
1201
+ return slackHtml(surface, assets, t);
1202
+ default:
1203
+ return "";
1204
+ }
1205
+ }
1206
+ function frameStack(surface, screen, assets, ink, ground) {
1207
+ const { frame } = surface;
1208
+ const logo = frame.logo ? assets.frameLogo ?? assets.logo : void 0;
1209
+ const wall = surface.surface === "trustpilot" || surface.surface === "google_reviews";
1210
+ const badge = logo && frame.logo_position === "over" && !wall ? `<div class="logo-badge"><img class="${inked(assets, assets.logo ?? logo, false).trim()}" src="${assets.logo ?? logo}" alt=""></div>` : "";
1211
+ const placed = logo && frame.logo_position === "over";
1212
+ const piled = wall && surface.reviews.length > FEATURED_REVIEWS;
1213
+ const line = (cls, text) => {
1214
+ const html = `<div class="${cls}" style="color:${ink}">${keepTogether(esc(text))}</div>`;
1215
+ return piled ? `<div class="wall-card" style="background:${ground}">${html}</div>` : html;
1216
+ };
1217
+ return [
1218
+ frame.headline ? line("headline", frame.headline) : "",
1219
+ badge ? `<div class="over">${screen}${badge}</div>` : screen,
1220
+ frame.caption ? line("caption", frame.caption) : "",
1221
+ logo && !placed ? `<img class="frame-logo${inked(assets, logo, isDark(ground))}" src="${logo}" alt="">` : ""
1222
+ ].join("");
1223
+ }
1224
+ function layoutBox(safe, w, h) {
1225
+ const margin = 0.035;
1226
+ const top = Math.max(safe.top, margin) * h;
1227
+ const bottom = Math.max(safe.bottom, margin) * h;
1228
+ const left = Math.max(safe.left, margin) * w;
1229
+ const right = Math.max(safe.right, margin) * w;
1230
+ return { top, left, width: w - left - right, height: h - top - bottom };
1231
+ }
1232
+
1233
+ // src/engine/scaffold/static-ad-spec.ts
1234
+ var AD_SPEC_SCHEMA = "baker-static-ad/3";
1235
+ var AD_SPEC_SCHEMAS = ["baker-static-ad/2", AD_SPEC_SCHEMA];
1236
+ var Hex2 = z3.string().regex(/^#[0-9a-fA-F]{6}$/, "a colour is a 6-digit hex like #123551").transform((h) => h.toLowerCase());
1237
+ var AdCopyLine = z3.object({
1238
+ text: z3.string().trim().min(1),
1239
+ lettering: z3.enum(["in_scene", "designed"]),
1240
+ /** headline | body | cta | caption | fine_print | label. */
1241
+ role: z3.string().optional(),
1242
+ /** In-scene lines: the object it is written on (a whiteboard, a phone's notes app, a sticky note). */
1243
+ on: z3.string().optional(),
1244
+ /** How it looks: an in-scene line's own lettering (chunky navy marker), a designed line's size or treatment. */
1245
+ look: z3.string().optional(),
1246
+ /** Where it sits, by what is around it ("top of the board", "under the headline"). */
1247
+ position: z3.string().optional()
1248
+ }).strict();
1249
+ var AD_REFERENCE_ROLES = ["identity", "product", "prop"];
1250
+ var AdReference = z3.object({
1251
+ /** A role-based label, never a brand's: PERSON_1, ANIMAL_1, PRODUCT_1, BADGE_1, PROP_1. */
1252
+ id: z3.string().regex(
1253
+ /^(PERSON|ANIMAL|PRODUCT|BADGE|PROP)_\d+$/,
1254
+ "a reference id is PERSON_1, ANIMAL_1, PRODUCT_1, BADGE_1 or PROP_1"
1255
+ ),
1256
+ role: z3.enum(AD_REFERENCE_ROLES),
1257
+ /** The canvas ingest node that holds its picture (bookkeeping, never sent to a model). */
1258
+ slot: z3.string().optional(),
1259
+ /** How it appears in this ad. */
1260
+ what: z3.string().trim().min(1),
1261
+ /** What must stay exactly as in the picture, when more than the default for its role. */
1262
+ keep: z3.string().optional(),
1263
+ /** The company avatar cast in this role (`baker avatars list`): a licensed face, never an invented one. */
1264
+ avatar: z3.string().optional(),
1265
+ /**
1266
+ * A picture of ours that shows it (a path from the creative's folder, or a URL): every run
1267
+ * wires it into the renders (`ref_<id>`), so a picture is named here, never hand-wired.
1268
+ */
1269
+ image: z3.string().trim().min(1).optional()
1270
+ }).strict();
1271
+ function isMemeTemplate(reference) {
1272
+ return /(^|\/\/)i\.imgflip\.com\//i.test(reference.image ?? "") || /\bmemes?\b/i.test(reference.what);
1273
+ }
1274
+ var Market = z3.object({
1275
+ /** ISO country code (ES, MX), or "global" for a version that runs in several. */
1276
+ country: z3.string().trim().min(2),
1277
+ language: z3.string().trim().min(2).optional(),
1278
+ currency: z3.string().trim().min(1).optional(),
1279
+ /** How the copy addresses the viewer: tú, usted, vos, você, du, Sie, vous… */
1280
+ address: z3.string().trim().min(1).optional()
1281
+ }).strict();
1282
+ var Viewer = z3.object({
1283
+ /** Who will see the ad, in the words a marketer would use. */
1284
+ who: z3.string().trim().min(1),
1285
+ market: Market.optional(),
1286
+ /** What they already know about the brand and the offer; a list (as _definition.md keeps it) reads as one line. */
1287
+ knows: z3.preprocess((v) => Array.isArray(v) ? v.map(String).join("; ") || void 0 : v, z3.string().optional()),
1288
+ temperature: z3.enum(["cold", "warm", "hot"]).optional(),
1289
+ /** Where they meet it (feed, Stories, Reels). */
1290
+ placement: z3.string().optional()
1291
+ }).strict();
1292
+ var withoutFormatName = (v) => {
1293
+ if (!v || typeof v !== "object" || Array.isArray(v) || typeof v.concept !== "string")
1294
+ return v;
1295
+ const { concept: _format, ...scene } = v;
1296
+ return scene;
1297
+ };
1298
+ var SceneFields = z3.object({
1299
+ description: z3.string().trim().min(1),
1300
+ /** A photograph, a designed graphic, or an illustration; plain synonyms ("photography") read as them. */
1301
+ look: z3.preprocess(
1302
+ (v) => typeof v !== "string" ? v : /^photo/i.test(v.trim()) ? "photo" : /^illustrat/i.test(v.trim()) ? "illustration" : /^(design|graphic)/i.test(v.trim()) ? "designed" : v,
1303
+ z3.enum(["photo", "designed", "illustration"])
1304
+ ),
1305
+ /** How a photo was taken, in plain words (handheld at standing height, window light, faint glare). */
1306
+ capture: z3.string().optional(),
1307
+ mood: z3.string().optional(),
1308
+ /** How the frame is arranged, by what fills each part of it. */
1309
+ layout: z3.string().optional()
1310
+ }).strict();
1311
+ var Scene = z3.preprocess(withoutFormatName, SceneFields);
1312
+ var Brand = z3.object({
1313
+ name: z3.string().optional(),
1314
+ /** The words the brand's logo prints (its wordmark), so a check reads them as the logo, never as copy. */
1315
+ lockup: z3.array(z3.string().trim().min(1)).optional(),
1316
+ /** The brand's face in words, when no specimen of it is wired ("a heavy geometric sans"). */
1317
+ typeface: z3.string().optional(),
1318
+ ground: Hex2.optional(),
1319
+ ink: Hex2.optional(),
1320
+ accent: Hex2.optional(),
1321
+ cta: Hex2.optional(),
1322
+ palette: z3.array(Hex2).default([])
1323
+ }).strict();
1324
+ var ColorUse = z3.object({ object: z3.string().trim().min(1), name: z3.string().trim().min(1), hex: Hex2.optional() }).strict();
1325
+ var Mechanism = z3.object({ device: z3.string().trim().min(1), why_it_works: z3.string().optional() }).strict();
1326
+ var ThirdPartyBrand = z3.object({
1327
+ name: z3.string().trim().min(1),
1328
+ /** Where it shows in this ad, by what carries it ("the car the loan is for"). */
1329
+ what: z3.string().optional(),
1330
+ /** The reference (BADGE_1) that holds a picture of its logo, when one is wired. */
1331
+ logo: z3.string().regex(/^(PERSON|ANIMAL|PRODUCT|BADGE|PROP)_\d+$/, "a logo is a reference id like BADGE_1").optional(),
1332
+ /**
1333
+ * Why its logo is on our ad: `partner` (the offer is about it), `proof` (the review platform a
1334
+ * rating comes from), `category_signal` (how a stranger knows in a second what this is: the
1335
+ * Instagram and TikTok marks on a social media tool's ad).
1336
+ */
1337
+ role: z3.enum(["partner", "proof", "category_signal"]).optional()
1338
+ }).strict();
1339
+ var CONCEPT_CARRY_LEVELS = ["whole_ad", "layout", "hook", "angle"];
1340
+ var LOAD_BEARING_JOBS = ["stop", "proof", "other"];
1341
+ var KEEP_DECISIONS = ["keep", "replace", "impossible"];
1342
+ var HAVE_FOR = {
1343
+ keep: "have",
1344
+ replace: "adapt",
1345
+ impossible: "missing"
1346
+ };
1347
+ var word = (v) => typeof v === "string" ? v.trim().toLowerCase() : v;
1348
+ var withDerivedHave = (v) => {
1349
+ if (!v || typeof v !== "object" || Array.isArray(v) || "have" in v) return v;
1350
+ const decision = word(v.decision);
1351
+ const have = KEEP_DECISIONS.find((d) => d === decision);
1352
+ return have ? { ...v, have: HAVE_FOR[have] } : v;
1353
+ };
1354
+ var LOAD_BEARING_FIELDS = {
1355
+ /** The element, as it shows in the picture ("the free gift", "a peer's face", "the red ✗ marks"). */
1356
+ element: z3.string().trim().min(1),
1357
+ /** What it does for the ad (`LOAD_BEARING_JOBS`). */
1358
+ job: z3.preprocess(word, z3.enum(LOAD_BEARING_JOBS).optional()),
1359
+ /** What it takes to carry it ("something the viewer wants for free"). */
1360
+ needs: z3.string().optional(),
1361
+ /** Whether we have it as it is, can adapt it, or have nothing for it. */
1362
+ have: z3.enum(["have", "adapt", "missing"]),
1363
+ /** What our ad does with it (`KEEP_DECISIONS`); unset (older specs), it follows from `have`. */
1364
+ decision: z3.preprocess(word, z3.enum(KEEP_DECISIONS).optional()),
1365
+ /** What of ours carries it in this ad. */
1366
+ ours: z3.string().optional(),
1367
+ /** The company rule that forbids it as it is, quoted word for word. */
1368
+ rule: z3.string().optional()
1369
+ };
1370
+ var LoadBearing = z3.preprocess(withDerivedHave, z3.object(LOAD_BEARING_FIELDS).strict());
1371
+ function decisionOf(l) {
1372
+ if (l.decision) return l.decision;
1373
+ if (l.have === "have") return "keep";
1374
+ return l.have === "adapt" || l.ours?.trim() ? "replace" : "impossible";
1375
+ }
1376
+ var UNFIT_LEAD = {
1377
+ stop: (element) => `what stops the scroll there, "${element}", cannot be ours`,
1378
+ proof: (element) => `its proof, "${element}", cannot be ours`,
1379
+ other: (element) => `it wins on "${element}", which we cannot supply`
1380
+ };
1381
+ var JOB_ORDER = { stop: 0, proof: 1, other: 2 };
1382
+ var MEME_ELEMENT = /\bmemes?\b|reaction[\s-](?:face|image|gif|shot|photo)s?/i;
1383
+ var isMemeElement = (element) => MEME_ELEMENT.test(element);
1384
+ function memeReasons(concept, audience) {
1385
+ if (audience?.memes !== "off_brand") return [];
1386
+ return concept.load_bearing.filter((l) => l.job === "stop" && decisionOf(l) !== "impossible" && isMemeElement(l.element)).map(
1387
+ (l) => `what stops the scroll there, "${l.element}", is a meme, and our brand's voice does not run memes${audience.why ? ` (${audience.why})` : ""}`
1388
+ );
1389
+ }
1390
+ function unfitReasons(concept, audience) {
1391
+ return [...impossibleReasons(concept), ...memeReasons(concept, audience)];
1392
+ }
1393
+ function impossibleReasons(concept) {
1394
+ return concept.load_bearing.filter((l) => decisionOf(l) === "impossible" || l.have === "missing" && !l.ours?.trim()).sort((a, b) => JOB_ORDER[a.job ?? "other"] - JOB_ORDER[b.job ?? "other"]).map(
1395
+ (l) => `${UNFIT_LEAD[l.job ?? "other"](l.element)}${l.rule?.trim() ? ` (a company rule: "${l.rule.trim()}")` : ""}`
1396
+ );
1397
+ }
1398
+ var isVital = (l) => l.job === "stop" || l.job === "proof";
1399
+ var Concept = z3.object({
1400
+ reference_ad_id: z3.string().optional(),
1401
+ why_it_wins: z3.object({
1402
+ disguise: z3.string().optional(),
1403
+ voice: z3.string().optional(),
1404
+ trigger: z3.string().optional(),
1405
+ attention: z3.string().optional(),
1406
+ logic: z3.string().optional()
1407
+ }).strict().default({}),
1408
+ load_bearing: z3.array(LoadBearing).default([]),
1409
+ verdict: z3.enum(["use", "adapt", "reject"]),
1410
+ /** How the idea transfers to us, in a sentence. Bookkeeping: never compiled into a render. */
1411
+ transfer_note: z3.string().optional(),
1412
+ /**
1413
+ * What made the reference win, so what this ad carries of it (`CONCEPT_CARRY_LEVELS`): the whole
1414
+ * ad, its layout, its hook or its angle. The render sees the reference for its structure only
1415
+ * for the whole ad or its layout. Unset (older specs): as the whole ad.
1416
+ */
1417
+ carry: z3.enum(CONCEPT_CARRY_LEVELS).optional(),
1418
+ /** Why that level, in a sentence. Bookkeeping for the agent. */
1419
+ carry_why: z3.string().optional()
1420
+ }).strict();
1421
+ var AdSpecSchema = z3.object({
1422
+ schema: z3.enum(AD_SPEC_SCHEMAS),
1423
+ viewer: Viewer.optional(),
1424
+ /** The one thing the ad tells the viewer. Intent, never printed. */
1425
+ message: z3.string().optional(),
1426
+ copy: z3.array(AdCopyLine).default([]),
1427
+ scene: Scene,
1428
+ brand: Brand.optional(),
1429
+ colors: z3.array(ColorUse).default([]),
1430
+ references: z3.array(AdReference).default([]),
1431
+ /** The ad shows the brand's logo (the real file, wired on the canvas): on by default for a standard brand presence, whatever the reference showed. */
1432
+ logo: z3.boolean().default(false),
1433
+ logo_position: z3.string().optional(),
1434
+ /** Other brands the offer is about, whose logos the ad may show. */
1435
+ third_party_brands: z3.array(ThirdPartyBrand).default([]),
1436
+ /**
1437
+ * Words the scene prints by itself, never copy: a phone's status bar and app chrome, a code
1438
+ * editor's line numbers, a product's own label, a platform's badge. The render may draw them
1439
+ * and the review never calls them extra words.
1440
+ */
1441
+ scene_text: z3.preprocess(
1442
+ (v) => Array.isArray(v) ? v.map((w) => w && typeof w === "object" && "text" in w ? w.text : w) : v,
1443
+ z3.array(z3.string().trim().min(1)).default([])
1444
+ ),
1445
+ /** The formats the ad is made for; the canvas delivers them. */
1446
+ formats: z3.array(z3.string()).optional(),
1447
+ /** An optional note on direction for this concept. */
1448
+ direction: z3.string().optional(),
1449
+ /** The device the ad is built on, and why it works on a stranger. Judged, never drawn. */
1450
+ mechanism: z3.preprocess((v) => {
1451
+ const list = v && typeof v === "object" && !Array.isArray(v) ? [v] : v;
1452
+ return Array.isArray(list) ? list.map((m) => typeof m === "string" ? { device: m } : m) : list;
1453
+ }, z3.array(Mechanism).default([])),
1454
+ /** Why the reference won and what this ad keeps of it (schema /3). */
1455
+ concept: Concept.optional(),
1456
+ /**
1457
+ * How the ad shows the brand, decided by the concept: `native` (a disguise: a note, a post, a
1458
+ * chat) carries the logo as the sender or avatar and no big button; `standard` the logo large
1459
+ * and a solid button. Unset: standard.
1460
+ */
1461
+ brand_presence: z3.enum(["native", "standard"]).optional(),
1462
+ /** What kind of product a stranger takes it for in one second, never its format ("a trade course", "a payroll app"). */
1463
+ recognition: z3.string().optional(),
1464
+ /**
1465
+ * The ad is a screen people know (a post on X, a WhatsApp chat, a wall of Trustpilot reviews, a
1466
+ * note, a Slack message), drawn exactly from HTML at every size (`native-surface.ts`); the image
1467
+ * model renders only the photos it holds. For a native disguise, never a painted imitation.
1468
+ */
1469
+ native: NativeSurfaceSchema.optional(),
1470
+ /** The product this ad sells (`src/content/products/<slug>.md`): a business unit's rules hold for it. */
1471
+ product: z3.string().trim().min(1).optional(),
1472
+ /**
1473
+ * The company's rules this ad departs from because the person asked for it, each with why
1474
+ * (`baker creatives rules list`): a person's explicit ask beats a rule, visibly.
1475
+ */
1476
+ waive: z3.array(z3.object({ rule: z3.string().trim().min(1), why: z3.string().trim().min(1) }).strict()).optional(),
1477
+ // Bookkeeping: read by the agent and the judge's context, never compiled into a render.
1478
+ source: z3.unknown().optional(),
1479
+ reference: z3.unknown().optional(),
1480
+ notes: z3.unknown().optional()
1481
+ }).strict();
1482
+ function referenceNodeId(reference) {
1483
+ return `ref_${reference.id.toLowerCase()}`;
1484
+ }
1485
+ function isAdSpec(raw) {
1486
+ const schema = raw && typeof raw === "object" ? raw.schema : void 0;
1487
+ return AD_SPEC_SCHEMAS.includes(schema);
1488
+ }
1489
+ function seesReferenceStructure(spec) {
1490
+ const concept = spec.concept;
1491
+ if (!concept || concept.verdict === "reject") return false;
1492
+ return concept.carry === void 0 || concept.carry === "whole_ad" || concept.carry === "layout";
1493
+ }
1494
+ function conceptSummary(spec) {
1495
+ const concept = spec.concept;
1496
+ if (!concept || concept.verdict === "reject") return null;
1497
+ const carry = concept.carry ?? "whole_ad";
1498
+ if (carry === "angle") return null;
1499
+ const carried = carry === "hook" ? concept.load_bearing.filter((l) => l.job === "stop") : concept.load_bearing;
1500
+ const keepOf = (l) => l.ours?.trim() ? `${l.ours.trim()} (the role ${l.element} plays)` : l.element;
1501
+ const mustKeep = carried.map(keepOf);
1502
+ const vital = carry === "layout" ? [] : carried.flatMap((l) => isVital(l) ? [{ keep: keepOf(l), job: l.job }] : []);
1503
+ const { disguise, voice } = concept.why_it_wins;
1504
+ const idea = carry === "whole_ad" ? [disguise?.trim(), voice?.trim() ? `in the voice of ${voice.trim()}` : ""].filter(Boolean).join(", ") : "";
1505
+ return { mustKeep, ...idea ? { idea } : {}, ...vital.length > 0 ? { vital } : {} };
1506
+ }
1507
+ function conceptProblems(spec) {
1508
+ const concept = spec.concept;
1509
+ if (!concept) return [];
1510
+ const problems = [];
1511
+ if (concept.verdict === "reject") {
1512
+ problems.push(
1513
+ "The reference was judged not to fit this company (`concept.verdict: reject`): what it wins on is something we cannot supply. Do not stop or ask: check the next candidates from your search (`baker winning-ads fit <adId>`, about three) and scaffold this concept on the first that fits."
1514
+ );
1515
+ }
1516
+ for (const element of concept.load_bearing) {
1517
+ if (isVital(element) || element.have !== "missing" || element.ours?.trim()) continue;
1518
+ problems.push(
1519
+ `"${element.element}" is what the reference wins on and we have nothing for it: name what of ours carries it (\`ours\`), or pick another reference.`
1520
+ );
1521
+ }
1522
+ return problems;
1523
+ }
1524
+ var PLACEHOLDER = "[TODO";
1525
+ function unwrittenProblems(spec) {
1526
+ const problems = [];
1527
+ if (spec.scene.description.includes(PLACEHOLDER)) {
1528
+ problems.push("The scene is still a placeholder: write what the viewer sees in `scene.description`.");
1529
+ }
1530
+ const lines = spec.copy.filter((line) => line.text.includes(PLACEHOLDER));
1531
+ if (lines.length > 0) {
1532
+ problems.push(`${lines.length} line(s) of copy are still placeholders: write each as it prints, or drop it.`);
1533
+ }
1534
+ return problems;
1535
+ }
1536
+ var QUOTED = /"([^"]{2,})"|“([^”]{2,})”|(?<![\p{L}\p{N}])['‘]([^'’]{2,}?)['’](?![\p{L}\p{N}])/gu;
1537
+ var FIGURE = /[£$€]\s?\d[\d.,]*|\d+(?:[.,]\d+)?\s?%/g;
1538
+ var comparable = (text) => text.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").toLowerCase().replace(/[^\p{L}\p{N}£$€%]+/gu, " ").trim();
1539
+ function sceneWordProblems(spec) {
1540
+ const held = [...spec.copy.map((l) => l.text), ...spec.scene_text].map(comparable);
1541
+ const holds = (text) => {
1542
+ const want = comparable(text);
1543
+ return want.length === 0 || held.some((h) => h.includes(want));
1544
+ };
1545
+ const scene = [spec.scene.description, spec.scene.layout ?? ""].join(" ");
1546
+ const quoted = [...scene.matchAll(QUOTED)].map((m) => (m[1] ?? m[2] ?? m[3] ?? "").trim()).filter((q) => !holds(q));
1547
+ const figures = (scene.match(FIGURE) ?? []).map((f) => f.trim()).filter((f) => !holds(f));
1548
+ const unheld = [.../* @__PURE__ */ new Set([...quoted, ...figures])];
1549
+ if (unheld.length === 0) return [];
1550
+ return [
1551
+ `The scene asks the picture to show ${unheld.map((w) => `"${w}"`).join(", ")}, which the copy does not hold: the picture would print it and the run would then spend a round erasing it. Put each one the ad needs in \`copy\` as an \`in_scene\` line with \`on\` (the bill, the phone), or describe that surface without words (blank, blurred, face-down).`
1552
+ ];
1553
+ }
1554
+ var FIELD_SHAPES = {
1555
+ copy: '"copy": [{"text": "Book your free survey", "lettering": "designed", "role": "cta"}]',
1556
+ scene: '"scene": {"description": "a family on a sunny roof terrace", "look": "photo"}',
1557
+ colors: '"colors": [{"object": "the button", "name": "deep green", "hex": "#1F5C3A"}]',
1558
+ references: '"references": [{"id": "PRODUCT_1", "role": "product", "what": "the solar panel kit"}]',
1559
+ third_party_brands: '"third_party_brands": [{"name": "Trustpilot", "role": "proof", "logo": "BADGE_1"}]',
1560
+ mechanism: '"mechanism": [{"device": "a before and after", "why_it_works": "the change is seen, not told"}]',
1561
+ viewer: '"viewer": {"who": "homeowners with high energy bills", "knows": "nothing about us yet"}'
1562
+ };
1563
+ var SPEC_SHAPES_HINT = `prompt.json shapes: ${["copy", "colors", "viewer"].map((f) => FIELD_SHAPES[f]).join("; ")}.`;
1564
+ function adSpecErrorText(e) {
1565
+ if (!(e instanceof z3.ZodError)) return e instanceof Error ? e.message : String(e);
1566
+ const items = /* @__PURE__ */ new Map();
1567
+ for (const issue of e.issues) {
1568
+ const [field2, index, key] = issue.path;
1569
+ const at = typeof index === "number" ? `${String(field2)}[${index}]` : issue.path.map(String).join(".") || "the spec";
1570
+ const what = issue.code === "unrecognized_keys" ? `no field ${issue.keys.map((k) => `"${k}"`).join(", ")}` : key !== void 0 && typeof index === "number" ? `"${String(key)}" ${issue.message.replace(/^Invalid input: /, "")}` : issue.message.replace(/^Invalid input: /, "");
1571
+ items.set(at, [...items.get(at) ?? [], what]);
1572
+ }
1573
+ const fields = [...new Set(e.issues.map((i) => String(i.path[0] ?? "")))].filter((f) => FIELD_SHAPES[f]);
1574
+ return [
1575
+ ...[...items].map(([at, whats]) => `${at}: ${[...new Set(whats)].join("; ")}`),
1576
+ ...fields.map((f) => `Shape: ${FIELD_SHAPES[f]}`)
1577
+ ].join("\n");
1578
+ }
1579
+ function readAdSpec(raw) {
1580
+ if (isAdSpec(raw)) return AdSpecSchema.parse(raw);
1581
+ const advertiser = raw?.reference?.advertiser;
1582
+ return adSpecFromBlueprint(raw, { scrub: typeof advertiser === "string" ? [advertiser] : [] });
1583
+ }
1584
+ var HAND_LETTERED = /\b(?:hand[- ]?(?:written|writing|lettered|lettering|drawn)|handwrit\w*|scrawl\w*|scribbl\w*|markers?|felt[- ]?(?:tip|pen)s?|chalked|(?:written|drawn|lettered|painted) by hand)\b/i;
1585
+ var HANDWRITING = new RegExp(
1586
+ `${HAND_LETTERED.source}|\\b(?:chalk\\w*|whiteboards?|blackboards?|sticky[- ]notes?|post[- ]?its?|notepads?|notebooks?|napkins?)\\b`,
1587
+ "i"
1588
+ );
1589
+ var SCENE_SURFACE = /\b(?:bubbles?|chats?|messages?|panels?|cards?|screens?|phones?|apps?|ui|interface|windows?|browsers?|tabs?|menus?|notifications?|dashboards?|tables?|charts?|forms?|fields?|rows?|labels?|tags?|tickets?|receipts?|invoices?|packaging|packages?|boxe?s?|bottles?|jars?|cans?|bags?|signs?|signage|posters?|banners?|billboards?|mugs?|shirts?)\b/i;
1590
+ var letteredOn = (line) => line.on?.trim() || SCENE_SURFACE.exec(`${line.position ?? ""} ${line.look ?? ""}`)?.[0];
1591
+ var handwritten = (line) => {
1592
+ const surface = letteredOn(line);
1593
+ return !surface || HANDWRITING.test(`${surface} ${line.look ?? ""} ${line.position ?? ""}`);
1594
+ };
1595
+ function withRenderedLettering(spec) {
1596
+ const designed = (line) => line.lettering === "in_scene" && handwritten(line);
1597
+ if (!spec.copy.some(designed)) return spec;
1598
+ const copy = spec.copy.map((line) => {
1599
+ if (!designed(line)) return line;
1600
+ const { on, look: _look, position, ...rest } = line;
1601
+ const over = position ?? (on ? `over ${on}` : void 0);
1602
+ return { ...rest, lettering: "designed", ...over ? { position: over } : {} };
1603
+ });
1604
+ return { ...spec, copy };
1605
+ }
1606
+ function conceptClassOf(spec) {
1607
+ if (spec.scene.look === "photo") {
1608
+ return spec.references.some((r) => r.id.startsWith("PERSON_")) ? "photo_people" : "photo";
1609
+ }
1610
+ return spec.scene.look;
1611
+ }
1612
+ var PSEUDO_PRECISE = /\d\s*%|\b\d+(?:\.\d+)?\s?mm\b|\bf\/\s?\d|\bISO\s?\d|\b1\/\d+\s?s\b|\bfocal length\b|\baperture\b/i;
1613
+ var HEX_TOKEN = /\s*#[0-9a-fA-F]{6}\b|\s*#[0-9a-fA-F]{3}\b/g;
1614
+ function plainText(text, scrub = []) {
1615
+ if (typeof text !== "string") return "";
1616
+ let out = text.replace(HEX_TOKEN, "");
1617
+ for (const name of scrub) {
1618
+ const bare = name.replace(/[®™©]/g, "").trim();
1619
+ if (bare.length < 2) continue;
1620
+ out = out.replace(new RegExp(`\\b${bare.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b\\s*[\xAE\u2122\xA9]?`, "gi"), "");
1621
+ }
1622
+ const kept = (text2) => text2.split(/(?<=[,;])/).map((c) => c.trim()).filter((c) => c && !PSEUDO_PRECISE.test(c));
1623
+ out = out.replace(/\s*\(([^()]*)\)\s*([.,;:!?]?)/g, (_m, inner, mark) => {
1624
+ const aside = kept(inner).join(" ").replace(/[,;]\s*$/, "");
1625
+ if (!aside) return mark ? `${mark} ` : " ";
1626
+ return `: ${aside}${mark && mark !== "," ? mark : ","} `;
1627
+ });
1628
+ const clauses = kept(out.replace(/[()]/g, " "));
1629
+ return clauses.join(" ").replace(/\s+([,;.])/g, "$1").replace(/[,;]\s*$/, "").replace(/\s{2,}/g, " ").trim();
1630
+ }
1631
+ var str = (v) => typeof v === "string" && v.trim() ? v.trim() : void 0;
1632
+ var entries = (v) => Array.isArray(v) ? v.filter((e) => Boolean(e) && typeof e === "object") : [];
1633
+ var hexOrUndefined = (v) => {
1634
+ const parsed = Hex2.safeParse(v);
1635
+ return parsed.success ? parsed.data : void 0;
1636
+ };
1637
+ var SURFACES = [
1638
+ "whiteboard",
1639
+ "sticky note",
1640
+ "notepad",
1641
+ "receipt",
1642
+ "packaging",
1643
+ "bottle",
1644
+ "jar",
1645
+ "sign",
1646
+ "screenshot",
1647
+ "phone",
1648
+ "screen",
1649
+ "bubble",
1650
+ "card",
1651
+ "label",
1652
+ "ticket",
1653
+ "notification",
1654
+ "message",
1655
+ "panel"
1656
+ ];
1657
+ function surfaceOf(placement) {
1658
+ const lower = placement?.toLowerCase() ?? "";
1659
+ return SURFACES.find((s) => lower.includes(s));
1660
+ }
1661
+ var TREATMENT_WORDS = {
1662
+ underline: "underlined",
1663
+ arrow: "followed by an arrow",
1664
+ button: "as a button",
1665
+ sticker: "as a sticker",
1666
+ highlight: "highlighted"
1667
+ };
1668
+ function treatmentOf(entry) {
1669
+ const t = str(entry.treatment)?.toLowerCase();
1670
+ if (!t || t === "plain") return void 0;
1671
+ const key = Object.keys(TREATMENT_WORDS).find((k) => t.includes(k));
1672
+ return key ? TREATMENT_WORDS[key] : void 0;
1673
+ }
1674
+ var field = (key, value) => value ? { [key]: value } : {};
1675
+ function copyLineOf(entry, text, scrub) {
1676
+ const placement = str(entry.placement);
1677
+ const common = { text, ...field("role", str(entry.role)), ...field("position", plainText(placement, scrub)) };
1678
+ const treatment = treatmentOf(entry);
1679
+ if (!isInScene(entry)) return { ...common, lettering: "designed", ...field("look", treatment) };
1680
+ const lettering = [plainText(entry.font_characteristics, scrub), treatment].filter(Boolean).join(", ");
1681
+ const surface = surfaceOf(placement);
1682
+ return {
1683
+ ...common,
1684
+ lettering: "in_scene",
1685
+ ...field("on", surface && `the ${surface}`),
1686
+ ...field("look", lettering)
1687
+ };
1688
+ }
1689
+ function copyFromBlueprint(bp, scrub) {
1690
+ const seen = /* @__PURE__ */ new Set();
1691
+ return entries(bp.text_content).flatMap((entry) => {
1692
+ const text = str(entry.text);
1693
+ if (!text || str(entry.role)?.toLowerCase() === "logo" || seen.has(text)) return [];
1694
+ seen.add(text);
1695
+ return [copyLineOf(entry, text, scrub)];
1696
+ });
1697
+ }
1698
+ var PRODUCT_CATEGORY = /product|package|packaging|bottle|box|can\b|jar|tin|pack\b/i;
1699
+ var LIVING_CATEGORY = /animal|pet|dog|cat|character|mascot|creature/i;
1700
+ function referenceRoleOf(collection, entry) {
1701
+ if (collection === "people") return { role: "identity", prefix: "PERSON" };
1702
+ if (collection === "brands_logos") return { role: "prop", prefix: "BADGE" };
1703
+ const category = `${str(entry.category) ?? ""} ${str(entry.treatment) ?? ""}`;
1704
+ if (LIVING_CATEGORY.test(category) || str(entry.expression)) return { role: "identity", prefix: "ANIMAL" };
1705
+ if (PRODUCT_CATEGORY.test(str(entry.category) ?? "")) return { role: "product", prefix: "PRODUCT" };
1706
+ return { role: "prop", prefix: "PROP" };
1707
+ }
1708
+ function referencesFromBlueprint(bp, scrub) {
1709
+ const labelled = ["people", "subjects", "brands_logos"].flatMap((collection) => entries(bp[collection]).map((entry) => ({ collection, entry }))).filter(
1710
+ ({ collection, entry }) => str(entry.reference_image) && !(collection === "brands_logos" && str(entry.function_in_image) === "advertiser_brand")
1711
+ );
1712
+ const counters = /* @__PURE__ */ new Map();
1713
+ const pictured = labelled.map(({ collection, entry }) => {
1714
+ const { role, prefix } = referenceRoleOf(collection, entry);
1715
+ const n = (counters.get(prefix) ?? 0) + 1;
1716
+ counters.set(prefix, n);
1717
+ const described2 = entry.description ?? entry.apparent_identity_or_role ?? entry.what_it_represents;
1718
+ const what = plainText(described2, scrub) || `the ${role === "identity" ? "subject" : role} in this picture`;
1719
+ return { id: `${prefix}_${n}`, role, slot: sanitizeId(`el_${str(entry.reference_image)}`, "el"), what };
1720
+ });
1721
+ const described = entries(bp.subjects).flatMap((entry) => {
1722
+ const what = plainText(entry.description, scrub);
1723
+ if (str(entry.reference_image) || !what || referenceRoleOf("subjects", entry).role !== "product") return [];
1724
+ const n = (counters.get("PRODUCT") ?? 0) + 1;
1725
+ counters.set("PRODUCT", n);
1726
+ return [{ id: `PRODUCT_${n}`, role: "product", what }];
1727
+ });
1728
+ return [...pictured, ...described];
1729
+ }
1730
+ function logoPositionOf(bp, scrub) {
1731
+ const own = entries(bp.brands_logos).find((e) => str(e.function_in_image) === "advertiser_brand");
1732
+ return plainText(own?.placement, scrub) || void 0;
1733
+ }
1734
+ var THIRD_PARTY_FUNCTIONS = /* @__PURE__ */ new Set(["partner", "sponsor"]);
1735
+ function thirdPartyFromBlueprint(bp, scrub, references) {
1736
+ const scrubbed = new Set(scrub.map((n) => n.trim().toLowerCase()));
1737
+ return entries(bp.brands_logos).flatMap((entry) => {
1738
+ const name = str(entry.brand_name);
1739
+ const role = str(entry.function_in_image)?.toLowerCase();
1740
+ if (!name || !role || !THIRD_PARTY_FUNCTIONS.has(role) || scrubbed.has(name.toLowerCase())) return [];
1741
+ const label = str(entry.reference_image);
1742
+ const slot = label ? sanitizeId(`el_${label}`, "el") : void 0;
1743
+ const logo = slot ? references.find((r) => r.slot === slot)?.id : void 0;
1744
+ return [{ name, ...field("what", plainText(entry.what_it_represents, scrub)), ...logo ? { logo } : {} }];
1745
+ });
1746
+ }
1747
+ var sub = (bp, key) => bp[key] && typeof bp[key] === "object" ? bp[key] : {};
1748
+ function lookOf(bp) {
1749
+ const medium = str(sub(bp, "meta").medium)?.toLowerCase() ?? "";
1750
+ if (medium.includes("photo")) return "photo";
1751
+ return /illustration|painting|3d/.test(medium) ? "illustration" : "designed";
1752
+ }
1753
+ function sceneDescriptionOf(bp, scrub) {
1754
+ const environment = sub(bp, "environment");
1755
+ const framing = plainText(sub(bp, "composition").framing, scrub);
1756
+ const setting = plainText(environment.setting, scrub);
1757
+ const things = [
1758
+ ...entries(bp.subjects).map((s) => plainText(s.description, scrub)),
1759
+ plainText(environment.foreground_elements, scrub)
1760
+ ].filter(Boolean);
1761
+ const where = [framing, setting].filter(Boolean).join(", in ");
1762
+ const inFrame = things.length > 0 ? `In the frame: ${things.join("; ")}` : "";
1763
+ return [where, inFrame].filter(Boolean).join(". ") || "The ad's words on the brand's colours";
1764
+ }
1765
+ function captureOf(bp, scrub) {
1766
+ const camera = sub(bp, "camera");
1767
+ const lighting = sub(bp, "lighting");
1768
+ const source = entries(lighting.sources)[0];
1769
+ const direction = source ? str(source.direction) : void 0;
1770
+ const light = source ? plainText(
1771
+ [str(source.quality), str(source.type), "light", direction && `from the ${direction}`].filter(Boolean).join(" "),
1772
+ scrub
1773
+ ) : "";
1774
+ const grain = str(sub(bp, "post_processing").grain);
1775
+ return [
1776
+ plainText(camera.capture, scrub),
1777
+ plainText(camera.viewpoint, scrub),
1778
+ plainText(sub(bp, "composition").camera_height, scrub),
1779
+ plainText(camera.perspective ?? camera.perspective_distortion, scrub),
1780
+ light,
1781
+ plainText(lighting.specular_highlights, scrub),
1782
+ grain && grain !== "none" ? `${plainText(grain)} grain` : ""
1783
+ ].filter(Boolean).join(", ");
1784
+ }
1785
+ function sceneFromBlueprint(bp, scrub) {
1786
+ const look = lookOf(bp);
1787
+ const keywords = sub(bp, "style").mood_keywords;
1788
+ const mood = Array.isArray(keywords) ? keywords.filter((m) => typeof m === "string").join(", ") : "";
1789
+ return {
1790
+ description: sceneDescriptionOf(bp, scrub),
1791
+ look,
1792
+ ...field("capture", look === "photo" ? captureOf(bp, scrub) : void 0),
1793
+ ...field("mood", mood),
1794
+ ...field("layout", plainText(sub(bp, "composition").visual_flow, scrub))
1795
+ };
1796
+ }
1797
+ function colorsFromBlueprint(bp, scrub) {
1798
+ const palette = entries(bp.color?.palette);
1799
+ return palette.flatMap((c) => {
1800
+ const object = plainText(c.where, scrub);
1801
+ const name = plainText(c.name, scrub);
1802
+ const hex = hexOrUndefined(c.hex);
1803
+ return object && name ? [{ object, name, ...hex ? { hex } : {} }] : [];
1804
+ });
1805
+ }
1806
+ function typefaceFromFonts(bp) {
1807
+ const fonts = entries(bp.fonts);
1808
+ const font = fonts.find((f) => /headline/i.test(str(f.used_for) ?? "")) ?? fonts[0];
1809
+ const kind = plainText(font?.classification);
1810
+ const family = plainText(font?.family_guess);
1811
+ if (!kind && !family) return void 0;
1812
+ if (!kind) return family;
1813
+ return family ? `a ${kind} face like ${family}` : `a ${kind} face`;
1814
+ }
1815
+ function brandFromBlueprint(bp) {
1816
+ const b = bp.brand;
1817
+ const typeface = str(b?.typeface) ?? typefaceFromFonts(bp);
1818
+ if (!b || typeof b !== "object") return typeface ? { typeface, palette: [] } : void 0;
1819
+ const palette = Array.isArray(b.palette) ? b.palette.map(hexOrUndefined).filter((h) => Boolean(h)) : [];
1820
+ const roles = Object.fromEntries(
1821
+ ["ground", "ink", "accent", "cta"].flatMap((k) => {
1822
+ const hex = hexOrUndefined(b[k]);
1823
+ return hex ? [[k, hex]] : [];
1824
+ })
1825
+ );
1826
+ const name = str(b.name);
1827
+ return { ...name ? { name } : {}, ...typeface ? { typeface } : {}, ...roles, palette };
1828
+ }
1829
+ function adSpecFromBlueprint(raw, opts = {}) {
1830
+ const bp = raw && typeof raw === "object" ? raw : {};
1831
+ const scrub = opts.scrub ?? [];
1832
+ const intent = bp.ad_intent ?? {};
1833
+ const brand = brandFromBlueprint(bp);
1834
+ const message = str(intent.viewer_takeaway);
1835
+ const viewer = Viewer.safeParse(bp.viewer);
1836
+ const references = referencesFromBlueprint(bp, scrub);
1837
+ const presence = opts.presence ?? (bp.brand_presence === "native" ? "native" : "standard");
1838
+ return {
1839
+ schema: AD_SPEC_SCHEMA,
1840
+ ...viewer.success ? { viewer: viewer.data } : {},
1841
+ ...message ? { message: plainText(message, scrub) } : {},
1842
+ copy: copyFromBlueprint(bp, scrub),
1843
+ scene: sceneFromBlueprint(bp, scrub),
1844
+ ...brand ? { brand } : {},
1845
+ colors: colorsFromBlueprint(bp, scrub),
1846
+ references,
1847
+ logo: bp.logo === false ? false : presence === "native" ? conceptHasLogo(bp) : true,
1848
+ third_party_brands: thirdPartyFromBlueprint(bp, scrub, references),
1849
+ scene_text: [],
1850
+ ...field("logo_position", logoPositionOf(bp, scrub)),
1851
+ mechanism: winningMechanisms(bp).flatMap((m) => {
1852
+ const device = plainText(m.device, scrub);
1853
+ const why = m.why_it_works ? plainText(m.why_it_works, scrub) : "";
1854
+ return device ? [{ device, ...field("why_it_works", why) }] : [];
1855
+ }),
1856
+ ...bp.reference !== void 0 ? { reference: bp.reference } : {}
1857
+ };
1858
+ }
1859
+ function adSpecJsonSchema() {
1860
+ return z3.toJSONSchema(AdSpecSchema, { io: "input", unrepresentable: "any" });
1861
+ }
1862
+
1863
+ export {
1864
+ ACTOR_SHEET_MODEL,
1865
+ sanitizeId,
1866
+ assignElementLabels,
1867
+ referenceRole,
1868
+ elementTodo,
1869
+ namedPlatform,
1870
+ jevCitationJudge,
1871
+ citedPlatforms,
1872
+ citedBy,
1873
+ figureForms,
1874
+ nativeSurfaceName,
1875
+ nativeCopy,
1876
+ nativeChrome,
1877
+ nativePhotosShown,
1878
+ avatarPhotoIds,
1879
+ nativeGateProblems,
1880
+ needsInterfaceWords,
1881
+ INTERFACE_WORDS_PROMPT_VERSION,
1882
+ interfaceWordsPrompt,
1883
+ readInterfaceWords,
1884
+ frameGround,
1885
+ nativeSurfaceHtml,
1886
+ COPY_DIRECTIVE_HEADER,
1887
+ copyStrings,
1888
+ inSceneText,
1889
+ winningMechanisms,
1890
+ specimenText,
1891
+ textFidelityDirective,
1892
+ replaceCopyDirective,
1893
+ AD_SPEC_SCHEMA,
1894
+ isMemeTemplate,
1895
+ CONCEPT_CARRY_LEVELS,
1896
+ withDerivedHave,
1897
+ LOAD_BEARING_FIELDS,
1898
+ decisionOf,
1899
+ unfitReasons,
1900
+ isVital,
1901
+ AdSpecSchema,
1902
+ referenceNodeId,
1903
+ isAdSpec,
1904
+ seesReferenceStructure,
1905
+ conceptSummary,
1906
+ conceptProblems,
1907
+ unwrittenProblems,
1908
+ sceneWordProblems,
1909
+ SPEC_SHAPES_HINT,
1910
+ adSpecErrorText,
1911
+ readAdSpec,
1912
+ HAND_LETTERED,
1913
+ withRenderedLettering,
1914
+ conceptClassOf,
1915
+ plainText,
1916
+ adSpecFromBlueprint,
1917
+ adSpecJsonSchema
1918
+ };
1919
+ //# sourceMappingURL=chunk-XU6XQPNM.js.map