@mistriwork/mistri 1.0.0-rc.55 → 1.0.0-rc.56

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 (1159) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +1 -1
  3. package/dist/client/assets/AccountAdministration-BEFVSrBc.js +2 -0
  4. package/dist/client/assets/AccountAdministration-BEFVSrBc.js.br +0 -0
  5. package/dist/client/assets/AccountAdministration-BEFVSrBc.js.gz +0 -0
  6. package/dist/client/assets/AccountAdministration-BEFVSrBc.js.map +1 -0
  7. package/dist/client/assets/AccountControl-BAqIxGya.js +3 -0
  8. package/dist/client/assets/AccountControl-BAqIxGya.js.br +0 -0
  9. package/dist/client/assets/AccountControl-BAqIxGya.js.gz +0 -0
  10. package/dist/client/assets/AccountControl-BAqIxGya.js.map +1 -0
  11. package/dist/client/assets/AccountProfile-B3IgWjgQ.js +2 -0
  12. package/dist/client/assets/AccountProfile-B3IgWjgQ.js.br +0 -0
  13. package/dist/client/assets/AccountProfile-B3IgWjgQ.js.gz +0 -0
  14. package/dist/client/assets/AccountProfile-B3IgWjgQ.js.map +1 -0
  15. package/dist/client/assets/ApiOperations-CMf0Xs25.js +2 -0
  16. package/dist/client/assets/ApiOperations-CMf0Xs25.js.br +0 -0
  17. package/dist/client/assets/ApiOperations-CMf0Xs25.js.gz +0 -0
  18. package/dist/client/assets/ApiOperations-CMf0Xs25.js.map +1 -0
  19. package/dist/client/assets/AppColumnMenuPopups-Br8fjj7B.js +2 -0
  20. package/dist/client/assets/AppColumnMenuPopups-Br8fjj7B.js.br +0 -0
  21. package/dist/client/assets/AppColumnMenuPopups-Br8fjj7B.js.gz +0 -0
  22. package/dist/client/assets/AppColumnMenuPopups-Br8fjj7B.js.map +1 -0
  23. package/dist/client/assets/AsOfChip-a0RplKGi.js +2 -0
  24. package/dist/client/assets/AsOfChip-a0RplKGi.js.br +4 -0
  25. package/dist/client/assets/AsOfChip-a0RplKGi.js.gz +0 -0
  26. package/dist/client/assets/AsOfChip-a0RplKGi.js.map +1 -0
  27. package/dist/client/assets/AssistantPanel-BLS9AxEl.js +3 -0
  28. package/dist/client/assets/AssistantPanel-BLS9AxEl.js.br +0 -0
  29. package/dist/client/assets/AssistantPanel-BLS9AxEl.js.gz +0 -0
  30. package/dist/client/assets/AssistantPanel-BLS9AxEl.js.map +1 -0
  31. package/dist/client/assets/AttachmentList-DJ8wm38t.js +3 -0
  32. package/dist/client/assets/AttachmentList-DJ8wm38t.js.br +0 -0
  33. package/dist/client/assets/AttachmentList-DJ8wm38t.js.gz +0 -0
  34. package/dist/client/assets/AttachmentList-DJ8wm38t.js.map +1 -0
  35. package/dist/client/assets/BoardCardEditor-CPAGTthc.js +2 -0
  36. package/dist/client/assets/BoardCardEditor-CPAGTthc.js.br +0 -0
  37. package/dist/client/assets/BoardCardEditor-CPAGTthc.js.gz +0 -0
  38. package/dist/client/assets/BoardCardEditor-CPAGTthc.js.map +1 -0
  39. package/dist/client/assets/BoardList-gVxJ-cwD.js +5 -0
  40. package/dist/client/assets/BoardList-gVxJ-cwD.js.br +0 -0
  41. package/dist/client/assets/BoardList-gVxJ-cwD.js.gz +0 -0
  42. package/dist/client/assets/BoardList-gVxJ-cwD.js.map +1 -0
  43. package/dist/client/assets/BrandingForm-eRqUdbav.js +2 -0
  44. package/dist/client/assets/BrandingForm-eRqUdbav.js.br +0 -0
  45. package/dist/client/assets/BrandingForm-eRqUdbav.js.gz +0 -0
  46. package/dist/client/assets/BrandingForm-eRqUdbav.js.map +1 -0
  47. package/dist/client/assets/BreakdownRoom-Dkp3r4uH.js +2 -0
  48. package/dist/client/assets/BreakdownRoom-Dkp3r4uH.js.br +0 -0
  49. package/dist/client/assets/BreakdownRoom-Dkp3r4uH.js.gz +0 -0
  50. package/dist/client/assets/BreakdownRoom-Dkp3r4uH.js.map +1 -0
  51. package/dist/client/assets/CalendarList-DkbgEtsr.js +2 -0
  52. package/dist/client/assets/CalendarList-DkbgEtsr.js.br +0 -0
  53. package/dist/client/assets/CalendarList-DkbgEtsr.js.gz +0 -0
  54. package/dist/client/assets/CalendarList-DkbgEtsr.js.map +1 -0
  55. package/dist/client/assets/CardsList-DESCe0Se.js +2 -0
  56. package/dist/client/assets/CardsList-DESCe0Se.js.br +0 -0
  57. package/dist/client/assets/CardsList-DESCe0Se.js.gz +0 -0
  58. package/dist/client/assets/CardsList-DESCe0Se.js.map +1 -0
  59. package/dist/client/assets/Chart-BJtwslq1.js +2 -0
  60. package/dist/client/assets/Chart-BJtwslq1.js.br +0 -0
  61. package/dist/client/assets/Chart-BJtwslq1.js.gz +0 -0
  62. package/dist/client/assets/Chart-BJtwslq1.js.map +1 -0
  63. package/dist/client/assets/ChartFigure-B9paSqQQ.js +3 -0
  64. package/dist/client/assets/ChartFigure-B9paSqQQ.js.br +0 -0
  65. package/dist/client/assets/ChartFigure-B9paSqQQ.js.gz +0 -0
  66. package/dist/client/assets/ChartFigure-B9paSqQQ.js.map +1 -0
  67. package/dist/client/assets/ChartShapes-C0yo8HZH.js +2 -0
  68. package/dist/client/assets/ChartShapes-C0yo8HZH.js.br +0 -0
  69. package/dist/client/assets/ChartShapes-C0yo8HZH.js.gz +0 -0
  70. package/dist/client/assets/ChartShapes-C0yo8HZH.js.map +1 -0
  71. package/dist/client/assets/CheckedAppTargetAction-qY9CPkEO.js +2 -0
  72. package/dist/client/assets/CheckedAppTargetAction-qY9CPkEO.js.br +0 -0
  73. package/dist/client/assets/CheckedAppTargetAction-qY9CPkEO.js.gz +0 -0
  74. package/dist/client/assets/CheckedAppTargetAction-qY9CPkEO.js.map +1 -0
  75. package/dist/client/assets/Choices-GdRNH_mx.js +2 -0
  76. package/dist/client/assets/Choices-GdRNH_mx.js.br +0 -0
  77. package/dist/client/assets/Choices-GdRNH_mx.js.gz +0 -0
  78. package/dist/client/assets/Choices-GdRNH_mx.js.map +1 -0
  79. package/dist/client/assets/ClaimInvitation-YeXU1LEs.js +2 -0
  80. package/dist/client/assets/ClaimInvitation-YeXU1LEs.js.br +0 -0
  81. package/dist/client/assets/ClaimInvitation-YeXU1LEs.js.gz +0 -0
  82. package/dist/client/assets/ClaimInvitation-YeXU1LEs.js.map +1 -0
  83. package/dist/client/assets/CommandAnswers-DNQXXN24.js +2 -0
  84. package/dist/client/assets/CommandAnswers-DNQXXN24.js.br +0 -0
  85. package/dist/client/assets/CommandAnswers-DNQXXN24.js.gz +0 -0
  86. package/dist/client/assets/CommandAnswers-DNQXXN24.js.map +1 -0
  87. package/dist/client/assets/CommandForm-BnrRo7i9.js +3 -0
  88. package/dist/client/assets/CommandForm-BnrRo7i9.js.br +0 -0
  89. package/dist/client/assets/CommandForm-BnrRo7i9.js.gz +0 -0
  90. package/dist/client/assets/CommandForm-BnrRo7i9.js.map +1 -0
  91. package/dist/client/assets/CommandLines-D5rQCQR_.js +2 -0
  92. package/dist/client/assets/CommandLines-D5rQCQR_.js.br +0 -0
  93. package/dist/client/assets/CommandLines-D5rQCQR_.js.gz +0 -0
  94. package/dist/client/assets/CommandLines-D5rQCQR_.js.map +1 -0
  95. package/dist/client/assets/CommandLive-daI-q2kN.js +2 -0
  96. package/dist/client/assets/CommandLive-daI-q2kN.js.br +0 -0
  97. package/dist/client/assets/CommandLive-daI-q2kN.js.gz +0 -0
  98. package/dist/client/assets/CommandLive-daI-q2kN.js.map +1 -0
  99. package/dist/client/assets/CommandReference-CWNRBkVG.js +3 -0
  100. package/dist/client/assets/CommandReference-CWNRBkVG.js.br +0 -0
  101. package/dist/client/assets/CommandReference-CWNRBkVG.js.gz +0 -0
  102. package/dist/client/assets/CommandReference-CWNRBkVG.js.map +1 -0
  103. package/dist/client/assets/Composer-BgFzO7NO.js +5 -0
  104. package/dist/client/assets/Composer-BgFzO7NO.js.br +0 -0
  105. package/dist/client/assets/Composer-BgFzO7NO.js.gz +0 -0
  106. package/dist/client/assets/Composer-BgFzO7NO.js.map +1 -0
  107. package/dist/client/assets/CountedLabel-C-ukQQwd.js +2 -0
  108. package/dist/client/assets/CountedLabel-C-ukQQwd.js.br +0 -0
  109. package/dist/client/assets/CountedLabel-C-ukQQwd.js.gz +0 -0
  110. package/dist/client/assets/CountedLabel-C-ukQQwd.js.map +1 -0
  111. package/dist/client/assets/CustomList-CMeXLiRs.js +2 -0
  112. package/dist/client/assets/CustomList-CMeXLiRs.js.br +0 -0
  113. package/dist/client/assets/CustomList-CMeXLiRs.js.gz +0 -0
  114. package/dist/client/assets/CustomList-CMeXLiRs.js.map +1 -0
  115. package/dist/client/assets/CustomPage-DxbIpGFy.js +3 -0
  116. package/dist/client/assets/CustomPage-DxbIpGFy.js.br +0 -0
  117. package/dist/client/assets/CustomPage-DxbIpGFy.js.gz +0 -0
  118. package/dist/client/assets/CustomPage-DxbIpGFy.js.map +1 -0
  119. package/dist/client/assets/CustomSection-CYzi7Lj9.js +2 -0
  120. package/dist/client/assets/CustomSection-CYzi7Lj9.js.br +0 -0
  121. package/dist/client/assets/CustomSection-CYzi7Lj9.js.gz +0 -0
  122. package/dist/client/assets/CustomSection-CYzi7Lj9.js.map +1 -0
  123. package/dist/client/assets/Dashboard-BUGK3zGI.js +3 -0
  124. package/dist/client/assets/Dashboard-BUGK3zGI.js.br +0 -0
  125. package/dist/client/assets/Dashboard-BUGK3zGI.js.gz +0 -0
  126. package/dist/client/assets/Dashboard-BUGK3zGI.js.map +1 -0
  127. package/dist/client/assets/DashboardActivity-BB4qsDzC.js +2 -0
  128. package/dist/client/assets/DashboardActivity-BB4qsDzC.js.br +0 -0
  129. package/dist/client/assets/DashboardActivity-BB4qsDzC.js.gz +0 -0
  130. package/dist/client/assets/DashboardActivity-BB4qsDzC.js.map +1 -0
  131. package/dist/client/assets/DashboardFind-CMIsCwb3.js +2 -0
  132. package/dist/client/assets/DashboardFind-CMIsCwb3.js.br +0 -0
  133. package/dist/client/assets/DashboardFind-CMIsCwb3.js.gz +0 -0
  134. package/dist/client/assets/DashboardFind-CMIsCwb3.js.map +1 -0
  135. package/dist/client/assets/DashboardList-iW9Gql3w.js +2 -0
  136. package/dist/client/assets/DashboardList-iW9Gql3w.js.br +2 -0
  137. package/dist/client/assets/DashboardList-iW9Gql3w.js.gz +0 -0
  138. package/dist/client/assets/DashboardList-iW9Gql3w.js.map +1 -0
  139. package/dist/client/assets/DateTimeInput-DV8fZohg.js +2 -0
  140. package/dist/client/assets/DateTimeInput-DV8fZohg.js.br +0 -0
  141. package/dist/client/assets/DateTimeInput-DV8fZohg.js.gz +0 -0
  142. package/dist/client/assets/DateTimeInput-DV8fZohg.js.map +1 -0
  143. package/dist/client/assets/DecisionChip-C3cDys1Z.js +2 -0
  144. package/dist/client/assets/DecisionChip-C3cDys1Z.js.br +0 -0
  145. package/dist/client/assets/DecisionChip-C3cDys1Z.js.gz +0 -0
  146. package/dist/client/assets/DecisionChip-C3cDys1Z.js.map +1 -0
  147. package/dist/client/assets/DefinedFields-3n2Soz-Y.js +2 -0
  148. package/dist/client/assets/DefinedFields-3n2Soz-Y.js.br +0 -0
  149. package/dist/client/assets/DefinedFields-3n2Soz-Y.js.gz +0 -0
  150. package/dist/client/assets/DefinedFields-3n2Soz-Y.js.map +1 -0
  151. package/dist/client/assets/Diagram-CKGgpgPM.js +6 -0
  152. package/dist/client/assets/Diagram-CKGgpgPM.js.br +0 -0
  153. package/dist/client/assets/Diagram-CKGgpgPM.js.gz +0 -0
  154. package/dist/client/assets/Diagram-CKGgpgPM.js.map +1 -0
  155. package/dist/client/assets/Directory-DJVpV7IV.js +2 -0
  156. package/dist/client/assets/Directory-DJVpV7IV.js.br +0 -0
  157. package/dist/client/assets/Directory-DJVpV7IV.js.gz +0 -0
  158. package/dist/client/assets/Directory-DJVpV7IV.js.map +1 -0
  159. package/dist/client/assets/Document-C8JqEzQm.js +2 -0
  160. package/dist/client/assets/Document-C8JqEzQm.js.br +0 -0
  161. package/dist/client/assets/Document-C8JqEzQm.js.gz +0 -0
  162. package/dist/client/assets/Document-C8JqEzQm.js.map +1 -0
  163. package/dist/client/assets/Export-C0b_yEEy.js +2 -0
  164. package/dist/client/assets/Export-C0b_yEEy.js.br +0 -0
  165. package/dist/client/assets/Export-C0b_yEEy.js.gz +0 -0
  166. package/dist/client/assets/Export-C0b_yEEy.js.map +1 -0
  167. package/dist/client/assets/FilePreview-w7BXsOyx.js +2 -0
  168. package/dist/client/assets/FilePreview-w7BXsOyx.js.br +0 -0
  169. package/dist/client/assets/FilePreview-w7BXsOyx.js.gz +0 -0
  170. package/dist/client/assets/FilePreview-w7BXsOyx.js.map +1 -0
  171. package/dist/client/assets/FormClaimSurface-5vq42d7b.js +2 -0
  172. package/dist/client/assets/FormClaimSurface-5vq42d7b.js.br +0 -0
  173. package/dist/client/assets/FormClaimSurface-5vq42d7b.js.gz +0 -0
  174. package/dist/client/assets/FormClaimSurface-5vq42d7b.js.map +1 -0
  175. package/dist/client/assets/FormDialog-3yKMuF7B.js +3 -0
  176. package/dist/client/assets/FormDialog-3yKMuF7B.js.br +0 -0
  177. package/dist/client/assets/FormDialog-3yKMuF7B.js.gz +0 -0
  178. package/dist/client/assets/FormDialog-3yKMuF7B.js.map +1 -0
  179. package/dist/client/assets/FormLines-CY1C9COP.js +2 -0
  180. package/dist/client/assets/FormLines-CY1C9COP.js.br +0 -0
  181. package/dist/client/assets/FormLines-CY1C9COP.js.gz +0 -0
  182. package/dist/client/assets/FormLines-CY1C9COP.js.map +1 -0
  183. package/dist/client/assets/FormParts-DJVp_owY.js +2 -0
  184. package/dist/client/assets/FormParts-DJVp_owY.js.br +0 -0
  185. package/dist/client/assets/FormParts-DJVp_owY.js.gz +0 -0
  186. package/dist/client/assets/FormParts-DJVp_owY.js.map +1 -0
  187. package/dist/client/assets/FormStatusSurface-CPMwa7QE.js +2 -0
  188. package/dist/client/assets/FormStatusSurface-CPMwa7QE.js.br +0 -0
  189. package/dist/client/assets/FormStatusSurface-CPMwa7QE.js.gz +0 -0
  190. package/dist/client/assets/FormStatusSurface-CPMwa7QE.js.map +1 -0
  191. package/dist/client/assets/Gallery-B_LLDDUw.js +3 -0
  192. package/dist/client/assets/Gallery-B_LLDDUw.js.br +0 -0
  193. package/dist/client/assets/Gallery-B_LLDDUw.js.gz +0 -0
  194. package/dist/client/assets/Gallery-B_LLDDUw.js.map +1 -0
  195. package/dist/client/assets/GanttList-y1Wk45kW.js +2 -0
  196. package/dist/client/assets/GanttList-y1Wk45kW.js.br +0 -0
  197. package/dist/client/assets/GanttList-y1Wk45kW.js.gz +0 -0
  198. package/dist/client/assets/GanttList-y1Wk45kW.js.map +1 -0
  199. package/dist/client/assets/GridCellEditor-Cwvx04N5.js +2 -0
  200. package/dist/client/assets/GridCellEditor-Cwvx04N5.js.br +0 -0
  201. package/dist/client/assets/GridCellEditor-Cwvx04N5.js.gz +0 -0
  202. package/dist/client/assets/GridCellEditor-Cwvx04N5.js.map +1 -0
  203. package/dist/client/assets/HeldFiles-DUHxhq9d.js +3 -0
  204. package/dist/client/assets/HeldFiles-DUHxhq9d.js.br +0 -0
  205. package/dist/client/assets/HeldFiles-DUHxhq9d.js.gz +0 -0
  206. package/dist/client/assets/HeldFiles-DUHxhq9d.js.map +1 -0
  207. package/dist/client/assets/HelpPanel-Di2tvhfb.js +2 -0
  208. package/dist/client/assets/HelpPanel-Di2tvhfb.js.br +0 -0
  209. package/dist/client/assets/HelpPanel-Di2tvhfb.js.gz +0 -0
  210. package/dist/client/assets/HelpPanel-Di2tvhfb.js.map +1 -0
  211. package/dist/client/assets/ImportDialog-B4EbMpGl.js +9 -0
  212. package/dist/client/assets/ImportDialog-B4EbMpGl.js.br +0 -0
  213. package/dist/client/assets/ImportDialog-B4EbMpGl.js.gz +0 -0
  214. package/dist/client/assets/ImportDialog-B4EbMpGl.js.map +1 -0
  215. package/dist/client/assets/InboxList-BvJpcz1L.js +2 -0
  216. package/dist/client/assets/InboxList-BvJpcz1L.js.br +0 -0
  217. package/dist/client/assets/InboxList-BvJpcz1L.js.gz +0 -0
  218. package/dist/client/assets/InboxList-BvJpcz1L.js.map +1 -0
  219. package/dist/client/assets/IntakeControls-Dy3rMrg5.js +2 -0
  220. package/dist/client/assets/IntakeControls-Dy3rMrg5.js.br +0 -0
  221. package/dist/client/assets/IntakeControls-Dy3rMrg5.js.gz +0 -0
  222. package/dist/client/assets/IntakeControls-Dy3rMrg5.js.map +1 -0
  223. package/dist/client/assets/IntegrationsForm-DTjGOAv5.js +2 -0
  224. package/dist/client/assets/IntegrationsForm-DTjGOAv5.js.br +0 -0
  225. package/dist/client/assets/IntegrationsForm-DTjGOAv5.js.gz +0 -0
  226. package/dist/client/assets/IntegrationsForm-DTjGOAv5.js.map +1 -0
  227. package/dist/client/assets/JsonView-DmrwXpyM.js +4 -0
  228. package/dist/client/assets/JsonView-DmrwXpyM.js.br +0 -0
  229. package/dist/client/assets/JsonView-DmrwXpyM.js.gz +0 -0
  230. package/dist/client/assets/JsonView-DmrwXpyM.js.map +1 -0
  231. package/dist/client/assets/LayoutBuilder-DBAvjJEg.js +2 -0
  232. package/dist/client/assets/LayoutBuilder-DBAvjJEg.js.br +0 -0
  233. package/dist/client/assets/LayoutBuilder-DBAvjJEg.js.gz +0 -0
  234. package/dist/client/assets/LayoutBuilder-DBAvjJEg.js.map +1 -0
  235. package/dist/client/assets/Lightbox-C_vo7dPe.js +2 -0
  236. package/dist/client/assets/Lightbox-C_vo7dPe.js.br +0 -0
  237. package/dist/client/assets/Lightbox-C_vo7dPe.js.gz +0 -0
  238. package/dist/client/assets/Lightbox-C_vo7dPe.js.map +1 -0
  239. package/dist/client/assets/LiveNotices-QbVC63BG.js +2 -0
  240. package/dist/client/assets/LiveNotices-QbVC63BG.js.br +0 -0
  241. package/dist/client/assets/LiveNotices-QbVC63BG.js.gz +0 -0
  242. package/dist/client/assets/LiveNotices-QbVC63BG.js.map +1 -0
  243. package/dist/client/assets/MinorMoneyInput-BOL3gPaK.js +2 -0
  244. package/dist/client/assets/MinorMoneyInput-BOL3gPaK.js.br +0 -0
  245. package/dist/client/assets/MinorMoneyInput-BOL3gPaK.js.gz +0 -0
  246. package/dist/client/assets/MinorMoneyInput-BOL3gPaK.js.map +1 -0
  247. package/dist/client/assets/MultiStepForm-D23AjYF_.js +3 -0
  248. package/dist/client/assets/MultiStepForm-D23AjYF_.js.br +0 -0
  249. package/dist/client/assets/MultiStepForm-D23AjYF_.js.gz +0 -0
  250. package/dist/client/assets/MultiStepForm-D23AjYF_.js.map +1 -0
  251. package/dist/client/assets/NewMenu-B8j3Zi8s.js +2 -0
  252. package/dist/client/assets/NewMenu-B8j3Zi8s.js.br +0 -0
  253. package/dist/client/assets/NewMenu-B8j3Zi8s.js.gz +0 -0
  254. package/dist/client/assets/NewMenu-B8j3Zi8s.js.map +1 -0
  255. package/dist/client/assets/NewRecord-BAg40Hhp.js +3 -0
  256. package/dist/client/assets/NewRecord-BAg40Hhp.js.br +0 -0
  257. package/dist/client/assets/NewRecord-BAg40Hhp.js.gz +0 -0
  258. package/dist/client/assets/NewRecord-BAg40Hhp.js.map +1 -0
  259. package/dist/client/assets/PageFlowDiagram-C51TfpoJ.js +3 -0
  260. package/dist/client/assets/PageFlowDiagram-C51TfpoJ.js.br +0 -0
  261. package/dist/client/assets/PageFlowDiagram-C51TfpoJ.js.gz +0 -0
  262. package/dist/client/assets/PageFlowDiagram-C51TfpoJ.js.map +1 -0
  263. package/dist/client/assets/PageFlows-BiSv9bqL.js +2 -0
  264. package/dist/client/assets/PageFlows-BiSv9bqL.js.br +0 -0
  265. package/dist/client/assets/PageFlows-BiSv9bqL.js.gz +0 -0
  266. package/dist/client/assets/PageFlows-BiSv9bqL.js.map +1 -0
  267. package/dist/client/assets/PageGroups-tVhbOtn7.js +2 -0
  268. package/dist/client/assets/PageGroups-tVhbOtn7.js.br +0 -0
  269. package/dist/client/assets/PageGroups-tVhbOtn7.js.gz +0 -0
  270. package/dist/client/assets/PageGroups-tVhbOtn7.js.map +1 -0
  271. package/dist/client/assets/PageHistory-9Nz4Pjoh.js +2 -0
  272. package/dist/client/assets/PageHistory-9Nz4Pjoh.js.br +0 -0
  273. package/dist/client/assets/PageHistory-9Nz4Pjoh.js.gz +0 -0
  274. package/dist/client/assets/PageHistory-9Nz4Pjoh.js.map +1 -0
  275. package/dist/client/assets/PageSkeleton-BJNN5V-p.js +2 -0
  276. package/dist/client/assets/PageSkeleton-BJNN5V-p.js.br +0 -0
  277. package/dist/client/assets/PageSkeleton-BJNN5V-p.js.gz +0 -0
  278. package/dist/client/assets/PageSkeleton-BJNN5V-p.js.map +1 -0
  279. package/dist/client/assets/Palette-BZN_2UF7.js +3 -0
  280. package/dist/client/assets/Palette-BZN_2UF7.js.br +0 -0
  281. package/dist/client/assets/Palette-BZN_2UF7.js.gz +0 -0
  282. package/dist/client/assets/Palette-BZN_2UF7.js.map +1 -0
  283. package/dist/client/assets/PeekPanel-DqB7Qabw.js +2 -0
  284. package/dist/client/assets/PeekPanel-DqB7Qabw.js.br +0 -0
  285. package/dist/client/assets/PeekPanel-DqB7Qabw.js.gz +0 -0
  286. package/dist/client/assets/PeekPanel-DqB7Qabw.js.map +1 -0
  287. package/dist/client/assets/PlacedFormSurface-Dole7stp.js +2 -0
  288. package/dist/client/assets/PlacedFormSurface-Dole7stp.js.br +0 -0
  289. package/dist/client/assets/PlacedFormSurface-Dole7stp.js.gz +0 -0
  290. package/dist/client/assets/PlacedFormSurface-Dole7stp.js.map +1 -0
  291. package/dist/client/assets/Prefs-WgpIqvuL.js +2 -0
  292. package/dist/client/assets/Prefs-WgpIqvuL.js.br +0 -0
  293. package/dist/client/assets/Prefs-WgpIqvuL.js.gz +0 -0
  294. package/dist/client/assets/Prefs-WgpIqvuL.js.map +1 -0
  295. package/dist/client/assets/PresentedList-DOTbJvTU.js +2 -0
  296. package/dist/client/assets/PresentedList-DOTbJvTU.js.br +0 -0
  297. package/dist/client/assets/PresentedList-DOTbJvTU.js.gz +0 -0
  298. package/dist/client/assets/PresentedList-DOTbJvTU.js.map +1 -0
  299. package/dist/client/assets/PublicGuard-mSFZn9_g.js +2 -0
  300. package/dist/client/assets/PublicGuard-mSFZn9_g.js.br +0 -0
  301. package/dist/client/assets/PublicGuard-mSFZn9_g.js.gz +0 -0
  302. package/dist/client/assets/PublicGuard-mSFZn9_g.js.map +1 -0
  303. package/dist/client/assets/QrCode-2OEllMUz.js +4 -0
  304. package/dist/client/assets/QrCode-2OEllMUz.js.br +0 -0
  305. package/dist/client/assets/QrCode-2OEllMUz.js.gz +0 -0
  306. package/dist/client/assets/QrCode-2OEllMUz.js.map +1 -0
  307. package/dist/client/assets/QuickAdd-LyBB6Gt9.js +2 -0
  308. package/dist/client/assets/QuickAdd-LyBB6Gt9.js.br +0 -0
  309. package/dist/client/assets/QuickAdd-LyBB6Gt9.js.gz +0 -0
  310. package/dist/client/assets/QuickAdd-LyBB6Gt9.js.map +1 -0
  311. package/dist/client/assets/Record-iCEaV6lG.js +2 -0
  312. package/dist/client/assets/Record-iCEaV6lG.js.br +0 -0
  313. package/dist/client/assets/Record-iCEaV6lG.js.gz +0 -0
  314. package/dist/client/assets/Record-iCEaV6lG.js.map +1 -0
  315. package/dist/client/assets/RecordModal-CLixiup0.js +2 -0
  316. package/dist/client/assets/RecordModal-CLixiup0.js.br +0 -0
  317. package/dist/client/assets/RecordModal-CLixiup0.js.gz +0 -0
  318. package/dist/client/assets/RecordModal-CLixiup0.js.map +1 -0
  319. package/dist/client/assets/RichTextEditor-CXlz-XUb.js +144 -0
  320. package/dist/client/assets/RichTextEditor-CXlz-XUb.js.br +0 -0
  321. package/dist/client/assets/RichTextEditor-CXlz-XUb.js.gz +0 -0
  322. package/dist/client/assets/RichTextEditor-CXlz-XUb.js.map +1 -0
  323. package/dist/client/assets/SavedFormSurface-Db5Gl7DH.js +2 -0
  324. package/dist/client/assets/SavedFormSurface-Db5Gl7DH.js.br +0 -0
  325. package/dist/client/assets/SavedFormSurface-Db5Gl7DH.js.gz +0 -0
  326. package/dist/client/assets/SavedFormSurface-Db5Gl7DH.js.map +1 -0
  327. package/dist/client/assets/SectionPeriod-Ux2j_4Of.js +2 -0
  328. package/dist/client/assets/SectionPeriod-Ux2j_4Of.js.br +0 -0
  329. package/dist/client/assets/SectionPeriod-Ux2j_4Of.js.gz +0 -0
  330. package/dist/client/assets/SectionPeriod-Ux2j_4Of.js.map +1 -0
  331. package/dist/client/assets/SetFieldDialog-B7ixbVq5.js +2 -0
  332. package/dist/client/assets/SetFieldDialog-B7ixbVq5.js.br +0 -0
  333. package/dist/client/assets/SetFieldDialog-B7ixbVq5.js.gz +0 -0
  334. package/dist/client/assets/SetFieldDialog-B7ixbVq5.js.map +1 -0
  335. package/dist/client/assets/SignedInFormDialog-BWf7vI9K.js +2 -0
  336. package/dist/client/assets/SignedInFormDialog-BWf7vI9K.js.br +0 -0
  337. package/dist/client/assets/SignedInFormDialog-BWf7vI9K.js.gz +0 -0
  338. package/dist/client/assets/SignedInFormDialog-BWf7vI9K.js.map +1 -0
  339. package/dist/client/assets/SuggestBox-_0VTy6B5.js +2 -0
  340. package/dist/client/assets/SuggestBox-_0VTy6B5.js.br +0 -0
  341. package/dist/client/assets/SuggestBox-_0VTy6B5.js.gz +0 -0
  342. package/dist/client/assets/SuggestBox-_0VTy6B5.js.map +1 -0
  343. package/dist/client/assets/SuiteAppPreference-CPVsuVDU.js +2 -0
  344. package/dist/client/assets/SuiteAppPreference-CPVsuVDU.js.br +0 -0
  345. package/dist/client/assets/SuiteAppPreference-CPVsuVDU.js.gz +0 -0
  346. package/dist/client/assets/SuiteAppPreference-CPVsuVDU.js.map +1 -0
  347. package/dist/client/assets/SuiteAppSwitcher-DtQiqPiF.js +2 -0
  348. package/dist/client/assets/SuiteAppSwitcher-DtQiqPiF.js.br +0 -0
  349. package/dist/client/assets/SuiteAppSwitcher-DtQiqPiF.js.gz +0 -0
  350. package/dist/client/assets/SuiteAppSwitcher-DtQiqPiF.js.map +1 -0
  351. package/dist/client/assets/SupportLog-jf7pTIZG.js +2 -0
  352. package/dist/client/assets/SupportLog-jf7pTIZG.js.br +0 -0
  353. package/dist/client/assets/SupportLog-jf7pTIZG.js.gz +0 -0
  354. package/dist/client/assets/SupportLog-jf7pTIZG.js.map +1 -0
  355. package/dist/client/assets/SupportSessions-CSYHA41a.js +2 -0
  356. package/dist/client/assets/SupportSessions-CSYHA41a.js.br +0 -0
  357. package/dist/client/assets/SupportSessions-CSYHA41a.js.gz +0 -0
  358. package/dist/client/assets/SupportSessions-CSYHA41a.js.map +1 -0
  359. package/dist/client/assets/TenantAdministration-DKTvRGUl.js +4 -0
  360. package/dist/client/assets/TenantAdministration-DKTvRGUl.js.br +0 -0
  361. package/dist/client/assets/TenantAdministration-DKTvRGUl.js.gz +0 -0
  362. package/dist/client/assets/TenantAdministration-DKTvRGUl.js.map +1 -0
  363. package/dist/client/assets/TenantApiTokens-C4J5Wuzo.js +2 -0
  364. package/dist/client/assets/TenantApiTokens-C4J5Wuzo.js.br +0 -0
  365. package/dist/client/assets/TenantApiTokens-C4J5Wuzo.js.gz +0 -0
  366. package/dist/client/assets/TenantApiTokens-C4J5Wuzo.js.map +1 -0
  367. package/dist/client/assets/TenantInvitations-CJjeQpBL.js +2 -0
  368. package/dist/client/assets/TenantInvitations-CJjeQpBL.js.br +0 -0
  369. package/dist/client/assets/TenantInvitations-CJjeQpBL.js.gz +0 -0
  370. package/dist/client/assets/TenantInvitations-CJjeQpBL.js.map +1 -0
  371. package/dist/client/assets/ThemeLab-BlHW8bS-.js +4 -0
  372. package/dist/client/assets/ThemeLab-BlHW8bS-.js.br +0 -0
  373. package/dist/client/assets/ThemeLab-BlHW8bS-.js.gz +0 -0
  374. package/dist/client/assets/ThemeLab-BlHW8bS-.js.map +1 -0
  375. package/dist/client/assets/TimelineComposer-DaEDminW.js +2 -0
  376. package/dist/client/assets/TimelineComposer-DaEDminW.js.br +0 -0
  377. package/dist/client/assets/TimelineComposer-DaEDminW.js.gz +0 -0
  378. package/dist/client/assets/TimelineComposer-DaEDminW.js.map +1 -0
  379. package/dist/client/assets/TimelineReactions-B1Wxyv7x.js +2 -0
  380. package/dist/client/assets/TimelineReactions-B1Wxyv7x.js.br +0 -0
  381. package/dist/client/assets/TimelineReactions-B1Wxyv7x.js.gz +0 -0
  382. package/dist/client/assets/TimelineReactions-B1Wxyv7x.js.map +1 -0
  383. package/dist/client/assets/TopNav-DOStbBhL.js +3 -0
  384. package/dist/client/assets/TopNav-DOStbBhL.js.br +0 -0
  385. package/dist/client/assets/TopNav-DOStbBhL.js.gz +0 -0
  386. package/dist/client/assets/TopNav-DOStbBhL.js.map +1 -0
  387. package/dist/client/assets/Tour-cAfVD2Yu.js +2 -0
  388. package/dist/client/assets/Tour-cAfVD2Yu.js.br +0 -0
  389. package/dist/client/assets/Tour-cAfVD2Yu.js.gz +0 -0
  390. package/dist/client/assets/Tour-cAfVD2Yu.js.map +1 -0
  391. package/dist/client/assets/TreeList-D_ohqw7u.js +2 -0
  392. package/dist/client/assets/TreeList-D_ohqw7u.js.br +0 -0
  393. package/dist/client/assets/TreeList-D_ohqw7u.js.gz +0 -0
  394. package/dist/client/assets/TreeList-D_ohqw7u.js.map +1 -0
  395. package/dist/client/assets/TreePicker-OydKZl-A.js +2 -0
  396. package/dist/client/assets/TreePicker-OydKZl-A.js.br +0 -0
  397. package/dist/client/assets/TreePicker-OydKZl-A.js.gz +0 -0
  398. package/dist/client/assets/TreePicker-OydKZl-A.js.map +1 -0
  399. package/dist/client/assets/ViewFormDialog-7pn2ng-S.js +3 -0
  400. package/dist/client/assets/ViewFormDialog-7pn2ng-S.js.br +0 -0
  401. package/dist/client/assets/ViewFormDialog-7pn2ng-S.js.gz +0 -0
  402. package/dist/client/assets/ViewFormDialog-7pn2ng-S.js.map +1 -0
  403. package/dist/client/assets/appImport-B4bQP_lQ.js +4 -0
  404. package/dist/client/assets/appImport-B4bQP_lQ.js.br +0 -0
  405. package/dist/client/assets/appImport-B4bQP_lQ.js.gz +0 -0
  406. package/dist/client/assets/appImport-B4bQP_lQ.js.map +1 -0
  407. package/dist/client/assets/appLive-CIqITyZn.js +3 -0
  408. package/dist/client/assets/appLive-CIqITyZn.js.br +0 -0
  409. package/dist/client/assets/appLive-CIqITyZn.js.gz +0 -0
  410. package/dist/client/assets/appLive-CIqITyZn.js.map +1 -0
  411. package/dist/client/assets/assistantStream-Bj63nxSt.js +7 -0
  412. package/dist/client/assets/assistantStream-Bj63nxSt.js.br +0 -0
  413. package/dist/client/assets/assistantStream-Bj63nxSt.js.gz +0 -0
  414. package/dist/client/assets/assistantStream-Bj63nxSt.js.map +1 -0
  415. package/dist/client/assets/autoBucket-BhkQ0nwI.js +2 -0
  416. package/dist/client/assets/autoBucket-BhkQ0nwI.js.br +0 -0
  417. package/dist/client/assets/autoBucket-BhkQ0nwI.js.gz +0 -0
  418. package/dist/client/assets/autoBucket-BhkQ0nwI.js.map +1 -0
  419. package/dist/client/assets/beacon-YSoe7wc_.js +2 -0
  420. package/dist/client/assets/beacon-YSoe7wc_.js.br +0 -0
  421. package/dist/client/assets/beacon-YSoe7wc_.js.gz +0 -0
  422. package/dist/client/assets/beacon-YSoe7wc_.js.map +1 -0
  423. package/dist/client/assets/blocks-DNa-65ch.js +3 -0
  424. package/dist/client/assets/blocks-DNa-65ch.js.br +0 -0
  425. package/dist/client/assets/blocks-DNa-65ch.js.gz +0 -0
  426. package/dist/client/assets/blocks-DNa-65ch.js.map +1 -0
  427. package/dist/client/assets/builtInInputs-CFEbrblH.js +3 -0
  428. package/dist/client/assets/builtInInputs-CFEbrblH.js.br +0 -0
  429. package/dist/client/assets/builtInInputs-CFEbrblH.js.gz +0 -0
  430. package/dist/client/assets/builtInInputs-CFEbrblH.js.map +1 -0
  431. package/dist/client/assets/commandDraft-BvAvZW4M.js +2 -0
  432. package/dist/client/assets/commandDraft-BvAvZW4M.js.br +0 -0
  433. package/dist/client/assets/commandDraft-BvAvZW4M.js.gz +0 -0
  434. package/dist/client/assets/commandDraft-BvAvZW4M.js.map +1 -0
  435. package/dist/client/assets/componentLoader-D2gOSzXa.js +2 -0
  436. package/dist/client/assets/componentLoader-D2gOSzXa.js.br +0 -0
  437. package/dist/client/assets/componentLoader-D2gOSzXa.js.gz +0 -0
  438. package/dist/client/assets/componentLoader-D2gOSzXa.js.map +1 -0
  439. package/dist/client/assets/composer-ClRSVYV-.js +2 -0
  440. package/dist/client/assets/composer-ClRSVYV-.js.br +0 -0
  441. package/dist/client/assets/composer-ClRSVYV-.js.gz +0 -0
  442. package/dist/client/assets/composer-ClRSVYV-.js.map +1 -0
  443. package/dist/client/assets/computedParse-BMaavMZY.js +2 -0
  444. package/dist/client/assets/computedParse-BMaavMZY.js.br +0 -0
  445. package/dist/client/assets/computedParse-BMaavMZY.js.gz +0 -0
  446. package/dist/client/assets/computedParse-BMaavMZY.js.map +1 -0
  447. package/dist/client/assets/computedValue-CqPf4g73.js +2 -0
  448. package/dist/client/assets/computedValue-CqPf4g73.js.br +0 -0
  449. package/dist/client/assets/computedValue-CqPf4g73.js.gz +0 -0
  450. package/dist/client/assets/computedValue-CqPf4g73.js.map +1 -0
  451. package/dist/client/assets/conditionWords-BDvIH00N.js +2 -0
  452. package/dist/client/assets/conditionWords-BDvIH00N.js.br +0 -0
  453. package/dist/client/assets/conditionWords-BDvIH00N.js.gz +0 -0
  454. package/dist/client/assets/conditionWords-BDvIH00N.js.map +1 -0
  455. package/dist/client/assets/definedValues-DnMCxINu.js +2 -0
  456. package/dist/client/assets/definedValues-DnMCxINu.js.br +0 -0
  457. package/dist/client/assets/definedValues-DnMCxINu.js.gz +0 -0
  458. package/dist/client/assets/definedValues-DnMCxINu.js.map +1 -0
  459. package/dist/client/assets/experimentExposure-gXR4VMHx.js +3 -0
  460. package/dist/client/assets/experimentExposure-gXR4VMHx.js.br +0 -0
  461. package/dist/client/assets/experimentExposure-gXR4VMHx.js.gz +0 -0
  462. package/dist/client/assets/experimentExposure-gXR4VMHx.js.map +1 -0
  463. package/dist/client/assets/export-Bv8qrDqj.js +4 -0
  464. package/dist/client/assets/export-Bv8qrDqj.js.br +0 -0
  465. package/dist/client/assets/export-Bv8qrDqj.js.gz +0 -0
  466. package/dist/client/assets/export-Bv8qrDqj.js.map +1 -0
  467. package/dist/client/assets/formCommandRun-fpjddbvH.js +2 -0
  468. package/dist/client/assets/formCommandRun-fpjddbvH.js.br +0 -0
  469. package/dist/client/assets/formCommandRun-fpjddbvH.js.gz +0 -0
  470. package/dist/client/assets/formCommandRun-fpjddbvH.js.map +1 -0
  471. package/dist/client/assets/formStepCheck-YTK-TGv8.js +2 -0
  472. package/dist/client/assets/formStepCheck-YTK-TGv8.js.br +0 -0
  473. package/dist/client/assets/formStepCheck-YTK-TGv8.js.gz +0 -0
  474. package/dist/client/assets/formStepCheck-YTK-TGv8.js.map +1 -0
  475. package/dist/client/assets/handoff-qa9R1o1K.js +3 -0
  476. package/dist/client/assets/handoff-qa9R1o1K.js.br +0 -0
  477. package/dist/client/assets/handoff-qa9R1o1K.js.gz +0 -0
  478. package/dist/client/assets/handoff-qa9R1o1K.js.map +1 -0
  479. package/dist/client/assets/headlessLanding-BStjGgfK.js +2 -0
  480. package/dist/client/assets/headlessLanding-BStjGgfK.js.br +0 -0
  481. package/dist/client/assets/headlessLanding-BStjGgfK.js.gz +0 -0
  482. package/dist/client/assets/headlessLanding-BStjGgfK.js.map +1 -0
  483. package/dist/client/assets/host-BKoLXcmr.js +3 -0
  484. package/dist/client/assets/host-BKoLXcmr.js.br +0 -0
  485. package/dist/client/assets/host-BKoLXcmr.js.gz +0 -0
  486. package/dist/client/assets/host-BKoLXcmr.js.map +1 -0
  487. package/dist/client/assets/index-zwYbIjmM.js +16 -0
  488. package/dist/client/assets/index-zwYbIjmM.js.br +0 -0
  489. package/dist/client/assets/index-zwYbIjmM.js.gz +0 -0
  490. package/dist/client/assets/index-zwYbIjmM.js.map +1 -0
  491. package/dist/client/assets/liveSync-Bwi-_k5G.js +3 -0
  492. package/dist/client/assets/liveSync-Bwi-_k5G.js.br +0 -0
  493. package/dist/client/assets/liveSync-Bwi-_k5G.js.gz +0 -0
  494. package/dist/client/assets/liveSync-Bwi-_k5G.js.map +1 -0
  495. package/dist/client/assets/mentionRows-D4PHzjAg.js +2 -0
  496. package/dist/client/assets/mentionRows-D4PHzjAg.js.br +0 -0
  497. package/dist/client/assets/mentionRows-D4PHzjAg.js.gz +0 -0
  498. package/dist/client/assets/mentionRows-D4PHzjAg.js.map +1 -0
  499. package/dist/client/assets/newMenuModel-DXMku4hx.js +2 -0
  500. package/dist/client/assets/newMenuModel-DXMku4hx.js.br +0 -0
  501. package/dist/client/assets/newMenuModel-DXMku4hx.js.gz +0 -0
  502. package/dist/client/assets/newMenuModel-DXMku4hx.js.map +1 -0
  503. package/dist/client/assets/newRecordModel-BnTagtFI.js +2 -0
  504. package/dist/client/assets/newRecordModel-BnTagtFI.js.br +0 -0
  505. package/dist/client/assets/newRecordModel-BnTagtFI.js.gz +0 -0
  506. package/dist/client/assets/newRecordModel-BnTagtFI.js.map +1 -0
  507. package/dist/client/assets/oauthConsent-CvLqTMMJ.js +2 -0
  508. package/dist/client/assets/oauthConsent-CvLqTMMJ.js.br +0 -0
  509. package/dist/client/assets/oauthConsent-CvLqTMMJ.js.gz +0 -0
  510. package/dist/client/assets/oauthConsent-CvLqTMMJ.js.map +1 -0
  511. package/dist/client/assets/pageControls-D6FAgmKD.js +2 -0
  512. package/dist/client/assets/pageControls-D6FAgmKD.js.br +0 -0
  513. package/dist/client/assets/pageControls-D6FAgmKD.js.gz +0 -0
  514. package/dist/client/assets/pageControls-D6FAgmKD.js.map +1 -0
  515. package/dist/client/assets/paramControls-BsTjzS8D.js +2 -0
  516. package/dist/client/assets/paramControls-BsTjzS8D.js.br +0 -0
  517. package/dist/client/assets/paramControls-BsTjzS8D.js.gz +0 -0
  518. package/dist/client/assets/paramControls-BsTjzS8D.js.map +1 -0
  519. package/dist/client/assets/public-Bas7PiXU.js +3 -0
  520. package/dist/client/assets/public-Bas7PiXU.js.br +0 -0
  521. package/dist/client/assets/public-Bas7PiXU.js.gz +0 -0
  522. package/dist/client/assets/public-Bas7PiXU.js.map +1 -0
  523. package/dist/client/assets/publicInputs-D98jMI3d.js +3 -0
  524. package/dist/client/assets/publicInputs-D98jMI3d.js.br +0 -0
  525. package/dist/client/assets/publicInputs-D98jMI3d.js.gz +0 -0
  526. package/dist/client/assets/publicInputs-D98jMI3d.js.map +1 -0
  527. package/dist/client/assets/publicPageCommand-blnlplFb.js +2 -0
  528. package/dist/client/assets/publicPageCommand-blnlplFb.js.br +0 -0
  529. package/dist/client/assets/publicPageCommand-blnlplFb.js.gz +0 -0
  530. package/dist/client/assets/publicPageCommand-blnlplFb.js.map +1 -0
  531. package/dist/client/assets/publicPlacement-BIAyrghS.js +2 -0
  532. package/dist/client/assets/publicPlacement-BIAyrghS.js.br +0 -0
  533. package/dist/client/assets/publicPlacement-BIAyrghS.js.gz +0 -0
  534. package/dist/client/assets/publicPlacement-BIAyrghS.js.map +1 -0
  535. package/dist/client/assets/recordSearch-BX6y7hWJ.js +2 -0
  536. package/dist/client/assets/recordSearch-BX6y7hWJ.js.br +0 -0
  537. package/dist/client/assets/recordSearch-BX6y7hWJ.js.gz +0 -0
  538. package/dist/client/assets/recordSearch-BX6y7hWJ.js.map +1 -0
  539. package/dist/client/assets/savedFormApi-DPymDUH-.js +2 -0
  540. package/dist/client/assets/savedFormApi-DPymDUH-.js.br +0 -0
  541. package/dist/client/assets/savedFormApi-DPymDUH-.js.gz +0 -0
  542. package/dist/client/assets/savedFormApi-DPymDUH-.js.map +1 -0
  543. package/dist/client/assets/shell-Cg-_POu5.js +13 -0
  544. package/dist/client/assets/shell-Cg-_POu5.js.br +0 -0
  545. package/dist/client/assets/shell-Cg-_POu5.js.gz +0 -0
  546. package/dist/client/assets/shell-Cg-_POu5.js.map +1 -0
  547. package/dist/client/assets/steps-CFHtYWMF.js +2 -0
  548. package/dist/client/assets/steps-CFHtYWMF.js.br +0 -0
  549. package/dist/client/assets/steps-CFHtYWMF.js.gz +0 -0
  550. package/dist/client/assets/steps-CFHtYWMF.js.map +1 -0
  551. package/dist/client/assets/tenant-DF_TRFSU.js +3 -0
  552. package/dist/client/assets/tenant-DF_TRFSU.js.br +0 -0
  553. package/dist/client/assets/tenant-DF_TRFSU.js.gz +0 -0
  554. package/dist/client/assets/tenant-DF_TRFSU.js.map +1 -0
  555. package/dist/client/assets/tenantInvitations-yKUYEnjk.js +2 -0
  556. package/dist/client/assets/tenantInvitations-yKUYEnjk.js.br +0 -0
  557. package/dist/client/assets/tenantInvitations-yKUYEnjk.js.gz +0 -0
  558. package/dist/client/assets/tenantInvitations-yKUYEnjk.js.map +1 -0
  559. package/dist/client/assets/tenantLive-BcywI9-R.js +2 -0
  560. package/dist/client/assets/tenantLive-BcywI9-R.js.br +0 -0
  561. package/dist/client/assets/tenantLive-BcywI9-R.js.gz +0 -0
  562. package/dist/client/assets/tenantLive-BcywI9-R.js.map +1 -0
  563. package/dist/client/assets/themeBench-BzOpxgk5.js +2 -0
  564. package/dist/client/assets/themeBench-BzOpxgk5.js.br +0 -0
  565. package/dist/client/assets/themeBench-BzOpxgk5.js.gz +0 -0
  566. package/dist/client/assets/themeBench-BzOpxgk5.js.map +1 -0
  567. package/dist/client/assets/uiKitLoader-DPDTxyeS.js +2 -0
  568. package/dist/client/assets/uiKitLoader-DPDTxyeS.js.br +0 -0
  569. package/dist/client/assets/uiKitLoader-DPDTxyeS.js.gz +0 -0
  570. package/dist/client/assets/uiKitLoader-DPDTxyeS.js.map +1 -0
  571. package/dist/client/index.html +2 -2
  572. package/dist/client/index.html.br +0 -0
  573. package/dist/client/index.html.gz +0 -0
  574. package/dist/client/index.public.html +2 -2
  575. package/dist/client/index.public.html.br +0 -0
  576. package/dist/client/index.public.html.gz +0 -0
  577. package/dist/docs/cli.md +1 -0
  578. package/dist/docs/dsl-auth.md +1 -1
  579. package/dist/docs/roles.md +4 -0
  580. package/dist/docs/status.md +3 -3
  581. package/dist/embed/react/headless.js +1 -1
  582. package/dist/embed/react/index.js +1 -1
  583. package/dist/server/app/apps.js +2 -1
  584. package/dist/server/cli/usage.js +1 -0
  585. package/dist/server/forms/oneTimeCode.d.ts +1 -1
  586. package/dist/server/forms/oneTimeCode.js +8 -5
  587. package/dist/shared/appAuthGrants.js +2 -1
  588. package/dist/shared/appWarnings.d.ts +6 -0
  589. package/dist/shared/appWarnings.js +25 -1
  590. package/package.json +4 -4
  591. package/schema/app.schema.json +1 -1
  592. package/dist/client/assets/AccountAdministration-C3oTHIlY.js +0 -2
  593. package/dist/client/assets/AccountAdministration-C3oTHIlY.js.br +0 -0
  594. package/dist/client/assets/AccountAdministration-C3oTHIlY.js.gz +0 -0
  595. package/dist/client/assets/AccountAdministration-C3oTHIlY.js.map +0 -1
  596. package/dist/client/assets/AccountControl-Uuhsd5Ch.js +0 -3
  597. package/dist/client/assets/AccountControl-Uuhsd5Ch.js.br +0 -0
  598. package/dist/client/assets/AccountControl-Uuhsd5Ch.js.gz +0 -0
  599. package/dist/client/assets/AccountControl-Uuhsd5Ch.js.map +0 -1
  600. package/dist/client/assets/AccountProfile-B3Hv3021.js +0 -2
  601. package/dist/client/assets/AccountProfile-B3Hv3021.js.br +0 -0
  602. package/dist/client/assets/AccountProfile-B3Hv3021.js.gz +0 -0
  603. package/dist/client/assets/AccountProfile-B3Hv3021.js.map +0 -1
  604. package/dist/client/assets/ApiOperations-lBA4XqEY.js +0 -2
  605. package/dist/client/assets/ApiOperations-lBA4XqEY.js.br +0 -0
  606. package/dist/client/assets/ApiOperations-lBA4XqEY.js.gz +0 -0
  607. package/dist/client/assets/ApiOperations-lBA4XqEY.js.map +0 -1
  608. package/dist/client/assets/AppColumnMenuPopups-BpTx0J08.js +0 -2
  609. package/dist/client/assets/AppColumnMenuPopups-BpTx0J08.js.br +0 -0
  610. package/dist/client/assets/AppColumnMenuPopups-BpTx0J08.js.gz +0 -0
  611. package/dist/client/assets/AppColumnMenuPopups-BpTx0J08.js.map +0 -1
  612. package/dist/client/assets/AsOfChip-DrIg42Jh.js +0 -2
  613. package/dist/client/assets/AsOfChip-DrIg42Jh.js.br +0 -0
  614. package/dist/client/assets/AsOfChip-DrIg42Jh.js.gz +0 -0
  615. package/dist/client/assets/AsOfChip-DrIg42Jh.js.map +0 -1
  616. package/dist/client/assets/AssistantPanel-DUnYZzRA.js +0 -3
  617. package/dist/client/assets/AssistantPanel-DUnYZzRA.js.br +0 -0
  618. package/dist/client/assets/AssistantPanel-DUnYZzRA.js.gz +0 -0
  619. package/dist/client/assets/AssistantPanel-DUnYZzRA.js.map +0 -1
  620. package/dist/client/assets/AttachmentList-C7E3CulE.js +0 -3
  621. package/dist/client/assets/AttachmentList-C7E3CulE.js.br +0 -0
  622. package/dist/client/assets/AttachmentList-C7E3CulE.js.gz +0 -0
  623. package/dist/client/assets/AttachmentList-C7E3CulE.js.map +0 -1
  624. package/dist/client/assets/BoardCardEditor-CdtRbIXE.js +0 -2
  625. package/dist/client/assets/BoardCardEditor-CdtRbIXE.js.br +0 -0
  626. package/dist/client/assets/BoardCardEditor-CdtRbIXE.js.gz +0 -0
  627. package/dist/client/assets/BoardCardEditor-CdtRbIXE.js.map +0 -1
  628. package/dist/client/assets/BoardList-To48FR9L.js +0 -5
  629. package/dist/client/assets/BoardList-To48FR9L.js.br +0 -0
  630. package/dist/client/assets/BoardList-To48FR9L.js.gz +0 -0
  631. package/dist/client/assets/BoardList-To48FR9L.js.map +0 -1
  632. package/dist/client/assets/BrandingForm-B2fWEInI.js +0 -2
  633. package/dist/client/assets/BrandingForm-B2fWEInI.js.br +0 -0
  634. package/dist/client/assets/BrandingForm-B2fWEInI.js.gz +0 -0
  635. package/dist/client/assets/BrandingForm-B2fWEInI.js.map +0 -1
  636. package/dist/client/assets/BreakdownRoom-D5Eiw-HN.js +0 -2
  637. package/dist/client/assets/BreakdownRoom-D5Eiw-HN.js.br +0 -0
  638. package/dist/client/assets/BreakdownRoom-D5Eiw-HN.js.gz +0 -0
  639. package/dist/client/assets/BreakdownRoom-D5Eiw-HN.js.map +0 -1
  640. package/dist/client/assets/CalendarList-CqIrCeGU.js +0 -2
  641. package/dist/client/assets/CalendarList-CqIrCeGU.js.br +0 -0
  642. package/dist/client/assets/CalendarList-CqIrCeGU.js.gz +0 -0
  643. package/dist/client/assets/CalendarList-CqIrCeGU.js.map +0 -1
  644. package/dist/client/assets/CardsList-D0TknUSs.js +0 -2
  645. package/dist/client/assets/CardsList-D0TknUSs.js.br +0 -0
  646. package/dist/client/assets/CardsList-D0TknUSs.js.gz +0 -0
  647. package/dist/client/assets/CardsList-D0TknUSs.js.map +0 -1
  648. package/dist/client/assets/Chart-DB_dANy-.js +0 -2
  649. package/dist/client/assets/Chart-DB_dANy-.js.br +0 -0
  650. package/dist/client/assets/Chart-DB_dANy-.js.gz +0 -0
  651. package/dist/client/assets/Chart-DB_dANy-.js.map +0 -1
  652. package/dist/client/assets/ChartFigure-D_L7DSPq.js +0 -3
  653. package/dist/client/assets/ChartFigure-D_L7DSPq.js.br +0 -0
  654. package/dist/client/assets/ChartFigure-D_L7DSPq.js.gz +0 -0
  655. package/dist/client/assets/ChartFigure-D_L7DSPq.js.map +0 -1
  656. package/dist/client/assets/ChartShapes-Bn9bZ2Q5.js +0 -2
  657. package/dist/client/assets/ChartShapes-Bn9bZ2Q5.js.br +0 -0
  658. package/dist/client/assets/ChartShapes-Bn9bZ2Q5.js.gz +0 -0
  659. package/dist/client/assets/ChartShapes-Bn9bZ2Q5.js.map +0 -1
  660. package/dist/client/assets/CheckedAppTargetAction-DzDQn1Qk.js +0 -2
  661. package/dist/client/assets/CheckedAppTargetAction-DzDQn1Qk.js.br +0 -0
  662. package/dist/client/assets/CheckedAppTargetAction-DzDQn1Qk.js.gz +0 -0
  663. package/dist/client/assets/CheckedAppTargetAction-DzDQn1Qk.js.map +0 -1
  664. package/dist/client/assets/Choices-Bh7XDJMQ.js +0 -2
  665. package/dist/client/assets/Choices-Bh7XDJMQ.js.br +0 -0
  666. package/dist/client/assets/Choices-Bh7XDJMQ.js.gz +0 -0
  667. package/dist/client/assets/Choices-Bh7XDJMQ.js.map +0 -1
  668. package/dist/client/assets/ClaimInvitation-sd2TwRZG.js +0 -2
  669. package/dist/client/assets/ClaimInvitation-sd2TwRZG.js.br +0 -0
  670. package/dist/client/assets/ClaimInvitation-sd2TwRZG.js.gz +0 -0
  671. package/dist/client/assets/ClaimInvitation-sd2TwRZG.js.map +0 -1
  672. package/dist/client/assets/CommandAnswers-FWR-q8O8.js +0 -2
  673. package/dist/client/assets/CommandAnswers-FWR-q8O8.js.br +0 -0
  674. package/dist/client/assets/CommandAnswers-FWR-q8O8.js.gz +0 -0
  675. package/dist/client/assets/CommandAnswers-FWR-q8O8.js.map +0 -1
  676. package/dist/client/assets/CommandForm-BifWVCuD.js +0 -3
  677. package/dist/client/assets/CommandForm-BifWVCuD.js.br +0 -0
  678. package/dist/client/assets/CommandForm-BifWVCuD.js.gz +0 -0
  679. package/dist/client/assets/CommandForm-BifWVCuD.js.map +0 -1
  680. package/dist/client/assets/CommandLines-DHvCryX7.js +0 -2
  681. package/dist/client/assets/CommandLines-DHvCryX7.js.br +0 -0
  682. package/dist/client/assets/CommandLines-DHvCryX7.js.gz +0 -0
  683. package/dist/client/assets/CommandLines-DHvCryX7.js.map +0 -1
  684. package/dist/client/assets/CommandLive-DWt1x5kb.js +0 -2
  685. package/dist/client/assets/CommandLive-DWt1x5kb.js.br +0 -0
  686. package/dist/client/assets/CommandLive-DWt1x5kb.js.gz +0 -0
  687. package/dist/client/assets/CommandLive-DWt1x5kb.js.map +0 -1
  688. package/dist/client/assets/CommandReference-BnMFCUPp.js +0 -3
  689. package/dist/client/assets/CommandReference-BnMFCUPp.js.br +0 -0
  690. package/dist/client/assets/CommandReference-BnMFCUPp.js.gz +0 -0
  691. package/dist/client/assets/CommandReference-BnMFCUPp.js.map +0 -1
  692. package/dist/client/assets/Composer-DhlrkTFi.js +0 -5
  693. package/dist/client/assets/Composer-DhlrkTFi.js.br +0 -0
  694. package/dist/client/assets/Composer-DhlrkTFi.js.gz +0 -0
  695. package/dist/client/assets/Composer-DhlrkTFi.js.map +0 -1
  696. package/dist/client/assets/CountedLabel-GfVnsTq4.js +0 -2
  697. package/dist/client/assets/CountedLabel-GfVnsTq4.js.br +0 -0
  698. package/dist/client/assets/CountedLabel-GfVnsTq4.js.gz +0 -0
  699. package/dist/client/assets/CountedLabel-GfVnsTq4.js.map +0 -1
  700. package/dist/client/assets/CustomList-DL8nNJU9.js +0 -2
  701. package/dist/client/assets/CustomList-DL8nNJU9.js.br +0 -0
  702. package/dist/client/assets/CustomList-DL8nNJU9.js.gz +0 -0
  703. package/dist/client/assets/CustomList-DL8nNJU9.js.map +0 -1
  704. package/dist/client/assets/CustomPage-JX0jhBzY.js +0 -3
  705. package/dist/client/assets/CustomPage-JX0jhBzY.js.br +0 -0
  706. package/dist/client/assets/CustomPage-JX0jhBzY.js.gz +0 -0
  707. package/dist/client/assets/CustomPage-JX0jhBzY.js.map +0 -1
  708. package/dist/client/assets/CustomSection-Bf1Rq_ST.js +0 -2
  709. package/dist/client/assets/CustomSection-Bf1Rq_ST.js.br +0 -0
  710. package/dist/client/assets/CustomSection-Bf1Rq_ST.js.gz +0 -0
  711. package/dist/client/assets/CustomSection-Bf1Rq_ST.js.map +0 -1
  712. package/dist/client/assets/Dashboard-B8k8QFrA.js +0 -3
  713. package/dist/client/assets/Dashboard-B8k8QFrA.js.br +0 -0
  714. package/dist/client/assets/Dashboard-B8k8QFrA.js.gz +0 -0
  715. package/dist/client/assets/Dashboard-B8k8QFrA.js.map +0 -1
  716. package/dist/client/assets/DashboardActivity-C_OR3BxK.js +0 -2
  717. package/dist/client/assets/DashboardActivity-C_OR3BxK.js.br +0 -0
  718. package/dist/client/assets/DashboardActivity-C_OR3BxK.js.gz +0 -0
  719. package/dist/client/assets/DashboardActivity-C_OR3BxK.js.map +0 -1
  720. package/dist/client/assets/DashboardFind-LlbjnBB0.js +0 -2
  721. package/dist/client/assets/DashboardFind-LlbjnBB0.js.br +0 -0
  722. package/dist/client/assets/DashboardFind-LlbjnBB0.js.gz +0 -0
  723. package/dist/client/assets/DashboardFind-LlbjnBB0.js.map +0 -1
  724. package/dist/client/assets/DashboardList-D93_Q5-c.js +0 -2
  725. package/dist/client/assets/DashboardList-D93_Q5-c.js.br +0 -0
  726. package/dist/client/assets/DashboardList-D93_Q5-c.js.gz +0 -0
  727. package/dist/client/assets/DashboardList-D93_Q5-c.js.map +0 -1
  728. package/dist/client/assets/DateTimeInput-DttG9obK.js +0 -2
  729. package/dist/client/assets/DateTimeInput-DttG9obK.js.br +0 -0
  730. package/dist/client/assets/DateTimeInput-DttG9obK.js.gz +0 -0
  731. package/dist/client/assets/DateTimeInput-DttG9obK.js.map +0 -1
  732. package/dist/client/assets/DecisionChip-CG6siYHD.js +0 -2
  733. package/dist/client/assets/DecisionChip-CG6siYHD.js.br +0 -0
  734. package/dist/client/assets/DecisionChip-CG6siYHD.js.gz +0 -0
  735. package/dist/client/assets/DecisionChip-CG6siYHD.js.map +0 -1
  736. package/dist/client/assets/DefinedFields-DZlFlSfd.js +0 -2
  737. package/dist/client/assets/DefinedFields-DZlFlSfd.js.br +0 -0
  738. package/dist/client/assets/DefinedFields-DZlFlSfd.js.gz +0 -0
  739. package/dist/client/assets/DefinedFields-DZlFlSfd.js.map +0 -1
  740. package/dist/client/assets/Diagram-BxhoSfE0.js +0 -6
  741. package/dist/client/assets/Diagram-BxhoSfE0.js.br +0 -0
  742. package/dist/client/assets/Diagram-BxhoSfE0.js.gz +0 -0
  743. package/dist/client/assets/Diagram-BxhoSfE0.js.map +0 -1
  744. package/dist/client/assets/Directory-D4zheqdP.js +0 -2
  745. package/dist/client/assets/Directory-D4zheqdP.js.br +0 -0
  746. package/dist/client/assets/Directory-D4zheqdP.js.gz +0 -0
  747. package/dist/client/assets/Directory-D4zheqdP.js.map +0 -1
  748. package/dist/client/assets/Document-DzLpM-Kc.js +0 -2
  749. package/dist/client/assets/Document-DzLpM-Kc.js.br +0 -0
  750. package/dist/client/assets/Document-DzLpM-Kc.js.gz +0 -0
  751. package/dist/client/assets/Document-DzLpM-Kc.js.map +0 -1
  752. package/dist/client/assets/Export-CBsanqgv.js +0 -2
  753. package/dist/client/assets/Export-CBsanqgv.js.br +0 -0
  754. package/dist/client/assets/Export-CBsanqgv.js.gz +0 -0
  755. package/dist/client/assets/Export-CBsanqgv.js.map +0 -1
  756. package/dist/client/assets/FilePreview-B4u8iKc8.js +0 -2
  757. package/dist/client/assets/FilePreview-B4u8iKc8.js.br +0 -0
  758. package/dist/client/assets/FilePreview-B4u8iKc8.js.gz +0 -0
  759. package/dist/client/assets/FilePreview-B4u8iKc8.js.map +0 -1
  760. package/dist/client/assets/FormClaimSurface-COdtEKz3.js +0 -2
  761. package/dist/client/assets/FormClaimSurface-COdtEKz3.js.br +0 -0
  762. package/dist/client/assets/FormClaimSurface-COdtEKz3.js.gz +0 -0
  763. package/dist/client/assets/FormClaimSurface-COdtEKz3.js.map +0 -1
  764. package/dist/client/assets/FormDialog-D98xrJPB.js +0 -3
  765. package/dist/client/assets/FormDialog-D98xrJPB.js.br +0 -0
  766. package/dist/client/assets/FormDialog-D98xrJPB.js.gz +0 -0
  767. package/dist/client/assets/FormDialog-D98xrJPB.js.map +0 -1
  768. package/dist/client/assets/FormLines-DX8uGvcA.js +0 -2
  769. package/dist/client/assets/FormLines-DX8uGvcA.js.br +0 -0
  770. package/dist/client/assets/FormLines-DX8uGvcA.js.gz +0 -0
  771. package/dist/client/assets/FormLines-DX8uGvcA.js.map +0 -1
  772. package/dist/client/assets/FormParts-nBIRDBHU.js +0 -2
  773. package/dist/client/assets/FormParts-nBIRDBHU.js.br +0 -0
  774. package/dist/client/assets/FormParts-nBIRDBHU.js.gz +0 -0
  775. package/dist/client/assets/FormParts-nBIRDBHU.js.map +0 -1
  776. package/dist/client/assets/FormStatusSurface-O8Iy7bk0.js +0 -2
  777. package/dist/client/assets/FormStatusSurface-O8Iy7bk0.js.br +0 -0
  778. package/dist/client/assets/FormStatusSurface-O8Iy7bk0.js.gz +0 -0
  779. package/dist/client/assets/FormStatusSurface-O8Iy7bk0.js.map +0 -1
  780. package/dist/client/assets/Gallery-CySinSXi.js +0 -3
  781. package/dist/client/assets/Gallery-CySinSXi.js.br +0 -0
  782. package/dist/client/assets/Gallery-CySinSXi.js.gz +0 -0
  783. package/dist/client/assets/Gallery-CySinSXi.js.map +0 -1
  784. package/dist/client/assets/GanttList-DnIai0-w.js +0 -2
  785. package/dist/client/assets/GanttList-DnIai0-w.js.br +0 -0
  786. package/dist/client/assets/GanttList-DnIai0-w.js.gz +0 -0
  787. package/dist/client/assets/GanttList-DnIai0-w.js.map +0 -1
  788. package/dist/client/assets/GridCellEditor-gcPpvJzn.js +0 -2
  789. package/dist/client/assets/GridCellEditor-gcPpvJzn.js.br +0 -0
  790. package/dist/client/assets/GridCellEditor-gcPpvJzn.js.gz +0 -0
  791. package/dist/client/assets/GridCellEditor-gcPpvJzn.js.map +0 -1
  792. package/dist/client/assets/HeldFiles-mZGjxE5u.js +0 -3
  793. package/dist/client/assets/HeldFiles-mZGjxE5u.js.br +0 -0
  794. package/dist/client/assets/HeldFiles-mZGjxE5u.js.gz +0 -0
  795. package/dist/client/assets/HeldFiles-mZGjxE5u.js.map +0 -1
  796. package/dist/client/assets/HelpPanel-BGfN-MnO.js +0 -2
  797. package/dist/client/assets/HelpPanel-BGfN-MnO.js.br +0 -0
  798. package/dist/client/assets/HelpPanel-BGfN-MnO.js.gz +0 -0
  799. package/dist/client/assets/HelpPanel-BGfN-MnO.js.map +0 -1
  800. package/dist/client/assets/ImportDialog-BLlN4Vtt.js +0 -9
  801. package/dist/client/assets/ImportDialog-BLlN4Vtt.js.br +0 -0
  802. package/dist/client/assets/ImportDialog-BLlN4Vtt.js.gz +0 -0
  803. package/dist/client/assets/ImportDialog-BLlN4Vtt.js.map +0 -1
  804. package/dist/client/assets/InboxList-Bretku0p.js +0 -2
  805. package/dist/client/assets/InboxList-Bretku0p.js.br +0 -0
  806. package/dist/client/assets/InboxList-Bretku0p.js.gz +0 -0
  807. package/dist/client/assets/InboxList-Bretku0p.js.map +0 -1
  808. package/dist/client/assets/IntakeControls-BYaK9c_Y.js +0 -2
  809. package/dist/client/assets/IntakeControls-BYaK9c_Y.js.br +0 -0
  810. package/dist/client/assets/IntakeControls-BYaK9c_Y.js.gz +0 -0
  811. package/dist/client/assets/IntakeControls-BYaK9c_Y.js.map +0 -1
  812. package/dist/client/assets/IntegrationsForm-DD-wymlU.js +0 -2
  813. package/dist/client/assets/IntegrationsForm-DD-wymlU.js.br +0 -0
  814. package/dist/client/assets/IntegrationsForm-DD-wymlU.js.gz +0 -0
  815. package/dist/client/assets/IntegrationsForm-DD-wymlU.js.map +0 -1
  816. package/dist/client/assets/JsonView-CKli9JvY.js +0 -4
  817. package/dist/client/assets/JsonView-CKli9JvY.js.br +0 -0
  818. package/dist/client/assets/JsonView-CKli9JvY.js.gz +0 -0
  819. package/dist/client/assets/JsonView-CKli9JvY.js.map +0 -1
  820. package/dist/client/assets/LayoutBuilder-DkIdCwDb.js +0 -2
  821. package/dist/client/assets/LayoutBuilder-DkIdCwDb.js.br +0 -0
  822. package/dist/client/assets/LayoutBuilder-DkIdCwDb.js.gz +0 -0
  823. package/dist/client/assets/LayoutBuilder-DkIdCwDb.js.map +0 -1
  824. package/dist/client/assets/Lightbox-BKRJ9eO8.js +0 -2
  825. package/dist/client/assets/Lightbox-BKRJ9eO8.js.br +0 -0
  826. package/dist/client/assets/Lightbox-BKRJ9eO8.js.gz +0 -0
  827. package/dist/client/assets/Lightbox-BKRJ9eO8.js.map +0 -1
  828. package/dist/client/assets/LiveNotices-COmDyFZU.js +0 -2
  829. package/dist/client/assets/LiveNotices-COmDyFZU.js.br +0 -0
  830. package/dist/client/assets/LiveNotices-COmDyFZU.js.gz +0 -0
  831. package/dist/client/assets/LiveNotices-COmDyFZU.js.map +0 -1
  832. package/dist/client/assets/MinorMoneyInput-BIaj9R54.js +0 -2
  833. package/dist/client/assets/MinorMoneyInput-BIaj9R54.js.br +0 -0
  834. package/dist/client/assets/MinorMoneyInput-BIaj9R54.js.gz +0 -0
  835. package/dist/client/assets/MinorMoneyInput-BIaj9R54.js.map +0 -1
  836. package/dist/client/assets/MultiStepForm-DwSyN21A.js +0 -3
  837. package/dist/client/assets/MultiStepForm-DwSyN21A.js.br +0 -0
  838. package/dist/client/assets/MultiStepForm-DwSyN21A.js.gz +0 -0
  839. package/dist/client/assets/MultiStepForm-DwSyN21A.js.map +0 -1
  840. package/dist/client/assets/NewMenu-D4HZDAeP.js +0 -2
  841. package/dist/client/assets/NewMenu-D4HZDAeP.js.br +0 -0
  842. package/dist/client/assets/NewMenu-D4HZDAeP.js.gz +0 -0
  843. package/dist/client/assets/NewMenu-D4HZDAeP.js.map +0 -1
  844. package/dist/client/assets/NewRecord--Iql2V5j.js +0 -3
  845. package/dist/client/assets/NewRecord--Iql2V5j.js.br +0 -0
  846. package/dist/client/assets/NewRecord--Iql2V5j.js.gz +0 -0
  847. package/dist/client/assets/NewRecord--Iql2V5j.js.map +0 -1
  848. package/dist/client/assets/PageFlowDiagram-CguZrEus.js +0 -3
  849. package/dist/client/assets/PageFlowDiagram-CguZrEus.js.br +0 -0
  850. package/dist/client/assets/PageFlowDiagram-CguZrEus.js.gz +0 -0
  851. package/dist/client/assets/PageFlowDiagram-CguZrEus.js.map +0 -1
  852. package/dist/client/assets/PageFlows-BbT-8hoI.js +0 -2
  853. package/dist/client/assets/PageFlows-BbT-8hoI.js.br +0 -0
  854. package/dist/client/assets/PageFlows-BbT-8hoI.js.gz +0 -0
  855. package/dist/client/assets/PageFlows-BbT-8hoI.js.map +0 -1
  856. package/dist/client/assets/PageGroups-yuIcWvGD.js +0 -2
  857. package/dist/client/assets/PageGroups-yuIcWvGD.js.br +0 -0
  858. package/dist/client/assets/PageGroups-yuIcWvGD.js.gz +0 -0
  859. package/dist/client/assets/PageGroups-yuIcWvGD.js.map +0 -1
  860. package/dist/client/assets/PageHistory-BI7R0cP-.js +0 -2
  861. package/dist/client/assets/PageHistory-BI7R0cP-.js.br +0 -0
  862. package/dist/client/assets/PageHistory-BI7R0cP-.js.gz +0 -0
  863. package/dist/client/assets/PageHistory-BI7R0cP-.js.map +0 -1
  864. package/dist/client/assets/PageSkeleton-BL26CKwY.js +0 -2
  865. package/dist/client/assets/PageSkeleton-BL26CKwY.js.br +0 -0
  866. package/dist/client/assets/PageSkeleton-BL26CKwY.js.gz +0 -0
  867. package/dist/client/assets/PageSkeleton-BL26CKwY.js.map +0 -1
  868. package/dist/client/assets/Palette-GwxPg8yp.js +0 -3
  869. package/dist/client/assets/Palette-GwxPg8yp.js.br +0 -0
  870. package/dist/client/assets/Palette-GwxPg8yp.js.gz +0 -0
  871. package/dist/client/assets/Palette-GwxPg8yp.js.map +0 -1
  872. package/dist/client/assets/PeekPanel-DpeJQhsK.js +0 -2
  873. package/dist/client/assets/PeekPanel-DpeJQhsK.js.br +0 -0
  874. package/dist/client/assets/PeekPanel-DpeJQhsK.js.gz +0 -0
  875. package/dist/client/assets/PeekPanel-DpeJQhsK.js.map +0 -1
  876. package/dist/client/assets/PlacedFormSurface-CNfB-JTM.js +0 -2
  877. package/dist/client/assets/PlacedFormSurface-CNfB-JTM.js.br +0 -0
  878. package/dist/client/assets/PlacedFormSurface-CNfB-JTM.js.gz +0 -0
  879. package/dist/client/assets/PlacedFormSurface-CNfB-JTM.js.map +0 -1
  880. package/dist/client/assets/Prefs-DRAVcik_.js +0 -2
  881. package/dist/client/assets/Prefs-DRAVcik_.js.br +0 -0
  882. package/dist/client/assets/Prefs-DRAVcik_.js.gz +0 -0
  883. package/dist/client/assets/Prefs-DRAVcik_.js.map +0 -1
  884. package/dist/client/assets/PresentedList-CPgfQFZ4.js +0 -2
  885. package/dist/client/assets/PresentedList-CPgfQFZ4.js.br +0 -0
  886. package/dist/client/assets/PresentedList-CPgfQFZ4.js.gz +0 -0
  887. package/dist/client/assets/PresentedList-CPgfQFZ4.js.map +0 -1
  888. package/dist/client/assets/PublicGuard-CA_sYFh1.js +0 -2
  889. package/dist/client/assets/PublicGuard-CA_sYFh1.js.br +0 -0
  890. package/dist/client/assets/PublicGuard-CA_sYFh1.js.gz +0 -0
  891. package/dist/client/assets/PublicGuard-CA_sYFh1.js.map +0 -1
  892. package/dist/client/assets/QrCode-D1hdBMKl.js +0 -4
  893. package/dist/client/assets/QrCode-D1hdBMKl.js.br +0 -0
  894. package/dist/client/assets/QrCode-D1hdBMKl.js.gz +0 -0
  895. package/dist/client/assets/QrCode-D1hdBMKl.js.map +0 -1
  896. package/dist/client/assets/QuickAdd-DVlRjLaf.js +0 -2
  897. package/dist/client/assets/QuickAdd-DVlRjLaf.js.br +0 -0
  898. package/dist/client/assets/QuickAdd-DVlRjLaf.js.gz +0 -0
  899. package/dist/client/assets/QuickAdd-DVlRjLaf.js.map +0 -1
  900. package/dist/client/assets/Record-CbJCwrxQ.js +0 -2
  901. package/dist/client/assets/Record-CbJCwrxQ.js.br +0 -0
  902. package/dist/client/assets/Record-CbJCwrxQ.js.gz +0 -0
  903. package/dist/client/assets/Record-CbJCwrxQ.js.map +0 -1
  904. package/dist/client/assets/RecordModal-CAsopcf_.js +0 -2
  905. package/dist/client/assets/RecordModal-CAsopcf_.js.br +0 -0
  906. package/dist/client/assets/RecordModal-CAsopcf_.js.gz +0 -0
  907. package/dist/client/assets/RecordModal-CAsopcf_.js.map +0 -1
  908. package/dist/client/assets/RichTextEditor-Bj2OL6iF.js +0 -144
  909. package/dist/client/assets/RichTextEditor-Bj2OL6iF.js.br +0 -0
  910. package/dist/client/assets/RichTextEditor-Bj2OL6iF.js.gz +0 -0
  911. package/dist/client/assets/RichTextEditor-Bj2OL6iF.js.map +0 -1
  912. package/dist/client/assets/SavedFormSurface-CdD9ykE5.js +0 -2
  913. package/dist/client/assets/SavedFormSurface-CdD9ykE5.js.br +0 -0
  914. package/dist/client/assets/SavedFormSurface-CdD9ykE5.js.gz +0 -0
  915. package/dist/client/assets/SavedFormSurface-CdD9ykE5.js.map +0 -1
  916. package/dist/client/assets/SectionPeriod-BMy1bK7R.js +0 -2
  917. package/dist/client/assets/SectionPeriod-BMy1bK7R.js.br +0 -0
  918. package/dist/client/assets/SectionPeriod-BMy1bK7R.js.gz +0 -0
  919. package/dist/client/assets/SectionPeriod-BMy1bK7R.js.map +0 -1
  920. package/dist/client/assets/SetFieldDialog-D016AWKw.js +0 -2
  921. package/dist/client/assets/SetFieldDialog-D016AWKw.js.br +0 -0
  922. package/dist/client/assets/SetFieldDialog-D016AWKw.js.gz +0 -0
  923. package/dist/client/assets/SetFieldDialog-D016AWKw.js.map +0 -1
  924. package/dist/client/assets/SignedInFormDialog-DbnqvTgs.js +0 -2
  925. package/dist/client/assets/SignedInFormDialog-DbnqvTgs.js.br +0 -0
  926. package/dist/client/assets/SignedInFormDialog-DbnqvTgs.js.gz +0 -0
  927. package/dist/client/assets/SignedInFormDialog-DbnqvTgs.js.map +0 -1
  928. package/dist/client/assets/SuggestBox-DQPzg1mm.js +0 -2
  929. package/dist/client/assets/SuggestBox-DQPzg1mm.js.br +0 -0
  930. package/dist/client/assets/SuggestBox-DQPzg1mm.js.gz +0 -0
  931. package/dist/client/assets/SuggestBox-DQPzg1mm.js.map +0 -1
  932. package/dist/client/assets/SuiteAppPreference-OTBArq0c.js +0 -2
  933. package/dist/client/assets/SuiteAppPreference-OTBArq0c.js.br +0 -0
  934. package/dist/client/assets/SuiteAppPreference-OTBArq0c.js.gz +0 -0
  935. package/dist/client/assets/SuiteAppPreference-OTBArq0c.js.map +0 -1
  936. package/dist/client/assets/SuiteAppSwitcher-CwRCCSZM.js +0 -2
  937. package/dist/client/assets/SuiteAppSwitcher-CwRCCSZM.js.br +0 -0
  938. package/dist/client/assets/SuiteAppSwitcher-CwRCCSZM.js.gz +0 -0
  939. package/dist/client/assets/SuiteAppSwitcher-CwRCCSZM.js.map +0 -1
  940. package/dist/client/assets/SupportLog-DsUxaQQv.js +0 -2
  941. package/dist/client/assets/SupportLog-DsUxaQQv.js.br +0 -0
  942. package/dist/client/assets/SupportLog-DsUxaQQv.js.gz +0 -0
  943. package/dist/client/assets/SupportLog-DsUxaQQv.js.map +0 -1
  944. package/dist/client/assets/SupportSessions-SaHjgezM.js +0 -2
  945. package/dist/client/assets/SupportSessions-SaHjgezM.js.br +0 -0
  946. package/dist/client/assets/SupportSessions-SaHjgezM.js.gz +0 -0
  947. package/dist/client/assets/SupportSessions-SaHjgezM.js.map +0 -1
  948. package/dist/client/assets/TenantAdministration-mrM2QnDf.js +0 -4
  949. package/dist/client/assets/TenantAdministration-mrM2QnDf.js.br +0 -0
  950. package/dist/client/assets/TenantAdministration-mrM2QnDf.js.gz +0 -0
  951. package/dist/client/assets/TenantAdministration-mrM2QnDf.js.map +0 -1
  952. package/dist/client/assets/TenantApiTokens-BdjukuDq.js +0 -2
  953. package/dist/client/assets/TenantApiTokens-BdjukuDq.js.br +0 -0
  954. package/dist/client/assets/TenantApiTokens-BdjukuDq.js.gz +0 -0
  955. package/dist/client/assets/TenantApiTokens-BdjukuDq.js.map +0 -1
  956. package/dist/client/assets/TenantInvitations-BBZW5PlJ.js +0 -2
  957. package/dist/client/assets/TenantInvitations-BBZW5PlJ.js.br +0 -0
  958. package/dist/client/assets/TenantInvitations-BBZW5PlJ.js.gz +0 -0
  959. package/dist/client/assets/TenantInvitations-BBZW5PlJ.js.map +0 -1
  960. package/dist/client/assets/ThemeLab-D-rbgFHt.js +0 -4
  961. package/dist/client/assets/ThemeLab-D-rbgFHt.js.br +0 -0
  962. package/dist/client/assets/ThemeLab-D-rbgFHt.js.gz +0 -0
  963. package/dist/client/assets/ThemeLab-D-rbgFHt.js.map +0 -1
  964. package/dist/client/assets/TimelineComposer-Ckp7S3Jw.js +0 -2
  965. package/dist/client/assets/TimelineComposer-Ckp7S3Jw.js.br +0 -0
  966. package/dist/client/assets/TimelineComposer-Ckp7S3Jw.js.gz +0 -0
  967. package/dist/client/assets/TimelineComposer-Ckp7S3Jw.js.map +0 -1
  968. package/dist/client/assets/TimelineReactions-CCNJr1iP.js +0 -2
  969. package/dist/client/assets/TimelineReactions-CCNJr1iP.js.br +0 -0
  970. package/dist/client/assets/TimelineReactions-CCNJr1iP.js.gz +0 -0
  971. package/dist/client/assets/TimelineReactions-CCNJr1iP.js.map +0 -1
  972. package/dist/client/assets/TopNav-rfzfaYnb.js +0 -3
  973. package/dist/client/assets/TopNav-rfzfaYnb.js.br +0 -0
  974. package/dist/client/assets/TopNav-rfzfaYnb.js.gz +0 -0
  975. package/dist/client/assets/TopNav-rfzfaYnb.js.map +0 -1
  976. package/dist/client/assets/Tour-CD7xBphI.js +0 -2
  977. package/dist/client/assets/Tour-CD7xBphI.js.br +0 -0
  978. package/dist/client/assets/Tour-CD7xBphI.js.gz +0 -0
  979. package/dist/client/assets/Tour-CD7xBphI.js.map +0 -1
  980. package/dist/client/assets/TreeList-Btn-HOEG.js +0 -2
  981. package/dist/client/assets/TreeList-Btn-HOEG.js.br +0 -0
  982. package/dist/client/assets/TreeList-Btn-HOEG.js.gz +0 -0
  983. package/dist/client/assets/TreeList-Btn-HOEG.js.map +0 -1
  984. package/dist/client/assets/TreePicker-1SOl8uOl.js +0 -2
  985. package/dist/client/assets/TreePicker-1SOl8uOl.js.br +0 -0
  986. package/dist/client/assets/TreePicker-1SOl8uOl.js.gz +0 -0
  987. package/dist/client/assets/TreePicker-1SOl8uOl.js.map +0 -1
  988. package/dist/client/assets/ViewFormDialog-Cy6-wsa6.js +0 -3
  989. package/dist/client/assets/ViewFormDialog-Cy6-wsa6.js.br +0 -0
  990. package/dist/client/assets/ViewFormDialog-Cy6-wsa6.js.gz +0 -0
  991. package/dist/client/assets/ViewFormDialog-Cy6-wsa6.js.map +0 -1
  992. package/dist/client/assets/appImport-B1Zw1Xns.js +0 -4
  993. package/dist/client/assets/appImport-B1Zw1Xns.js.br +0 -0
  994. package/dist/client/assets/appImport-B1Zw1Xns.js.gz +0 -0
  995. package/dist/client/assets/appImport-B1Zw1Xns.js.map +0 -1
  996. package/dist/client/assets/appLive-CVqL8HXE.js +0 -3
  997. package/dist/client/assets/appLive-CVqL8HXE.js.br +0 -0
  998. package/dist/client/assets/appLive-CVqL8HXE.js.gz +0 -0
  999. package/dist/client/assets/appLive-CVqL8HXE.js.map +0 -1
  1000. package/dist/client/assets/assistantStream-CmRE78Om.js +0 -7
  1001. package/dist/client/assets/assistantStream-CmRE78Om.js.br +0 -0
  1002. package/dist/client/assets/assistantStream-CmRE78Om.js.gz +0 -0
  1003. package/dist/client/assets/assistantStream-CmRE78Om.js.map +0 -1
  1004. package/dist/client/assets/autoBucket-Cua5aa7g.js +0 -2
  1005. package/dist/client/assets/autoBucket-Cua5aa7g.js.br +0 -0
  1006. package/dist/client/assets/autoBucket-Cua5aa7g.js.gz +0 -0
  1007. package/dist/client/assets/autoBucket-Cua5aa7g.js.map +0 -1
  1008. package/dist/client/assets/beacon-tBH10XJa.js +0 -2
  1009. package/dist/client/assets/beacon-tBH10XJa.js.br +0 -0
  1010. package/dist/client/assets/beacon-tBH10XJa.js.gz +0 -0
  1011. package/dist/client/assets/beacon-tBH10XJa.js.map +0 -1
  1012. package/dist/client/assets/blocks-BbQFlpp5.js +0 -3
  1013. package/dist/client/assets/blocks-BbQFlpp5.js.br +0 -0
  1014. package/dist/client/assets/blocks-BbQFlpp5.js.gz +0 -0
  1015. package/dist/client/assets/blocks-BbQFlpp5.js.map +0 -1
  1016. package/dist/client/assets/builtInInputs-Cyh7CLeu.js +0 -3
  1017. package/dist/client/assets/builtInInputs-Cyh7CLeu.js.br +0 -0
  1018. package/dist/client/assets/builtInInputs-Cyh7CLeu.js.gz +0 -0
  1019. package/dist/client/assets/builtInInputs-Cyh7CLeu.js.map +0 -1
  1020. package/dist/client/assets/commandDraft-BDEpsjhG.js +0 -2
  1021. package/dist/client/assets/commandDraft-BDEpsjhG.js.br +0 -0
  1022. package/dist/client/assets/commandDraft-BDEpsjhG.js.gz +0 -0
  1023. package/dist/client/assets/commandDraft-BDEpsjhG.js.map +0 -1
  1024. package/dist/client/assets/componentLoader-CJDtPEZP.js +0 -2
  1025. package/dist/client/assets/componentLoader-CJDtPEZP.js.br +0 -0
  1026. package/dist/client/assets/componentLoader-CJDtPEZP.js.gz +0 -0
  1027. package/dist/client/assets/componentLoader-CJDtPEZP.js.map +0 -1
  1028. package/dist/client/assets/composer-DkpMOCcL.js +0 -2
  1029. package/dist/client/assets/composer-DkpMOCcL.js.br +0 -0
  1030. package/dist/client/assets/composer-DkpMOCcL.js.gz +0 -0
  1031. package/dist/client/assets/composer-DkpMOCcL.js.map +0 -1
  1032. package/dist/client/assets/computedParse-53SjyCBD.js +0 -2
  1033. package/dist/client/assets/computedParse-53SjyCBD.js.br +0 -0
  1034. package/dist/client/assets/computedParse-53SjyCBD.js.gz +0 -0
  1035. package/dist/client/assets/computedParse-53SjyCBD.js.map +0 -1
  1036. package/dist/client/assets/computedValue-D8nYJsY5.js +0 -2
  1037. package/dist/client/assets/computedValue-D8nYJsY5.js.br +0 -0
  1038. package/dist/client/assets/computedValue-D8nYJsY5.js.gz +0 -0
  1039. package/dist/client/assets/computedValue-D8nYJsY5.js.map +0 -1
  1040. package/dist/client/assets/conditionWords-DmDsN22s.js +0 -2
  1041. package/dist/client/assets/conditionWords-DmDsN22s.js.br +0 -0
  1042. package/dist/client/assets/conditionWords-DmDsN22s.js.gz +0 -0
  1043. package/dist/client/assets/conditionWords-DmDsN22s.js.map +0 -1
  1044. package/dist/client/assets/definedValues-fS5XjL-r.js +0 -2
  1045. package/dist/client/assets/definedValues-fS5XjL-r.js.br +0 -0
  1046. package/dist/client/assets/definedValues-fS5XjL-r.js.gz +0 -0
  1047. package/dist/client/assets/definedValues-fS5XjL-r.js.map +0 -1
  1048. package/dist/client/assets/experimentExposure-DTa8Hm5F.js +0 -3
  1049. package/dist/client/assets/experimentExposure-DTa8Hm5F.js.br +0 -0
  1050. package/dist/client/assets/experimentExposure-DTa8Hm5F.js.gz +0 -0
  1051. package/dist/client/assets/experimentExposure-DTa8Hm5F.js.map +0 -1
  1052. package/dist/client/assets/export-Bi1hKzaY.js +0 -4
  1053. package/dist/client/assets/export-Bi1hKzaY.js.br +0 -0
  1054. package/dist/client/assets/export-Bi1hKzaY.js.gz +0 -0
  1055. package/dist/client/assets/export-Bi1hKzaY.js.map +0 -1
  1056. package/dist/client/assets/formCommandRun-CXnf_Zru.js +0 -2
  1057. package/dist/client/assets/formCommandRun-CXnf_Zru.js.br +0 -0
  1058. package/dist/client/assets/formCommandRun-CXnf_Zru.js.gz +0 -0
  1059. package/dist/client/assets/formCommandRun-CXnf_Zru.js.map +0 -1
  1060. package/dist/client/assets/formStepCheck-BLuzAKCW.js +0 -2
  1061. package/dist/client/assets/formStepCheck-BLuzAKCW.js.br +0 -0
  1062. package/dist/client/assets/formStepCheck-BLuzAKCW.js.gz +0 -0
  1063. package/dist/client/assets/formStepCheck-BLuzAKCW.js.map +0 -1
  1064. package/dist/client/assets/handoff-DHp2ED4T.js +0 -3
  1065. package/dist/client/assets/handoff-DHp2ED4T.js.br +0 -0
  1066. package/dist/client/assets/handoff-DHp2ED4T.js.gz +0 -0
  1067. package/dist/client/assets/handoff-DHp2ED4T.js.map +0 -1
  1068. package/dist/client/assets/headlessLanding-DlBPoRJv.js +0 -2
  1069. package/dist/client/assets/headlessLanding-DlBPoRJv.js.br +0 -0
  1070. package/dist/client/assets/headlessLanding-DlBPoRJv.js.gz +0 -0
  1071. package/dist/client/assets/headlessLanding-DlBPoRJv.js.map +0 -1
  1072. package/dist/client/assets/host-DOVtLLi5.js +0 -3
  1073. package/dist/client/assets/host-DOVtLLi5.js.br +0 -0
  1074. package/dist/client/assets/host-DOVtLLi5.js.gz +0 -0
  1075. package/dist/client/assets/host-DOVtLLi5.js.map +0 -1
  1076. package/dist/client/assets/index-DjGO_I24.js +0 -16
  1077. package/dist/client/assets/index-DjGO_I24.js.br +0 -0
  1078. package/dist/client/assets/index-DjGO_I24.js.gz +0 -0
  1079. package/dist/client/assets/index-DjGO_I24.js.map +0 -1
  1080. package/dist/client/assets/liveSync-DPK6WHVY.js +0 -3
  1081. package/dist/client/assets/liveSync-DPK6WHVY.js.br +0 -0
  1082. package/dist/client/assets/liveSync-DPK6WHVY.js.gz +0 -0
  1083. package/dist/client/assets/liveSync-DPK6WHVY.js.map +0 -1
  1084. package/dist/client/assets/mentionRows-CqchdJxU.js +0 -2
  1085. package/dist/client/assets/mentionRows-CqchdJxU.js.br +0 -0
  1086. package/dist/client/assets/mentionRows-CqchdJxU.js.gz +0 -0
  1087. package/dist/client/assets/mentionRows-CqchdJxU.js.map +0 -1
  1088. package/dist/client/assets/newMenuModel-BUNDBPHB.js +0 -2
  1089. package/dist/client/assets/newMenuModel-BUNDBPHB.js.br +0 -0
  1090. package/dist/client/assets/newMenuModel-BUNDBPHB.js.gz +0 -0
  1091. package/dist/client/assets/newMenuModel-BUNDBPHB.js.map +0 -1
  1092. package/dist/client/assets/newRecordModel-COacFZQp.js +0 -2
  1093. package/dist/client/assets/newRecordModel-COacFZQp.js.br +0 -0
  1094. package/dist/client/assets/newRecordModel-COacFZQp.js.gz +0 -0
  1095. package/dist/client/assets/newRecordModel-COacFZQp.js.map +0 -1
  1096. package/dist/client/assets/oauthConsent-DWxzgFzp.js +0 -2
  1097. package/dist/client/assets/oauthConsent-DWxzgFzp.js.br +0 -0
  1098. package/dist/client/assets/oauthConsent-DWxzgFzp.js.gz +0 -0
  1099. package/dist/client/assets/oauthConsent-DWxzgFzp.js.map +0 -1
  1100. package/dist/client/assets/pageControls-BPzyEwVL.js +0 -2
  1101. package/dist/client/assets/pageControls-BPzyEwVL.js.br +0 -0
  1102. package/dist/client/assets/pageControls-BPzyEwVL.js.gz +0 -0
  1103. package/dist/client/assets/pageControls-BPzyEwVL.js.map +0 -1
  1104. package/dist/client/assets/paramControls-BJ5DF1BB.js +0 -2
  1105. package/dist/client/assets/paramControls-BJ5DF1BB.js.br +0 -0
  1106. package/dist/client/assets/paramControls-BJ5DF1BB.js.gz +0 -0
  1107. package/dist/client/assets/paramControls-BJ5DF1BB.js.map +0 -1
  1108. package/dist/client/assets/public-DUkNqQBu.js +0 -3
  1109. package/dist/client/assets/public-DUkNqQBu.js.br +0 -0
  1110. package/dist/client/assets/public-DUkNqQBu.js.gz +0 -0
  1111. package/dist/client/assets/public-DUkNqQBu.js.map +0 -1
  1112. package/dist/client/assets/publicInputs-DkbtGAz6.js +0 -3
  1113. package/dist/client/assets/publicInputs-DkbtGAz6.js.br +0 -0
  1114. package/dist/client/assets/publicInputs-DkbtGAz6.js.gz +0 -0
  1115. package/dist/client/assets/publicInputs-DkbtGAz6.js.map +0 -1
  1116. package/dist/client/assets/publicPageCommand-Df3ovK3o.js +0 -2
  1117. package/dist/client/assets/publicPageCommand-Df3ovK3o.js.br +0 -0
  1118. package/dist/client/assets/publicPageCommand-Df3ovK3o.js.gz +0 -0
  1119. package/dist/client/assets/publicPageCommand-Df3ovK3o.js.map +0 -1
  1120. package/dist/client/assets/publicPlacement-Xrx9FwDa.js +0 -2
  1121. package/dist/client/assets/publicPlacement-Xrx9FwDa.js.br +0 -0
  1122. package/dist/client/assets/publicPlacement-Xrx9FwDa.js.gz +0 -0
  1123. package/dist/client/assets/publicPlacement-Xrx9FwDa.js.map +0 -1
  1124. package/dist/client/assets/recordSearch-BooQh5lq.js +0 -2
  1125. package/dist/client/assets/recordSearch-BooQh5lq.js.br +0 -0
  1126. package/dist/client/assets/recordSearch-BooQh5lq.js.gz +0 -0
  1127. package/dist/client/assets/recordSearch-BooQh5lq.js.map +0 -1
  1128. package/dist/client/assets/savedFormApi-Csjc8bPX.js +0 -2
  1129. package/dist/client/assets/savedFormApi-Csjc8bPX.js.br +0 -0
  1130. package/dist/client/assets/savedFormApi-Csjc8bPX.js.gz +0 -0
  1131. package/dist/client/assets/savedFormApi-Csjc8bPX.js.map +0 -1
  1132. package/dist/client/assets/shell-qehtQ0mZ.js +0 -13
  1133. package/dist/client/assets/shell-qehtQ0mZ.js.br +0 -0
  1134. package/dist/client/assets/shell-qehtQ0mZ.js.gz +0 -0
  1135. package/dist/client/assets/shell-qehtQ0mZ.js.map +0 -1
  1136. package/dist/client/assets/steps-CRDgoYvd.js +0 -2
  1137. package/dist/client/assets/steps-CRDgoYvd.js.br +0 -0
  1138. package/dist/client/assets/steps-CRDgoYvd.js.gz +0 -0
  1139. package/dist/client/assets/steps-CRDgoYvd.js.map +0 -1
  1140. package/dist/client/assets/tenant-B6BEC4RN.js +0 -3
  1141. package/dist/client/assets/tenant-B6BEC4RN.js.br +0 -0
  1142. package/dist/client/assets/tenant-B6BEC4RN.js.gz +0 -0
  1143. package/dist/client/assets/tenant-B6BEC4RN.js.map +0 -1
  1144. package/dist/client/assets/tenantInvitations-B-SDmeVC.js +0 -2
  1145. package/dist/client/assets/tenantInvitations-B-SDmeVC.js.br +0 -0
  1146. package/dist/client/assets/tenantInvitations-B-SDmeVC.js.gz +0 -0
  1147. package/dist/client/assets/tenantInvitations-B-SDmeVC.js.map +0 -1
  1148. package/dist/client/assets/tenantLive-BTRcOx4D.js +0 -2
  1149. package/dist/client/assets/tenantLive-BTRcOx4D.js.br +0 -0
  1150. package/dist/client/assets/tenantLive-BTRcOx4D.js.gz +0 -0
  1151. package/dist/client/assets/tenantLive-BTRcOx4D.js.map +0 -1
  1152. package/dist/client/assets/themeBench-otuiwrzM.js +0 -2
  1153. package/dist/client/assets/themeBench-otuiwrzM.js.br +0 -0
  1154. package/dist/client/assets/themeBench-otuiwrzM.js.gz +0 -0
  1155. package/dist/client/assets/themeBench-otuiwrzM.js.map +0 -1
  1156. package/dist/client/assets/uiKitLoader-DVKww90c.js +0 -2
  1157. package/dist/client/assets/uiKitLoader-DVKww90c.js.br +0 -0
  1158. package/dist/client/assets/uiKitLoader-DVKww90c.js.gz +0 -0
  1159. package/dist/client/assets/uiKitLoader-DVKww90c.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrandingForm-eRqUdbav.js","names":["SERIES","HEX","useState","useRef","useMemo","__toESM","diagnosticColor","themeModes","measuredContrast","require_react","shellRoot","effectiveThemePalette","THEME_PRESETS","mixColor","Button","heatTop","over","Field","require_jsx_runtime","rolePath","PALETTE_TOKENS","Dropdown","served","api","withInks","defineMessages","effectiveThemeDefinition","families","colorHex","activeApp","import_react","PATTERN_STRENGTH","PAPER_STRENGTH","patternStrength","pattern","role","pathRole","series","path","letter","luminance","channels","hex","start","value","contrastRatio","left","a","right","b","EDGELESS_FIELD_DELTA","CONTRAST_PAIRS","SERIES$1","componentInks","color","palette","key","ink","surface","clear","out","recipes","index","second","third","slot","item","rolePairs","foreground","background","needs","what","ground","backgroundColor","ratio","themeFindings","themes","theme","definition","id","mode","own","name","at","foregroundColor","all","rule","stateFindings","result","check","said","token","label","subtle","text","danger","accent","css","soft","base","nav","navInk","navGround","weight","navAccent","markPart","tintOver","hover","patterned","place","line","under","where","inks","part","style","round","partInk","partGround","tinted","COLOR_ROLES","n","mixHex","x","y","colorPath","look","SPECS","themeSpecOf","DEFICIENCIES","CHART_SEPARATION","linear","oklab","r","g","l","m","s","simulate","matrix","row","chartDistance","see","deficiency","chartPairFailure","failed","kind","distance","chartsApart","ROLES","HEX$1","SERIES","chartFindings","findings","paletteId","authored","vision","FOLLOWERS","writtenFindings","raw","darkOnly","source","worn","group","written","pair","checkTheme","options","finding","word","reason","LOOK_PALETTES","apart","nearness","ledSeries","lead","leaving","rest","order","used","before","paletteColors","tone","link","SANS","HELVETICA","INTER","BARLOW","BARLOW_CONDENSED","PLEX_MONO","FIGURES","overColors","top","withPalettes","KIT_FONTS","GENERIC_SANS","brandingFonts","declaration","face","font","stack","themeOf","FOLLOWS_ACCENT","tenantTheme","chosen","primaryFollows","_palettes","_default","candidate","faces","brandingProblems","problems","wornFindings","seen","refusals","problem","message","sentence","_palette","accentFindings","after","changed","accentFor","light","darkOk","p","c","h","oklch","lift","dark","fromOklch","v","lms","L","A","B","chroma","rgb","say","import_jsx_runtime","HEX","RADII","LOGO_ADDRESS","root","BrandingForm","reply","setReply","setFailed","draft","setDraft","upload","setUpload","darkUpload","setDarkUpload","iconUpload","setIconUpload","phase","setPhase","setMessage","refused","setRefused","file","darkFile","iconFile","alive","got","error","allowed","editor","app","savedLogo","logo","savedDark","darkLogo","savedIcon","tabIcon","problemFor","field","set","current","patch","accentText","pairFor","preview","pick","chosenFile","event","bytes","binary","into","save","_logo","_logoDark","_favicon","disabled","control","typed","next","radius","height"],"sources":["../../../../engine/src/shared/themePartsCheck.ts","../../../../engine/src/shared/theme.ts","../../../src/shared/themeBuild.ts","../../../src/shared/themeSpec.ts","../../../../engine/src/shared/chartSeparation.ts","../../../src/shared/themeCheck.ts","../../../../engine/src/shared/lookPalettes.ts","../../../../engine/src/shared/themeLooks.ts","../../../src/shared/tenantBranding.ts","../../../src/client/copy/dashboards/components/BrandingForm.ts","../../../src/client/components/BrandingForm.tsx"],"sourcesContent":["/**\n * What a theme may say beyond the recipe menu, checked: its patterns (`surface`), its parts' styles (`parts`) and\n * its icons' weight (`type.icons`), for the spec (themeSpec.ts) and for a compiled theme read back (theme.ts\n * parseThemes) alike. A module apart from themeParts.ts, which the first paint wears and these messages are no\n * weight of.\n */\nimport type { ThemeIconWeight, ThemePart, ThemePartStyle, ThemePattern, ThemeSurface } from '../../schema/theme.js';\nimport { PALETTE_TOKENS, rolePath } from './themeTokens.js';\nimport { PART_CASES, PART_FACES, PART_LIFTS, PART_PROPERTIES, PART_RADII, PART_WEIGHTS, THEME_PARTS } from './themeParts.js';\n\n/** The patterns, drawn by surfacesLook.css; each at a strength of 1 (omitted), 2 or 3. */\nexport const PATTERN_KINDS = ['paper', 'grain', 'grid', 'dots', 'lines', 'scanlines'] as const;\n/** How much of the line color each strength draws a pattern in (surfacesLook.css says the same three). */\nconst PATTERN_STRENGTH = { 1: 0.4, 2: 0.7, 3: 1 } as const;\n/* Paper is two families of fibers crossing, twice the ink of one family of lines at a strength: at 40% its low end\n read as a mesh over the page, not a sheet of paper. Its own steps are half again lighter. */\nconst PAPER_STRENGTH = { 1: 0.2, 2: 0.45, 3: 0.7 } as const;\n/** How much of the line color a pattern of this kind and strength is drawn in. */\nexport const patternStrength = (pattern: ThemePattern): number =>\n (pattern.kind === 'paper' ? PAPER_STRENGTH : PATTERN_STRENGTH)[pattern.strength ?? 1];\n/** Phosphor's weights a theme may pick for the icons: thin fades at 16px, duotone says a second tone no role names. */\nexport const ICON_WEIGHTS: readonly ThemeIconWeight[] = ['regular', 'light', 'bold', 'fill'];\n\n/** The color roles a part may name, by their paths: every color but the widths and the shadow's ink. */\nconst PART_COLOR_PATHS: readonly string[] = Object.keys(PALETTE_TOKENS)\n .filter((role) => role !== 'shadow' && role !== 'rulesWeight' && role !== 'rulesControl')\n .map(rolePath);\n/** A role's path back to the role it names: `nav.onCurrent` is `navOnCurrent`, `chart[2]` is `chart3`. */\nexport function pathRole(path: string): string {\n const series = /^chart\\[(\\d)\\]$/.exec(path);\n if (series) return `chart${Number(series[1]) + 1}`;\n return path.replace(/\\.(\\w)/, (_, letter: string) => letter.toUpperCase());\n}\n\nfunction record(raw: unknown, where: string): Record<string, unknown> {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) throw new Error(`${where} must be an object.`);\n return raw as Record<string, unknown>;\n}\n\n/** `surface`: a pattern behind the page, one behind the menu, each of the six at a strength; omitted strength is 1. */\nexport function surfaceOf(raw: unknown, where: string): ThemeSurface {\n const surface = record(raw, where);\n const out: ThemeSurface = {};\n for (const [place, value] of Object.entries(surface)) {\n if (place !== 'ground' && place !== 'nav') throw new Error(`${where} has no \"${place}\". It takes: ground, nav.`);\n const pattern = record(value, `${where}.${place}`);\n for (const key of Object.keys(pattern))\n if (key !== 'kind' && key !== 'strength')\n throw new Error(\n `${where}.${place} has no \"${key}\". It takes: kind, strength. A pattern is one of the platform's, drawn in the theme's line color.`,\n );\n if (!(PATTERN_KINDS as readonly unknown[]).includes(pattern.kind))\n throw new Error(`${where}.${place}.kind must be one of ${PATTERN_KINDS.join(', ')}.`);\n if (pattern.strength !== undefined && pattern.strength !== 1 && pattern.strength !== 2 && pattern.strength !== 3)\n throw new Error(`${where}.${place}.strength must be 1, 2 or 3.`);\n out[place] = { kind: pattern.kind as ThemePattern['kind'], strength: (pattern.strength ?? 1) as 1 | 2 | 3 };\n }\n return out;\n}\n\n/** `parts`: each a published part, saying only what its menus hold. */\nexport function partsOf(raw: unknown, where: string): Partial<Record<ThemePart, ThemePartStyle>> {\n const parts = record(raw, where);\n const out: Partial<Record<ThemePart, ThemePartStyle>> = {};\n for (const [part, value] of Object.entries(parts)) {\n if (!(THEME_PARTS as readonly string[]).includes(part))\n throw new Error(`${where} has no \"${part}\". The parts are: ${THEME_PARTS.join(', ')}.`);\n const at = `${where}.${part}`;\n const style = record(value, at);\n for (const [property, said] of Object.entries(style)) {\n if (!(PART_PROPERTIES as readonly string[]).includes(property))\n throw new Error(\n `${at} has no \"${property}\". It takes: ${PART_PROPERTIES.join(', ')}. A part's size, spacing, order and visibility are the App's, never its theme's.`,\n );\n const menu = (why: string, values: readonly unknown[]) => {\n if (!values.includes(said)) throw new Error(`${at}.${property} must be one of ${values.join(', ')}${why}.`);\n };\n if (property === 'ground' || property === 'ink' || property === 'edge') {\n if (said === 'nav.currentInk') throw new Error(`${at}.${property} names nav.currentInk, which is now nav.onCurrent.`);\n if (typeof said !== 'string' || !PART_COLOR_PATHS.includes(said))\n throw new Error(`${at}.${property} must be a color role by its path, like nav.ground or chart[2], never a hex.`);\n } else if (property === 'radius') menu(\": a corner the theme's shape already says, or square\", PART_RADII);\n else if (property === 'lift') menu('', PART_LIFTS);\n else if (property === 'face') menu(\": a face the theme's type already says\", PART_FACES);\n else if (property === 'weight') menu('', PART_WEIGHTS);\n else menu('', PART_CASES);\n }\n out[part as ThemePart] = { ...style } as ThemePartStyle;\n }\n return out;\n}\n\n/** `type.icons`: one of Phosphor's weights the icons are drawn in. */\nexport function iconsOf(raw: unknown, where: string): ThemeIconWeight {\n if (!(ICON_WEIGHTS as readonly unknown[]).includes(raw))\n throw new Error(\n `${where} must be one of ${ICON_WEIGHTS.join(', ')}: thin draws a 1px stroke that fades at the 16px an icon is drawn at, and duotone a second tone no color role says.`,\n );\n return raw as ThemeIconWeight;\n}\n","import type { ThemeDefinition, ThemePalette, ThemePaletteVariant, ThemeRecipes } from '../../schema/theme.js';\nimport {\n effectiveThemeDefinition,\n effectiveThemePalette,\n parseScheme,\n THEME_PRESETS,\n themeModes,\n withInks,\n type AppAccent,\n} from './themePresets.js';\nimport { colorHex, diagnosticColor, HEAT_TOP, heatTop, measuredContrast, mixColor, over, type Color } from './themeColor.js';\nimport { DENSITIES, ELEVATIONS, LIFTS, MOTIONS, RECIPE_MENU, RECIPES_RENAMED, RHYTHMS } from './themeRecipes.js';\nimport { families } from './themeFaces.js';\nimport { iconsOf, partsOf, pathRole, patternStrength, surfaceOf } from './themePartsCheck.js';\nimport { TYPE_MOVED, typeOf } from './themeType.js';\nimport {\n BORDER_MENU,\n CONTROL_HEIGHT,\n controlHeightFits,\n cornerFits,\n FONT_TOKENS,\n PALETTE_TOKENS,\n RADIUS_MAX,\n RADIUS_TOKENS,\n rolePath,\n ROUND,\n ROUND_CORNERS,\n THEME_BASES,\n} from './themeTokens.js';\nexport { FONT_TOKENS, PALETTE_TOKENS, RADIUS_TOKENS, shapeTokens, THEME_BASES } from './themeTokens.js';\nexport type { ThemeBase, ThemeDefinition, ThemePalette, ThemePaletteVariant } from '../../schema/theme.js';\n\nfunction object(raw: unknown, where: string): Record<string, unknown> {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) throw new Error(`${where} must be an object.`);\n return raw as Record<string, unknown>;\n}\n\nfunction strings(raw: unknown, keys: readonly string[], valid: (value: string) => boolean, where: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(object(raw, where))) {\n if (!keys.includes(key)) throw new Error(`${where} has no \"${key}\". It takes: ${keys.join(', ')}.`);\n if (typeof value !== 'string' || !valid(value.trim())) throw new Error(`${where}.${key} has an invalid value.`);\n out[key] = value.trim();\n }\n return out;\n}\n\n/** The roles' names before they were the spec's own (0.9.2), each to the one that replaced it. */\nconst OLD_ROLES: Readonly<Record<string, string>> = {\n background: 'ground',\n subtle: 'raised',\n border: 'line',\n borderStrong: 'lineStrong',\n borderControl: 'lineControl',\n text: 'ink',\n textMuted: 'inkMuted',\n textSubtle: 'inkSubtle',\n positive: 'statusGood',\n warning: 'statusWarning',\n negative: 'statusCritical',\n key: 'statusInfo',\n navSurface: 'navGround',\n navText: 'navInk',\n navBorder: 'navLine',\n navCurrentText: 'navOnCurrent',\n navCurrentInk: 'navOnCurrent',\n sectionRule: 'rulesSection',\n headRule: 'rulesHead',\n ruleWeight: 'rulesWeight',\n};\n\n/** A palette's roles: opaque six-digit hex colors, but for `rulesWeight` and `rulesControl`, widths. */\nconst RULE_WEIGHTS = ['1px', '2px', '3px'] as const;\nconst CONTROL_WEIGHTS = ['0px', '1px', '2px'] as const;\nfunction paletteStrings(raw: unknown, where: string): Record<string, string> {\n const colors = Object.keys(PALETTE_TOKENS).filter((key) => key !== 'rulesWeight' && key !== 'rulesControl');\n const { rulesWeight, rulesControl, ...rest } = object(raw, where);\n for (const key of Object.keys(rest))\n if (Object.hasOwn(OLD_ROLES, key)) throw new Error(`${where}.${key} is now ${where}.${OLD_ROLES[key]}.`);\n const result = strings(rest, colors, (color) => /^#[0-9a-f]{6}$/i.test(color), where);\n if (rulesWeight !== undefined) {\n if (typeof rulesWeight !== 'string' || !(RULE_WEIGHTS as readonly string[]).includes(rulesWeight.trim())) {\n throw new Error(`${where}.rulesWeight must be one of ${RULE_WEIGHTS.join(', ')}.`);\n }\n result.rulesWeight = rulesWeight.trim();\n }\n if (rulesControl !== undefined) {\n if (typeof rulesControl !== 'string' || !(CONTROL_WEIGHTS as readonly string[]).includes(rulesControl.trim())) {\n throw new Error(`${where}.rulesControl must be one of ${CONTROL_WEIGHTS.join(', ')}.`);\n }\n result.rulesControl = rulesControl.trim();\n }\n return result;\n}\n\n/**\n * `platform` says the themes are the platform's own, derived from a built-in look (a tenant's branding is the App's\n * chosen look with the tenant's accent over it): only those may carry `startedFrom`, which `useLook().preset` reads.\n * An authored theme names its look with `extends`; one that sets `startedFrom` is refused, so no App can pass itself\n * off as a built-in preset.\n */\nexport function parseThemes(\n raw: unknown,\n where: string,\n key = 'themes',\n { platform = false }: { platform?: boolean } = {},\n): ThemeDefinition[] | undefined {\n if (raw === undefined) return undefined;\n if (!Array.isArray(raw) || raw.length > 20) throw new Error(`${where}.${key} must be an array of at most 20 themes.`);\n const used = new Set<string>(['default', ...THEME_BASES]);\n return raw.map((value, index): ThemeDefinition => {\n const path = `${where}.${key}[${index}]`;\n const theme = object(value, path);\n for (const key of Object.keys(theme)) {\n if (key === 'startedFrom' && !platform)\n throw new Error(\n `${path}.startedFrom is set by the platform when a theme starts from a built-in look; name the look with \"extends\" instead.`,\n );\n if (key === 'scale' || key === 'headingWeight') throw new Error(`${path}.${key} is now ${path}.${TYPE_MOVED[`type.${key}`]}.`);\n if (\n ![\n 'id',\n 'label',\n 'startedFrom',\n 'base',\n 'light',\n 'dark',\n 'palettes',\n 'defaultPalette',\n 'scheme',\n 'fonts',\n 'radius',\n 'border',\n 'height',\n ...STRUCTURE_KEYS,\n ].includes(key)\n )\n throw new Error(`${path} has no \"${key}\".`);\n }\n if (typeof theme.id !== 'string' || !/^[a-z][a-z0-9-]{0,47}$/.test(theme.id) || used.has(theme.id)) {\n throw new Error(`${path}.id must be a unique slug, not a built-in theme name.`);\n }\n used.add(theme.id);\n if (typeof theme.label !== 'string' || !theme.label.trim() || theme.label.trim().length > 60)\n throw new Error(`${path}.label must have 1 to 60 characters.`);\n if (theme.startedFrom !== undefined && (typeof theme.startedFrom !== 'string' || !/^[a-z][a-z0-9-]{0,47}$/.test(theme.startedFrom)))\n throw new Error(`${path}.startedFrom must be a slug.`);\n if (theme.base !== undefined && (typeof theme.base !== 'string' || !(THEME_BASES as readonly string[]).includes(theme.base)))\n throw new Error(`${path}.base must be one of ${THEME_BASES.join(', ')}.`);\n const palette = (mode: 'light' | 'dark'): ThemePalette => {\n const result = paletteStrings(theme[mode], `${path}.${mode}`);\n for (const required of ['surface', 'ink', 'accent']) {\n if (!result[required]) throw new Error(`${path}.${mode}.${required} is required (a six-digit hex color).`);\n }\n return { ...result, surface: result.surface!, ink: result.ink!, accent: result.accent! };\n };\n const scheme = parseScheme(theme.scheme, path);\n const dark = palette('dark');\n /* One set of colors worn in both slots (themeBuild.ts): a light slot of its own is the colors a dark-only theme lacks. */\n const light = scheme === 'dark-only' ? dark : palette('light');\n if (scheme === 'dark-only' && theme.light !== undefined && JSON.stringify(palette('light')) !== JSON.stringify(dark))\n throw new Error(`${path}.light: a dark-only theme has no light colors; name dark alone, or drop scheme: 'dark-only'.`);\n const palettes = parsePaletteVariants(theme.palettes, path);\n if (\n theme.defaultPalette !== undefined &&\n (typeof theme.defaultPalette !== 'string' ||\n (theme.defaultPalette !== 'default' && !palettes?.some((item) => item.id === theme.defaultPalette)))\n ) {\n throw new Error(`${path}.defaultPalette must be \"default\" or one of this theme's palettes.`);\n }\n return {\n id: theme.id,\n label: theme.label.trim(),\n ...(theme.startedFrom !== undefined && { startedFrom: theme.startedFrom as string }),\n base: (theme.base ?? 'mono') as ThemeDefinition['base'],\n light,\n dark,\n ...(scheme === undefined ? {} : { scheme }),\n ...(palettes === undefined ? {} : { palettes }),\n ...(theme.defaultPalette === undefined ? {} : { defaultPalette: theme.defaultPalette as string }),\n ...(theme.fonts === undefined\n ? {}\n : {\n fonts: strings(\n theme.fonts,\n Object.keys(FONT_TOKENS),\n (font) => font.length > 0 && font.length <= 200 && /^[\\w\\s'\",.-]+$/.test(font),\n `${path}.fonts`,\n ),\n }),\n ...(theme.radius === undefined ? {} : { radius: radii(theme.radius, `${path}.radius`) }),\n ...(theme.border === undefined ? {} : { border: borders(theme.border, `${path}.border`) }),\n ...(theme.height === undefined ? {} : { height: heights(theme.height, `${path}.height`) }),\n ...structure(theme, path),\n };\n });\n}\n\n/** A compiled theme's corners, each within its ceiling, a control's and a pill's `round` as ROUND. */\nfunction radii(raw: unknown, where: string): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(object(raw, where))) {\n if (!Object.hasOwn(RADIUS_TOKENS, key))\n throw new Error(`${where} has no \"${key}\". It takes: ${Object.keys(RADIUS_TOKENS).join(', ')}.`);\n const fits = cornerFits(value, RADIUS_MAX[key as keyof typeof RADIUS_MAX]) || (ROUND_CORNERS.has(key) && value === ROUND);\n if (!fits) throw new Error(`${where}.${key} has an invalid value.`);\n out[key] = value as string;\n }\n return out;\n}\n/** A compiled theme's panel edge and focus ring, each from its menu. */\nfunction borders(raw: unknown, where: string): NonNullable<ThemeDefinition['border']> {\n const out: Record<string, string> = {};\n for (const [key, value] of Object.entries(object(raw, where))) {\n if (key !== 'panel' && key !== 'focus') throw new Error(`${where} has no \"${key}\". It takes: panel, focus.`);\n if (!(BORDER_MENU[key] as readonly unknown[]).includes(value)) throw new Error(`${where}.${key} has an invalid value.`);\n out[key] = value as string;\n }\n return out as NonNullable<ThemeDefinition['border']>;\n}\n\n/** A compiled theme's control height: whole pixels from CONTROL_HEIGHT.min to .max. */\nfunction heights(raw: unknown, where: string): NonNullable<ThemeDefinition['height']> {\n const out: { control?: string } = {};\n for (const [key, value] of Object.entries(object(raw, where))) {\n if (key !== 'control') throw new Error(`${where} has no \"${key}\". It takes: control.`);\n if (!controlHeightFits(value))\n throw new Error(`${where}.control must be a length from ${CONTROL_HEIGHT.min}px to ${CONTROL_HEIGHT.max}px.`);\n out.control = value as string;\n }\n return out;\n}\n\n/**\n * What a theme's shape says that `check` warns of (theme-radius): a panel squarer than the controls it holds, its\n * corner cutting under theirs. A round control is a pill, not a corner, so it is never measured against a panel.\n */\nexport function themeShapeWarnings(themes: readonly ThemeDefinition[]): string[] {\n return themes.flatMap((theme, index) => {\n const control = theme.radius?.control,\n panel = theme.radius?.panel;\n if (!control || !panel || control === ROUND || parseFloat(panel) >= parseFloat(control)) return [];\n return [\n `ui.customThemes[${index}] (\"${theme.id}\") shape.radius.panel ${panel} is squarer than shape.radius.control ${control}: a panel holds controls, so give its corner at least theirs.`,\n ];\n });\n}\n\n/**\n * What a theme's shadow says that `check` warns of (theme-shadow, the contract's C2): a shadow lighter than the ground\n * it falls on, which draws a glow round a card or a menu rather than lifting it off the page — the edge the lift was\n * for is lost. The theme still wears.\n */\nexport function themeShadowWarnings(themes: readonly ThemeDefinition[]): string[] {\n return themes.flatMap((theme, index) => {\n const worn = effectiveThemeDefinition(theme, 'default');\n return themeModes(theme).flatMap((mode) => {\n const shadow = worn[mode].shadow,\n ground = worn[mode].ground ?? worn[mode].surface;\n if (!shadow || !/^#[0-9a-f]{6}$/i.test(shadow) || !/^#[0-9a-f]{6}$/i.test(ground) || luminance(shadow) <= luminance(ground))\n return [];\n return [\n `ui.customThemes[${index}] (\"${theme.id}\") colors.${mode}.shadow ${shadow} is lighter than its ground ${ground}: a shadow lighter than the page is a glow, not a lift, so give it a color darker than the ground.`,\n ];\n });\n });\n}\n\n/**\n * What a banded table's parts say that `check` warns of (theme-band, the contract's C13): a `status` or `tag` part\n * given an opaque ground. Part rules live in the `theme` cascade layer, above the `look` layer's band, so the chip\n * keeps its own ground on every other row and shows as a pale column. The author's color is not touched: a\n * translucent ground lets the band through, and so does the default.\n */\nexport function themeBandWarnings(themes: readonly ThemeDefinition[]): string[] {\n return themes.flatMap((theme, index) => {\n if (theme.recipes?.table !== 'banded') return [];\n const worn = effectiveThemeDefinition(theme, 'default');\n return (['status', 'tag'] as const).flatMap((part) => {\n const role = theme.parts?.[part]?.ground;\n if (!role) return [];\n const key = pathRole(role) as keyof ThemePalette;\n const opaque = themeModes(theme).filter((mode) => {\n const value = worn[mode][key];\n const color = value ? diagnosticColor(value) : undefined;\n return color !== undefined && color[3] >= 1;\n });\n if (!opaque.length) return [];\n return [\n `ui.customThemes[${index}] (\"${theme.id}\") parts.${part}.ground ${role} is opaque (${opaque.join(', ')}) on a banded table: a ${part} cell will not take the band and shows as a pale column on every other row, so give it a translucent ground or leave it out for the look's.`,\n ];\n });\n });\n}\n\n/** The stack a role's face reads when the role names none: the titles' the heading face, the rest the interface's. */\nconst ROLE_FACE: Record<string, 'heading' | 'ui'> = { display: 'heading', title: 'heading', heading: 'heading', section: 'heading' };\n\n/**\n * What a theme's type says that `check` warns of (theme-type, the contract's C8): a role heavier than 700 whose face\n * leads with a family the theme does not ship at that weight. design.md keeps titles at 700 or under for this: a\n * heavier weight a family has no file for is drawn by the browser as a smeared 700, or resolves a book face to its\n * Black cut, a masthead where a title was meant.\n */\nexport function themeTypeWarnings(themes: readonly ThemeDefinition[]): string[] {\n return themes.flatMap((theme, index) => {\n const worn = effectiveThemeDefinition(theme, 'default');\n return Object.entries(worn.type?.roles ?? {}).flatMap(([role, said]) => {\n /* A line under 1.0 sets its descenders into the next: a title that wraps (a long name, a phone) collides with\n itself. Allowed down to 0.85 for a short large line, so it warns rather than refuses. */\n const leading =\n said.leading !== undefined && said.leading < 1\n ? [\n `ui.customThemes[${index}] (\"${theme.id}\") type.roles.${role}.leading ${said.leading} is under 1.0: a ${role} that wraps sets its descenders into the next line, so keep it at 1.0 or over unless it is one short line.`,\n ]\n : [];\n const weight = said.weight;\n if (weight === undefined || weight <= 700) return leading;\n const face = said.face ?? ROLE_FACE[role] ?? 'ui';\n const stack = (face === 'heading' ? (worn.fonts?.heading ?? worn.fonts?.ui) : worn.fonts?.[face]) ?? '';\n const lead = families(stack)[0];\n const shipped = (worn.faces ?? []).some((file) => {\n const [low, high = low] = file.weight.split(' ').map(Number);\n return file.family.toLowerCase() === lead?.toLowerCase() && weight >= low! && weight <= high!;\n });\n if (shipped) return leading;\n return [\n ...leading,\n `ui.customThemes[${index}] (\"${theme.id}\") type.roles.${role}.weight ${weight} is past 700 in a face the theme does not ship at that weight${lead ? ` (${lead})` : ''}: the browser draws a smeared 700 or a Black cut, so ship the face at ${weight} in type.faces or keep the weight at 700 or under.`,\n ];\n });\n });\n}\n\nconst STRUCTURE_KEYS = ['recipes', 'elevation', 'type', 'density', 'motion', 'rhythm', 'lifts', 'surface', 'parts', 'icons'] as const;\n/** A compiled theme's structure, as `compileTheme` writes it: every value from the menu. */\nfunction structure(theme: Record<string, unknown>, path: string): Partial<ThemeDefinition> {\n const out: Partial<ThemeDefinition> = {};\n if (theme.recipes !== undefined) {\n const recipes = object(theme.recipes, `${path}.recipes`);\n for (const [part, value] of Object.entries(recipes)) {\n if (TYPE_MOVED[`recipes.${part}`]) throw new Error(`${path}.recipes.${part} is now ${path}.${TYPE_MOVED[`recipes.${part}`]}.`);\n if (Object.hasOwn(RECIPES_RENAMED, part)) throw new Error(`${path}.recipes.${part} is now ${path}.recipes.${RECIPES_RENAMED[part]}.`);\n const menu = (RECIPE_MENU as Record<string, Record<string, unknown>>)[part];\n if (!menu || typeof value !== 'string' || !Object.hasOwn(menu, value)) throw new Error(`${path}.recipes.${part} is not on the menu.`);\n }\n out.recipes = { ...recipes } as ThemeDefinition['recipes'];\n }\n if (theme.elevation !== undefined) {\n if (typeof theme.elevation !== 'string' || !Object.hasOwn(ELEVATIONS, theme.elevation))\n throw new Error(`${path}.elevation is not on the menu.`);\n out.elevation = theme.elevation as ThemeDefinition['elevation'];\n }\n if (theme.type !== undefined) {\n const type = object(theme.type, `${path}.type`);\n for (const key of Object.keys(type))\n if (key !== 'base' && key !== 'roles') throw new Error(`${path}.type has no \"${key}\". It takes: base, roles.`);\n out.type = typeOf(type.base, type.roles, `${path}.type`);\n }\n if (theme.density !== undefined) {\n if (!(DENSITIES as readonly unknown[]).includes(theme.density))\n throw new Error(`${path}.density must be one of ${DENSITIES.join(', ')}.`);\n out.density = theme.density as ThemeDefinition['density'];\n }\n if (theme.lifts !== undefined) {\n const lifts = object(theme.lifts, `${path}.lifts`);\n for (const [key, step] of Object.entries(lifts))\n if ((key !== 'card' && key !== 'float') || typeof step !== 'string' || step === 'look' || !Object.hasOwn(LIFTS, step))\n throw new Error(`${path}.lifts.${key} is not on the menu.`);\n out.lifts = { ...lifts } as ThemeDefinition['lifts'];\n }\n if (theme.motion !== undefined) {\n if (typeof theme.motion !== 'string' || !Object.hasOwn(MOTIONS, theme.motion))\n throw new Error(`${path}.motion must be one of ${Object.keys(MOTIONS).join(', ')}.`);\n out.motion = theme.motion as ThemeDefinition['motion'];\n }\n if (theme.rhythm !== undefined) {\n if (typeof theme.rhythm !== 'string' || !Object.hasOwn(RHYTHMS, theme.rhythm))\n throw new Error(`${path}.rhythm must be one of ${Object.keys(RHYTHMS).join(', ')}.`);\n out.rhythm = theme.rhythm as ThemeDefinition['rhythm'];\n }\n if (theme.surface !== undefined) out.surface = surfaceOf(theme.surface, `${path}.surface`);\n if (theme.parts !== undefined) out.parts = partsOf(theme.parts, `${path}.parts`);\n if (theme.icons !== undefined) out.icons = iconsOf(theme.icons, `${path}.icons`);\n return out;\n}\n\nfunction parsePaletteVariants(raw: unknown, where: string): ThemePaletteVariant[] | undefined {\n if (raw === undefined) return undefined;\n if (!Array.isArray(raw) || raw.length > 20) throw new Error(`${where}.palettes must be an array of at most 20 palettes.`);\n const used = new Set(['default']);\n return raw.map((value, index) => {\n const path = `${where}.palettes[${index}]`,\n variant = object(value, path);\n for (const key of Object.keys(variant)) {\n if (!['id', 'label', 'light', 'dark'].includes(key)) throw new Error(`${path} has no \"${key}\".`);\n }\n if (typeof variant.id !== 'string' || !/^[a-z][a-z0-9-]{0,47}$/.test(variant.id) || used.has(variant.id)) {\n throw new Error(`${path}.id must be a unique slug, not \"default\".`);\n }\n used.add(variant.id);\n if (typeof variant.label !== 'string' || !variant.label.trim() || variant.label.trim().length > 60)\n throw new Error(`${path}.label must have 1 to 60 characters.`);\n const palette = (mode: 'light' | 'dark') => paletteStrings(variant[mode], `${path}.${mode}`);\n return { id: variant.id, label: variant.label.trim(), light: palette('light'), dark: palette('dark') };\n });\n}\n\n/** WCAG relative luminance, for the opaque hex colors accepted by the contract. */\nfunction luminance(hex: string): number {\n const channels = [1, 3, 5]\n .map((start) => parseInt(hex.slice(start, start + 2), 16) / 255)\n .map((value) => (value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4));\n return channels[0]! * 0.2126 + channels[1]! * 0.7152 + channels[2]! * 0.0722;\n}\n\nexport function contrastRatio(a: string, b: string): number {\n const left = luminance(a),\n right = luminance(b);\n return (Math.max(left, right) + 0.05) / (Math.min(left, right) + 0.05);\n}\n\n/**\n * The least luminance ratio a field's fill may be from the ground and the surface it sits on, when the field draws\n * no edge. 1.08:1 is Lintel's Hearth (a warm #eeede7 well on a #f7f6f2 page, 1.085, and on white, 1.173): the faintest\n * field we ship that still reads as a well, and the faintest a calibrated laptop screen shows in daylight. Below it\n * (white on #fcfbf8, 1.03) the field is gone. WCAG 1.4.11 asks 3:1 of a control's boundary unless it is identified\n * some other way; the label stands over the field and the focus ring draws a 2px edge, which is that other way.\n */\nexport const EDGELESS_FIELD_DELTA = 1.08;\n\n/** What startup checks in each mode, and the ratio each pair must reach: text\n at 4.5:1 (WCAG 1.4.3) — the meaning colors on the page as well as on a\n panel, since a status word sits on both, and the page is where Meridian's\n red read at 4.4:1 while its panels passed — and a form control's edge at\n 3:1 (1.4.11) on the field it frames and on the page around it. Section and\n table hairlines are decoration, and are not checked. */\nconst CONTRAST_PAIRS: ReadonlyArray<readonly [keyof ThemePalette, keyof ThemePalette, number, string?]> = [\n ['ink', 'surface', 4.5],\n ['inkMuted', 'surface', 4.5],\n ['inkSubtle', 'surface', 4.5],\n ['ink', 'ground', 4.5],\n ['ink', 'raised', 4.5],\n /* A field's own fill (`colors.field`, the surface where it names none): the words typed in it, the faint ink of its\n placeholder and the muted ink of its hint stand on it, and its edge. Skipped where the fill is the surface, which\n the pairs above already measure. */\n ['ink', 'field', 4.5, 'the words in a field'],\n ['inkMuted', 'field', 4.5, \"a field's muted words\"],\n ['inkSubtle', 'field', 4.5, \"a field's placeholder\"],\n ['lineControl', 'field', 3, \"a control's edge on a field's fill\"],\n /* Every ink is drawn where the text it is for is drawn, not only on the panel it was picked on: a caption under a\n page's title and a count beside a tab stand on the page (TC13, a theme check passed and its pages failed). */\n ['inkMuted', 'ground', 4.5, 'a caption on the page'],\n ['inkSubtle', 'ground', 4.5, 'a faint caption on the page'],\n ['link', 'ground', 4.5],\n ['link', 'raised', 4.5],\n // The same accent underlines the current workspace and room on the bar (visualThemes.css), so one pair measures both.\n ['navAccent', 'navGround', 4.5, \"the menu's current entry and the underline marking the current workspace\"],\n /* The accent is a fill, and is read as text in its ink (`accentInk`, the accent itself where a theme names none and\n it reads); the words drawn on a fill are `onAccent`. A bright brand accent can be a good fill and a poor text. */\n ['accentInk', 'surface', 4.5],\n // A quiet button's word and a current tab are the accent's ink on the page, and on a raised panel or a hovered row.\n ['accentInk', 'ground', 4.5, 'an action in the accent on the page'],\n ['accentInk', 'raised', 4.5, 'an action in the accent on a raised panel or a hovered row'],\n ['onAccent', 'accent', 4.5, 'the words on an accent fill'],\n ['onPrimary', 'primary', 4.5, \"the words on a form's primary action\"],\n ['link', 'surface', 4.5],\n ['navInk', 'navGround', 4.5, \"the menu's entries and the current workspace\"],\n ['navMuted', 'navGround', 4.5, \"the menu's group headings, counts and icons, and the other workspaces\"],\n ...(['statusGood', 'statusWarning', 'statusCritical', 'statusInfo'] as const).flatMap(\n (role) =>\n [\n [role, 'surface', 4.5],\n [role, 'ground', 4.5],\n [role, 'raised', 4.5, 'a status word in a hovered row or on a raised panel'],\n ] as const,\n ),\n ['lineControl', 'surface', 3],\n ['lineControl', 'ground', 3],\n /* A field stands on a raised panel too, and a list's sort and filter controls on its head: a control's edge that\n passed on the panel and the page read 2.94:1 there. */\n ['lineControl', 'raised', 3, \"a control's edge on a raised panel or a table's head\"],\n // The focus ring is a graphic the keyboard reader follows (1.4.11): on the field, the page and the subtle panel it can sit on.\n ['focus', 'surface', 3],\n ['focus', 'ground', 3],\n ['focus', 'raised', 3],\n /* A chart's first four series are graphics a reader has to tell from the\n card they sit on; past four, a chart is already a legend's job. */\n ...(['chart1', 'chart2', 'chart3', 'chart4'] as const).map((series) => [series, 'surface', 3] as const),\n];\n\nexport { HEAT_TOP, heatTop };\n\nconst SERIES = ['chart1', 'chart2', 'chart3', 'chart4', 'chart5', 'chart6', 'chart7', 'chart8'] as const;\n\n/**\n * The colours a platform component mixes from a theme's series and its ink rather than wears as a token: no pair of\n * tokens is what it draws, so each is measured as drawn, and named by the series it comes from. A board card's\n * category chip (TriageBoard.css: 45% of its series in the ink, except under the `strip` board, which says it in words, on a 13% tint of it over the card), a person's\n * initials on their avatar (features.css: 45% in the ink, on a 15% tint over a 7% ink wash), and under the `icon`\n * stat recipe, a stat card's mark (lumenLook.css: 80% in the ink on a 12% tint, a graphic at 3:1). `check` holds a\n * theme to each, and `grade` names the series behind a reading of one.\n */\nexport function componentInks(\n palette: ThemePalette,\n recipes: Partial<ThemeRecipes> = {},\n): Array<{ role: keyof ThemePalette; what: string; fg: string; bg: string; needs: number }> {\n const color = (key: keyof ThemePalette) => (palette[key] ? diagnosticColor(palette[key]!) : undefined);\n const ink = color('ink'),\n surface = color('surface');\n if (!ink || !surface) return [];\n const clear: Color = [0, 0, 0, 0];\n const out: Array<{ role: keyof ThemePalette; what: string; fg: Color; bg: Color; needs: number }> = [];\n SERIES.forEach((role, index) => {\n const series = color(role);\n if (!series) return;\n if (recipes.board !== 'strip')\n out.push({\n role,\n what: \"a board card's category chip\",\n fg: mixColor(series, ink, 0.45),\n bg: over(mixColor(series, clear, 0.13), surface),\n needs: 4.5,\n });\n if (index < 7)\n out.push({\n role,\n what: \"an avatar's initials\",\n fg: mixColor(series, ink, 0.45),\n bg: mixColor(series, mixColor(ink, surface, 0.07), 0.15),\n needs: 4.5,\n });\n if (recipes.stat === 'icon' && index < 4)\n out.push({\n role,\n what: \"a stat card's mark\",\n fg: mixColor(series, ink, 0.8),\n bg: mixColor(series, surface, 0.12),\n needs: 3,\n });\n });\n /* The eighth avatar is the second and third series half and half: said by the second. */\n const second = color('chart2'),\n third = color('chart3');\n if (second && third) {\n const slot = mixColor(second, third, 0.5);\n out.push({\n role: 'chart2',\n what: \"the eighth avatar's initials (chart[1] and chart[2] half and half)\",\n fg: mixColor(slot, ink, 0.45),\n bg: mixColor(slot, mixColor(ink, surface, 0.07), 0.15),\n needs: 4.5,\n });\n }\n return out.map((item) => ({ ...item, fg: colorHex(over(item.fg, item.bg)), bg: colorHex(item.bg) }));\n}\n\n/**\n * The pairs a role is read in (CONTRAST_PAIRS), measured with `value` drawn in its place: what an author wrote for a\n * colour the page wears as another (a link written as the accent is drawn in the accent's ink), so the colour as\n * written is held to the rule its role is.\n */\nexport function rolePairs(\n palette: ThemePalette,\n role: keyof ThemePalette,\n value: string,\n): Array<{ background: keyof ThemePalette; needs: number; what?: string; ratio: number }> {\n const foreground = diagnosticColor(value);\n if (!foreground) return [];\n return CONTRAST_PAIRS.flatMap(([ink, background, needs, what]) => {\n const ground = palette[background];\n if (ink !== role || !ground || ((background === 'ground' || background === 'field') && ground === palette.surface)) return [];\n const backgroundColor = diagnosticColor(ground);\n const ratio = backgroundColor && measuredContrast(foreground, backgroundColor);\n return ratio === undefined || !ratio ? [] : [{ background, needs, ...(what ? { what } : {}), ratio }];\n });\n}\n\n/** One failed check: which theme, palette and mode, the role it is about, and the sentence for it. */\nexport interface ThemeFinding {\n themeId: string;\n paletteId: string;\n mode: 'light' | 'dark';\n /** The role (`accent`, `navMuted`, `chart3`); rolePath gives the spec's name for it (`nav.muted`, `chart[2]`). */\n token: keyof ThemePalette;\n /** What the check measures, in a few words: \"accent on surface\", \"chart2 beside chart3 for deuteranopia\". */\n check: string;\n ratio: number;\n needs: number;\n message: string;\n}\n\nexport function themeWarnings(themes: readonly ThemeDefinition[], own: { accent?: AppAccent } = {}): string[] {\n return themeFindings(themes, own).map((finding) => finding.message);\n}\n\n/** Every failed check of the themes; with `all`, every check measured, passed or not (a fix reads what it reaches). */\nexport function themeFindings(themes: readonly ThemeDefinition[], own: { accent?: AppAccent } = {}, all = false): ThemeFinding[] {\n return themes.flatMap((theme) =>\n ['default', ...(theme.palettes ?? []).map((item) => item.id)].flatMap((id) =>\n themeModes(theme).flatMap((mode) => {\n const definition = effectiveThemeDefinition(theme, id);\n const palette = withInks(effectiveThemePalette(definition[mode], mode === 'dark', own));\n const name = id === 'default' ? theme.label : `${theme.label} / ${theme.palettes!.find((item) => item.id === id)!.label}`;\n const at = { themeId: theme.id, paletteId: id, mode };\n return CONTRAST_PAIRS.flatMap(([foreground, background, needs, what]): ThemeFinding[] => {\n const a = palette[foreground],\n b = palette[background];\n // A page the colour of its panels is one ground, and one warning; a field the colour of its panel the same.\n if (!a || !b || ((background === 'ground' || background === 'field') && b === palette.surface)) return [];\n // With no edge there is no edge to measure: the fill's own distance from its grounds is (stateFindings).\n if (background === 'field' && foreground === 'lineControl' && palette.rulesControl === '0px') return [];\n const foregroundColor = diagnosticColor(a),\n backgroundColor = diagnosticColor(b);\n if (!foregroundColor || !backgroundColor) return [];\n const ratio = measuredContrast(foregroundColor, backgroundColor);\n if (ratio === undefined || (!all && ratio >= needs)) return [];\n const rule =\n needs === 4.5\n ? 'normal text needs 4.5:1'\n : foreground.startsWith('chart')\n ? 'a chart series needs 3:1'\n : foreground === 'focus'\n ? 'the focus ring needs 3:1'\n : \"a form control's edge needs 3:1\";\n return [\n {\n ...at,\n token: foreground,\n check: `${foreground} on ${background}${what ? ` (${what})` : ''}`,\n ratio,\n needs,\n message: `Theme \"${name}\" (${mode}): ${what ? `${what}, ` : ''}${rolePath(foreground)}/${rolePath(background)} contrast is ${ratio.toFixed(2)}:1; ${rule}.`,\n },\n ];\n }).concat(stateFindings(definition, name, at, palette, all));\n }),\n ),\n );\n}\n\n/** Readers can select any offered look, so App-wide overrides are checked on\n built-ins too. Without overrides retain the registered-theme warning scope. */\nexport function appThemeWarnings(\n themes: readonly ThemeDefinition[],\n own: { accent?: AppAccent; radius?: string; font?: string } = {},\n): string[] {\n const warnings = themeWarnings(own.accent ? [...THEME_PRESETS, ...themes] : themes, own);\n const accents =\n typeof own.accent === 'object'\n ? [\n ['accent.light', own.accent.light],\n ['accent.dark', own.accent.dark],\n ]\n : [['accent', own.accent]];\n for (const [key, value] of accents) {\n if (value && /\\burl\\s*\\(/i.test(value)) warnings.push(`App ui.theme.${key}: a CSS image URL is not a color; use a CSS color value.`);\n else if (value && !diagnosticColor(value))\n warnings.push(\n `App ui.theme.${key}: contrast was not checked for this legacy CSS color; use a hex color for numeric contrast diagnostics.`,\n );\n }\n if (own.radius) {\n const diagnostic = radiusDiagnostic(own.radius);\n if (diagnostic) warnings.push(`App ui.theme.radius: ${diagnostic}`);\n }\n return warnings;\n}\n\n/** Recognize literal border-radius syntax only. Expressions remain compatible;\n an unmeasured diagnostic is not a declaration that the browser rejects them. */\nfunction radiusDiagnostic(raw: string): string | undefined {\n const value = raw.trim().toLowerCase();\n if (/^(?:initial|inherit|unset|revert|revert-layer)$/.test(value)) return undefined;\n const unmeasured = 'validity was not checked for this legacy CSS radius expression; verify its computed border-radius in the browser.';\n if (/[()\\\\]/.test(value)) return unmeasured;\n const groups = value.split('/').map((group) => group.trim().split(/\\s+/));\n if (groups.length > 2 || groups.some((group) => group.length > 4 || !group[0])) return unmeasured;\n for (const token of groups.flat()) {\n const literal = /^([+-]?(?:\\d*\\.\\d+|\\d+)(?:e[+-]?\\d+)?)([a-z]+|%)?$/.exec(token);\n if (!literal) {\n if (/^[a-z-]+$/.test(token)) return 'an unrecognized bare keyword is not a CSS radius; use nonnegative lengths or percentages.';\n return unmeasured;\n }\n const number = Number(literal[1]);\n const unit = literal[2];\n // Unknown/future units are not rejected by this deliberately bounded check.\n if (\n unit &&\n !/^(?:%|px|cm|mm|q|in|pt|pc|em|rem|ex|rex|cap|rcap|ch|rch|ic|ric|lh|rlh|(?:s|l|d)?v(?:w|h|i|b|min|max)|cq(?:w|h|i|b|min|max))$/.test(\n unit,\n )\n )\n return unmeasured;\n if (number < 0) return 'a negative radius is not valid CSS; use a nonnegative CSS length.';\n if (!unit && number !== 0) return 'a nonzero unitless radius is not valid CSS; include a CSS length unit or percentage.';\n }\n return undefined;\n}\n\nfunction stateFindings(\n theme: ThemeDefinition,\n name: string,\n at: Pick<ThemeFinding, 'themeId' | 'paletteId' | 'mode'>,\n palette: ThemePalette,\n all: boolean,\n): ThemeFinding[] {\n const result: ThemeFinding[] = [];\n const mode = at.mode;\n const recipes = theme.recipes ?? {};\n const color = (key: keyof ThemePalette) => (palette[key] ? diagnosticColor(palette[key]!) : undefined);\n const check = (\n label: string,\n foreground: Color | undefined,\n background: Color | undefined,\n needs = 4.5,\n token?: keyof ThemePalette,\n said?: string,\n ) => {\n if (!foreground || !background) return;\n const ratio = measuredContrast(foreground, background);\n if (ratio === undefined || (!all && ratio >= needs)) return;\n const rule = said ?? (needs === 4.5 ? 'normal text needs 4.5:1' : 'the focus ring needs 3:1');\n result.push({\n ...at,\n token: token ?? (/^[a-zA-Z0-9]+/.exec(label)![0] as keyof ThemePalette),\n check: label,\n ratio,\n needs,\n message: `Theme \"${name}\" (${mode}): ${label.replace(/^\\w+/, rolePath).replace(/\\/(\\w+)$/, (_, role: string) => `/${rolePath(role)}`)} contrast is ${ratio.toFixed(2)}:1; ${rule}.`,\n });\n };\n const surface = color('surface'),\n subtle = color('raised'),\n text = color('ink');\n /* A field with no edge (shape.border.control 0px) is told from the page by its fill alone, so the fill must stand\n apart from both grounds it sits on (EDGELESS_FIELD_DELTA says how far). A field that names no fill is the surface,\n which is no distance from the surface at all. */\n if (palette.rulesControl === '0px')\n for (const ground of ['ground', 'surface'] as const) {\n if (ground === 'ground' && (!palette.ground || palette.ground === palette.surface)) continue;\n check(\n `field/${ground}`,\n color('field') ?? surface,\n color(ground),\n EDGELESS_FIELD_DELTA,\n 'field',\n `a field with no edge (shape.border.control 0px) must stand ${EDGELESS_FIELD_DELTA}:1 apart from the ${ground} by its fill, so give colors.field a fill that does or keep a 1px edge`,\n );\n }\n /* The hover and row ground (--raised) carries every kind of text a row\n holds, not only the full ink the pair list checks there: a muted date, a\n faint count, a link. */\n for (const key of ['inkMuted', 'inkSubtle'] as const) check(`${key}/raised`, color(key), subtle);\n /* A tone chip (features.css .tone-*) writes 78% of the meaning colour into\n the text ink, on a 12% tint of it over the panel. Neither end of that is\n a palette colour, so no pair above could see it. */\n for (const role of ['statusGood', 'statusWarning', 'statusCritical', 'statusInfo'] as const) {\n const ink = color(role);\n if (!ink || !text || !surface) continue;\n check(`${role} tone chip`, mixColor(ink, text, 0.78), over(mixColor(ink, [0, 0, 0, 0], 0.12), surface));\n }\n /* A series is drawn as words and marks too, mixed into the ink (componentInks): measured as each is drawn. */\n for (const item of componentInks(palette, recipes))\n check(\n `${item.role} as ${item.what}`,\n diagnosticColor(item.fg),\n diagnosticColor(item.bg),\n item.needs,\n item.role,\n item.needs === 3 ? 'a mark needs 3:1' : undefined,\n );\n /* A danger banner (a page's errors, pending edits) writes the danger colour\n on a 10% tint of it mixed into the panel. */\n const danger = color('statusCritical');\n if (danger && surface) check('statusCritical/danger banner', danger, mixColor(danger, surface, 0.1));\n /* A matrix's heaviest cell says its figure in the ink on the accent's tint, drawn no stronger than heatTop allows:\n only a palette whose ink is too near its accent for even the floor's tint is short here. */\n const accent = color('accent');\n if (accent && surface)\n check(\n \"ink/accent's heat tint (a matrix's heaviest cell)\",\n text,\n over(mixColor(accent, [0, 0, 0, 0], heatTop(palette)), surface),\n 4.5,\n 'accent',\n );\n /* A printed page is white paper whatever the page's ground (style.css's print layer), so a light palette's accent\n and links are read there too: one drawn for a dark \"light\" mode reads on its panel and vanishes on paper (C12).\n A theme that says it is dark has no light palette to be read as paper: its one set of colors is judged as dark. */\n if (mode === 'light' && theme.scheme !== 'dark-only')\n for (const key of ['accentInk', 'link'] as const) {\n /* Darker than its panel, a color reads better on paper than there: the panel's own pair already says it. */\n const value = palette[key];\n const hex = (css: string | undefined) => css !== undefined && /^#[0-9a-f]{6}$/i.test(css);\n if (!hex(value) || !hex(palette.surface) || contrastRatio(value!, '#ffffff') < contrastRatio(palette.surface!, '#ffffff'))\n check(`${key} on printed paper`, color(key), [1, 1, 1, 1], 4.5, key);\n }\n const soft = color('accentSoft');\n for (const ground of ['surface', 'ground'] as const) {\n const base = color(ground);\n if (ground === 'ground' && palette.ground === palette.surface) continue;\n // Selected menu items and pressed controls use accent ink on this tint.\n check(`accentInk/accentSoft over ${ground}`, color('accentInk'), soft && base ? over(soft, base) : undefined);\n }\n // A chosen row, a chosen card and a current step keep their words in the ink on that tint.\n check('ink/accentSoft over surface (a chosen row)', text, soft && surface ? over(soft, surface) : undefined);\n const nav = color('navGround'),\n navInk = color('navInk');\n // visualThemes.css topbar item hover/current and expanded group overlays.\n const navGround = (weight: number) => (nav && navInk ? over(mixColor(navInk, [0, 0, 0, 0], weight), nav) : undefined);\n check('navAccent/navigation hover', color('navAccent'), navGround(0.05));\n // The current entry's block, when a theme names one: its words on it (structure.css).\n if (palette.navCurrent) check('navOnCurrent/navCurrent', color('navOnCurrent') ?? navInk, color('navCurrent'));\n check('navInk/navigation expanded', navInk, navGround(0.07));\n /* The pill menu marks its current entry with the accent's tint, laid on the menu's own ground, in the menu's\n accent (lumenLook.css --current-ground): a pair neither the menu's nor the page's checks see. A theme that\n names its own block (nav.current) is measured on that instead. */\n if (recipes.nav === 'pill' && !palette.navCurrent)\n check(\n \"navAccent/accentSoft over navGround (the pill menu's current entry)\",\n color('navAccent'),\n soft && nav ? over(soft, nav) : undefined,\n );\n /* A round avatar look draws the sidebar's identity mark in the menu's accent on a 12% tint of that accent, laid on\n the menu's ground (lumenLook.css). A part that names the mark's ink or ground replaces that pair (partsLook.css),\n and the parts loop below measures the one drawn instead. */\n const navAccent = color('navAccent');\n const markPart = theme.parts?.identityMark;\n if (recipes.avatar === 'round' && markPart?.ink === undefined && markPart?.ground === undefined)\n check('navAccent/its own tint over navGround (the identity mark)', navAccent, tintOver(navAccent, nav));\n /* The search is a field on the surface in the page's ink (themeFamilies.css), a pair the page's checks read; the\n dark bar alone draws it on an 8% ink tint of its own ground in its muted ink (brandLook.css). */\n if (recipes.bar === 'dark') check('navMuted/navigation search', color('navMuted'), navGround(0.08));\n /* The dark bar draws its keys — New, the customer chooser — on the same tint in the menu's ink (brandLook.css), and\n a phone's menu, search and New marks in its muted ink on its ground (visualThemes.css, structure.css): until\n 0.9.6 those stayed the page's keys and greys, about 1.5:1 on a green menu, and no pair here read them. */\n if (recipes.bar === 'dark') check('navInk/navigation bar button', navInk, navGround(0.08));\n if (recipes.table === 'tinted') {\n const accent = color('accent'),\n surface = color('surface');\n const hover = accent && surface ? mixColor(accent, surface, 0.04) : undefined;\n check('ink/tinted row hover', color('ink'), hover);\n check('link/tinted row hover', color('link'), hover);\n }\n /* A banded table lays every other row on the band (brandLook.css): whatever a row says is said on it. */\n if (recipes.table === 'banded' && palette.band)\n for (const key of [\n 'ink',\n 'inkMuted',\n 'inkSubtle',\n 'link',\n 'accentInk',\n 'statusGood',\n 'statusWarning',\n 'statusCritical',\n 'statusInfo',\n ] as const)\n check(`${key}/band`, color(key), color('band'), 4.5, 'band');\n /* A pattern is the theme's line color at its strength over the ground it is drawn on (surfacesLook.css): the words\n on the page, or in the menu, are measured where a line crosses under them, the darkest point of it. */\n const patterned = (place: 'ground' | 'nav') => {\n const pattern = theme.surface?.[place];\n if (!pattern) return;\n const line = color(place === 'nav' ? 'navLine' : 'line') ?? color('line');\n const ground = place === 'nav' ? color('navGround') : (color('ground') ?? surface);\n if (!line || !ground) return;\n const under = over(mixColor(line, [line[0], line[1], line[2], 0], patternStrength(pattern)), ground);\n const where = place === 'nav' ? `the menu's ${pattern.kind} pattern` : `the page's ${pattern.kind} pattern`;\n const inks = place === 'nav' ? (['navInk', 'navMuted'] as const) : (['ink', 'inkMuted', 'inkSubtle', 'link', 'accentInk'] as const);\n for (const key of inks) check(`${key} on ${where}`, color(key), under, 4.5, place === 'nav' ? 'navLine' : 'line');\n };\n patterned('ground');\n patterned('nav');\n /* A part's words on its ground (theme-part): its own ink on its own ground, or the one it is drawn on unsaid. */\n for (const [part, style] of Object.entries(theme.parts ?? {})) {\n if (!style || (style.ground === undefined && style.ink === undefined)) continue;\n const round = recipes.avatar === 'round';\n const ink = style.ink ? pathRole(style.ink) : partInk(part, round);\n const ground = style.ground ? pathRole(style.ground) : partGround(part, palette);\n if (!ink || !ground) continue;\n const said = (role: string) => rolePath(role);\n const label = `parts.${part}: ${ink} on ${ground}`;\n /* A round mark left on its own ground is drawn on a 12% tint of the menu's accent over the menu (lumenLook.css),\n not on the menu's ground itself. */\n const tinted = part === 'identityMark' && round && !style.ground;\n const foreground = color(ink as keyof ThemePalette),\n background = tinted ? tintOver(color('navAccent'), color('navGround')) : color(ground as keyof ThemePalette);\n if (!foreground || !background) continue;\n const ratio = measuredContrast(foreground, background);\n if (ratio === undefined || (!all && ratio >= 4.5)) continue;\n result.push({\n ...at,\n token: (style.ground ? ground : ink) as keyof ThemePalette,\n check: label,\n ratio,\n needs: 4.5,\n message: `Theme \"${name}\" (${mode}): parts.${part}: ${said(ink)} on ${said(ground)} contrast is ${ratio.toFixed(2)}:1; normal text needs 4.5:1.`,\n });\n }\n return result;\n}\n\n/** The round identity mark's ground: its accent at 12% over the menu (lumenLook.css). */\nfunction tintOver(accent: Color | undefined, ground: Color | undefined): Color | undefined {\n return accent && ground ? over(mixColor(accent, [0, 0, 0, 0], 0.12), ground) : undefined;\n}\n\n/** The ink a part's words are drawn in when its style says none: the menu's for the menu's parts, the link's for a\n link; a primary button's is the ink drawn on the accent fill. */\nfunction partInk(part: string, round: boolean): string | undefined {\n if (part === 'identityMark') return round ? 'navAccent' : 'navInk';\n if (part === 'button.primary') return 'onAccent';\n if (/^(?:nav|bar|logo)\\b/.test(part)) return 'navInk';\n return part === 'link' ? 'link' : 'ink';\n}\n/** The ground a part is drawn on when its style says none. */\nfunction partGround(part: string, palette: ThemePalette): string {\n if (part === 'identityMark') return 'navGround';\n if (/^(?:nav|bar|logo)\\b/.test(part)) return 'navGround';\n if (part === 'button.primary') return 'accent';\n return (part === 'ground' || part === 'page.title') && palette.ground ? 'ground' : 'surface';\n}\n","/**\n * `buildTheme`: a spec already known to be good, assembled into the\n * ThemeDefinition every surface wears — the colour roles, the colours a theme\n * leaves unsaid, a built-in's colours under an author's. The built-in looks\n * are built with it ahead of time (scripts/theme-presets.mjs); an App's or a\n * tenant's theme is checked by themeSpec.ts's `compileTheme` and then built\n * here, on the server or in the branding form, never at first paint.\n */\nimport { mergeType } from '@mistriwork/engine/shared/themeType.js';\nimport type { ThemeColorsOver, ThemeDefinition, ThemeDensity, ThemePalette, ThemeSpec } from '@mistriwork/engine/schema/theme.js';\nimport { DEFAULT_RECIPES } from '@mistriwork/engine/shared/themeRecipes.js';\nimport { ROUND } from '@mistriwork/engine/shared/themeTokens.js';\n\n/* ---------- colors: names by purpose, and the roles they fill ---------- */\n\n/** A spec color's path and the role it fills in a compiled palette: the same name, flattened (`nav.ground` is\n `navGround`), and worn as the custom property of that name (PALETTE_TOKENS). */\nexport const COLOR_ROLES: ReadonlyArray<readonly [string, keyof ThemePalette]> = [\n ['ground', 'ground'],\n ['surface', 'surface'],\n ['field', 'field'],\n ['raised', 'raised'],\n ['ink', 'ink'],\n ['inkMuted', 'inkMuted'],\n ['inkSubtle', 'inkSubtle'],\n ['line', 'line'],\n ['lineStrong', 'lineStrong'],\n ['lineControl', 'lineControl'],\n ['accent', 'accent'],\n ['onAccent', 'onAccent'],\n ['accentInk', 'accentInk'],\n ['accentSoft', 'accentSoft'],\n ['primary', 'primary'],\n ['onPrimary', 'onPrimary'],\n ['link', 'link'],\n ['focus', 'focus'],\n ['status.good', 'statusGood'],\n ['status.warning', 'statusWarning'],\n ['status.critical', 'statusCritical'],\n ['status.info', 'statusInfo'],\n ['nav.ground', 'navGround'],\n ['nav.ink', 'navInk'],\n ['nav.muted', 'navMuted'],\n ['nav.line', 'navLine'],\n ['nav.accent', 'navAccent'],\n ['nav.current', 'navCurrent'],\n ['nav.onCurrent', 'navOnCurrent'],\n ['rules.section', 'rulesSection'],\n ['rules.head', 'rulesHead'],\n ['shadow', 'shadow'],\n ['band', 'band'],\n ...[1, 2, 3, 4, 5, 6, 7, 8].map((n) => [`chart[${n - 1}]`, `chart${n}` as keyof ThemePalette] as const),\n];\n\n/* ---------- the colors a theme leaves unsaid ---------- */\n\nfunction channels(value: string): [number, number, number] {\n return [1, 3, 5].map((start) => parseInt(value.slice(start, start + 2), 16)) as [number, number, number];\n}\n/** `weight` of `a` over `b`, in sRGB, as hex: the derivations below are colors an author could have written. */\nexport function mixHex(a: string, b: string, weight: number): string {\n const x = channels(a),\n y = channels(b);\n return `#${x\n .map((value, index) =>\n Math.round(value * weight + y[index]! * (1 - weight))\n .toString(16)\n .padStart(2, '0'),\n )\n .join('')}`;\n}\n\n/** What a theme that extends nothing starts from where it says nothing: meaning colors that read on white and on\n near-black, and Lumen's chart series after the theme's own accent, spaced for color-blind readers. */\nconst STARTING = {\n light: {\n statusGood: '#117a38',\n statusWarning: '#a84d07',\n statusCritical: '#c81e1e',\n statusInfo: '#0369a1',\n chart: ['#2557e0', '#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#0e8fb0', '#a3510b', '#94a3b8'],\n },\n dark: {\n statusGood: '#4ade80',\n statusWarning: '#fbbf24',\n statusCritical: '#f87171',\n statusInfo: '#7dd3fc',\n chart: ['#3559e6', '#9a78ec', '#12a678', '#c88317', '#e0559b', '#1597b9', '#d26b3b', '#6b7694'],\n },\n} as const;\n\n/** Every role, from the four a theme must name. Mixes toward the surface keep a derived ink readable on it; the validator measures them anyway. */\nfunction derive(given: Partial<ThemePalette>, mode: 'light' | 'dark'): ThemePalette {\n const surface = given.surface!,\n ink = given.ink!,\n accent = given.accent!;\n const start = STARTING[mode];\n const palette: ThemePalette = {\n ground: given.ground,\n surface,\n raised: mixHex(ink, surface, 0.04),\n line: mixHex(ink, surface, 0.16),\n lineStrong: mixHex(ink, surface, 0.56),\n lineControl: mixHex(ink, surface, 0.52),\n ink,\n inkMuted: mixHex(ink, surface, 0.82),\n inkSubtle: mixHex(ink, surface, 0.7),\n accent,\n accentSoft: mixHex(accent, surface, 0.12),\n link: accent,\n focus: accent,\n statusGood: start.statusGood,\n statusWarning: start.statusWarning,\n statusCritical: start.statusCritical,\n statusInfo: start.statusInfo,\n navGround: given.surface,\n navInk: ink,\n navMuted: undefined,\n navLine: undefined,\n navAccent: undefined,\n chart1: accent,\n ...Object.fromEntries(start.chart.slice(1).map((color, index) => [`chart${index + 2}`, color])),\n };\n const merged = { ...palette, ...given };\n merged.navGround = given.navGround ?? merged.surface;\n merged.navInk = given.navInk ?? merged.ink;\n merged.navMuted = given.navMuted ?? merged.inkSubtle;\n merged.navLine = given.navLine ?? merged.line;\n merged.navAccent = given.navAccent ?? merged.accent;\n return merged;\n}\n\n/** A built-in's colors under an author's: an accent said without its tint, link, focus, menu accent or first\n series takes them along where the built-in had them equal to its own accent — they were that accent, not\n a color of their own. */\nfunction overlay(base: ThemePalette, over: Partial<ThemePalette>): ThemePalette {\n const merged: ThemePalette = { ...base, ...over };\n if (over.accent !== undefined && over.accent !== base.accent) {\n const surface = merged.surface;\n if (over.accentSoft === undefined) merged.accentSoft = mixHex(over.accent, surface, 0.12);\n /* The inks a base chose for its own accent read on that fill, not this one: they are chosen again where worn. */\n if (over.onAccent === undefined) delete merged.onAccent;\n if (over.accentInk === undefined) delete merged.accentInk;\n if (over.focus === undefined) merged.focus = over.accent;\n for (const role of ['link', 'navAccent'] as const)\n if (over[role] === undefined && base[role] === base.accent) merged[role] = over.accent;\n /* The first series and the metric sparkline are the brand's colour in every look, whether or not the look drew\n its own first hue (Mono's accent is the ink, its first series a blue): a theme that names an accent and no\n chart wears it, so a chart is never the look's colour beside the App's. */\n if (over.chart1 === undefined) merged.chart1 = over.accent;\n }\n /* A form's primary action was the built-in's ink or its accent, not a color of its own: a theme that says another\n of that color and no `primary` takes it along, and the words on it are chosen again where worn. */\n if (over.primary === undefined && base.primary !== undefined)\n for (const role of ['ink', 'accent'] as const)\n if (over[role] !== undefined && over[role] !== base[role] && base.primary === base[role]) {\n merged.primary = over[role];\n if (over.onPrimary === undefined) delete merged.onPrimary;\n }\n if (over.primary !== undefined && over.primary !== base.primary && over.onPrimary === undefined) delete merged.onPrimary;\n return merged;\n}\n\n/** One mode's colours, by purpose, to roles, as written. */\nfunction rolesOf(colors: ThemeColorsOver | undefined): Partial<ThemePalette> {\n const out: Partial<Record<keyof ThemePalette, string>> = {};\n if (!colors) return {};\n const source = colors as Record<string, unknown>;\n for (const [path, role] of COLOR_ROLES) {\n if (path.startsWith('chart[')) continue;\n const [group, key] = path.split('.') as [string, string | undefined];\n const value = key === undefined ? source[group] : (source[group] as Record<string, unknown> | undefined)?.[key];\n if (typeof value === 'string') out[role] = value.trim().toLowerCase();\n }\n colors.chart?.forEach((value, index) => {\n if (typeof value === 'string') out[`chart${index + 1}` as keyof ThemePalette] = value.trim().toLowerCase();\n });\n return out as unknown as Partial<ThemePalette>;\n}\n\n/** A spec that is known to be good — a built-in, or one `compileTheme` has checked — as the definition it compiles\n to. `base` is the built-in it extends, resolved by the caller. */\nexport function buildTheme(spec: ThemeSpec, base?: ThemeDefinition): ThemeDefinition {\n const colors = (spec.colors ?? {}) as { light?: ThemeColorsOver; dark?: ThemeColorsOver };\n /* A rule's and a control's width are shape, said once, and worn as each mode's palette roles they always were. */\n const border = spec.shape?.border;\n const widths: Partial<ThemePalette> = {\n ...(border?.rule ? { rulesWeight: border.rule } : {}),\n ...(border?.control ? { rulesControl: border.control } : {}),\n };\n /* A dark-only theme has one set of colors, worn in both slots: nothing downstream has a light mode to be missing. */\n const darkOnly = spec.scheme === 'dark-only';\n const mode = (name: 'light' | 'dark'): ThemePalette => {\n const given = { ...rolesOf(colors[name]), ...widths };\n return base ? overlay(base[name], given) : derive(given, name);\n };\n /* `round` is a pill's corner: a length past any box's (themeTokens.ts ROUND). */\n const radius = Object.fromEntries(\n Object.entries(spec.shape?.radius ?? {}).map(([key, length]) => [key, length === 'round' ? ROUND : length]),\n );\n const ownBorder = {\n ...(border?.panel ? { panel: border.panel } : {}),\n ...(border?.focus ? { focus: border.focus } : {}),\n };\n const height = spec.shape?.height?.control ? { control: spec.shape.height.control } : undefined;\n const palettes = spec.palettes?.map((variant) => ({\n id: variant.id,\n label: variant.label.trim(),\n light: rolesOf(darkOnly ? variant.dark : variant.light),\n dark: rolesOf(variant.dark),\n }));\n const font = spec.type?.font;\n const named = typeof font === 'string' ? { ui: font, data: font, heading: font } : font;\n /* A data column's figures follow the data face unless the theme says a face for them: a theme that names a data face\n and no figures face would otherwise keep a base's figures (the platform's Plex Mono) under its own data face. */\n const fonts = named?.data !== undefined && named.figures === undefined ? { ...named, figures: named.data } : named;\n const density = spec.density ?? base?.density;\n const motion = spec.motion ?? base?.motion;\n const rhythm = spec.rhythm ?? base?.rhythm;\n const type = mergeType(base?.type, spec.type && { base: spec.type.base, roles: spec.type.roles });\n const steps = typeof spec.shape?.elevation === 'object' ? spec.shape.elevation : undefined;\n const lifts = base?.lifts || steps ? { ...base?.lifts, ...steps } : undefined;\n /* A face is a theme's own file: a built-in ships none (Inter is interFace.css's); a theme value it extends (a\n package's look) may, and its faces stand under this theme's own, which win at a family, weight and style. */\n const own = spec.type?.faces?.map((face) => ({\n family: face.family,\n src: face.src,\n weight: String(face.weight ?? 400),\n style: face.style ?? ('normal' as const),\n ...(face.subset === false ? { subset: false as const } : {}),\n }));\n const cut = (face: { family: string; weight: string; style: string }) => `${face.family.toLowerCase()} ${face.weight} ${face.style}`;\n const faces = base?.faces?.length ? [...base.faces.filter((face) => !own?.some((mine) => cut(mine) === cut(face))), ...(own ?? [])] : own;\n /* A theme's stylesheet is its own, or the one it extends: a built-in has none. */\n const stylesheet = spec.stylesheet ? { src: spec.stylesheet } : base?.stylesheet;\n /* A pattern says its strength (1 when omitted); a part's style lies over the one it extends, property by property. */\n const patterns = Object.entries(spec.surface ?? {}).map(([place, pattern]) => [\n place,\n { kind: pattern!.kind, strength: pattern!.strength ?? 1 },\n ]);\n const surface = base?.surface || patterns.length ? { ...base?.surface, ...Object.fromEntries(patterns) } : undefined;\n let parts: ThemeDefinition['parts'] = base?.parts ? { ...base.parts } : undefined;\n for (const [part, style] of Object.entries(spec.parts ?? {}))\n parts = { ...parts, [part]: { ...parts?.[part as keyof typeof parts], ...style } };\n const icons = spec.type?.icons ?? base?.icons;\n return {\n id: spec.id,\n label: spec.label.trim(),\n ...(base?.base ? { base: base.base } : {}),\n light: mode(darkOnly ? 'dark' : 'light'),\n dark: mode('dark'),\n ...((spec.scheme ?? base?.scheme) ? { scheme: (spec.scheme ?? base?.scheme)! } : {}),\n ...(palettes === undefined ? (base?.palettes && spec.colors === undefined ? { palettes: base.palettes } : {}) : { palettes }),\n ...(spec.defaultPalette === undefined ? {} : { defaultPalette: spec.defaultPalette }),\n fonts: { ...base?.fonts, ...fonts },\n ...(faces?.length ? { faces } : {}),\n radius: { control: '4px', field: '4px', ...base?.radius, ...radius },\n ...(base?.border || Object.keys(ownBorder).length ? { border: { ...base?.border, ...ownBorder } } : {}),\n ...(base?.height || height ? { height: { ...base?.height, ...height } } : {}),\n recipes: { ...DEFAULT_RECIPES, ...base?.recipes, ...spec.recipes },\n /* A preset is the look's own drawing of its lifts; `{ card, float }` steps over the base's, which stays. */\n elevation: (typeof spec.shape?.elevation === 'string' ? spec.shape.elevation : undefined) ?? base?.elevation ?? 'hairline',\n ...(lifts ? { lifts } : {}),\n ...(type ? { type } : {}),\n ...(density ? { density: density as ThemeDensity } : {}),\n ...(motion ? { motion } : {}),\n ...(rhythm ? { rhythm } : {}),\n /* The theme's own suggestion only: a built-in suggests none, so there is nothing to inherit. */\n ...(spec.shell?.placement ? { shell: { placement: spec.shell.placement } } : {}),\n ...(surface ? { surface } : {}),\n ...(parts ? { parts } : {}),\n ...(icons ? { icons } : {}),\n ...(stylesheet ? { stylesheet } : {}),\n };\n}\n","/**\n * `defineTheme`: a theme by purpose — colors for what they are for, a shape, a\n * type, a density and a pick from a closed menu of treatments — compiled to the\n * ThemeDefinition every surface already wears. The built-in looks are written in\n * it (themePresets.ts), so the menu is exactly what they do and an App's theme\n * can only ask for what one of them already draws. There is no CSS in a theme:\n * each recipe is a `data-look-<part>` attribute the shipped sheets answer.\n *\n * This module checks; themeBuild.ts builds. The built-in looks are built there\n * without these checks, because the browser wears them at first paint and the\n * checks' messages are weight no reader needs; test/theme-spec.test.ts holds\n * every built-in to them. An App's or a tenant's theme comes through here.\n */\nimport type {\n ThemeColorsOver,\n ThemeDefinition,\n ThemeDensity,\n ThemePalette,\n ThemePaletteVariant,\n ThemeSpec,\n} from '@mistriwork/engine/schema/theme.js';\nimport { buildTheme, COLOR_ROLES } from './themeBuild.js';\nimport {\n BORDER_MENU,\n CONTROL_HEIGHT,\n controlHeightFits,\n cornerFits,\n RADIUS_MAX,\n ROUND_CORNERS,\n rolePath,\n} from '@mistriwork/engine/shared/themeTokens.js';\nimport {\n DENSITIES,\n ELEVATIONS,\n LIFTS,\n MOTIONS,\n RECIPE_MENU,\n RECIPES_RENAMED,\n RHYTHMS,\n RECIPE_PARTS,\n type ResolvedRecipes,\n} from '@mistriwork/engine/shared/themeRecipes.js';\nimport { TYPE_MOVED, typeOf } from '@mistriwork/engine/shared/themeType.js';\nimport { parseScheme, THEME_PRESETS, themePreset } from '@mistriwork/engine/shared/themePresets.js';\nimport { iconsOf, partsOf, surfaceOf } from '@mistriwork/engine/shared/themePartsCheck.js';\n\n/* ---------- colors: names by purpose, and the roles they fill ---------- */\n\n/** The spec's name for a role, for a message an author can act on: `status.critical`, not `statusCritical`. */\nexport function colorPath(role: string): string {\n return rolePath(role);\n}\n\nconst HEX = /^#[0-9a-f]{6}$/i;\nconst GROUPS = {\n status: ['good', 'warning', 'critical', 'info'],\n nav: ['ground', 'ink', 'muted', 'line', 'accent', 'current', 'onCurrent'],\n rules: ['section', 'head'],\n} as const;\nconst FLAT = [\n 'ground',\n 'surface',\n 'field',\n 'raised',\n 'ink',\n 'inkMuted',\n 'inkSubtle',\n 'line',\n 'lineStrong',\n 'lineControl',\n 'accent',\n 'onAccent',\n 'accentInk',\n 'accentSoft',\n 'primary',\n 'onPrimary',\n 'link',\n 'focus',\n 'shadow',\n 'band',\n];\n\n/** The names a color went by before the spec's were the only ones (0.9.2): the palette's, which the sheets and the\n compiled theme used. There is one name per color now, and a theme that says an old one is told the new. */\nconst OLD_NAMES: Readonly<Record<string, string>> = {\n background: 'ground',\n subtle: 'raised',\n border: 'line',\n borderStrong: 'lineStrong',\n borderControl: 'lineControl',\n text: 'ink',\n textMuted: 'inkMuted',\n textSubtle: 'inkSubtle',\n positive: 'status.good',\n warning: 'status.warning',\n negative: 'status.critical',\n key: 'status.info',\n navSurface: 'nav.ground',\n navText: 'nav.ink',\n navMuted: 'nav.muted',\n navBorder: 'nav.line',\n navAccent: 'nav.accent',\n navCurrent: 'nav.current',\n navCurrentText: 'nav.onCurrent',\n sectionRule: 'rules.section',\n headRule: 'rules.head',\n ruleWeight: 'rules.weight',\n};\n/** The widths that were colors' neighbors until 0.9.4: a rule's and a control's edge are shape, said once for both modes. */\nconst MOVED_TO_SHAPE: Readonly<Record<string, string>> = { weight: 'shape.border.rule', control: 'shape.border.control' };\nfunction renamed(colors: Record<string, unknown>, where: string) {\n for (const key of Object.keys(colors))\n if (Object.hasOwn(OLD_NAMES, key)) throw new Error(`${where}.${key} is now ${where}.${OLD_NAMES[key]}.`);\n /* Renamed before 1.0: words on a fill are `on<Fill>` (onAccent), and `<color>Ink` is a color used as text (accentInk). */\n const nav = colors.nav;\n if (nav && typeof nav === 'object' && Object.hasOwn(nav, 'currentInk'))\n throw new Error(`${where}.nav.currentInk is now ${where}.nav.onCurrent: the words on nav.current.`);\n const rules = colors.rules;\n if (rules && typeof rules === 'object')\n for (const key of Object.keys(rules))\n if (Object.hasOwn(MOVED_TO_SHAPE, key)) throw new Error(`${where}.rules.${key} is now ${MOVED_TO_SHAPE[key]}.`);\n}\n\nfunction record(raw: unknown, where: string): Record<string, unknown> {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) throw new Error(`${where} must be an object.`);\n return raw as Record<string, unknown>;\n}\nfunction only(raw: Record<string, unknown>, keys: readonly string[], where: string) {\n for (const key of Object.keys(raw)) if (!keys.includes(key)) throw new Error(`${where} has no \"${key}\". It takes: ${keys.join(', ')}.`);\n}\nfunction hex(value: unknown, where: string): string {\n if (typeof value !== 'string' || !HEX.test(value.trim())) throw new Error(`${where} must be a six-digit hex color like #1d4ed8.`);\n return value.trim().toLowerCase();\n}\n\n/** One mode's colors, by purpose, to roles. `required` names the four a theme that extends nothing must say. */\nfunction colorsToRoles(raw: unknown, where: string, required: boolean): Partial<ThemePalette> {\n if (raw === undefined && !required) return {};\n const colors = record(raw, where);\n renamed(colors, where);\n only(colors, [...FLAT, 'status', 'nav', 'rules', 'chart'], where);\n const out: Partial<Record<keyof ThemePalette, string>> = {};\n for (const [path, role] of COLOR_ROLES) {\n const [group, key] = path.split('.') as [string, string | undefined];\n if (path.startsWith('chart[')) continue;\n if (key === undefined) {\n if (colors[group] !== undefined) out[role] = hex(colors[group], `${where}.${group}`);\n continue;\n }\n const inner = colors[group];\n if (inner === undefined) continue;\n const values = record(inner, `${where}.${group}`);\n only(values, GROUPS[group as keyof typeof GROUPS], `${where}.${group}`);\n if (values[key] === undefined) continue;\n out[role] = hex(values[key], `${where}.${path}`);\n }\n if (colors.chart !== undefined) {\n if (!Array.isArray(colors.chart) || colors.chart.length > 8) throw new Error(`${where}.chart must be at most eight colors.`);\n colors.chart.forEach((value, index) => {\n if (value === null && !required) return;\n out[`chart${index + 1}` as keyof ThemePalette] = hex(value, `${where}.chart[${index}]`);\n });\n }\n if (required)\n for (const key of ['ground', 'surface', 'ink', 'accent'])\n if (colors[key] === undefined) throw new Error(`${where}.${key} is required.`);\n /* The words on a fill are said with the fill: on their own they would sit on whichever color a look chose. */\n if (colors.onPrimary !== undefined && colors.primary === undefined)\n throw new Error(`${where}.onPrimary is the words on ${where}.primary: name primary beside it.`);\n return out as Partial<ThemePalette>;\n}\n\n/* ---------- the spec ---------- */\n\nconst THEME_ID = /^[a-z][a-z0-9-]{0,47}$/;\n\nconst FONT = /^[\\w\\s'\",.-]+$/;\nconst SPEC_KEYS = [\n 'kind',\n 'id',\n 'label',\n 'extends',\n 'colors',\n 'palettes',\n 'defaultPalette',\n 'scheme',\n 'shape',\n 'type',\n 'density',\n 'motion',\n 'rhythm',\n 'recipes',\n 'shell',\n 'surface',\n 'parts',\n 'stylesheet',\n 'contract',\n 'from',\n];\n\n/** The theme contract this mistri reads (docs: theme-contract). A package says the one it was written to. */\nconst THEME_CONTRACT = 1;\n/* A stylesheet beside the theme, downward only: `./theme.css`, `./looks/ledger.css`. The server holds the resolved\n file to the theme's directory as well (appBrand.ts), so a link out of it is refused there. */\nconst SHEET_SRC = /^\\.\\/(?:[\\w.-]+\\/)*[\\w.-]+\\.css$/;\n\n/**\n * The directory a theme's files are read from (its faces and its stylesheet), where it is not the App's: a package's,\n * from its `from`. Kept here rather than on the definition, which is sent to the browser and written into a build:\n * a path on the machine is neither's to carry. Keyed by the face or the stylesheet record, so one inherited from a\n * package's theme is read from the package.\n */\nconst FILE_ROOTS = new WeakMap<object, string>();\nexport function themeFileRoot(file: object): string | undefined {\n return FILE_ROOTS.get(file);\n}\n/** The theme a compiled theme extends when that is a theme value (`extends: ledger`), for the validator. */\nconst PARENTS = new WeakMap<ThemeDefinition, ThemeDefinition>();\nfunction themeParent(theme: ThemeDefinition): ThemeDefinition | undefined {\n return PARENTS.get(theme);\n}\n\n/** A theme spec checked and compiled. `builtIn` resolves `extends`; `reserved` are ids it may not take. */\nexport function compileTheme(\n raw: unknown,\n where: string,\n builtIn: (id: string) => ThemeDefinition | undefined,\n reserved: ReadonlySet<string> = new Set(),\n options: ThemeCompileOptions = {},\n): ThemeDefinition {\n const spec = record(raw, where) as Record<string, unknown> & Partial<ThemeSpec>;\n // The key was `palette` until 1.0; `palettes` and `ui.theme.palette` name variations, so the colors moved out of their way.\n if ('palette' in spec) throw new Error(`${where}.palette is now colors: { light, dark }.`);\n only(spec, SPEC_KEYS, where);\n if (spec.kind !== undefined && spec.kind !== 'theme') throw new Error(`${where}.kind must be \"theme\" (write it with defineTheme).`);\n if (typeof spec.id !== 'string' || !THEME_ID.test(spec.id) || reserved.has(spec.id))\n throw new Error(`${where}.id must be a unique lowercase slug, not a built-in look's name.`);\n if (typeof spec.label !== 'string' || !spec.label.trim() || spec.label.trim().length > 60)\n throw new Error(`${where}.label must have 1 to 60 characters.`);\n /* A package's theme says the contract it was written to, and where its files are (theme-contract). */\n if (spec.contract !== undefined && spec.contract !== THEME_CONTRACT)\n throw new Error(\n `${where}.contract is ${JSON.stringify(spec.contract)}: this mistri reads theme contract ${THEME_CONTRACT}, and a theme written to another is refused. Use the package's release for contract ${THEME_CONTRACT}, or upgrade mistri.`,\n );\n let root: string | undefined;\n if (spec.from !== undefined) {\n if (typeof spec.from !== 'string' || !spec.from.startsWith('file://'))\n throw new Error(`${where}.from must be the theme module's import.meta.url, a file: URL.`);\n if (spec.contract === undefined)\n throw new Error(\n `${where}.from names a package's directory, and a package says the contract it was written to: contract: ${THEME_CONTRACT}.`,\n );\n if (!options.faces) throw new Error(`${where}.from reads files from a package, and this theme has no server to read them.`);\n root = decodeURIComponent(new URL('.', spec.from).pathname).replace(/\\/$/, '');\n }\n let base: ThemeDefinition | undefined;\n if (spec.extends !== undefined && typeof spec.extends === 'object' && spec.extends !== null) {\n /* A theme value (a package's look): itself extending a built-in or nothing, so a chain is two deep at most. */\n const parent = spec.extends as unknown as Record<string, unknown>;\n if (parent.kind !== 'theme') throw new Error(`${where}.extends must name a built-in look or be a theme written with defineTheme.`);\n if (parent.extends !== undefined && typeof parent.extends !== 'string')\n throw new Error(\n `${where}.extends is a theme that extends another theme; a theme extends a built-in look or one theme that extends one, no deeper.`,\n );\n base = compileTheme(parent, `${where}.extends`, builtIn, new Set(['default']), options);\n } else if (spec.extends !== undefined) {\n base = typeof spec.extends === 'string' ? builtIn(spec.extends) : undefined;\n if (!base) throw new Error(`${where}.extends must name a built-in look.`);\n }\n const colors = spec.colors === undefined && base ? {} : record(spec.colors, `${where}.colors`);\n only(colors, ['light', 'dark'], `${where}.colors`);\n const darkOnly = parseScheme(spec.scheme, where) === 'dark-only';\n if (darkOnly && colors.light !== undefined)\n throw new Error(`${where}.colors.light: a dark-only theme has no light colors; name colors.dark alone, or drop scheme: 'dark-only'.`);\n for (const name of darkOnly ? (['dark'] as const) : (['light', 'dark'] as const))\n colorsToRoles(colors[name], `${where}.colors.${name}`, !base);\n\n const palettes = spec.palettes === undefined ? undefined : variants(spec.palettes, `${where}.palettes`, darkOnly);\n if (\n spec.defaultPalette !== undefined &&\n (typeof spec.defaultPalette !== 'string' ||\n (spec.defaultPalette !== 'default' && !palettes?.some((item) => item.id === spec.defaultPalette)))\n )\n throw new Error(`${where}.defaultPalette must be \"default\" or one of this theme's palettes.`);\n\n const shape = spec.shape === undefined ? {} : record(spec.shape, `${where}.shape`);\n only(shape, ['radius', 'elevation', 'border', 'height'], `${where}.shape`);\n if (shape.radius !== undefined) radiiOf(shape.radius, `${where}.shape.radius`);\n if (shape.border !== undefined) bordersOf(shape.border, `${where}.shape.border`);\n if (shape.height !== undefined) {\n const height = record(shape.height, `${where}.shape.height`);\n only(height, ['control'], `${where}.shape.height`);\n if (height.control !== undefined && !controlHeightFits(height.control))\n throw new Error(\n `${where}.shape.height.control must be a length from ${CONTROL_HEIGHT.min}px to ${CONTROL_HEIGHT.max}px, in whole pixels.`,\n );\n }\n if (shape.elevation !== undefined && typeof shape.elevation === 'object') liftsOf(shape.elevation, `${where}.shape.elevation`);\n else if (shape.elevation !== undefined && !Object.hasOwn(ELEVATIONS, shape.elevation as string))\n throw new Error(`${where}.shape.elevation must be one of ${Object.keys(ELEVATIONS).join(', ')}, or { card, float }.`);\n\n const type = spec.type === undefined ? {} : record(spec.type, `${where}.type`);\n for (const key of ['scale', 'headingWeight'])\n if (key in type) throw new Error(`${where}.type.${key} is now ${where}.${TYPE_MOVED[`type.${key}`]}.`);\n only(type, ['font', 'faces', 'base', 'roles', 'icons'], `${where}.type`);\n if (type.icons !== undefined) iconsOf(type.icons, `${where}.type.icons`);\n if (type.font !== undefined) fontsOf(type.font, `${where}.type.font`);\n if (type.faces !== undefined) {\n /* A face is a file in the App's directory, read and served by the server that loaded the App (appFonts.ts):\n a tenant's saved theme or a host page's has no directory to read it from. */\n if (!options.faces)\n throw new Error(`${where}.type.faces ships font files from an App's directory, and this theme has none to read them from.`);\n facesOf(type.faces, `${where}.type.faces`);\n }\n typeOf(type.base, type.roles, `${where}.type`);\n if (spec.density !== undefined && !DENSITIES.includes(spec.density as ThemeDensity))\n throw new Error(`${where}.density must be one of ${DENSITIES.join(', ')}.`);\n if (spec.motion !== undefined && !Object.hasOwn(MOTIONS, spec.motion as string))\n throw new Error(`${where}.motion must be one of ${Object.keys(MOTIONS).join(', ')}.`);\n if (spec.rhythm !== undefined && !Object.hasOwn(RHYTHMS, spec.rhythm as string))\n throw new Error(`${where}.rhythm must be one of ${Object.keys(RHYTHMS).join(', ')}.`);\n\n recipesOf(spec.recipes, `${where}.recipes`);\n if (spec.shell !== undefined) {\n const shell = record(spec.shell, `${where}.shell`);\n only(shell, ['placement'], `${where}.shell`);\n if (shell.placement !== undefined && shell.placement !== 'side' && shell.placement !== 'top')\n throw new Error(`${where}.shell.placement must be \"side\" or \"top\".`);\n }\n if (spec.surface !== undefined) surfaceOf(spec.surface, `${where}.surface`);\n if (spec.parts !== undefined) partsOf(spec.parts, `${where}.parts`);\n if (spec.stylesheet !== undefined) {\n /* Read, checked against its allowlist and served by the server that loaded the App (appBrand.ts). */\n if (!options.faces) throw new Error(`${where}.stylesheet is a file in an App's directory, and this theme has none to read it from.`);\n if (typeof spec.stylesheet !== 'string' || !SHEET_SRC.test(spec.stylesheet) || spec.stylesheet.split('/').includes('..'))\n throw new Error(`${where}.stylesheet must be a .css file beside the theme, written like \"./theme.css\".`);\n }\n const built = buildTheme(spec as ThemeSpec, base);\n if (base && typeof spec.extends === 'object') PARENTS.set(built, base);\n /* The files this theme names itself are read from its package, when it is one; inherited ones keep their own. */\n if (root) {\n for (const face of built.faces ?? []) if (!base?.faces?.includes(face)) FILE_ROOTS.set(face, root);\n if (built.stylesheet && built.stylesheet !== base?.stylesheet) FILE_ROOTS.set(built.stylesheet, root);\n }\n return built;\n}\n\nfunction variants(raw: unknown, where: string, darkOnly = false): ThemePaletteVariant[] {\n if (!Array.isArray(raw) || raw.length > 20) throw new Error(`${where} must be at most 20 palettes.`);\n const used = new Set(['default']);\n return raw.map((value, index) => {\n const path = `${where}[${index}]`,\n variant = record(value, path);\n only(variant, ['id', 'label', 'light', 'dark'], path);\n if (typeof variant.id !== 'string' || !THEME_ID.test(variant.id) || used.has(variant.id))\n throw new Error(`${path}.id must be a unique slug, not \"default\".`);\n used.add(variant.id);\n if (typeof variant.label !== 'string' || !variant.label.trim() || variant.label.trim().length > 60)\n throw new Error(`${path}.label must have 1 to 60 characters.`);\n if (darkOnly && variant.light !== undefined)\n throw new Error(`${path}.light: a dark-only theme has no light colors; name the palette's dark alone.`);\n return {\n id: variant.id,\n label: variant.label.trim(),\n light: colorsToRoles(variant.light, `${path}.light`, false),\n dark: colorsToRoles(variant.dark, `${path}.dark`, false),\n };\n });\n}\n\nfunction radiiOf(raw: unknown, where: string): Record<string, string> {\n if (typeof raw === 'string')\n throw new Error(\n `${where} is { control, field, pill, panel }, each a length (a control's and a pill's may be 'round'); one length is not accepted. Write { control: '${raw}', field: '${raw}' }.`,\n );\n const value = record(raw, where);\n only(value, Object.keys(RADIUS_MAX), where);\n for (const [key, length] of Object.entries(value)) {\n const max = RADIUS_MAX[key as keyof typeof RADIUS_MAX];\n const round = ROUND_CORNERS.has(key);\n if (!(cornerFits(length, max) || (round && length === 'round')))\n throw new Error(`${where}.${key} must be a length from 0px to ${max}px${round ? \", or 'round'\" : ''}.`);\n }\n return value as Record<string, string>;\n}\n\n/** `{ card, float }`: a step for each, from the platform's lifts (the attribute's `look` is not one an author says). */\nfunction liftsOf(raw: unknown, where: string): void {\n const value = record(raw, where);\n only(value, ['card', 'float'], where);\n const steps = Object.keys(LIFTS).slice(1);\n for (const [key, step] of Object.entries(value))\n if (!steps.includes(step as string)) throw new Error(`${where}.${key} must be one of ${steps.join(', ')}.`);\n}\n\nfunction bordersOf(raw: unknown, where: string): void {\n const value = record(raw, where);\n only(value, Object.keys(BORDER_MENU), where);\n for (const [key, width] of Object.entries(value)) {\n const menu = BORDER_MENU[key as keyof typeof BORDER_MENU] as readonly string[];\n if (!menu.includes(width as string)) throw new Error(`${where}.${key} must be ${menu.slice(0, -1).join(', ')} or ${menu.at(-1)}.`);\n }\n}\n\nfunction fontsOf(raw: unknown, where: string): Partial<Record<'ui' | 'data' | 'heading' | 'code' | 'figures', string>> {\n const ok = (font: unknown): font is string => typeof font === 'string' && font.length > 0 && font.length <= 200 && FONT.test(font);\n if (typeof raw === 'string') {\n if (!ok(raw)) throw new Error(`${where} must be a CSS font-family list (letters, digits, spaces, quotes, commas).`);\n return { ui: raw, data: raw, heading: raw };\n }\n const value = record(raw, where);\n only(value, ['ui', 'data', 'heading', 'code', 'figures'], where);\n for (const [key, font] of Object.entries(value))\n if (!ok(font)) throw new Error(`${where}.${key} must be a CSS font-family list (letters, digits, spaces, quotes, commas).`);\n return value as Record<string, string>;\n}\n\n/** What a compile allows beyond the spec's own rules. */\ninterface ThemeCompileOptions {\n /** `type.faces`: only an App's own theme, whose files the server reads from its directory. */\n faces?: boolean;\n}\n\n/* A family name as an `@font-face` and a stack both say it, quoted: no quote, comma or semicolon to close either. */\nconst FACE_FAMILY = /^[A-Za-z0-9][A-Za-z0-9 _-]{0,59}$/;\n/* Relative to the App's directory, downward only: `./fonts/x.woff2`. The server holds the resolved file to the\n directory as well (appFonts.ts), so a link out of it is refused there. */\nconst FACE_SRC = /^\\.\\/(?:[\\w.-]+\\/)*[\\w.-]+\\.(?:woff2|woff)$/;\nconst FACE_WEIGHT = /^[1-9]00(?: [1-9]00)?$/;\n/** At most this many faces: a regular, a bold and their italics in each of three families. */\nconst MAX_FACES = 12;\n\nfunction facesOf(raw: unknown, where: string) {\n if (!Array.isArray(raw) || raw.length > MAX_FACES) throw new Error(`${where} must be at most ${MAX_FACES} faces.`);\n const seen = new Set<string>();\n raw.forEach((value, index) => {\n const path = `${where}[${index}]`,\n face = record(value, path);\n only(face, ['family', 'src', 'weight', 'style', 'subset'], path);\n if (typeof face.family !== 'string' || !FACE_FAMILY.test(face.family))\n throw new Error(`${path}.family must be a family name of letters, digits, spaces, hyphens or underscores (at most 60).`);\n if (typeof face.src !== 'string' || !FACE_SRC.test(face.src) || face.src.split('/').includes('..'))\n throw new Error(`${path}.src must be a .woff2 or .woff file inside the App's directory, written like \"./fonts/face.woff2\".`);\n if (\n face.weight !== undefined &&\n !(typeof face.weight === 'number' && Number.isInteger(face.weight) && face.weight >= 100 && face.weight <= 900) &&\n !(typeof face.weight === 'string' && FACE_WEIGHT.test(face.weight))\n )\n throw new Error(`${path}.weight must be 100 to 900, or a variable file's range like \"100 900\".`);\n if (face.style !== undefined && face.style !== 'normal' && face.style !== 'italic')\n throw new Error(`${path}.style must be \"normal\" or \"italic\".`);\n // Latin is the default cut; the one other choice is the whole file.\n if (face.subset !== undefined && face.subset !== false)\n throw new Error(`${path}.subset must be false (ship the file whole), or left out to cut it to Latin.`);\n const key = `${face.family.toLowerCase()} ${String(face.weight ?? 400)} ${String(face.style ?? 'normal')}`;\n if (seen.has(key)) throw new Error(`${path} repeats ${face.family} at that weight and style.`);\n seen.add(key);\n });\n}\n\nfunction recipesOf(raw: unknown, where: string): Partial<ResolvedRecipes> {\n if (raw === undefined) return {};\n const value = record(raw, where);\n for (const [part, pick] of Object.entries(value)) {\n const moved = TYPE_MOVED[`recipes.${part}`];\n if (moved) throw new Error(`${where}.${part} is now ${where.replace(/\\.recipes$/, '')}.${moved}.`);\n if (Object.hasOwn(RECIPES_RENAMED, part)) throw new Error(`${where}.${part} is now ${where}.${RECIPES_RENAMED[part]}.`);\n const menu = (RECIPE_MENU as Record<string, Record<string, unknown>>)[part];\n if (!menu) throw new Error(`${where} has no part \"${part}\". The parts are: ${RECIPE_PARTS.join(', ')}.`);\n if (typeof pick !== 'string' || !Object.hasOwn(menu, pick))\n throw new Error(`${where}.${part} is not on the menu: pick one of ${Object.keys(menu).join(', ')}.`);\n }\n return value as Partial<ResolvedRecipes>;\n}\n\n/** A compiled theme's colors back into the spec's words, for the reference and the round-trip test. */\nexport function rolesToColors(palette: Partial<ThemePalette>): ThemeColorsOver {\n const out: Record<string, unknown> = {};\n for (const [path, role] of COLOR_ROLES) {\n const value = palette[role];\n if (value === undefined) continue;\n const chart = /^chart\\[(\\d)\\]$/.exec(path);\n if (chart) {\n const series = (out.chart ??= []) as (string | null)[];\n while (series.length < Number(chart[1])) series.push(null);\n series[Number(chart[1])] = value;\n } else if (path.includes('.')) {\n const [group, key] = path.split('.') as [string, string];\n ((out[group] ??= {}) as Record<string, string>)[key] = value;\n } else out[path] = value;\n }\n return out as ThemeColorsOver;\n}\n\nconst BUILT_IN_IDS: ReadonlySet<string> = new Set(['default', ...THEME_PRESETS.map((look) => look.id)]);\n\n/** Which built-in each compiled App theme extends, so the validator holds against its author only the colours they set. */\nconst EXTENDED = new WeakMap<ThemeDefinition, ThemeDefinition | null>();\n\n/** An App's `defineTheme` result, checked and compiled over the built-in it extends. */\nexport function compileAppTheme(\n raw: unknown,\n where: string,\n taken: ReadonlySet<string> = new Set(),\n options: ThemeCompileOptions = {},\n): ThemeDefinition {\n let extended: ThemeDefinition | null = null;\n const theme = compileTheme(\n raw,\n where,\n (id) => {\n extended = BUILT_IN_IDS.has(id) ? (themePreset(id) ?? null) : null;\n return extended ?? undefined;\n },\n new Set([...BUILT_IN_IDS, ...taken]),\n options,\n );\n EXTENDED.set(theme, themeParent(theme) ?? extended);\n /* The spec as written, for what a check suggests in its words and where `check --fix` writes (themeFix.ts). */\n /* The ids taken then, copied: the caller goes on to add this theme's own, which a variation must still be allowed. */\n SPECS.set(theme, { raw: raw as ThemeSpec, where, taken: new Set(taken), options });\n return theme;\n}\n\n/** Each compiled App theme's spec and how it was compiled, so a fix can be tried by compiling the spec again. */\nconst SPECS = new WeakMap<ThemeDefinition, { raw: ThemeSpec; where: string; taken: ReadonlySet<string>; options: ThemeCompileOptions }>();\n\n/** The spec a compiled App theme came from, and how to compile a variation of it; undefined for a theme not compiled here. */\nexport function themeSpecOf(\n theme: ThemeDefinition,\n): { raw: ThemeSpec; where: string; taken: ReadonlySet<string>; options: ThemeCompileOptions } | undefined {\n return SPECS.get(theme);\n}\n\n/** The built-in a compiled App theme extends: `null` for one that extends nothing, `undefined` for a theme not compiled here. */\nexport function themeExtends(theme: ThemeDefinition): ThemeDefinition | null | undefined {\n return EXTENDED.get(theme);\n}\n","/**\n * Chart series apart for color-blind readers: the one measure `mistri check` holds an App's chart to\n * (themeCheck.ts) and the built-in looks order their series by under each palette (lookPalettes.ts).\n */\n/** Machado, Oliveira and Fernandes (2009) at full severity, in linear sRGB: the\n two red-green deficiencies, about one man in twelve between them. Tritanopia\n is rare enough (about 1 in 10,000) that it is not held against a palette. */\nconst DEFICIENCIES = {\n protanopia: [\n [0.152286, 1.052583, -0.204868],\n [0.114503, 0.786281, 0.099216],\n [-0.003882, -0.048116, 1.051998],\n ],\n deuteranopia: [\n [0.367322, 0.860646, -0.227968],\n [0.280085, 0.672501, 0.047413],\n [-0.01182, 0.04294, 0.968881],\n ],\n} as const;\n/** Adjacent series, in OKLab ΔE ×100: at least 8 under each deficiency, and 10 to normal vision. */\nconst CHART_SEPARATION = { deficient: 8, normal: 10 } as const;\n\nexport function linear(hex: string): [number, number, number] {\n return [1, 3, 5].map((start) => {\n const value = parseInt(hex.slice(start, start + 2), 16) / 255;\n return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;\n }) as [number, number, number];\n}\nexport function oklab([r, g, b]: readonly number[]): [number, number, number] {\n const l = Math.cbrt(0.4122214708 * r! + 0.5363325363 * g! + 0.0514459929 * b!),\n m = Math.cbrt(0.2119034982 * r! + 0.6806995451 * g! + 0.1073969566 * b!),\n s = Math.cbrt(0.0883024619 * r! + 0.2817188376 * g! + 0.6299787005 * b!);\n return [\n 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,\n 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,\n ];\n}\nfunction simulate(color: readonly number[], matrix: readonly (readonly number[])[]): number[] {\n return matrix.map((row) => Math.min(1, Math.max(0, row[0]! * color[0]! + row[1]! * color[1]! + row[2]! * color[2]!)));\n}\n/** OKLab distance ×100 between two hex colors, as seen with the deficiency named or with normal vision. */\nfunction chartDistance(a: string, b: string, deficiency?: keyof typeof DEFICIENCIES): number {\n const see = (hex: string) => oklab(deficiency ? simulate(linear(hex), DEFICIENCIES[deficiency]) : linear(hex));\n const x = see(a),\n y = see(b);\n return 100 * Math.hypot(x[0] - y[0], x[1] - y[1], x[2] - y[2]);\n}\n\n/** The first reader two series are too alike for, how far apart they are to them and what they need; undefined when\n every reader tells them apart. The one measure: the check says it, and a suggested chart is proved by it. */\nexport function chartPairFailure(a: string, b: string): { vision: string; distance: number; needs: number } | undefined {\n const tests: Array<[string, number, number]> = [\n ['normal vision', chartDistance(a, b), CHART_SEPARATION.normal],\n ...(Object.keys(DEFICIENCIES) as (keyof typeof DEFICIENCIES)[]).map(\n (kind) => [kind, chartDistance(a, b, kind), CHART_SEPARATION.deficient] as [string, number, number],\n ),\n ];\n const failed = tests.find(([, distance, needs]) => distance < needs);\n return failed && { vision: failed[0], distance: failed[1], needs: failed[2] };\n}\n\n/** Whether two series stay apart for every reader the chart check holds a palette to. */\nexport function chartsApart(a: string, b: string): boolean {\n return !chartPairFailure(a, b);\n}\n","/**\n * The one validator a theme meets, wherever it comes from: `mistri check`\n * and `build` run it over an App's `defineTheme` themes, startup over its\n * accent on the looks it offers, and a tenant's branding save over the theme\n * that tenant would wear (tenantBranding.ts). It adds to the contrast checks\n * (theme.ts) the chart's color-blind separation, and says each failure by the\n * color's own name in the spec (`status.critical`, `chart[2]`).\n */\nimport type { ThemeDefinition, ThemePalette } from '@mistriwork/engine/schema/theme.js';\nimport { rolePairs, themeFindings, type ThemeFinding } from '@mistriwork/engine/shared/theme.js';\nimport {\n effectiveThemeDefinition,\n effectiveThemePalette,\n themeModes,\n withInks,\n type AppAccent,\n} from '@mistriwork/engine/shared/themePresets.js';\nimport { COLOR_ROLES } from './themeBuild.js';\nimport { colorPath, themeSpecOf } from './themeSpec.js';\n\nconst ROLES = new Set<string>(COLOR_ROLES.map(([, role]) => role));\n\n/* ---------- chart series apart for color-blind readers ---------- */\n\n/* The measure lives beside the looks (engine chartSeparation.ts), which order their own series by it. */\nexport { chartPairFailure, chartsApart, linear, oklab } from '@mistriwork/engine/shared/chartSeparation.js';\nimport { chartPairFailure } from '@mistriwork/engine/shared/chartSeparation.js';\n\nconst HEX = /^#[0-9a-f]{6}$/i;\nconst SERIES = [1, 2, 3, 4, 5, 6, 7, 8].map((n) => `chart${n}` as keyof ThemePalette);\n\n/** Each adjacent pair of series one of `authored` names (a built-in's own pairs are its own). */\nfunction chartFindings(\n theme: ThemeDefinition,\n own: { accent?: AppAccent },\n authored: (paletteId: string, mode: 'light' | 'dark', role: keyof ThemePalette) => boolean,\n): ThemeFinding[] {\n const findings: ThemeFinding[] = [];\n for (const paletteId of ['default', ...(theme.palettes ?? []).map((item) => item.id)])\n for (const mode of themeModes(theme)) {\n const palette = effectiveThemePalette(effectiveThemeDefinition(theme, paletteId)[mode], mode === 'dark', own);\n const name =\n paletteId === 'default' ? theme.label : `${theme.label} / ${theme.palettes!.find((item) => item.id === paletteId)!.label}`;\n for (let index = 0; index < SERIES.length - 1; index++) {\n const left = SERIES[index]!,\n right = SERIES[index + 1]!;\n const a = palette[left],\n b = palette[right];\n if (!a || !b || !HEX.test(a) || !HEX.test(b)) continue;\n if (!authored(paletteId, mode, left) && !authored(paletteId, mode, right)) continue;\n const token = authored(paletteId, mode, right) ? right : left;\n const failed = chartPairFailure(a, b);\n if (!failed) continue;\n const { vision, distance, needs } = failed;\n findings.push({\n themeId: theme.id,\n paletteId,\n mode,\n token,\n check: `${left} beside ${right} for ${vision}`,\n ratio: distance,\n needs,\n message: `Theme \"${name}\" (${mode}): ${colorPath(left)} and ${colorPath(right)} are ${distance.toFixed(1)} apart for ${vision}; adjacent chart series need ${needs}.`,\n });\n }\n }\n return findings;\n}\n\n/* ---------- the colours an author wrote, as written ---------- */\n\n/** A colour measured as the author wrote it, and what the page wears in its place. */\ntype WrittenFinding = ThemeFinding & { written?: string; wornAs?: string };\n\n/** The inks a page wears as the accent's text ink when they are written the same as the accent (themePresets.ts\n effectiveThemePalette): a link, the ring, the menu's current mark, the first series. */\nconst FOLLOWERS = ['link', 'focus', 'navAccent', 'chart1'] as const;\n\n/**\n * An ink the author wrote that the page does not wear as written — a link, a ring, a menu mark or a first series\n * written the same as the accent is drawn in the accent's text ink instead — held to its role's pairs as written:\n * a value in the spec is one the reader sees or one check refuses, never one dropped in silence. A link written as an\n * amber accent read 2.0:1 and passed (T-3). Only a theme whose spec is at hand (compileAppTheme) is read; an App's\n * own `ui.theme.accent` replaces these on purpose and is checked as the accent.\n */\nfunction writtenFindings(theme: ThemeDefinition, own: { accent?: AppAccent }): WrittenFinding[] {\n const raw = themeSpecOf(theme)?.raw as\n | { colors?: Record<string, unknown>; palettes?: ReadonlyArray<Record<string, unknown>> }\n | undefined;\n if (!raw || own.accent) return [];\n const findings: WrittenFinding[] = [];\n const darkOnly = theme.scheme === 'dark-only';\n for (const [index, paletteId] of ['default', ...(theme.palettes ?? []).map((item) => item.id)].entries())\n for (const mode of themeModes(theme)) {\n const source = (index === 0 ? raw.colors : raw.palettes?.[index - 1])?.[darkOnly ? 'dark' : mode] as\n | Record<string, unknown>\n | undefined;\n if (!source) continue;\n const worn = withInks(effectiveThemePalette(effectiveThemeDefinition(theme, paletteId)[mode], mode === 'dark', own) as ThemePalette);\n const name = index === 0 ? theme.label : `${theme.label} / ${theme.palettes![index - 1]!.label}`;\n for (const role of FOLLOWERS) {\n const path = colorPath(role);\n const group = /^(\\w+)\\.(\\w+)$/.exec(path);\n const said =\n role === 'chart1'\n ? (source.chart as unknown[] | undefined)?.[0]\n : group\n ? (source[group[1]!] as Record<string, unknown> | undefined)?.[group[2]!]\n : source[role];\n if (typeof said !== 'string' || !HEX.test(said.trim()) || said.trim().toLowerCase() === worn[role]?.toLowerCase()) continue;\n const written = said.trim().toLowerCase();\n for (const pair of rolePairs(worn, role, written)) {\n if (pair.ratio >= pair.needs) continue;\n findings.push({\n themeId: theme.id,\n paletteId,\n mode,\n token: role,\n check: `${role} as written on ${pair.background}${pair.what ? ` (${pair.what})` : ''}`,\n ratio: pair.ratio,\n needs: pair.needs,\n written,\n wornAs: worn[role],\n message: `Theme \"${name}\" (${mode}): ${path} as written is ${written}, ${pair.ratio.toFixed(2)}:1 on ${colorPath(pair.background)}; it needs ${pair.needs}:1.`,\n });\n }\n }\n }\n return findings;\n}\n\n/* ---------- the validator ---------- */\n\nexport interface ThemeProblem {\n themeId: string;\n paletteId: string;\n mode: 'light' | 'dark';\n /** The color by its name in the spec: `accent`, `status.critical`, `chart[2]`, `nav.muted`. */\n token: string;\n /** The same color by its role (`accent`, `negative`, `chart3`, `navMuted`): what themeFix.ts varies. */\n role: keyof ThemePalette;\n /** What was measured, by roles: `accent/accentSoft over surface`, `chart2 beside chart3 for deuteranopia`. */\n check: string;\n ratio: number;\n needs: number;\n /** What failed, said by the check: \"accent on surface 3.10:1, needs 4.5:1\". */\n reason: string;\n /** The colour as the author wrote it, where the page wears another in its place (a link written as the accent). */\n written?: string;\n /** The whole sentence, naming theme, mode, token and reason. */\n message: string;\n}\n\n/**\n * Every failure of a theme: contrast of text and controls in light and dark\n * and every palette, and its chart's color-blind separation. `authored` says\n * which colors the author set, so a series kept from a built-in is not held\n * against the author; omitted, every color is the author's.\n */\nexport function checkTheme(\n theme: ThemeDefinition,\n options: {\n own?: { accent?: AppAccent };\n authored?: (paletteId: string, mode: 'light' | 'dark', role: keyof ThemePalette) => boolean;\n } = {},\n): ThemeProblem[] {\n const own = options.own ?? {};\n const authored = options.authored ?? (() => true);\n const all: WrittenFinding[] = [...themeFindings([theme], own), ...chartFindings(theme, own, authored), ...writtenFindings(theme, own)];\n return all.map((finding) => {\n const name =\n finding.paletteId === 'default'\n ? theme.label\n : `${theme.label} / ${theme.palettes!.find((item) => item.id === finding.paletteId)!.label}`;\n const check = finding.check.replace(/\\b[a-z][a-zA-Z0-9]*\\b/g, (word) => (ROLES.has(word) ? colorPath(word) : word));\n const reason = check.includes(' for ')\n ? `${check} are ${finding.ratio.toFixed(1)} apart; adjacent series need ${finding.needs}`\n : `${check} is ${finding.ratio.toFixed(2)}:1; it needs ${finding.needs}:1`;\n return {\n themeId: finding.themeId,\n paletteId: finding.paletteId,\n mode: finding.mode,\n token: colorPath(finding.token),\n role: finding.token,\n check: finding.check,\n ratio: finding.ratio,\n needs: finding.needs,\n reason,\n ...(finding.written ? { written: finding.written } : {}),\n message: `Theme \"${name}\" (${finding.mode}), ${colorPath(finding.token)}: ${reason}.`,\n };\n });\n}\n\n/** The roles a compiled theme takes from its author rather than the built-in it extends. */\nexport function authoredRoles(theme: ThemeDefinition, base: ThemeDefinition | undefined) {\n return (paletteId: string, mode: 'light' | 'dark', role: keyof ThemePalette): boolean => {\n if (!base) return true;\n const ours = effectiveThemeDefinition(theme, paletteId)[mode][role];\n const theirs = effectiveThemeDefinition(base, base.palettes?.some((item) => item.id === paletteId) ? paletteId : 'default')[mode][role];\n return ours !== theirs;\n };\n}\n","/**\n * The palettes every built-in look offers: one registry, so Cobalt is the same\n * blue in Workshop, Lumen, Mono, Sage and Ledger, and a reader who picks it keeps it\n * when they pick another look. A palette is a color identity only — its hue at\n * the depths a look draws it, light and dark, and the chart series that starts\n * from it. Everything else stays the look's: its grounds and neutrals\n * (Workshop's paper, Lumen's stone, Mono's grays, Sage's cream, Ledger's green-tinted paper and cover), its type,\n * shape and recipes, and which roles it lets the hue reach (`paletteColors`).\n * Workshop keeps one restrained accent under any palette: the hue reaches the\n * few marks a reader takes for the brand color — the primary verb, links and\n * the current tab, the menu's marker, the ring, a checked box, the first\n * series — and never a tint; its fills and rules stay the ink.\n *\n * test/contrast.test.ts measures every palette in every look, light and dark:\n * the hue as text and as a fill's words at 4.5:1, the ring at 3:1, adjacent\n * chart series apart for color-blind readers.\n */\nimport type { ThemeBase, ThemeColorsOver } from '../../schema/theme.js';\nimport { chartPairFailure, linear, oklab } from './chartSeparation.js';\n\n/** One mode of a palette: the hue at each depth a look draws it. */\ninterface PaletteMode {\n /** The hue as text and as a fill under the page's words: a link, a current tab's word, a button (Lumen, Mono, Sage). */\n accent: string;\n /** A link a step brighter than the accent, by night; omitted, the accent. */\n link?: string;\n /** The hue's pale (by night, deep) tint under a selected item: Lumen's. */\n soft: string;\n /** The focus ring: a mid-tone of the hue, 3:1 on every look's grounds. */\n focus: string;\n /** The hue as a signal fill — Workshop's primary verb, as a hazard tag prints it — and the words on it. */\n signal: string;\n onSignal: string;\n /** The first chart series. */\n chart: string;\n /** Ledger's rules by night, where the ring's mid-tone is not the rung it draws them at; omitted, the ring. */\n rule?: string;\n}\n\ninterface LookPalette {\n id: string;\n label: string;\n light: PaletteMode;\n dark: PaletteMode;\n /** Where one look draws the hue at another depth: the ink is each look's own ink, Workshop's orange its own, and a\n link a step deeper where Workshop's paper and its menu's hover would otherwise hold it under 4.5:1. */\n looks?: Partial<Record<ThemeBase, { light?: Partial<PaletteMode>; dark?: Partial<PaletteMode> }>>;\n}\n\n/* Around the wheel, then the two neutrals, so twelve hues read apart at a glance in the picker. Lumen's five\n (Violet, Teal, Emerald, Rose, Amber) keep their ids and their Lumen colors; Amber moved toward gold so that it and\n Safety orange are two hues, not one. Cobalt is Lumen's own blue. */\nexport const LOOK_PALETTES: readonly LookPalette[] = [\n {\n id: 'crimson',\n label: 'Crimson',\n light: { accent: '#b42318', soft: '#fdecea', focus: '#d9534a', signal: '#cf2a1e', onSignal: '#faf8f3', chart: '#d63a32' },\n dark: {\n accent: '#ff8f85',\n link: '#ffaca5',\n soft: '#3d1715',\n focus: '#e06158',\n signal: '#ff6b5e',\n onSignal: '#15130f',\n chart: '#e5534b',\n },\n },\n {\n id: 'safety',\n label: 'Safety orange',\n light: { accent: '#b33d0b', soft: '#fdeee4', focus: '#d4612a', signal: '#f26a1b', onSignal: '#1b1813', chart: '#e8691f' },\n dark: {\n accent: '#ff9d66',\n link: '#ffb88f',\n soft: '#3b2112',\n focus: '#d8743a',\n signal: '#ff7a2e',\n onSignal: '#15130f',\n chart: '#f07a32',\n },\n /* Workshop's ring is its own deeper orange (a field report's theme, where the look began). */\n looks: { workshop: { light: { accent: '#c9530b', link: '#aa3600' }, dark: { accent: '#e8742c' } } },\n },\n {\n id: 'amber',\n label: 'Amber',\n light: { accent: '#875a00', soft: '#fbf2dc', focus: '#b57a33', signal: '#f2a516', onSignal: '#1b1813', chart: '#d97706' },\n dark: {\n accent: '#f4b24a',\n link: '#fbcf86',\n soft: '#3a2a10',\n focus: '#b07d2d',\n signal: '#ffb52e',\n onSignal: '#15130f',\n chart: '#c88317',\n },\n looks: { workshop: { light: { link: '#825600' } } },\n },\n {\n id: 'moss',\n label: 'Moss',\n light: { accent: '#436e10', soft: '#eef4e2', focus: '#638f2a', signal: '#86b828', onSignal: '#1b1813', chart: '#6b9e1f' },\n dark: {\n accent: '#a6d468',\n link: '#bfe28f',\n soft: '#232f15',\n focus: '#7aa743',\n signal: '#a3d65c',\n onSignal: '#15130f',\n chart: '#8cbf45',\n },\n looks: { workshop: { light: { link: '#3f6a08' } } },\n },\n {\n id: 'emerald',\n label: 'Emerald',\n light: { accent: '#08734f', soft: '#e4f6ed', focus: '#36966f', signal: '#12a26f', onSignal: '#1b1813', chart: '#0e9a6c' },\n dark: {\n accent: '#4ad6a0',\n link: '#7ee6bd',\n soft: '#0f3529',\n focus: '#279771',\n signal: '#34d399',\n onSignal: '#15130f',\n chart: '#12a678',\n },\n /* Ledger's own green is Emerald as the book draws it: a deeper, greyer hue than the shared one, so its marks read\n on its tinted paper and the cover's green sits beside them. */\n looks: {\n workshop: { light: { link: '#006d4a' } },\n ledger: {\n light: { accent: '#0f4d36', link: '#0f5a3f', soft: '#e0ece4', focus: '#3f8a6c', chart: '#0f6b4a' },\n dark: { accent: '#7cc4a0', link: '#8fd1ae', soft: '#183026', focus: '#5fa585', chart: '#5fbf92', rule: '#6fb592' },\n },\n },\n },\n {\n id: 'teal',\n label: 'Teal',\n light: { accent: '#0b6f86', soft: '#e3f5f8', focus: '#3c90a4', signal: '#17a9c4', onSignal: '#1b1813', chart: '#0e8fb0' },\n dark: {\n accent: '#4cc6db',\n link: '#79d6e6',\n soft: '#0f3540',\n focus: '#2a8a9c',\n signal: '#3ccbe0',\n onSignal: '#15130f',\n chart: '#0c8ab0',\n },\n looks: { workshop: { light: { link: '#00687e' } } },\n },\n {\n id: 'cobalt',\n label: 'Cobalt',\n light: { accent: '#2d4fd6', soft: '#eef1fd', focus: '#6880e0', signal: '#2f5ce8', onSignal: '#faf8f3', chart: '#2557e0' },\n dark: {\n accent: '#8aa1ff',\n link: '#91a8ff',\n soft: '#1d2547',\n focus: '#5a73d6',\n signal: '#7f9cff',\n onSignal: '#15130f',\n chart: '#4369f0',\n },\n },\n {\n id: 'violet',\n label: 'Violet',\n light: { accent: '#6534d8', soft: '#f1ecff', focus: '#8a6ee6', signal: '#7445e8', onSignal: '#faf8f3', chart: '#9a6cf7' },\n dark: {\n accent: '#ad91ff',\n link: '#bea8ff',\n soft: '#2a2154',\n focus: '#7c63cf',\n signal: '#a98cff',\n onSignal: '#15130f',\n chart: '#9a78ec',\n },\n },\n {\n id: 'plum',\n label: 'Plum',\n light: { accent: '#8a1f8f', soft: '#f8eaf8', focus: '#b65bbb', signal: '#a3289f', onSignal: '#faf8f3', chart: '#b847c0' },\n dark: {\n accent: '#e28cea',\n link: '#edaef2',\n soft: '#3a1840',\n focus: '#b366bb',\n signal: '#e083ea',\n onSignal: '#15130f',\n chart: '#d062d8',\n },\n },\n {\n id: 'rose',\n label: 'Rose',\n light: { accent: '#b4185a', soft: '#fdebf2', focus: '#d0608f', signal: '#c92265', onSignal: '#faf8f3', chart: '#e0428a' },\n dark: {\n accent: '#f57ab9',\n link: '#f9a6cf',\n soft: '#3e1631',\n focus: '#bd5a8f',\n signal: '#ff70aa',\n onSignal: '#15130f',\n chart: '#e0559b',\n },\n },\n {\n id: 'slate',\n label: 'Slate',\n light: { accent: '#3f5670', soft: '#ebeff4', focus: '#6e8399', signal: '#4c6584', onSignal: '#faf8f3', chart: '#5f7690' },\n dark: {\n accent: '#a8bbd2',\n link: '#c2d0e1',\n soft: '#1f2733',\n focus: '#6f86a3',\n signal: '#9fb4cf',\n onSignal: '#15130f',\n chart: '#8a9fba',\n },\n },\n {\n /* No hue: the look's own ink is the accent. Mono's and Sage's original colors are this palette as they draw it. */\n id: 'ink',\n label: 'Ink',\n light: { accent: '#1c1a17', soft: '#eeedeb', focus: '#726c64', signal: '#1c1a17', onSignal: '#ffffff', chart: '#2b2620' },\n dark: { accent: '#eeece8', soft: '#2a2826', focus: '#9f9a92', signal: '#eeece8', onSignal: '#121110', chart: '#d9d0c0' },\n looks: {\n workshop: {\n light: { accent: '#5f574b', signal: '#1b1813', onSignal: '#faf8f3' },\n dark: { accent: '#a59c8d', signal: '#efe9de', onSignal: '#15130f' },\n },\n mono: {\n light: { accent: '#000000', focus: '#000000', chart: '#000000' },\n dark: { accent: '#ffffff', focus: '#ffffff', chart: '#ffffff' },\n },\n sage: {\n light: { accent: '#1f2320', link: '#256b43', focus: '#256b43', chart: '#3a8560' },\n dark: { accent: '#f1f0ea', link: '#8fd9ad', focus: '#8fd9ad', chart: '#7fd1a0' },\n },\n },\n },\n];\n\n/** How far apart two series are to the reader who tells them apart least (OKLab ΔE ×100), and whether every reader\n does (chartSeparation.ts). */\nfunction apart(a: string, b: string): boolean {\n return !chartPairFailure(a, b);\n}\nfunction nearness(a: string, b: string): number {\n const x = oklab(linear(a)),\n y = oklab(linear(b));\n return Math.hypot(x[0] - y[0], x[1] - y[1], x[2] - y[2]);\n}\n\n/**\n * A look's series led by a palette's hue. The lead takes the first place and the look's series follow in their own\n * order, less the lead where it is one of them, else less the one nearest it, so a chart never shows two of a hue.\n * Where a neighbor would sit too close to the one before it for a color-blind reader, the next that reads apart takes\n * its place: the first order, in the look's own, in which every neighbor does. Where none does without the nearest,\n * the next nearest is left out instead; a look whose series cannot be set apart at all keeps its own order.\n */\nfunction ledSeries(series: readonly string[], lead: string): string[] {\n const own = series.findIndex((color) => color.toLowerCase() === lead.toLowerCase());\n const leaving =\n own >= 0 ? [own] : series.map((_, index) => index).sort((a, b) => nearness(series[a]!, lead) - nearness(series[b]!, lead));\n for (const left of leaving) {\n const rest = series.filter((_, index) => index !== left);\n const order: string[] = [];\n const used = new Set<number>();\n const place = (before: string): boolean => {\n if (order.length === rest.length) return true;\n for (let index = 0; index < rest.length; index++) {\n if (used.has(index) || !apart(before, rest[index]!)) continue;\n used.add(index);\n order.push(rest[index]!);\n if (place(rest[index]!)) return true;\n order.pop();\n used.delete(index);\n }\n return false;\n };\n if (place(lead)) return [lead, ...order];\n }\n return [lead, ...series.filter((_, index) => index !== leaving[0])];\n}\n\n/**\n * One palette as a look draws it, in one mode: the roles the look lets the hue reach, as spec colors.\n *\n * - Workshop: the hue is the primary verb's fill and its words, links and the current tab's rule, the marker beside\n * the menu's ink block, the ring, a checked box and the first chart series; fills, rules and selection stay the\n * ink, on paper, with no tint.\n * - Lumen: the accent and its pale tint, links, the ring, the menu's mark and the first chart series.\n * - Mono and Sage: the same, on their own neutral tint for what is chosen (Mono's gray, Sage's warm cream).\n * - Ledger: Lumen's reach and the primary verb's fill, and the hue's ink and the rules (a table's double-ruled heads, a box's top rule) in it;\n * the paper and the cover stay the book's own green, with the gilt mark for the current entry.\n */\nexport function paletteColors(look: ThemeBase, palette: LookPalette, mode: 'light' | 'dark', series: readonly string[]): ThemeColorsOver {\n const tone: PaletteMode = { ...palette[mode], ...palette.looks?.[look]?.[mode] };\n const link = tone.link ?? tone.accent;\n switch (look) {\n case 'workshop':\n /* The few marks a reader takes for the brand color, and no tint: the primary verb's fill and its words, links\n and the current tab's rule, the menu's marker beside its ink block, the ring, a checked box and the first\n chart series. Fills, rules, selection and the menu's block stay the ink, on paper. */\n return {\n accent: tone.signal,\n onAccent: tone.onSignal,\n primary: tone.signal,\n onPrimary: tone.onSignal,\n link,\n focus: tone.accent,\n nav: { accent: link },\n chart: ledSeries(series, tone.chart),\n };\n case 'lumen':\n return {\n accent: tone.accent,\n accentSoft: tone.soft,\n link,\n focus: tone.focus,\n nav: { accent: link },\n chart: ledSeries(series, tone.chart),\n };\n case 'mono':\n return { accent: tone.accent, link, focus: tone.focus, nav: { accent: link }, chart: ledSeries(series, tone.chart) };\n case 'sage':\n return {\n accent: tone.accent,\n link,\n focus: tone.focus,\n /* Sage's menu marks the current entry in its ink by day, as its buttons are; by night in the brighter link. */\n nav: { accent: mode === 'light' ? tone.accent : link },\n chart: ledSeries(series, tone.chart),\n };\n case 'ledger': {\n /* The rules stand in the hue by day, and by night in its mid-tone, a rung under the link so a 3px double rule\n is a line and not a glare on the dark paper. */\n const rule = mode === 'light' ? tone.accent : (tone.rule ?? tone.focus);\n /* The book has one green for its cover's marks, its primary button and its links: a form's primary verb fills\n in the hue like a record's, never in the ink. */\n return {\n accent: tone.accent,\n primary: tone.accent,\n accentSoft: tone.soft,\n accentInk: mode === 'light' ? tone.accent : link,\n link,\n focus: tone.focus,\n rules: { section: rule, head: rule },\n chart: ledSeries(series, tone.chart),\n };\n }\n }\n}\n","/**\n * The built-in looks as authored specs: each look's palettes, faces, shape,\n * density and recipe picks, written by purpose as an App's own theme is.\n * themePresets.ts compiles them into the presets the server and the browser\n * both wear; the builder and the checks are elsewhere, so they stay out of a\n * first paint that needs only the looks.\n */\nimport type { ThemeBase, ThemeColorsOver, ThemeSpec } from '../../schema/theme.js';\nimport { LOOK_PALETTES, paletteColors } from './lookPalettes.js';\n\n/** The system's own interface face on every machine; nothing is fetched and\n nothing is bundled. A look's identity is its type roles: size, weight and tracking. */\nconst SANS = 'ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif';\nconst HELVETICA = '\"Helvetica Neue\", Helvetica, Arial, ui-sans-serif, sans-serif';\n/** Lumen's face: Inter, shipped as a sheet of its own (interFace.css) and so\n fetched only by a page set in it, never in the first paint; then Arial\n cut to Inter's measure while it arrives (docs/design.md, Faces). */\nexport const INTER = `Inter, \"Inter Fallback\", ${SANS}`;\n/** Workshop's faces: Barlow for the interface and data, its semi-condensed bold for titles and labels, shipped with\n a sheet of their own (barlowFace.css) and fetched only by a page set in them; each with Arial cut to its measure\n while it arrives. */\nexport const BARLOW = `Barlow, \"Barlow Fallback\", \"Helvetica Neue\", Arial, sans-serif`;\nconst BARLOW_CONDENSED = `\"Barlow Semi Condensed\", \"Barlow Semi Condensed Fallback\", Barlow, \"Arial Narrow\", sans-serif`;\n/** Ledger's figures and labels: IBM Plex Mono, shipped with Ledger's sheet (ledgerLook.css) and fetched only by a page\n wearing it; the platform's monospace stands in until it arrives. */\nconst PLEX_MONO = `'IBM Plex Mono', ui-monospace, Menlo, monospace`;\n/** A data column's figures in every built-in look (`fonts.figures`, drawn as `--figures`, themeFamilies.css): Plex Mono, with\n the fallback cut to its measure while it arrives. A theme that names a data face and no figures face draws its figures\n in that face, so each built-in that names a data face says this one, and its figures stay as they were. */\nconst FIGURES = `'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, Menlo, monospace`;\n\n/** A look as written here: its own grounds, neutrals and meaning colors, and the palette (lookPalettes.ts) it wears\n until a reader or the App picks another. The hue's roles are the palette's, so a look never names them. */\ntype HouseLook = Omit<Extract<ThemeSpec, { extends?: undefined; colors: { light: unknown } }>, 'colors' | 'id' | 'palettes'> & {\n id: ThemeBase;\n colors: { light: ThemeColorsOver; dark: ThemeColorsOver };\n defaultPalette: string;\n};\n\n/** Spec colors over spec colors: a group (`nav`, `status`, `rules`) role by role, a series whole. */\nfunction overColors(base: ThemeColorsOver, top: ThemeColorsOver): ThemeColorsOver {\n return {\n ...base,\n ...top,\n ...(base.nav || top.nav ? { nav: { ...base.nav, ...top.nav } } : {}),\n ...(base.status || top.status ? { status: { ...base.status, ...top.status } } : {}),\n ...(base.rules || top.rules ? { rules: { ...base.rules, ...top.rules } } : {}),\n };\n}\n\n/** A look with every palette: its own colors are its default palette's, and each palette is the same hue as it is in\n every other look (scripts/theme-presets.mjs keeps only what a palette changes). */\nfunction withPalettes(look: HouseLook): ThemeSpec {\n const series = (mode: 'light' | 'dark') => (look.colors[mode].chart ?? []).filter((color): color is string => typeof color === 'string');\n const worn = (id: string, mode: 'light' | 'dark') =>\n overColors(\n look.colors[mode],\n paletteColors(\n look.id,\n LOOK_PALETTES.find((palette) => palette.id === id)!,\n mode,\n series(mode),\n ),\n );\n return {\n ...look,\n colors: { light: worn(look.defaultPalette, 'light'), dark: worn(look.defaultPalette, 'dark') },\n palettes: LOOK_PALETTES.map((palette) => ({\n id: palette.id,\n label: palette.label,\n light: worn(palette.id, 'light'),\n dark: worn(palette.id, 'dark'),\n })),\n } as ThemeSpec;\n}\n\n/** The built-in looks: Workshop, the default an App wears, then Lumen, Mono, Sage and Ledger.\n Each is written as an App would write its own (`defineTheme`,\n packages/engine/schema/theme.d.ts): colours by purpose, a shape, a type and a pick from the\n recipe menu (themeBuild.ts), and built by the same `buildTheme` an App's\n theme goes through once `compileTheme` has checked it. A look the menu\n could not say would extend the menu, never be special-cased. An App's\n theme `extends` one of them, or none (docs/theming.md shows a few that\n extend none). Every look draws its content on a white or near-white\n ground (Sage's white panels on cream are the warm page) and keeps its\n colour for the bar, the accent and the current item; captions take an ink\n darker than the hairlines and still quieter than the text. `lineControl`\n is a form control's edge, at 3:1 on surface, ground and raised (WCAG\n 1.4.11): the look's lineStrong where that already clears it, else one step\n toward the ink.\n\n The title weight (`type.roles.title.weight`) is never past 700: a heavier\n ask resolved a book face to its Black cut, a masthead where a title was\n meant, and broke the record's head. Mono titles at 700; Lumen's and Sage's\n softer titles at 600; Workshop's condensed bold at 700.\n\n Each wears every palette in lookPalettes.ts; its own colors are its\n default palette's (Workshop's Safety orange, Lumen's Cobalt, Mono's and\n Sage's Ink, which is each one's own ink, Ledger's Emerald, drawn in the\n book's own deep green). */\nconst HOUSE: readonly HouseLook[] = [\n {\n // The desk as a workbench, ported from a field report's theme, and\n // refreshed in rc.18 so the work sits on white: the warm paper and its\n // grain frame it (the top bar, the menu and one band behind a page's\n // head: a list's title, tabs and filters, a record's trail, name and\n // facts), as a sheet is clipped to a board, and rows, fields and cards\n // stay white. Ink-black type and one restrained hue — Safety orange\n // unless a palette says another. The hue reaches only the marks a reader\n // takes for the brand color: the primary verb, filled, with the ink's\n // words on it as a hazard tag prints them (the look's one idea), links\n // and the current tab's rule, a 3px marker beside the menu's current\n // entry (like a tool's slot on a pegboard), the focus ring, a checked\n // box and the first chart series. The current entry is a soft tint of\n // the menu's ink, by day and by night: the brightest thing on a screen\n // is the orange verb, never the menu. Barlow's semi-condensed bold sets\n // the titles, in sentence case, a stat's figures and the App's name, the\n // one word in capitals (the brand's stamp); sections, tabs, column heads\n // and labels are Barlow in sentence case, the labels in the muted ink.\n // Hairlines part the sections and close a table's heads, corners are\n // near-square and nothing floats (workshopLook.css; docs/design.md,\n // Workshop).\n id: 'workshop',\n label: 'Workshop',\n defaultPalette: 'safety',\n colors: {\n light: {\n // White to work on; the paper (#f2ede3) is the frame's: the menu, the bar and the band behind a page's head,\n // which is the raised ground (recipes.header 'band'), so a hovered row is the paper too.\n ground: '#fbfaf7',\n surface: '#ffffff',\n raised: '#f2ede3',\n ink: '#1b1813',\n inkMuted: '#4f483d',\n inkSubtle: '#5f574b',\n line: '#e6e1d8',\n lineStrong: '#8b8274',\n lineControl: '#7d7466',\n accentInk: '#1b1813',\n accentSoft: '#e7dfd0',\n primary: '#1b1813',\n link: '#1b1813',\n shadow: '#3a3020',\n status: { good: '#106b38', warning: '#934a06', critical: '#c52a2a', info: '#2f5578' },\n nav: {\n ground: '#f2ede3',\n ink: '#1b1813',\n muted: '#4f483d',\n line: '#d8cfbe',\n accent: '#1b1813',\n // The current entry: the ink at 7% over the paper, in the ink, its orange slot kept (workshopLook.css).\n current: '#e3ded4',\n onCurrent: '#1b1813',\n },\n // Hairlines, not 2px of ink: a section and a table's heads stand on the rule a row does.\n rules: { section: '#e6e1d8', head: '#e6e1d8' },\n chart: ['#2b2620', '#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#0e8fb0', '#a3510b', '#94a3b8'],\n },\n dark: {\n ground: '#121110',\n surface: '#1a1917',\n raised: '#24221f',\n ink: '#efe9de',\n inkMuted: '#c2b9aa',\n inkSubtle: '#a59c8d',\n line: '#2c2a26',\n lineStrong: '#6d6555',\n lineControl: '#7a7262',\n accentInk: '#efe9de',\n accentSoft: '#2a2723',\n primary: '#efe9de',\n link: '#efe9de',\n status: { good: '#4ade80', warning: '#fbbf24', critical: '#f87171', info: '#91a8ff' },\n nav: {\n ground: '#0f0e0d',\n ink: '#efe9de',\n muted: '#b3aa9b',\n line: '#24221f',\n accent: '#efe9de',\n // The ink at 10% over the menu's ground, not the inverted cream block, which was the brightest thing on a\n // screen at night.\n current: '#252422',\n onCurrent: '#efe9de',\n },\n rules: { section: '#2c2a26', head: '#2c2a26' },\n chart: ['#d9d0c0', '#9a78ec', '#12a678', '#c88317', '#e0559b', '#1597b9', '#d26b3b', '#6b7694'],\n },\n },\n shape: {\n radius: { control: '2px', field: '2px', pill: '2px', panel: '2px' },\n elevation: 'flat',\n border: { panel: '1px', rule: '1px' },\n },\n type: {\n font: { ui: BARLOW, data: BARLOW, heading: BARLOW_CONDENSED, figures: FIGURES },\n base: '14px',\n roles: {\n // A page still names itself in the workshop's voice, the condensed bold, in sentence case.\n title: { face: 'heading', size: '28px', weight: 700, case: 'none', tracking: '0em', leading: 1.15 },\n heading: { face: 'heading', size: '23px', weight: 700, case: 'none', tracking: '0em' },\n section: { face: 'ui', size: '15px', weight: 600, case: 'none', tracking: '0em' },\n // A step under the base, in the semibold the look already ships: Barlow comes at 400 and 600 only, so a 500\n // drew at 400, as loud as the values under it. The muted ink (parts below) keeps the 600 quieter than a value.\n label: { face: 'ui', size: '12px', weight: 600, case: 'none', tracking: '0em' },\n data: { features: ['tnum'] },\n figure: { face: 'heading', size: '38px', weight: 700, features: ['tnum'] },\n nav: { weight: 500 },\n },\n },\n surface: { nav: { kind: 'grain' } },\n // Compact, as the other looks: see Mono's density.\n density: 'compact',\n rhythm: 'house',\n recipes: {\n nav: 'slot',\n bar: 'ruled',\n tabs: 'rule',\n windows: 'segmented',\n // One divided strip of figures, not a 2px ink rule over each.\n stat: 'divided',\n section: 'open',\n fields: 'open',\n table: 'open',\n status: 'dot',\n board: 'ruled',\n chart: 'plain',\n buttons: 'keyed',\n // A filter not yet asked for is a key on a solid edge, as the search beside it is, not a dashed place.\n filters: 'solid',\n links: 'plain',\n rules: 'hairline',\n avatar: 'plain',\n workflow: 'markers',\n banner: 'plain',\n steps: 'strip',\n lanes: 'tag',\n // The paper under a page's head: the frame reaches the title, tabs and filters, and the rows start on white.\n header: 'band',\n },\n },\n {\n // Flat, calm and modern, with character in its details: a warm, faintly\n // tinted shell around white working surfaces, elevation only on what\n // floats, one confident accent for the primary action, the current room,\n // selection, focus, the main chart series and the current step; metrics\n // in a divided strip, fields in a property rail, tables on hairlines\n // anchored on the record's name, statuses as a dot and their word, a\n // workflow as a track of segments, charts as a line in one hue's steps\n // (lumenLook.css; docs/design.md, Lumen, for its exceptions). The chart\n // palette keeps blue, violet, green, amber and pink at steps the dataviz\n // checks pass, light and dark. Inter, shipped with the look. Its own\n // blue is Cobalt; every other palette changes the accent family only —\n // grounds, ink and structure stay Lumen's.\n id: 'lumen',\n label: 'Lumen',\n defaultPalette: 'cobalt',\n colors: {\n light: {\n ground: '#ffffff',\n surface: '#ffffff',\n raised: '#f5f4f2',\n ink: '#1c1a17',\n inkMuted: '#5c5852',\n inkSubtle: '#726c64',\n line: '#ebe8e4',\n lineStrong: '#8f8a83',\n lineControl: '#8f8a83',\n primary: '#1c1a17',\n onPrimary: '#ffffff',\n status: {\n good: '#127a40',\n warning: '#a65308',\n critical: '#c52a2a',\n info: '#2d4fd6',\n },\n nav: {\n ground: '#fbfaf9',\n ink: '#1c1a17',\n muted: '#5c5852',\n line: '#ebe8e4',\n },\n rules: {\n section: '#ebe8e4',\n head: '#ebe8e4',\n },\n chart: ['#2557e0', '#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#0e8fb0', '#a3510b', '#94a3b8'],\n },\n dark: {\n ground: '#121110',\n surface: '#161514',\n raised: '#201f1d',\n ink: '#eeece8',\n inkMuted: '#b8b3ab',\n inkSubtle: '#9f9a92',\n line: '#2d2b27',\n lineStrong: '#726d65',\n lineControl: '#726d65',\n primary: '#eeece8',\n onPrimary: '#121110',\n status: {\n good: '#4ade80',\n warning: '#fbbf24',\n critical: '#f87171',\n info: '#91a8ff',\n },\n nav: {\n ground: '#141312',\n ink: '#eeece8',\n muted: '#aaa59d',\n line: '#262422',\n },\n rules: {\n section: '#2d2b27',\n head: '#2d2b27',\n },\n chart: ['#3559e6', '#9a78ec', '#12a678', '#c88317', '#e0559b', '#1597b9', '#d26b3b', '#6b7694'],\n },\n },\n /* `pill` is said in every look: an App's stylesheet may read var(--pill-radius) (check accepts it), and a look that left it\n unsaid gave that rule no value and square corners. Round is what the sheets draw a tag as already. */\n shape: { radius: { control: '8px', field: '8px', pill: 'round' }, elevation: 'raised', border: { rule: '1px' } },\n /* The page's name anchors it: 28px, tight; a list's name a step under, and a section's heading 16px, so the\n page reads title, section, row at a glance. On a flat page the type is the hierarchy the boxes used to be. */\n type: {\n font: { ui: INTER, data: INTER, heading: INTER, figures: FIGURES },\n roles: {\n title: { size: '28px', weight: 600, tracking: '-0.02em' },\n heading: { size: '24px', tracking: '-0.018em' },\n section: { size: '16px', weight: 600, tracking: '-0.01em' },\n },\n },\n density: 'compact',\n recipes: {\n nav: 'pill',\n bar: 'airy',\n tabs: 'underline',\n windows: 'lifted',\n stat: 'divided',\n section: 'open',\n fields: 'rail',\n table: 'quiet',\n status: 'quiet',\n board: 'strip',\n chart: 'line',\n buttons: 'raised',\n filters: 'quiet',\n rules: 'hairline',\n avatar: 'round',\n workflow: 'markers',\n banner: 'plain',\n steps: 'strip',\n },\n },\n {\n // Black and white, and structure: square corners, rules in the ink over\n // grey hairlines, stat figures and labels in a monospace\n // (themeFamilies.css), the current tab inverted, colour left to status.\n // Data stays in the sans, as in every look.\n id: 'mono',\n label: 'Mono',\n defaultPalette: 'ink',\n colors: {\n light: {\n ground: '#ffffff',\n surface: '#ffffff',\n raised: '#f2f2f2',\n ink: '#000000',\n inkMuted: '#333333',\n inkSubtle: '#555555',\n line: '#d4d4d4',\n lineStrong: '#000000',\n lineControl: '#000000',\n accentSoft: '#ebebeb',\n status: {\n good: '#0a6b3a',\n warning: '#7a5200',\n critical: '#b3261e',\n info: '#0a4fc2',\n },\n nav: {\n ground: '#ffffff',\n ink: '#000000',\n muted: '#333333',\n line: '#000000',\n },\n chart: ['#000000', '#6b6b6b', '#333333', '#8e8e8e', '#505050', '#a8a8a8', '#1c1c1c', '#c8c8c8'],\n },\n dark: {\n ground: '#000000',\n surface: '#0a0a0a',\n raised: '#161616',\n ink: '#ffffff',\n inkMuted: '#d0d0d0',\n inkSubtle: '#a8a8a8',\n line: '#3a3a3a',\n lineStrong: '#ffffff',\n lineControl: '#ffffff',\n accentSoft: '#262626',\n status: {\n good: '#6fdc9c',\n warning: '#f2c94c',\n critical: '#ff8a80',\n info: '#8fb8ff',\n },\n nav: {\n ground: '#000000',\n ink: '#ffffff',\n muted: '#bdbdbd',\n line: '#ffffff',\n },\n chart: ['#ffffff', '#8a8a8a', '#cccccc', '#6a6a6a', '#a8a8a8', '#4a4a4a', '#e6e6e6', '#333333'],\n },\n },\n shape: { radius: { control: '0px', field: '0px', pill: 'round' }, elevation: 'flat' },\n /* Figures and the labels that make the look in the platform's monospace, the labels and the bar's entries in\n capitals: not data, which a reader who wants monospace picks in Preferences. */\n type: {\n font: { ui: HELVETICA, data: HELVETICA, heading: HELVETICA, figures: FIGURES },\n roles: {\n title: { size: '30px', weight: 700 },\n label: { face: 'code', case: 'upper' },\n nav: { face: 'code', case: 'upper' },\n figure: { face: 'code', weight: 700 },\n },\n },\n /* Compact, as Lumen: these looks' comfortable cut zooms by 1.12, and a wide list (Lintel's rent roll at a 1280px\n desk) then overflowed sideways. A reader's own density still wins. */\n density: 'compact',\n recipes: { nav: 'inverted', bar: 'ruled', tabs: 'inverted', stat: 'framed', links: 'underline' },\n },\n {\n // A soft workspace, recreated as it is from a reference the maintainer\n // chose: warm cream grounds with the content on white panels (a soft\n // shadow, a larger radius), near-black ink for text and calls to action,\n // sage green for the charts and good news, a warm tint for what is chosen\n // and meaning in soft tinted pills (sageLook.css; docs/design.md,\n // Sage, for its exceptions). The one look whose content ground is warm.\n id: 'sage',\n label: 'Sage',\n defaultPalette: 'ink',\n colors: {\n light: {\n ground: '#f4f2ec',\n surface: '#fdfcf9',\n raised: '#efece5',\n ink: '#1f2320',\n inkMuted: '#484d48',\n inkSubtle: '#5d625c',\n line: '#e6e2d8',\n lineStrong: '#837e72',\n lineControl: '#837e72',\n accentSoft: '#ebe8df',\n status: {\n good: '#23784a',\n warning: '#8f5800',\n critical: '#b83a2c',\n info: '#2f5fa3',\n },\n /* The menu is a panel on the cream page, as a section is: white beside the\n page, and a bar that holds the menu (placement top) white above it. */\n nav: {\n ground: '#fdfcf9',\n ink: '#1f2320',\n muted: '#565b55',\n line: '#e6e2d8',\n },\n // Ordered so neighbors differ for a red-green reader too (themeCheck.ts), and with one green among the\n // first four: a second green and a teal there made a five-way breakdown read as three. The dark series\n // are the same hues in the same order, so a series keeps its color across modes.\n chart: ['#3a8560', '#7b61c4', '#c4573f', '#b25c8c', '#a8781f', '#2f8f89', '#3f76c2', '#8a8578'],\n },\n dark: {\n ground: '#141613',\n surface: '#1b1e1a',\n raised: '#242822',\n ink: '#f1f0ea',\n inkMuted: '#cdcbc2',\n inkSubtle: '#aaa89f',\n line: '#323630',\n lineStrong: '#7d8277',\n lineControl: '#7d8277',\n accentSoft: '#2a2d27',\n status: {\n good: '#72d59c',\n warning: '#efc26a',\n critical: '#f28d7f',\n info: '#92b8f2',\n },\n nav: {\n ground: '#1b1e1a',\n ink: '#f1f0ea',\n muted: '#aaa89f',\n line: '#2a2e28',\n },\n chart: ['#7fd1a0', '#c4b1f2', '#f2a08a', '#f08cc4', '#ecc36e', '#6fd1c8', '#92b8f2', '#8c887f'],\n },\n },\n shape: { radius: { control: '8px', field: '8px', pill: 'round' }, elevation: 'soft' },\n type: { font: { ui: SANS, data: SANS, heading: SANS, figures: FIGURES }, roles: { title: { weight: 600 } } },\n // Compact, as Mono and Lumen: see Mono's density.\n density: 'compact',\n recipes: {\n nav: 'quiet',\n bar: 'soft',\n tabs: 'chosen',\n windows: 'chosen',\n stat: 'panel',\n section: 'panel',\n fields: 'panel',\n table: 'hairline',\n status: 'pill',\n board: 'soft',\n chart: 'wash',\n rules: 'hairline',\n avatar: 'large',\n // The head stands on one band of the surface, as its cards do on the warm ground.\n header: 'band',\n },\n },\n {\n // A bookkeeper's desk, ported from a field report's theme (it extended\n // Lumen; here it stands alone): every figure, id, date and label in a\n // monospace (IBM Plex Mono) so numbers line up down a page, with prose and\n // titles left in Inter. Green-tinted paper under a faint graph-paper\n // ground, field groups and dashboard sections as square ruled boxes in the\n // strong line, a table's column heads closed with a double rule as a\n // ledger closes a total (ledgerLook.css), and one deep ledger green for\n // the book's cover (the menu), the primary verb and links, with a gilt\n // mark for the current entry. By night the cover goes near-black green and\n // the same green is lifted to a mint that reads on it. A palette moves the\n // hue the reader's marks are drawn in (accent, links, the ring, the rules,\n // the first series) and leaves the paper and the cover the book's own.\n id: 'ledger',\n label: 'Ledger',\n defaultPalette: 'emerald',\n colors: {\n light: {\n ground: '#eef2ec',\n surface: '#fcfdfb',\n raised: '#eaf0ea',\n ink: '#0f1a14',\n inkMuted: '#44524a',\n inkSubtle: '#52605a',\n line: '#d3ddd5',\n lineStrong: '#7f8f85',\n lineControl: '#748479',\n onAccent: '#ffffff',\n accentInk: '#0f4d36',\n primary: '#0f4d36',\n status: { good: '#127a40', warning: '#a65308', critical: '#c52a2a', info: '#2d4fd6' },\n nav: {\n ground: '#103d2c',\n ink: '#e6efe9',\n muted: '#a9c2b4',\n line: '#1d4d3b',\n accent: '#e4cf8f',\n current: '#1c5640',\n onCurrent: '#ffffff',\n },\n rules: { section: '#0f4d36', head: '#0f4d36' },\n chart: ['#0f6b4a', '#9a6cf7', '#0e9a6c', '#d97706', '#e0428a', '#0e8fb0', '#a3510b', '#94a3b8'],\n },\n dark: {\n ground: '#0b1310',\n surface: '#111c17',\n raised: '#18251f',\n ink: '#e3ece6',\n inkMuted: '#afc0b6',\n inkSubtle: '#93a59a',\n line: '#1c2a23',\n lineStrong: '#587064',\n lineControl: '#66806f',\n onAccent: '#0b1310',\n accentInk: '#8fd1ae',\n primary: '#7cc4a0',\n status: { good: '#4ade80', warning: '#fbbf24', critical: '#f87171', info: '#91a8ff' },\n nav: {\n ground: '#08100c',\n ink: '#dfe9e3',\n muted: '#9fb3a7',\n line: '#18261f',\n accent: '#e0cd94',\n current: '#163a2b',\n onCurrent: '#ffffff',\n },\n rules: { section: '#6fb592', head: '#6fb592' },\n chart: ['#5fbf92', '#9a78ec', '#12a678', '#c88317', '#e0559b', '#1597b9', '#d26b3b', '#6b7694'],\n },\n },\n shape: {\n radius: { control: '2px', field: '0px', pill: '2px', panel: '0px' },\n elevation: 'flat',\n border: { panel: '1px', rule: '1px' },\n },\n type: {\n font: { ui: INTER, data: PLEX_MONO, heading: INTER, figures: FIGURES },\n roles: {\n title: { size: '26px', weight: 600, tracking: '-0.01em' },\n heading: { size: '20px', weight: 600, tracking: '-0.018em' },\n section: { face: 'data', size: '12px', weight: 500, case: 'upper', tracking: '0.08em' },\n label: { face: 'data', weight: 500, case: 'upper', tracking: '0.04em' },\n data: { features: ['tnum', 'zero'] },\n figure: { face: 'data', size: '30px', weight: 500, tracking: '-0.02em', features: ['tnum', 'zero'] },\n nav: { face: 'ui', weight: 400 },\n },\n },\n surface: { ground: { kind: 'grid' } },\n density: 'compact',\n recipes: {\n nav: 'wash',\n bar: 'dark',\n tabs: 'rule',\n windows: 'segmented',\n stat: 'divided',\n section: 'panel',\n fields: 'panel',\n table: 'hairline',\n status: 'quiet',\n board: 'ruled',\n chart: 'plain',\n buttons: 'accent',\n links: 'plain',\n rules: 'double',\n avatar: 'plain',\n workflow: 'markers',\n banner: 'plain',\n steps: 'strip',\n lanes: 'plain',\n header: 'plain',\n },\n },\n];\n\nexport const LOOKS: readonly ThemeSpec[] = HOUSE.map(withPalettes);\n","/**\n * A tenant's branding: what an App lets each of its customers say about how the\n * App looks to their people — a name, a logo, an accent, one of the App's\n * palettes or themes, a corner and a density — and never the grounds, the ink\n * or the recipes. The App declares the scope (`branding: { themes, allow }`);\n * a tenant admin saves a value in it; the server keeps it in the platform's\n * branding store and dresses that tenant's pages with it from the first paint.\n *\n * Shared by the server (which parses, validates and serves) and the Branding\n * block (which previews and says the refusal before the save does). The one\n * validator is themeCheck.ts; this file turns its findings into the fixed\n * sentences a person can act on.\n */\nimport type { ThemeDefinition, ThemeDensity, ThemePalette } from '@mistriwork/engine/schema/theme.js';\nimport { chartsApart, checkTheme, type ThemeProblem } from './themeCheck.js';\nimport { mixHex } from './themeBuild.js';\nimport { DENSITIES } from '@mistriwork/engine/shared/themeRecipes.js';\nimport { effectiveThemeDefinition, themePreset } from '@mistriwork/engine/shared/themePresets.js';\nimport { compileAppTheme } from './themeSpec.js';\nimport type { AppAuth, AppUi } from './appModel.js';\nimport { canonicalLocale } from '@mistriwork/engine/shared/appLocale.js';\nimport { audienceThemes as audienceThemeIds, resolveTheme, type ThemeAudiences } from '@mistriwork/engine/shared/themeResolve.js';\nimport { BARLOW, INTER } from '@mistriwork/engine/shared/themeLooks.js';\nimport { families } from '@mistriwork/engine/shared/themeFaces.js';\n\n/** What a tenant may change, when the App allows it. `preset` (the theme it starts from) needs more than one theme to\n * pick from, and names it as `ui.theme.preset` does. `font` is the face of the interface's text (`brandingFonts`). */\nconst BRANDING_KEYS = ['logo', 'name', 'accent', 'palette', 'radius', 'density', 'preset', 'font', 'locale'] as const;\nexport type BrandingKey = (typeof BRANDING_KEYS)[number];\n\n/** The App's declaration, parsed: its themes compiled (the first is the tenants' default), and the keys a tenant may set. */\nexport interface BrandingDeclaration {\n readonly themes: readonly ThemeDefinition[];\n readonly allow: readonly BrandingKey[];\n /** The tenant roles whose members may save it: a tenant's admins, by the App's own names for them. */\n readonly editors: readonly string[];\n /** `ui.theme.for`, and each theme it dresses an audience in, by id: a role's theme wins over the tenant's pick\n (themeResolve.ts), and the tenant's accent, name, logo, corner and density lay over it as over its own. */\n readonly audiences?: ThemeAudiences;\n readonly audienceThemes?: readonly ThemeDefinition[];\n}\n\n/** A tenant's saved branding. Every field is optional; an absent one is the App's. */\nexport interface TenantBrandingValue {\n /** The name the tenant's people see in the shell, the title and email. */\n readonly name?: string;\n /** The logo's content hash and served type (brandingLogo.ts); the bytes live in the branding store. */\n readonly logo?: { readonly hash: string; readonly type: string };\n /** The logo drawn on a dark bar or by night, where the light one would not read. Allowed with `logo`; the light logo\n stands where this is none. */\n readonly logoDark?: { readonly hash: string; readonly type: string };\n /** The tab icon (PNG, ICO or SVG), by content hash like the logo. Allowed with `logo`; the App's own icon stands where this is none. */\n readonly favicon?: { readonly hash: string; readonly type: string };\n /** One color for both grounds (mixed toward white on the dark one), or one for each. */\n readonly accent?: { readonly light: string; readonly dark: string };\n /** One of the theme's palettes. */\n readonly palette?: string;\n /** A control's corner, 0px to 8px. */\n readonly radius?: string;\n readonly density?: ThemeDensity;\n /** One of `branding.themes`, by id. */\n readonly preset?: string;\n /** The face the interface's text is set in: one of `brandingFonts`, by its family name. */\n readonly font?: string;\n /** The tenant's language and figures for its people whose own row names none (shared/appLocale.ts `resolveLocale`). */\n readonly locale?: string;\n}\n\nconst HEX = /^#[0-9a-f]{6}$/;\nconst isPlain = (raw: unknown): raw is Record<string, unknown> =>\n Boolean(raw) && typeof raw === 'object' && !Array.isArray(raw) && [Object.prototype, null].includes(Object.getPrototypeOf(raw));\n\n/**\n * The App's `branding` block, checked against the App it sits in: a tenant App\n * (`auth.rows: 'tenant'`), keys from the closed list, editors that are tenant\n * roles, and themes written with defineTheme or named as built-ins. Without\n * `themes` the tenants' one theme is the App's own look, its accent included.\n */\nexport function parseBrandingDeclaration(raw: unknown, app: { ui: AppUi; auth?: AppAuth }, where: string): BrandingDeclaration {\n const at = `${where}: branding`;\n if (!isPlain(raw)) throw new Error(`${at} must be an object: { allow: [...], editors: [...], themes?: [...] }.`);\n for (const key of Object.keys(raw))\n if (!['allow', 'editors', 'themes'].includes(key))\n throw new Error(`${at} has an unsupported field \"${key}\". It takes allow, editors and themes.`);\n if (app.auth?.rows !== 'tenant')\n throw new Error(`${at}: branding is chosen per tenant, so it needs a tenant App (auth.rows: 'tenant'). An App's own look is ui.theme.`);\n const custom = app.ui.customThemes ?? [];\n const taken = new Set(custom.map((theme) => theme.id));\n let themes: ThemeDefinition[];\n if (raw.themes === undefined) themes = [ownLook(app.ui)];\n else {\n if (!Array.isArray(raw.themes) || !raw.themes.length || raw.themes.length > 6)\n throw new Error(`${at}.themes must list one to six themes: defineTheme(...) results or built-in names.`);\n themes = raw.themes.map((spec: unknown, index: number) => {\n const here = `${at}.themes[${index}]`;\n if (typeof spec === 'string') {\n const preset = themePreset(spec);\n if (!preset) throw new Error(`${here} \"${spec}\" is not a built-in theme.`);\n return preset;\n }\n if (!isPlain(spec) || spec.kind !== 'theme')\n throw new Error(`${here} must be a theme written with defineTheme(...) or a built-in's name.`);\n /* The App's own theme, offered to its tenants too, is the one ui compiled, not a second copy. */\n const same = custom.find((theme) => theme.id === spec.id);\n if (same) return same;\n const theme = compileAppTheme(spec, here, taken);\n taken.add(theme.id);\n return theme;\n });\n if (new Set(themes.map((theme) => theme.id)).size !== themes.length) throw new Error(`${at}.themes names a theme twice.`);\n }\n if (!Array.isArray(raw.allow) || !raw.allow.length)\n throw new Error(`${at}.allow must list what a tenant may change: ${BRANDING_KEYS.join(', ')}.`);\n const allow: BrandingKey[] = [];\n for (const key of raw.allow) {\n if (key === 'theme') throw new Error(`${at}.allow has \"theme\", which is now \"preset\": which of branding.themes a tenant starts from.`);\n if (typeof key !== 'string' || !(BRANDING_KEYS as readonly string[]).includes(key))\n throw new Error(\n `${at}.allow has \"${String(key)}\"; a tenant may change only ${BRANDING_KEYS.join(', ')}. Grounds, ink and recipes stay the App's.`,\n );\n if (allow.includes(key as BrandingKey)) throw new Error(`${at}.allow names \"${key}\" twice.`);\n allow.push(key as BrandingKey);\n }\n if (allow.includes('preset') && themes.length < 2)\n throw new Error(`${at}.allow has \"preset\", which needs more than one theme in branding.themes to pick from.`);\n if (allow.includes('palette') && !themes.some((theme) => theme.palettes?.length))\n throw new Error(`${at}.allow has \"palette\", and no theme offered has a palette to pick.`);\n const roles = app.auth?.roles ?? {};\n if (!Array.isArray(raw.editors) || !raw.editors.length)\n throw new Error(`${at}.editors must name the tenant roles whose members may change it (a tenant's admins).`);\n const editors: string[] = [];\n for (const role of raw.editors) {\n const declared = typeof role === 'string' ? (roles as Record<string, { realm?: string }>)[role] : undefined;\n /* A role names no realm when it is the App's own, a tenant's; a platform-realm role is the provider's staff. */\n if (!declared || (declared.realm !== undefined && declared.realm !== 'tenant'))\n throw new Error(`${at}.editors has \"${String(role)}\", which is not a tenant role of auth.roles.`);\n if (!editors.includes(role as string)) editors.push(role as string);\n }\n const audiences = app.ui.theme?.for;\n const audienceThemes = audienceThemeIds(audiences).flatMap((id) => {\n const theme = custom.find((item) => item.id === id) ?? themePreset(id);\n return theme ? [theme] : [];\n });\n return Object.freeze({\n themes: Object.freeze(themes),\n allow: Object.freeze(allow),\n editors: Object.freeze(editors),\n ...(audiences ? { audiences, audienceThemes: Object.freeze(audienceThemes) } : {}),\n });\n}\n\n/**\n * A tenant's branding as one audience wears it: where `ui.theme.for` dresses a signed-out visitor or one of the\n * account's roles (themeResolve.ts), that theme replaces the tenant's pick and its palette, and the tenant's accent,\n * name, logo, corner and density lay over it; otherwise the tenant's own, as saved.\n */\nexport function audienceBranding(\n declaration: BrandingDeclaration,\n value: TenantBrandingValue,\n audience: { public?: boolean; roles?: readonly string[] },\n): { declaration: BrandingDeclaration; value: TenantBrandingValue } {\n const themes = declaration.audienceThemes ?? [];\n const worn = resolveTheme({ ...audience, for: declaration.audiences, offered: (id) => themes.some((theme) => theme.id === id) });\n if (worn.source !== 'public' && worn.source !== 'role') return { declaration, value };\n const { palette: _palette, ...rest } = value;\n return { declaration: { ...declaration, themes: themes.filter((theme) => theme.id === worn.id) }, value: { ...rest, preset: worn.id } };\n}\n\n/** The App's look as one theme: its preset or its own theme, with its accent laid over as a tenant's would be. */\nfunction ownLook(ui: AppUi): ThemeDefinition {\n const preset = ui.theme?.preset;\n const base = ui.customThemes?.find((theme) => theme.id === preset) ?? themePreset(preset) ?? themePreset('workshop')!;\n const accent = ui.theme?.accent;\n const value: TenantBrandingValue = {\n ...(ui.theme?.palette && ui.theme.palette !== 'default' ? { palette: ui.theme.palette } : {}),\n ...(typeof accent === 'string' && HEX.test(accent.toLowerCase())\n ? { accent: { light: accent.toLowerCase(), dark: mixHex(accent.toLowerCase(), '#ffffff', 0.62) } }\n : typeof accent === 'object' && HEX.test(accent.light.toLowerCase()) && HEX.test(accent.dark.toLowerCase())\n ? { accent: { light: accent.light.toLowerCase(), dark: accent.dark.toLowerCase() } }\n : {}),\n };\n if (!value.accent && !value.palette) return base;\n const theme = tenantTheme({ themes: [base], allow: [], editors: [] }, value);\n return { ...theme, id: base.id, label: base.label };\n}\n/** A face a tenant may set its interface in: the family it is named by, and the stack that draws it. */\ninterface BrandingFont {\n readonly id: string;\n readonly stack: string;\n}\n\n/** The faces the kit ships for an interface (Inter, Lumen's; Barlow, Workshop's), each with the stack that cuts Arial to\n its measure while it arrives (interFace.css, barlowFace.css: sheets of their own, so a tenant's pick brings its declaration and not a whole look). */\nconst KIT_FONTS: readonly BrandingFont[] = Object.freeze([\n { id: 'Inter', stack: INTER },\n { id: 'Barlow', stack: BARLOW },\n]);\nconst GENERIC_SANS = 'ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif';\n\n/**\n * The closed set of faces a tenant may pick for its interface: the kit's own, then each family a theme of\n * `branding.themes` ships (`type.faces`), under the stack that theme draws it with where one leads with it. Nothing\n * else: a tenant names a face, never a stack or a file.\n */\nexport function brandingFonts(\n declaration: Pick<BrandingDeclaration, 'themes'>,\n): readonly { readonly id: string; readonly stack: string }[] {\n const out = [...KIT_FONTS];\n for (const theme of declaration.themes)\n for (const face of theme.faces ?? []) {\n if (out.some((font) => font.id.toLowerCase() === face.family.toLowerCase())) continue;\n const own = [theme.fonts?.ui, theme.fonts?.data, theme.fonts?.heading].find(\n (stack) => stack && families(stack)[0]?.toLowerCase() === face.family.toLowerCase(),\n );\n out.push({ id: face.family, stack: own ?? `\"${face.family}\", ${GENERIC_SANS}` });\n }\n return out;\n}\n\nconst RADIUS = /^(?:[0-7]|8)px$/;\nconst SLUG = /^[a-z][a-z0-9-]{0,47}$/;\n\n/** Why a save was refused: the field and a sentence that says what to do. */\nexport interface BrandingRefusal {\n readonly field: BrandingKey;\n readonly message: string;\n}\n\nexport class BrandingRefused extends Error {\n readonly refusals: readonly BrandingRefusal[];\n constructor(refusals: readonly BrandingRefusal[]) {\n super(refusals.map((refusal) => refusal.message).join(' '));\n this.name = 'BrandingRefused';\n this.refusals = refusals;\n }\n}\n\nfunction plain(raw: unknown): Record<string, unknown> {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw) || ![Object.prototype, null].includes(Object.getPrototypeOf(raw)))\n throw new BrandingRefused([{ field: 'name', message: 'Branding is a set of named fields.' }]);\n return raw as Record<string, unknown>;\n}\n\n/**\n * A tenant's value checked field by field against the App's declaration: a key\n * the App does not allow, or a value outside its type, is refused with the field\n * named. Colours are lowercase six-digit hex; nothing here reaches CSS before it\n * has matched one of these patterns.\n */\nexport function parseTenantBranding(raw: unknown, declaration: BrandingDeclaration): TenantBrandingValue {\n const input = plain(raw);\n const refusals: BrandingRefusal[] = [];\n const allowed = new Set<string>(declaration.allow);\n const out: { -readonly [K in keyof TenantBrandingValue]: TenantBrandingValue[K] } = {};\n for (const [key, value] of Object.entries(input)) {\n if (value === undefined || value === null) continue;\n if (\n !(BRANDING_KEYS as readonly string[]).includes(key === 'logoDark' || key === 'favicon' ? 'logo' : key) ||\n !allowed.has(key === 'logoDark' || key === 'favicon' ? 'logo' : key)\n ) {\n refusals.push({ field: 'name', message: `This App does not let a customer change \"${key}\".` });\n continue;\n }\n switch (key as BrandingKey | 'logoDark' | 'favicon') {\n case 'name':\n // eslint-disable-next-line no-control-regex -- a name is one line of text\n if (typeof value !== 'string' || !value.trim() || value.trim().length > 80 || /[\\u0000-\\u001f\\u007f<>]/.test(value))\n refusals.push({ field: 'name', message: 'The name must be one line of at most 80 characters, without < or >.' });\n else out.name = value.trim();\n break;\n case 'logo':\n case 'logoDark': {\n const logo = typeof value === 'object' ? (value as Record<string, unknown>) : {};\n if (\n typeof logo.hash !== 'string' ||\n !/^[0-9a-f]{64}$/.test(logo.hash) ||\n typeof logo.type !== 'string' ||\n !/^image\\/(png|jpeg|webp|gif|svg\\+xml)$/.test(logo.type)\n )\n refusals.push({\n field: 'logo',\n message:\n key === 'logo'\n ? 'Upload the logo again: the saved one was not recognized.'\n : 'Upload the dark logo again: the saved one was not recognized.',\n });\n else out[key as 'logo' | 'logoDark'] = { hash: logo.hash, type: logo.type };\n break;\n }\n case 'favicon': {\n const icon = typeof value === 'object' ? (value as Record<string, unknown>) : {};\n if (\n typeof icon.hash !== 'string' ||\n !/^[0-9a-f]{64}$/.test(icon.hash) ||\n typeof icon.type !== 'string' ||\n !/^image\\/(png|svg\\+xml|x-icon)$/.test(icon.type)\n )\n refusals.push({ field: 'logo', message: 'Upload the tab icon again: the saved one was not recognized.' });\n else out.favicon = { hash: icon.hash, type: icon.type };\n break;\n }\n case 'accent': {\n /* One color is for the light ground; the dark one is derived from it once the theme it will stand in is\n known, below. */\n const one = typeof value === 'string' ? value.trim().toLowerCase() : '';\n const pair = HEX.test(one) ? { light: one, dark: one } : typeof value === 'object' ? (value as Record<string, unknown>) : {};\n const light = typeof pair.light === 'string' ? pair.light.trim().toLowerCase() : '';\n const dark = typeof pair.dark === 'string' ? pair.dark.trim().toLowerCase() : '';\n if (!HEX.test(light) || !HEX.test(dark)) refusals.push({ field: 'accent', message: 'The accent must be a color like #1d4ed8.' });\n else out.accent = { light, dark };\n break;\n }\n case 'palette':\n if (typeof value !== 'string' || !SLUG.test(value))\n refusals.push({ field: 'palette', message: 'Pick one of the palettes offered.' });\n else out.palette = value;\n break;\n case 'radius':\n if (typeof value !== 'string' || !RADIUS.test(value))\n refusals.push({ field: 'radius', message: 'The corner must be between 0px and 8px.' });\n else out.radius = value;\n break;\n case 'density':\n if (!(DENSITIES as readonly unknown[]).includes(value))\n refusals.push({ field: 'density', message: 'Pick compact, comfortable or spacious.' });\n else out.density = value as ThemeDensity;\n break;\n case 'preset':\n if (typeof value !== 'string' || !declaration.themes.some((theme) => theme.id === value))\n refusals.push({ field: 'preset', message: 'Pick one of the themes offered.' });\n else out.preset = value;\n break;\n case 'font':\n if (typeof value !== 'string' || !brandingFonts(declaration).some((font) => font.id === value))\n refusals.push({ field: 'font', message: 'Pick one of the fonts offered.' });\n else out.font = value;\n break;\n case 'locale': {\n const tag = canonicalLocale(value);\n if (!tag) refusals.push({ field: 'locale', message: 'Pick a language like \"en-US\" or \"es-MX\".' });\n else out.locale = tag;\n break;\n }\n }\n }\n if (out.accent && typeof input.accent === 'string') out.accent = accentFor(declaration, out, out.accent.light);\n if (out.palette !== undefined) {\n const theme = themeOf(declaration, out.preset);\n if (out.palette !== 'default' && !theme.palettes?.some((palette) => palette.id === out.palette))\n refusals.push({ field: 'palette', message: 'Pick one of the palettes offered.' });\n }\n if (refusals.length) throw new BrandingRefused(refusals);\n return out;\n}\n\nfunction themeOf(declaration: BrandingDeclaration, id: string | undefined): ThemeDefinition {\n return declaration.themes.find((theme) => theme.id === id) ?? declaration.themes[0]!;\n}\n\n/** The roles an accent stands for where the theme already wore its accent: the link, the menu's current room, and a form's\n primary action (Workshop, Mono and Sage fill it with their accent, so a tenant's teal left every Submit in the look's own). */\nconst FOLLOWS_ACCENT = ['link', 'navAccent', 'primary'] as const;\n\n/**\n * The theme a tenant's people wear: the App's chosen theme and palette, with the\n * tenant's accent laid over the roles that were that accent, and its corner and\n * density. Grounds, ink, lines and recipes are the App's and stay so.\n */\nexport function tenantTheme(declaration: BrandingDeclaration, value: TenantBrandingValue): ThemeDefinition {\n const chosen = themeOf(declaration, value.preset);\n const base = effectiveThemeDefinition(chosen, value.palette ?? chosen.defaultPalette);\n const mode = (name: 'light' | 'dark'): ThemePalette => {\n const palette = { ...base[name] };\n const accent = value.accent?.[name];\n if (!accent) return palette;\n const primaryFollows = palette.primary !== undefined && palette.primary === palette.accent;\n for (const role of FOLLOWS_ACCENT) if (palette[role] === palette.accent) palette[role] = accent;\n /* The words on the primary action were chosen for its old fill: derived again for this one, and held to 4.5:1 on it\n with the rest (accentFindings), as the words on the accent are. */\n if (primaryFollows) delete palette.onPrimary;\n /* The first chart series is the brand's, whatever the theme drew it in: Lumen's navy accent beside its blue\n first series left a tenant's teal on the bar and its charts blue, and the form says the accent colors them.\n Unless that would set it beside the second series for a color-blind reader: then the theme's own first\n series stays, as it did, and an accent that was already the first series is still held to the check. */\n if (palette.chart1 === palette.accent || !palette.chart2 || chartsApart(accent, palette.chart2)) palette.chart1 = accent;\n palette.accent = accent;\n /* The words a look chose for its own accent fill (Workshop's ink on its orange) read on that fill, not this one:\n they are derived again for the tenant's, as for an App's accent (themePresets.ts, overlayPalette). */\n delete palette.onAccent;\n /* A tenant picks one color, and it must read as text on the page: `accentInk` said, so the check holds the pick\n to it where an App's theme, which names its inks, is given the one that reads. */\n palette.accentInk = accent;\n palette.focus = accent;\n /* The selected item's tint: as faint as the built-ins draw theirs (Lumen's is about 8% on white), so the accent still reads on it. */\n palette.accentSoft = mixHex(accent, palette.surface, name === 'light' ? 0.08 : 0.2);\n return palette;\n };\n const { palettes: _palettes, defaultPalette: _default, ...rest } = base;\n const font = value.font ? brandingFonts(declaration).find((candidate) => candidate.id === value.font) : undefined;\n /* The face's files come with it: the chosen theme's own, and any another theme of the declaration ships under that family. */\n const faces = font\n ? [...(rest.faces ?? [])].concat(\n declaration.themes\n .filter((theme) => theme !== chosen)\n .flatMap((theme) => (theme.faces ?? []).filter((face) => face.family.toLowerCase() === font.id.toLowerCase())),\n )\n : undefined;\n return {\n ...rest,\n ...(font ? { fonts: { ...rest.fonts, ui: font.stack }, ...(faces?.length ? { faces } : {}) } : {}),\n id: 'tenant',\n startedFrom: chosen.id,\n label: value.name ?? chosen.label,\n light: mode('light'),\n dark: mode('dark'),\n ...(value.radius ? { radius: { control: value.radius, field: value.radius } } : {}),\n ...(value.density ? { density: value.density } : {}),\n };\n}\n\n/**\n * The one validator over the theme a tenant would wear, holding against the\n * tenant only the colors its accent changed, said in a fixed sentence per\n * kind of failure — the person saving picked a color, not a token.\n */\nexport function brandingProblems(declaration: BrandingDeclaration, value: TenantBrandingValue): BrandingRefusal[] {\n const problems = wornFindings(declaration, value);\n const seen = new Set<string>();\n const refusals: BrandingRefusal[] = [];\n for (const [problem, worn] of problems) {\n const message = worn ? sentence(problem).replace(/\\.$/, ` in ${worn}, which some of your people wear.`) : sentence(problem);\n if (seen.has(message)) continue;\n seen.add(message);\n refusals.push({ field: 'accent', message });\n }\n return refusals;\n}\n\n/** The findings on every theme the tenant's accent is worn over: its own pick, and each theme an audience wears\n (ui.theme.for), which the tenant did not pick and so is named beside a failure there. */\nfunction wornFindings(declaration: BrandingDeclaration, value: TenantBrandingValue): (readonly [ThemeProblem, string])[] {\n const { palette: _palette, ...over } = value;\n return [\n ...accentFindings(declaration, value).map((problem) => [problem, ''] as const),\n ...(declaration.audienceThemes ?? [])\n .filter((theme) => theme.id !== themeOf(declaration, value.preset).id)\n .flatMap((theme) =>\n accentFindings({ ...declaration, themes: [theme] }, { ...over, preset: theme.id }).map(\n (problem) => [problem, theme.label] as const,\n ),\n ),\n ];\n}\n\n/** The validator's findings against the colors the tenant's accent changed. */\nfunction accentFindings(declaration: BrandingDeclaration, value: TenantBrandingValue): ThemeProblem[] {\n if (!value.accent) return [];\n const chosen = themeOf(declaration, value.preset);\n const before = effectiveThemeDefinition(chosen, value.palette ?? chosen.defaultPalette);\n const after = tenantTheme(declaration, value);\n const changed = (_palette: string, mode: 'light' | 'dark', role: keyof ThemePalette) => before[mode][role] !== after[mode][role];\n return checkTheme({ ...after, palettes: undefined }, { authored: changed });\n}\n\n/**\n * One brand color for both grounds. The dark theme's accent starts where an\n * App's own does, the color mixed 62% toward white, and where that still reads\n * too dark there — a deep brand blue such as #1d4ed8 on its own tint, in Lumen\n * or Sage by night — it is lifted in OKLCH lightness, its hue and as much of\n * its chroma as sRGB holds kept, until the validator passes it: the brand\n * stays recognisably the brand rather than the save being refused. A color no\n * lift makes readable keeps the plain mix, and the validator says why.\n */\nexport function accentFor(\n declaration: BrandingDeclaration,\n value: TenantBrandingValue,\n light: string,\n): { readonly light: string; readonly dark: string } {\n const start = mixHex(light, '#ffffff', 0.62);\n const darkOk = (dark: string) => !wornFindings(declaration, { ...value, accent: { light, dark } }).some(([p]) => p.mode === 'dark');\n if (darkOk(start)) return { light, dark: start };\n const [l, c, h] = oklch(start);\n for (let lift = l + 0.02; lift <= 0.96; lift += 0.02) {\n const dark = fromOklch(lift, c, h);\n if (darkOk(dark)) return { light, dark };\n }\n return { light, dark: start };\n}\n\n/* OKLab (Björn Ottosson), polar: lightness 0 to 1, chroma, hue in radians. */\nfunction oklch(hex: string): [number, number, number] {\n const [r, g, b] = [1, 3, 5].map((at) => {\n const v = parseInt(hex.slice(at, at + 2), 16) / 255;\n return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n }) as [number, number, number];\n const lms = [\n Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b),\n Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b),\n Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b),\n ] as const;\n const L = 0.2104542553 * lms[0] + 0.793617785 * lms[1] - 0.0040720468 * lms[2];\n const A = 1.9779984951 * lms[0] - 2.428592205 * lms[1] + 0.4505937099 * lms[2];\n const B = 0.0259040371 * lms[0] + 0.7827717662 * lms[1] - 0.808675766 * lms[2];\n return [L, Math.hypot(A, B), Math.atan2(B, A)];\n}\n\n/** A lightness, chroma and hue as hex, the chroma eased down until the color is one sRGB can show. */\nfunction fromOklch(l: number, c: number, h: number): string {\n for (let chroma = c; ; chroma = Math.max(0, chroma - 0.005)) {\n const a = chroma * Math.cos(h),\n b = chroma * Math.sin(h);\n const lms = [\n l + 0.3963377774 * a + 0.2158037573 * b,\n l - 0.1055613458 * a - 0.0638541728 * b,\n l - 0.0894841775 * a - 1.291485548 * b,\n ].map((v) => v ** 3) as [number, number, number];\n const rgb = [\n 4.0767416621 * lms[0] - 3.3077115913 * lms[1] + 0.2309699292 * lms[2],\n -1.2684380046 * lms[0] + 2.6097574011 * lms[1] - 0.3413193965 * lms[2],\n -0.0041960863 * lms[0] - 0.7034186147 * lms[1] + 1.707614701 * lms[2],\n ];\n if (chroma === 0 || rgb.every((v) => v >= -1e-4 && v <= 1 + 1e-4))\n return `#${rgb\n .map((v) => {\n const x = Math.min(1, Math.max(0, v));\n return Math.round((x <= 0.0031308 ? 12.92 * x : 1.055 * x ** (1 / 2.4) - 0.055) * 255)\n .toString(16)\n .padStart(2, '0');\n })\n .join('')}`;\n }\n}\n\n/** A finding as the person who picked the color would say it. */\nfunction sentence(problem: ThemeProblem): string {\n const light = problem.mode === 'light';\n const ground = light ? 'white' : 'the dark background';\n if (problem.token.startsWith('chart'))\n return `This accent is too close to the next chart color for color-blind readers in the ${problem.mode} theme. Pick a color further from it.`;\n if (problem.token === 'nav.accent') return `This accent is too ${light ? 'light' : 'dark'} on the menu in the ${problem.mode} theme.`;\n if (problem.token === 'focus' || /focus ring/.test(problem.reason))\n return `This accent is too ${light ? 'light' : 'dark'} on ${ground} for the keyboard focus ring.`;\n if (/selected tab|accentSoft/.test(problem.reason))\n return `This accent is too ${light ? 'light' : 'dark'} to read on its own tint (a selected item) in the ${problem.mode} theme.`;\n if (problem.token === 'link') return `This accent is too ${light ? 'light' : 'dark'} on ${ground} for links.`;\n return `This accent is too ${light ? 'light' : 'dark'} on ${ground} for buttons.`;\n}\n\n/** Everything a save must clear: the value's shape, then the validator. Throws BrandingRefused. */\nexport function validateTenantBranding(raw: unknown, declaration: BrandingDeclaration): TenantBrandingValue {\n const value = parseTenantBranding(raw, declaration);\n const problems = brandingProblems(declaration, value);\n if (problems.length) throw new BrandingRefused(problems);\n return value;\n}\n","/** What BrandingForm says, in the dashboards room (packages/kit/src/client/messages.ts says how the catalog is split). */\nimport { defineMessages } from '@mistriwork/kit/client/messages.js';\n\nexport const say = defineMessages({\n loading: 'Loading branding…',\n couldNotLoad: 'Branding could not be loaded.',\n readOnly: \"Only this organization's admins can change its branding.\",\n name: 'Name',\n nameHint: 'What your people see in the bar, the tab and email.',\n logo: 'Logo',\n logoHint: 'PNG, JPEG, WebP or GIF up to 256 KB, or an SVG up to 64 KB with its text as outlines. Drawn 96 by 24 pixels.',\n chooseLogo: 'Choose a file',\n removeLogo: 'Remove',\n noLogo: 'No logo: the name stands alone.',\n darkLogo: 'For a dark bar',\n darkLogoHint: 'Optional. Drawn on a dark bar and by night; the logo above stands where there is none.',\n noDarkLogo: 'None: the logo above is used.',\n favicon: 'Tab icon',\n faviconHint: 'Optional. A PNG, ICO or SVG up to 64 KB. The tab shows it on your pages; the App’s own icon stands where there is none.',\n noFavicon: 'None: the App’s icon is used.',\n accent: 'Accent',\n accentHint: 'Buttons, links, the current page and the first chart series.',\n accentColor: 'Accent color',\n palette: 'Palette',\n theme: 'Theme',\n corner: 'Corners',\n square: 'Square',\n density: 'Density',\n compact: 'Compact',\n comfortable: 'Comfortable',\n spacious: 'Spacious',\n font: 'Font',\n appDefault: 'The App’s',\n save: 'Save',\n saving: 'Saving…',\n reset: 'Undo changes',\n saved: 'Saved. Your people see it on their next page.',\n couldNotSave: 'The branding could not be saved.',\n preview: 'Preview',\n previewShell: 'The bar',\n previewRecord: 'A record',\n previewStat: 'A figure',\n previewEmail: 'An email',\n /* Only where the App has no name to lend: the preview's record is called by the App's own name (BrandingForm.tsx). */\n sampleRecord: 'Sample record',\n sampleStatus: 'Active',\n sampleAction: 'Assign',\n sampleStat: 'Open requests',\n sampleNav: 'Requests',\n sampleOther: 'Accounts',\n sampleEmailLine: 'Your request #1042 has an update.',\n sampleEmailButton: 'View request',\n});\n","/**\n * A tenant's own Branding form: what the App's `branding.allow` lets its admins\n * change, beside a live preview of what their people will see — the bar, a\n * record's head, a figure and an email's header. The preview and the refusals\n * are the save's own (shared/tenantBranding.ts): what this form says before\n * Save is what the server would say after it. Members who are not the App's\n * `branding.editors` see the same form, read-only.\n *\n * Every color reaches the page through a custom property set from a value\n * that already matched `#rrggbb`; a logo is drawn from its own object URL\n * while unsaved, and from the App's logo address once saved.\n */\nimport { useEffect, useMemo, useRef, useState, type CSSProperties, type ChangeEvent } from 'react';\nimport type { ThemeDefinition, ThemeDensity } from '@mistriwork/engine/schema/theme.js';\nimport {\n accentFor,\n brandingFonts,\n brandingProblems,\n tenantTheme,\n type BrandingKey,\n type BrandingRefusal,\n type TenantBrandingValue,\n} from '../../shared/tenantBranding.js';\nimport { api } from '@mistriwork/kit/client/core.js';\nimport { served } from '@mistriwork/kit/client/addressMount.js';\nimport { activeApp } from '../appState.js';\nimport { Button } from '@mistriwork/ui/Button.js';\nimport { Dropdown } from '@mistriwork/kit/client/components/Dropdown.js';\nimport { Field } from '@mistriwork/ui/Field.js';\nimport './BrandingForm.css';\nimport { say } from '../copy/dashboards/components/BrandingForm.js';\nimport { shellRoot } from '@mistriwork/kit/client/shellHost.js';\n\ninterface BrandingReply {\n branding: TenantBrandingValue;\n revision: number;\n editor: boolean;\n allow: BrandingKey[];\n themes: ThemeDefinition[];\n error?: string;\n errors?: BrandingRefusal[];\n}\n\nconst HEX = /^#[0-9a-f]{6}$/;\nconst RADII = ['0px', '2px', '4px', '6px', '8px'];\nconst LOGO_ADDRESS = /^\\/api\\/branding\\/logo\\/[0-9a-f]{64}$/;\n\n/** The draft as the save takes it: a key the form leaves empty is the App's. */\ntype Draft = { -readonly [K in keyof TenantBrandingValue]?: TenantBrandingValue[K] };\n\nfunction dark(): boolean {\n const root = shellRoot().dataset.theme;\n return root === 'dark' || (!root && window.matchMedia?.('(prefers-color-scheme: dark)').matches === true);\n}\n\nexport function BrandingForm() {\n const [reply, setReply] = useState<BrandingReply | null>(null);\n const [failed, setFailed] = useState('');\n const [draft, setDraft] = useState<Draft>({});\n /* An upload not yet saved: its bytes for the save, its object URL for the preview; null removes the saved logo. */\n const [upload, setUpload] = useState<{ base64: string; url: string } | null | undefined>(undefined);\n /* The same for the dark logo, which belongs to a logo: removing the logo takes it too. */\n const [darkUpload, setDarkUpload] = useState<{ base64: string; url: string } | null | undefined>(undefined);\n /* The tab icon, the same way; unlike the dark logo it stands without a logo. */\n const [iconUpload, setIconUpload] = useState<{ base64: string; url: string } | null | undefined>(undefined);\n const [phase, setPhase] = useState<'idle' | 'saving'>('idle');\n const [message, setMessage] = useState('');\n const [refused, setRefused] = useState<BrandingRefusal[]>([]);\n const file = useRef<HTMLInputElement>(null);\n const darkFile = useRef<HTMLInputElement>(null);\n const iconFile = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n let alive = true;\n void (async () => {\n try {\n const got = (await api('/api/branding', {})) as BrandingReply;\n if (!alive) return;\n if (got.error) setFailed(got.error);\n else {\n setReply(got);\n setDraft({ ...got.branding });\n }\n } catch (error) {\n if (alive) setFailed(error instanceof Error ? error.message : say('couldNotLoad'));\n }\n })();\n return () => {\n alive = false;\n };\n }, []);\n useEffect(() => () => (upload ? URL.revokeObjectURL(upload.url) : undefined), [upload]);\n useEffect(() => () => (darkUpload ? URL.revokeObjectURL(darkUpload.url) : undefined), [darkUpload]);\n useEffect(() => () => (iconUpload ? URL.revokeObjectURL(iconUpload.url) : undefined), [iconUpload]);\n\n const declaration = useMemo(() => (reply ? { themes: reply.themes, allow: reply.allow, editors: [] } : undefined), [reply]);\n /* What the save would judge: the draft without the color a reader is still typing. */\n const candidate = useMemo<TenantBrandingValue>(() => {\n const { accent, ...rest } = draft;\n return accent && HEX.test(accent.light) && HEX.test(accent.dark) ? { ...rest, accent } : rest;\n }, [draft]);\n const theme = useMemo(() => (declaration ? tenantTheme(declaration, candidate) : undefined), [declaration, candidate]);\n const problems = useMemo(() => (declaration ? brandingProblems(declaration, candidate) : []), [declaration, candidate]);\n\n if (failed)\n return (\n <p className=\"branding-form-note\" role=\"alert\">\n {failed}\n </p>\n );\n if (!reply || !declaration || !theme)\n return (\n <p className=\"branding-form-note\" role=\"status\">\n {say('loading')}\n </p>\n );\n\n const allowed = (key: BrandingKey) => reply.allow.includes(key);\n const editor = reply.editor;\n const app = activeApp();\n const name = draft.name?.trim() || app?.name || '';\n const savedLogo = reply.branding.logo ? `/api/branding/logo/${reply.branding.logo.hash}` : undefined;\n const logo = upload === null ? undefined : (upload?.url ?? (savedLogo && LOGO_ADDRESS.test(savedLogo) ? served(savedLogo) : undefined));\n const savedDark = reply.branding.logoDark ? `/api/branding/logo/${reply.branding.logoDark.hash}` : undefined;\n const darkLogo =\n !logo || darkUpload === null\n ? undefined\n : (darkUpload?.url ?? (savedDark && LOGO_ADDRESS.test(savedDark) ? served(savedDark) : undefined));\n const savedIcon = reply.branding.favicon ? `/api/branding/logo/${reply.branding.favicon.hash}` : undefined;\n const tabIcon =\n iconUpload === null ? undefined : (iconUpload?.url ?? (savedIcon && LOGO_ADDRESS.test(savedIcon) ? served(savedIcon) : undefined));\n const chosen = reply.themes.find((item) => item.id === draft.preset) ?? reply.themes[0]!;\n const palette = theme[dark() ? 'dark' : 'light'];\n const problemFor = (field: BrandingKey) =>\n [...refused.filter((item) => item.field === field), ...(field === 'accent' ? problems : [])].map((item) => item.message)[0] ?? '';\n const set = (patch: Draft) => {\n setDraft((current) => ({ ...current, ...patch }));\n setMessage('');\n setRefused([]);\n };\n const accentText = draft.accent?.light ?? '';\n /* One accent for both grounds, the dark one derived as the save derives it, in the theme the draft wears. */\n const pairFor = (light: string) => accentFor(declaration!, candidate, light);\n const preview = {\n '--bp-ground': palette.ground,\n '--bp-surface': palette.surface,\n '--bp-ink': palette.ink,\n '--bp-muted': palette.inkMuted,\n '--bp-line': palette.line,\n '--bp-accent': palette.accent,\n '--bp-accent-soft': palette.accentSoft,\n '--bp-nav': palette.navGround ?? palette.surface,\n '--bp-nav-ink': palette.navInk ?? palette.ink,\n '--bp-nav-accent': palette.navAccent ?? palette.accent,\n '--bp-chart': palette.chart1 ?? palette.accent,\n '--bp-radius': draft.radius ?? theme.radius?.control ?? '4px',\n } as CSSProperties;\n\n const pick = async (event: ChangeEvent<HTMLInputElement>, into: typeof setUpload) => {\n const chosenFile = event.target.files?.[0];\n event.target.value = '';\n if (!chosenFile) return;\n const bytes = new Uint8Array(await chosenFile.arrayBuffer());\n let binary = '';\n for (let index = 0; index < bytes.length; index += 0x8000) binary += String.fromCharCode(...bytes.subarray(index, index + 0x8000));\n into({ base64: btoa(binary), url: URL.createObjectURL(chosenFile) });\n setMessage('');\n setRefused([]);\n };\n const save = async () => {\n if (phase === 'saving' || !editor || problems.length) return;\n setPhase('saving');\n setMessage('');\n try {\n const { logo: _logo, logoDark: _logoDark, favicon: _favicon, ...value } = draft;\n const got = (await api('/api/branding/save', {\n branding:\n value.accent && !(HEX.test(value.accent.light) && HEX.test(value.accent.dark)) ? { ...value, accent: value.accent.light } : value,\n ...(upload === undefined ? {} : { logo: upload === null ? null : upload.base64 }),\n ...(darkUpload === undefined ? {} : { darkLogo: darkUpload === null ? null : darkUpload.base64 }),\n ...(iconUpload === undefined ? {} : { favicon: iconUpload === null ? null : iconUpload.base64 }),\n })) as BrandingReply;\n if (got.error) {\n setRefused(got.errors ?? [{ field: 'name', message: got.error }]);\n setMessage(got.error);\n } else {\n setReply(got);\n setDraft({ ...got.branding });\n setUpload(undefined);\n setDarkUpload(undefined);\n setIconUpload(undefined);\n setMessage(say('saved'));\n }\n } catch (error) {\n setMessage(error instanceof Error ? error.message : say('couldNotSave'));\n } finally {\n setPhase('idle');\n }\n };\n const disabled = !editor || phase === 'saving';\n\n return (\n <div className=\"branding-form\">\n <form\n className=\"branding-form-fields\"\n onSubmit={(event) => {\n event.preventDefault();\n void save();\n }}\n noValidate\n >\n {!editor && <p className=\"branding-form-note\">{say('readOnly')}</p>}\n {allowed('name') && (\n <Field label={say('name')} hint={say('nameHint')} problem={problemFor('name')} size=\"compact\">\n <input\n className=\"field-control\"\n name=\"name\"\n value={draft.name ?? ''}\n placeholder={app?.name}\n maxLength={80}\n disabled={disabled}\n onChange={(event) => set({ name: event.target.value || undefined })}\n />\n </Field>\n )}\n {allowed('logo') && (\n <Field label={say('logo')} hint={say('logoHint')} problem={problemFor('logo')} size=\"compact\" group>\n {(control) => (\n <div className=\"branding-form-logo\" {...control} role=\"group\">\n <span className=\"branding-form-logo-box\">{logo ? <img src={logo} alt=\"\" width={96} height={24} /> : say('noLogo')}</span>\n <input\n ref={file}\n type=\"file\"\n hidden\n accept=\"image/png,image/jpeg,image/webp,image/gif,image/svg+xml\"\n onChange={(event) => void pick(event, setUpload)}\n />\n <Button intent=\"secondary\" size=\"compact\" disabled={disabled} onClick={() => file.current?.click()}>\n {say('chooseLogo')}\n </Button>\n {logo && (\n <Button\n intent=\"quiet\"\n size=\"compact\"\n disabled={disabled}\n onClick={() => setUpload(reply.branding.logo ? null : undefined)}\n >\n {say('removeLogo')}\n </Button>\n )}\n </div>\n )}\n </Field>\n )}\n {allowed('logo') && logo && (\n <Field label={say('darkLogo')} hint={say('darkLogoHint')} size=\"compact\" group>\n {(control) => (\n <div className=\"branding-form-logo\" {...control} role=\"group\">\n <span className=\"branding-form-logo-box branding-form-logo-box--dark\">\n {darkLogo ? <img src={darkLogo} alt=\"\" width={96} height={24} /> : say('noDarkLogo')}\n </span>\n <input\n ref={darkFile}\n type=\"file\"\n hidden\n accept=\"image/png,image/jpeg,image/webp,image/gif,image/svg+xml\"\n onChange={(event) => void pick(event, setDarkUpload)}\n />\n <Button intent=\"secondary\" size=\"compact\" disabled={disabled} onClick={() => darkFile.current?.click()}>\n {say('chooseLogo')}\n </Button>\n {darkLogo && (\n <Button\n intent=\"quiet\"\n size=\"compact\"\n disabled={disabled}\n onClick={() => setDarkUpload(reply.branding.logoDark ? null : undefined)}\n >\n {say('removeLogo')}\n </Button>\n )}\n </div>\n )}\n </Field>\n )}\n {allowed('logo') && (\n <Field label={say('favicon')} hint={say('faviconHint')} problem={problemFor('logo')} size=\"compact\" group>\n {(control) => (\n <div className=\"branding-form-logo\" {...control} role=\"group\">\n <span className=\"branding-form-logo-box\">\n {tabIcon ? <img src={tabIcon} alt=\"\" width={32} height={32} /> : say('noFavicon')}\n </span>\n <input\n ref={iconFile}\n type=\"file\"\n hidden\n accept=\"image/png,image/svg+xml,image/x-icon,.ico\"\n onChange={(event) => void pick(event, setIconUpload)}\n />\n <Button intent=\"secondary\" size=\"compact\" disabled={disabled} onClick={() => iconFile.current?.click()}>\n {say('chooseLogo')}\n </Button>\n {tabIcon && (\n <Button\n intent=\"quiet\"\n size=\"compact\"\n disabled={disabled}\n onClick={() => setIconUpload(reply.branding.favicon ? null : undefined)}\n >\n {say('removeLogo')}\n </Button>\n )}\n </div>\n )}\n </Field>\n )}\n {allowed('accent') && (\n <Field label={say('accent')} hint={say('accentHint')} problem={problemFor('accent')} size=\"compact\" group>\n {(control) => (\n <div className=\"branding-form-accent\" {...control} role=\"group\">\n <input\n type=\"color\"\n aria-label={say('accentColor')}\n value={HEX.test(accentText) ? accentText : palette.accent}\n disabled={disabled}\n onChange={(event) => set({ accent: pairFor(event.target.value) })}\n />\n <input\n className=\"field-control\"\n aria-label={say('accentColor')}\n value={accentText}\n placeholder={chosen.light.accent}\n spellCheck={false}\n maxLength={7}\n disabled={disabled}\n onChange={(event) => {\n const typed = event.target.value.trim().toLowerCase();\n set({ accent: typed ? (HEX.test(typed) ? pairFor(typed) : { light: typed, dark: typed }) : undefined });\n }}\n />\n </div>\n )}\n </Field>\n )}\n {allowed('preset') && (\n <Field label={say('theme')} problem={problemFor('preset')} size=\"compact\" group>\n <Dropdown\n ariaLabel={say('theme')}\n disabled={disabled}\n value={draft.preset ?? reply.themes[0]!.id}\n items={reply.themes.map((item) => ({ value: item.id, label: item.label }))}\n onChange={(next) => set({ preset: next, palette: undefined })}\n />\n </Field>\n )}\n {allowed('palette') && chosen.palettes?.length ? (\n <Field label={say('palette')} problem={problemFor('palette')} size=\"compact\" group>\n <Dropdown\n ariaLabel={say('palette')}\n disabled={disabled}\n value={draft.palette ?? chosen.defaultPalette ?? 'default'}\n items={[{ value: 'default', label: chosen.label }, ...chosen.palettes.map((item) => ({ value: item.id, label: item.label }))]}\n onChange={(next) => set({ palette: next })}\n />\n </Field>\n ) : null}\n {allowed('radius') && (\n <Field label={say('corner')} problem={problemFor('radius')} size=\"compact\" group>\n <Dropdown\n ariaLabel={say('corner')}\n disabled={disabled}\n value={draft.radius ?? ''}\n items={[\n { value: '', label: say('appDefault') },\n ...RADII.map((radius) => ({ value: radius, label: radius === '0px' ? say('square') : radius })),\n ]}\n onChange={(next) => set({ radius: next || undefined })}\n />\n </Field>\n )}\n {allowed('density') && (\n <Field label={say('density')} problem={problemFor('density')} size=\"compact\" group>\n <Dropdown\n ariaLabel={say('density')}\n disabled={disabled}\n value={draft.density ?? ''}\n items={[\n { value: '', label: say('appDefault') },\n { value: 'compact', label: say('compact') },\n { value: 'comfortable', label: say('comfortable') },\n { value: 'spacious', label: say('spacious') },\n ]}\n onChange={(next) => set({ density: (next || undefined) as ThemeDensity | undefined })}\n />\n </Field>\n )}\n {allowed('font') && (\n <Field label={say('font')} problem={problemFor('font')} size=\"compact\" group>\n <Dropdown\n ariaLabel={say('font')}\n disabled={disabled}\n value={draft.font ?? ''}\n items={[\n { value: '', label: say('appDefault') },\n ...brandingFonts(declaration).map((font) => ({ value: font.id, label: font.id })),\n ]}\n onChange={(next) => set({ font: next || undefined })}\n />\n </Field>\n )}\n {editor && (\n <footer className=\"form-actions\">\n <p className=\"branding-form-status\" role=\"status\">\n {message}\n </p>\n <Button\n intent=\"secondary\"\n size=\"compact\"\n disabled={phase === 'saving'}\n onClick={() => {\n setDraft({ ...reply.branding });\n setUpload(undefined);\n setMessage('');\n setRefused([]);\n }}\n >\n {say('reset')}\n </Button>\n <Button intent=\"primary\" size=\"compact\" type=\"submit\" disabled={phase === 'saving' || problems.length > 0}>\n {phase === 'saving' ? say('saving') : say('save')}\n </Button>\n </footer>\n )}\n </form>\n <section className=\"branding-preview\" aria-label={say('preview')} style={preview}>\n <figure>\n <figcaption>{say('previewShell')}</figcaption>\n <div className=\"branding-preview-shell\">\n <span className=\"branding-preview-mark\">\n {logo ? <img src={dark() && darkLogo ? darkLogo : logo} alt=\"\" width={96} height={24} /> : null}\n </span>\n <strong>{name}</strong>\n <span className=\"branding-preview-nav\" data-current>\n {say('sampleNav')}\n </span>\n <span className=\"branding-preview-nav\">{say('sampleOther')}</span>\n </div>\n </figure>\n <figure>\n <figcaption>{say('previewRecord')}</figcaption>\n <div className=\"branding-preview-record\">\n <strong>{app?.name || say('sampleRecord')}</strong>\n <span className=\"branding-preview-pill\">{say('sampleStatus')}</span>\n <span className=\"branding-preview-button\">{say('sampleAction')}</span>\n </div>\n </figure>\n <figure>\n <figcaption>{say('previewStat')}</figcaption>\n <div className=\"branding-preview-stat\">\n <span>{say('sampleStat')}</span>\n <strong>128</strong>\n <span className=\"branding-preview-bars\" aria-hidden=\"true\">\n {[40, 64, 52, 80, 70].map((height, index) => (\n <i key={index} style={{ height: `${height}%` }} />\n ))}\n </span>\n </div>\n </figure>\n <figure>\n <figcaption>{say('previewEmail')}</figcaption>\n <div className=\"branding-preview-email\">\n <div className=\"branding-preview-email-head\">\n {logo ? <img src={logo} alt=\"\" width={96} height={24} /> : <strong>{name}</strong>}\n </div>\n <p>{say('sampleEmailLine')}</p>\n <span className=\"branding-preview-button\">{say('sampleEmailButton')}</span>\n </div>\n </figure>\n </section>\n </div>\n );\n}\n"],"mappings":"A,kUAaM+B,EAAmB,CAAE,EAAG,GAAK,EAAG,GAAK,EAAG,CAAE,EAG1CC,EAAiB,CAAE,EAAG,GAAK,EAAG,IAAM,EAAG,EAAI,EAEpCC,EAAmB,IAC7BC,EAAQ,OAAS,QAAUF,EAAiBD,EAAA,CAAkBG,EAAQ,UAAY,GAKzC,OAAO,KAAKd,CAAc,CAAC,CACpE,OAAQ,GAASe,IAAS,UAAYA,IAAS,eAAiBA,IAAS,cAAc,CAAC,CACxF,IAAIhB,CAAQ,EAEf,SAAgBiB,EAAS,EAAsB,CAC7C,IAAMC,EAAS,kBAAkB,KAAKC,CAAI,EAE1C,OADID,EAAe,QAAQ,OAAOA,EAAO,EAAE,EAAI,IACxCC,EAAK,QAAQ,UAAW,EAAG,IAAmBC,EAAO,YAAY,CAAC,CAC3E,CCyXA,SAASC,EAAU,EAAqB,CACtC,IAAMC,EAAW,CAAC,EAAG,EAAG,CAAC,CAAC,CACvB,IAAK,GAAU,SAASC,EAAI,MAAMC,EAAOA,EAAQ,CAAC,EAAG,EAAE,EAAI,GAAG,CAAC,CAC/D,IAAK,GAAWC,GAAS,OAAUA,EAAQ,QAAUA,EAAQ,MAAS,QAAU,GAAI,EACvF,OAAOH,EAAS,GAAM,MAASA,EAAS,GAAM,MAASA,EAAS,GAAM,KACxE,CAEA,SAAgBI,EAAc,EAAW,EAAmB,CAC1D,IAAMC,EAAON,EAAUO,CAAC,EACtBC,EAAQR,EAAUS,CAAC,EACrB,OAAQ,KAAK,IAAIH,EAAME,CAAK,EAAI,MAAS,KAAK,IAAIF,EAAME,CAAK,EAAI,IACnE,CASA,IAAaE,EAAuB,KAQ9BC,EAAoG,CACxG,CAAC,MAAO,UAAW,GAAG,EAC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